Checkout

Confirm payment and place the order

Changed on

Places the order of the cart of the Bearer token after the customer paid, for Razorpay, PayPal Standard and PayPal Smart Button (the other gateways place the order on their own return). Razorpay: send the three values the Razorpay checkout returns; the signature is verified and the Razorpay order must belong to this cart and amount. PayPal Standard: send an empty body after PayPal returns the customer; as on the storefront the order is created pending and PayPal's IPN marks it paid. PayPal Smart Button: send paypal_order_id once the customer approved the payment in the PayPal SDK; the PayPal order must belong to this cart and total, it is captured, and the order is placed paid and invoiced.

post/checkout-payments/confirm

Request

Headers

X-STOREFRONT-KEYstring required

Storefront API Key for authentication. Required for all shop/storefront API requests.

X-Localestring
Example:en

Locale code for localized data (e.g. "en", "fr", "ar"). Defaults to channel's default locale.

X-Channelstring
Example:default

Channel code (e.g. "default"). Defaults to the current channel.

X-Currencystring
Example:USD

Currency code (e.g. "USD", "EUR", "INR"). Defaults to channel's base currency.

Request body

razorpay_order_idstring
razorpay_payment_idstring
razorpay_signaturestring
paypal_order_idstring

Example request

{
  "razorpay_order_id": "order_P9xYz",
  "razorpay_payment_id": "pay_P9xZa",
  "razorpay_signature": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "paypal_order_id": "5O190127TN364715T"
}

Response

The order was placed.

Changes