PxpCheckoutConfig
View the reference for the PxpCheckoutConfig
file.
Reference
import PxpCheckoutConfig from "@pxpio/web-components-sdk";
const checkoutConfig: PxpCheckoutConfig = {
environment: string,
session: SessionData,
merchantShopperId: string,
ownerType: string,
ownerId: string,
transactionData: {
currency: string,
amount: number,
entryType: string,
intent: string,
merchantTransactionId: string,
merchantTransactionDate: string
},
shippingAddress: {
countryCode: string,
postalCode: string,
address: string
},
analyticsEvent: (event) => console.log(event)
};
Properties
Property | Description |
---|---|
| The environment type.
|
| Details about the checkout session. |
| Details about the transaction currency and amount. |
| The currency code associated with the transaction, in ISO 4217 format. |
| The transaction amount. |
| The transaction intent.
|
| The entry type.
|
| A unique identifier for this transaction. |
| The date and time of the transaction, in ISO 8601 format. |
| A unique identifier for this shopper. |
| The type of owner.
|
| The identifier of the owner related to the |
| The shopping address associated with the checkout process. This address can be used to prefill the billing address fields if the cardholder chooses to use the same address for billing. You can update this after the checkout is initialised by using the |
| The address line of the shipping address. |
| The postal or ZIP code of the shipping address. |
| The country code identifying the country associated with the shipping address, in ISO-3166-1 alpha-2 format. |
Callbacks
Callback | Description |
---|---|
analyticsEvent: (event) => console.log(event) | Callback function for analytics events. |
Example
import PxpCheckoutConfig from "@pxpio/web-components-sdk";
const checkoutConfig: PxpCheckoutConfig = {
environment: "test",
session: sessionData,
transactionData: {
currency: "USD",
amount: 1000
},
merchantShopperId: "shopper_001",
ownerType: "Merchant",
ownerId: "merchant_001",
shippingAddress: {
address: "123 Elm St",
postalCode: "90210",
countryCode: "US"
},
analyticsEvent: (analyticsEvent: AnalyticsEvent.BaseAnalyticsEvent) => void | Promise<void>
};
Updated 15 days ago