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

Verify the OTP code for the pending gift card

Submits the OTP code entered by the user. The gateway verifies the code and, on success, returns the card's available balance. The flow then continues to GiftCardApplyPage.

Required Fields:

  • otp_code: The one-time password received by the user (max 16 characters)

Validation:

  • An unverified pending card must exist in the session

  • The OTP code must be accepted by the gateway; an invalid code returns a validation error

Backward Navigation:

  • If the OTP has not yet been verified, navigating backward clears the pending card and returns to GiftCardPage

  • If already verified, backward navigation goes to GiftCardApplyPage

Next Pages:

  • GiftCardApplyPage — always, after successful verification

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
otp_codestring · max: 16Required

The one-time password received by the user (SMS or similar channel). Leading and trailing whitespace is stripped. Maximum 16 characters.

Example: 482917
Responses
200

OTP verified; flow routed to GiftCardApplyPage

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

"otp_code='482917'"
200

OTP verified; flow routed to GiftCardApplyPage

{
  "context_list": [
    {
      "page_name": "GiftCardApplyPage",
      "page_slug": "giftcardapplypage",
      "page_context": {
        "card_number_masked": "****-****-****-3456",
        "available_balance": "100.00",
        "max_applicable_amount": "100.00"
      }
    }
  ],
  "pre_order": {
    "user_email": "user@akinon.com"
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?