The following is the reference for the enums and type aliases in the JavaScript SDK for Meta Pay.
Indicates whether an attempt to authorize a payment succeeded or failed in an PaymentAuthorizationResult.
Constant | Description |
---|---|
| The payment was authorized. |
| The payment was not authorized. |
The visual theme for the Meta Pay button, specified in an ThemeOptions. The Meta Pay button must comply with branding guidelines.
Constant | Description |
---|---|
| A light-colored button. |
| A dark-colored button. |
Indicates whether Meta Pay is available. On some platforms availability can't be determined until the customer initiates checkout and you create an PaymentClient.
Constant | Description |
---|---|
| The customer is signed in and a payment method is available. |
| The customer is not signed in, or is signed in but must add a payment method. |
| Unable to detect whether the customer is signed in. |
| Meta Pay is not supported on the platform. |
Indicates supported payment container types in a PaymentConfiguration.
Constant | Description | Configuration |
---|---|---|
| A payment card. | No special configuration; use |
| A network payment token. | No special configuration; use |
The amount of information about the billing address that's returned in an PaymentResponse. The default is MIN
.
Constant | Description |
---|---|
| The country and postal code are returned. |
| The full billing address is returned. |
A call to action that appears on the payment sheet and is specified in PaymentOptions. Indicates whether the customer completes the transaction in the Meta Pay interface or on the merchant web site. The default is PAY
.
Constant | Description |
---|---|
| The customer completes the transaction in the Meta Pay user interface. |
| The customer completes the transaction on the merchant web site after interacting with the Pacebook Pay user interface. |
Provides information about payment data errors in an PaymentDataError.
Constant | Description |
---|---|
| The payment data wasn't valid. |
| The shipping address wasn't valid. |
[deprecated]
| The shipping option wasn't valid. NOTE: This field is now deprecated. Please use |
| The fulfillment option wasn't valid. |
| The billing address wasn't valid. |
| one or more of the given offers wasn't valid. |
| The shipping address is outside the merchant's service or delivery area. |
| A timeout occurred while processing the payment. |
| The payment failed for an unknown reason. |
| Another error occurred. When you use this error reason in your PaymentDataError, provide a localized message that appears to the customer. |
Identifies a field from PaymentDetails or PaymentResponse which is the source of a PaymentDataError.
Constant | Description |
---|---|
| The city for a shipping or billing address. |
| The country for a shipping or billing address. |
| The dependentLocality for a shipping or billing address. |
| The organization for a shipping or billing address. |
| The postalCode for a shipping or billing address. |
| The recipient for a shipping or billing address. |
| The region for a shipping or billing address. |
| The sortingCode for a shipping or billing address. |
| The addressLine for a shipping or billing address. |
| The payerPhone requested from the user. |
| The payerEmail requested from the user. |
| One or more of the offers applied to the payment. |
[deprecated]
| The shipping option id selected by the user. NOTE: This field is now deprecated. Please use |
| The fulfillment option id selected by the user. |
Indicates data that the customer changed in the payment sheet in an PaymentDetailsChangedEvent.
Constant | Description |
---|---|
[deprecated]
| The customer changed the shipping option. NOTE: This field is now deprecated. Please use |
| The customer changed the fulfillment option. |
| The customer changed the shipping address. |
| The customer changed the billing address. |
| The customer updated offers. |
| The customer updated the pickup radius zip code. |
Indicates the type of error in an PaymentError.
Constant | Description |
---|---|
| The customer cancelled the request. |
| The customer took too long to complete the payment. |
| The payment request wasn't valid. |
| The merchant account wasn't valid. |
| Something else went wrong. |
Indicates whether an PaymentContainer or an PaymentConfiguration is for a real payment or a test payment.
Constant | Description |
---|---|
| A real payment. |
| A test payment. |
Indicates whether an PaymentConfiguration is for an on-session payment or an off-session payment.
Constant | Description |
---|---|
| Indicates that the customer is actively involved and initiated the checkout flow for this payment. |
| Indicates that the customer may be charged outside of the checkout flow, for example: subscriptions or delayed purchases. |
Indicates whether a payment sheet was created successfully by an PaymentClient.
Constant | Description |
---|---|
| The payment sheet was created successfully. |
| The payment sheet was not created successfully. |
NOTE: This field is now deprecated. Please use FulfillmentType instead.
Indicates the fulfillment method for an order and is specified in PaymentOptions. The default is SHIPPING
.
Constant | Description |
---|---|
| The order is shipped to the customer. Next to an address this appears as Ship To. |
| The order is delivered to the customer. Next to an address this appears as Deliver To. |
| The customer picks up the order. Next to an address this appears as Pickup At. |
Indicates the type of an SummaryPaymentItem.
Constant | Description |
---|---|
| The subtotal of items in the transaction before taxes, shipping, or fees. |
| Estimated tax for the transaction. |
[deprecated]
| A shipping fee for the transaction. NOTE: This field is now deprecated. Please use |
| A fulfillment fee for the transaction (e.g. shipping, pickup). |
| A discount applied to the transaction. |
| A miscellaneous fee applied to the transaction, for example a fee for gift wrapping. |
Calls a PaymentClientConstructor and returns an PaymentClient.
Constant | Definition |
---|---|
|
Performs authorization of the PaymentContainer in an PaymentResponse after the customer consents to the payment, and returns an PaymentAuthorizationResult.
Constant | Definition |
---|---|
|
|
Responds to changes in the payment sheet that the customer makes in an PaymentDetailsChangedEvent and returns an PaymentDetailsUpdate.
Constant | Definition |
---|---|
|
|
Indicates the version of the JavaScript SDK for Meta Pay.
Constant | Definition |
---|---|
|
|
FulfillmentType is a string representing the fulfillment type corresponding to the order.
Constant | Definition |
---|---|
| The checkout will display shipping-related information. |
| The checkout will display pickup-related information. |
Defines the possible fulfillment types.
NOTE: Not meant to be used directly. Please use either FulfillmentType or PaymentShippingType.
Constant | Definition |
---|---|
| The checkout will display shipping-related information. |
| The checkout will display pickup-related information. |
| The checkout will display delivery-related information. |
DistanceUnitType is a string representing the unit of measurement used for the distance between two locations.
Constant | Definition |
---|---|
| The checkout will display distance in miles (mi). |
| The checkout will display distance in kilometers (km). |