StoreLyne API docs 2026-11

Start checkout from a cart (holds stock for 15 minutes)

POST/storefront/2026-11/checkouts

storefront tokenIdempotency-Key required

Headers

  • Idempotency-Keystringrequired

    Unique key for this request. Retries with the same key return the first response.

    At least 1 characters · Up to 255 characters

Request body

  • cart_idID (crt_...)required

Response 201

  • idID (chk_...)required
  • statusenumrequired

    One of open blocked completed expired

  • cart_idID (crt_...)required
  • buyerobjectrequired
  • buyer.namestringrequired
  • buyer.emailstring or nullrequired
  • buyer.phonestring or nullrequired
  • shipping_addressobject or nullrequired
  • accepts_emailbooleanrequired
  • accepts_whatsappbooleanrequired
  • linesarray of objectrequired
  • lines[].variant_idID (var_...)required
  • lines[].titlestringrequired
  • lines[].variant_titlestringrequired
  • lines[].quantityintegerrequired
  • lines[].unit_priceintegerrequired
  • lines[].totalintegerrequired
  • subtotalintegerrequired
  • discountobject or nullrequired
  • discount.codestringrequired
  • discount.amountintegerrequired
  • shippingintegerrequired
  • tax_totalintegerrequired
  • totalintegerrequired
  • requires_shippingbooleanrequired
  • payment_optionsarray of enumrequired

    One of cod online

  • online_methodsarray of enumrequired

    One of upi card netbanking wallet emi paylater

  • test_modebooleanrequired

    Payments are simulated: no money moves.

  • orderobject or nullrequired
  • order.idID (ord_...)required
  • order.namestringrequired
  • order.payment_statusstringrequired
  • expires_attimestamprequired

Errors

400idempotency_key_requiredEvery POST needs an Idempotency-Key header.
400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
404resource_not_foundThe object does not exist or belongs to another store.
409checkout_closedThis checkout is already completed or expired. Start again from the cart.
409idempotency_in_progressA request with this Idempotency-Key is still running.
409out_of_stockAn item does not have enough stock for this quantity. Lower the quantity or remove it.
422idempotency_key_reusedThis Idempotency-Key was used with a different request.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl -X POST https://api.storelyne.com/storefront/2026-11/checkouts \
  -H "Storefront-Token: <storefront token>" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "cart_id": "crt_01JCG8ZQ5S7T0V4X8K2M3N6P9R"
}'
Response 201
{
  "id": "chk_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "status": "open",
  "cart_id": "crt_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "buyer": {
    "name": "Festive saree",
    "email": "buyer@example.com",
    "phone": "+919876543210"
  },
  "shipping_address": {},
  "accepts_email": false,
  "accepts_whatsapp": false,
  "lines": [
    {
      "variant_id": "var_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
      "title": "Festive saree",
      "variant_title": "Festive saree",
      "quantity": 1,
      "unit_price": 49900,
      "total": 49900
    }
  ],
  "subtotal": 49900,
  "discount": {
    "code": "string",
    "amount": 49900
  },
  "shipping": 1,
  "tax_total": 49900,
  "total": 49900,
  "requires_shipping": false,
  "payment_options": [
    "cod"
  ],
  "online_methods": [
    "upi"
  ],
  "test_mode": false,
  "order": {
    "id": "ord_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
    "name": "Festive saree",
    "payment_status": "string"
  },
  "expires_at": "2026-11-04T10:00:00.000Z"
}

A checkout

GET/storefront/2026-11/checkouts/{id}

storefront token

Path parameters

  • idID (chk_...)required

