{"id":37461976,"url":"https://github.com/trolley/javascript-sdk","last_synced_at":"2026-01-16T07:04:52.840Z","repository":{"id":39433593,"uuid":"116714805","full_name":"trolley/javascript-sdk","owner":"trolley","description":"Trolley SDK for JavaScript","archived":false,"fork":false,"pushed_at":"2024-12-19T17:10:49.000Z","size":745,"stargazers_count":7,"open_issues_count":19,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-20T01:17:55.979Z","etag":null,"topics":["javascript-sdk","sdk","trolley-sdk","typescript"],"latest_commit_sha":null,"homepage":"https://trolley.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trolley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2018-01-08T18:49:39.000Z","updated_at":"2025-03-31T18:09:41.000Z","dependencies_parsed_at":"2023-09-27T05:15:36.752Z","dependency_job_id":null,"html_url":"https://github.com/trolley/javascript-sdk","commit_stats":null,"previous_names":["trolley/javascript-sdk"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/trolley/javascript-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trolley%2Fjavascript-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trolley%2Fjavascript-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trolley%2Fjavascript-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trolley%2Fjavascript-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trolley","download_url":"https://codeload.github.com/trolley/javascript-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trolley%2Fjavascript-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript-sdk","sdk","trolley-sdk","typescript"],"created_at":"2026-01-16T07:04:52.100Z","updated_at":"2026-01-16T07:04:52.821Z","avatar_url":"https://github.com/trolley.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trolley JavaScript SDK\n\nTrolley's JavaScript SDK (written in TypeScript) - For more information about the API as well as NodeJS code samples check out the [full API documentation](https://docs.trolley.com)\n\n## Installation\n\n    npm install --save trolleyhq\n\n## Getting Started\n\nThe Trolley API is built using promises and all methods except\nconnect will return a promise. The connect call allows you to setup\nyour API Key and Secret with a client that can be used for subsequent\ncalls.\n\n```js\n// A simple application using the Trolley/Payment Rails SDK\nconst trolley = require('trolleyhq');\n\nconst client = trolley.connect({\n  key: \"YOUR-ACCESS-KEY\",\n  secret: \"YOUR-SECRET-SECRET\",\n});\n\n// Async/Await version\n\nasync function main() {\n  const recipient = await client.recipient.find(\"R-G7SXXpm6cs4aTUd9YhmgWC\");\n  console.log(recipient.id);\n}\n\nmain();\n\n// Promise version\n\nclient.recipient.find(\"R-G7SXXpm6cs4aTUd9YhmgWC\").then(recipient =\u003e {\n  console.log(recipient.id);\n}).catch(err =\u003e {\n  console.log(\"ERROR\", err);\n});\n\n```\n\n### Usage\n\nMethods should all have JSDoc comments to help you understand their usage. As mentioned the [full API documentation](https://docs.trolley.com)\nis the best source of information about the API.\n\nFor more information please read the [JavaScript API docs](https://github.com/Trolley/javascript-sdk/blob/master/docs/) is available. The best starting point is:\n\n| Data Type | SDK Documentation |\n| ----- | ----- |\n| Batch | [API Docs for Batch](https://github.com/Trolley/javascript-sdk/blob/master/docs/classes/batchgateway.md) |\n| Payment | [API Docs for Payment](https://github.com/Trolley/javascript-sdk/blob/master/docs/classes/paymentgateway.md) |\n| Recipient | [API Docs for Recipient](https://github.com/Trolley/javascript-sdk/blob/master/docs/classes/recipientgateway.md) |\n| Recipient Account | [API Docs for Recipient Account](https://github.com/Trolley/javascript-sdk/blob/master/docs/classes/recipientaccountgateway.md) |\n\n### Running Integration / Unit tests\n\nIf you're working on the library itself, here's easy way to run the tests.\n\n```\n// if not already, copy the example env file to create an env file\n$ cp .env.test .env\n\n// Set access key and secret in the env file\nTROLLEY_ACCESS_KEY=\"ACCESS_KEY\"\nTROLLEY_SECRET_KEY=\"SECRET_KEY\"\n\n//Run the fixture based tests\n$ npm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrolley%2Fjavascript-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrolley%2Fjavascript-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrolley%2Fjavascript-sdk/lists"}