@stripe/stripe-js 3.0.7 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/bank-accounts.d.mts +61 -0
- package/dist/api/bank-accounts.d.ts +61 -0
- package/dist/api/cards.d.mts +130 -0
- package/dist/api/cards.d.ts +130 -0
- package/dist/api/financial-connections.d.mts +232 -0
- package/dist/api/financial-connections.d.ts +232 -0
- package/dist/api/index.d.mts +11 -0
- package/dist/api/index.d.ts +11 -0
- package/dist/api/orders.d.mts +122 -0
- package/dist/api/orders.d.ts +122 -0
- package/dist/api/payment-intents.d.mts +330 -0
- package/dist/api/payment-intents.d.ts +330 -0
- package/dist/api/payment-methods.d.mts +452 -0
- package/dist/api/payment-methods.d.ts +452 -0
- package/dist/api/setup-intents.d.mts +184 -0
- package/dist/api/setup-intents.d.ts +184 -0
- package/dist/api/shared.d.mts +125 -0
- package/dist/api/shared.d.ts +125 -0
- package/dist/api/sources.d.mts +1045 -0
- package/dist/api/sources.d.ts +1045 -0
- package/dist/api/tokens.d.mts +639 -0
- package/dist/api/tokens.d.ts +639 -0
- package/dist/api/verification-sessions.d.mts +9 -0
- package/dist/api/verification-sessions.d.ts +9 -0
- package/dist/index.d.mts +4 -12782
- package/dist/index.d.ts +4 -12782
- package/dist/{stripe.js → index.js} +1 -1
- package/dist/{stripe.mjs → index.mjs} +1 -1
- package/dist/pure.d.mts +5 -0
- package/dist/pure.d.ts +5 -0
- package/dist/pure.js +204 -0
- package/dist/pure.mjs +200 -0
- package/dist/shared.d.mts +6 -0
- package/dist/shared.d.ts +6 -0
- package/dist/stripe-js/checkout.d.mts +153 -0
- package/dist/stripe-js/checkout.d.ts +153 -0
- package/dist/stripe-js/custom-checkout.d.mts +402 -0
- package/dist/stripe-js/custom-checkout.d.ts +402 -0
- package/dist/stripe-js/elements/address.d.mts +261 -0
- package/dist/stripe-js/elements/address.d.ts +261 -0
- package/dist/stripe-js/elements/affirm-message.d.mts +65 -0
- package/dist/stripe-js/elements/affirm-message.d.ts +65 -0
- package/dist/stripe-js/elements/afterpay-clearpay-message.d.mts +119 -0
- package/dist/stripe-js/elements/afterpay-clearpay-message.d.ts +119 -0
- package/dist/stripe-js/elements/apple-pay.d.mts +156 -0
- package/dist/stripe-js/elements/apple-pay.d.ts +156 -0
- package/dist/stripe-js/elements/au-bank-account.d.mts +138 -0
- package/dist/stripe-js/elements/au-bank-account.d.ts +138 -0
- package/dist/stripe-js/elements/base.d.mts +264 -0
- package/dist/stripe-js/elements/base.d.ts +264 -0
- package/dist/stripe-js/elements/card-cvc.d.mts +119 -0
- package/dist/stripe-js/elements/card-cvc.d.ts +119 -0
- package/dist/stripe-js/elements/card-expiry.d.mts +119 -0
- package/dist/stripe-js/elements/card-expiry.d.ts +119 -0
- package/dist/stripe-js/elements/card-number.d.mts +200 -0
- package/dist/stripe-js/elements/card-number.d.ts +200 -0
- package/dist/stripe-js/elements/card.d.mts +226 -0
- package/dist/stripe-js/elements/card.d.ts +226 -0
- package/dist/stripe-js/elements/cart.d.mts +224 -0
- package/dist/stripe-js/elements/cart.d.ts +224 -0
- package/dist/stripe-js/elements/eps-bank.d.mts +140 -0
- package/dist/stripe-js/elements/eps-bank.d.ts +140 -0
- package/dist/stripe-js/elements/express-checkout.d.mts +446 -0
- package/dist/stripe-js/elements/express-checkout.d.ts +446 -0
- package/dist/stripe-js/elements/fpx-bank.d.mts +134 -0
- package/dist/stripe-js/elements/fpx-bank.d.ts +134 -0
- package/dist/stripe-js/elements/iban.d.mts +135 -0
- package/dist/stripe-js/elements/iban.d.ts +135 -0
- package/dist/stripe-js/elements/ideal-bank.d.mts +140 -0
- package/dist/stripe-js/elements/ideal-bank.d.ts +140 -0
- package/dist/stripe-js/elements/index.d.mts +22 -0
- package/dist/stripe-js/elements/index.d.ts +22 -0
- package/dist/stripe-js/elements/issuing/index.d.mts +5 -0
- package/dist/stripe-js/elements/issuing/index.d.ts +5 -0
- package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.mts +37 -0
- package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.ts +37 -0
- package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.mts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.ts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.mts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.ts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.mts +40 -0
- package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.ts +40 -0
- package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.mts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.ts +32 -0
- package/dist/stripe-js/elements/link-authentication.d.mts +158 -0
- package/dist/stripe-js/elements/link-authentication.d.ts +158 -0
- package/dist/stripe-js/elements/p24-bank.d.mts +140 -0
- package/dist/stripe-js/elements/p24-bank.d.ts +140 -0
- package/dist/stripe-js/elements/payment-method-messaging.d.mts +98 -0
- package/dist/stripe-js/elements/payment-method-messaging.d.ts +98 -0
- package/dist/stripe-js/elements/payment-request-button.d.mts +151 -0
- package/dist/stripe-js/elements/payment-request-button.d.ts +151 -0
- package/dist/stripe-js/elements/payment.d.mts +275 -0
- package/dist/stripe-js/elements/payment.d.ts +275 -0
- package/dist/stripe-js/elements/shipping-address.d.mts +215 -0
- package/dist/stripe-js/elements/shipping-address.d.ts +215 -0
- package/dist/stripe-js/elements-group.d.mts +1129 -0
- package/dist/stripe-js/elements-group.d.ts +1129 -0
- package/dist/stripe-js/embedded-checkout.d.mts +35 -0
- package/dist/stripe-js/embedded-checkout.d.ts +35 -0
- package/dist/stripe-js/ephemeral-keys.d.mts +3 -0
- package/dist/stripe-js/ephemeral-keys.d.ts +3 -0
- package/dist/stripe-js/financial-connections.d.mts +19 -0
- package/dist/stripe-js/financial-connections.d.ts +19 -0
- package/dist/stripe-js/index.d.mts +13 -0
- package/dist/stripe-js/index.d.ts +13 -0
- package/dist/stripe-js/orders.d.mts +9 -0
- package/dist/stripe-js/orders.d.ts +9 -0
- package/dist/stripe-js/payment-intents.d.mts +1470 -0
- package/dist/stripe-js/payment-intents.d.ts +1470 -0
- package/dist/stripe-js/payment-request.d.mts +529 -0
- package/dist/stripe-js/payment-request.d.ts +529 -0
- package/dist/stripe-js/setup-intents.d.mts +250 -0
- package/dist/stripe-js/setup-intents.d.ts +250 -0
- package/dist/stripe-js/stripe.d.mts +1472 -0
- package/dist/stripe-js/stripe.d.ts +1472 -0
- package/dist/stripe-js/token-and-sources.d.mts +110 -0
- package/dist/stripe-js/token-and-sources.d.ts +110 -0
- package/dist/utils.d.mts +2 -0
- package/dist/utils.d.ts +2 -0
- package/lib/index.d.mts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/index.mjs +1 -0
- package/package.json +11 -10
- package/pure/index.d.mts +1 -12761
- package/pure/index.d.ts +1 -12761
- package/pure/index.js +1 -204
- package/pure/index.mjs +1 -200
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import {SourceCreateParams} from '../api';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An object containing the unique ID and client secret for a `Source`.
|
|
5
|
+
*
|
|
6
|
+
* You can use a `Source` object created with `stripe.createSource` as the argument to `stripe.retrieveSource`, as every `Source` object has both `id` and `client_secret` keys.
|
|
7
|
+
*/
|
|
8
|
+
export interface RetrieveSourceParam {
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier of the `Source`.
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A secret available to the web client that created the `Source`, for purposes of retrieving the `Source` later from that same client.
|
|
16
|
+
*/
|
|
17
|
+
client_secret: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* An object containing additional payment information you might have collected.
|
|
22
|
+
*
|
|
23
|
+
* Although these fields are optional, we highly recommend collecting name and address.
|
|
24
|
+
* This information can be used to perform a number of verifications, such as CVC, ZIP, and address verification.
|
|
25
|
+
* Radar includes built-in rules that can block payments where the ZIP or CVC verifications with the cardholder’s bank failed.
|
|
26
|
+
*/
|
|
27
|
+
export interface CreateTokenCardData {
|
|
28
|
+
/**
|
|
29
|
+
* @recommended
|
|
30
|
+
*/
|
|
31
|
+
name?: string;
|
|
32
|
+
|
|
33
|
+
address_line1?: string;
|
|
34
|
+
|
|
35
|
+
address_line2?: string;
|
|
36
|
+
|
|
37
|
+
address_city?: string;
|
|
38
|
+
|
|
39
|
+
address_state?: string;
|
|
40
|
+
|
|
41
|
+
address_zip?: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A two character country code (for example, `US`).
|
|
45
|
+
*
|
|
46
|
+
* @recommended
|
|
47
|
+
*/
|
|
48
|
+
address_country?: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Required in order to [add the card to a Connect account](https://stripe.com/docs/connect/payouts#bank-accounts) (in all other cases, this parameter is not used).
|
|
52
|
+
* Currently, the only supported currency for debit card payouts is `usd`.
|
|
53
|
+
*/
|
|
54
|
+
currency?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface CreateTokenIbanData {
|
|
58
|
+
/**
|
|
59
|
+
* Three character currency code (e.g., `eur`).
|
|
60
|
+
*/
|
|
61
|
+
currency: string;
|
|
62
|
+
|
|
63
|
+
account_holder_name: string;
|
|
64
|
+
|
|
65
|
+
account_holder_type: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface CreateTokenPiiData {
|
|
69
|
+
personal_id_number: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface CreateTokenBankAccountData {
|
|
73
|
+
country: string;
|
|
74
|
+
|
|
75
|
+
currency: string;
|
|
76
|
+
|
|
77
|
+
routing_number?: string;
|
|
78
|
+
|
|
79
|
+
account_number: string;
|
|
80
|
+
|
|
81
|
+
account_holder_name?: string;
|
|
82
|
+
|
|
83
|
+
account_holder_type: string;
|
|
84
|
+
|
|
85
|
+
account_type?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* A required object containing the `type` of `Source` you want to create, and any additional payment information that you have collected.
|
|
90
|
+
* See the [Sources API](https://stripe.com/docs/api#create_source) reference for details.
|
|
91
|
+
*
|
|
92
|
+
* You cannot pass raw card information to `stripe.createSource(sourceData)`.
|
|
93
|
+
* Instead, you must gather card information in an `Element` and use `stripe.createSource(element, sourceData)`.
|
|
94
|
+
* You can also pass an existing card token to convert it into a `Source` object.
|
|
95
|
+
*/
|
|
96
|
+
export interface CreateSourceData extends SourceCreateParams {
|
|
97
|
+
bancontact?: CreateSourceData.DeprecatedMethodData;
|
|
98
|
+
|
|
99
|
+
ideal?: CreateSourceData.DeprecatedMethodData;
|
|
100
|
+
|
|
101
|
+
klarna?: CreateSourceData.DeprecatedMethodData;
|
|
102
|
+
|
|
103
|
+
sepa_debit?: CreateSourceData.DeprecatedMethodData;
|
|
104
|
+
|
|
105
|
+
sofort?: CreateSourceData.DeprecatedMethodData;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export namespace CreateSourceData {
|
|
109
|
+
export type DeprecatedMethodData = Record<string, unknown>;
|
|
110
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import {SourceCreateParams} from '../api';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An object containing the unique ID and client secret for a `Source`.
|
|
5
|
+
*
|
|
6
|
+
* You can use a `Source` object created with `stripe.createSource` as the argument to `stripe.retrieveSource`, as every `Source` object has both `id` and `client_secret` keys.
|
|
7
|
+
*/
|
|
8
|
+
export interface RetrieveSourceParam {
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier of the `Source`.
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A secret available to the web client that created the `Source`, for purposes of retrieving the `Source` later from that same client.
|
|
16
|
+
*/
|
|
17
|
+
client_secret: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* An object containing additional payment information you might have collected.
|
|
22
|
+
*
|
|
23
|
+
* Although these fields are optional, we highly recommend collecting name and address.
|
|
24
|
+
* This information can be used to perform a number of verifications, such as CVC, ZIP, and address verification.
|
|
25
|
+
* Radar includes built-in rules that can block payments where the ZIP or CVC verifications with the cardholder’s bank failed.
|
|
26
|
+
*/
|
|
27
|
+
export interface CreateTokenCardData {
|
|
28
|
+
/**
|
|
29
|
+
* @recommended
|
|
30
|
+
*/
|
|
31
|
+
name?: string;
|
|
32
|
+
|
|
33
|
+
address_line1?: string;
|
|
34
|
+
|
|
35
|
+
address_line2?: string;
|
|
36
|
+
|
|
37
|
+
address_city?: string;
|
|
38
|
+
|
|
39
|
+
address_state?: string;
|
|
40
|
+
|
|
41
|
+
address_zip?: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A two character country code (for example, `US`).
|
|
45
|
+
*
|
|
46
|
+
* @recommended
|
|
47
|
+
*/
|
|
48
|
+
address_country?: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Required in order to [add the card to a Connect account](https://stripe.com/docs/connect/payouts#bank-accounts) (in all other cases, this parameter is not used).
|
|
52
|
+
* Currently, the only supported currency for debit card payouts is `usd`.
|
|
53
|
+
*/
|
|
54
|
+
currency?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface CreateTokenIbanData {
|
|
58
|
+
/**
|
|
59
|
+
* Three character currency code (e.g., `eur`).
|
|
60
|
+
*/
|
|
61
|
+
currency: string;
|
|
62
|
+
|
|
63
|
+
account_holder_name: string;
|
|
64
|
+
|
|
65
|
+
account_holder_type: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface CreateTokenPiiData {
|
|
69
|
+
personal_id_number: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface CreateTokenBankAccountData {
|
|
73
|
+
country: string;
|
|
74
|
+
|
|
75
|
+
currency: string;
|
|
76
|
+
|
|
77
|
+
routing_number?: string;
|
|
78
|
+
|
|
79
|
+
account_number: string;
|
|
80
|
+
|
|
81
|
+
account_holder_name?: string;
|
|
82
|
+
|
|
83
|
+
account_holder_type: string;
|
|
84
|
+
|
|
85
|
+
account_type?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* A required object containing the `type` of `Source` you want to create, and any additional payment information that you have collected.
|
|
90
|
+
* See the [Sources API](https://stripe.com/docs/api#create_source) reference for details.
|
|
91
|
+
*
|
|
92
|
+
* You cannot pass raw card information to `stripe.createSource(sourceData)`.
|
|
93
|
+
* Instead, you must gather card information in an `Element` and use `stripe.createSource(element, sourceData)`.
|
|
94
|
+
* You can also pass an existing card token to convert it into a `Source` object.
|
|
95
|
+
*/
|
|
96
|
+
export interface CreateSourceData extends SourceCreateParams {
|
|
97
|
+
bancontact?: CreateSourceData.DeprecatedMethodData;
|
|
98
|
+
|
|
99
|
+
ideal?: CreateSourceData.DeprecatedMethodData;
|
|
100
|
+
|
|
101
|
+
klarna?: CreateSourceData.DeprecatedMethodData;
|
|
102
|
+
|
|
103
|
+
sepa_debit?: CreateSourceData.DeprecatedMethodData;
|
|
104
|
+
|
|
105
|
+
sofort?: CreateSourceData.DeprecatedMethodData;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export namespace CreateSourceData {
|
|
109
|
+
export type DeprecatedMethodData = Record<string, unknown>;
|
|
110
|
+
}
|
package/dist/utils.d.mts
ADDED
package/dist/utils.d.ts
ADDED
package/lib/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist';
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist';
|
package/lib/index.js
ADDED
package/lib/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/stripe.mjs';
|
package/package.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stripe/stripe-js",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9",
|
|
4
4
|
"description": "Stripe.js loading utility",
|
|
5
5
|
"repository": "github:stripe/stripe-js",
|
|
6
|
-
"main": "
|
|
7
|
-
"module": "
|
|
8
|
-
"jsnext:main": "
|
|
9
|
-
"types": "
|
|
10
|
-
"typings": "
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"module": "lib/index.mjs",
|
|
8
|
+
"jsnext:main": "lib/index.mjs",
|
|
9
|
+
"types": "lib/index.d.ts",
|
|
10
|
+
"typings": "lib/index.d.ts",
|
|
11
11
|
"scripts": {
|
|
12
12
|
"test": "yarn lint && yarn test:unit && yarn test:types && yarn typecheck",
|
|
13
13
|
"test:unit": "jest",
|
|
14
14
|
"test:types": "zx ./tests/types/scripts/test.mjs",
|
|
15
15
|
"lint": "eslint '{src,types}/**/*.{ts,js}' && yarn prettier-check",
|
|
16
16
|
"typecheck": "tsc",
|
|
17
|
-
"
|
|
17
|
+
"copy-types": "./scripts/copy-types",
|
|
18
|
+
"build": "yarn clean && yarn rollup -c && yarn copy-types",
|
|
18
19
|
"clean": "rimraf dist",
|
|
19
20
|
"prepublishOnly": "echo \"\nPlease use ./scripts/publish instead\n\" && exit 1",
|
|
20
21
|
"prettier": "prettier './**/*.{js,ts,md,html,css}' --write",
|
|
@@ -30,8 +31,9 @@
|
|
|
30
31
|
"homepage": "https://stripe.com/docs/js",
|
|
31
32
|
"files": [
|
|
32
33
|
"dist",
|
|
33
|
-
"
|
|
34
|
-
"pure"
|
|
34
|
+
"lib",
|
|
35
|
+
"pure",
|
|
36
|
+
"src"
|
|
35
37
|
],
|
|
36
38
|
"engines": {
|
|
37
39
|
"node": ">=12.16"
|
|
@@ -56,7 +58,6 @@
|
|
|
56
58
|
"rimraf": "^2.6.2",
|
|
57
59
|
"rollup": "^1.29.0",
|
|
58
60
|
"rollup-plugin-babel": "^4.3.3",
|
|
59
|
-
"rollup-plugin-dts": "^6.1.0",
|
|
60
61
|
"rollup-plugin-typescript2": "^0.25.3",
|
|
61
62
|
"ts-jest": "^24.3.0",
|
|
62
63
|
"typescript": "^4.1.2",
|