After a customer exits the checkout flow, the checkout redirects them to the success_url
or error_url
provided during the payment session. Banked appends the following parameters to the redirect url
to provide context on the payment, customer action and resulting payment status:
Parameters | Description |
---|---|
banked-checkout-result | See Banked Checkout Result |
payment_result | See Payment Result |
payment_id | See Payment ID |
If you are using our Embedded Checkout, you can override these default redirects with callback functions. See Embedded Handle Checkout Redirect
Redirect URL Parameters Definitions
banked-checkout-result
Indicates the result of the customer's checkout experience:
banked-checkout-result | Scenario |
---|---|
success | Appears when redirected to the success_url . Indicates the customer successfully completed the checkout with the payment successfully processed to a sent state. |
pending | Appears when redirected to the success_url . Indicates the customer successfully completed the checkout but the payment is still in pending state and currently being processed. Do not release any goods until you have received a sent payment webhook. |
failure | Appears when redirected to the error_url . Indicates the customer attempted to complete a checkout but the payment attempt failed and cannot be retried. |
user-cancelled | Appears when redirected to the error_url . Indicates the customer opted to cancel the payment. |
payment_result
payment_result
parameter refers to the Payment Session States.
payment_result | Description |
---|---|
awaiting_provider | A Banked payment link has been generated, but the user has not selected a provider. |
awaiting_payment_consent | The user has selected a provider and in the process of authorizing the payment within their banking application |
initiated | The bank has received the transaction request. |
pending | The user's bank has accepted the payment and is processing it. Pending status may be skipped for some payments. |
sent | The payment has been sent. The money has left the user's account and cannot be recalled. |
failed | The payment has failed. |
payment_id
payment_id
is the UUID associated with the payment session. See Payment Session API documentation for details.
Redirect Guidance
Below is a set of best practices when handling customer redirects:
1. Success Event
The user will be be redirected to the success_url
once they have successfully authorized a payment. It is important that you do not release any goods until you have received a sent
webhook notification for a payment. As such, make sure your success page displays the following information:
- Order Details: Details about the order, such as the payment amount.
- Next Steps Information: Information about the next steps. For example, in case the payment is in a
pending
state, the payment is being processed and an order confirmation will be sent to the user. - Branding Presence: Ensure that the user is aware they are back on your website.
2. Error Event
The user will be redirected to the error_url
if the bank has rejected the attempt or the user has cancelled it. This redirection serves as an opportunity to guide the user through alternative actions:
- Clear Next Steps: Offer alternative payment methods or the option to revisit their basket and attempt checkout again.
- Error Handling Guidance: Provide support resources or contact information for users encountering payment difficulties.
Default Error URL
If you do not specify an error_url during the creation of a payment session, Banked provides a default error URL. This URL redirects customers to a fallback page designed to offer alternative actions when a payment cannot be completed. The page provides two actions:
- Pay a Different Way:
- Informs the customer to close the window and return to the merchant's platform to select a different payment option.
- Suggests contacting the merchant for assistance via email or phone, with placeholders {support email} and {support tel} for customization.
- Try Pay By Bank Again:
- Provides a breakdown of attempting the Pay by Bank Checkout again.
While Banked offers a default, we recommend you specify an error_url during payment session creation to align the user experience with your branding and customer journey.