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

Select a saved card for payment

Submits the saved card to use for the transaction. The card is identified by its token and must belong to the current user and the active payment gateway.

The system resolves the card's BIN number to identify the card type and determine the available installment options. If the BIN cannot be matched in the database, the system falls back to the default card configuration.

Gateway-Specific Input:

  • Standard gateways: Submit SavedCardSelectionInput. The card field is required and must contain the token displayed in the page context.

  • Iyzico gateway: Submit IyzicoSavedCardSelectionInput. The card field is optional and carries the token provided by the Iyzico UCS hosted card selection interface.

Required Fields (standard gateways):

  • card: Token of the saved card to use.

Validation:

  • The card token must correspond to an active saved card for the current user and the active payment gateway.

State Update:

  • Card information is recorded based on the resolved BIN.

  • The selected card is stored in the session.

Backward Navigation:

  • On backward navigation, the card information and the selected card are cleared.

Next Page:

  • SavedCardInstallmentSelectionPage

available_for_post_order: false

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
or
Responses
200

Card selected

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

"card='card-token-abc123'"
200

Card selected

{
  "context_list": [
    {
      "page_name": "SavedCardInstallmentSelectionPage",
      "page_slug": "savedcardinstallmentselectionpage",
      "page_context": {
        "installments": [
          {
            "pk": 1,
            "installment_count": 1,
            "label": "Single payment",
            "price_with_accrued_interest": "150.00",
            "monthly_price_with_accrued_interest": "150.00"
          }
        ],
        "card_type": {
          "name": "Visa",
          "slug": "visa",
          "logo": "/media/cards/visa.png"
        },
        "installment_messages": []
      }
    }
  ],
  "errors": [],
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?