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_slugmust match an active gift card providerIf
GIFT_CARD_CONFIG.multi_card_enabledisfalseand 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 cardGiftCardApplyPage— when the gateway does not require OTP
Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.
XMLHttpRequestPossible values: Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)
The gift card number to look up. Leading and trailing whitespace is stripped automatically. Must not be blank.
1234-5678-9012-3456Slug of an active gift card provider. Returns a validation error if no active provider with this slug exists.
provider-aGift card submitted; flow routed to OTP or apply page
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'"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?

