@delopay/sdk 0.175.0 → 0.177.0
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/{chunk-7KHTBFO6.js → chunk-OBEPMMEL.js} +31 -2
- package/dist/{chunk-7KHTBFO6.js.map → chunk-OBEPMMEL.js.map} +1 -1
- package/dist/index.cjs +30 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -4
- package/dist/index.d.ts +23 -4
- package/dist/index.js +1 -1
- package/dist/internal.cjs +30 -1
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.js +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Field names match the JSON wire format (snake_case).
|
|
4
4
|
*/
|
|
5
5
|
type Currency = 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL' | string;
|
|
6
|
-
type IntentStatus = 'succeeded' | 'failed' | 'cancelled' | 'cancelled_post_capture' | 'processing' | 'requires_customer_action' | 'requires_merchant_action' | 'requires_payment_method' | 'requires_confirmation' | 'requires_capture' | 'partially_captured' | 'partially_captured_and_capturable' | 'partially_authorized_and_requires_capture' | 'partially_captured_and_processing' | 'conflicted' | 'expired';
|
|
6
|
+
type IntentStatus = 'succeeded' | 'failed' | 'declined' | 'cancelled' | 'cancelled_post_capture' | 'processing' | 'requires_customer_action' | 'requires_merchant_action' | 'requires_payment_method' | 'requires_confirmation' | 'requires_capture' | 'partially_captured' | 'partially_captured_and_capturable' | 'partially_authorized_and_requires_capture' | 'partially_captured_and_processing' | 'conflicted' | 'expired';
|
|
7
7
|
type CaptureMethod = 'automatic' | 'manual' | 'manual_multiple' | 'scheduled' | 'sequential_automatic';
|
|
8
8
|
type AuthenticationType = 'three_ds' | 'no_three_ds';
|
|
9
9
|
type RefundStatus = 'succeeded' | 'failed' | 'pending' | 'review';
|
|
@@ -220,6 +220,8 @@ interface PaymentCreateRequest {
|
|
|
220
220
|
description?: string | null;
|
|
221
221
|
/** URL to redirect the customer to after payment (required for redirect-based methods). */
|
|
222
222
|
return_url?: string | null;
|
|
223
|
+
/** URL to leave an unpaid hosted checkout; never falls back to `return_url`. */
|
|
224
|
+
cancel_url?: string | null;
|
|
223
225
|
/**
|
|
224
226
|
* How long the client secret / hosted checkout link stays usable, in
|
|
225
227
|
* seconds from creation. Omit to inherit the shop's default
|
|
@@ -324,6 +326,8 @@ interface PaymentUpdateRequest {
|
|
|
324
326
|
customer_id?: string | null;
|
|
325
327
|
description?: string | null;
|
|
326
328
|
return_url?: string | null;
|
|
329
|
+
/** See {@link PaymentCreateRequest.cancel_url}. */
|
|
330
|
+
cancel_url?: string | null;
|
|
327
331
|
statement_descriptor_name?: string | null;
|
|
328
332
|
statement_descriptor_suffix?: string | null;
|
|
329
333
|
metadata?: Record<string, unknown> | null;
|
|
@@ -347,6 +351,8 @@ interface PaymentConfirmRequest {
|
|
|
347
351
|
payment_method_data?: Record<string, unknown> | null;
|
|
348
352
|
payment_token?: string | null;
|
|
349
353
|
return_url?: string | null;
|
|
354
|
+
/** See {@link PaymentCreateRequest.cancel_url}. */
|
|
355
|
+
cancel_url?: string | null;
|
|
350
356
|
billing?: Address | null;
|
|
351
357
|
shipping?: Address | null;
|
|
352
358
|
mandate_id?: string | null;
|
|
@@ -444,6 +450,8 @@ interface PaymentResponse {
|
|
|
444
450
|
description?: string | null;
|
|
445
451
|
/** Redirect URL used after payment completion. */
|
|
446
452
|
return_url?: string | null;
|
|
453
|
+
/** URL the buyer may use to leave before paying. */
|
|
454
|
+
cancel_url?: string | null;
|
|
447
455
|
/** Billing address. */
|
|
448
456
|
billing?: Address | null;
|
|
449
457
|
/** Shipping address. */
|
|
@@ -551,7 +559,7 @@ interface PaymentListResponse {
|
|
|
551
559
|
* enum, and is distinct from a payment intent's status: one intent can carry
|
|
552
560
|
* several attempts (retries across connectors), each with its own status.
|
|
553
561
|
*/
|
|
554
|
-
type AttemptStatus = 'started' | 'authentication_failed' | 'router_declined' | 'authentication_pending' | 'authentication_successful' | 'authorized' | 'authorization_failed' | 'charged' | 'authorizing' | 'cod_initiated' | 'voided' | 'voided_post_charge' | 'void_initiated' | 'capture_initiated' | 'capture_failed' | 'void_failed' | 'auto_refunded' | 'partial_charged' | 'partially_authorized' | 'partial_charged_and_chargeable' | 'unresolved' | 'pending' | 'failure' | 'payment_method_awaited' | 'confirmation_awaited' | 'device_data_collection_pending' | 'integrity_failure' | 'expired';
|
|
562
|
+
type AttemptStatus = 'started' | 'authentication_failed' | 'router_declined' | 'declined' | 'authentication_pending' | 'authentication_successful' | 'authorized' | 'authorization_failed' | 'charged' | 'authorizing' | 'cod_initiated' | 'voided' | 'voided_post_charge' | 'void_initiated' | 'capture_initiated' | 'capture_failed' | 'void_failed' | 'auto_refunded' | 'partial_charged' | 'partially_authorized' | 'partial_charged_and_chargeable' | 'unresolved' | 'pending' | 'failure' | 'payment_method_awaited' | 'confirmation_awaited' | 'device_data_collection_pending' | 'integrity_failure' | 'expired';
|
|
555
563
|
/** How the customer is expected to complete the payment (redirect, SDK invoke, QR, etc.). */
|
|
556
564
|
type PaymentExperience = 'redirect_to_url' | 'invoke_sdk_client' | 'display_qr_code' | 'one_click' | 'link_wallet' | 'invoke_payment_app' | 'display_wait_screen' | 'collect_otp';
|
|
557
565
|
/**
|
|
@@ -3254,6 +3262,7 @@ interface PaymentLinkDetails {
|
|
|
3254
3262
|
payment_id: string;
|
|
3255
3263
|
session_expiry: string;
|
|
3256
3264
|
merchant_logo: string;
|
|
3265
|
+
cancel_url?: string | null;
|
|
3257
3266
|
merchant_name: string;
|
|
3258
3267
|
max_items_visible_after_collapse: number;
|
|
3259
3268
|
theme: string;
|
|
@@ -3277,6 +3286,7 @@ interface PaymentLinkStatusDetails {
|
|
|
3277
3286
|
currency: Currency;
|
|
3278
3287
|
payment_id: string;
|
|
3279
3288
|
merchant_logo: string;
|
|
3289
|
+
cancel_url?: string | null;
|
|
3280
3290
|
merchant_name: string;
|
|
3281
3291
|
created: string;
|
|
3282
3292
|
status: IntentStatus | 'active' | 'expired';
|
|
@@ -5290,6 +5300,8 @@ interface ConnectorListResponse {
|
|
|
5290
5300
|
interface ProfileCreateRequest {
|
|
5291
5301
|
profile_name?: string | null;
|
|
5292
5302
|
return_url?: string | null;
|
|
5303
|
+
/** Optional default unpaid-checkout exit URL for this shop. */
|
|
5304
|
+
cancel_url?: string | null;
|
|
5293
5305
|
enable_payment_response_hash?: boolean | null;
|
|
5294
5306
|
payment_response_hash_key?: string | null;
|
|
5295
5307
|
redirect_to_merchant_with_http_post?: boolean | null;
|
|
@@ -5348,6 +5360,8 @@ interface ProfileCreateRequest {
|
|
|
5348
5360
|
interface ProfileUpdateRequest {
|
|
5349
5361
|
profile_name?: string | null;
|
|
5350
5362
|
return_url?: string | null;
|
|
5363
|
+
/** Absent leaves unchanged; explicit null clears the shop's Cancel URL. */
|
|
5364
|
+
cancel_url?: string | null;
|
|
5351
5365
|
enable_payment_response_hash?: boolean | null;
|
|
5352
5366
|
payment_response_hash_key?: string | null;
|
|
5353
5367
|
redirect_to_merchant_with_http_post?: boolean | null;
|
|
@@ -5423,6 +5437,8 @@ interface ProfileResponse {
|
|
|
5423
5437
|
force_3ds_challenge: boolean;
|
|
5424
5438
|
is_pre_network_tokenization_enabled: boolean;
|
|
5425
5439
|
return_url?: string | null;
|
|
5440
|
+
/** The shop's optional default unpaid-checkout exit URL. */
|
|
5441
|
+
cancel_url?: string | null;
|
|
5426
5442
|
payment_response_hash_key?: string | null;
|
|
5427
5443
|
webhook_details?: WebhookDetails | null;
|
|
5428
5444
|
metadata?: Record<string, unknown> | null;
|
|
@@ -10000,7 +10016,7 @@ interface EpayoutsPaypalCaptureResponse {
|
|
|
10000
10016
|
matches_order?: boolean;
|
|
10001
10017
|
}
|
|
10002
10018
|
/** The closed set of buyer-side checkout events. */
|
|
10003
|
-
type CheckoutEventKind$1 = 'native_pane_selected' | 'native_pane_tab_opened' | 'native_pane_tab_blocked' | 'native_pane_abandoned' | 'native_pane_returned';
|
|
10019
|
+
type CheckoutEventKind$1 = 'native_pane_selected' | 'native_pane_tab_opened' | 'native_pane_tab_blocked' | 'native_pane_abandoned' | 'native_pane_returned' | 'checkout_cancelled';
|
|
10004
10020
|
interface RecordCheckoutEventRequest {
|
|
10005
10021
|
event: CheckoutEventKind$1;
|
|
10006
10022
|
/** Native-pane catalog key the event is about (`apple_pay`, `klarna`, …). */
|
|
@@ -16809,6 +16825,9 @@ interface CheckoutBranding {
|
|
|
16809
16825
|
totalLabel: string;
|
|
16810
16826
|
showCurrencyCode: boolean;
|
|
16811
16827
|
showOrderItems: boolean;
|
|
16828
|
+
cancelLinkEnabled: boolean;
|
|
16829
|
+
cancelLinkPosition: 'top' | 'bottom';
|
|
16830
|
+
cancelLinkStyle: 'link' | 'button';
|
|
16812
16831
|
showSurcharge: boolean;
|
|
16813
16832
|
surchargePosition: SurchargePosition;
|
|
16814
16833
|
nativeElementPosition: NativeElementPosition;
|
|
@@ -17978,7 +17997,7 @@ declare function focusedCheckoutUrl(params: FocusedCheckoutUrlParams): string;
|
|
|
17978
17997
|
* The `native_pane_` prefix is the router's enum on the wire and does not move
|
|
17979
17998
|
* with the rename — see the module header.
|
|
17980
17999
|
*/
|
|
17981
|
-
declare const CHECKOUT_EVENT_KINDS: readonly ["native_pane_selected", "native_pane_tab_opened", "native_pane_tab_blocked", "native_pane_abandoned", "native_pane_returned"];
|
|
18000
|
+
declare const CHECKOUT_EVENT_KINDS: readonly ["native_pane_selected", "native_pane_tab_opened", "native_pane_tab_blocked", "native_pane_abandoned", "native_pane_returned", "checkout_cancelled"];
|
|
17982
18001
|
type CheckoutEventKind = (typeof CHECKOUT_EVENT_KINDS)[number];
|
|
17983
18002
|
/** @deprecated Renamed to {@link Pane}. Removed in 0.112.0. */
|
|
17984
18003
|
type StripeNativePane = Pane;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Field names match the JSON wire format (snake_case).
|
|
4
4
|
*/
|
|
5
5
|
type Currency = 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL' | string;
|
|
6
|
-
type IntentStatus = 'succeeded' | 'failed' | 'cancelled' | 'cancelled_post_capture' | 'processing' | 'requires_customer_action' | 'requires_merchant_action' | 'requires_payment_method' | 'requires_confirmation' | 'requires_capture' | 'partially_captured' | 'partially_captured_and_capturable' | 'partially_authorized_and_requires_capture' | 'partially_captured_and_processing' | 'conflicted' | 'expired';
|
|
6
|
+
type IntentStatus = 'succeeded' | 'failed' | 'declined' | 'cancelled' | 'cancelled_post_capture' | 'processing' | 'requires_customer_action' | 'requires_merchant_action' | 'requires_payment_method' | 'requires_confirmation' | 'requires_capture' | 'partially_captured' | 'partially_captured_and_capturable' | 'partially_authorized_and_requires_capture' | 'partially_captured_and_processing' | 'conflicted' | 'expired';
|
|
7
7
|
type CaptureMethod = 'automatic' | 'manual' | 'manual_multiple' | 'scheduled' | 'sequential_automatic';
|
|
8
8
|
type AuthenticationType = 'three_ds' | 'no_three_ds';
|
|
9
9
|
type RefundStatus = 'succeeded' | 'failed' | 'pending' | 'review';
|
|
@@ -220,6 +220,8 @@ interface PaymentCreateRequest {
|
|
|
220
220
|
description?: string | null;
|
|
221
221
|
/** URL to redirect the customer to after payment (required for redirect-based methods). */
|
|
222
222
|
return_url?: string | null;
|
|
223
|
+
/** URL to leave an unpaid hosted checkout; never falls back to `return_url`. */
|
|
224
|
+
cancel_url?: string | null;
|
|
223
225
|
/**
|
|
224
226
|
* How long the client secret / hosted checkout link stays usable, in
|
|
225
227
|
* seconds from creation. Omit to inherit the shop's default
|
|
@@ -324,6 +326,8 @@ interface PaymentUpdateRequest {
|
|
|
324
326
|
customer_id?: string | null;
|
|
325
327
|
description?: string | null;
|
|
326
328
|
return_url?: string | null;
|
|
329
|
+
/** See {@link PaymentCreateRequest.cancel_url}. */
|
|
330
|
+
cancel_url?: string | null;
|
|
327
331
|
statement_descriptor_name?: string | null;
|
|
328
332
|
statement_descriptor_suffix?: string | null;
|
|
329
333
|
metadata?: Record<string, unknown> | null;
|
|
@@ -347,6 +351,8 @@ interface PaymentConfirmRequest {
|
|
|
347
351
|
payment_method_data?: Record<string, unknown> | null;
|
|
348
352
|
payment_token?: string | null;
|
|
349
353
|
return_url?: string | null;
|
|
354
|
+
/** See {@link PaymentCreateRequest.cancel_url}. */
|
|
355
|
+
cancel_url?: string | null;
|
|
350
356
|
billing?: Address | null;
|
|
351
357
|
shipping?: Address | null;
|
|
352
358
|
mandate_id?: string | null;
|
|
@@ -444,6 +450,8 @@ interface PaymentResponse {
|
|
|
444
450
|
description?: string | null;
|
|
445
451
|
/** Redirect URL used after payment completion. */
|
|
446
452
|
return_url?: string | null;
|
|
453
|
+
/** URL the buyer may use to leave before paying. */
|
|
454
|
+
cancel_url?: string | null;
|
|
447
455
|
/** Billing address. */
|
|
448
456
|
billing?: Address | null;
|
|
449
457
|
/** Shipping address. */
|
|
@@ -551,7 +559,7 @@ interface PaymentListResponse {
|
|
|
551
559
|
* enum, and is distinct from a payment intent's status: one intent can carry
|
|
552
560
|
* several attempts (retries across connectors), each with its own status.
|
|
553
561
|
*/
|
|
554
|
-
type AttemptStatus = 'started' | 'authentication_failed' | 'router_declined' | 'authentication_pending' | 'authentication_successful' | 'authorized' | 'authorization_failed' | 'charged' | 'authorizing' | 'cod_initiated' | 'voided' | 'voided_post_charge' | 'void_initiated' | 'capture_initiated' | 'capture_failed' | 'void_failed' | 'auto_refunded' | 'partial_charged' | 'partially_authorized' | 'partial_charged_and_chargeable' | 'unresolved' | 'pending' | 'failure' | 'payment_method_awaited' | 'confirmation_awaited' | 'device_data_collection_pending' | 'integrity_failure' | 'expired';
|
|
562
|
+
type AttemptStatus = 'started' | 'authentication_failed' | 'router_declined' | 'declined' | 'authentication_pending' | 'authentication_successful' | 'authorized' | 'authorization_failed' | 'charged' | 'authorizing' | 'cod_initiated' | 'voided' | 'voided_post_charge' | 'void_initiated' | 'capture_initiated' | 'capture_failed' | 'void_failed' | 'auto_refunded' | 'partial_charged' | 'partially_authorized' | 'partial_charged_and_chargeable' | 'unresolved' | 'pending' | 'failure' | 'payment_method_awaited' | 'confirmation_awaited' | 'device_data_collection_pending' | 'integrity_failure' | 'expired';
|
|
555
563
|
/** How the customer is expected to complete the payment (redirect, SDK invoke, QR, etc.). */
|
|
556
564
|
type PaymentExperience = 'redirect_to_url' | 'invoke_sdk_client' | 'display_qr_code' | 'one_click' | 'link_wallet' | 'invoke_payment_app' | 'display_wait_screen' | 'collect_otp';
|
|
557
565
|
/**
|
|
@@ -3254,6 +3262,7 @@ interface PaymentLinkDetails {
|
|
|
3254
3262
|
payment_id: string;
|
|
3255
3263
|
session_expiry: string;
|
|
3256
3264
|
merchant_logo: string;
|
|
3265
|
+
cancel_url?: string | null;
|
|
3257
3266
|
merchant_name: string;
|
|
3258
3267
|
max_items_visible_after_collapse: number;
|
|
3259
3268
|
theme: string;
|
|
@@ -3277,6 +3286,7 @@ interface PaymentLinkStatusDetails {
|
|
|
3277
3286
|
currency: Currency;
|
|
3278
3287
|
payment_id: string;
|
|
3279
3288
|
merchant_logo: string;
|
|
3289
|
+
cancel_url?: string | null;
|
|
3280
3290
|
merchant_name: string;
|
|
3281
3291
|
created: string;
|
|
3282
3292
|
status: IntentStatus | 'active' | 'expired';
|
|
@@ -5290,6 +5300,8 @@ interface ConnectorListResponse {
|
|
|
5290
5300
|
interface ProfileCreateRequest {
|
|
5291
5301
|
profile_name?: string | null;
|
|
5292
5302
|
return_url?: string | null;
|
|
5303
|
+
/** Optional default unpaid-checkout exit URL for this shop. */
|
|
5304
|
+
cancel_url?: string | null;
|
|
5293
5305
|
enable_payment_response_hash?: boolean | null;
|
|
5294
5306
|
payment_response_hash_key?: string | null;
|
|
5295
5307
|
redirect_to_merchant_with_http_post?: boolean | null;
|
|
@@ -5348,6 +5360,8 @@ interface ProfileCreateRequest {
|
|
|
5348
5360
|
interface ProfileUpdateRequest {
|
|
5349
5361
|
profile_name?: string | null;
|
|
5350
5362
|
return_url?: string | null;
|
|
5363
|
+
/** Absent leaves unchanged; explicit null clears the shop's Cancel URL. */
|
|
5364
|
+
cancel_url?: string | null;
|
|
5351
5365
|
enable_payment_response_hash?: boolean | null;
|
|
5352
5366
|
payment_response_hash_key?: string | null;
|
|
5353
5367
|
redirect_to_merchant_with_http_post?: boolean | null;
|
|
@@ -5423,6 +5437,8 @@ interface ProfileResponse {
|
|
|
5423
5437
|
force_3ds_challenge: boolean;
|
|
5424
5438
|
is_pre_network_tokenization_enabled: boolean;
|
|
5425
5439
|
return_url?: string | null;
|
|
5440
|
+
/** The shop's optional default unpaid-checkout exit URL. */
|
|
5441
|
+
cancel_url?: string | null;
|
|
5426
5442
|
payment_response_hash_key?: string | null;
|
|
5427
5443
|
webhook_details?: WebhookDetails | null;
|
|
5428
5444
|
metadata?: Record<string, unknown> | null;
|
|
@@ -10000,7 +10016,7 @@ interface EpayoutsPaypalCaptureResponse {
|
|
|
10000
10016
|
matches_order?: boolean;
|
|
10001
10017
|
}
|
|
10002
10018
|
/** The closed set of buyer-side checkout events. */
|
|
10003
|
-
type CheckoutEventKind$1 = 'native_pane_selected' | 'native_pane_tab_opened' | 'native_pane_tab_blocked' | 'native_pane_abandoned' | 'native_pane_returned';
|
|
10019
|
+
type CheckoutEventKind$1 = 'native_pane_selected' | 'native_pane_tab_opened' | 'native_pane_tab_blocked' | 'native_pane_abandoned' | 'native_pane_returned' | 'checkout_cancelled';
|
|
10004
10020
|
interface RecordCheckoutEventRequest {
|
|
10005
10021
|
event: CheckoutEventKind$1;
|
|
10006
10022
|
/** Native-pane catalog key the event is about (`apple_pay`, `klarna`, …). */
|
|
@@ -16809,6 +16825,9 @@ interface CheckoutBranding {
|
|
|
16809
16825
|
totalLabel: string;
|
|
16810
16826
|
showCurrencyCode: boolean;
|
|
16811
16827
|
showOrderItems: boolean;
|
|
16828
|
+
cancelLinkEnabled: boolean;
|
|
16829
|
+
cancelLinkPosition: 'top' | 'bottom';
|
|
16830
|
+
cancelLinkStyle: 'link' | 'button';
|
|
16812
16831
|
showSurcharge: boolean;
|
|
16813
16832
|
surchargePosition: SurchargePosition;
|
|
16814
16833
|
nativeElementPosition: NativeElementPosition;
|
|
@@ -17978,7 +17997,7 @@ declare function focusedCheckoutUrl(params: FocusedCheckoutUrlParams): string;
|
|
|
17978
17997
|
* The `native_pane_` prefix is the router's enum on the wire and does not move
|
|
17979
17998
|
* with the rename — see the module header.
|
|
17980
17999
|
*/
|
|
17981
|
-
declare const CHECKOUT_EVENT_KINDS: readonly ["native_pane_selected", "native_pane_tab_opened", "native_pane_tab_blocked", "native_pane_abandoned", "native_pane_returned"];
|
|
18000
|
+
declare const CHECKOUT_EVENT_KINDS: readonly ["native_pane_selected", "native_pane_tab_opened", "native_pane_tab_blocked", "native_pane_abandoned", "native_pane_returned", "checkout_cancelled"];
|
|
17982
18001
|
type CheckoutEventKind = (typeof CHECKOUT_EVENT_KINDS)[number];
|
|
17983
18002
|
/** @deprecated Renamed to {@link Pane}. Removed in 0.112.0. */
|
|
17984
18003
|
type StripeNativePane = Pane;
|
package/dist/index.js
CHANGED
package/dist/internal.cjs
CHANGED
|
@@ -7800,6 +7800,9 @@ var DEFAULT_BRANDING_BASE = {
|
|
|
7800
7800
|
totalLabel: "Total",
|
|
7801
7801
|
showCurrencyCode: false,
|
|
7802
7802
|
showOrderItems: true,
|
|
7803
|
+
cancelLinkEnabled: true,
|
|
7804
|
+
cancelLinkPosition: "top",
|
|
7805
|
+
cancelLinkStyle: "link",
|
|
7803
7806
|
// Each flat field keeps its meaning: what the merchant wrote, used in every
|
|
7804
7807
|
// locale that carries no override. Empty maps therefore change nothing for a
|
|
7805
7808
|
// profile saved before translations existed.
|
|
@@ -8618,6 +8621,17 @@ function decodeBranding(source) {
|
|
|
8618
8621
|
totalLabel: s(extras["totalLabel"]) || DEFAULT_BRANDING.totalLabel,
|
|
8619
8622
|
showCurrencyCode: parseBool(extras["showCurrencyCode"], DEFAULT_BRANDING.showCurrencyCode),
|
|
8620
8623
|
showOrderItems: parseBool(extras["showOrderItems"], DEFAULT_BRANDING.showOrderItems),
|
|
8624
|
+
cancelLinkEnabled: parseBool(extras["cancelLinkEnabled"], DEFAULT_BRANDING.cancelLinkEnabled),
|
|
8625
|
+
cancelLinkPosition: pickEnum(
|
|
8626
|
+
extras["cancelLinkPosition"],
|
|
8627
|
+
["top", "bottom"],
|
|
8628
|
+
DEFAULT_BRANDING.cancelLinkPosition
|
|
8629
|
+
),
|
|
8630
|
+
cancelLinkStyle: pickEnum(
|
|
8631
|
+
extras["cancelLinkStyle"],
|
|
8632
|
+
["link", "button"],
|
|
8633
|
+
DEFAULT_BRANDING.cancelLinkStyle
|
|
8634
|
+
),
|
|
8621
8635
|
trustBadges: trustRow.trustBadges,
|
|
8622
8636
|
notices: trustRow.notices,
|
|
8623
8637
|
customFields: decodedCustomFields ?? [],
|
|
@@ -8857,6 +8871,9 @@ function encodeBranding(branding, base) {
|
|
|
8857
8871
|
totalLabel: branding.totalLabel,
|
|
8858
8872
|
showCurrencyCode: String(branding.showCurrencyCode),
|
|
8859
8873
|
showOrderItems: String(branding.showOrderItems),
|
|
8874
|
+
cancelLinkEnabled: String(branding.cancelLinkEnabled),
|
|
8875
|
+
cancelLinkPosition: branding.cancelLinkPosition,
|
|
8876
|
+
cancelLinkStyle: branding.cancelLinkStyle,
|
|
8860
8877
|
showLogo: String(branding.showLogo),
|
|
8861
8878
|
logoShape: branding.logoShape,
|
|
8862
8879
|
logoSize: branding.logoSize,
|
|
@@ -9124,6 +9141,17 @@ function parseImportedBranding(raw) {
|
|
|
9124
9141
|
trustBadges,
|
|
9125
9142
|
notices,
|
|
9126
9143
|
customFields,
|
|
9144
|
+
cancelLinkEnabled: parseBool(root["cancelLinkEnabled"], dflt.cancelLinkEnabled),
|
|
9145
|
+
cancelLinkPosition: pickEnum(
|
|
9146
|
+
root["cancelLinkPosition"],
|
|
9147
|
+
["top", "bottom"],
|
|
9148
|
+
dflt.cancelLinkPosition
|
|
9149
|
+
),
|
|
9150
|
+
cancelLinkStyle: pickEnum(
|
|
9151
|
+
root["cancelLinkStyle"],
|
|
9152
|
+
["link", "button"],
|
|
9153
|
+
dflt.cancelLinkStyle
|
|
9154
|
+
),
|
|
9127
9155
|
// An export writes the decoded maps; a hand-written file may carry the
|
|
9128
9156
|
// JSON strings the bag uses. Both are accepted, and neither is required.
|
|
9129
9157
|
methodSectionOrder: parseSectionOrderLoose(root[METHOD_SECTION_ORDER_KEY]),
|
|
@@ -10253,7 +10281,8 @@ var CHECKOUT_EVENT_KINDS = [
|
|
|
10253
10281
|
"native_pane_tab_opened",
|
|
10254
10282
|
"native_pane_tab_blocked",
|
|
10255
10283
|
"native_pane_abandoned",
|
|
10256
|
-
"native_pane_returned"
|
|
10284
|
+
"native_pane_returned",
|
|
10285
|
+
"checkout_cancelled"
|
|
10257
10286
|
];
|
|
10258
10287
|
var STRIPE_NATIVE_PANE_METHODS = STRIPE_FALLBACK_PANE_METHODS;
|
|
10259
10288
|
var NATIVE_PANE_ICON_KEYS = PANE_ICON_KEYS;
|