Response 200

  • idID (chk_...)required
  • statusenumrequired

    One of open blocked completed expired

  • cart_idID (crt_...)required
  • buyerobjectrequired
  • buyer.namestringrequired
  • buyer.emailstring or nullrequired
  • buyer.phonestring or nullrequired
  • shipping_addressobject or nullrequired
  • accepts_emailbooleanrequired
  • accepts_whatsappbooleanrequired
  • linesarray of objectrequired
  • lines[].variant_idID (var_...)required
  • lines[].titlestringrequired
  • lines[].variant_titlestringrequired
  • lines[].quantityintegerrequired
  • lines[].unit_priceintegerrequired
  • lines[].totalintegerrequired
  • subtotalintegerrequired
  • discountobject or nullrequired
  • discount.codestringrequired
  • discount.amountintegerrequired
  • shippingintegerrequired
  • tax_totalintegerrequired
  • totalintegerrequired
  • requires_shippingbooleanrequired
  • payment_optionsarray of enumrequired

    One of cod online

  • online_methodsarray of enumrequired

    One of upi card netbanking wallet emi paylater

  • test_modebooleanrequired

    Payments are simulated: no money moves.

  • orderobject or nullrequired
  • order.idID (ord_...)required
  • order.namestringrequired
  • order.payment_statusstringrequired
  • expires_attimestamprequired

Errors

400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
404resource_not_foundThe object does not exist or belongs to another store.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl https://api.storelyne.com/storefront/2026-11/checkouts/chk_01JCG8ZQ5S7T0V4X8K2M3N6P9R \
  -H "Storefront-Token: <storefront token>"
Response 200
{
  "id": "chk_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "status": "open",
  "cart_id": "crt_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "buyer": {
    "name": "Festive saree",
    "email": "buyer@example.com",
    "phone": "+919876543210"
  },
  "shipping_address": {},
  "accepts_email": false,
  "accepts_whatsapp": false,
  "lines": [
    {
      "variant_id": "var_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
      "title": "Festive saree",
      "variant_title": "Festive saree",
      "quantity": 1,
      "unit_price": 49900,
      "total": 49900
    }
  ],
  "subtotal": 49900,
  "discount": {
    "code": "string",
    "amount": 49900
  },
  "shipping": 1,
  "tax_total": 49900,
  "total": 49900,
  "requires_shipping": false,
  "payment_options": [
    "cod"
  ],
  "online_methods": [
    "upi"
  ],
  "test_mode": false,
  "order": {
    "id": "ord_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
    "name": "Festive saree",
    "payment_status": "string"
  },
  "expires_at": "2026-11-04T10:00:00.000Z"
}

Contact details, shipping address and marketing consent

PATCH/storefront/2026-11/checkouts/{id}

storefront token

Path parameters

  • idID (chk_...)required

Request body

  • namestring

    Up to 120 characters

  • emailstring or null
  • phonestring or null
  • shipping_addressobject
  • shipping_address.namestringrequired

    At least 1 characters · Up to 120 characters

  • shipping_address.line1stringrequired

    At least 1 characters · Up to 200 characters

  • shipping_address.line2string

    Up to 200 characters

  • shipping_address.citystringrequired

    At least 1 characters · Up to 100 characters

  • shipping_address.statestringrequired
  • shipping_address.pincodestringrequired
  • shipping_address.country"IN"

    Default "IN"

  • shipping_address.phonestring or null
  • accepts_emailboolean
  • accepts_whatsappboolean
  • discount_codestring or null

Response 200

  • idID (chk_...)required
  • statusenumrequired

    One of open blocked completed expired

  • cart_idID (crt_...)required
  • buyerobjectrequired
  • buyer.namestringrequired
  • buyer.emailstring or nullrequired
  • buyer.phonestring or nullrequired
  • shipping_addressobject or nullrequired
  • accepts_emailbooleanrequired
  • accepts_whatsappbooleanrequired
  • linesarray of objectrequired
  • lines[].variant_idID (var_...)required
  • lines[].titlestringrequired
  • lines[].variant_titlestringrequired
  • lines[].quantityintegerrequired
  • lines[].unit_priceintegerrequired
  • lines[].totalintegerrequired
  • subtotalintegerrequired
  • discountobject or nullrequired
  • discount.codestringrequired
  • discount.amountintegerrequired
  • shippingintegerrequired
  • tax_totalintegerrequired
  • totalintegerrequired
  • requires_shippingbooleanrequired
  • payment_optionsarray of enumrequired

    One of cod online

  • online_methodsarray of enumrequired

    One of upi card netbanking wallet emi paylater

  • test_modebooleanrequired

    Payments are simulated: no money moves.

  • orderobject or nullrequired
  • order.idID (ord_...)required
  • order.namestringrequired
  • order.payment_statusstringrequired
  • expires_attimestamprequired

Errors

