X-Payments:Check cart callback request

From X-Payments Help
Revision as of 12:47, 20 July 2016 by Dohtur (talk | contribs) (Created page with "After the customer has submitted credit card data, right before sending this data to the payment gateway, X-Payments connects to the store to verify the cart total and content...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

After the customer has submitted credit card data, right before sending this data to the payment gateway, X-Payments connects to the store to verify the cart total and contents.

The HTTP POST request is sent to the callbackURL defined in the Payment initialisation request.

POSTed data

Field Value Type Description
action check_cart fixed string Identifies the check-cart callback request
txnId (mixed) string (MD5 hash) A unique ID of the payment on the side of X-Payments
refId (mixed) string Order ID (or any other reference) in the online store


As of API v1.3, the store must respond to this callback request. The response must be an encrypted XML document (i.e. the same way as for other communication between the store and X-Payments).

Encrypted response for check-cart callback request

Field Required Type Description
status Y fixed string Should be "cart-changed" or "cart-not-changed"
cart Y container A container with cart/order description. See Payment initialisation request specification for details. This container must be included for "status = cart-changed" and is not necessary for "status = cart-not-changed"
saveCard N string Whether the customer has chosen to save their card for future use ("Y" if the customer would like to save the card)