{"id":13784188,"url":"https://github.com/interledger-deprecated/ilp-plugin-stripe","last_synced_at":"2026-02-01T09:17:48.900Z","repository":{"id":92526778,"uuid":"119669410","full_name":"interledger-deprecated/ilp-plugin-stripe","owner":"interledger-deprecated","description":"Interledger plugin based on https://github.com/interledgerjs/ilp-plugin-btp and https://stripe.com/docs/api","archived":false,"fork":false,"pushed_at":"2018-01-31T14:52:46.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-13T20:55:01.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/interledger-deprecated.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-31T10:02:10.000Z","updated_at":"2024-07-21T20:34:55.694Z","dependencies_parsed_at":null,"dependency_job_id":"da7f1315-cb59-46eb-9eba-d309d6a1f546","html_url":"https://github.com/interledger-deprecated/ilp-plugin-stripe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Filp-plugin-stripe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Filp-plugin-stripe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Filp-plugin-stripe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Filp-plugin-stripe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interledger-deprecated","download_url":"https://codeload.github.com/interledger-deprecated/ilp-plugin-stripe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225086568,"owners_count":17418750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-03T19:00:36.834Z","updated_at":"2026-02-01T09:17:48.888Z","avatar_url":"https://github.com/interledger-deprecated.png","language":"JavaScript","funding_links":[],"categories":["Ledger Plugins"],"sub_categories":["JavaScript (Interledger.js)"],"readme":"# ilp-plugin-stripe\nInterledger plugin based on https://github.com/interledgerjs/ilp-plugin-btp and https://stripe.com/docs/api\n\nSave this as test.js:\n```js\nconst Plugin = require('.')\nconst crypto = require('crypto')\nconst IlDcp = require('ilp-protocol-ildcp')\nconst IlpPacket = require('ilp-packet')\nfunction sha256(preimage) { return crypto.createHash('sha256').update(preimage).digest() }\n\nconst plugin = new Plugin({\n  stripe: {\n     api_key: 'sk_test_sgmhnulE2YhvqafcHj5IMnhR',\n     assetCode: 'EUR',\n     assetScale: 2, // notice scale is always  or 2, as per https://stripe.com/docs/currencies#zero-decimal\n     customer: 'cus_CEmxWWOoW2SVqh',\n     description: 'Interledger settlement'\n  },\n  server: 'btp+wss://:token@amundsen.ilpdemo.org:1801'\n})\nconsole.log('connecting')\nplugin.connect().then(async () =\u003e {\n  console.log('connected')\n  const request = IlDcp.serializeIldcpRequest()\n  const response = await plugin.sendData(request)\n  const info = IlDcp.deserializeIldcpResponse(response)\n  const fulfillment = crypto.randomBytes(32)\n  const condition = sha256(fulfillment)\n  console.log(`Now go to https://interfaucet.ilpdemo.org/?address=${info.clientAddress}\u0026condition=${condition.toString('hex')}`)\n  plugin.registerDataHandler(packet =\u003e {\n    const prepare = IlpPacket.deserializeIlpPrepare(packet)\n    console.log(prepare)\n    return IlpPacket.serializeIlpFulfill({ fulfillment: fulfillment, data: Buffer.from([]) })\n  })\n  plugin.registerMoneyHandler(packet =\u003e {\n    console.log('got money!', packet)\n    plugin.disconnect()\n  })\n})\n```\n\nCreate a Stripe account, and on https://dashboard.stripe.com/test/customers\ncreate a customer. To this customer, add a creditcard (you can use http://www.easy400.net/js2/regexp/ccnums.html).\nTake the ID of the customer you just created, and use it for `customer` on line 7 of test.js.\nOn https://dashboard.stripe.com/account/apikeys click 'Reveal test key token' and use it for `api_key` on line 4 of test.js.\nOptionally pick a different description and asset code (but keep in mind some currencies use asset scale 0 instead of 2, see\nhttps://stripe.com/docs/currencies#presentment-currencies).\n\nThen run:\n```sh\nnpm install\nDEBUG=* node test.js\n```\n\nOnce that succeeds, open https://dashboard.stripe.com/test/payments/ to see the payment in the history.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledger-deprecated%2Filp-plugin-stripe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterledger-deprecated%2Filp-plugin-stripe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledger-deprecated%2Filp-plugin-stripe/lists"}