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
gpaytypeNo 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 thepre_orderfield 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
GPayCompletePagewithout requiring a POST request.
Post-Order Flow:
Available in the post-order re-payment flow. When
is_post_orderistrue, this page participates in the GPay re-payment sequence for existing orders that require an additional payment attempt.
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>)
GPay Redirect Page context retrieved
GET /orders/checkout/?page=GPayRedirectPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
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?