400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
404resource_not_foundThe object does not exist or belongs to another store.
409checkout_closedThis checkout is already completed or expired. Start again from the cart.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl -X PATCH https://api.storelyne.com/storefront/2026-11/checkouts/chk_01JCG8ZQ5S7T0V4X8K2M3N6P9R \
  -H "Storefront-Token: <storefront token>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Festive saree",
  "email": "buyer@example.com",
  "phone": "+919876543210"
}'
Response 200
{
  "id": "chk_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "status": "open",
  "cart_id": "crt_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "buyer": {
    "name": "Festive saree",
    "email": "buyer@example.com",
    "phone": "+919876543210"
  },
  "shipping_address": {},
  "accepts_email": false,
  "accepts_whatsapp": false,
  "lines": [
    {
      "variant_id": "var_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
      "title": "Festive saree",
      "variant_title": "Festive saree",
      "quantity": 1,
      "unit_price": 49900,
      "total": 49900
    }
  ],
  "subtotal": 49900,
  "discount": {
    "code": "string",
    "amount": 49900
  },
  "shipping": 1,
  "tax_total": 49900,
  "total": 49900,
  "requires_shipping": false,
  "payment_options": [
    "cod"
  ],
  "online_methods": [
    "upi"
  ],
  "test_mode": false,
  "order": {
    "id": "ord_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
    "name": "Festive saree",
    "payment_status": "string"
  },
  "expires_at": "2026-11-04T10:00:00.000Z"
}

Start a payment for the placed order

POST/storefront/2026-11/checkouts/{id}/attempts

storefront tokenIdempotency-Key required

Path parameters

  • idID (chk_...)required

Headers

  • Idempotency-Keystringrequired

    Unique key for this request. Retries with the same key return the first response.

    At least 1 characters · Up to 255 characters

Request body

  • methodenumrequired

    One of upi card netbanking wallet emi paylater

Response 201

  • idID (att_...)required
  • stateenumrequired

    One of created awaiting_payment authorized pending paid failed abandoned late_success cancelled

  • methodenumrequired

    One of upi card netbanking wallet emi paylater

  • amountintegerrequired
  • trace_idstringrequired
  • client_payloadobject or nullrequired

    What the payment step needs (provider order and key).

  • cause_codeenum or nullrequired

    One of buyer_cancelled buyer_left_upi_app buyer_wrong_pin_or_otp buyer_insufficient_funds buyer_limit_exceeded buyer_other bank_issuer_down bank_timeout bank_declined upi_app_not_responding bank_other provider_5xx provider_slow_order provider_rate_limited provider_risk_declined provider_other platform_api_error platform_price_mismatch platform_reservation_error platform_checkout_script_error platform_signature_invalid platform_other store_kyc_pending store_method_not_enabled ...

  • messagestring or nullrequired

    Plain sentence for the buyer when the payment did not go through.

Errors

400idempotency_key_requiredEvery POST needs an Idempotency-Key header.
400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
404resource_not_foundThe object does not exist or belongs to another store.
409checkout_closedThis checkout is already completed or expired. Start again from the cart.
409idempotency_in_progressA request with this Idempotency-Key is still running.
422idempotency_key_reusedThis Idempotency-Key was used with a different request.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl -X POST https://api.storelyne.com/storefront/2026-11/checkouts/chk_01JCG8ZQ5S7T0V4X8K2M3N6P9R/attempts \
  -H "Storefront-Token: <storefront token>" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "method": "upi"
}'
Response 201
{
  "id": "att_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "state": "created",
  "method": "upi",
  "amount": 49900,
  "trace_id": "string",
  "client_payload": {},
  "cause_code": "buyer_cancelled",
  "message": "Hand block printed cotton."
}

Payment status (poll while pending)

GET/storefront/2026-11/checkouts/{id}/attempts/{attempt_id}

storefront token

Path parameters

  • idID (chk_...)required
  • attempt_idID (att_...)required

