API Flows

Flows

There is 4 MAIN FLOWS that you can perform using Ayoconnect's Direct Debit Solution:

Flow

Details

Binding

  1. Bind your customer's bank account 2. Get binding details

Payment

  1. Process a payment request for a binded bank account 2. Check payment status

Unbinding

Unbind your customer's binded bank account

Get list of customer's accounts

Get the list of accounts currently to your customer

Binding Flow

APIs part of this flow:

  • Generate B2B Access Token API
  • Account Binding API

Payment Flow

APIs part of this flow:

  • Generate B2B Access Token API
  • Generate B2B2C Customer Authorization Token API
  • Direct Debit Payment API
  • Verify OTP API (only in case of payments that require OTP)

NOTE: Before you start with this flow, you will need to generate a new value for the X-EXTERNAL-ID header. Don't reuse the same value in different flows.

Partners can follow the below steps to perform a Payment:

  • Generate a B2B token by calling the Generate B2B Access Token API.
  • Generate a B2B2C token by calling the Generate B2B2C Customer Authorization Token API.
  • Use the B2B and B2B2C tokens to generate the request to the Direct Debit Payment API.
  • B2B2C API request will have mandatory parameter authCode which partners can populate using the same authCode that is used for the successful binding.
  • In case of a payment with OTP, a new call to the Verify OTP API will be required.
    • NOTE: Partners shouldn't fail the transaction if the OTP verification is not completed before 3 attempts (the transaction should be marked as failed only after the 3 OTP verification attempts).
    • NOTE: After 3 failed attempts, the account will be blocked and the partners should block the customer for that specific bank (to prevent further requests).
  • After a payment, a callback should be received by the partners with the status.
  • If the callback isn't received, or you want to reconfirm that the payment has been properly confirmed, you can call the Get the Status of a transaction API with the same X-EXTERNAL-ID used in the previous steps.

Unbinding Flow

APIs part of this flow:

  • Generate B2B Access Token API
  • Generate B2B2C Customer Authorization Token API
  • Account Unbinding API
  • Verify OTP API

NOTE: Before you start with this flow, you will need to generate a new value for the X-EXTERNAL-ID header. Don't reuse the same value in different flows.

Partners can follow the below steps to perform the Card Unbinding:

  • Generate a B2B token by calling the Generate B2B Access Token API.
  • Generate a B2B2C token by calling the Generate B2B2C Customer Authorization Token API.
  • Use the B2B and B2B2C tokens to generate the request to the Account Unbinding API.
  • In case of a Card Unbinding with OTP, a new call to the Verify OTP API will be required.