Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trinarylabs/stripe-workers
An unofficial stripe-sdk for workers.dev and environments that use fetch
https://github.com/trinarylabs/stripe-workers
cloudflare-workers deno payments serverless stripe workers
Last synced: 3 months ago
JSON representation
An unofficial stripe-sdk for workers.dev and environments that use fetch
- Host: GitHub
- URL: https://github.com/trinarylabs/stripe-workers
- Owner: TrinaryLabs
- License: apache-2.0
- Archived: true
- Created: 2021-02-05T20:31:59.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-13T15:53:24.000Z (over 3 years ago)
- Last Synced: 2024-09-13T15:22:36.024Z (4 months ago)
- Topics: cloudflare-workers, deno, payments, serverless, stripe, workers
- Language: TypeScript
- Homepage:
- Size: 837 KB
- Stars: 21
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE_APACHE
Awesome Lists containing this project
README
# `stripe-workers`
An unofficial stripe-sdk for [workers.dev](https://workers.dev) and environments that use [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
## BETA
This project is in beta, this SDK is built to follow the offical stripe-api & follow the namespace structure of stripe-node . If you find any errors please file an issue
## Setup
### Add to project
```bash
yarn add stripe-workers
```### Add to code
```js
import { Stripe } from 'stripe-workers'const stripe = new Stripe('Stripe-Secret-Key', {
apiVersion: '2020-08-27', //(optional: string)
fetch: CustomFetch, //(optional: Function) window.fetch will be used
userAgent: 'stripe-workers/version', //(optional: string)
})
```## Examples of use
[`Deno`](https://github.com/TrinaryLabs/stripe-workers/tree/master/examples/deno)
[`Workers`](https://github.com/TrinaryLabs/stripe-workers/tree/master/examples/workers)## 👩 💻 Developing
[`src/index.ts`](./src/index.ts) is the starting point.
[`src/resources/`](./src/resources/) the resources directory contains all the code for the stripe API resources that this package support.
[`src/client.ts`](./src/client.ts) contains the fetch client.## 🤢 Issues
If you run into issues with this specific project, please feel free to file an issue [here](https://github.com/TrinaryLabs/stripe-workers/issues).