Health
API Health
This endpoint could be used as Heartbeat to know if the API is up and running.
import requests
url = "https://backend.ducapp.net/api/health"
payload={}
headers = {}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/health'
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/health", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"status": true
}
Request
GET /api/health
Host: backend.ducapp.net
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
boolean | Status of API. |
User
Login
Endpoint to obtain the user credentials to be able to use the platform services.
curl --location --request POST 'https://backend.ducapp.net/api/auth/login' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "john.doe@test.ducapp.net",
"password": "$2y$10$EiZYJxdFvdTBfY97uTfU1e11U5vAFmxTnAQ5M.d0q8zU9"
}
'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
email: "john.doe@test.ducapp.net",
password: "$2y$10$EiZYJxdFvdTBfY97uTfU1e11U5vAFmxTnAQ5M.d0q8zU9",
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch("https://backend.ducapp.net/api/auth/login", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
import requests
import json
url = "https://backend.ducapp.net/api/auth/login"
payload = json.dumps({
"email": "john.dow@test.ducapp.net",
"password": "$2y$10$EiZYJxdFvdTBfY97uTfU1e11U5vAFmxTnAQ5M.d0q8zU9"
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Example Response:
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ7.eyJfaWQiOiI1ZWJhZjkxYzgwYjM4NTM1M2I5MjgzZGQiLCJmaXJzdE5hbWUiOiJEYXJpYW4iLCJsYXN0TmFtZSI6IkFsdmFyZXoiLCJlbWFpbCI6ImRhcmlhbi5hbHZhcmV6LnRAZ21haWwuY29tIiwicGhvbmUiOiIrNTM1MjU1MjYxNSIsIndhbGxldEFkZHJlc3MiOiIweDBGNjczQkFGMkM2N2ViNjE2NUNDNTI2ZGY1Mzg2MDMyZDY1M2ZiQjUiLCJkZWZhdWx0Q3VycmVuY3kiOiJVU0QiLCJyb2xlcyI6WyI1ZDdjNzFlZGRmZTg1OTAwMGZmNzE2YmIiLCI1ZDdjNzFlZGRmZTg1OTAwMGZmNzE2YmMiLCI1ZGUwMzAyYTU4ZTUzMDAwMGRlMGRkMmIiLCI2MjRjYzQyZTlhZjAwMDU5YzQ3NzZlMjMiXSwibGFuZ3VhZ2UiOiJFTiIsImxhc3RMb2dpbkF0IjoiMjAyNC0wMi0xNlQxNzoyNDoyMS45NDhaIiwic3RhdHVzIjoiQWN0aXZhdGVkIiwidmVyaWZpZWQiOmZhbHNlLCJ0cnVzdExldmVsIjo4LCJpc0Jsb2NrZWQiOmZhbHNlLCJsb2dpbkZhaWxDb3VudCI6MCwiYmxvY2tlZFVudGlsIjpudWxsLCJpYXQiOjE3MDgxMDQyNjIsImV4cCI6MTcwODEyMjI2Mn0.TA8dS_GS21OXQlmzZ45pWvrBQVsA9sy_Tapr_p8-zwZ",
"isMerchant": true,
"id": "5ebaf91c80b385353b9283da",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@gmail.com",
"phone": "+5355555555",
"walletAddress": "0x0F673BAF2C67eb6165CC526df5386032d653fbB4",
"defaultCurrency": "USD",
"status": "Activated",
"trustLevel": 8,
"isBlocked": false
}
Request
POST /api/auth/login
Host: backend.ducapp.net
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
phone\email |
string | Registered User phone number or email |
password |
string | Registered User password |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
accessToken |
string | Token to access authenticated endpoints |
isMerchant |
string | Weather the user is merchant or not |
id |
string | The user id |
firstName |
string | The user first name |
lastName |
string | The user last name |
email |
string | The user registered email |
phone |
string | The user registered phone number |
walletAddress |
string | The user wallet address |
defaultCurrency |
string | The user default selected currency |
status |
string | The user status |
trustLevel |
string | The user trust level |
isBlocked |
string | Weather the user is blocked or not |
Register User
Endpoint to register a new user in the platform.
curl --location --request POST 'https://backend.ducapp.net/api/private/users/register' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"appVersion": "0.1",
"language": "EN",
"defaultCurrency": "USD",
"firstName": "John",
"lastName": "Doe",
"phone": "+1-202-555-0106",
"providerValue": "john.doe@test.ducapp.net",
"identityNumber": "035742265",
"street": "Schoenersville Rd",
"houseNumber": "2118",
"city": "PA",
"country": "United States",
"zipcode": "18017",
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAEzCAIAAAAw5mh...",
"source1": {
"url": "https://www.someimage.com/url/passportImage.jpg",
"name": "passportPicture",
"type": "mime/jpg",
"size": "50"
},
"source2": {
"url": "https://www.someimage.com/url/licenceImage.jpg",
"name": "drivingLicence",
"type": "mime/jpg",
"size": "50"
},
"province": "Pennsylvania",
"birthDate": "1984-11-20",
"country_iso_code": "US",
"password": "$2y$10$EiZYJxdFvdTBfY97uTfU1e11U5vAFmxTnAQ5M.d0q8zU9",
"areConditionsAccepted": "true"
}
'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
appVersion: "0.1",
language: "EN",
defaultCurrency: "USD",
firstName: "John",
lastName: "Doe",
phone: "+1-202-555-0106",
providerValue: "john.doe@test.ducapp.net",
identityNumber: "035742265",
street: "Schoenersville Rd",
houseNumber: "2118",
city: "PA",
country: "United States",
zipcode: "18017",
image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAEzCAIAAAAw5mh...",
source1: {
url: "https://www.someimage.com/url/passportImage.jpg",
name: "passportPicture",
type: "mime/jpg",
size: "50",
},
source2: {
url: "https://www.someimage.com/url/licenceImage.jpg",
name: "drivingLicence",
type: "mime/jpg",
size: "50",
},
province: "Pennsylvania",
birthDate: "1984-11-20",
country_iso_code: "US",
password: "$2y$10$EiZYJxdFvdTBfY97uTfU1e11U5vAFmxTnAQ5M.d0q8zU9",
areConditionsAccepted: "true",
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch("https://backend.ducapp.net/api/private/users/register", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
import requests
import json
url = "https://backend.ducapp.net/api/private/users/register"
payload = json.dumps({
"appVersion": "0.1",
"language": "EN",
"defaultCurrency": "USD",
"firstName": "John",
"lastName": "Doe",
"phone": "+1-202-555-0106",
"providerValue": "john.doe@test.ducapp.net",
"identityNumber": "035742265",
"street": "Schoenersville Rd",
"houseNumber": "2118",
"city": "PA",
"country": "United States",
"zipcode": "18017",
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAEzCAIAAAAw5mh...",
"source1": {
"url": "https://www.someimage.com/url/passportImage.jpg",
"name": "passportPicture",
"type": "mime/jpg",
"size": "50"
},
"source2": {
"url": "https://www.someimage.com/url/licenceImage.jpg",
"name": "drivingLicence",
"type": "mime/jpg",
"size": "50"
},
"province": "Pennsylvania",
"birthDate": "1984-11-20",
"country_iso_code": "US",
"password": "$2y$10$EiZYJxdFvdTBfY97uTfU1e11U5vAFmxTnAQ5M.d0q8zU9",
"areConditionsAccepted": "true"
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Example Response:
{
"user": {
"connected": false,
"deleted": false,
"loginFailCount": 0,
"blockedUntil": null,
"disabled": false,
"isBlocked": false,
"validatedUser": false,
"isBusinessType": false,
"firstLoginRequired": true,
"changePasswordRequired": false,
"twofAuthEnabled": false,
"registeredUser": false,
"defaultCurrency": "USD",
"language": "EN",
"allowFaceRecognition": true,
"needKYCVerification": false,
"verified": false,
"userWasUpdate": false,
"trustLevel": 0,
"transactionCount": 0,
"beneficiaries": [],
"requestOTPCount": 0,
"_id": "63c97c15ec25226662f661ed",
"firstName": "John",
"lastName": "Doe",
"phone": "+1-202-555-0106",
"identityNumber": "035742265",
"street": "Schoenersville Rd",
"houseNumber": "2118",
"city": "PA",
"country": "United States",
"zipcode": "18017",
"birthDate": "1984-11-20T00:00:00.000Z",
"email": "john.doe@test.ducapp.net",
"activationCode": "519260",
"status": "Pending",
"walletAddress": "0x714A084613d73465844260bE9f6352CfB00e7aEe",
"reviews": [],
"createdAt": "2023-01-19T17:21:25.829Z",
"updatedAt": "2023-01-19T17:21:25.829Z",
"nameFull": "John Doe",
"fullNameShort": "John D.",
"fullNameLong": "John Doe",
"fullName": "John Doe",
"score": 3,
"id": "63c97c15ec25226662f661ed"
}
}
Request
POST /api/private/users/register
Host: backend.ducapp.net
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
appVersion |
string | Allowed version to interact with the platform |
language |
string | The preferred user language |
defaultCurrency |
string | The preferred user currency |
providerValue |
string | The user email |
password |
string | The user password |
firstName |
string | The user firstName |
lastName |
string | The user lastName |
phone |
string | The user phone number |
birthDate |
string | The user birthdate |
identityNumber |
string | The user identity number |
houseNumber |
string | The user identity house number |
street |
string | The user street name |
city |
string | The user city name |
zipcode |
string | The user zipcode number |
province |
string | The user province name |
country |
string | The user country name |
country_iso_code |
string | The user country ISO code in alpha2 format |
areConditionsAccepted |
string | The user agreement to use his data for verification purpose |
source1 |
{Image} |
The user passport picture |
source2 |
{Image} |
The user driving license picture |
image |
base64 string image | The user pattern picture |
Image
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Url to access the image asset |
name |
string | Name of the image asset |
type |
string | Type of the image asset (mime/jpg) |
size |
string | Size of the image asset |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
user |
Object | The user info |
Verify User
This endpoint could be used to verify user's email or phone number and change the user status to Activated
.
import requests
import json
url = "https://backend.ducapp.net/api/private/users/verify"
payload = json.dumps({
"userID": "61c0da6a7623905113d7683e",
"activationCode": "162660"
})
headers = {
'x-api-key': `<YOUR_API_KEY>`,
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/users/verify' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"userID": "61c0da6a7623905113d7683e",
"activationCode": "162660"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
userID: "61c0da6a7623905113d7683e",
activationCode: "162660",
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch("https://backend.ducapp.net/api/private/users/verify", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response:
{
"validatedUser": true,
"message": "Your account has been validated. Welcome to DUC App!!!"
}
Request
POST /api/private/users/verify
Host: backend.ducapp.net
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
userID |
string | Id of the user to be activated |
activationCode |
string | Code send to the user phone or email |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
validatedUser |
boolean | Indicates if the user has been validated or not |
message |
string | Description of the response |
Update User
Endpoint to update the authenticated user data.
import requests
import json
url = "https://backend.ducapp.net/api/private/users/update"
payload = json.dumps({
"image": "data:image/png;base64,iVBORw0KGgoAAAANS...",
"firstName": "Jane"
})
headers = {
'x-api-key': `<YOUR_API_KEY>`,
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
curl --location --request PATCH 'https://backend.ducapp.net/api/private/users/verify' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"image": "data:image/png;base64,iVBORw0KGgoAAAANS...",
"firstName": "Jane"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
image: "data:image/png;base64,iVBORw0KGgoAAAANS...",
firstName: "Jane",
});
var requestOptions = {
method: "PATCH",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch("https://backend.ducapp.net/api/private/users/verify", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response:
{
"user": {
"connected": false,
"deleted": false,
"loginFailCount": 0,
"blockedUntil": null,
"disabled": false,
"isBlocked": false,
"validatedUser": true,
"isBusinessType": false,
"firstLoginRequired": true,
"changePasswordRequired": false,
"twofAuthEnabled": false,
"registeredUser": false,
"defaultCurrency": "USD",
"language": "EN",
"allowFaceRecognition": true,
"needKYCVerification": false,
"verified": false,
"userWasUpdate": true,
"trustLevel": 1,
"transactionCount": 0,
"beneficiaries": [],
"requestOTPCount": 0,
"_id": "63c97c15ec25226662f661ed",
"firstName": "Jane",
"lastName": "Doe",
"phone": "+1-202-555-0106",
"identityNumber": "035742265",
"street": "Schoenersville Rd",
"houseNumber": "2118",
"city": "PA",
"country": "United States",
"zipcode": "18017",
"birthDate": "1984-11-20T00:00:00.000Z",
"email": "john.doe@test.ducapp.net",
"activationCode": null,
"status": "Activated",
"walletAddress": "0x714A084613d73465844260bE9f6352CfB00e7aEe",
"reviews": [],
"createdAt": "2023-01-19T17:21:25.829Z",
"updatedAt": "2023-01-19T17:40:37.528Z",
"nameFull": "Jane Doe",
"kyc": {
"RecordStatus": "nomatch",
"consultedAt": "2023-01-19T17:21:41.170Z",
"transactionID": "1b983b75-571a-4ef5-806c-c194ea31c5cd",
"gatheredInfo": "{\"PersonInfo\":{\"FirstGivenName\":\"John\",\"FirstSurName\":\"Doe\",\"DayOfBirth\":21,\"MonthOfBirth\":11,\"YearOfBirth\":1984},\"Location\":{\"BuildingNumber\":\"2118\",\"StreetName\":\"Schoenersville Rd\",\"City\":\"PA\",\"StateProvinceCode\":\"Pennsylvania\",\"PostalCode\":\"18017\"}}"
},
"lastLoginAt": "2023-01-19T17:39:47.916Z",
"fullNameShort": "Jane D.",
"fullNameLong": "Jane Doe",
"fullName": "Jane Doe",
"score": 3,
"id": "63c97c15ec25226662f661ed"
}
}
Request
PATCH /api/private/users/update
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
firstName |
string | The user firstName |
lastName |
string | The user lastName |
phone |
string | The user phone number |
birthDate |
string | The user birthDate |
identityNumber |
string | The user identity number |
houseNumber |
string | The user identity house number |
street |
string | The user street name |
city |
string | The user city name |
zipcode |
string | The user zipcode number |
province |
string | The user province name |
country |
string | The user country name |
country_iso_code |
string | The user country ISO code in alpha2 format |
source1 |
{image} |
The user passport picture |
source2 |
{image} |
The user driving license picture |
image |
base64 string image | The user pattern picture |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
user |
Object | The user info |
Get User
Endpoint to get the authenticated user data.
import requests
import json
url = "https://backend.ducapp.net/api/private/users"
payload = json.dumps({})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/users' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: "POST",
headers: myHeaders,
redirect: "follow",
};
fetch("https://backend.ducapp.net/api/private/users/", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response:
{
"user": {
"connected": false,
"deleted": false,
"loginFailCount": 0,
"blockedUntil": null,
"disabled": false,
"isBlocked": false,
"validatedUser": true,
"isBusinessType": false,
"firstLoginRequired": true,
"changePasswordRequired": false,
"twofAuthEnabled": false,
"registeredUser": false,
"defaultCurrency": "USD",
"language": "EN",
"allowFaceRecognition": true,
"needKYCVerification": false,
"verified": false,
"userWasUpdate": true,
"trustLevel": 1,
"transactionCount": 0,
"beneficiaries": [],
"requestOTPCount": 0,
"_id": "63c97c15ec25226662f661ed",
"firstName": "Jane",
"lastName": "Doe",
"phone": "+1-202-555-0106",
"identityNumber": "035742265",
"street": "Schoenersville Rd",
"houseNumber": "2118",
"city": "PA",
"country": "United States",
"zipcode": "18017",
"birthDate": "1984-11-20T00:00:00.000Z",
"email": "john.doe@test.ducapp.net",
"activationCode": null,
"status": "Activated",
"walletAddress": "0x714A084613d73465844260bE9f6352CfB00e7aEe",
"reviews": [],
"createdAt": "2023-01-19T17:21:25.829Z",
"updatedAt": "2023-01-19T17:40:37.528Z",
"nameFull": "Jane Doe",
"kyc": {
"RecordStatus": "nomatch",
"consultedAt": "2023-01-19T17:21:41.170Z",
"transactionID": "1b983b75-571a-4ef5-806c-c194ea31c5cd",
"gatheredInfo": "{\"PersonInfo\":{\"FirstGivenName\":\"John\",\"FirstSurName\":\"Doe\",\"DayOfBirth\":21,\"MonthOfBirth\":11,\"YearOfBirth\":1984},\"Location\":{\"BuildingNumber\":\"2118\",\"StreetName\":\"Schoenersville Rd\",\"City\":\"PA\",\"StateProvinceCode\":\"Pennsylvania\",\"PostalCode\":\"18017\"}}"
},
"lastLoginAt": "2023-01-19T17:39:47.916Z"
}
}
Request
POST /api/private/users
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
user |
Object | The user info |
Get Balance
Endpoint to get the balance of the authenticated user.
import requests
import json
url = "https://backend.ducapp.net/api/private/balance "
payload = json.dumps({})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({});
var requestOptions = {
method: "GET",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch("https://backend.ducapp.net/api/private/balance ", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
curl --location --request GET 'https://backend.ducapp.net/api/private/balance ' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{}'
Example Response:
{
"balance": [
{
"currency": "USD",
"amount": 0
},
{
"currency": "CAD",
"amount": 0
},
{
"currency": "CUP",
"amount": 0
},
{
"currency": "EUR",
"amount": 0
}
]
}
Request
GET /api/private/balance
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
walletAddress |
string | (Optional) Wallet address you want to check |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
balance |
[Account] |
Array of Account with the balance of each coin |
Account
NAME | TYPE | DESCRIPTION |
---|---|---|
currency |
string | Code of the account currency |
amount |
float | Amount of the account |
Gift Card
Create
Endpoint to generate a gift card.
curl --location --request POST 'https://backend.ducapp.net/api/private/cards/create' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"holderName": "Pepito Perez",
"email": "pepito.perez@email.com",
"phone": "+5355555555",
"idNumber": "92051540268"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
holderName: "Pepito Perez",
email: "pepito.perez@email.com",
phone: "+5355555555",
idNumber: "92051540268",
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch("https://backend.ducapp.net/api/private/cards/create", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
import requests
import json
url = "https://backend.ducapp.net/api/private/cards/create"
payload = json.dumps({
"holderName": "Pepito Perez",
"email": "pepito.perez@email.com",
"phone": "+5355555555",
"idNumber": "92051540268"
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Example Response:
{
"record": {
"isExpired": false,
"_id": "65cbef0b5ec3cb655f60196c",
"holder": "Dr. Alfredo Kassulke",
"idNumber": "92051540267",
"email": "pepito.perez@email.com",
"phone": "+5355555556",
"number": "1605661015643626",
"cvv2": "385",
"expiry": {
"month": "01",
"year": "25"
},
"balance": [],
"negativeRetentions": [],
"positiveRetentions": [],
"createdAt": "2024-02-13T22:36:59.775Z",
"updatedAt": "2024-02-13T22:36:59.775Z"
}
}
Request
POST /api/private/cards/create
Host: backend.ducapp.net
x-api-key: <YOUR_API_KEY>
authorization: Bearer <YOUR_ACCESS_TOKEN>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
holderName |
string | (Optional) Gift card holder name |
email |
string | Gift card associated email |
phone |
string | Gift card associated phone number |
idNumber |
string | Gift card associated identification number |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
accessToken |
string | Token to access authenticated endpoints |
error |
string | General error name |
message |
string | Error description |
statusCode |
number | Error code |
Validate
Endpoint to check whether a gift card is valid.
curl --location --request POST 'https://backend.ducapp.net/api/private/cards/validate' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"number": "1261053544885941",
"cvv2": "952"
}
'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
number: "1261053544885941",
cvv2: "952",
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch("https://backend.ducapp.net/api/private/cards/validate", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
import requests
import json
url = "https://backend.ducapp.net/api/private/cards/validate"
payload = json.dumps({
number: '1261053544885941',
cvv2: '952',
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Example Response:
{
"valid": false
}
Request
POST /api/private/cards/validate
Host: backend.ducapp.net
x-api-key: <YOUR_API_KEY>
authorization: Bearer <YOUR_ACCESS_TOKEN>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
id or number |
string | The id or the number of the gift card |
cvv2 |
string | The security code of the gift card |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
valid |
boolean | Whether the provided information is valid or not |
message |
string | Description message |
Credit
This endpoint could be used to add funds to a gift card.
import requests
import json
url = "https://backend.ducapp.net/api/private/cards/credit"
payload = json.dumps({
"number": "1261053544885941",
"currency": "USD",
"amount": 10,
"externalID": "GiftCard-CREDIT-4e604f32-0b33-4631-88ac-2f3e56e3ee15",
"concept": "Try to reboot the SMTP card, maybe it will index the digital matrix!",
"paymentMethod": {
"paymentLink": true
}
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/cards/credit' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"number": "1261053544885941",
"currency": "USD",
"amount": 10,
"externalID": "GiftCard-CREDIT-4e604f32-0b33-4631-88ac-2f3e56e3ee15",
"concept": "Try to reboot the SMTP card, maybe it will index the digital matrix!",
"paymentMethod": {
"paymentLink": true
}
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
number: "1261053544885941",
currency: "USD",
amount: 10,
externalID: "GiftCard-CREDIT--4e604f32-0b33-4631-88ac-2f3e56e3ee15",
concept:
"Try to reboot the SMTP card, maybe it will index the digital matrix!",
paymentMethod: {
paymentLink: true,
},
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch("https://backend.ducapp.net/api/private/cards/credit", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response:
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (john.doe@gmail.com).",
"paymentLink": {
"url": "https://pay.ducapp.com/cnrHRA",
"id": "plink_1OP7d1KHKfW45102zV3baPGa",
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAACcCAYAAACKuMJNAAAABmJLR0QA/wD/AP+gvaeTg=="
}
}
}
Request
POST /api/private/cards/credit
Host: backend.ducapp.net
x-api-key: <YOUR_API_KEY>
authorization: Bearer <YOUR_ACCESS_TOKEN>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
number |
string | Number of the gift card for the funds to be added to |
currency |
CAD, USD, EUR |
Account currency |
amount |
number | Amount to be added |
externalID |
string | A unique identifier to keep track of the state of the associated transaction |
concept |
string | (Optional) Descriptive short sentence of the operation |
paymentMethod |
{Payment Method} |
Payment method information |
Payment Method
NAME | TYPE | DESCRIPTION |
---|---|---|
paymentLink |
{Payment Link} or boolean |
Whether to complete de payment process using a payment link. |
serverToServer |
Server to Server |
Complete the payment process sending credit card information |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
provider |
string | The payment link provider. Could be default or duc to use a DUC platform custom payment link |
redirectUrl |
string | Url to be redirected to after the payment have been completed |
Server to Server
NAME | TYPE | DESCRIPTION |
---|---|---|
number |
string | Credit card number |
expiry_date |
string | Credit card expiry date |
cvc |
string | Credit card security code |
avs_street_name |
string | Credit card address street name |
avs_street_number |
string | Credit card address house number |
avs_zipcode |
string | Credit card address zip code |
name_on_card |
string | Name on card |
email |
string | Credit card associated email |
phone |
string | Credit card associated phone |
location |
string | Location of the credit card owner at the moment of the operation |
Location
NAME | TYPE | DESCRIPTION |
---|---|---|
latitude |
string | Latitude |
longitude |
string | Longitude |
timestamp |
string | Timestamp |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | Status of the request |
payload |
string | Description message |
paymentLink |
Payment Link Response |
Payment link information to complete the payment process |
error |
boolean | General error name |
message |
string | Error description |
statusCode |
string | Error status code |
Payment Link Response
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Url of the payment link |
id |
string | Id of the payment link |
qrCode |
string | QR code associated to the payment link |
Debit
Endpoint to debit funds from a gift card.
import requests
import json
url = "https://backend.ducapp.net/api/private/cards/debit"
payload = json.dumps({
"number": "1374207233653440",
"cvv2": "105",
"amount": 1,
"currency": "USD",
"externalID": "GiftCard-DEBIT-8ea02b91-bb13-4acf-abb5-102541278844"
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/cards/debit' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"number": "1374207233653440",
"cvv2": "105",
"amount": 1,
"currency": "USD",
"externalID": "GiftCard-DEBIT-8ea02b91-bb13-4acf-abb5-102541278844"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
number: "1374207233653440",
cvv2: "105",
amount: 1,
currency: "USD",
externalID: "GiftCard-DEBIT-8ea02b91-bb13-4acf-abb5-102541278844",
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch("https://backend.ducapp.net/api/private/cards/debit", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response:
{
"transactionID": "AA00380689",
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (john.doe@gmail.com)."
}
Request
POST /api/private/cards/debit
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
number |
string | The gift card number |
cvv2 |
string | The gift card security code |
amount |
number | The amount to be debit |
currency |
string | The currency account to be debit from |
externalID |
string | Unique id to keep track of the status changes for the associate transaction |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
transactionID |
string | Transaction id reference |
status |
number | Status of the request |
payload |
string | Description of the response |
Get Balance
Endpoint to get the balance of a gift card.
import requests
import json
url = "https://backend.ducapp.net/api/private/cards/balance/657a05df7c8a8598bf217605"
payload = {}
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow",
};
fetch(
"https://backend.ducapp.net/api/private/cards/balance/657a05df7c8a8598bf217605 ",
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
curl --location --request GET 'https://backend.ducapp.net/api/private/cards/balance/657a05df7c8a8598bf217605 ' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
Example Response:
{
"balance": [
{
"currency": "USD",
"amount": "30.00"
},
{
"currency": "CAD",
"amount": 0
},
{
"currency": "CUP",
"amount": 0
},
{
"currency": "EUR",
"amount": 0
}
],
"negativeRetentions": [
{
"currency": "USD",
"amount": 6
}
],
"positiveRetentions": [
{
"currency": "USD",
"amount": 10
}
]
}
Request
GET /api/private/cards/balance/:id
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
balance |
[Account] |
Array of Account with the balance of each coin |
negativeRetentions |
[Account] |
Array of Account with debit type pending operations of each coin |
positiveRetentions |
[Account] |
Array of Account with add fund type pending operations of each coin |
Account
NAME | TYPE | DESCRIPTION |
---|---|---|
currency |
string | Code of the account currency |
amount |
float | Amount of the account |
List Gift Cards
Endpoint to get the associated gift cards.
import requests
import json
url = "https://backend.ducapp.net/api/private/cards"
payload = json.dumps({})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/cards' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow",
};
fetch("https://backend.ducapp.net/api/private/cards", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response:
{
"data": [
{
"_id": "659880af93331a457c224bbc",
"isExpired": false,
"holder": "Kathleen Ernser PhD",
"number": "1421476434954286",
"cvv2": "799",
"expiry": {
"month": "07",
"year": "25"
},
"balance": [
{
"amount": 32,
"currency": "USD"
},
{
"amount": 0,
"currency": "CAD"
},
{
"amount": 0,
"currency": "CUP"
},
{
"amount": 0,
"currency": "EUR"
}
],
"negativeRetentions": [
{
"amount": 8,
"currency": "USD"
}
],
"positiveRetentions": [
{
"amount": 10,
"currency": "USD"
}
]
}
]
}
Request
GET /api/private/cards
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
data |
[Gift Card] |
Array of gift card object |
Gift Card
NAME | TYPE | DESCRIPTION |
---|---|---|
_id |
string | Gift card identifier |
isExpired |
boolean | Whether the gift card is expired or not |
holder |
string | Gift card holder name |
number |
string | Gift card number |
cvv2 |
string | Gift card security code |
expiry |
{Expiry} |
Gift card expiry date |
balance |
[Account] |
Array of Account with the balance of each coin |
negativeRetentions |
[Account] |
Array of Account with debit type pending operations of each coin |
positiveRetentions |
[Account] |
Array of Account with add fund type pending operations of each coin |
Expiry
NAME | TYPE | DESCRIPTION |
---|---|---|
month |
string | Expiry month |
year |
string | Expiry year two numbers format |
Account
NAME | TYPE | DESCRIPTION |
---|---|---|
currency |
string | Code of the account currency |
amount |
float | Amount of the account |
Expire
Endpoint to expire a gift card.
import requests
import json
url = "https://backend.ducapp.net/api/private/cards/expire/657a05df7c8a8598bf217605"
payload = {}
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: "POST",
headers: myHeaders,
redirect: "follow",
};
fetch(
"https://backend.ducapp.net/api/private/cards/expire/657a05df7c8a8598bf217605 ",
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
curl --location --request POST 'https://backend.ducapp.net/api/private/cards/expire/657a05df7c8a8598bf217605 ' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
Example Response:
{
"success": true,
"message": "Card expired successfully"
}
Request
POST /api/private/cards/expire/:id
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
success |
boolean | Whether the gift card was expired or not |
message |
string | Description message |
Beneficiary
Get Beneficiaries
Endpoint to obtain the user beneficiaries list.
curl --location --request POST 'https://backend.ducapp.net/api/private/users/beneficiary' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/users/beneficiary", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import requests
url = "https://backend.ducapp.net/api/private/users/beneficiary"
payload = {}
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Example Response:
[
{
"isBlocked": false,
"_id": "64a6eb05f9bd31b44b52a244",
"deliveryCI": "43120112345",
"deliveryContact": "Juan",
"deliveryLastName": "Perez",
"deliverySecondLastName": "Cruz",
"deliveryArea": "Matanzas",
"deliveryZone": "Provincias",
"country_iso_code": "CU",
"deliveryCity": "Limonar",
"streetName": "asdf",
"houseNumber": "34",
"zipcode": "54",
"deliveryPhone": "3243434",
"email": "wewe@d.cu",
"country": "Cuba",
"beneficiaryFullName": "Juan Perez Cruz",
"creditCards": [
{
"number": "9227959873502222",
"cardHolderName": "Juan Perez Cruz",
"bankName": "Banco Metropolitano",
"currency": "CUP"
}
]
}
]
Request
POST /api/private/users/beneficiary
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
data | [{Beneficiary} ] |
Array of beneficiary objects |
Beneficiary
NAME | TYPE | DESCRIPTION |
---|---|---|
isBlocked |
string | Wheter the beneficiary is blocked or not |
_id |
string | Beneficiary Id |
deliveryCI |
string | Beneficiary Identification Number |
deliveryContact |
string | Beneficiary Name |
deliveryLastName |
string | Beneficiary Lastname |
deliverySecondLastName |
string | Beneficiary Second Lastname |
deliveryArea |
string | Beneficiary Province |
deliveryZone |
string | Zone to which the province of the beneficiary belongs |
country_iso_code |
string | The ISO code of the country |
deliveryCity |
string | Beneficiary Municipality |
streetName |
string | Beneficiary street name |
houseNumber |
string | Beneficiary house number |
zipcode |
string | Beneficiary zip code |
deliveryPhone |
string | Beneficiary phone number |
email |
string | Beneficiary email |
country |
string | Beneficiary country name |
beneficiaryFullName |
string | Beneficiary full name |
creditCards |
[{Credit Card} ] |
Array of credit card asociated to this beneficiary |
Credit Card
NAME | TYPE | DESCRIPTION |
---|---|---|
number |
string | The credit card numeber |
cardHolderName |
string | The credit card holder name |
bankName |
string | The credit card bank name |
currency |
string | The credit card currency |
Search Beneficiaries by CI
Endpoint to obtain a beneficiary given his identity number.
curl --location --request POST 'https://backend.ducapp.net/api/private/users/beneficiary/92062743322' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/users/beneficiary/92062743322", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import requests
url = "https://backend.ducapp.net/api/private/users/beneficiary/92062743322"
payload = {}
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Example Response:
[
{
"_id": "61a5151e6732e5442b4c482c",
"isBlocked": false,
"deliveryCI": "92062743322",
"deliveryContact": "John",
"deliveryLastName": "Doe",
"deliverySecondLastName": "",
"country_iso_code": "CU",
"country": "Cuba",
"deliveryArea": "Santiago de Cuba",
"deliveryZone": "Provincias",
"deliveryCity": "Songo la Maya",
"streetName": "Main",
"houseNumber": "195",
"zipcode": "80100",
"email": "john.doe@test.com",
"deliveryPhone": "+5358542711",
"beneficiaryFullName": "John Doe",
"creditCards": [
{
"number": "9225959870121891",
"cardHolderName": "Darian Alvarez Tamayo",
"bankName": "Banco Metropolitano",
"currency": "USD"
},
]
}
]
Request
POST /api/private/users/beneficiary/{identifier}
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
data | [{Beneficiary} ] |
Array of beneficiary objects |
Beneficiary
NAME | TYPE | DESCRIPTION |
---|---|---|
isBlocked |
string | Wheter the beneficiary is blocked or not |
_id |
string | Beneficiary Id |
deliveryCI |
string | Beneficiary Identification Number |
deliveryContact |
string | Beneficiary Name |
deliveryLastName |
string | Beneficiary Lastname |
deliverySecondLastName |
string | Beneficiary Second Lastname |
deliveryArea |
string | Beneficiary Province |
deliveryZone |
string | Zone to which the province of the beneficiary belongs |
country_iso_code |
string | The ISO code of the country |
deliveryCity |
string | Beneficiary Municipality |
streetName |
string | Beneficiary street name |
houseNumber |
string | Beneficiary house number |
zipcode |
string | Beneficiary zip code |
deliveryPhone |
string | Beneficiary phone number |
email |
string | Beneficiary email |
country |
string | Beneficiary country name |
beneficiaryFullName |
string | Beneficiary full name |
creditCards |
[{Credit Card} ] |
Array of credit card asociated to this beneficiary |
Credit Card
NAME | TYPE | DESCRIPTION |
---|---|---|
number |
string | The credit card numeber |
cardHolderName |
string | The credit card holder name |
bankName |
string | The credit card bank name |
currency |
string | The credit card currency |
Create beneficiary
Endpoint to create a beneficiary for the authenticated user.
curl --location --request POST 'https://backend.ducapp.net/api/private/users/beneficiary/create' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"identityNumber": "92062743323",
"firstName": "John",
"lastName": "Doe",
"secondLastName": "Doe",
"countryIsoCode": "CU",
"country": "Cuba",
"zone": "Provincias",
"province": "Holguín",
"municipality": "Holguin",
"streetName": "Main",
"houseNumber": "200",
"zipcode": "80100",
"email": "john.doe@test.com",
"phone": "+5357512617"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"identityNumber": "92062743323",
"firstName": "John",
"lastName": "Doe",
"secondLastName": "Doe",
"countryIsoCode": "CU",
"country": "Cuba",
"zone": "Provincias",
"province": "Holguín",
"municipality": "Holguin",
"streetName": "Main",
"houseNumber": "200",
"zipcode": "80100",
"email": "john.doe@test.com",
"phone": "+5357512617"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/users/beneficiary/create", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import requests
import json
url = "https://backend.ducapp.net/api/private/users/beneficiary/9206create2743322"
payload = json.dumps({
"identityNumber": "92062743323",
"firstName": "John",
"lastName": "Doe",
"secondLastName": "Doe",
"countryIsoCode": "CU",
"country": "Cuba",
"zone": "Provincias",
"province": "Holguín",
"municipality": "Holguin",
"streetName": "Main",
"houseNumber": "200",
"zipcode": "80100",
"email": "john.doe@test.com",
"phone": "+5357512617"
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Example Response:
{
"creditCardIds": [],
"isBlocked": false,
"deliveryCI": "92062743329",
"deliveryContact": "John",
"deliveryLastName": "Doe",
"deliverySecondLastName": "Doe",
"deliveryArea": "Holguín",
"deliveryZone": "Provincias",
"country_iso_code": "CU",
"deliveryCity": "Holguin",
"streetName": "Main",
"houseNumber": "200",
"zipcode": "80100",
"deliveryPhone": "+5357512617",
"country": "Cuba",
"email": "john.doe@test.com",
"beneficiaryFullName": "John Doe Doe",
"_id": "64b6e055af1bb56a944098db"
}
Request
POST /api/private/users/beneficiary/create
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
data | {Beneficiary} |
Beneficiary objects |
Beneficiary
NAME | TYPE | DESCRIPTION |
---|---|---|
isBlocked |
string | Wheter the beneficiary is blocked or not |
_id |
string | Beneficiary Id |
deliveryCI |
string | Beneficiary Identification Number |
deliveryContact |
string | Beneficiary Name |
deliveryLastName |
string | Beneficiary Lastname |
deliverySecondLastName |
string | Beneficiary Second Lastname |
deliveryArea |
string | Beneficiary Province |
deliveryZone |
string | Zone to which the province of the beneficiary belongs |
country_iso_code |
string | The ISO code of the country |
deliveryCity |
string | Beneficiary Municipality |
streetName |
string | Beneficiary street name |
houseNumber |
string | Beneficiary house number |
zipcode |
string | Beneficiary zip code |
deliveryPhone |
string | Beneficiary phone number |
email |
string | Beneficiary email |
country |
string | Beneficiary country name |
beneficiaryFullName |
string | Beneficiary full name |
creditCards |
[{Credit Card} ] |
Array of credit card asociated to this beneficiary |
Credit Card
NAME | TYPE | DESCRIPTION |
---|---|---|
number |
string | The credit card numeber |
cardHolderName |
string | The credit card holder name |
bankName |
string | The credit card bank name |
currency |
string | The credit card currency |
Update beneficiary
Endpoint to update a beneficiary given his id.
curl --location --request POST 'https://backend.ducapp.net/api/private/users/beneficiary/update' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"isBlocked": false,
"deliveryCI": "92062743329",
"deliveryContact": "John",
"deliveryLastName": "Doe",
"deliverySecondLastName": "Doe",
"deliveryArea": "Holguín",
"deliveryZone": "Provincias",
"country_iso_code": "CU",
"deliveryCity": "Holguin",
"streetName": "Main",
"houseNumber": "200",
"zipcode": "80100",
"deliveryPhone": "+5357512618",
"country": "Cuba",
"email": "john.doe@test.com",
"beneficiaryFullName": "John Doe Doe",
"_id": "64b6e055af1bb56a944098db"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"isBlocked": false,
"deliveryCI": "92062743329",
"deliveryContact": "John",
"deliveryLastName": "Doe",
"deliverySecondLastName": "Doe",
"deliveryArea": "Holguín",
"deliveryZone": "Provincias",
"country_iso_code": "CU",
"deliveryCity": "Holguin",
"streetName": "Main",
"houseNumber": "200",
"zipcode": "80100",
"deliveryPhone": "+5357512618",
"country": "Cuba",
"email": "john.doe@test.com",
"beneficiaryFullName": "John Doe Doe",
"_id": "64b6e055af1bb56a944098db"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/users/beneficiary/update", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import requests
import json
url = "https://backend.ducapp.net/api/private/users/beneficiary/update"
payload = json.dumps({
"isBlocked": False,
"deliveryCI": "92062743329",
"deliveryContact": "John",
"deliveryLastName": "Doe",
"deliverySecondLastName": "Doe",
"deliveryArea": "Holguín",
"deliveryZone": "Provincias",
"country_iso_code": "CU",
"deliveryCity": "Holguin",
"streetName": "Main",
"houseNumber": "200",
"zipcode": "80100",
"deliveryPhone": "+5357512618",
"country": "Cuba",
"email": "john.doe@test.com",
"beneficiaryFullName": "John Doe Doe",
"_id": "64b6e055af1bb56a944098db"
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Example Response:
{
"creditCardIds": [],
"isBlocked": false,
"_id": "64b6e055af1bb56a944098db",
"deliveryCI": "92062743329",
"deliveryContact": "John",
"deliveryLastName": "Doe",
"deliverySecondLastName": "Doe",
"deliveryArea": "Holguín",
"deliveryZone": "Provincias",
"country_iso_code": "CU",
"deliveryCity": "Holguin",
"streetName": "Main",
"houseNumber": "200",
"zipcode": "80100",
"deliveryPhone": "+5357512618",
"country": "Cuba",
"email": "john.doe@test.com",
"beneficiaryFullName": "John Doe Doe"
}
Request
POST /api/private/users/beneficiary/update
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
data | {Beneficiary} |
Beneficiary objects |
Beneficiary
NAME | TYPE | DESCRIPTION |
---|---|---|
isBlocked |
string | Wheter the beneficiary is blocked or not |
_id |
string | Beneficiary Id |
deliveryCI |
string | Beneficiary Identification Number |
deliveryContact |
string | Beneficiary Name |
deliveryLastName |
string | Beneficiary Lastname |
deliverySecondLastName |
string | Beneficiary Second Lastname |
deliveryArea |
string | Beneficiary Province |
deliveryZone |
string | Zone to which the province of the beneficiary belongs |
country_iso_code |
string | The ISO code of the country |
deliveryCity |
string | Beneficiary Municipality |
streetName |
string | Beneficiary street name |
houseNumber |
string | Beneficiary house number |
zipcode |
string | Beneficiary zip code |
deliveryPhone |
string | Beneficiary phone number |
email |
string | Beneficiary email |
country |
string | Beneficiary country name |
beneficiaryFullName |
string | Beneficiary full name |
creditCards |
[{Credit Card} ] |
Array of credit card asociated to this beneficiary |
Credit Card
NAME | TYPE | DESCRIPTION |
---|---|---|
number |
string | The credit card numeber |
cardHolderName |
string | The credit card holder name |
bankName |
string | The credit card bank name |
currency |
string | The credit card currency |
Add Funds
Credit/Debit Card
Endpoint to add funds using credit/debit card
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/token/buy"
payload = json.dumps({
"amount": 100,
"currency": "USD",
"location": {
"latitude": "-76.25804853625596",
"longitude": "20.888864980079234",
"timestamp": "1635185398"
},
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "Ruben Gonzalez Ramirez",
"expiryDate": "07/29",
"cvc": "123",
"email": "john.doe@test.ducapp.net",
"phone": "+19058025826",
"avs_street_name": "Main Street",
"avs_street_number": "508",
"avs_zipcode": "33186",
"merchant_external_id": "Ext-46562452"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN> ',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/token/buy' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN> ' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 100,
"currency": "USD",
"location": {
"latitude": "-76.25804853625596",
"longitude": "20.888864980079234",
"timestamp": "1635185398"
},
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "Ruben Gonzalez Ramirez",
"expiryDate": "07/29",
"cvc": "123",
"email": "john.doe@test.ducapp.net",
"phone": "+19058025826",
"avs_street_name": "Main Street",
"avs_street_number": "508",
"avs_zipcode": "33186",
"merchant_external_id": "Ext-46562452"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN> ");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
amount: 100,
currency: "USD",
location: {
latitude: "-76.25804853625596",
longitude: "20.888864980079234",
timestamp: "1635185398",
},
creditCardNumber: "5454545454545454",
creditCardHolderName: "Ruben Gonzalez Ramirez",
expiryDate: "07/29",
cvc: "123",
email: "john.doe@test.ducapp.net",
phone: "+19058025826",
avs_street_name: "Main Street",
avs_street_number: "508",
avs_zipcode: "33186",
merchant_external_id: "Ext-46562452",
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch(
"https://backend.ducapp.net/api/private/transactions/token/buy",
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
}
}
Request
POST /api/private/transactions/token/buy
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
amount |
number | The the amount to send buy |
currency |
number | The the currency of the user |
creditCardNumber |
number | Information for payment, credit card number |
creditCardHolderName |
number | Information for payment, name that appears on the credit card |
expiryDate |
number | Information for payment, expiration date |
cvc |
number | Information for payment, cvc |
avs_street_name |
number | Information for payment, street name |
avs_street_number |
number | Information for payment, residence number |
avs_zipcode |
number | Information for payment, zip code |
cardHolderEmail |
number | Information for payment, credit card owner email |
cardHolderPhone |
number | Information for payment, credit card owner phone |
location |
{Location} |
Information on the users GPS location at the time of the transaction |
email |
string | Email of the credit card owner |
phone |
string | Phone number of the credit card owner |
merchant_external_id |
string | External id for the current merchant for this transaction |
Location
NAME | TYPE | DESCRIPTION |
---|---|---|
latitude |
string | Latitude |
longitude |
string | Longitude |
timestamp |
string | Timestamp |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
Email Money Request
Endpoint to add funds via email money request
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/token/emt"
payload = json.dumps({
"amount": 100,
"currency": "CAD",
"concept": "Family Support",
"firstName": "Ruben",
"lastName": "González",
"merchant_external_id": "Ext-4656245235"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN> ',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/token/emt' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN> ' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 100,
"currency": "CAD",
"concept": "Family Support",
"firstName": "Ruben",
"lastName": "González",
"merchant_external_id": "Ext-4656245235"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN> ");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
amount: 100,
currency: "CAD",
concept: "Family Support",
firstName: "Ruben",
lastName: "González",
merchant_external_id: "Ext-4656245235",
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch(
"https://backend.ducapp.net/api/private/transactions/token/emt",
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
}
}
Request
POST /api/private/transactions/token/emt
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
amount |
number | The the amount to send buy |
currency |
CURRENCY |
The the currency of the user (Only CAD ) |
concept |
string | A brief description of the transaction |
firstName |
string | Name of the person the money is requested from |
lastName |
string | Lastname of the person the money is requested from |
merchant_external_id |
string | External id for the current merchant for this transaction |
Currency
CAD |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
Payment Link
Endpoint to add funds via payment link
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/token/createPaymentLink"
payload = json.dumps({
"product": {
"name": "Online Shop",
"description": "Products & Shipping"
},
"amount": 14,
"currency": "USD",
"merchant_external_id": "Payment-Link-{{$randomUUID}}",
"redirectUrl": "https://ducapp.net",
"customize": {
"toWalletAddress": "0x0a300E48AaA17746d15b0Db8185a84B4B72B01Ae",
"price": {
"allowCustomAmount": false,
"minAmount": 13,
"maxAmount": 14
},
"link": {
"provider": "default",
"allowPromoCode": false,
"collectBillingAddress": true,
"collectPhoneNumber": true
}
}
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN> ',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location 'https://backend.ducapp.net/api/private/transactions/token/createPaymentLink' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN> ' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"product": {
"name": "Online Shop",
"description": "Products & Shipping"
},
"amount": 14,
"currency": "USD",
"merchant_external_id": "Payment-Link-{{$randomUUID}}",
"redirectUrl": "https://ducapp.net",
"customize": {
"toWalletAddress": "0x0a300E48AaA17746d15b0Db8185a84B4B72B01Ae",
"price": {
"allowCustomAmount": false,
"minAmount": 13,
"maxAmount": 14
},
"link": {
"provider": "default",
"allowPromoCode": false,
"collectBillingAddress": true,
"collectPhoneNumber": true
}
}
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN> ");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
product: {
name: "Online Shop",
description: "Products & Shipping",
},
amount: 14,
currency: "USD",
merchant_external_id: "Payment-Link-{{$randomUUID}}",
redirectUrl: "https://ducapp.net",
customize: {
toWalletAddress: "0x0a300E48AaA17746d15b0Db8185a84B4B72B01Ae",
price: {
allowCustomAmount: false,
minAmount: 13,
maxAmount: 14,
},
link: {
provider: "default",
allowPromoCode: false,
collectBillingAddress: true,
collectPhoneNumber: true,
},
},
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch(
"https://backend.ducapp.net/api/private/transactions/token/createPaymentLink",
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response
{
"data": {
"status": 200,
"payload": {
"message": "To complete the transaction you must pay using the payment link. A notification will be sent to your email (john.doe@test.ducapp.net) when done.",
"link": "https://pay.ducapp.com/adeWqj",
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAACcCAYAAACKuMJNAAAABmJLR0QA/wD/AP+gvaeTAAAKVUlEQVR4nO3dW2wcVx0G8O/Mend9v6w3iZM6jl3nolx6SQgVoYiC0hQSqiZFqhBUICEeUHmI8oBkqY+8hPCAAKnvSEh94FYQ0KAKEFSIKC0lpA1NSHNxWjtOUl+zttd7m8ND1sY7u/Z4PHP+s2t/P2kfrPXOHu9+PnPm3EZprTWIhFhhF4DWFwaORDFwJIqBI1EMHIli4EgUA0eiGDgSxcCRKAaORDFwJKrO6wuUUibKsSS3oV5neZy/7/d5N14/D7f39/r7Xo8XNK+fF2s4EsXAkSgGjkR5bsM5BT2dzq0N4vV5v202r7/vt03l9fh+j+eV3zYiazgSxcCRKAaORPluwzkF3WYJ+vVe22xe+W2Dej2+dL+hX6zhSBQDR6IYOBIVeBtOmt9+NSe/bULTbcBaX0bMGo5EMXAkioEjUTXfhnPjt9/K7/Gl56dVO9ZwJIqBI1EMHIkKvA1X7f1EptdABN1mDLoNGPb3wxqORDFwJIqBI1G+23Bh9zNV+7pNJ+k2Yth/rxNrOBLFwJEoBo5EeW7Dhd2PY7rfy8n0GgW/7+8U9vfjhjUciWLgSBQDR6KMr0s13U8U9N4gXo/v9n5ej+f175Hud/TbRmQNR6IYOBLFwJGoqhtLNb1XRtCvd/K7h6+T1/KZXtfqt03MGo5ErflVW8lkEkeOHEFPT0/F5wcGBoy+v+nj1xrl9xbkQZ8ygjylnjp1CqdPn0Z9fb2nY1aTsJssTn6/L9/3aQh6fzfT/Vi14NixYzh79mzF5/z+Q4Y9Nss2XBU6efJk2EUwhoGrQgcPHgy7CMZ4bsOFPR1IenpSGGzbRiQSqficdLdR4LeK8hs4N0G30dzMH7/Wg7fSz1n68/WLp1QSxcCRKAaORBlf0+D3IsCrlZTvv2N/w4V7f8R03kYeMaS1QgYaaVth/M5OTAztBewolJUve61SQFM8gk2tcezZ3IwD29rQk2hArM7M/27YewgH3SZc80NblUykh3Bz8h1M5gqYthWmbQszsDFdsHDzgxw+vNSBQj6GSF3W8cryDz9iKWzf2IhnH+vCC5/cjEe6W2BV2eLjarIuA7csBQAaSmso2/mk879Zw7aBq7dT+OHtFF750w186dFN+O7Rfjy+rU2kuLWGbbgFxVrJ1lCF4kO7PVDyyGbzeO2fwzj+o/P4wR+uYSpdfkpe76quhjM92O9GASWh8qT462NTGXzvV5dx/U4KLx/fhW3JxtWXR3jNh9vr/Zan6gIXHg0NCzpfBxQUVPG0WnYW9eDVv3+EXM7Gyyd2YXtXc3BFrWEM3DytYFkF7Hwojiei3YhaUWgrjflTrQIApZAr2BhPZXHj3gzuTM6hYC+fyF+fH0KyJYaB53ahsyVm/M+odgxckbYjgJXH0QMJfKN3F5qjy58GMzkb7304hZ/+dRCvXxjBWMp5RQugWEH+9vwwdm9pwTc/32um8DUk8DUN0us4g1TIxWDn66CsssvTMvGohYP9HTjY34F3B/vw/deu4PV/jVT83bsTafz+7dvY292KJ3YkVlSW+b/b6+frdbBdemyVV6llFLT21jB+tLcdP/nWfrz0TD+illV29ao0cO7KKN78zz1kcgVD5a4NDFyJ1f+3J1vj+M7R7fjKk92LrnLthcdcJod3ro3j8lAqwPLWHgYuQFuTjXjh01txaGcnlP2g43jx4/3BKbx/ayrsYobKdxtOeq+OlfYrhTXv61O7kvjcvg24eH0cc9nS0+fw6AwuDU5gYnozOpqXv2Jd6u+Qno8YdL8na7iAxaMWDvQnsK+nDdC69GFrDI/OYnh0NuxihoaBM6BvUxP6NjbBsnXpQ2uMT81hPJUJu4ihYT+cAcm2eiRbYhWHxqZnc0jN5EIoVXUQX5e6Hu4J39IQxZZEI1rjUaTSpR3C6XQO6czKB/X97rcnvT+eG55SDZifpNkYK++Ty2YLyGTXb18cT6kGaa0BbZdM21RaV5jGuX4wcAZoDcykc0jP5aAcZ6RYnYV4tPKa0/Ug8DUNYe9PFnY/HADcn81iZHQGs7O5+QnEC5piETTG3QO31Fiqaaa/P9ZwBoxNzmFscg6qwtSl1sYoWhqiIZSqOjBwBty8ncLg8P2K3SKdLTF0tsVDKFV1YOACNj2bw1vv3cXl6xOL2m/zp0ege2MTHtrQFFr5wiZ+z3vTc/TD7od769JdnLs4gkIuX3Y1urWrGXv7OtDqMo4KrP5zkl43zHWpIbp6axK/fOMa3r0yWrHrY09fAnseXtkEzLWKgSuhVj0l7ubQfbzy6kWcfXOwYtiaG6P4xO4N2Nnb7quEtY6BW0xpIKKhnJ1nLv587iP8+GcXcOmDsf+HzXGIQ4904cn9m1EXWd+DO8bv0+A2h97rvaKM9cMpDSuWh7Js6HwEWKKrTGuNdKaAoZEU/vHvEfzuLzdw6eoocnl7yRGE7q4WfOEzPdi3o9NbmVYh6LHToOfDsYYrUhEbsC38/De38Iu334ClAMSzQHF9w/znnskUMJXKID2XX6jEFCoMShe/mPpYBM8ffhhHn+oT+CuqHwO3iNYKqXQaUx9/DJ2NwootP6tjccjK/u+1RkQpPP/Mdnz1ud1orOdHDTBwZdTCRja6fKRg8dml7KnSQfl4LIKvndiDb7/4OBLttXufiKCF3g/nt80Q/F4jxaDZFfYWcTn0fEl6t7bhpa/vx7NH+ld9kbDasdSg16WyH86wB/PWHqxB8LSZjQYS7fU4/sUdePHLe7F1S6u5Qtaw9Rk4paGs4gMPTodQxYUuSi/M8FhJDdfaEsfuHZ14+qk+PP3ZXmzeyE1rlrMuA9fVtAePJU5gztbIoQ5ZWyGrNDJaIXdoE+yuLVCFCBApnZmrNRCJWGior0Oiox59Pe3o7+1Aa8v6HYz3yvfN3coOGHAbbLX3dA97TNWvapjXt7gcS+H9UqmqMXAkioEjUb7XpTqZ7ldbizdzq2Sl+8MF/X34fT83rOFIFANHohg4EhV4P1zZGxgeC3STTqfR0NDg6TVrWdh7s6z5wCWTSRw+fBi9vb1IJBIYGBgoef7MmTMlPzufd+P2eufzTl7fzy8GziHwW14bvuoN+irStLDLwzYciQq8H86rsOfD+f2PNt2PZXpvEem9YljDkSgGjkQxcCTK+FVq0IJuU4R9FSzdZjXdBnfDGo5EMXAkioEjUaH3w7nxu27S6/Gke+KDPp7pfknOh6OawsCRKAaORInfL9VN0HsA+52t4lXYe6NU2/fhxBqORDFwJIqBI1GBb2Zjus1kuh/M9NinV26vD3u+nFes4UgUA0eiGDgSVfMbEvrdw9ZrGynoPXRNr2oLemzZb5uONRyJYuBIFANHomquDed3Xaffe395fT+noN8/6PmCftu0bljDkSgGjkQxcCTK87pU03vsVtvx/e6h65X0fD7pPZNZw5EoBo5EMXAkyvg9700zPd/M9DrWoNuIpu+zwH44qikMHIli4EhUze0PR7WNNRyJYuBIFANHohg4EsXAkSgGjkQxcCSKgSNRDByJYuBIFANHov4Hx3sQqVPmp/gAAAAASUVORK5CYII="
}
}
}
Request
POST api/private/transactions/token/createPaymentLink
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
product |
{PRODUCT} |
The product to be paid for |
amount |
number | The amount to pay for the product |
currency |
CURRENCY |
The currency |
merchant_external_id |
string | Merchant External ID |
redirectUrl |
string | Redirect url when the payment is completed |
customize |
{CUSTOMIZE} |
Object to apply some level of customizations to the payment link |
Product
NAME | TYPE | DESCRIPTION |
---|---|---|
name |
string | The name of the product |
description |
string | A brief description of the product |
Currency
CAD |
USD |
EUR |
Customize
NAME | TYPE | DESCRIPTION |
---|---|---|
toWalletAddress |
string | Wallet address to add the funds to |
price |
{PRICE} |
Object to configure the product price |
link |
{LINK} |
Object to configure the product link |
Price
NAME | TYPE | DESCRIPTION |
---|---|---|
allowCustomAmount |
boolean | Whether to allow a custom amount or not |
minAmount |
number | Minimum amount (Only effective if allowCustomAmount is true ) |
maxAmount |
number | Maximum amount (Only effective if allowCustomAmount is true ) |
Link
NAME | TYPE | DESCRIPTION |
---|---|---|
provider |
string | The payment link provider. Could be default or duc to use a DUC platform custom payment link |
allowPromoCode |
boolean | Whether to allow a promo code or not |
collectBillingAddress |
boolean | Whether to collect the customer billing address or not |
collectPhoneNumber |
boolean | Whether to collect the customer phone number or not |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
{PAYLOAD} |
Corresponding message |
Payload
NAME | TYPE | DESCRIPTION |
---|---|---|
message |
string | A brief instruction to follow |
link |
string | The payment link to complete the transaction |
qrCode |
string (base64 ) |
The QRCode (base64 image) for payment link |
Payment Link
P2P Transfer
Endpoint to send money to internal users of the platform.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/token/p2p"
payload = json.dumps({
"toAddress": "0x14A205B953359F24F41B9b029ee62dc791A07F50",
"amount": 100,
"currency": "USD",
"concept": "Testing 4",
"paymentLink": true,
"redirectUrl": "https://ducapp.net",
"externalID": "Ext-2adfdf5245339"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/token/p2p' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"toAddress": "0x14A205B953359F24F41B9b029ee62dc791A07F50",
"amount": 100,
"currency": "USD",
"concept": "Testing 4",
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"externalID": "Ext-2adfdf5245339"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"toAddress": "0x14A205B953359F24F41B9b029ee62dc791A07F50",
"amount": 100,
"currency": "USD",
"concept": "Testing 4",
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"externalID": "Ext-2adfdf5245339"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/token/p2p", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (darian.alvarez.t@gmail.com).",
"paymentLink": {
"url": "https://pay.ducapp.com/JdxGxk",
"id": "plink_1MtBG0KHKfW45102wDSphKTh"
}
}
Request
POST /api/private/transactions/token/p2p
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
toAddress |
string | The receiver wallet address |
amount |
number | The the amount to send |
currency |
string | The the currency of the user |
concept |
string | A brief description |
merchant_external_id |
string | External id for the current merchant for this transaction |
redirectUrl |
string | Redirect url when the payment is completed |
paymentLink |
boolean | Whether to create a payment link or not, to complete the payment |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
Top up
Endpoint to send mobile recharge to one or multiple phone numbers.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/topup/send"
payload = json.dumps({
"product": 500,
"productId": "0",
"salePrice": 27.02,
"operatorId": 3645,
"receiverName": "Juan Perez",
"destinations": [
"+5352552615",
"+5356580949"
],
"currency": "CAD",
"scheduled": false,
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"externalID": "Ext-546sdfsdf636"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/topup/send' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"product": 500,
"productId": "0",
"salePrice": 27.02,
"operatorId": 3645,
"receiverName": "Juan Perez",
"destinations": [
"+5352552615",
"+5356580949"
],
"currency": "CAD",
"scheduled": false,
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"externalID": "Ext-546sdfsdf636"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"product": 500,
"productId": "0",
"salePrice": 27.02,
"operatorId": 3645,
"receiverName": "Juan Perez",
"destinations": [
"+5352552615",
"+5356580949"
],
"currency": "CAD",
"scheduled": false,
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"externalID": "Ext-546sdfsdf636"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/topup/send", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (darian.alvarez.t@gmail.com).",
"paymentLink": {
"url": "https://pay.ducapp.com/oWGZyE",
"id": "plink_1MtBKuKHKfW45102BmBLbrjV"
}
}
}
Request
POST /api/private/transactions/topup/send
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
product |
string | The product name |
productId |
string | The product id |
salePrice |
number | The sale price of the product |
operatorId |
string | The operator id of the product |
receiverName |
string | The name of the receiver person |
destinations |
[string] |
An array of phone numbers |
currency |
string | The account currency to be used |
scheduled |
boolean | (Optional) To indicate that the top up will be scheduled |
posted_date |
string | (Optional) Date for the top up to be processed (scheduled needs to be true ) |
merchant_external_id |
string | External id for the current merchant for this transaction |
redirectUrl |
string | Redirect url when the payment is completed |
paymentLink |
boolean | Whether to create a payment link or not, to complete the payment |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
Confirm Quotation
Endpoint to confirm a previously requested transaction.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/cash-out/confirm-send"
payload = json.dumps({
"quotation_id": "33904512",
"external_id": "AA00376852",
"credit_party_identifier": {
"msisdn": "488404618693"
},
"sender": {
"lastname": "Gonzalez Ramirez",
"firstname": "Ruben",
"date_of_birth": "1992-06-27",
"country_iso_code": "CAN"
},
"beneficiary": {
"lastname": "Barboza",
"firstname": "Lewis"
},
"sending_business": {},
"receiving_business": {},
"totalAmount": "103.18",
"currency": "USD",
"country_iso_code": "NPL",
"service_id": "1",
"payer_id": "467",
"amount": 100,
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"merchant_external_id": "Ext-125678899987779"
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/confirm-send' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"quotation_id": "33904512",
"external_id": "AA00376852",
"credit_party_identifier": {
"msisdn": "488404618693"
},
"sender": {
"lastname": "Gonzalez Ramirez",
"firstname": "Ruben",
"date_of_birth": "1992-06-27",
"country_iso_code": "CAN"
},
"beneficiary": {
"lastname": "Barboza",
"firstname": "Lewis"
},
"sending_business": {},
"receiving_business": {},
"totalAmount": "103.18",
"currency": "USD",
"country_iso_code": "NPL",
"service_id": "1",
"payer_id": "467",
"amount": 100,
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"merchant_external_id": "Ext-125678899987779"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"quotation_id": "33904512",
"external_id": "AA00376852",
"credit_party_identifier": {
"msisdn": "488404618693"
},
"sender": {
"lastname": "Gonzalez Ramirez",
"firstname": "Ruben",
"date_of_birth": "1992-06-27",
"country_iso_code": "CAN"
},
"beneficiary": {
"lastname": "Barboza",
"firstname": "Lewis"
},
"sending_business": {},
"receiving_business": {},
"totalAmount": "103.18",
"currency": "USD",
"country_iso_code": "NPL",
"service_id": "1",
"payer_id": "467",
"amount": 100,
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"merchant_external_id": "Ext-125678899987779"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/confirm-send", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (darian.alvarez.t@gmail.com).",
"paymentLink": {
"url": "https://pay.ducapp.com/gXroOw",
"id": "plink_1MtBSCKHKfW45102wM0kXoOP"
}
}
}
Request
POST /api/private/transactions/cash-out/confirm-send
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
quotation_id |
string | The id of the requested quotation |
external_id |
object | The external id of the requested quotation |
credit_party_identifier |
string | Dynamic fields to be completed by the user |
sender |
string | Dynamic fields to be completed by the user (Only for C2C transactions type) |
beneficiary |
string | Dynamic fields to be completed by the user (Only for C2C transactions type) |
sending_business |
string | Dynamic fields to be completed by the user (Only for B2B transactions type) |
receiving_business |
string | Dynamic fields to be completed by the user (Only for B2B transactions type) |
totalAmount |
string | The total amount to be paid by the user with the fee included |
currency |
string | The user's currency |
country_iso_code |
string | The ISO code of the country to send money to |
service_id |
string | The Id of the service of the selected country |
payer_id |
string | The Id of the payer of the selected service |
amount |
string | The amount entered by the user |
merchant_external_id |
string | External id for the current merchant for this transaction |
redirectUrl |
string | Redirect url when the payment is completed |
paymentLink |
boolean | Whether to create a payment link or not, to complete the payment |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
Email Money Transfer
Endpoint to send money via email address.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/cash-out/email"
payload = json.dumps({
"amount": 100,
"currency": "EUR",
"concept": "Testing",
"emailToSend": "testing2@gmail.com",
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"merchant_external_id": "Ext-13sdsf45435sgfh41"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"amount": 100,
"currency": "EUR",
"concept": "Testing",
"emailToSend": "testing2@gmail.com",
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"merchant_external_id": "Ext-13sdsf45435sgfh41"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/email", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/email' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 100,
"currency": "EUR",
"concept": "Testing",
"emailToSend": "testing2@gmail.com",
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"merchant_external_id": "Ext-13sdsf45435sgfh41"
}'
Example Response:
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (darian.alvarez.t@gmail.com).",
"paymentLink": {
"url": "https://pay.ducapp.com/StldYg",
"id": "plink_1MtBZ8KHKfW45102fdDcV2mD"
}
}
}
Request
POST /api/private/transactions/cash-out/email
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
emailToSend |
string | The destination email |
amount |
number | The the amount to send |
currency |
string | The the currency of the user |
concept |
string | A brief description |
redirectUrl |
string | Redirect url when the payment is completed |
paymentLink |
boolean | Whether to create a payment link or not, to complete the payment |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
Home Delivery
Endpoint to send home delivery money.
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"service": "deliveryEUR",
"amount": 112,
"currency": "USD",
"concept": "TRAVEL",
"deliveryAmount": 92,
"deliveryAddress": "principal calle 5 test",
"deliveryFirstName": "test uno",
"deliveryID": "25736757",
"deliveryPhone": "+53555555",
"deliveryArea": "La Habana",
"deliveryCity": "La Lisa",
"deliveryZona": "Habana",
"deliveryCountry": "Cuba",
"deliveryCurrency": "EUR",
"deliveryCountryCode": "CU",
"deliveryLastName": "test dos",
"deliverySecondLastName": "test tres",
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"merchant_external_id": "SM59sdfdf41499"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/delivery", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/cash-out/delivery"
payload = json.dumps({
"service": "deliveryEUR",
"amount": 112,
"currency": "USD",
"concept": "TRAVEL",
"deliveryAmount": 92,
"deliveryAddress": "principal calle 5 test",
"deliveryFirstName": "test uno",
"deliveryID": "25736757",
"deliveryPhone": "+53555555",
"deliveryArea": "La Habana",
"deliveryCity": "La Lisa",
"deliveryZona": "Habana",
"deliveryCountry": "Cuba",
"deliveryCurrency": "EUR",
"deliveryCountryCode": "CU",
"deliveryLastName": "test dos",
"deliverySecondLastName": "test tres",
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"merchant_external_id": "SM59sdfdf41499"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/delivery' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "deliveryEUR",
"amount": 112,
"currency": "USD",
"concept": "TRAVEL",
"deliveryAmount": 92,
"deliveryAddress": "principal calle 5 test",
"deliveryFirstName": "test uno",
"deliveryID": "25736757",
"deliveryPhone": "+53555555",
"deliveryArea": "La Habana",
"deliveryCity": "La Lisa",
"deliveryZona": "Habana",
"deliveryCountry": "Cuba",
"deliveryCurrency": "EUR",
"deliveryCountryCode": "CU",
"deliveryLastName": "test dos",
"deliverySecondLastName": "test tres",
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"merchant_external_id": "SM59sdfdf41499"
}'
Example Response:
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (darian.alvarez.t@gmail.com).",
"paymentLink": {
"url": "https://pay.ducapp.com/FsMvOH",
"id": "plink_1MtBc9KHKfW45102BIWlGSJ7"
}
}
}
Request
POST /api/private/transactions/cash-out/delivery
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
service |
SERVICES |
The service identifier |
amount |
number | The the amount to send |
currency |
string | The the currency of the user |
concept |
string | A brief description |
deliveryFirstName |
string | The beneficiary's first name |
deliveryLastName |
string | The beneficiary's lastname |
deliverySecondLastName |
string | The beneficiary's second lastname |
deliveryID |
string | The beneficiary's identification number |
deliveryPhone |
string | The beneficiary's phone number |
deliveryCountry |
string | The beneficiary's country |
deliveryCountryCode |
string | The beneficiary's country ISO code in alpha2 format |
deliveryArea |
string | The beneficiary's province (Defined in Get Regions endpoint response ) |
deliveryCity |
string | The beneficiary's municipality (Defined in Get Regions endpoint response ) |
deliveryZone |
string | The beneficiary's zone (Defined in Get Zones endpoint response ) |
deliveryAddress |
string | The beneficiary's address |
deliveryCurrency |
string | The beneficiary's currency |
deliveryAmount |
string | The amount to receive by the beneficiary |
senderName |
string | The name of the person who send the transaction |
senderLastName |
string | The lastname of the person who send the transaction |
senderDocumentType |
DOCUMENT TYPE |
The type of document of identification of the person who send the transaction |
senderDocumentNumber |
string | The identification number of the person who send the transaction |
senderNationalityCountry |
string | The nationality of the person who send the transaction in format ISO 3166 alpha3 |
senderBirthdate |
string | The birthdate of the person who send the transaction in format (yyyy-MM-dd) |
senderBirthCountry |
string | The birth country of the person who send the transaction in format ISO 3166 alpha3 |
senderSex |
GENDER |
The gender of the person who send the transaction |
senderAddress |
string | The address of the person who send the transaction |
senderCity |
string | The city name of the person who send the transaction |
senderPostalCode |
string | The postal code of the person who send the transaction |
senderProvince |
string | The province of the person who send the transaction |
senderCountry |
string | The resident country of the person who send the transaction in format ISO 3166 alpha3 |
receiverCity |
string | The city name of the person who receive the transaction |
receiverPhone2 |
string | Alternative phone number of the person who receive the transaction. Only if have a contactPhone and it's a different number |
receiverCountry |
string | The country of the person who receive the transaction in format ISO 3166 alpha3 |
merchant_external_id |
string | External id for the current merchant for this transaction |
redirectUrl |
string | Redirect url when the payment is completed |
paymentLink |
boolean | Whether to create a payment link or not, to complete the payment |
Services
deliveryCUP |
deliveryUSD |
deliveryEUR |
Document Type
NAME | DESCRIPTION |
---|---|
PAS |
Passport |
RES |
National ID |
OTH |
Others |
EUI |
Resident card |
CED |
Cédula |
DRV |
Drive Licence |
Gender
M |
F |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
Credit Card
Endpoint to Send money to MLC/CUP cuban cards.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/cash-out/creditcard"
payload = json.dumps({
"cardNumber": "9225 1299 7929 0027",
"cardHolderName": "Deicy Johana Morales Cadavid",
"bankName": "BPA",
"contactPhone": "005353129327",
"service": "cardUSD",
"amount": 374.0,
"currency": "USD",
"concept": "Economic assistance",
"deliveryAmount": "350",
"deliveryCurrency": "USD",
"deliveryAddress": "Cll 48A #103BB31 23 , ESMERALDA, CAMAGUEY, Cuba",
"deliveryCountry": "Cuba",
"deliveryCountryCode": "CU",
"senderName": "Juan ",
"senderLastName": "Kiros ",
"senderDocumentType": "RES",
"senderDocumentNumber": "785487487968",
"senderNationalityCountry": "CAN",
"senderBirthdate": "1989-12-08",
"senderBirthCountry": "AGO",
"senderSex": "M",
"senderAddress": "Cll 48A #103BB31 678 , Edmonton, Alberta, Canada",
"senderCountry": "CAN",
"senderProvince": "Alberta",
"senderCity": "Edmonton",
"senderPostalCode": "050032",
"receiverCity": "ESMERALDA",
"receiverCountry": "CUB",
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"merchant_external_id": "10171340fdfe42015"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/creditcard' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"cardNumber": "9225 1299 7929 0027",
"cardHolderName": "Deicy Johana Morales Cadavid",
"bankName": "BPA",
"contactPhone": "005353129327",
"service": "cardUSD",
"amount": 374.0,
"currency": "USD",
"concept": "Economic assistance",
"deliveryAmount": "350",
"deliveryCurrency": "USD",
"deliveryAddress": "Cll 48A #103BB31 23 , ESMERALDA, CAMAGUEY, Cuba",
"deliveryCountry": "Cuba",
"deliveryCountryCode": "CU",
"senderName": "Juan ",
"senderLastName": "Kiros ",
"senderDocumentType": "RES",
"senderDocumentNumber": "785487487968",
"senderNationalityCountry": "CAN",
"senderBirthdate": "1989-12-08",
"senderBirthCountry": "AGO",
"senderSex": "M",
"senderAddress": "Cll 48A #103BB31 678 , Edmonton, Alberta, Canada",
"senderCountry": "CAN",
"senderProvince": "Alberta",
"senderCity": "Edmonton",
"senderPostalCode": "050032",
"receiverCity": "ESMERALDA",
"receiverCountry": "CUB",
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"merchant_external_id": "10171340fdfe42015"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"cardNumber": "9225 1299 7929 0027",
"cardHolderName": "Deicy Johana Morales Cadavid",
"bankName": "BPA",
"contactPhone": "005353129327",
"service": "cardUSD",
"amount": 374.0,
"currency": "USD",
"concept": "Economic assistance",
"deliveryAmount": "350",
"deliveryCurrency": "USD",
"deliveryAddress": "Cll 48A #103BB31 23 , ESMERALDA, CAMAGUEY, Cuba",
"deliveryCountry": "Cuba",
"deliveryCountryCode": "CU",
"senderName": "Juan ",
"senderLastName": "Kiros ",
"senderDocumentType": "RES",
"senderDocumentNumber": "785487487968",
"senderNationalityCountry": "CAN",
"senderBirthdate": "1989-12-08",
"senderBirthCountry": "AGO",
"senderSex": "M",
"senderAddress": "Cll 48A #103BB31 678 , Edmonton, Alberta, Canada",
"senderCountry": "CAN",
"senderProvince": "Alberta",
"senderCity": "Edmonton",
"senderPostalCode": "050032",
"receiverCity": "ESMERALDA",
"receiverCountry": "CUB",
"redirectUrl": "https://ducapp.net",
"paymentLink": true,
"merchant_external_id": "10171340fdfe42015"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/creditcard", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (darian.alvarez.t@gmail.com).",
"paymentLink": {
"url": "https://pay.ducapp.com/jqseQF",
"id": "plink_1MtBfLKHKfW45102ky6GWtQO"
}
}
}
Request
POST /api/private/transactions/cash-out/creditcard
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
service |
SERVICES |
The service identifier |
amount |
number | The the amount to send (Calculated Fee included) |
currency |
string | The the currency of the user |
concept |
string | A brief description |
cardNumber |
string | The beneficiary card number |
cardHolderName |
string | The beneficiary card name |
bankName |
string | The beneficiary bank name |
contactPhone |
string | The beneficiary phone number |
deliveryCurrency |
string | The beneficiary card currency |
deliveryCountry |
string | The beneficiary country |
deliveryAmount |
string | The amount to receive by the beneficiary |
deliveryAddress |
string | The beneficiarys address |
deliveryCountryCode |
string | The beneficiary alpha2 country iso code |
senderName |
string | The name of the person who send the transaction |
senderLastName |
string | The lastname of the person who send the transaction |
senderDocumentType |
DOCUMENT TYPE |
The type of document of identification of the person who send the transaction |
senderDocumentNumber |
string | The identification number of the person who send the transaction |
senderNationalityCountry |
string | The nationality of the person who send the transaction in format ISO 3166 alpha3 |
senderBirthdate |
string | The birthdate of the person who send the transaction in format (yyyy-MM-dd) |
senderBirthCountry |
string | The birth country of the person who send the transaction in format ISO 3166 alpha3 |
senderSex |
GENDER |
The gender of the person who send the transaction |
senderAddress |
string | The address of the person who send the transaction |
senderCity |
string | The city name of the person who send the transaction |
senderPostalCode |
string | The postal code of the person who send the transaction |
senderProvince |
string | The province of the person who send the transaction |
senderCountry |
string | The resident country of the person who send the transaction in format ISO 3166 alpha3 |
receiverCity |
string | The city name of the person who receive the transaction |
receiverPhone2 |
string | Alternative phone number of the person who receive the transaction. Only if have a contactPhone and it's a different number |
receiverCountry |
string | The country of the person who receive the transaction in format ISO 3166 alpha3 |
merchant_external_id |
string | External id for the current merchant for this transaction |
redirectUrl |
string | Redirect url when the payment is completed |
paymentLink |
boolean | Whether to create a payment link or not, to complete the payment |
Services
cardCUP |
cardUSD |
Document Type
NAME | DESCRIPTION |
---|---|
PAS |
Passport |
RES |
National ID |
OTH |
Others |
EUI |
Resident card |
CED |
Cedula |
DRV |
Drive Licence |
Gender
M |
F |
Bank Name
Banco Popular de Ahorro |
Banco Metropolitano |
Banco de Crédito y Comercio BANDEC |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
Crypto
Get Supported Coins
Endpoint to get the supported crypto coins by our platform.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/crypto/coins"
payload = json.dumps({})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions/crypto/coins' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({});
var requestOptions = {
method: "GET",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch(
"https://backend.ducapp.net/api/private/transactions/crypto/coins",
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response:
[
{
"label": "Bitcoin",
"key": "bitcoin",
"symbol": "BTC"
},
{
"label": "Bitcoin Cash",
"key": "bitcoincash",
"symbol": "BCH"
},
{
"label": "Dai",
"key": "dai",
"symbol": "DAI"
},
{
"label": "Ethereum",
"key": "ethereum",
"symbol": "ETH"
}
]
Request
GET /api/private/transactions/crypto/coins
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
[COIN] |
Array of supported coins |
Coin
NAME | TYPE | DESCRIPTION |
---|---|---|
label |
string | Coin label |
key |
string | Coin key |
symbol |
string | Coin symbol |
Get Crypto Buy Price
Endpoint to get the approximated crypto buy price.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/crypto/price"
payload = json.dumps({
"amount": 10,
"crypto": "BTC",
"currency": "USD"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions/crypto/price' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 10,
"crypto": "BTC",
"currency": "USD"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
amount: 10,
crypto: "BTC",
currency: "USD",
});
var requestOptions = {
method: "GET",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch(
"https://backend.ducapp.net/api/private/transactions/crypto/price",
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response:
{
"amount": "0.00014893"
}
Request
GET /api/private/transactions/crypto/price
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
amount |
number | The amount to calculate the approximated price |
crypto |
string | Symbol of the selected crypto currency |
currency |
string | The selected currency |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
amount |
number | The approximated price |
Create Charge
Endpoint to create a crypto charge.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/crypto/charge"
payload = json.dumps({
"name": "{{$randomFullName}}",
"description": "{{$randomPhrase}}",
"localPrice": {
"currency": "USD",
"amount": 101
},
"merchant_external_id": "Crypto-{{$randomUUID}}"
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/crypto/charge' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "{{$randomFullName}}",
"description": "{{$randomPhrase}}",
"localPrice": {
"currency": "USD",
"amount": 101
},
"merchant_external_id": "Crypto-{{$randomUUID}}"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
name: "{{$randomFullName}}",
description: "{{$randomPhrase}}",
localPrice: {
currency: "USD",
amount: 101,
},
merchant_external_id: "Crypto-{{$randomUUID}}",
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch(
"https://backend.ducapp.net/api/private/transactions/crypto/charge",
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response:
{
"data": {
"status": 201,
"payload": "The transaction is being processed, a notify will be sent to your email (john.doe@gmail.com).",
"paymentLink": {
"url": "https://commerce.coinbase.com/pay/9d060eb6-d4e9-4997-b05b-9114f5965b9e"
}
}
}
Request
POST /api/private/transactions/crypto/charge
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
name |
string | Name of the product to buy |
description |
object | Description of the product to buy |
localPrice |
{LocalPrice} |
Local price information |
merchant_external_id |
string | External id for the current merchant for this transaction |
Local Price
NAME | TYPE | DESCRIPTION |
---|---|---|
currency |
string | Currency to be fund |
amount |
object | Amount to be fund |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
Send Money
Get Countries
Endpoint to browse the available countries to send money.
import requests
url = "https://backend.ducapp.net/api/private/transactions/cash-out/countries"
payload={}
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN> '
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions/cash-out/countries' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN> '
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN> ");
var urlencoded = new URLSearchParams();
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/countries", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"statusText": "OK",
"status": 200,
"data": [
{
"iso_code": "AND",
"name": "Andorra"
},
{
"iso_code": "AUT",
"name": "Austria"
}
],
"pagination": {
"totalPages": "1",
"total": "45",
"perPage": "50",
"page": "1"
}
}
Request
GET /api/private/transactions/cash-out/countries
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
statusText |
string | Text that indicates the status of the request |
status |
number | The request status code |
data |
[Country] |
An array of counties object |
Country
NAME | TYPE | DESCRIPTION |
---|---|---|
iso_code |
string | The country ISO code |
name |
string | The country name |
Get Services
Endpoint to browse the available services by country.
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN> ");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"country_iso_code": "NPL"
});
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/services", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions/cash-out/services' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN> ' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"country_iso_code": "NPL"
}'
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/cash-out/services"
payload = json.dumps({
"country_iso_code": "NPL"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN> ',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Example Response:
{
"statusText": "OK",
"status": 200,
"data": [
{
"id": 1,
"name": "MobileWallet"
},
{
"id": 2,
"name": "BankAccount"
}
],
"pagination": {
"totalPages": "1",
"total": "2",
"perPage": "50",
"page": "1"
}
}
Request
GET /api/private/transactions/cash-out/services
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
country_iso_code |
string | The ISO code of the country to send money to |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
statusText |
string | Text that indicates the status of the request |
status |
number | The request status code |
data |
[Service] |
An array of services object |
Service
NAME | TYPE | DESCRIPTION |
---|---|---|
id |
number | The service id |
name |
string | The service name |
Get payers
Endpoint to browse the list of available payers by country services.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/cash-out/payers"
payload = json.dumps({
"service_id": 1,
"country_iso_code": "NPL"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"service_id": 1,
"country_iso_code": "NPL"
});
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/payers", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions/cash-out/payers' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"service_id": 1,
"country_iso_code": "NPL"
}
'
Example Response:
{
"statusText": "OK",
"status": 200,
"data": [
{
"country_iso_code": "NPL",
"currency": "NPR",
"id": 467,
"increment": 0.01,
"name": "eSewa",
"precision": 2,
"service": {
"id": 1,
"name": "MobileWallet"
},
"transaction_types": {
"C2C": {
"maximum_transaction_amount": null,
"minimum_transaction_amount": "100.00000000",
"credit_party_identifiers_accepted": [
"msisdn"
],
"required_documents": [],
"required_receiving_entity_fields": [
"lastname",
"firstname"
],
"required_sending_entity_fields": [
"lastname",
"firstname",
"date_of_birth",
"country_iso_code"
]
}
}
}
],
"pagination": {
"totalPages": "1",
"total": "1",
"perPage": "100",
"page": "1"
}
}
Request
GET /api/private/transactions/cash-out/payers
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
service_id |
number | The Id of the service of the selected country |
country_iso_code |
string | The ISO code of the country to send money to |
page |
number | (Optional) Number of the page |
per_page |
number | (Optional) Amount of result per page |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
statusText |
string | Text that indicates the status of the request |
status |
number | The request status code |
data |
[Payer] |
An array of payers object |
Payer
NAME | TYPE | DESCRIPTION |
---|---|---|
id |
string | The payer id |
name |
string | The payer name |
transaction_types |
{Transaction Type} |
The payers associated transactions type (C2C\B2B) |
currency |
string | The payer currency |
Transaction Type
NAME | TYPE | DESCRIPTION |
---|---|---|
maximum_transaction_amount |
string | Maximum transaction amount allowed |
minimum_transaction_amount |
string | Minimum transaction amount allowed |
credit_party_identifiers_accepted |
[String] |
Dynamic set of required information field |
required_documents |
[String] |
Dynamic set of required information |
required_receiving_entity_fields |
[String] |
Dynamic set of required information |
required_sending_entity_fields |
[String] |
Dynamic set of required information |
Get payer details
Endpoint to a payer details by Id.
import requests
url = "https://backend.ducapp.net/api/private/transactions/cash-out/payers/3890"
payload = {}
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/payers/3890", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions/cash-out/payers/3890' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'
Example Response:
{
"statusText": "OK",
"status": 200,
"data": {
"country_iso_code": "HTI",
"currency": "HTG",
"id": 3890,
"increment": 0.01,
"name": "MonCash",
"precision": 2,
"service": {
"id": 1,
"name": "MobileWallet"
},
"transaction_types": {
"C2C": {
"maximum_transaction_amount": 100000,
"minimum_transaction_amount": 150,
"credit_party_identifiers_accepted": [
"msisdn"
],
"required_documents": [],
"required_receiving_entity_fields": [
"lastname",
"firstname"
],
"required_sending_entity_fields": [
"lastname",
"firstname",
"date_of_birth",
"country_iso_code",
"msisdn",
"address",
"code"
]
}
}
}
}
Request
GET /api/private/transactions/cash-out/payers/{identifier}
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Path
NAME | TYPE | DESCRIPTION |
---|---|---|
identifier |
number | Payer id |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
statusText |
string | Text that indicates the status of the request |
status |
number | The request status code |
data |
Payer |
Payer object |
Payer
NAME | TYPE | DESCRIPTION |
---|---|---|
id |
string | The payer id |
name |
string | The payer name |
transaction_types |
{Transaction Type} |
The payers associated transactions type (C2C\B2B) |
currency |
string | The payer currency |
Transaction Type
NAME | TYPE | DESCRIPTION |
---|---|---|
maximum_transaction_amount |
string | Maximum transaction amount allowed |
minimum_transaction_amount |
string | Minimum transaction amount allowed |
credit_party_identifiers_accepted |
[String] |
Dynamic set of required information field |
required_documents |
[String] |
Dynamic set of required information |
required_receiving_entity_fields |
[String] |
Dynamic set of required information |
required_sending_entity_fields |
[String] |
Dynamic set of required information |
Get Fee and Exchange Rate
Endpoint to get the current fee and exchange rate for the transaction.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/cash-out/rate-fee"
payload = json.dumps({
"payer_id": "467",
"destinationAmount": 13876,
"mode": "DESTINATION_AMOUNT",
"transactionType": "C2C",
"currency": "USD"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/request-send' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"payer_id": "467",
"destinationAmount": 13876,
"mode": "DESTINATION_AMOUNT",
"transactionType": "C2C",
"currency": "USD"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"payer_id": "467",
"destinationAmount": 13876,
"mode": "DESTINATION_AMOUNT",
"transactionType": "C2C",
"currency": "USD"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/request-send", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"data": {
"rate": 137.9051,
"fee": {
"currency": "USD",
"amount": 3
},
"currencies": {
"from": "USD",
"to": "HTG"
}
}
}
Request
POST /api/private/transactions/cash-out/rate-fee
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
payer_id |
string | The Id of the payer of the selected service |
destinationAmount |
number | Amount to deliver |
mode |
string | `SOURCE_AMOUNT |
transactionType |
string | The type of transaction selected from those available by the payer |
sourceAmount |
number | The amount to deliver in the source currency |
sourceCurrency |
string | Currency of the sending user |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
rate |
number | Current exchange rate |
fee |
{Fee} |
Fee amount and currency |
currencies |
{Currencies} |
Currencies for the exchange rate |
Fee
NAME | TYPE | DESCRIPTION |
---|---|---|
currency |
string | The fee currency |
amount |
number | The fee amount |
Currencies
NAME | TYPE | DESCRIPTION |
---|---|---|
from |
string | The base currency |
to |
string | The destination currency |
Send
Endpoint to send the transaction.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/cash-out/send"
payload = json.dumps({
"credit_party_identifiers_accepted": {
"msisdn": "3784046187654"
},
"required_sending_entity_fields": {
"lastname": "Gonzalez Rodriguez",
"firstname": "Ruben",
"date_of_birth": "1992-06-27",
"country_iso_code": "CAN",
"msisdn": "3784046187654",
"address": "Main 191",
"code": "80100"
},
"required_receiving_entity_fields": {
"lastname": "Bush",
"firstname": "Lewis"
},
"payer_id": "3890",
"transaction_type": "C2C",
"sourceCurrency": "USD",
"sourceAmount": 600,
"mode": "SOURCE_AMOUNT",
"destinationAmount": 35785543,
"purpose_of_remittance": "FAMILY_SUPPORT",
"merchant_external_id": "Ext-1234ffdfwadfsdffefed333634535678",
"paymentLink": true,
"redirectUrl": "https://ducapp.net"
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/confirm-send' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"credit_party_identifiers_accepted": {
"msisdn": "3784046187654"
},
"required_sending_entity_fields": {
"lastname": "Gonzalez Rodriguez",
"firstname": "Ruben",
"date_of_birth": "1992-06-27",
"country_iso_code": "CAN",
"msisdn": "3784046187654",
"address": "Main 191",
"code": "80100"
},
"required_receiving_entity_fields": {
"lastname": "Bush",
"firstname": "Lewis"
},
"payer_id": "3890",
"transaction_type": "C2C",
"sourceCurrency": "USD",
"sourceAmount": 600,
"mode": "SOURCE_AMOUNT",
"destinationAmount": 35785543,
"purpose_of_remittance": "FAMILY_SUPPORT",
"merchant_external_id": "Ext-1234ffdfwadfsdffefed333634535678",
"paymentLink": true,
"redirectUrl": "https://ducapp.net"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"credit_party_identifiers_accepted": {
"msisdn": "3784046187654"
},
"required_sending_entity_fields": {
"lastname": "Gonzalez Rodriguez",
"firstname": "Ruben",
"date_of_birth": "1992-06-27",
"country_iso_code": "CAN",
"msisdn": "3784046187654",
"address": "Main 191",
"code": "80100"
},
"required_receiving_entity_fields": {
"lastname": "Bush",
"firstname": "Lewis"
},
"payer_id": "3890",
"transaction_type": "C2C",
"sourceCurrency": "USD",
"sourceAmount": 600,
"mode": "SOURCE_AMOUNT",
"destinationAmount": 35785543,
"purpose_of_remittance": "FAMILY_SUPPORT",
"merchant_external_id": "Ext-1234ffdfwadfsdffefed333634535678",
"paymentLink": true,
"redirectUrl": "https://ducapp.net"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/confirm-send", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
}
}
Request
POST /api/private/transactions/cash-out/send
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
credit_party_identifiers_accepted |
string | Dynamic fields to be completed by the user |
required_sending_entity_fields |
string | Dynamic fields to be completed by the user |
required_receiving_entity_fields |
string | Dynamic fields to be completed by the user |
required_documents |
string | Dynamic fields to be completed by the user |
sourceAmount |
number | The amount to send in the user currency |
sourceCurrency |
string | The user's currency |
mode |
string | `SOURCE_AMOUNT |
transaction_type |
string | The type of transaction selected from those available by the payer |
payer_id |
string | The Id of the payer of the selected service |
destinationAmount |
number | The amount to deliver in the destination currency |
location |
{Location} |
Information on the users GPS location at the time of the transaction |
creditCardNumber |
string | Information for payment, credit card number |
creditCardHolderName |
string | Information for payment, name that appears on the credit card |
expiryDate |
string | Information for payment, expiration date |
cvc |
string | Information for payment, cvc |
avs_street_name |
string | Information for payment, street name |
avs_street_number |
string | Information for payment, residence number |
avs_zipcode |
string | Information for payment, zip code |
email |
string | Email of the credit card owner |
phone |
string | Phone number of the credit card owner |
merchant_external_id |
string | External id for the current merchant for this transaction |
paymentLink |
boolean | Whether to create a payment link or not, to complete the payment |
redirectUrl |
string | URL to be redirected after the payment link confirmation |
purpose_of_remittance |
string | A brief description of the transaction purpose |
Location
NAME | TYPE | DESCRIPTION |
---|---|---|
latitude |
string | Latitude |
longitude |
string | Longitude |
timestamp |
string | Timestamp |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
Send Money (Specific)
Get Zones
Endpoint to get the defined zones for the fee calculation.
import requests
url = "https://backend.ducapp.net/api/private/CU/zones"
payload={}
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/CU/zones' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/CU/zones", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"countryName": "Cuba",
"countryShortCode": "CU",
"zones": [
{
"name": "Provincias",
"locations": [
"Artemisa",
"Ciego de Ávila",
"Camagüey",
"Cienfuegos",
"Granma",
"Guantánamo",
"Isla de la Juventud",
"Las Tunas",
"Mayabeque",
"Pinar del Río",
"Sancti Spíritus",
"Santiago de Cuba",
"Villa Clara",
"Holguín",
"Matanzas"
]
},
{
"name": "Habana",
"locations": [
"La Habana"
]
}
]
}
Request
GET /api/private/CU/zones
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
zones |
[Zone] |
Zone object |
Zone
NAME | TYPE | DESCRIPTION |
---|---|---|
name |
string | Zonee name |
Get Fee
Endpoint to get the current transaction fee.
import requests
url = "https://backend.ducapp.net/api/private/fees/cu/cardCUP/Provincias?amount=7499"
payload={}
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/fees/cu/cardCUP/Provincias?amount=7499' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/fees/cu/cardCUP/Provincias?amount=7499", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"countryName": "Cuba",
"countryShortCode": "CU",
"zoneName": "Provincias",
"service": "cardCUP",
"rangeMin": 6000.01,
"rangeMax": 12000,
"amountToDeliver": 7499,
"currencyToDeliver": "CUP",
"fee": 6,
"currencyFee": "USD"
}
Request
GET /api/private/fees/cu/{service}/{zone}?amount={amount}
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Path
NAME | TYPE | DESCRIPTION |
---|---|---|
service |
string | Service name |
zone |
string | Zone |
amount |
number | Amount |
Services (Cuba)
NAME | |||
---|---|---|---|
cardCUP |
cardUSD |
deliveryCUP |
deliveryUSD |
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
zoneName |
string | Requested zone name |
service |
string | Requested service name |
currencyToDeliver |
string | Currency to deliver for given service |
fee |
string | The fee amount |
currencyFee |
string | The fee currency |
Get Fees
Endpoint to get all the fee dataset.
import requests
url = "https://backend.ducapp.net/api/private/fees"
payload={}
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/fees' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/fees", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"results": {
"Habana": {
"cardCUP": [
{
"fromAmount": 0,
"toAmount": 6000,
"fee": 3,
"createdAt": "2022-09-29T15:38:51.773Z",
"updatedAt": "2022-11-18T15:22:35.099Z"
},
{
"fromAmount": 6000.01,
"toAmount": 12000,
"fee": 6,
"createdAt": "2022-09-29T15:38:51.777Z",
"updatedAt": "2022-09-29T15:38:51.777Z"
}
],
"deliveryCUP": [
{
"fromAmount": 0,
"toAmount": 6000,
"fee": 3,
"createdAt": "2022-09-29T15:40:18.988Z",
"updatedAt": "2022-11-18T15:22:00.879Z"
},
{
"fromAmount": 6000.01,
"toAmount": 12000,
"fee": 6,
"createdAt": "2022-09-29T15:40:18.990Z",
"updatedAt": "2022-09-29T15:40:18.990Z"
}
]
},
"Provincias": {
"deliveryUSD": [
{
"fromAmount": 0,
"toAmount": 100,
"fee": 12,
"createdAt": "2022-10-03T16:31:43.609Z",
"updatedAt": "2022-11-18T15:25:08.645Z"
},
{
"fromAmount": 100.01,
"toAmount": 150,
"fee": 18,
"createdAt": "2022-10-03T16:31:43.614Z",
"updatedAt": "2022-10-03T16:31:43.614Z"
}
],
"cardUSD": [
{
"fromAmount": 20.01,
"toAmount": 50,
"fee": 6,
"createdAt": "2023-03-16T20:28:58.800Z",
"updatedAt": "2023-03-16T20:28:58.800Z"
},
{
"fromAmount": 50.01,
"toAmount": 100,
"fee": 10,
"createdAt": "2023-03-16T20:28:58.802Z",
"updatedAt": "2023-03-16T20:28:58.802Z"
}
]
}
}
}
Request
GET /api/private/fees
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
[zoneName] |
{ZONE} |
Requested zone name |
Zone
NAME | TYPE | DESCRIPTION |
---|---|---|
[serviceName] |
{SERVICE} |
Latitude |
Service
NAME | TYPE | DESCRIPTION |
---|---|---|
[serviceName] |
[FEE] |
Latitude |
Fee
NAME | TYPE | DESCRIPTION |
---|---|---|
fromAmount |
number | Amount lower limit |
toAmount |
number | Amount upper limit |
fee |
number | Amount to pay |
createdAt |
Date | Fee creation date |
updatedAt |
Date | Fee update date |
Get Exchange Rate
Endpoint to get the current exchange rate.
import requests
url = "https://backend.ducapp.net/api/private/rates?base=usd"
payload={}
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/rates?base=usd' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/rates?base=usd", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"base": "USD",
"rates": {
"USD": "1.0000",
"CAD": "1.3283",
"CUP": "160.0000",
"EUR": "0.9217"
},
"date": "2023-01-21"
}
Request
GET /api/private/rates?base={currency}
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Path
NAME | TYPE | DESCRIPTION |
---|---|---|
currency |
string | Base currency |
Base currency
USD |
CAD |
CUP |
EUR |
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
rates |
{Rate} |
Rate info object |
date |
string | Current date for the exchange rate values |
Rate
NAME | TYPE | DESCRIPTION |
---|---|---|
rates |
{Rate} |
Rate info object |
date |
string | Current date for the exchange rate values |
Get Regions
Endpoint to get the region's info.
import requests
url = "https://backend.ducapp.net/api/private/transactions/country-region"
payload={}
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions/country-region' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/country-region", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"data": {
"status": 200,
"payload": {
"countryName": "Cuba",
"countryShortCode": "CU",
"regions": [
{
"name": "Pinar del Río",
"shortCode": "01",
"municipalities": [
{
"name": "Pinar del Río",
"code": "M011100"
},
{
"name": "Consolación del Sur",
"code": "M011000"
},
{
"name": "San Juan y Martínez",
"code": "M011300"
},
{
"name": "Los Palacios",
"code": "M010900"
},
{
"name": "Sandino",
"code": "M010100"
},
{
"name": "Guane",
"code": "M011400"
},
{
"name": "La Palma",
"code": "M010500"
},
{
"name": "San Luis",
"code": "M011200"
},
{
"name": "Minas de Matahambre",
"code": "M010300"
},
{
"name": "Viñales",
"code": "M010400"
},
{
"name": "Mantua",
"code": "M010200"
}
]
},
{
"name": "Artemisa",
"shortCode": "02",
"municipalities": [
{
"name": "Artemisa",
"code": "M021900"
},
{
"name": "San Cristóbal",
"code": "M022100"
},
{
"name": "San Antonio",
"code": "M020500"
},
{
"name": "Bauta",
"code": "M020400"
},
{
"name": "Bahía Honda",
"code": "M022000"
},
{
"name": "Mariel",
"code": "M020100"
},
{
"name": "Caimito",
"code": "M020300"
},
{
"name": "Güira de Melena",
"code": "M021700"
},
{
"name": "Alquízar",
"code": "M021800"
},
{
"name": "Guanajay",
"code": "M020200"
},
{
"name": "Candelaria",
"code": "M022200"
}
]
}
]
}
}
}
Request
GET /api/private/transactions/country-region
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
payload |
{Payload} |
Response payload |
Payload
NAME | TYPE | DESCRIPTION |
---|---|---|
regions |
[Region] |
Region data |
Region
NAME | TYPE | DESCRIPTION |
---|---|---|
name |
string | Region name |
code |
string | Region code |
Get Card Regex
Endpoint to get the card regex to check if card number is valid.
import requests
url = "https://backend.ducapp.net/api/private/delivery-card-regex"
payload={}
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/delivery-card-regex' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/delivery-card-regex", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"BPA_CARD": "^((92)\\d{0,2})(1299)\\d{0,8}?$",
"BANMET_CARD": "^((92)\\d{0,2})(9598)\\d{0,8}?$",
"CREDIT_CARD": "^((92)(27|24|01|02|04|05|06|07|08|09))(0699|9598|1299)\\d{8}?$",
"BANDEC_CARD": "^((92)\\d{0,2})(0699)\\d{0,8}?$",
"MLC_CREDIT_CARD": "^((92)(25|35))(0699|9598|1299)\\d{8}?$"
}
Request
GET /api/private/delivery-card-regex
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
BANK_CARD_REGEX |
string | Regex expression |
BANK_CARD_REGEX
NAME | ||||
---|---|---|---|---|
BPA_CARD |
BANMET_CARD |
CREDIT_CARD |
BANDEC_CARD |
MLC_CREDIT_CARD |
Credit Card
Endpoint to Send money to MLC/CUP cuban cards.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/cash-out/creditcard"
payload = json.dumps({
"service": "cardUSD",
"amount": 224,
"currency": "USD",
"concept": "Family Support",
"cardNumber": "9225 1299 7929 0027",
"bankName": "Banco Popular de Ahorro",
"cardHolderName": "Juan Perez",
"contactPhone": "005353129327",
"deliveryAmount": "200",
"deliveryCurrency": "USD",
"deliveryCountry": "Cuba",
"deliveryCountryCode": "CU",
"senderName": "Ruben",
"senderLastName": "Gonzalez Ramirez",
"senderDocumentType": "PASSPORT",
"senderDocumentNumber": "C254362",
"senderNationalityCountry": "CAN",
"senderBirthdate": "1966-03-11",
"senderBirthCountry": "CAN",
"senderSex": "M",
"senderAddress": "Some Address",
"senderCity": "Toronto",
"senderPostalCode": "KJ4345",
"senderProvince": "Ontario",
"senderCountry": "Canada",
"receiverCity": "Cardenas",
"receiverPhone2": "2444676867",
"receiverCountry": "CUB",
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "Ruben Gonzalez Ramirez",
"expiryDate": "07/29",
"cvc": "123",
"avs_street_name": "Main Street",
"avs_street_number": "508",
"avs_zipcode": "80100",
"email": "john.doe@test.ducapp.net",
"phone": "+19058025826",
"location": {
"latitude": "35.92591105461136",
"longitude": "14.492235823330882",
"timestamp": "21:21:03.9132187"
},
"merchant_external_id": "Ext-12345471"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/creditcard' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "cardUSD",
"amount": 224,
"currency": "USD",
"concept": "Family Support",
"cardNumber": "9225 1299 7929 0027",
"bankName": "Banco Popular de Ahorro",
"cardHolderName": "Juan Perez",
"contactPhone": "005353129327",
"deliveryAmount": "200",
"deliveryCurrency": "USD",
"deliveryCountry": "Cuba",
"deliveryCountryCode": "CU",
"senderName": "Ruben",
"senderLastName": "Gonzalez Ramirez",
"senderDocumentType": "PASSPORT",
"senderDocumentNumber": "C254362",
"senderNationalityCountry": "CAN",
"senderBirthdate": "1966-03-11",
"senderBirthCountry": "CAN",
"senderSex": "M",
"senderAddress": "Some Address",
"senderCity": "Toronto",
"senderPostalCode": "KJ4345",
"senderProvince": "Ontario",
"senderCountry": "Canada",
"receiverCity": "Cardenas",
"receiverPhone2": "2444676867",
"receiverCountry": "CUB",
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "Ruben Gonzalez Ramirez",
"expiryDate": "07/29",
"cvc": "123",
"avs_street_name": "Main Street",
"avs_street_number": "508",
"avs_zipcode": "80100",
"email": "john.doe@test.ducapp.net",
"phone": "+19058025826",
"location": {
"latitude": "35.92591105461136",
"longitude": "14.492235823330882",
"timestamp": "21:21:03.9132187"
},
"merchant_external_id": "Ext-12345471"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"service": "cardUSD",
"amount": 224,
"currency": "USD",
"concept": "Family Support",
"cardNumber": "9225 1299 7929 0027",
"bankName": "Banco Popular de Ahorro",
"cardHolderName": "Juan Perez",
"contactPhone": "005353129327",
"deliveryAmount": "200",
"deliveryCurrency": "USD",
"deliveryCountry": "Cuba",
"deliveryCountryCode": "CU",
"senderName": "Ruben",
"senderLastName": "Gonzalez Ramirez",
"senderDocumentType": "PASSPORT",
"senderDocumentNumber": "C254362",
"senderNationalityCountry": "CAN",
"senderBirthdate": "1966-03-11",
"senderBirthCountry": "CAN",
"senderSex": "M",
"senderAddress": "Some Address",
"senderCity": "Toronto",
"senderPostalCode": "KJ4345",
"senderProvince": "Ontario",
"senderCountry": "Canada",
"receiverCity": "Cardenas",
"receiverPhone2": "2444676867",
"receiverCountry": "CUB",
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "Ruben Gonzalez Ramirez",
"expiryDate": "07/29",
"cvc": "123",
"avs_street_name": "Main Street",
"avs_street_number": "508",
"avs_zipcode": "80100",
"email": "john.doe@test.ducapp.net",
"phone": "+19058025826",
"location": {
"latitude": "35.92591105461136",
"longitude": "14.492235823330882",
"timestamp": "21:21:03.9132187"
},
"merchant_external_id": "Ext-12345471"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/creditcard", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
}
}
Request
POST /api/private/transactions/cash-out/creditcard
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
service |
SERVICES |
The service identifier |
amount |
number | The the amount to send (Calculated Fee included) |
currency |
string | The the currency of the user |
concept |
string | A brief description |
cardNumber |
string | The beneficiary card number |
cardHolderName |
string | The beneficiary card name |
bankName |
string | The beneficiary bank name |
contactPhone |
string | The beneficiary phone number |
deliveryCurrency |
string | The beneficiary card currency |
deliveryCountry |
string | The beneficiary country |
deliveryAmount |
string | The amount to receive by the beneficiary |
deliveryAddress |
string | The beneficiarys address |
deliveryCountryCode |
string | The beneficiary alpha2 country iso code |
senderName |
string | The name of the person who send the transaction |
senderLastName |
string | The lastname of the person who send the transaction |
senderDocumentType |
DOCUMENT TYPE |
The type of document of identification of the person who send the transaction |
senderDocumentNumber |
string | The identification number of the person who send the transaction |
senderNationalityCountry |
string | The nationality of the person who send the transaction in format ISO 3166 alpha3 |
senderBirthdate |
string | The birthdate of the person who send the transaction in format (yyyy-MM-dd) |
senderBirthCountry |
string | The birth country of the person who send the transaction in format ISO 3166 alpha3 |
senderSex |
GENDER |
The gender of the person who send the transaction |
senderAddress |
string | The address of the person who send the transaction |
senderCity |
string | The city name of the person who send the transaction |
senderPostalCode |
string | The postal code of the person who send the transaction |
senderProvince |
string | The province of the person who send the transaction |
senderCountry |
string | The resident country of the person who send the transaction in format ISO 3166 alpha3 |
receiverCity |
string | The city name of the person who receive the transaction |
receiverPhone2 |
string | Alternative phone number of the person who receive the transaction. Only if have a contactPhone and it's a different number |
receiverCountry |
string | The country of the person who receive the transaction in format ISO 3166 alpha3 |
location |
{Location} |
Information on the users GPS location at the time of the transaction |
creditCardNumber |
string | Information for payment, credit card number |
creditCardHolderName |
string | Information for payment, name that appears on the credit card |
expiryDate |
string | Information for payment, expiration date |
cvc |
string | Information for payment, cvc |
avs_street_name |
string | Information for payment, street name |
avs_street_number |
string | Information for payment, residence number |
avs_zipcode |
string | Information for payment, zip code |
email |
string | Email of the credit card owner |
phone |
string | Phone number of the credit card owner |
merchant_external_id |
string | External id for the current merchant for this transaction |
paymentLink |
boolean | Whether to create a payment link or not, to complete the payment |
Services
cardCUP |
cardUSD |
Document Type
NAME | DESCRIPTION |
---|---|
PAS |
Passport |
RES |
National ID |
OTH |
Others |
EUI |
Resident card |
CED |
Cedula |
DRV |
Drive Licence |
Gender
M |
F |
Bank Name
Banco Popular de Ahorro |
Banco Metropolitano |
Banco de Crédito y Comercio BANDEC |
Location
NAME | TYPE | DESCRIPTION |
---|---|---|
latitude |
string | Latitude |
longitude |
string | Longitude |
timestamp |
string | Timestamp |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
Home Delivery
Endpoint to send home delivery money.
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"service": "deliveryUSD",
"deliveryAddress": "Calle Máximo Gómez, #15 e/ Calle Libertad y Calle Maceo",
"deliveryFirstName": "Juan",
"deliveryLastName": "Perez",
"deliverySecondLastName": "Perez",
"deliveryID": "00120814909",
"deliveryPhone": "005353129327",
"deliveryArea": "Sancti Spíritus",
"deliveryCity": "Trinidad",
"deliveryZone": "Provincias",
"amount": 209,
"deliveryAmount": "201",
"currency": "USD",
"concept": "Family Support",
"deliveryCurrency": "USD",
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "Ruben Gonzalez Ramirez",
"senderName": "Ruben",
"senderLastName": "Gonzalez Ramirez",
"senderDocumentType": "PASSPORT",
"senderDocumentNumber": "C254362",
"senderNationalityCountry": "CAN",
"senderBirthdate": "1966-03-11",
"senderBirthCountry": "CAN",
"senderSex": "M",
"senderAddress": "Some Address",
"senderCity": "Toronto",
"senderPostalCode": "KJ4345",
"senderProvince": "Ontario",
"senderCountry": "Canada",
"receiverPhone2": "2444676867",
"receiverCountry": "CUB",
"expiryDate": "07/29",
"cvc": "123",
"avs_street_name": "Main Street",
"avs_street_number": "8",
"avs_zipcode": "STJ3143",
"email": "john.doe@test.ducapp.net",
"phone": "+35699452438",
"location": {
"latitude": "35.92591105461136",
"longitude": "14.492235823330882",
"timestamp": "21:08:14.2556202"
},
"merchant_external_id": "Ext-6736222352"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/delivery", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/cash-out/delivery"
payload = json.dumps({
"service": "deliveryUSD",
"deliveryAddress": "Calle Máximo Gómez, #15 e/ Calle Libertad y Calle Maceo",
"deliveryFirstName": "Juan",
"deliveryLastName": "Perez",
"deliverySecondLastName": "Perez",
"deliveryID": "00120814909",
"deliveryPhone": "005353129327",
"deliveryArea": "Sancti Spíritus",
"deliveryCity": "Trinidad",
"deliveryZone": "Provincias",
"amount": 209.0,
"deliveryAmount": "201",
"currency": "USD",
"concept": "Family Support",
"deliveryCurrency": "USD",
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "Ruben Gonzalez Ramirez",
"senderName": "Ruben",
"senderLastName": "Gonzalez Ramirez",
"senderDocumentType": "PASSPORT",
"senderDocumentNumber": "C254362",
"senderNationalityCountry": "CAN",
"senderBirthdate": "1966-03-11",
"senderBirthCountry": "CAN",
"senderSex": "M",
"senderAddress": "Some Address",
"senderCity": "Toronto",
"senderPostalCode": "KJ4345",
"senderProvince": "Ontario",
"senderCountry": "Canada",
"receiverPhone2": "2444676867",
"receiverCountry": "CUB",
"expiryDate": "07/29",
"cvc": "123",
"avs_street_name": "Main Street",
"avs_street_number": "8",
"avs_zipcode": "STJ3143",
"email": "john.doe@test.ducapp.net",
"phone": "+35699452438",
"location": {
"latitude": "35.92591105461136",
"longitude": "14.492235823330882",
"timestamp": "21:08:14.2556202"
},
"merchant_external_id": "Ext-6736222352"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/delivery' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"service": "deliveryUSD",
"deliveryAddress": "Calle Máximo Gómez, #15 e/ Calle Libertad y Calle Maceo",
"deliveryFirstName": "Juan",
"deliveryLastName": "Perez",
"deliverySecondLastName": "Perez",
"deliveryID": "00120814909",
"deliveryPhone": "005353129327",
"deliveryArea": "Sancti Spíritus",
"deliveryCity": "Trinidad",
"deliveryZone": "Provincias",
"amount": 209.0,
"deliveryAmount": "201",
"currency": "USD",
"concept": "Family Support",
"deliveryCurrency": "USD",
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "Ruben Gonzalez Ramirez",
"senderName": "Ruben",
"senderLastName": "Gonzalez Ramirez",
"senderDocumentType": "PASSPORT",
"senderDocumentNumber": "C254362",
"senderNationalityCountry": "CAN",
"senderBirthdate": "1966-03-11",
"senderBirthCountry": "CAN",
"senderSex": "M",
"senderAddress": "Some Address",
"senderCity": "Toronto",
"senderPostalCode": "KJ4345",
"senderProvince": "Ontario",
"senderCountry": "Canada",
"receiverPhone2": "2444676867",
"receiverCountry": "CUB",
"expiryDate": "07/29",
"cvc": "123",
"avs_street_name": "Main Street",
"avs_street_number": "8",
"avs_zipcode": "STJ3143",
"email": "john.doe@test.ducapp.net",
"phone": "+35699452438",
"location": {
"latitude": "35.92591105461136",
"longitude": "14.492235823330882",
"timestamp": "21:08:14.2556202"
},
"merchant_external_id": "Ext-6736222352"
}'
Example Response:
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
}
}
Request
POST /api/private/transactions/cash-out/delivery
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
service |
SERVICES |
The service identifier |
amount |
number | The the amount to send |
currency |
string | The the currency of the user |
concept |
string | A brief description |
deliveryFirstName |
string | The beneficiarys first name |
deliveryLastName |
string | The beneficiarys lastname |
deliverySecondLastName |
string | The beneficiarys second lastname |
deliveryID |
string | The beneficiarys identification number |
deliveryPhone |
string | The beneficiarys phone number |
deliveryCountry |
string | The beneficiarys country |
deliveryCountryCode |
string | The beneficiarys country ISO code in alpha2 format |
deliveryArea |
string | The beneficiarys province (Defined in Get Regions endpoint response ) |
deliveryCity |
string | The beneficiarys municipality (Defined in Get Regions endpoint response ) |
deliveryZone |
string | The beneficiarys zone (Defined in Get Zones endpoint response ) |
deliveryAddress |
string | The beneficiarys address |
deliveryCurrency |
string | The beneficiarys currency |
deliveryAmount |
string | The amount to receive by the beneficiary |
senderName |
string | The name of the person who send the transaction |
senderLastName |
string | The lastname of the person who send the transaction |
senderDocumentType |
DOCUMENT TYPE |
The type of document of identification of the person who send the transaction |
senderDocumentNumber |
string | The identification number of the person who send the transaction |
senderNationalityCountry |
string | The nationality of the person who send the transaction in format ISO 3166 alpha3 |
senderBirthdate |
string | The birthdate of the person who send the transaction in format (yyyy-MM-dd) |
senderBirthCountry |
string | The birth country of the person who send the transaction in format ISO 3166 alpha3 |
senderSex |
GENDER |
The gender of the person who send the transaction |
senderAddress |
string | The address of the person who send the transaction |
senderCity |
string | The city name of the person who send the transaction |
senderPostalCode |
string | The postal code of the person who send the transaction |
senderProvince |
string | The province of the person who send the transaction |
senderCountry |
string | The resident country of the person who send the transaction in format ISO 3166 alpha3 |
receiverCity |
string | The city name of the person who receive the transaction |
receiverPhone2 |
string | Alternative phone number of the person who receive the transaction. Only if have a contactPhone and it's a different number |
receiverCountry |
string | The country of the person who receive the transaction in format ISO 3166 alpha3 |
location |
{Location} |
Information on the users GPS location at the time of the transaction |
creditCardNumber |
string | Information for payment, credit card number |
creditCardHolderName |
string | Information for payment, name that appears on the credit card |
expiryDate |
string | Information for payment, expiration date |
cvc |
string | Information for payment, cvc |
avs_street_name |
string | Information for payment, street name |
avs_street_number |
string | Information for payment, residence number |
avs_zipcode |
string | Information for payment, zip code |
email |
string | Email of the credit card owner |
phone |
string | Phone number of the credit card owner |
merchant_external_id |
string | External id for the current merchant for this transaction |
paymentLink |
boolean | Whether to create a payment link or not, to complete the payment |
Services
deliveryCUP |
deliveryUSD |
deliveryEUR |
Document Type
NAME | DESCRIPTION |
---|---|
PAS |
Passport |
RES |
National ID |
OTH |
Others |
EUI |
Resident card |
CED |
Cedula |
DRV |
Drive Licence |
Gender
M |
F |
Location
NAME | TYPE | DESCRIPTION |
---|---|---|
latitude |
string | Latitude |
longitude |
string | Longitude |
timestamp |
string | Timestamp |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
Send Money (Alternatives)
Email Money Transfer
Endpoint to send money via email address.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/cash-out/email"
payload = json.dumps({
"amount": 100,
"currency": "EUR",
"concept": "Testing",
"emailToSend": "testing2@gmail.com",
"location": {
"latitude": "-76.25804853625596",
"longitude": "20.888864980079234",
"timestamp": "1635185398"
},
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "TRuben Gonzalez Ramirezst",
"expiryDate": "07/29",
"cvc": "123",
"avs_street_name": "Main Street",
"avs_street_number": "508",
"avs_zipcode": "80100",
"email": "john.doe@test.ducapp.net",
"phone": "+19058025826",
"merchant_external_id": "Ext-12345346536541"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"amount": 100,
"currency": "EUR",
"concept": "Testing",
"emailToSend": "testing2@gmail.com",
"location": {
"latitude": "-76.25804853625596",
"longitude": "20.888864980079234",
"timestamp": "1635185398"
},
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "TRuben Gonzalez Ramirezst",
"expiryDate": "07/29",
"cvc": "123",
"avs_street_name": "Main Street",
"avs_street_number": "508",
"avs_zipcode": "80100",
"email": "john.doe@test.ducapp.net",
"phone": "+19058025826",
"merchant_external_id": "Ext-12345346536541"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/cash-out/email", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/email' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 100,
"currency": "EUR",
"concept": "Testing",
"emailToSend": "testing2@gmail.com",
"location": {
"latitude": "-76.25804853625596",
"longitude": "20.888864980079234",
"timestamp": "1635185398"
},
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "TRuben Gonzalez Ramirezst",
"expiryDate": "07/29",
"cvc": "123",
"avs_street_name": "Main Street",
"avs_street_number": "508",
"avs_zipcode": "80100",
"email": "john.doe@test.ducapp.net",
"phone": "+19058025826",
"merchant_external_id": "Ext-12345346536541"
}'
Example Response:
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
}
}
Request
POST /api/private/transactions/cash-out/email
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
emailToSend |
string | The destination email |
amount |
number | The the amount to send |
currency |
string | The the currency of the user |
concept |
string | A brief description |
location |
{Location} |
Information on the users GPS location at the time of the transaction |
creditCardNumber |
string | Information for payment, credit card number |
creditCardHolderName |
string | Information for payment, name that appears on the credit card |
expiryDate |
string | Information for payment, expiration date |
cvc |
string | Information for payment, cvc |
avs_street_name |
string | Information for payment, street name |
avs_street_number |
string | Information for payment, residence number |
avs_zipcode |
string | Information for payment, zip code |
email |
string | Email of the credit card owner |
phone |
string | Phone number of the credit card owner |
merchant_external_id |
string | External id for the current merchant for this transaction |
paymentLink |
boolean | Whether to create a payment link or not, to complete the payment |
Location
NAME | TYPE | DESCRIPTION |
---|---|---|
latitude |
string | Latitude |
longitude |
string | Longitude |
timestamp |
string | Timestamp |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
P2P Transfer
Endpoint to send money to internal users of the platform.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/token/p2p"
payload = json.dumps({
"toAddress": "0x14A205B953359F24F41B9b029ee62dc791A07F50",
"amount": 1,
"currency": "USD",
"concept": "Testing 4",
"location": {
"latitude": "-76.25804853625596",
"longitude": "20.888864980079234",
"timestamp": "1635185398"
},
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "Ruben Gonzalez Ramirez",
"expiryDate": "07/29",
"cvc": "123",
"avs_street_name": "Main Street",
"avs_street_number": "508",
"avs_zipcode": "80100",
"email": "john.doe@test.ducapp.net",
"phone": "+12345678901",
"externalID": "Ext-2542643735"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/token/p2p' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"toAddress": "0x14A205B953359F24F41B9b029ee62dc791A07F50",
"amount": 1,
"currency": "USD",
"concept": "Testing 4",
"location": {
"latitude": "-76.25804853625596",
"longitude": "20.888864980079234",
"timestamp": "1635185398"
},
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "Ruben Gonzalez Ramirez",
"expiryDate": "07/29",
"cvc": "123",
"avs_street_name": "Main Street",
"avs_street_number": "508",
"avs_zipcode": "80100",
"email": "john.doe@test.ducapp.net",
"phone": "+12345678901",
"externalID": "Ext-2542643735"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"toAddress": "0x14A205B953359F24F41B9b029ee62dc791A07F50",
"amount": 1,
"currency": "USD",
"concept": "Testing 4",
"location": {
"latitude": "-76.25804853625596",
"longitude": "20.888864980079234",
"timestamp": "1635185398"
},
"creditCardNumber": "5454545454545454",
"creditCardHolderName": "Ruben Gonzalez Ramirez",
"expiryDate": "07/29",
"cvc": "123",
"avs_street_name": "Main Street",
"avs_street_number": "508",
"avs_zipcode": "80100",
"email": "john.doe@test.ducapp.net",
"phone": "+12345678901",
"externalID": "Ext-2542643735"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/token/p2p", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
}
Request
POST /api/private/transactions/token/p2p
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
toAddress |
string | The receiver wallet address |
amount |
number | The the amount to send |
currency |
string | The the currency of the user |
concept |
string | A brief description |
location |
{Location} |
Information on the users GPS location at the time of the transaction |
creditCardNumber |
string | Information for payment, credit card number |
creditCardHolderName |
string | Information for payment, name that appears on the credit card |
expiryDate |
string | Information for payment, expiration date |
cvc |
string | Information for payment, cvc |
avs_street_name |
string | Information for payment, street name |
avs_street_number |
string | Information for payment, residence number |
avs_zipcode |
string | Information for payment, zip code |
email |
string | Email of the credit card owner |
phone |
string | Phone number of the credit card owner |
merchant_external_id |
string | External id for the current merchant for this transaction |
paymentLink |
boolean | Whether to create a payment link or not, to complete the payment |
Location
NAME | TYPE | DESCRIPTION |
---|---|---|
latitude |
string | Latitude |
longitude |
string | Longitude |
timestamp |
string | Timestamp |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
Payments
Create Payment Order
Endpoint to create a payment order. It could be completed via dynamic link or QR Code.
import requests
import json
url = "https://backend.ducapp.net/api/private/payments/order"
payload = json.dumps({
"toWalletAddress": "0x2485EAeF87343A2e51c9E52BDA02D51D9d51202E",
"amount": 1,
"currency": "USD",
"callbackUrl": "https://webhook.site/5f5351e3-4a49-4586-af1e-72b34307d7b6",
"expiryTime": {
"amount": 24,
"unit": "hours"
},
"description": "Testing",
"externalID": "Ext-13323521379524536",
"merchantId": "Merchant-c22682FE6724542"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/payments/order' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"toWalletAddress": "0x2485EAeF87343A2e51c9E52BDA02D51D9d51202E",
"amount": 1,
"currency": "USD",
"callbackUrl": "https://webhook.site/5f5351e3-4a49-4586-af1e-72b34307d7b6",
"expiryTime": {
"amount": 24,
"unit": "hours"
},
"description": "Testing",
"externalID": "Ext-13323521379524536",
"merchantId": "Merchant-c22682FE6724542"
}'
var myHeaders = new Headers()
myHeaders.append('authorization', 'Bearer <YOUR_ACCESS_TOKEN>')
myHeaders.append('x-api-key', '<YOUR_API_KEY>')
myHeaders.append('Content-Type', 'application/json')
var raw = JSON.stringify({
toWalletAddress: '0x2485EAeF87343A2e51c9E52BDA02D51D9d51202E',
amount: 1,
currency: 'USD',
callbackUrl: 'https://webhook.site/5f5351e3-4a49-4586-af1e-72b34307d7b6',
expiryTime: {
amount: 24,
unit: 'hours',
},
description: 'Testing',
externalID: 'Ext-13323521379524536',
merchantId: 'Merchant-c22682FE6724542',
})
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow',
}
fetch('https://backend.ducapp.net/api/private/payments/order', requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error))
Example Response:
{
"status": "pending",
"externalID": "Ext-13323521379524536",
"toWalletAddress": "0x2485EAeF87343A2e51c9E52BDA02D51D9d51202E",
"amount": 1,
"currency": "USD",
"description": "Testing",
"createdAt": "2023-01-22T02:29:39.765Z",
"updatedAt": "2023-01-22T02:29:39.974Z",
"orderId": "OI0000000229",
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUwAAAFMCAYAAACg...gAkASgRMAFAiYAKA0v8DEJvs1M02O2gAAAAASUVORK5CYII=",
"dynamicLink": "https://ducwallet.page.link/payment/1/USD/Testing/Ext-13323521379524536/OI0000000229/0x2485EAeF87343A2e51c9E52BDA02D51D9d51202E/DYNAMIC_PAYMENT",
"expiresAt": "2023-01-23T02:29:39.765Z"
}
Request
POST /api/private/payments/order
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
toWalletAddress |
string | The wallet address of the user that is goint to receive the payment |
amount |
number | The amount of the payment |
currency |
string | The currency of the payment |
callbackUrl |
string | (Optional) Url to be notified about the payment status. If not provided api client callback url will be used instead |
expiryTime |
{Expiry} |
Payment expiration time object |
description |
string | A biref description of the payment |
externalID |
string | External ID |
merchantId |
string | Merchant ID |
Expiry
NAME | TYPE | DESCRIPTION |
---|---|---|
amount |
string | The amount of time |
unit |
number | The time unit |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
toWalletAddress |
string | The wallet address of the user that is goint to receive the payment |
amount |
number | The amount of the payment |
currency |
string | The currency of the payment |
expiresAt |
string | Payment expiration date |
description |
string | A biref description of the payment |
externalID |
string | External ID |
status |
string | Initial status of the payment |
orderId |
string | Order ID |
qrCode |
string | QR Code to complete the payment |
dynamicLink |
string | Dynamic link to complet the payment |
Get Order Details
Endpoint to get the transaction order details
import requests
url = "https://backend.ducapp.net/api/private/payments/order/OI0000000229"
payload={}
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location -g --request GET 'https://backend.ducapp.net/api/private/payments/order/OI0000000229' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>'
var myHeaders = new Headers()
myHeaders.append('x-api-key', '<YOUR_API_KEY>')
myHeaders.append('authorization', 'Bearer <YOUR_ACCESS_TOKEN>')
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow',
}
fetch('https://backend.ducapp.net/api/private/payments/order/OI0000000229', requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error))
Example Response:
{
"status": "pending",
"externalID": "Ext-13323521379524536",
"toWalletAddress": "0x2485EAeF87343A2e51c9E52BDA02D51D9d51202E",
"amount": 1,
"currency": "USD",
"description": "Testing",
"orderId": "OI0000000229",
"dynamicLink": "https://ducwallet.page.link/payment/1/USD/Testing/Ext-13323521379524536/OI0000000229/0x2485EAeF87343A2e51c9E52BDA02D51D9d51202E/DYNAMIC_PAYMENT",
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUwAAAFMCAY...KA0v8DEJvs1M02O2gAAAAASUVORK5CYII=",
"expiresAt": "2023-01-23T02:29:39.765Z"
}
Request
GET /api/private/payments/order/{orderId}
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Path
NAME | TYPE | DESCRIPTION |
---|---|---|
orderId |
string | The order id |
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
toWalletAddress |
string | The wallet address of the user that is goint to receive the payment |
amount |
number | The amount of the payment |
currency |
string | The currency of the payment |
expiresAt |
string | Payment expiration date |
description |
string | A biref description of the payment |
externalID |
string | External ID |
status |
string | Initial status of the payment |
orderId |
string | Order ID |
qrCode |
string | QR Code to complete the payment |
dynamicLink |
string | Dynamic link to complet the payment |
Order Status Changes
All status changes will be sent using a Web-hook, provided by the third party:
Example Payload:
{
"expiryTime": {
"amount": 24,
"unit": "hours"
},
"status": "confirmed",
"externalID": "PaymentOrder-24b2c4cc-e881-4242-972a-93ee271802bd",
"amount": 15.49,
"currency": "CAD",
"description": "We need to generate the back-end SCSI firewall!",
"callbackUrl": "https://webhook.site/461607fc-0f7a-49db-974b-8a6ae9d86ef1",
"createdAt": "2024-01-08T16:30:06.927Z",
"updatedAt": "2024-01-08T16:43:09.532Z",
"confirmedAt": "2024-01-08T16:43:09.532Z",
"expiresAt": "2024-01-09T16:30:06.927Z",
"id": "659c230e2b388a5a7d327561"
}
-
externalID
: You should use this field to match the order sent. -
status
:pending
: The initial order status. When the order is first created this is the value of thestatus
field.confirmed
: After the payment is completed using the dynamic link or QR code via DUC App application theconfirmed
value will be sended.expired
: After the valid time of the order has ended theexpired
status will be sended.
Top up
Get Operators
Endpoint to get the operators given a valid phone number.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/topup/operators"
payload = json.dumps({
"destination": "+5352552615",
"currency": "USD"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/topup/operators' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"destination": "+5352552615",
"currency": "USD"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"destination": "+5352552615",
"currency": "USD"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/topup/operators", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"data": {
"operators": [
{
"id": 161,
"name": "CubaCel Cuba",
"countryName": "Cuba",
"countryIsoCode": "CUB",
"products": [
{
"id": 35718,
"name": "CubaCel Cuba 250 CUP",
"description": "250 CUP",
"operatorId": 161,
"operator": "CubaCel Cuba",
"serviceId": 1,
"service": "Mobile",
"label": "250 CUP (11.02 USD)",
"wholesalePrice": {
"amount": 13.18,
"currency": "CAD"
},
"salePrice": {
"amount": 11.02,
"currency": "USD"
},
"retailPrice": {
"amount": 15.36,
"currency": "CAD"
},
"source": {
"amount": 13.18,
"currency": "CAD"
},
"destination": {
"amount": 250,
"currency": "CUP"
},
"requiredFields": {
"creditPartyIdentifier": [
"mobileNumber"
],
"debitPartyIdentifier": [],
"statementIdentifier": [],
"beneficiary": [],
"sender": []
}
},
{
"id": 35719,
"name": "CubaCel Cuba 500 CUP",
"description": "500 CUP",
"operatorId": 161,
"operator": "CubaCel Cuba",
"serviceId": 1,
"service": "Mobile",
"label": "500 CUP (22.04 USD)",
"wholesalePrice": {
"amount": 26.36,
"currency": "CAD"
},
"salePrice": {
"amount": 22.04,
"currency": "USD"
},
"retailPrice": {
"amount": 30.71,
"currency": "CAD"
},
"source": {
"amount": 26.36,
"currency": "CAD"
},
"destination": {
"amount": 500,
"currency": "CUP"
},
"requiredFields": {
"creditPartyIdentifier": [
"mobileNumber"
],
"debitPartyIdentifier": [],
"statementIdentifier": [],
"beneficiary": [],
"sender": []
}
}
]
}
]
}
}
Request
POST /api/private/transactions/topup/operators
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
destination |
string | The phone number to get asociated operators |
currency |
string | The currency in which you want to display the prices of the products |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
operators |
[Operator] | Array of operators |
Operator
NAME | TYPE | DESCRIPTION |
---|---|---|
id |
string | Opeartor Id |
name |
string | Opeartor name |
countryName |
string | Opeartor country name |
products |
[Product] | Array of products |
Product
NAME | TYPE | DESCRIPTION |
---|---|---|
id |
string | Product Id |
name |
string | Product name |
service |
string | Product service name |
label |
string | Product label |
salePrice |
[SalePrice] | SalePrice obejct |
destination |
[Destination] | Destination obejct |
SalePrice
NAME | TYPE | DESCRIPTION |
---|---|---|
amount |
number | Product sale price amount |
currency |
string | Product sale price currency |
Destination
NAME | TYPE | DESCRIPTION |
---|---|---|
amount |
number | Product destination amount |
currency |
string | Product destination currency |
Top up
Endpoint to send mobile recharge to one or multiple phone numbers.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/topup/send"
payload = json.dumps({
"productId": 35718,
"receiverName": "Darian",
"destinations": [
"+5352552615"
],
"currency": "USD",
"isScheduled": False,
"scheduledDate": None,
"paymentLink": True,
"merchant_external_id": "Top-Up Test-1"
})
headers = {
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/topup/send' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"productId": 35718,
"receiverName": "Darian",
"destinations": [
"+5352552615"
],
"currency": "USD",
"isScheduled": false,
"scheduledDate": null,
"paymentLink": true,
"merchant_external_id": "Top-Up Test-1"
}'
var myHeaders = new Headers();
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"productId": 35718,
"receiverName": "John",
"destinations": [
"+5352552615"
],
"currency": "USD",
"isScheduled": false,
"scheduledDate": null,
"paymentLink": true,
"merchant_external_id": "Top-Up Test-1"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://backend.ducapp.net/api/private/transactions/topup/send", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Response:
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
}
}
Request
POST /api/private/transactions/topup/send
Host: backend.ducapp.net
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
productId |
number | The product id |
receiverName |
string | Name of the beneficiary of the top up |
destinations |
[string] | *Array of phone numbers |
currency |
string | The user currency |
isScheduled |
string | If the top up wants to be scheduled or not |
scheduledDate |
string | Schedule date |
paymentLink |
string | Whether to create a payment link or not, to complete the payment |
merchant_external_id |
boolean | External id for the current merchant for this transaction |
location |
{Location} |
Information on the users GPS location at the time of the transaction |
creditCardNumber |
string | Information for payment, credit card number |
creditCardHolderName |
string | Information for payment, name that appears on the credit card |
expiryDate |
string | Information for payment, expiration date |
cvc |
string | Information for payment, cvc |
avs_street_name |
string | Information for payment, street name |
avs_street_number |
string | Information for payment, residence number |
avs_zipcode |
string | Information for payment, zip code |
email |
string | Email of the credit card owner |
phone |
string | Phone number of the credit card owner |
- All phone numbers must be from the same operator
Location
NAME | TYPE | DESCRIPTION |
---|---|---|
latitude |
string | Latitude |
longitude |
string | Longitude |
timestamp |
string | Timestamp |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
number | The status of the transaction |
payload |
string | Corresponding message |
paymentLink |
{Payment Link} |
Payment Link Object |
Payment Link
NAME | TYPE | DESCRIPTION |
---|---|---|
url |
string | Payment link |
id |
string | Payment link Id |
Transactions
Get Transactions
Endpoint to get the user transactions as sender or receiver.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions?skip=0&limit=10"
payload = json.dumps({
"filter": {
"status": "queued"
}
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions?skip=0&limit=10' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"filter": {
"status": "queued"
}
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
filter: {
status: "queued",
},
});
var requestOptions = {
method: "GET",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch(
"https://backend.ducapp.net/api/private/transactions?skip=0&limit=10",
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response
{
"data": [
{
"transactionAmount": 100,
"transactionStatus": "queued",
"currency": "EUR",
"type": "CASH_OUT_TRANSACTION",
"concept": "Testing",
"transactionID": "AA00376276",
"id": "63cc8dd9859b0932b196eb1e"
},
{
"transactionAmount": 100,
"transactionStatus": "queued",
"currency": "EUR",
"type": "CASH_OUT_TRANSACTION",
"concept": "Testing",
"transactionID": "AA00376274"
}
]
}
Request
GET /api/private/transactions?skip={spik}&limit={limit}
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Path
NAME | TYPE | DESCRIPTION |
---|---|---|
skip |
number | Page number |
limit |
number | Amount of records |
Request Body
NAME | TYPE | DESCRIPTION |
---|---|---|
filter |
{Filter} |
The id of the requested quotation |
Filter
NAME | TYPE | DESCRIPTION |
---|---|---|
status |
string | Status code of the transaction |
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
data |
[Transaction] |
The status of the transaction |
Transaction
NAME | TYPE | DESCRIPTION |
---|---|---|
transactionAmount |
number | The amount of the transaction |
transactionStatus |
string | The status of the transaction |
currency |
string | The currency of the transaction |
type |
string | The type of the transaction |
concept |
string | The concept of the transaction |
transactionID |
string | The id of the transaction |
Get Transaction by ID
Endpoint to get transaction by id, externalId or transactionID
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/AA00376276"
payload = json.dumps({
"filter": {
"status": "queued"
}
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions/AA00376276' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"filter": {
"status": "queued"
}
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
filter: {
status: "queued",
},
});
var requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow",
};
fetch(
"https://backend.ducapp.net/api/private/transactions/AA00376276",
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response
{
"data": {
"transactionAmount": 100,
"transactionStatus": "queued",
"currency": "EUR",
"type": "CASH_OUT_TRANSACTION",
"concept": "Testing",
"transactionID": "AA00376276"
}
}
Request
GET /api/private/transactions/{id}
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Path
NAME | TYPE | DESCRIPTION |
---|---|---|
id |
string | Id, externalId or transactionID |
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
data |
[Transaction] |
Transaction info |
Transaction
NAME | TYPE | DESCRIPTION |
---|---|---|
transactionAmount |
number | The amount of the transaction |
transactionStatus |
string | The status of the transaction |
currency |
string | The currency of the transaction |
type |
string | The type of the transaction |
concept |
string | The concept of the transaction |
transactionID |
string | The id of the transaction |
Cancel Transaction
Endpoint to cancel a transaction given an externalId.
import requests
import json
url = "https://backend.ducapp.net/api/private/transactions/cash-out/changeStatus"
payload = json.dumps({
"externalID": "Ext-546735635",
"description": "Testing"
})
headers = {
'x-api-key': '<YOUR_API_KEY>',
'authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/changeStatus' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"externalID": "Ext-546735635",
"description": "Testing"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
externalID: "Ext-546735635",
description: "Testing",
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch(
"https://backend.ducapp.net/api/private/transactions/cash-out/changeStatus",
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Example Response
{
"data": {
"status": 200,
"payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
}
}
Request
POST /api/private/transactions/{id}
authorization: Bearer <YOUR_ACCESS_TOKEN>
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request Path
NAME | TYPE | DESCRIPTION |
---|---|---|
id |
string | Id, externalId or transactionID |
Request Body
Empty
Response Body
NAME | TYPE | DESCRIPTION |
---|---|---|
data |
[Transaction] |
The status of the transaction |
Transactions Error Status
CODE | MESSAGE |
---|---|
CREATED |
The transaction is created |
CONFIRMED |
The transaction is confirmed |
CONFIRMED-UNDER-REVIEW-SLS |
The transaction is under sanctions list screening for sender or beneficiary |
CONFIRMED-WAITING-FOR-PICKUP |
The transaction is available for cash pick up by the beneficiary. Applicable for universal cash pick up only |
REJECTED |
The transaction is rejected |
REJECTED-SLS-SENDER |
The transaction is rejected as the sender failed the sanctions list screening |
REJECTED-SLS-BENEFICIARY |
The transaction is rejected as the beneficiary failed the sanctions list screening |
REJECTED-INVALID-BENEFICIARY |
The transaction is rejected as the beneficiary account is invalid |
REJECTED-BARRED-BENEFICIARY |
The transaction is rejected as the beneficiary is blacklisted |
REJECTED-BARRED-SENDER |
The transaction is rejected as the sender is blacklisted |
REJECTED-INVALID-BENEFICIARY-DETAILS |
The transaction is rejected as the beneficiary details are invalid, e.g. name, email, phone number |
REJECTED-LIMITATIONS-ON-TRANSACTION-VALUE |
The transaction is rejected as the transaction value exceeds the transaction value limit |
REJECTED-LIMITATIONS-ON-SENDER-VALUE |
The transaction is rejected as the transaction value exceeds the value that the sender can send |
REJECTED-LIMITATIONS-ON-BENEFICIARY-VALUE |
The transaction is rejected as the transaction value exceeds the value that the beneficiary can receive |
REJECTED-LIMITATIONS-ON-ACCOUNT-VALUE |
The transaction is rejected as the transaction value exceeds the value that the account can receive |
REJECTED-LIMITATIONS-ON-SENDER-QUANTITY |
The transaction is rejected as the sender exceeded the number of transactions that the sender can send |
REJECTED-LIMITATIONS-ON-BENEFICIARY-QUANTITY |
The transaction is rejected as the beneficiary exceeded the number of transactions that the beneficiary can receive |
REJECTED-LIMITATIONS-ON-ACCOUNT-QUANTITY |
The transaction is rejected as the account exceeded the number of transactions that the account can receive |
REJECTED-COMPLIANCE-REASON |
The transaction is rejected due to compliance reason |
REJECTED-PAYER-CURRENTLY-UNAVAILABLE |
The transaction is rejected as the payer is either under payer maintenance or currently unavailable |
REJECTED-INSUFFICIENT-BALANCE |
The transaction is rejected due to insufficient balance on the pay-in partner’s account |
CANCELLED |
The transaction is cancelled upon request |
SUBMITTED |
The transaction is submitted to the pay-out partner for processing |
AVAILABLE |
The transaction is available for cash pick up by the beneficiary |
COMPLETED |
The transaction is completed and payout has been made to the beneficiary |
REVERSED |
The transaction is reversed |
DECLINED |
The transaction is declined by the pay-out partner |
DECLINED-SLS-SENDER |
The transaction is declined by the pay-out partner as the sender failed the sanctions list screening |
DECLINED-SLS-BENEFICIARY |
The transaction is declined by the pay-out partner as the beneficiary failed the sanctions list screening |
DECLINED-INVALID-BENEFICIARY |
The transaction is declined by the pay-out partner due to invalid beneficiary, e.g. bank account number |
DECLINED-BARRED-BENEFICIARY |
The transaction is declined by the pay-out partner as the beneficiary is blacklisted |
DECLINED-UNSUPPORTED-BENEFICIARY |
The transaction is declined by the pay-out partner as the beneficary does not allow overseas transaction or payer is unavailable for pay out |
DECLINED-INVALID-BENEFICIARY-DETAILS |
The transaction is declined by the pay-out partner as the beneficiary’s details is invalid, e.g. name or address |
DECLINED-INVALID-SENDER-DETAILS |
The transaction is declined by the pay-out partner as the sender details is in wrong format per pay-out partners’ rules on sender. eg: character type length |
DECLINED-LIMITATIONS-ON-TRANSACTION-VALUE |
The transaction is declined by the pay-out partner as the value exceeds the amount allowed per transaction |
DECLINED-LIMITATIONS-ON-SENDER-VALUE |
The transaction is declined by the pay-out partner as the transaction value exceeds the value that the sender can send per transaction |
DECLINED-LIMITATIONS-ON-BENEFICIARY-VALUE |
The transaction is declined by the pay-out partner as the transaction value exceeds the total value that the beneficiary can receive |
DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE |
The transaction is declined by the pay-out partner as the transaction value exceeds the total value that the beneficiary can receive per account |
DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-DAILY |
The transaction is declined by the pay-out partner as the transaction value exceeds the total value that the beneficiary can receive per day |
DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-WEEKLY |
The transaction is been declined by the pay-out partner as the transaction value exceeds the total value that the beneficiary can receive per week |
DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-MONTHLY |
The transaction is declined by the pay-out partner as the transaction value exceeds the total value that the beneficiary can receive per month |
DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-YEARLY |
The transaction is declined by the pay-out partner as the transaction value exceeds the total value that the beneficiary can receive per year |
DECLINED-LIMITATIONS-ON-SENDER-QUANTITY |
The transaction is declined by the pay-out partner as the sender has exceeded the number of transactions that the sender can send |
DECLINED-LIMITATIONS-ON-BENEFICIARY-QUANTITY |
The transaction is declined by the pay-out partner as the beneficiary exceeds the total number of transactions that the beneficiary can receive |
DECLINED-LIMITATIONS-ON-ACCOUNT-QUANTITY |
The transaction is declined by the pay-out partner as the beneficiary’s account exceeds the total number of transactions that the account can receive |
DECLINED-DUPLICATED-TRANSACTION |
The transaction is declined by the pay-out partner due to duplication in the transaction |
DECLINED-CANCELLED |
The transaction is declined by the pay-out partner as the pay-in partner contacted support and asked for the transaction to be cancelled (this can only happen during the beneficiary registration time) |
DECLINED-REFUSED |
The transaction is declined by the pay-out partner as the beneficiary has actively refused to perform the required onboarding, the time has elapsed or the beneficiary was unresponsive |
DECLINED-COMPLIANCE-REASON |
The transaction is declined by the pay-out partner due to compliance reason |
DECLINED-INVALID-PURPOSE-OF-REMITTANCE |
The transaction is declined by the pay-out partner due to invalid purpose of remittance, e.g. pay-out partner does not allow gifts/donations |
DECLINED-PAYER-CURRENTLY-UNAVAILABLE |
The transaction is declined by the pay-out partner as their system are not available |
Web Hooks
Transaction Status Changes
All status changes in a transaction will be notified using a Web-hook, provided by the third party:
Example Payload:
{
"event": "GIFT_CARD_ADD_TOKEN",
"transaction": {
"transactionAmount": 10,
"transactionStatus": "confirmed",
"currency": "USD",
"type": "GIFT_CARD_ADD_TOKEN",
"concept": "transmitting the firewall won't do anything, we need to generate the back-end SQL sensor!",
"externalID": "GiftCard-CREDIT-9ae68789-5b74-4efc-bede-23de1792d34f",
"createdAt": "2024-01-06T00:34:12.930Z",
"updatedAt": "2024-01-06T00:39:43.786Z",
"transactionID": "AA00380577",
"completedAt": "2024-01-06T00:39:42.640Z"
}
}
-
externalID
: You should use this field to keep track of the the transaction. -
status
:pending
: When a transaction is first created this is the value of thestatus
field. This is the initial transaction status.queued
: The transaction is queued to be processed by an administrator. This is an intermediate status.processed
: When an administrator send the transaction for processing. This is an intermediate status.confirmed
: When the transaction is sent to delivery. This is a success final status.failed
: The transaction failed because of some rule(min or max limits, other rules) or error. This is a failed final status.rejected
: Rejected for some reason. An administrator have enough reasons to believe the transaction should be rejected. This is a failed final status.
Testing
Credit Card Success Payments
Credit card data sandbox. Testing porpouse only.
Type | Card Number | CVC | Expiry Date |
---|---|---|---|
Visa | 4242424242424242 | Any 3 digits | Any future date |
Visa (debit) | 4000056655665556 | Any 3 digits | Any future date |
Mastercard | 5555555555554444 | Any 3 digits | Any future date |
Mastercard (2-series) | 2233003122003222 | Any 3 digits | Any future date |
Mastercard (debit) | 5200828282828210 | Any 3 digits | Any future date |
Mastercard (prepaid) | 5105105105105100 | Any 3 digits | Any future date |
American Express | 378282246310005 | Any 3 digits | Any future date |
American Express | 371449635398431 | Any 3 digits | Any future date |
Discover | 6011111111111117 | Any 3 digits | Any future date |
Discover | 6011000990139424 | Any 3 digits | Any future date |
Credit Card Declined Payments
Credit card data sandbox. Testing porpouse only.
Description | Card Number | Error Code | Declined Code |
---|---|---|---|
Generic decline | 4000000000000002 | card_declined | generic_decline |
Insufficient funds decline | 4000000000009995 | card_declined | insufficient _funds |
Lost card decline | 4000000000009987 | card_declined | lost_card |
Stolen card decline | 4000000000009979 | card_declined | stolen_card |
Expired card decline | 4000000000000069 | expired_card | n/a |
Incorrect CVC decline | 4000000000000127 | incorrect_cvc | n/a |
Processing error decline | 4000000000000119 | processing_error | n/a |
Incorrect number decline | 4242424242424241 | incorrect_number | n/a |
Errors
Error Codes
The DUC API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- The request could not be understood by the server due to malformed syntax. |
401 | Unauthorized -- Your API key is wrong. |
403 | Forbidden -- The endpoint requested is hidden for administrators only. |
404 | Not Found -- The specified endpoint could not be found. |
405 | Method Not Allowed -- You tried to access an endpoint with an invalid method. |
406 | Not Acceptable -- You requested a format that isn't JSON. |
410 | Gone -- The endpoint requested has been removed from our servers. |
429 | Too Many Requests -- You're requesting too many endpoints! Slow down! |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
Error Messages
MESSAGE |
---|
Unauthorized |
Resource not found |
Invalid parameter |
Source country not authorized |
Payer is inactive in your |
Invalid payer |
Payer is currently unavailable |
Destination amount is invalid |
Parameter page is outside of the page range |
Destination currency not provided by payer |
Transaction amount below minimum of the selected payer |
Transaction amount exceeds maximum of the selected payer |
Account is invalid |
Transaction amount limit exceeded |
Account quantity limit exceeded |
Limit exceeded |
External ID has already been used |
Transaction has already been confirmed |
Transaction can not be confirmed |
Transaction can no longer be confirmed, quotation has expired |
Transaction can not be confirmed, insufficient balance |
Transaction can not be cancelled |
Method is not supported by this payer |
Method is currently unavailable |
Attachment is too big |
Max number of attachments reached |
Adding attachment is not allowed after transaction is confirmed |
Transaction attachment not found |
Attachment file type is invalid |
Quotation not found |
Quotation has expired |
Transaction not |
Unexpected error, please contact our support team |
Error Examples
Invalid Client
Missing or incorrect api key credentials.
Associated endpoints: All endpoints
{
"error": "INVALID_CLIENT",
"message": "INVALID_CLIENT_ERROR",
"statusCode": 401
}
Invalid Token
Missing or expired authorization header.
Associated endpoints: All endpoints
{
"name": "UnauthorizedError",
"message": "jwt expired",
"code": "invalid_token",
"status": 401,
"inner": {
"name": "TokenExpiredError",
"message": "jwt expired",
"expiredAt": "2022-02-11T22:34:54.000Z"
}
}
Pending Operations
The User has pending operations and has to wait for it to finish.
Associated endpoints: All endpoints
{
"error": "PENDING_OPERATION_ERROR",
"message": "You have pending operations, please wait or contact the support team.",
"statusCode": 412
}
Wrong type or missing required field
Incorrect type or missing required field.
Associated endpoints: All endpoints
{
"error": "BAD_REQUEST",
"message": "BAD_REQUEST",
"statusCode": 400
}
Wrong App version
App version is out of date.
Associated endpoints:
- POST
/api/private/users/register
{
"error": "BAD_REQUEST",
"message": "You have an older version. Please update from ducapp.com",
"statusCode": 400
}
Invalid email/phone
The email or phone provided is invalid or is already registered.
Associated endpoints:
- POST
/api/private/users/register
{
"error": "BAD_REQUEST",
"message": "The email or telephone provided is invalid or already exists in the system",
"statusCode": 400
}
Invalid pattern image
The base64 string of the image field does not correspond with a face pattern.
Associated endpoints:
- POST
/api/private/users/register
{
"error": "BAD_REQUEST",
"message": "No faces in the image",
"statusCode": 400
}
Missing required fields
The call is missing required fields
Associated endpoints:
- POST
/api/private/users/register
{
"error": "BAD_REQUEST",
"message": "Missing required fields",
"statusCode": 400
}
Invalid activation code
The activation code provided is invalid.
Associated endpoints:
- POST
/api/private/users/verify
{
"error": "BAD_REQUEST",
"message": "Invalid activation code",
"statusCode": 400
}
Invalid user ID format
The ID format sent is invalid
Associated endpoints:
- POST
/api/private/users/verify
{
"error": "BAD_REQUEST",
"message": "Cast to ObjectId failed for value \"621fcfaab0002e5f8c21bea\" at path \"_id\" for model \"User\"",
"statusCode": 400
}
Wrong credentials
The credentials provided do not correspond with the registered user.
Associated endpoints:
- POST
/api/auth/login
{
"error": "BAD_CREDENTIALS",
"message": "You have provided an incorrect email, phone and/or an incorrect password",
"statusCode": 401
}
Wrong credit card
Wrong credit card, either invalid or in use by another user.
Associated endpoints:
- POST
/api/private/transactions/cash-out/confirm-send
- POST
/api/private/transactions/cash-out/creditcard
- POST
/api/private/transactions/cash-out/delivery
- POST
/api/private/transactions/token/p2p
{
"error": "BAD_REQUEST",
"message": "Customer vault can not be persisted on database",
"statusCode": 400
}
Incorrect Credit Card Number.
Associated endpoints:
- POST
/api/private/transactions/token/buy
Wrong credit card response
{
"error": "BAD_REQUEST",
"message": "Customer not approved by Your card number is incorrect.",
"statusCode": 400
}
Missing email field.
Associated endpoints:
- POST
/api/private/transactions/cash-out/confirm-send
Wrong credit card response
{
"error": "BAD_REQUEST",
"message": "Customer can't be created: Missing field email.",
"statusCode": 400
}
Invalid operation fee
The field amount and deliveryAmount did not correspond according to the fee and the currency exchange rate.
Associated endpoints:
- POST
/api/private/transactions/cash-out/creditcard
- POST
/api/private/transactions/cash-out/delivery
{
"error": "BAD_REQUEST",
"message": "Invalid operation fee received, please check your data.",
"statusCode": 400
}
Invalid or not supported coin
The field amount and deliveryAmount did not correspond according to the fee and the currency exchange rate.
Associated endpoints:
- POST
/api/private/transactions/cash-out/confirm-send
- POST
/api/private/transactions/cash-out/creditcard
- POST
/api/private/transactions/cash-out/delivery
- POST
/api/private/transactions/token/p2p
{
"error": "BAD_REQUEST",
"message": "Invalid or not supported coin codename provided",
"statusCode": 400
}
Invalid transaction amount
Invalid transaction amount received.
Associated endpoints:
- POST
/api/private/transactions/cash-out/confirm-send
- POST
/api/private/transactions/cash-out/creditcard
- POST
/api/private/transactions/cash-out/delivery
- POST
/api/private/transactions/token/p2p
{
"error": "BAD_REQUEST",
"message": "Invalid transaction amount received, please check your data",
"statusCode": 400
}
Invalid externalID
The externalID provided for the transaction order already exists.
Associated endpoints:
- POST
/api/private/payments/order
{
"error": "BAD_REQUEST",
"message": "The externalID provided for the transaction order already exists.",
"statusCode": 400
}
Invalid wallet address
The wallet address of the recipient of the transaction order provided is invalid.
Associated endpoints:
- POST
/api/private/payments/order
{
"error": "BAD_REQUEST",
"message": "The wallet address of the recipient of the transaction order provided is invalid.",
"statusCode": 400
}
The receiver wallet address in invalid, either the format is incorrect or does not exist.
Associated endpoints:
- POST
/api/private/transactions/token/p2p
- POST
/api/private/balance
Invalid wallet address response
{
"error": "BAD_REQUEST",
"message": "The receiver wallet address in invalid",
"statusCode": 400
}
Transactions to the same wallet address are forbidden.
Associated endpoints:
- POST
/api/private/transactions/token/p2p
Invalid wallet address response
{
"error": "BAD_REQUEST",
"message": "Transactions to the same wallet address are forbidden",
"statusCode": 400
}
Invalid transaction oder
The transaction order has not been found.
Associated endpoints:
- POST
/api/private/payments/order/:identifier
{
"error": "NOT_FOUND",
"message": "The transaction order has not been found.",
"statusCode": 404
}
Invalid currency
The name of the currency is invalid.
Associated endpoints:
- GET
/api/private/rates?base={currency}
{
"error": "BAD_REQUEST",
"message": "Validation error. Invalid coin codename",
"statusCode": 400
}
Invalid fee amount
The amount field is required and must be greater than zero.
Associated endpoints:
- GET
/api/private/fees/cu/deliveryCUP/Habana?amount={amount}
{
"error": "BAD_REQUEST",
"message": "The <<amount>> is required and must be greater than zero.",
"statusCode": 400
}
Invalid transaction
Not transaction match with filter criteria.
Associated endpoints:
- GET
/api/private/transactions
- GET
/api/private/transactions/:identifier
{
"error": "BAD_REQUEST",
"message": "Not transaction match with filter criteria",
"statusCode": 400
}
User low trust level
The user does not meet the required trust level to make a transaction.
Associated endpoints: All endpoints that create a transaction.
{
"error": "BAD_REQUEST",
"message": "Please complete your profile and contact support@ducapp.com",
"statusCode": 400
}
Denied by a Rule
A system rule prevents the user from performing the transaction.
Note: The error message may vary.
Associated endpoints: All endpoints that create a transaction.
{
"error": "BAD_REQUEST",
"message": "Temporary, max limit is $600 in 7 days",
"statusCode": 400
}
Cancel Transaction
The current transaction status is incorrect.
Associated endpoints:
- POST
/api/private/transactions/cash-out/changeStatus
{
"error": "BAD_REQUEST",
"message": "You are trying to update a payment with incorrect status",
"statusCode": 400
}