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

Confirm GPay Selection

Confirms the GPay payment selection and resolves the card type for the pre-order by looking up the card record associated with the configured GPay BIN number.

The request body must be submitted empty. Any fields present in the POST body will cause the request to be rejected with a validation error. This endpoint acts as a confirmation-only step that requires no additional customer input.

On success the system resolves the card type from the GPay BIN number record, attaches the card information to the pre-order, assigns a new order number, and advances to GPayRedirectPage to create the payment transaction.

Preconditions:

  • A payment option with payment_type: gpay must be selected on the pre-order

  • No transaction must be in progress

  • The basket amount must be greater than zero

Processing Flow:

  1. Validates that the basket amount is positive

  2. Validates that the request body is empty

  3. Looks up the card type using the configured GPay BIN number (GPAY_BIN_NUMBER)

  4. On BIN number found: attaches the resolved card information to the pre-order and assigns a new order number

  5. On BIN number not found: clears any existing card information and resets the order number silently — no error is returned. The flow does not advance because the next step requires card information to be present. Clients should check card_info: null on the pre_order to detect this condition

  6. On success: advances to GPayRedirectPage

Configuration:

  • GPAY_BIN_NUMBER (static setting, default: "GPAY00"): The BIN number used to look up the Garanti Pay card record. The resolved card determines which installment options are available for the GPay transaction.

Post-order support:

  • This page is available for post-order flows (available_for_post_order: true), allowing a GPay payment to be re-initiated on an existing order.

Forward page invalidation:

  • Submitting this page invalidates all subsequent checkout pages (invalidate_forward_pages: true), ensuring that GPayRedirectPage and GPayCompletePage reflect the freshly resolved card and order state.

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
object · GPaySelectionPageInputOptional

Confirmation payload for the GPay selection step. The request body must be submitted empty — any fields present will cause the request to be rejected with a validation error. This design reflects the nature of the step: the customer simply confirms their GPay selection, and no additional data entry is required. The system resolves the card type and order number automatically upon submission.

Responses
200

GPay card resolved. On success the pre-order is updated with the resolved card information and order number, and the flow advances to GPayRedirectPage. On BIN number lookup failure the pre-order state is cleared but no error is raised — check card_info: null on the pre_order to detect this condition.

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

""
{
  "context_list": [
    {
      "page_name": "GPayRedirectPage",
      "page_slug": "gpayredirectpage",
      "page_context": {}
    }
  ],
  "pre_order": {
    "number": "ORD-20240101-00003",
    "payment_option": {
      "pk": 12,
      "name": "Garanti Pay",
      "slug": "garanti-pay",
      "payment_type": "gpay"
    },
    "total_amount": "249.90",
    "total_amount_with_interest": "249.90",
    "card_info": {
      "bin_number": "GPAY00",
      "card": {
        "pk": 3,
        "name": "Garanti Pay Card",
        "slug": "garanti-pay-card"
      }
    },
    "is_guest": false,
    "is_post_order": false
  },
  "errors": null,
  "template_name": ""
}

Last updated

Was this helpful?