---
title: "Confirm payment and place the order"
method: POST
path: "/checkout-payments/confirm"
tags: ["Checkout"]
---

# Confirm payment and place the order

`POST /checkout-payments/confirm`

## Request

- Base URL: `http://localhost:8000/api/shop`
- URL: `http://localhost:8000/api/shop/checkout-payments/confirm`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-shop-api/docs/checkout-payments/confirm/post.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Headers

- `X-STOREFRONT-KEY` string, required
- `X-Locale` string
- `X-Channel` string
- `X-Currency` string

## Request body

- object
  - `razorpay_order_id` string
  - `razorpay_payment_id` string
  - `razorpay_signature` string
  - `paypal_order_id` string

## Response `201`

The order was placed.

## Other responses

- `400`: Invalid input
- `401`: No cart token.
- `422`: The method needs no confirmation, the payment could not be verified, or the cart is not ready.

## Changes

- **2026-10-28** `b84d43839844`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bagisto/apis/bagisto-shop-api/changes/checkout-payments/confirm/post.md)

---

[API](https://skmtc.dev/bagisto/apis/bagisto-shop-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-shop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-shop-api/revisions/f619df36bf29?raw)