Response 200

  • idID (att_...)required
  • stateenumrequired

    One of created awaiting_payment authorized pending paid failed abandoned late_success cancelled

  • methodenumrequired

    One of upi card netbanking wallet emi paylater

  • amountintegerrequired
  • trace_idstringrequired
  • client_payloadobject or nullrequired

    What the payment step needs (provider order and key).

  • cause_codeenum or nullrequired

    One of buyer_cancelled buyer_left_upi_app buyer_wrong_pin_or_otp buyer_insufficient_funds buyer_limit_exceeded buyer_other bank_issuer_down bank_timeout bank_declined upi_app_not_responding bank_other provider_5xx provider_slow_order provider_rate_limited provider_risk_declined provider_other platform_api_error platform_price_mismatch platform_reservation_error platform_checkout_script_error platform_signature_invalid platform_other store_kyc_pending store_method_not_enabled ...

  • messagestring or nullrequired

    Plain sentence for the buyer when the payment did not go through.

Errors

400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
404resource_not_foundThe object does not exist or belongs to another store.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl https://api.storelyne.com/storefront/2026-11/checkouts/chk_01JCG8ZQ5S7T0V4X8K2M3N6P9R/attempts/att_01JCG8ZQ5S7T0V4X8K2M3N6P9R \
  -H "Storefront-Token: <storefront token>"
Response 200
{
  "id": "att_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "state": "created",
  "method": "upi",
  "amount": 49900,
  "trace_id": "string",
  "client_payload": {},
  "cause_code": "buyer_cancelled",
  "message": "Hand block printed cotton."
}

Hand over the provider callback; it is verified and checked with the provider

POST/storefront/2026-11/checkouts/{id}/attempts/{attempt_id}/confirm

storefront tokenIdempotency-Key required

Path parameters

  • idID (chk_...)required
  • attempt_idID (att_...)required

Headers

  • Idempotency-Keystringrequired

    Unique key for this request. Retries with the same key return the first response.

    At least 1 characters · Up to 255 characters

Request body

  • payloadobjectrequired
  • signaturestringrequired

    At least 1 characters · Up to 500 characters

Response 200

  • idID (att_...)required
  • stateenumrequired

    One of created awaiting_payment authorized pending paid failed abandoned late_success cancelled

  • methodenumrequired

    One of upi card netbanking wallet emi paylater

  • amountintegerrequired
  • trace_idstringrequired
  • client_payloadobject or nullrequired

    What the payment step needs (provider order and key).

  • cause_codeenum or nullrequired

    One of buyer_cancelled buyer_left_upi_app buyer_wrong_pin_or_otp buyer_insufficient_funds buyer_limit_exceeded buyer_other bank_issuer_down bank_timeout bank_declined upi_app_not_responding bank_other provider_5xx provider_slow_order provider_rate_limited provider_risk_declined provider_other platform_api_error platform_price_mismatch platform_reservation_error platform_checkout_script_error platform_signature_invalid platform_other store_kyc_pending store_method_not_enabled ...

  • messagestring or nullrequired

    Plain sentence for the buyer when the payment did not go through.

Errors

400idempotency_key_requiredEvery POST needs an Idempotency-Key header.
400signature_invalidThe payment confirmation could not be verified. The payment is checked with the provider instead.
400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
404resource_not_foundThe object does not exist or belongs to another store.
409idempotency_in_progressA request with this Idempotency-Key is still running.
422idempotency_key_reusedThis Idempotency-Key was used with a different request.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl -X POST https://api.storelyne.com/storefront/2026-11/checkouts/chk_01JCG8ZQ5S7T0V4X8K2M3N6P9R/attempts/att_01JCG8ZQ5S7T0V4X8K2M3N6P9R/confirm \
  -H "Storefront-Token: <storefront token>" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "payload": {},
  "signature": "string"
}'
Response 200
{
  "id": "att_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "state": "created",
  "method": "upi",
  "amount": 49900,
  "trace_id": "string",
  "client_payload": {},
  "cause_code": "buyer_cancelled",
  "message": "Hand block printed cotton."
}

Test mode only: choose what happens to the payment

POST/storefront/2026-11/checkouts/{id}/attempts/{attempt_id}/test-payment

storefront tokenIdempotency-Key required

Path parameters

  • idID (chk_...)required
  • attempt_idID (att_...)required

Headers

  • Idempotency-Keystringrequired

    Unique key for this request. Retries with the same key return the first response.

    At least 1 characters · Up to 255 characters

Request body

  • outcomestringrequired

Response 200

  • payloadobjectrequired
  • signaturestringrequired

