Get Thank You Page context
Terminal page returned when an order has been successfully finalised. The page context contains the signed redirect URL, order identifiers, and optionally the user's authentication token for new accounts.
This page is never directly requested via ?page=ThankYouPage; instead it appears in the context_list response after any payment page successfully finalises the order (e.g., after WalletCompletePage, WalletRedirectCompletePage, B2BPage, PayLaterCompletePage, CreditCardConfirmationPage, etc.).
Preconditions:
Pre-condition is always
false— this page cannot be forced via thepagequery parameter. It is only served when the order is already finalised.
Page Context (ThankYouPageContext):
redirect_url: Signed URL pointing to the order success page (/orders/checkout/success/<signed_order_number>/).order_id: Primary key of the created order.order_number: Human-readable order number.new_user:trueif the order was placed by a user who has not yet set a password (account created during guest checkout).token: Authentication token ID for the new user, ornullif the user already has an account or is anonymous.campaigns: List of campaign labels applied to the order.
Step Completion: This page is considered already completed when the order has been finalised (order_finalized() returns true).
available_for_post_order: true
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>)
Thank you page context retrieved — order has been finalised
GET /orders/checkout/?page=ThankYouPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
Thank you page context retrieved — order has been finalised
{
"context_list": [
{
"page_name": "ThankYouPage",
"page_slug": "thankyoupage",
"page_context": {
"redirect_url": "/orders/checkout/success/abc123/",
"order_id": 456,
"order_number": "ORD-456",
"new_user": false,
"token": null,
"campaigns": [
"10% off first order",
"Free shipping"
]
}
}
],
"pre_order": {
"basket": {
"pk": 123,
"total_amount": "150.00"
}
},
"errors": [],
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

