@flopay/shared 1.2.0 → 1.2.4
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/README.md +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -113,11 +113,11 @@ throw validationError('Email is required', 'email');
|
|
|
113
113
|
| `NormalizedCheckoutSession` | Provider-agnostic session: `provider`, `mode`, `data`, `raw?` |
|
|
114
114
|
| `CheckoutModeKind` | `'tokenize'` / `'redirect'` |
|
|
115
115
|
| `CreateSessionParams` | Full session creation params: `billingApiUrl`, `checkoutBaseUrl`, `clientId`, `currency` (required — SDK throws `FloPayError({ type: 'validation_error', code: 'CurrencyRequired' })` before issuing the request when none can be resolved), `products?` (unified shape; takes precedence), `items?`, `subscriptions?` (legacy — folded into `products[]` before send), `account`, `successUrl`, `cancelUrl`, `checkoutMode?`, `couponCodes?`, `tagsData?`, `redirectParams?`, `setCookie?`, `timeoutMs?`, `utmMetadata?` |
|
|
116
|
-
| `CheckoutSessionResult` | `{ status: 201; redirectUrl }` / `{ status: 204 }` / `{ status: number }` |
|
|
116
|
+
| `CheckoutSessionResult` | `{ status: 201; redirectUrl; nonce }` / `{ status: 204 }` / `{ status: number }` (`nonce` is the session-bound checkout token returned by the billing API — forward it on every continuation call against the same session via `x-checkout-session-token`) |
|
|
117
117
|
| `CheckoutItem` | `providerItemId`, `providerItemName?`, `quantity?`, `totalAmount`, `overrideAmount?`, `currency?` |
|
|
118
118
|
| `CheckoutSubscription` | `providerPlanId`, `providerPlanName?`, `quantity?`, `totalAmount`, `overrideAmount?`, `currency?` |
|
|
119
119
|
| `CheckoutAccount` | `userId`, `firstName?`, `lastName?`, `email`, `country?`, `gender?`, `city?`, `state?`, `zip?` |
|
|
120
|
-
| `ProcessPaymentParams` | `sessionId`, `tokenizedData?`, `accountData`, `chv?` |
|
|
120
|
+
| `ProcessPaymentParams` | `sessionId`, `nonce` (required — session-bound checkout token, forwarded as `x-checkout-session-token`), `tokenizedData?`, `accountData`, `chv?` |
|
|
121
121
|
| `CreateCustomerParams` | `email`, `name?`, `metadata?` |
|
|
122
122
|
| `UpdateCustomerParams` | `email?`, `name?`, `metadata?` |
|
|
123
123
|
| `WebhookEvent` | `id`, `type`, `data`, `created` |
|
package/dist/index.cjs
CHANGED
|
@@ -181,7 +181,7 @@ var PAYMENT_METHOD_LOGOS = {
|
|
|
181
181
|
};
|
|
182
182
|
|
|
183
183
|
// src/constants.ts
|
|
184
|
-
var SDK_VERSION = "1.2.
|
|
184
|
+
var SDK_VERSION = "1.2.4";
|
|
185
185
|
var BILLING_API_URL_STAGING = "https://api.stage.flopay.com";
|
|
186
186
|
var BILLING_API_URL_PRODUCTION = "https://api.flopay.com";
|
|
187
187
|
var DEFAULT_API_BASE_URL = BILLING_API_URL_STAGING;
|