@bigcommerce/checkout-sdk › SquarePaymentInitializeOptions
A set of options that are required to initialize the Square payment method.
Once Square payment is initialized, credit card form fields, provided by the payment provider as iframes, will be inserted into the current page. These options provide a location and styling for each of the form fields.
- SquarePaymentInitializeOptions
• cardNumber: SquareFormElement
The location to insert the credit card number form field.
• cvv: SquareFormElement
The location to insert the CVV form field.
• expirationDate: SquareFormElement
The location to insert the expiration date form field.
• inputClass? : undefined | string
The CSS class to apply to all form fields.
• inputStyles? : Array‹object›
The set of CSS styles to apply to all form fields.
• masterpass? : SquareFormElement
Initialize Masterpass placeholder ID
• postalCode: SquareFormElement
The location to insert the postal code form field.
▸ onError(errors?
: NonceGenerationError[]): void
A callback that gets called when an error occurs in the card nonce generation
Parameters:
Name | Type |
---|---|
errors? |
NonceGenerationError[] |
Returns: void
▸ onPaymentSelect(): void
A callback that gets called when the customer selects a payment option.
Returns: void