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 betrue. Submittingfalsetriggers a validation error and rolls the flow back toWalletPaymentPage.
Backward Navigation (on failure):
Removes
agreement_confirmed,payment_started,redirect_url,redirection_started, andhtml_contentfrom 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
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>)
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.
true if the payment provider reports a successful transaction;
false if it reports a failure.
Callback processed — routes to next page
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"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?