Errors

400idempotency_key_requiredEvery POST needs an Idempotency-Key header.
400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
403forbiddenYou do not have access to this resource.
404resource_not_foundThe object does not exist or belongs to another store.
409idempotency_in_progressA request with this Idempotency-Key is still running.
422idempotency_key_reusedThis Idempotency-Key was used with a different request.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl -X POST https://api.storelyne.com/storefront/2026-11/checkouts/chk_01JCG8ZQ5S7T0V4X8K2M3N6P9R/attempts/att_01JCG8ZQ5S7T0V4X8K2M3N6P9R/test-payment \
  -H "Storefront-Token: <storefront token>" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "outcome": "string"
}'
Response 200
{
  "payload": {},
  "signature": "string"
}

Place the order (cash on delivery, or unpaid until an online payment succeeds)

POST/storefront/2026-11/checkouts/{id}/place

storefront tokenIdempotency-Key required

Path parameters

  • idID (chk_...)required

Headers

  • Idempotency-Keystringrequired

    Unique key for this request. Retries with the same key return the first response.

    At least 1 characters · Up to 255 characters

Request body

  • paymentenumrequired

    One of cod online

Response 200

  • idID (chk_...)required
  • statusenumrequired

    One of open blocked completed expired

  • cart_idID (crt_...)required
  • buyerobjectrequired
  • buyer.namestringrequired
  • buyer.emailstring or nullrequired
  • buyer.phonestring or nullrequired
  • shipping_addressobject or nullrequired
  • accepts_emailbooleanrequired
  • accepts_whatsappbooleanrequired
  • linesarray of objectrequired
  • lines[].variant_idID (var_...)required
  • lines[].titlestringrequired
  • lines[].variant_titlestringrequired
  • lines[].quantityintegerrequired
  • lines[].unit_priceintegerrequired
  • lines[].totalintegerrequired
  • subtotalintegerrequired
  • discountobject or nullrequired
  • discount.codestringrequired
  • discount.amountintegerrequired
  • shippingintegerrequired
  • tax_totalintegerrequired
  • totalintegerrequired
  • requires_shippingbooleanrequired
  • payment_optionsarray of enumrequired

    One of cod online

  • online_methodsarray of enumrequired

    One of upi card netbanking wallet emi paylater

  • test_modebooleanrequired

    Payments are simulated: no money moves.

  • orderobject or nullrequired
  • order.idID (ord_...)required
  • order.namestringrequired
  • order.payment_statusstringrequired
  • expires_attimestamprequired

Errors

400idempotency_key_requiredEvery POST needs an Idempotency-Key header.
400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
409checkout_closedThis checkout is already completed or expired. Start again from the cart.
409idempotency_in_progressA request with this Idempotency-Key is still running.
409out_of_stockAn item does not have enough stock for this quantity. Lower the quantity or remove it.
409price_changedA price changed since the checkout started. Review the new total and place the order again.
422idempotency_key_reusedThis Idempotency-Key was used with a different request.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl -X POST https://api.storelyne.com/storefront/2026-11/checkouts/chk_01JCG8ZQ5S7T0V4X8K2M3N6P9R/place \
  -H "Storefront-Token: <storefront token>" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "payment": "cod"
}'
Response 200
{
  "id": "chk_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "status": "open",
  "cart_id": "crt_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "buyer": {
    "name": "Festive saree",
    "email": "buyer@example.com",
    "phone": "+919876543210"
  },
  "shipping_address": {},
  "accepts_email": false,
  "accepts_whatsapp": false,
  "lines": [
    {
      "variant_id": "var_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
      "title": "Festive saree",
      "variant_title": "Festive saree",
      "quantity": 1,
      "unit_price": 49900,
      "total": 49900
    }
  ],
  "subtotal": 49900,
  "discount": {
    "code": "string",
    "amount": 49900
  },
  "shipping": 1,
  "tax_total": 49900,
  "total": 49900,
  "requires_shipping": false,
  "payment_options": [
    "cod"
  ],
  "online_methods": [
    "upi"
  ],
  "test_mode": false,
  "order": {
    "id": "ord_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
    "name": "Festive saree",
    "payment_status": "string"
  },
  "expires_at": "2026-11-04T10:00:00.000Z"
}