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

Process wallet payment provider callback

Called when the payment provider redirects back after the external payment step. The success parameter must be true for the order to be finalised; a false value causes the flow to roll back to WalletPaymentPage. Query parameters from the provider callback (success, gateway-specific fields) are merged into the request data automatically.

Input Serializer: The fields accepted by this endpoint are determined by the active payment gateway. Each gateway may expose a custom completed_serializer attribute. If none is defined, the default SuccessRequiredInputSerializer is used, which requires success=true. Gateway-specific serializers may accept additional fields (e.g., provider-generated tokens or transaction references).

Required Fields (default / SuccessRequiredInputSerializer):

  • success: Must be true. Submitting false triggers a validation error and rolls the flow back to WalletPaymentPage.

Backward Navigation (on failure):

  • Removes agreement_confirmed, payment_started, redirect_url, redirection_started, and html_content from the session.

  • For isolated pre-order flows, also persists the rolled-back state to the basket-hash pre-order store.

Next Page:

  • ThankYouPage (on success)

  • WalletPaymentPage (on failure / rolled back)

available_for_post_order: true

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

Input for WalletRedirectCompletePage. The success flag is required and is supplied by the payment provider as a query parameter in the callback URL. A value of true finalises the order; false rolls the flow back to WalletPaymentPage.

successbooleanRequired

true if the payment provider reports a successful transaction; false if it reports a failure.

Responses
200

Callback processed — routes to next page

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

"success=true"
200

Callback processed — routes to next page

{
  "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": []
      }
    }
  ],
  "errors": [],
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?