The Data Update Postback URL
If the merchant does not provide the billing & shipping address, or in cases where the flow allows the customer to change their address, the merchants are asked to provide an API endpoint that will be called whenever any customer information is updated.
Once you receive the updated information, you would need to process it (for instance, change the shipping address), and let ChargeAfter know of any subsequent changes to relevant values (such as tax amount, for instance, if the customer updated their address and change their state)
The payload sent to that endpoint would be:
{
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
updatedData: {
// see content below
}
}
updatedData
An object that is very similar to the options object that is provided initially in the ChargeAfter.checkout.present(opt) call. It contains the updated checkout details, and it is composed of the following fields (see the full object above for further details):
Name | Requirement |
---|---|
totalAmount | Required |
taxAmount | Required |
shippingAmount | Required |
items | Required |
consumerDetails | Required |
discounts | Required |
Response:
{
shippingAmount: 50, // optional
taxAmount: 50, // optional
totalAmount: 1100 // optional
}
Updated 11 days ago