For the complete documentation index, see llms.txt. This page is also available as Markdown.

Submit a gift card number for balance check

Submits a gift card number and provider slug. The gateway verifies the card and returns its available balance.

Depending on the gateway response, the flow branches:

  • OTP required: The gateway sends an OTP to the cardholder's registered phone as part of the balance check. The flow continues to GiftCardOtpPage.

  • No OTP: The balance is immediately available and the flow continues directly to GiftCardApplyPage.

Re-submission guard: If the same card number is submitted while an OTP is still pending for that card, the request is accepted without a new gateway call and the flow returns to GiftCardOtpPage immediately.

Required Fields:

  • card_number: The gift card number (max 64 characters)

  • provider_slug: Slug of an active gift card provider

Validation:

  • provider_slug must match an active gift card provider

  • If GIFT_CARD_CONFIG.multi_card_enabled is false and a reservation already exists, a validation error is returned

Backward Navigation:

  • Navigating backward clears any pending card data from the session

Next Pages:

  • GiftCardOtpPage — when the gateway requires OTP for the submitted card

  • GiftCardApplyPage — when the gateway does not require OTP

post
Header parameters
x-requested-withstring · enumRequired

Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.

Default: XMLHttpRequestPossible values:
CookiestringOptional

Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)

Body
card_numberstring · max: 64Required

The gift card number to look up. Leading and trailing whitespace is stripped automatically. Must not be blank.

Example: 1234-5678-9012-3456
provider_slugstring · max: 100Required

Slug of an active gift card provider. Returns a validation error if no active provider with this slug exists.

Example: provider-a
Responses
200

Gift card submitted; flow routed to OTP or apply page

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=GiftCardPage
POST /orders/checkout/?page=GiftCardPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 66

"card_number='1234-5678-9012-3456'&provider_slug='provider-a'"
200

Gift card submitted; flow routed to OTP or apply page

{
  "context_list": [
    {
      "page_name": "GiftCardOtpPage",
      "page_slug": "giftcardotppage",
      "page_context": {
        "masked_phone": "+90 5** *** ** 78",
        "otp_expires_at": "2026-04-28T12:05:00Z"
      }
    }
  ],
  "pre_order": {
    "user_email": "user@akinon.com"
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?