@bigcommerce/checkout-sdk 1.249.0 → 1.252.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.
@@ -1200,6 +1200,36 @@ declare interface BraintreePaymentInitializeOptions {
1200
1200
  form?: BraintreeFormOptions;
1201
1201
  }
1202
1202
 
1203
+ declare interface BraintreePaypalCreditButtonInitializeOptions {
1204
+ /**
1205
+ * A set of styling options for the checkout button.
1206
+ */
1207
+ style?: Pick<PaypalButtonStyleOptions, 'layout' | 'size' | 'color' | 'label' | 'shape' | 'tagline' | 'fundingicons' | 'height'>;
1208
+ /**
1209
+ * Address to be used for shipping.
1210
+ * If not provided, it will use the first saved address from the active customer.
1211
+ */
1212
+ shippingAddress?: Address | null;
1213
+ /**
1214
+ * A callback that gets called if unable to authorize and tokenize payment.
1215
+ *
1216
+ * @param error - The error object describing the failure.
1217
+ */
1218
+ onAuthorizeError?(error: BraintreeError | StandardError): void;
1219
+ /**
1220
+ * A callback that gets called if unable to submit payment.
1221
+ *
1222
+ * @param error - The error object describing the failure.
1223
+ */
1224
+ onPaymentError?(error: BraintreeError | StandardError): void;
1225
+ /**
1226
+ * A callback that gets called on any error instead of submit payment or authorization errors.
1227
+ *
1228
+ * @param error - The error object describing the failure.
1229
+ */
1230
+ onError?(error: BraintreeError | StandardError): void;
1231
+ }
1232
+
1203
1233
  declare interface BraintreePaypalV1ButtonInitializeOptions {
1204
1234
  /**
1205
1235
  * The ID of a container which the messaging should be inserted.
@@ -1636,6 +1666,11 @@ declare interface CheckoutButtonInitializeOptions extends CheckoutButtonOptions
1636
1666
  * omitted unless you need to support Braintree Credit.
1637
1667
  */
1638
1668
  braintreepaypalcredit?: BraintreePaypalV1ButtonInitializeOptions;
1669
+ /**
1670
+ * The options that are required to facilitate Braintree Credit. They can be
1671
+ * omitted unless you need to support Braintree Credit.
1672
+ */
1673
+ braintreepaypalcreditv2?: BraintreePaypalCreditButtonInitializeOptions;
1639
1674
  /**
1640
1675
  * The options that are required to facilitate PayPal. They can be omitted
1641
1676
  * unless you need to support Paypal.
@@ -1791,8 +1826,10 @@ declare enum CheckoutButtonMethodType {
1791
1826
  APPLEPAY = "applepay",
1792
1827
  AMAZON_PAY_V2 = "amazonpay",
1793
1828
  BRAINTREE_PAYPAL = "braintreepaypal",
1829
+ BRAINTREE_PAYPALV2 = "braintreepaypalv2",
1794
1830
  BRAINTREE_VENMO = "braintreevenmo",
1795
1831
  BRAINTREE_PAYPAL_CREDIT = "braintreepaypalcredit",
1832
+ BRAINTREE_PAYPAL_CREDITV2 = "braintreepaypalcreditv2",
1796
1833
  GOOGLEPAY_ADYENV2 = "googlepayadyenv2",
1797
1834
  GOOGLEPAY_ADYENV3 = "googlepayadyenv3",
1798
1835
  GOOGLEPAY_AUTHORIZENET = "googlepayauthorizenet",
@@ -5455,6 +5492,8 @@ declare interface OrderPayment {
5455
5492
  amount: number;
5456
5493
  }
5457
5494
 
5495
+ declare type OrderPaymentInstrument = (CreditCardInstrument | HostedInstrument | HostedCreditCardInstrument | HostedVaultedInstrument | NonceInstrument | VaultedInstrument | CreditCardInstrument & WithDocumentInstrument | CreditCardInstrument & WithCheckoutcomFawryInstrument | CreditCardInstrument & WithCheckoutcomSEPAInstrument | CreditCardInstrument & WithCheckoutcomiDealInstrument | HostedInstrument & WithMollieIssuerInstrument | WithAccountCreation);
5496
+
5458
5497
  /**
5459
5498
  * An object that contains the payment information required for submitting an
5460
5499
  * order.
@@ -5472,7 +5511,7 @@ declare interface OrderPaymentRequestBody {
5472
5511
  * An object that contains the details of a credit card, vaulted payment
5473
5512
  * instrument or nonce instrument.
5474
5513
  */
5475
- paymentData?: CreditCardInstrument | HostedInstrument | HostedCreditCardInstrument | HostedVaultedInstrument | NonceInstrument | VaultedInstrument | CreditCardInstrument & WithDocumentInstrument | CreditCardInstrument & WithCheckoutcomFawryInstrument | CreditCardInstrument & WithCheckoutcomSEPAInstrument | CreditCardInstrument & WithCheckoutcomiDealInstrument | HostedInstrument & WithMollieIssuerInstrument | WithAccountCreation;
5514
+ paymentData?: OrderPaymentInstrument;
5476
5515
  }
5477
5516
 
5478
5517
  declare type OrderPayments = Array<GatewayOrderPayment | GiftCertificateOrderPayment>;