Creating Checkout Session
We use sessions to securely redirect buyers from the merchant's e-commerce store to our PayTo customer experience. Once redirected to us, buyers can securely create a new PayTo agreement and observe their payment being processed to completion in real-time.
Checkout Session Flow
Checkout Session API
To successfully create a new Checkout Session and redirect the buyer to us, you must use the POST Checkout Session API as follows:
- Supply the buyer identifier and name for whom the session is being created. This identifier needs to be unique so you can always refer back to it.
Buyer name
Should be the full name of the person registered in the merchant's e-commerce store.
- Supply the instrument identifier and the type to be created. This identifier needs to be unique so you can always refer back to it.
Instrument Type
OneOff
is used when the buyer chooses not to save the instrument in their digital wallet.
Ongoing
is used when the buyer chooses to save the instrument in their digital wallet for future use.
- Specify the payment identifier and the amount to be initiated. This identifier needs to be unique so you can always refer back to it.
Payment Reference, Description, and Creditor Reference
You may provide optional references to be included as part of the PayTo payment. These references will be visible in the buyer's banking statement.
- Supply a return URL where we redirect the buyer back upon completion. Typically this would be the checkout or the order page.
API Response
We will respond immediately, and provide you with the redirect URL for you to redirect the buyer's browser.
Buyer redirected to Wpay
Once the buyer is redirected to Wpay, the Checkout Session is launched, and the buyer is able to:
- Provide their bank account or PayID details,
- View instruction on how to authorise the agreement in their bank, and then do so,
- View the payment being processed in real-time,
- View the payment outcome.
Buyer redirected back to merchant
Once we return the buyer back to you, the Checkout Session will be closed. To find out the outcome we recommend that you:
-
Listen to both our Instrument Events and Payment Events notifications. These will be sent to you at the completion of each step and before the browser redirect back takes place:
- PayTo Instrument Created
- PayTo Payment Completed
- PayTo Payment Rejected
-
Call our Session Details API in the case that you do not receive any event notifications from us. This API will confirm the latest status of the session, the instrument requested to be created, and the payment requested to be initiated.
Updated 5 months ago