Testing your integration

Test your integration with a mocked bank connection to simulate a real payment flow

Before you begin taking payments with Vyne, it's important you thoroughly test your integration. Testing covers making a range of payments with different outcomes, refunding a payment, and ensuring you're able to view and understand your payments and their status in the Merchant portal.

1. Make a test payment

In order to test the hosted checkout payment flow using in our sandbox environment, we provide a mocked bank connection to 'Diamond Bank'. This can be used to emulate a mobile banking app experience. Diamond Bank recreates the experience of biometric authentication and allows the testing of different payment status outcomes.

a) Request payment

Request a single payment and open the hosted checkout .

  1. Make a PIRPIR - Payment Initiation Request and redirect to the redirectUrl returned to open the hosted checkout.
  2. In the hosted checkout, choose 'Diamond Bank' and tap 'Go to bank' to redirect to the mocked bank experience.
  3. Once in Diamond Bank, confirm the payment reference (this is also the payment ID), amount, and beneficiary.

b) Check payment statuses and callback

Use the range of return statuses to ensure your application can handle all payment outcomes.

  1. From viewing a payment in Diamond Bank, tap the 'Return status' dropdown to see a range of statuses available for this payment.
  2. Select a Return status to simulate and tap 'Confirm' to close Diamond Bank, and redirect to the callback URL specified in the PIRPIR - Payment Initiation Request. The payment status will be updated to the Return status selected, and you will receive a webhook notification.
  3. Alternatively, tap 'Cancel' to return a NO_CONFIRM status when redirecting to the callback URL.

🚧

Be aware

The SETTLED return status will only be available in the Return status dropdown if the destination account is a settlement account. Learn more about specifying the destination account here.

c) Receive webhook notifications

We recommend your application should use both callback URL payload and webhook notification payment status updates. A webhook notification will be sent to your callback URL every time the payment status changes.

2. View your test payments

Records of every payment can be viewed in the Payments and Reports pages in the Merchant portal.

Use the Payments page to filter all payments or lookup a payment by ID, and use the Reports page to generate a report within a date range on screen, or download the payment report data in a CSV.

Here, you'll find:

  • The payment amount and currency
  • The payment date and time
  • The payment status
  • The payment ID (also known as the consumer's payment reference)
  • The destination account the payment was requested to
  • The payer's bank (if selected)
  • The payment description

3. Refund a test payment

In order to refund a payment, you'll need to have a settlement account set up in your Vyne merchant account, and have made a test payment into a destination account (which is a settlement account) with a SETTLED status.

  1. Make a PIRPIR - Payment Initiation Request and store the payment ID returned.
  2. Redirect to open the hosted checkout and select SETTLED as the Return status. Tap 'Confirm' to close Diamond Bank. The payment status will be updated to SETTLED, and you will receive a webhook notification.
  3. Create a RRRR - Refund Request with the stored payment ID.
  4. Two webhook notification will be sent to your callback URL: one containing the payment status, and another containing the refund status.

4. Prepare for real payments

When you are ready to take payments from consumers in production, get in touch. We will be able to review the content and status of your test payments to ensure everything is ready to go. We can also answer any final questions and give you an idea of what to expect as you launch with customers.

Once you've decided on a launch date, we will then create a production merchant account, where you can generate an access token for the production API. Production URLs can be found here.


Did this page help you?