Destination Bank Account management API
The following API end points should be used for creation of DBA (Destination Bank Account) or management of several DBAs.
Only one DBA at a time can be the Main Beneficiary account.
At least one account must be the Main Beneficiary account to initiate a withdrawal request.
There are two ways to manage DBAs - host-to-host and using the XGateway UI.
Managing DBAs using UI
This API endpoints returns a URL with an interface for managing DBAs of a corresponding customer.
A merchant is responsible for authentication of customers. XGateway fully relies on the data provided by the merchant to authorise DBA management. XGateway is not responsible for any damage done by misuse of the APIs below.
Initiates a Destination Bank Account (DBA) checkout link for a specified customer.
It generates a Destination Bank Account checkout link for the customer, optionally localized by the provided locale.
- Unique identifier of the customer.
- The request body containing DBA link options.
Created
Database violation
Unauthorized
Internal server error
POST /api/v2/customer/{id}/bank-transfer/destination-bank-account/initiate HTTP/1.1
Host: localhost:8000
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"locale": "en"
}
{
"data": "https://checkout.xgateway.tech/dba/ff36a7a5-08fd-418a-a150-f6f2d36676a8",
"success": true
}
Host-to-host DBA management
Use the following APIs for direct management of DBAs.
A merchant is responsible for authentication of customers. XGateway fully relies on the data provided by the merchant to authorise DBA management. XGateway is not responsible for any damage done by misuse of the APIs below.
List existing DBAs
Returns a list of destination bank accounts for a specified customer.
Access to this endpoint requires a valid API key. The API key is sent in the x-api-key
header on requests.
- The external identifier for the customer.
937a41ae-a867-420b-92ae-98f922923b3a
Returned list of destination bank accounts
Couldn't return destination bank accounts.
Unauthorized
GET /api/v2/customer/{id}/bank-transfer/destination-bank-account/accounts HTTP/1.1
Host: localhost:8000
x-api-key: YOUR_API_KEY
Accept: */*
{
"data": [
{
"uuid": "00000000-0000-0000-0000-000000000000",
"status": "ACTIVE",
"currency": "EUR",
"iban": "EE111253157458992754"
},
{
"uuid": "00000000-0000-0000-0000-000000000000",
"status": "ACTIVE",
"currency": "GBP",
"sort_code": "286475",
"account_number": "10458239"
}
],
"success": true
}
Create a DBA
Sets up a new destination bank account for a specified customer. Destination Bank Account is required for Crypto To Fiat (Withdrawal) Bank Transfer flow. The customer must pass the KYC process before setting up a DBA.
Access to this endpoint requires a valid API key. The API key is sent in the x-api-key
header on requests.
- The external identifier for the customer.
- Request body containing bank account details.
29ceac55-8332-4daa-9652-00b13f3e2e7b
The user must pass the KYC first.
Unauthorized
POST /api/v2/customer/{id}/bank-transfer/destination-bank-account/setup HTTP/1.1
Host: localhost:8000
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 98
{
"accountName": "John Doe",
"mainBeneficiary": true,
"currency": "EUR",
"iban": "DE89370400440532013000"
}
{
"data": "29ceac55-8332-4daa-9652-00b13f3e2e7b",
"success": true
}
Select a DBA from the list of existing accounts
Activates the specified destination bank account as the main beneficiary for a customer.
Access to this endpoint requires a valid API key. The API key is sent in the x-api-key
header on requests.
- The external identifier for the customer.
937a41ae-a867-420b-92ae-98f922923b3a
- The UUID of the destination bank account to be selected as the main one.
acc-f34ae252-f4d4-45f0-bf01-62704c99907c
Destination bank account successfully activated!
Couldn't activate the destination bank account.
Unauthorized
PATCH /api/v2/customer/{id}/bank-transfer/destination-bank-account/{bankAccountUuid}/select HTTP/1.1
Host: localhost:8000
x-api-key: YOUR_API_KEY
Accept: */*
{
"data": "Destination bank account successfully activated!",
"success": true
}
Delete a DBA
Deletes a specified destination bank account for a customer.
Access to this endpoint requires a valid API key. The API key is sent in the x-api-key
header on requests.
- The external identifier for the customer, used to uniquely identify them and associate them with a merchant.
937a41ae-a867-420b-92ae-98f922923b3a
- The UUID of the destination bank account to be deleted.
acc-31c5fa85-2a01-4ba0-a72f-fcf2d2c6a7d3
Destination bank account successfully deleted!
Couldn't delete the destination bank account.
Unauthorized
DELETE /api/v2/customer/{id}/bank-transfer/destination-bank-account/{bankAccountUuid}/delete HTTP/1.1
Host: localhost:8000
x-api-key: YOUR_API_KEY
Accept: */*
{
"data": "Destination bank account successfully deleted!",
"success": true
}
Last updated