You need an online banking account and a developer app to generate an authorization code (authCode) via the ConnectPay Online Banking Portal.
Some terminology
- Person: A physical ConnectPay User.
- Customer: An entity that holds accounts, either Personal or Corporate. A Person can belong to several Customers of any type.
OAuth 2.0
ConnectPay APIs are secured using the OAuth 2.0 model, following the Authorization Code Grant flow. Your Customer’s Master Account Representative (MAR) must obtain a temporary authCode via the Online Banking portal and share it with the engineering team. Engineers will exchange this authCode for an Access Token via a secure server-to-server channel and set up a maintenance procedure.
To access your data via API, each request must present a valid Access Token associated with a Person and Customer. Your data will not be accessible to other Customers.
E.g., You, as a Person X, belong to Customer A and Customer B. You have Access Token issued to Person X and Customer A. With this Token will not be able to access Customers B data.
Getting authCode
- Login to ConnectPay Online Banking: Select the required Customer and navigate to Settings.
- Open API Tab: Press the + Generate AuthCode button to start a new API access flow.
- Select Product: Choose Online Banking API to access Online Banking APIs or Merchant API to Merchant Gateway APIs.
- Accept Terms of Use: Carefully read and accept the Terms of Use to access APIs
- Enter API Key: Find the API key (ClientId) in the DevApp list next to the DevApp name and enter it.
Note: Grant selection screen is only available for Online Banking APIs. For Merchant APIs, jump to #5
- Select Required Grants: For Online Banking APIs, select the necessary OAuth 2.0 scopes:
- Payments – a grant that allows you to initiate payments and view payment statuses and details.
- Pre-Authorized Payments – specific grant that allows the authorization of already initiated payments.
- Accounts – a grant allowing access to your account details, like account or transaction lists.
- Banking as a Service – a grant that allows access to BaaS functionality.
- Authorize the Procedure: Use OTP or a Mobile App for authorization.
- Share authCode: After successful authorization, share the authCode with the engineering team to exchange it for an Access Token. The code is valid for 24 hours.