NAV navbar
shell python javascript

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": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MTlkNGQ0MjA1MGUyOTIxNTYwMmQzNGMiLCJmaXJzdE5hbWUiOiJIYWJsYXgiLCJsYXN0TmFtZSI6IkhhYmxheCIsImVtYWlsIjoiaW5mb0BoYWJsYXMuY29tIiwicGhvbmUiOiIrMTMwNTkwMzI2ODIiLCJ3YWxsZXRBZGRyZXNzIjoiMHhkOTUzOTkzRDA5OTBiZGVkZDJCQzJlNWRFNUQ1N2MyM0EyRTMyNmQwIiwiZGVmYXVsdEN1cnJlbmN5IjoiVVNEIiwicm9sZXMiOlsiNWRlMDMwMmE1OGU1MzAwMDBkZTBkZDJjIl0sImxhbmd1YWdlIjoiRU4iLCJsYXN0TG9naW5BdCI6IjIwMjEtMTItMjhUMTU6NTg6MzYuNjA1WiIsInN0YXR1cyI6IkFjdGl2YXRlZCIsInZlcmlmaWVkIjpmYWxzZSwidHJ1c3RMZXZlbCI6NywiaXNCbG9ja2VkIjpmYWxzZSwibG9naW5GYWlsQ291bnQiOjAsImJsb2NrZWRVbnRpbCI6bnVsbCwiaWF0IjoxNjQzOTI2MDcwLCJleHAiOjE2NDM5NDQwNzB9.fNp9TwXvn5964ZaKeDaI221lwHQJx4CFVMp8iO--e_o"
}

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

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

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

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 coutry 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 coutry 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 payes asociated 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/request-send"

payload = json.dumps({
  "payer_id": "467",
  "destination": {
    "currency": "NPR"
  },
  "quotationMode": "SOURCE_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",
  "destination": {
    "currency": "NPR"
  },
  "quotationMode": "SOURCE_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",
  "destination": {
    "currency": "NPR"
  },
  "quotationMode": "SOURCE_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": {
        "wholesale_fx_rate": 132.9797,
        "feeTotal": {
            "currency": "USD",
            "amount": 3.18
        }
    }
}

Request

POST /api/private/transactions/cash-out/request-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
payer_id string The Id of the payer of the selected service
destination {Destination} Destination info
quotationMode string SOURCE_AMOUNT
transactionType string The type of transaction selected from those available by the payer
currency string Currency of the sending user

Destination

NAME TYPE DESCRIPTION
currency string The destination currency

Response Body

NAME TYPE DESCRIPTION
wholesale_fx_rate number Current exchange rate
feeTotal {Fee} Fee amount and currency

Fee

NAME TYPE DESCRIPTION
currency string The fee currency
amount number The fee amount

Request Quotation

Endoint to request a transaction

import requests
import json

url = "https://backend.ducapp.net/api/private/transactions/cash-out/request-send"

payload = json.dumps({
  "payer_id": "467",
  "destination": {
    "currency": "NPR",
    "amount": 20445.96
  },
  "quotationMode": "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",
  "destination": {
    "currency": "NPR",
    "amount": 20445.96
  },
  "quotationMode": "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",
  "destination": {
    "currency": "NPR",
    "amount": 20445.96
  },
  "quotationMode": "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": {
        "creation_date": "2023-01-21T20:59:17Z",
        "expiration_date": "2023-01-21T21:59:17Z",
        "external_id": "AA00376260",
        "payer": {
            "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,
                    "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"
                    ]
                }
            }
        }
    }
}

Request

POST /api/private/transactions/cash-out/request-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
payer_id string The Id of the payer of the selected service
destination {Destination} Destination info
quotationMode string DESTINATION_AMOUNT
transactionType string The type of transaction selected from those available by the payer
currency string Currency of the sending user

Destination

NAME TYPE DESCRIPTION
currency string The destination currency
amount number The destination amount

Response Body

NAME TYPE DESCRIPTION
creation_date string Transaction creation date
expiration_date string Transaction expiration date
external_id string Transaction external id
id number Quotation id
payer {Payer} The payer information

Payer

NAME TYPE DESCRIPTION
id string The payer id
name string The payer name
transaction_types {Transaction Type} The payes asociated 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

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": "29052296",
    "external_id": "AA00376260",
    "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,
    "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": "+19058025826",
    "merchant_external_id": "Ext-12345678"
})

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": "29052296",
    "external_id": "AA00376260",
    "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,
    "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": "+19058025826",
    "merchant_external_id": "Ext-12345678"
}'
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": "29052296",
    "external_id": "AA00376260",
    "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,
    "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": "+19058025826",
    "merchant_external_id": "Ext-12345678"
});

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/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 coutry 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
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

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

Send Money (Cuba)

Get Zones

Endpoint to get the defined zones for the fee calcualtion.

import requests

url = "https://backend.ducapp.net/api/public/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/public/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/public/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/public/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/public/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/public/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/public/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/public/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 Exchange Rate

Endpoint to get the current exchange rate.

import requests

url = "https://backend.ducapp.net/api/public/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/public/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/public/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/public/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 regions 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

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

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

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

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

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

P2P Transfer

Enpoint 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

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

Payments

Endpoint to create a payment link.

import requests
import json

url = "https://backend.ducapp.net/api/private/payments/request-link"

