The Final Postback URL
The Completion Callback
The postback URL will be used upon flow completion. The postback receive 3 arguments as can be seen in the example below:
{
statusTrackingId: <UUID>, //tracking ID
applicationId: "1234a6b4", //id unique for every launch of ChargeAfter flow (modal window)
correlationId: "", // as passed in the request
tags: {}, // as passed in the request
token: "11799f58-3c06-42a6-b5d5-1c85fa0829fc", // GUID, optional field for checkout only
consumerId: "11799f58-3c06-42a6-b5d5-1c85fa0829fc",
availableCredit: [{
creditAmount: "5000",
lender: {
name: "lenderName",
id: "lenderId"
}
}],
consumerDetails: {
firstName: "John",
lastName: "Doe",
email: "[email protected]",
mobilePhoneNumber: "2124454545",
merchantConsumerId: "merchant-internal-consumer-id",
shippingAddress: {
line1: "3 My Street",
line2: "My Building, 4th floor",
city: "New York",
zipCode: "10019",
state: "NY"
},
billingAddress: {
line1: "3 My Street",
line2: "My Building, 4th floor",
city: "New York",
zipCode: "10019",
state: "NY"
},
},
lender: { // optional - only post successful checkout
name: "Lender",
id: "lenderid"
}
orderInfo: { // optional (only checkout)
totalAmount: 1100,
taxAmount: 50,
shippingAmount: 50
}
error: {
code: "Error code",
message: "Human readable description of the error"
}
}
-
token - a confirmation token that can be used to commit a charge. This parameter will be null for users going through the "application" flow, and for users that were not able to checkout successfully (in case of a checkout ending in a decline or error).
-
consumerId - a dedicated ChargeAfter ID associated with the customer. There's no requirement for the merchant to store or process these values
-
availableCredit - an array that returns to the merchant all the information on credit approvals throughout the process. It is informational only - like with consumerId, There's no requirement for the merchant to store or process these values.
-
data - information that was collected before and during the checkout flow. This object contains the following fields:
Name | Type | Description |
---|---|---|
consumerDetails | object | Non-sensitive consumer details that they entered during the checkout flow - use this information to process the order in the merchant’s systems. |
lender | object | The lender that is behind the selected financing option, as detailed below |
totalAmount | number | |
taxAmount | number | |
shippingAmount | number |
The Lender Object
Name | Type | Description |
---|---|---|
id | string | The lender’s unique identifier in our system |
name | string | The lender’s name |
- error - an error object containing details about the failure. This parameter will be null in case of a successful checkout flow. The object type will be:
Error codes:
Code | Description |
---|---|
BACK_TO_STORE | Consumer clicked the “Back to Store” button |
CONSUMER_CANCELLED | Consumer intentionally closed the Checkout UI |
CREATE_SESSION_FAILED | Checkout creation or merchant settings fetch failed |
BILLING_SHIPPING_MISMATCH | Billing and shipping address must be the same |
GENERAL | Some general error occured (message should provide more information) |
Updated 10 months ago