-
Notifications
You must be signed in to change notification settings - Fork 768
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a33751
commit ce315b0
Showing
20 changed files
with
1,225 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v183 | ||
v185 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
[![Version](https://img.shields.io/npm/v/stripe.svg)](https://www.npmjs.org/package/stripe) | ||
[![Build Status](https://github.com/stripe/stripe-node/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-node/actions?query=branch%3Amaster) | ||
[![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-node/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-node?branch=master) | ||
[![Downloads](https://img.shields.io/npm/dm/stripe.svg)](https://www.npmjs.com/package/stripe) | ||
[![Try on RunKit](https://badge.runkitcdn.com/stripe.svg)](https://runkit.com/npm/stripe) | ||
|
||
|
@@ -10,10 +11,6 @@ applications written in server-side JavaScript. | |
|
||
For collecting customer and payment information in the browser, use [Stripe.js][stripe-js]. | ||
|
||
## Support | ||
|
||
New features and bug fixes are released on the latest major version of the `stripe` package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates. | ||
|
||
## Documentation | ||
|
||
See the [`stripe-node` API docs](https://stripe.com/docs/api?lang=node) for Node.js. | ||
|
@@ -34,20 +31,6 @@ npm install stripe --save | |
yarn add stripe | ||
``` | ||
|
||
### Beta version | ||
|
||
Stripe has features in the beta phase that can be accessed via the beta version of this package. | ||
We would love for you to try these and share feedback with us before these features reach the stable phase. | ||
The beta versions can be installed in one of two ways | ||
- To install the latest beta version, run the command `npm install stripe@beta --save` | ||
- To install a specific beta version, replace the term "beta" in the above command with the version number like `npm install [email protected] --save` | ||
|
||
> Note: There can be breaking changes between beta versions. Therefore we recommend pinning the package version to a specific beta version in your package.json file. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest beta version. | ||
We highly recommend keeping an eye on when the beta feature you are interested in goes from beta to stable so that you can move from using a beta version of the SDK to the stable version. | ||
|
||
The versions tab on the [stripe page on npm](https://www.npmjs.com/package/stripe) lists the current tags in use. The `beta` tag here corresponds to the the latest beta version of the package. | ||
|
||
## Usage | ||
|
||
The package needs to be configured with your account's secret key, which is | ||
|
@@ -204,7 +187,8 @@ const stripe = Stripe('sk_test_...', { | |
| `protocol` | `'https'` | `'https'` or `'http'`. `http` is never appropriate for sending requests to Stripe servers, and we strongly discourage `http`, even in local testing scenarios, as this can result in your credentials being transmitted over an insecure channel. | | ||
| `telemetry` | `true` | Allow Stripe to send latency [telemetry](#request-latency-telemetry). | | ||
|
||
Note: Both `maxNetworkRetries` and `timeout` can be overridden on a per-request basis. | ||
> **Note** | ||
> Both `maxNetworkRetries` and `timeout` can be overridden on a per-request basis. | ||
### Configuring Timeout | ||
|
||
|
@@ -490,6 +474,33 @@ const stripe = new Stripe('sk_test_...', { | |
}); | ||
``` | ||
|
||
### Beta SDKs | ||
|
||
Stripe has features in the beta phase that can be accessed via the beta version of this package. | ||
We would love for you to try these and share feedback with us before these features reach the stable phase. | ||
The beta versions can be installed in one of two ways | ||
- To install the latest beta version, run the command `npm install stripe@beta --save` | ||
- To install a specific beta version, replace the term "beta" in the above command with the version number like `npm install [email protected] --save` | ||
|
||
> **Note** | ||
> There can be breaking changes between beta versions. Therefore we recommend pinning the package version to a specific beta version in your package.json file. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest beta version. | ||
We highly recommend keeping an eye on when the beta feature you are interested in goes from beta to stable so that you can move from using a beta version of the SDK to the stable version. | ||
|
||
The versions tab on the [stripe page on npm](https://www.npmjs.com/package/stripe) lists the current tags in use. The `beta` tag here corresponds to the the latest beta version of the package. | ||
|
||
If your beta feature requires a `Stripe-Version` header to be sent, use the `apiVersion` property of `config` object to set it: | ||
|
||
```js | ||
const stripe = new Stripe('sk_test_...', { | ||
apiVersion: '2022-08-01; feature_beta=v3', | ||
}); | ||
``` | ||
|
||
## Support | ||
|
||
New features and bug fixes are released on the latest major version of the `stripe` package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates. | ||
|
||
## More Information | ||
|
||
- [REST API Version](https://github.com/stripe/stripe-node/wiki/REST-API-Version) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// File generated from our OpenAPI spec | ||
|
||
'use strict'; | ||
|
||
const StripeResource = require('../../StripeResource'); | ||
const stripeMethod = StripeResource.method; | ||
|
||
module.exports = StripeResource.extend({ | ||
path: 'gift_cards/cards', | ||
|
||
create: stripeMethod({ | ||
method: 'POST', | ||
path: '', | ||
}), | ||
|
||
retrieve: stripeMethod({ | ||
method: 'GET', | ||
path: '/{id}', | ||
}), | ||
|
||
update: stripeMethod({ | ||
method: 'POST', | ||
path: '/{id}', | ||
}), | ||
|
||
list: stripeMethod({ | ||
method: 'GET', | ||
path: '', | ||
methodType: 'list', | ||
}), | ||
|
||
validate: stripeMethod({ | ||
method: 'POST', | ||
path: '/validate', | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// File generated from our OpenAPI spec | ||
|
||
'use strict'; | ||
|
||
const StripeResource = require('../../StripeResource'); | ||
const stripeMethod = StripeResource.method; | ||
|
||
module.exports = StripeResource.extend({ | ||
path: 'gift_cards/transactions', | ||
|
||
create: stripeMethod({ | ||
method: 'POST', | ||
path: '', | ||
}), | ||
|
||
retrieve: stripeMethod({ | ||
method: 'GET', | ||
path: '/{id}', | ||
}), | ||
|
||
update: stripeMethod({ | ||
method: 'POST', | ||
path: '/{id}', | ||
}), | ||
|
||
list: stripeMethod({ | ||
method: 'GET', | ||
path: '', | ||
methodType: 'list', | ||
}), | ||
|
||
cancel: stripeMethod({ | ||
method: 'POST', | ||
path: '/{id}/cancel', | ||
}), | ||
|
||
confirm: stripeMethod({ | ||
method: 'POST', | ||
path: '/{id}/confirm', | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.