X-Payments:Check cart callback request

From X-Payments Help
Jump to: navigation, search
X-Payments API
  1. API versions supported
  2. Samples
  3. API requests
  4. API Requests from the store to X-Payments
    1. Admin area/X-Payments configuration
    2. Payment creation (Regular payment and tokenization)
    3. Payment information
    4. Actions on payments (secondary actions)
  5. Callback requests (web-hooks) from X-Payments to the store
  6. Browser-related
  7. Appendix A. Status codes.
  8. See also

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.

Note: 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).

Data which is received in the POST request from X-Payments

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


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)