Documentation

Checkout Flow

Initialize checkout, set addresses, select shipping/payment methods, summary, and place order

Last updated: Feb 09, 2026

Checkout Flow

Note: All checkout endpoints require authentication.

Initialize Checkout

Start checkout process.

GET /api/v1/checkout/init

Set Shipping Address

Set or create shipping address.

POST /api/v1/checkout/shipping-address
Use existing address:
{
  "address_id": 1
}
Or create new:
{
  "first_name": "John",
  "last_name": "Doe",
  "email": "john@example.com",
  "phone": "+91 9876543210",
  "address_line_1": "123 Main Street",
  "address_line_2": "Apt 4B",
  "city": "Mumbai",
  "state": "Maharashtra",
  "postcode": "400001",
  "country": "IN"
}

Set Billing Address

Set billing address.

POST /api/v1/checkout/billing-address

Same request format as shipping address.


Get Shipping Methods

Get available shipping options.

GET /api/v1/checkout/shipping-methods
Response: 200 OK
{
  "success": true,
  "data": [
    {
      "code": "free_shipping",
      "name": "Free Shipping",
      "description": "3-5 business days",
      "rate": 0
    },
    {
      "code": "express",
      "name": "Express Delivery",
      "description": "1-2 business days",
      "rate": 9.99
    }
  ]
}

Set Shipping Method

Select shipping method.

POST /api/v1/checkout/shipping-method
Request Body:
{
  "shipping_method": "express"
}

Get Payment Methods

Get available payment options.

GET /api/v1/checkout/payment-methods
Response: 200 OK
{
  "success": true,
  "data": [
    {
      "code": "stripe",
      "name": "Credit/Debit Card",
      "description": "Pay with Visa, Mastercard, etc.",
      "type": "card"
    },
    {
      "code": "razorpay",
      "name": "Razorpay",
      "description": "UPI, Cards, Netbanking",
      "type": "gateway"
    },
    {
      "code": "cod",
      "name": "Cash on Delivery",
      "description": "Pay when delivered",
      "type": "offline"
    }
  ]
}

Set Payment Method

Select payment method.

POST /api/v1/checkout/payment-method
Request Body:
{
  "payment_method": "razorpay"
}

Get Checkout Summary

Get order summary before placing.

GET /api/v1/checkout/summary

Place Order

Complete the order.

POST /api/v1/checkout/place-order
Request Body:
{
  "notes": "Please call before delivery",
  "payment_data": {
    "razorpay_payment_id": "pay_xyz123",
    "razorpay_order_id": "order_abc456",
    "razorpay_signature": "sig_..."
  }
}
Response: 201 Created
{
  "success": true,
  "message": "Order placed successfully",
  "data": {
    "order_id": 12345,
    "order_number": "ORD-2026-0001",
    "total": 58.98,
    "status": "pending",
    "payment_status": "paid"
  }
}