Creating Payment 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 observe their PayTo payment being processed to completion in real-time.

Payment Session Flow

Payment Session API

To successfully create a new Payment Session and redirect the buyer to us, you must use the POST Payment Session API as follows:

  1. Supply the buyer identifier and name for whom the session is being created.

📘

Buyer

We expect the buyer to exist in our platform from a prior Checkout Session or Instrument Session activity.

  1. Specify the instrument identifier under which this payment will be initiated.

🚧

Instrument

Please ensure the instrument belongs to this buyer, otherwise we will reject your Payment Session request.

  1. 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.

  1. Supply a return URL where we redirect the buyer back upon completion. Typically this would be the checkout or the order confirmation 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 Payment Session is launched, and the buyer will be able to:

  1. View the payment being processed in real-time,
  2. View the payment outcome.

Buyer redirected back to merchant

Once we return the buyer back to you, the Payment Session will be closed. To find out the outcome we recommend that you:

  1. Listen to our Payment Events notifications. These will be sent to you at the completion of each step and before the browser redirect back takes place:

    • PayTo Payment Completed
    • PayTo Payment Rejected
  2. 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 and the payment requested to be initiated.