Confirm payment and place the order
Changed onPlaces 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.
Request
- Base URLhttp://localhost:8000/api/shop
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Storefront API Key for authentication. Required for all shop/storefront API requests.
Locale code for localized data (e.g. "en", "fr", "ar"). Defaults to channel's default locale.
Channel code (e.g. "default"). Defaults to the current channel.
Currency code (e.g. "USD", "EUR", "INR"). Defaults to channel's base currency.
Request body
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
- info
endpoint added
- info