Overview
This section gives merchants an overview of the API calls required for the three integration models:
- CHECKOUT
- SELF-HOSTED
- SELF-HOSTED-CALLBACK
- REDIRECT
See PISP 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.
A Note on Authentication
When interacting with the Nuapay Endpoints you must be authenticated via one of the following:
- API Keys
- OAuth Tokens
For more details, and to decide on the approach that suits your business needs, see API Key Authentication and Token Authentication.
Postman Collection
We highly recommend that you use Postman to test our PISP 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.
If you are new to Postman and are unsure how to import the collection, please see the README.
Once you have donwloaded the Collection and the Environment files:
- Open Postman.
- Import the collection files.
- Specify your API Key.
Checkout Mode
Call the following services in this order:
POST | Access Token | (Optional) Use this service to retrieve an OAuth token, which you will use to authenticate yourself in subsequent calls. Alternatively you may use your API Key. |
POST | Create Payment | 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 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 Merchant-level Checkout Setup.
Self-Hosted
Call the following services in this order:
POST | Access Token | (Optional) Use this service to retrieve an OAuth token, which you will use to authenticate yourself in subsequent calls. Alternatively you may use your API Key. |
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 Merchant-Level Self-Hosted Setup
Self-Hosted Callback
Call the following services in this order:
POST | Access Token | Use this service to retrieve an OAuth token, which you will use to authenticate yourself in subsequent calls. |
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). |
POST | Access Token | Pass your merchant API Key with the required scope = openbanking_callback to retrieve an OAuth access token. |
POST | Forward Payment Callback | In this mode as the callback/redirect from the ASPSP does not go directly to the Nuapay TPP, it is required to forward the details via this service; you must pass your callbackAccessToken and the callbackParams |
GET | Retrieve Payment Status | Retrieve the status of the payment. |
For more details, see Merchant Self-Hosted-Callback Payment Page Setup.
Redirect Mode
Call the following services in this order
POST | Access Token | (Optional) Use this service to retrieve an OAuth token, which you will use to authenticate yourself in subsequent calls. Alternatively you may use your API Key. |
POST | Create Payment | 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 clicks 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 Merchant-level Redirect Setup.