DAPI direct API flow

Below you can find 2 flows:

HOLD - POST flow

Take the following steps: 1.Generate token

Generate a token using the “Generate external token” API. In this API you need to pass your NymCard account ID and pass "DAPI" channel. You will receive the token itself and timestamp, which indicates when this token will expire. Expiration time is 60 minutes.

Here you can find request sample:

POST /accounts/{id}:token

{

"channel": "DAPI"

}

Here you can find response sample:

Response sample

{

"token": "42504465-5410-46fc-94e8-aa5bc062ada9%7Ctenant",

"expiry": 3600

}

2.Load Account Funds with Token API: Request [HOLD]

Upon performing “HOLD”, the amount will be set to hold for the prefunded (pool) account and no funds will be credited to the cardholder account yet.

Perform the following API:

You will get the following response:

Also you will receive the following webhook:

3.Load Account Funds with Token API: Request [POST]

Upon performing “POST”, the amount will be debited from the prefunded (pool) account and credited to the cardholder account.

Perform the following API:

You will get the following response:

Webhooks

Upon performing “POST”, two webhooks will be received. One is for original transaction and another one is for completion.

Webhook 1

Webhook 2

HOLD - RELEASE flow

Take the following steps: 1.Generate token

Generate a token using the “Generate external token” API. In this API you need to pass your NymCard account ID and pass "DAPI" channel. You will receive the token itself and timestamp, which indicates when this token will expire. Expiration time is 60 minutes.

Here you can find request sample:

POST /accounts/{id}:token

{

"channel": "DAPI"

}

Here you can find response sample:

Response sample

{

"token": "42504465-5410-46fc-94e8-aa5bc062ada9%7Ctenant",

"expiry": 3600

}

2.Load Account Funds with Token API: Request [HOLD]

Upon performing “HOLD”, the amount will be set to hold for the prefunded (pool) account and no funds will be credited to the cardholder account yet.

Perform the following API:

You will get the following response:

Also you will receive the following webhook:

3.Load Account Funds with Token API: Request [RELEASE]

Upon performing “RELEASE”, amount will be released back into the prefunded (pool) account.

Note, that we can not perform “RELEASE“ on a transaction which is already completed.

Perform the following API:

You will get the following response:

Webhooks

On performing “RELEASE”, two webhooks will be received. One is for original transaction and another one is for reversal transaction.

Webhook 1

Webhook 2

Last updated

Was this helpful?