Creating Instrument 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 provide their bank details and create a new PayTo agreement.
Instrument Session Flow
Instrument Session API
To successfully create a new Instrument Session and redirect the buyer to us, you must use the POST Instrument 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.
- Supply a return URL where we redirect the buyer back upon completion. Typically this would be the digital wallet section.
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 Instrument Session is launched, and the buyer is able to:
- Provide their bank account or PayID details,
- View instructions on how to authorise the agreement in their bank, and then do so.
Buyer redirected back to merchant
Once we return the buyer back to you, the Instrument Session will be closed. To find out the outcome we recommend that you:
-
Listen to our Instrument 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
-
Use 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 and the instrument requested to be created.
Updated 5 months ago