Quick Start - Let's make an Open Banking payment!

Overview

This section gives partners an overview of the API calls required for the three integration models:

  • CHECKOUT
  • SELF-HOSTED
  • REDIRECT

See Implementation Options for more on these options.

Depending on the setup that best suits your business needs, the API calls that you need to make and how you process the responses vary.

Postman Collection


We highly recommend that you use Postman to test our Payment Initiation APIs on the Sandbox environment. Download it for free from www.postman.com/downloads.

You will need to download:

  • A Collection .JSON file.
  • An Environment .JSON file.
Download the files from Github here: Postman Collections on Github

If you are new to Postman and are unsure how to import the collection, please see the README.

Once you have downloaded the Collection and the Environment files:

  1. Open Postman.
  2. Import the collection files.
  3. Specify your API Key.

Checkout Mode

As a partner, you will need to interact with the Nuapay Open Banking services on behalf of your merchants. In this example we will assume that you want to set up a payment for Merchant X but do not have the merchant identifier and need to query the GET /organisations service to retrieve it as a first step.

Call the following services in this order

GET Organisations (Optional) Use this service to retrieve the list of organisations/merchants under you as the Partner entity. Use your Partner-level API Key and store the required merchant identifier.
POST Access Token Use this service to retrieve an OAuth token for the required merchant. Pass your API Key and merchantId with scope = openbanking_pisp.
POST Create Payment Call this service with the merchant access token; the Create Payment service generates an Open Banking payment object, returning a unique userInterfacePaymentId with an (initial) status of PENDING. Apply the Nuapay-provided JS and CSS on your page to render the Bank Selection screen for your merchant’s payers.
- - The PSU selects a bank (also referred to as the ASPSP) and is redirected to authenticate and approve the payment on that ASPSP’s online banking portal.
GET Retrieve Payment Status Retrieve the status of the payment.

For more details on this see the Partner-level Checkout Setup.

Self-Hosted

As a partner, you will need to interact with the Nuapay Open Banking services on behalf of your merchants. In this example we will assume that you want to set up a payment for Merchant X but do not have the merchant identifier and need to query the GET /organisations service to retrieve it as a first step.

Call the following services in this order:

GET Organisations (Optional) Use this service to retrieve the list or organisations/merchants under you as the Partner entity. Use your Partner-level API Key and store the required merchant identifier.
POST Access Token Use this service to retrieve an OAuth token for the required merchant. Pass your API Key and merchantId with scope = openbanking_pisp.
GET Retrieve Banks Use this service to give your PSU a list of banks from which to choose
- - The PSU selects a bank (also referred to as the ASPSP).
POST Create Payment Once the user selects an ASPSP, pass its bankId in the payment request.
- - The PSU is redirected to authenticate and approve the payment on that ASPSP’s online banking portal. Once the user approves or declines the payment he/she is redirected to the merchantPostAuthUrl (as referenced in the Create Payment call).
GET Retrieve Payment Status Retrieve the status of the payment.

For more details on this see the Partner-Level Self-Hosted Setup

Redirect Mode

As a partner, you will need to interact with the Nuapay Open Banking services on behalf of your merchants. In this example we will assume that you want to set up a payment for Merchant X but do not have the merchant identifier and need to query the GET /organisations service to retrieve it as a first step.

Call the following services in this order

GET Organisations (Optional) Use this service to retrieve the list of organisations/merchants under you as the Partner entity. Use your Partner-level API Key and store the required merchant identifier.
POST Access Token Use this service to retrieve an OAuth token for the required merchant. Pass your API Key and merchantId with scope = openbanking_pisp.
POST Create Payment Call this service with the merchant access token. The integrationType must be set to REDIRECT and the merchantPostAuthUrl must be provided. The Create Payment service generates an Open Banking payment object, returning a unique userInterfacePaymentId with the payment object having an (initial) status of PENDING. The URI must be passed to the PSU; once the user click the link the Bank Selection screen is launched in a new browser window/tab.
- - The PSU selects a bank and is redirected to authenticate and approve the payment on that ASPSP’s online banking portal.
GET Retrieve Payment Status Retrieve the status of the payment.

For more details on this see the Partner-level Redirect Setup.