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

Get GPay Redirect Page context

Returns the context for the GPay Redirect Page, which is the second step in the Garanti Pay checkout flow. At this point the system is ready to initiate the external redirect to the Garanti Pay hosted payment page.

Preconditions:

  • Basket must not be empty

  • The selected payment option must be of gpay type

  • No redirect transaction has been recorded for this checkout session yet (the session must not already contain a Garanti Pay transaction identifier)

  • An order number must have been assigned by the preceding GPay Selection step

  • Card information associated with the GPay virtual BIN number must be present in the current checkout session

Page Context:

  • Returns an empty object {}. All relevant order and payment summary data is available in the pre_order field of the response.

Already Completed:

  • This step is considered already completed when a redirect transaction identifier is already stored in the checkout session. When this condition is met, the checkout flow automatically advances to GPayCompletePage without requiring a POST request.

Post-Order Flow:

  • Available in the post-order re-payment flow. When is_post_order is true, this page participates in the GPay re-payment sequence for existing orders that require an additional payment attempt.

get
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>)

Responses
200

GPay Redirect Page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=GPayRedirectPage
GET /orders/checkout/?page=GPayRedirectPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
200

GPay Redirect Page context retrieved

{
  "context_list": [
    {
      "page_name": "GPayRedirectPage",
      "page_slug": "gpayredirectpage",
      "page_context": {}
    }
  ],
  "pre_order": {
    "basket": {
      "pk": 123,
      "total_amount": "250.00"
    },
    "shipping_address": {
      "pk": 10,
      "first_name": "John",
      "last_name": "Doe"
    },
    "billing_address": {
      "pk": 10,
      "first_name": "John",
      "last_name": "Doe"
    },
    "payment_option": {
      "pk": 5,
      "name": "GPay",
      "slug": "gpay",
      "payment_type": "gpay",
      "payment_type_label": "GPay"
    },
    "card_info": {
      "bin_number": "GPAY00",
      "card": {
        "pk": 3,
        "name": "Garanti Pay Virtual Card"
      }
    },
    "number": "1097695957912771",
    "total_amount": "250.00",
    "total_amount_with_interest": "250.00",
    "unpaid_amount": "250.00",
    "currency_type_label": "TRY"
  },
  "errors": null,
  "template_name": ""
}

Last updated

Was this helpful?