payload = json.dumps({
  "fromWalletAddress": "0x714A084613d73465844260bE9f6352CfB00e7aEe",
  "toWalletAddress": "0xAf04479e540DC8B502AC4688e10e74A135857297",
  "name": "Payment Test",
  "description": "Testing Paymeny Link by API",
  "metadata": {
    "color": "transparent"
  },
  "amount": 150,
  "currency": "USD",
  "allowCustomAmount": False,
  "maxAmount": 250,
  "allowPromoCode": False,
  "collectBillingAddress": True,
  "collectPhoneNumber": True,
  "paymentMethodTypes": []
})

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/request-link' \
--header 'authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "fromWalletAddress": "0x714A084613d73465844260bE9f6352CfB00e7aEe",
    "toWalletAddress": "0xAf04479e540DC8B502AC4688e10e74A135857297",
    "name": "Payment Test",
    "description": "Testing Paymeny Link by API",
    "metadata": {
        "color": "transparent"
    },
    "amount": 150,
    "currency": "USD",
    "allowCustomAmount": false,
    "maxAmount": 250,
    "allowPromoCode": false,
    "collectBillingAddress": true,
    "collectPhoneNumber": true,
    "paymentMethodTypes": []
}'
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({
  "fromWalletAddress": "0x714A084613d73465844260bE9f6352CfB00e7aEe",
  "toWalletAddress": "0xAf04479e540DC8B502AC4688e10e74A135857297",
  "name": "Payment Test",
  "description": "Testing Paymeny Link by API",
  "metadata": {
    "color": "transparent"
  },
  "amount": 150,
  "currency": "USD",
  "allowCustomAmount": false,
  "maxAmount": 250,
  "allowPromoCode": false,
  "collectBillingAddress": true,
  "collectPhoneNumber": true,
  "paymentMethodTypes": []
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://backend.ducapp.net/api/private/payments/request-link", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example Response:

{
    "data": {
        "transaction": {
            "transactionAmount": 150,
            "transactionStatus": "requested",
            "currency": "USD",
            "type": "PAYMENT_REQUEST",
            "concept": "Payment Test - Testing Paymeny Link by API",
            "transactionID": "AA00376286",
        },
        "paymentLink": {
            "url": "https://buy.stripe.com/test_9AQ4jN1RY9bl7Sw5kA",
            "id": "plink_1MSve9KHKfW451028GlZ2vGb"
        }
    }
}

Request

POST api/private/payments/request-link

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 from send request
fromWalletAddress string The wallet address to send request
name string The name of the product
description string The product description
images [string] Array of strings with url of image
metadata object The metadata of the product
amount number The amount of the product
currency string The currency of the product by default is 'CAD'
allowCustomAmount boolean To allow custom amount
maxAmount number Maximum amount of the product
minAmount number Minimum amount of the product by default is amount
allowPromoCode boolean To allow promotion code
collectBillingAddress boolean To collect billing address information
collectPhoneNumber boolean To collect phone number information
paymentMethodTypes array List of payment method types that can be used

Response Body

NAME TYPE DESCRIPTION
transaction {Transaction} Transaction info
paymentLink {Payment Link} Payment Link 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
NAME TYPE DESCRIPTION
url string Payment Link
id string Payment Link id

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

All status changes in a transaction will be sent using a Web-hook, provided by the third party:

Top up

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,
  "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": "voltusv@gmail.com",
  "phone": "+12345678901",
  "externalID": "Ext-546735635"
})

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,
    "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": "voltusv@gmail.com",
    "phone": "+12345678901",
    "externalID": "Ext-546735635"
}'
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,
  "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": "voltusv@gmail.com",
  "phone": "+12345678901",
  "externalID": "Ext-546735635"
});

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
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 (Obtional) To indicate that the top up will be scheduled
posted_date string (Obtional) Date for the top up to be processed (scheduled needs to be true)
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

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

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 pending 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("GET", 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

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] The status of the transaction

Transaction Status

All changes in a transaction will be sent using a Web-hook, provided by the third party:

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

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:

{
    "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:

{
    "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:

{
    "error": "BAD_REQUEST",
    "message": "No faces in the image",
    "statusCode": 400
}

Missing required fields

The call is missing required fields

Associated endpoints:

{
    "error": "BAD_REQUEST",
    "message": "Missing required fields",
    "statusCode": 400
}

Invalid activation code

The activation code provided is invalid.

Associated endpoints:

{
    "error": "BAD_REQUEST",
    "message": "Invalid activation code",
    "statusCode": 400
}

Invalid user ID format

The ID format sent is invalid

Associated endpoints:

{
    "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:

{
    "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:

{
  "error": "BAD_REQUEST",
  "message": "Customer vault can not be persisted on database",
  "statusCode": 400
}

Incorrect Credit Card Number.

Associated endpoints:

Wrong credit card response

{
  "error": "BAD_REQUEST",
  "message": "Customer not approved by Your card number is incorrect.",
  "statusCode": 400
}

Missing email field.

Associated endpoints:

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:

{
  "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:

{
  "error": "BAD_REQUEST",
  "message": "Invalid or not supported coin codename provided",
  "statusCode": 400
}

Invalid transaction amount

Invalid transaction amount received.

Associated endpoints:

{
  "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:

{
  "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:

{
  "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:

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:

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:

{
  "error": "NOT_FOUND",
  "message": "The transaction order has not been found.",
  "statusCode": 404
}

Invalid currency

The name of the currency is invalid.

Associated endpoints:

{
  "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:

{
  "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:

{
  "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:

{
    "error": "BAD_REQUEST",
    "message": "You are trying to update a payment with incorrect status",
    "statusCode": 400
}