NAV navbar
shell python javascript

Utilities

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

Headers:

None Required

Response Body

NAME TYPE DESCRIPTION
status boolean Status of API.

File Upload

Endpoint to upload a file to the system. The file must be sent with multipart/form-data as Content-Type Header.

curl --location --request POST 'https://backend.ducapp.net/api/upload/' \
--form 'name="TextUpload"' \
--form 'file=@"/path/to/file.png"'
var formdata = new FormData();
formdata.append("name", "TextUpload");
formdata.append("file", fileInput.files[0], "file.png");

var requestOptions = {
  method: 'POST',
  body: formdata,
  redirect: 'follow'
};

fetch("https://backend.ducapp.net/api/upload/", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://backend.ducapp.net/api/upload/"

payload = {
    "name": "TextUpload"
}

files = [
    ('file', ('file.png', open('/path/to/file.png','rb'), 'image/png'))
]

response = requests.request("POST", url, data=payload, files=files)

print(response.text)

Example Response:

{
  "url": "default/7d048180-9194-11f0-b841-75b00e464f2a.png",
  "defaultUrl": "https://s3.amazonaws.com/ducwallet-dev-uploaded-files/fileserver/default/7d048180-9194-11f0-b841-75b00e464f2a.png",
  "uploaded": 1,
  "fileName": "7d048180-9194-11f0-b841-75b00e464f2a.png",
  "path": "default/7d048180-9194-11f0-b841-75b00e464f2a.png",
  "type": "image/png",
  "size": 373505
}

Request

POST /api/upload/

Host: backend.ducapp.net

Headers:

Content-Type: multipart/form-data

Request Body (form-data)

NAME TYPE DESCRIPTION
name string A text identifier for the uploaded file
file file File to be uploaded (binary stream)

Response Body

NAME TYPE DESCRIPTION
url string Relative path of the uploaded file in storage
defaultUrl string Full public URL to access the uploaded file
uploaded number Status flag (1 if successfully uploaded)
fileName string Name assigned to the uploaded file
path string Path to the file in the storage system
type string MIME type of the uploaded file (e.g., image/png)
size number File size in bytes

Users

Get User Settings

Endpoint to obtain the configuration, preferences, notifications and privacy settings of the logged-in user to be able to use the platform services.

curl --location --request POST 'https://backend.ducapp.net/api/v2/users/settings' \
--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/v2/users/settings", requestOptions)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests
import json

url = "https://backend.ducapp.net/api/v2/users/settings"

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers)

print(response.text)

```json
{
  "user": {
    "connected": false,
    "deleted": false,
    "loginFailCount": 0,
    "blockedUntil": null,
    "disabled": false,
    "isBlocked": false,
    "validatedUser": true,
    "isBusinessType": false,
    "firstLoginRequired": false,
    "changePasswordRequired": false,
    "twofAuthEnabled": false,
    "registeredUser": true,
    "defaultCurrency": "USD",
    "language": "en_US",
    "allowFaceRecognition": true,
    "needKYCVerification": false,
    "verified": true,
    "trustLevel": 8,
    "transactionCount": 12,
    "beneficiaries": [
      "687f3f9e8403d05faf9b58d9",
      "68950a399048e52a9d502cdc"
    ],
    "requestOTPCount": 12,
    "_id": "5ebaf91c80b385353b9283da",
    "firstName": "John",
    "lastName": "Doe",
    "avatar": "https://s3.amazonaws.com/.../avatars/john-doe.png",
    "walletAddress": "0x0F673BAF2C67eb6165CC526df5386032d653fbB4",
    "status": "Activated",
    "email": "john.doe@gmail.com",
    "reviews": [],
    "createdAt": "2020-03-10T15:57:56.489Z",
    "updatedAt": "2025-08-21T19:31:02.589Z",
    "lastLoginAt": "2025-08-21T19:31:02.324Z",
    "location": {
      "coordinates": [-80.00328104, 22.41070851],
      "_id": "689659c6abb1382b8d7a64ad",
      "type": "Point"
    },
    "location_timestamp": 1754669841000,
    "identityNumber": "02090970502",
    "phone": "+5355555555",
    "country": "Canada",
    "country_iso_code": "CAN",
    "nameFull": "John Doe",
    "activationCode": "235678",
    "city": "Toronto",
    "houseNumber": "16",
    "street": "Main Street 123",
    "zipcode": "M5J2N8",
    "fullNameShort": "John D.",
    "fullNameLong": "John Doe",
    "fullName": "John Doe",
    "fullAddress": "16, Main Street 123, Toronto, M5J2N8, Canada.",
    "score": 3,
    "id": "5ebaf91c80b385353b9283da",
    "source1": {
      "isActive": true,
      "wasChanged": false,
      "verificationId": "5ecb3db88e4629000d0963dc",
      "name": "Passport",
      "allowAttachment": true,
      "order": 1281,
      "key": "passport"
    },
    "source2": {
      "isActive": true,
      "wasChanged": false,
      "verificationId": "5ecb3db88e4629000d0963db",
      "name": "Driving license / DNI",
      "allowAttachment": true,
      "order": 1280,
      "key": "driving_license"
    },
    "providersNotification": [
      { "provider": "email", "active": true },
      { "provider": "sms", "active": true },
      { "provider": "push", "active": true }
    ],
    "privacyConfigurationsSettings": [
      { "key": "localization", "value": true }
    ]
  }
}

Example Response:

{
    "user": {
        "connected": false,
        "deleted": false,
        "loginFailCount": 0,
        "blockedUntil": null,
        "disabled": false,
        "isBlocked": false,
        "validatedUser": true,
        "isBusinessType": false,
        "firstLoginRequired": false,
        "changePasswordRequired": false,
        "twofAuthEnabled": false,
        "registeredUser": false,
        "defaultCurrency": "CAD",
        "language": "es_ES",
        "allowFaceRecognition": true,
        "needKYCVerification": false,
        "verified": false,
        "userWasUpdate": false,
        "trustLevel": 7,
        "transactionCount": 0,
        "beneficiaries": [
            "677f3f9e8503d05caf8b58d9",

        ],
        "requestOTPCount": 61,
        "_id": "5e67b9041016f12effaa2f9f",
        "firstName": "Jonh",
        "lastName": "Doe",
        "avatar": "https://s3.amazonaws.com/ducwallet-dev-uploaded-files/fileserver/users/5e67b9041016f12effaa2e8c/avatars/c8d82a40-6844-11f0-87ca-830515aa8bde.png",
        "walletAddress": "0x8az0E6cE31F2879b64f67c2191FF5A4B33B82Ff6",
        "status": "Activated",
        "email": "jonh.doe@gmail.com",
        "reviews": [],
        "createdAt": "2020-03-10T15:57:56.489Z",
        "updatedAt": "2025-09-07T19:02:54.252Z",
        "lastLoginAt": "2025-09-07T19:02:54.186Z",
        "location": {
            "coordinates": [
                -80.00328104,
                22.41070851
            ],
            "_id": "689659c6abb1382b8d7a64ad",
            "type": "Point"
        },
        "location_timestamp": 1754669841000,
        "activeCreditCard": null,
        "address": null,
        "biometricPublicKey": null,
        "birthDate": "2002-09-09T00:00:00.000Z",
        "identityNumber": "97100270607",
        "phone": "+5357575757",
        "country": "Canada",
        "country_iso_code": "CAN",
        "nameFull": "John Doe",
        "activationCode": null,
        "city": "Ottawa",
        "houseNumber": "15",
        "street": "5th street, Madeup Vecinity, B/ C & B",
        "zipcode": "501100",
        "fullNameShort": "John D.",
        "fullNameLong": "John Doe Doe",
        "fullName": "John Doe",
        "fullAddress": "15, 5th street,  Madeup Vecinity, B/ C & B, 501100, Canada.",
        "score": 3,
        "id": "5e67b9041016f12effaa2f9f",
        "source1": {
            "isActive": true,
            "wasChanged": false,
            "verificationId": "5ecb3db88e4629000d0963dc",
            "_id": "5ecb3db88e4629000d0963dc",
            "name": "Passport",
            "allowAttachment": true,
            "order": 1281,
            "key": "passport"
        },
        "source2": {
            "isActive": true,
            "wasChanged": false,
            "verificationId": "5ecb3db88e4629000d0963db",
            "_id": "5ecb3db88e4629000d0963db",
            "name": "Driving license / DNI",
            "allowAttachment": true,
            "order": 1280,
            "key": "driving_license"
        },
        "providersNotification": [
            {
                "provider": "email",
                "active": false
            },
            {
                "provider": "push",
                "active": true
            },
            {
                "provider": "sms",
                "active": true
            }
        ],
        "privacyConfigurationsSettings": [
            {
                "key": "localization",
                "value": false
            }
        ]
    }
}

Request

POST api/v2/users/settings/

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Request Body

None Required

Response Body

The response body is an {user} object that contains all the information fields of the logged in user

NAME TYPE DESCRIPTION
user object User object containing all user data

user Object

NAME TYPE DESCRIPTION
connected boolean Whether the user is currently connected
deleted boolean Whether the user account is deleted
loginFailCount number Number of failed login attempts
blockedUntil string|null Date until the user is blocked (null if not blocked)
disabled boolean Whether the account is disabled
isBlocked boolean Whether the user is blocked
validatedUser boolean Whether the user has been validated
isBusinessType boolean Whether the account type is business
firstLoginRequired boolean Whether the user must complete a first login action
changePasswordRequired boolean Whether the user must change password
twofAuthEnabled boolean Whether two-factor authentication is enabled
registeredUser boolean Whether the user has completed registration
defaultCurrency string Default currency for transactions (e.g., CAD)
language string Preferred language code (e.g., es_ES)
allowFaceRecognition boolean Whether the user allows face recognition
needKYCVerification boolean Whether KYC verification is required
verified boolean Whether the user is verified
userWasUpdate boolean Whether the user information was updated
trustLevel number User trust level (numeric score)
transactionCount number Total number of transactions performed by the user
beneficiaries [string] Array of beneficiary IDs linked to the user
requestOTPCount number Number of OTP requests made by the user
_id string Unique user identifier
firstName string User’s first name
lastName string User’s last name
avatar string URL to the user’s avatar image
walletAddress string Blockchain wallet address of the user
status string Current account status (e.g., Activated)
email string User’s email address
reviews array Array of user reviews (empty if none)
createdAt string Timestamp of account creation
updatedAt string Timestamp of last update
lastLoginAt string Timestamp of the last login
location object Location object (see below)
location_timestamp number Timestamp when the location was recorded
activeCreditCard object|null Active credit card details if available
address string|null User’s address
biometricPublicKey string|null Public key for biometric authentication
birthDate string User’s birthdate (ISO 8601 format)
identityNumber string User’s identity number
phone string User’s phone number
country string Country name
country_iso_code string Country ISO code
nameFull string Full formatted name
activationCode string|null Activation code if required
city string User’s city
houseNumber string House number
street string Street address
zipcode string Postal/ZIP code
fullNameShort string Short version of the user’s full name
fullNameLong string Long version of the user’s full name
fullName string User’s complete name
fullAddress string Full formatted address
score number User score
id string Alias for _id (same value)
source1 object First verification source, passport (see below)
source2 object Second verification source, driving license / DNI (see below)
providersNotification array Array of notification provider settings (email, push, sms)
privacyConfigurationsSettings array Array of privacy configuration settings

location Object

NAME TYPE DESCRIPTION
coordinates [number] Array with longitude and latitude
_id string Location object ID
type string Geometry type (e.g., Point)

source Object (source1 / source2)

NAME TYPE DESCRIPTION
isActive boolean Whether this verification source is active
wasChanged boolean Whether this source was modified
verificationId string Unique ID of the verification process
_id string Unique identifier
name string Name of the document/source (e.g., Passport)
allowAttachment boolean Whether attachments are allowed
order number Order priority of the verification
key string Key identifier of the source

providersNotification Array

NAME TYPE DESCRIPTION
provider string Notification provider (email, push, sms)
active boolean Whether the provider is active

privacyConfigurationsSettings Array

NAME TYPE DESCRIPTION
key string Privacy setting key (e.g., localization)
value boolean Value of the privacy setting

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.doe@test.ducapp.net",
    "password": "$2y$10$EiZYJxdFvdTBfY97uTfU1e11U5vAFmxTnAQ5M.d0q8zU9"
})
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ7.eyJfaWQiOiI1ZWJhZjkxYzgwYjM4NTM1M2I5MjgzZGQiLCJmaXJzdE5hbWUiOiJEYXJpYW4iLCJsYXN0TmFtZSI6IkFsdmFyZXoiLCJlbWFpbCI6ImRhcmlhbi5hbHZhcmV6LnRAZ21haWwuY29tIiwicGhvbmUiOiIrNTM1MjU1MjYxNSIsIndhbGxldEFkZHJlc3MiOiIweDBGNjczQkFGMkM2N2ViNjE2NUNDNTI2ZGY1Mzg2MDMyZDY1M2ZiQjUiLCJkZWZhdWx0Q3VycmVuY3kiOiJVU0QiLCJyb2xlcyI6WyI1ZDdjNzFlZGRmZTg1OTAwMGZmNzE2YmIiLCI1ZDdjNzFlZGRmZTg1OTAwMGZmNzE2YmMiLCI1ZGUwMzAyYTU4ZTUzMDAwMGRlMGRkMmIiLCI2MjRjYzQyZTlhZjAwMDU5YzQ3NzZlMjMiXSwibGFuZ3VhZ2UiOiJFTiIsImxhc3RMb2dpbkF0IjoiMjAyNC0wMi0xNlQxNzoyNDoyMS45NDhaIiwic3RhdHVzIjoiQWN0aXZhdGVkIiwidmVyaWZpZWQiOmZhbHNlLCJ0cnVzdExldmVsIjo4LCJpc0Jsb2NrZWQiOmZhbHNlLCJsb2dpbkZhaWxDb3VudCI6MCwiYmxvY2tlZFVudGlsIjpudWxsLCJpYXQiOjE3MDgxMDQyNjIsImV4cCI6MTcwODEyMjI2Mn0.TA8dS_GS21OXQlmzZ45pWvrBQVsA9sy_Tapr_p8-zwZ",
  "isMerchant": true,
  "id": "5ebaf91c80b385353b9283da",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@gmail.com",
  "phone": "+5355555555",
  "walletAddress": "0x0F673BAF2C67eb6165CC526df5386032d653fbB4",
  "defaultCurrency": "USD",
  "status": "Activated",
  "trustLevel": 8,
  "isBlocked": false
}

Request

POST /api/auth/login

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
phone\email string Registered User phone number or email
password string Registered User password

Response Body

NAME TYPE DESCRIPTION
accessToken string Token to access authenticated endpoints
isMerchant string Weather the user is merchant or not
id string The user id
firstName string The user first name
lastName string The user last name
email string The user registered email
phone string The user registered phone number
walletAddress string The user wallet address
defaultCurrency string The user default selected currency
status string The user status
trustLevel string The user trust level
isBlocked string Weather the user is blocked or not

Register User

Endpoint to register a new user in the platform.

curl --location --request POST 'https://backend.ducapp.net/api/private/users/register' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "appVersion": "0.1",
    "language": "EN",
    "defaultCurrency": "USD",
    "firstName": "John",
    "lastName": "Doe",
    "phone": "+1-202-555-0106",
    "providerValue": "john.doe@test.ducapp.net",
    "identityNumber": "035742265",
    "street": "Schoenersville Rd",
    "houseNumber": "2118",
    "city": "PA",
    "country": "United States",
    "zipcode": "18017",
    "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAEzCAIAAAAw5mh...",
    "source1": {
        "url": "https://www.someimage.com/url/passportImage.jpg",
        "name": "passportPicture",
        "type": "mime/jpg",
        "size": "50"
    },
    "source2": {
        "url": "https://www.someimage.com/url/licenceImage.jpg",
        "name": "drivingLicence",
        "type": "mime/jpg",
        "size": "50"
    },
    "province": "Pennsylvania",
    "birthDate": "1984-11-20",
    "country_iso_code": "US",
    "password": "$2y$10$EiZYJxdFvdTBfY97uTfU1e11U5vAFmxTnAQ5M.d0q8zU9",
    "areConditionsAccepted": "true"
}
'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  appVersion: "0.1",
  language: "EN",
  defaultCurrency: "USD",
  firstName: "John",
  lastName: "Doe",
  phone: "+1-202-555-0106",
  providerValue: "john.doe@test.ducapp.net",
  identityNumber: "035742265",
  street: "Schoenersville Rd",
  houseNumber: "2118",
  city: "PA",
  country: "United States",
  zipcode: "18017",
  image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAEzCAIAAAAw5mh...",
  source1: {
    url: "https://www.someimage.com/url/passportImage.jpg",
    name: "passportPicture",
    type: "mime/jpg",
    size: "50",
  },
  source2: {
    url: "https://www.someimage.com/url/licenceImage.jpg",
    name: "drivingLicence",
    type: "mime/jpg",
    size: "50",
  },
  province: "Pennsylvania",
  birthDate: "1984-11-20",
  country_iso_code: "US",
  password: "$2y$10$EiZYJxdFvdTBfY97uTfU1e11U5vAFmxTnAQ5M.d0q8zU9",
  areConditionsAccepted: "true",
});

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

fetch("https://backend.ducapp.net/api/private/users/register", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests
import json

url = "https://backend.ducapp.net/api/private/users/register"

payload = json.dumps({
    "appVersion": "0.1",
    "language": "EN",
    "defaultCurrency": "USD",
    "firstName": "John",
    "lastName": "Doe",
    "phone": "+1-202-555-0106",
    "providerValue": "john.doe@test.ducapp.net",
    "identityNumber": "035742265",
    "street": "Schoenersville Rd",
    "houseNumber": "2118",
    "city": "PA",
    "country": "United States",
    "zipcode": "18017",
    "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAEzCAIAAAAw5mh...",
    "source1": {
        "url": "https://www.someimage.com/url/passportImage.jpg",
        "name": "passportPicture",
        "type": "mime/jpg",
        "size": "50"
    },
    "source2": {
        "url": "https://www.someimage.com/url/licenceImage.jpg",
        "name": "drivingLicence",
        "type": "mime/jpg",
        "size": "50"
    },
    "province": "Pennsylvania",
    "birthDate": "1984-11-20",
    "country_iso_code": "US",
    "password": "$2y$10$EiZYJxdFvdTBfY97uTfU1e11U5vAFmxTnAQ5M.d0q8zU9",
    "areConditionsAccepted": "true"
})
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  '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

Headers:

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 (see below)

user Object

NAME TYPE DESCRIPTION
connected boolean Whether the user is currently connected
deleted boolean Whether the user account is deleted
loginFailCount number Number of failed login attempts
blockedUntil string|null Date until the user is blocked (null if not blocked)
disabled boolean Whether the account is disabled
isBlocked boolean Whether the user is blocked
validatedUser boolean Whether the user is validated
isBusinessType boolean Whether the account type is business
firstLoginRequired boolean Whether the user must complete a first login action
changePasswordRequired boolean Whether the user must change their password
twofAuthEnabled boolean Whether two-factor authentication is enabled
registeredUser boolean Whether the user has completed registration
defaultCurrency string Default currency for transactions (e.g., USD)
language string Preferred language code (e.g., EN)
allowFaceRecognition boolean Whether the user allows face recognition
needKYCVerification boolean Whether KYC verification is required
verified boolean Whether the user is verified
userWasUpdate boolean Whether the user information was updated
trustLevel number User trust level (numeric score)
transactionCount number Total number of transactions performed by the user
beneficiaries [string] Array of beneficiary IDs linked to the user
requestOTPCount number Number of OTP requests made by the user
_id string Unique user identifier
firstName string User’s first name
lastName string User’s last name
phone string User’s phone number
identityNumber string User’s identity number
street string Street address
houseNumber string House number
city string User’s city
country string Country name
zipcode string Postal/ZIP code
birthDate string User’s birthdate (ISO 8601 format)
email string User’s email address
activationCode string Activation code for user registration
status string Current account status (e.g., Pending)
walletAddress string Blockchain wallet address of the user
reviews array Array of user reviews (empty if none)
createdAt string Timestamp of account creation
updatedAt string Timestamp of last update
nameFull string Full formatted name
fullNameShort string Short version of the user’s full name
fullNameLong string Long version of the user’s full name
fullName string User’s complete name
score number User score
id string Alias for _id (same value)

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

Headers:

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 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "image": "data:image/png;base64,iVBORw0KGgoAAAANS...",
    "firstName": "Jane"
}'
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({
  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

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Request Body

The fields of the request body are all completely optional, you can send an empty body and still get a response without any update on the previous fields.

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 User object containing all user data

user Object

NAME TYPE DESCRIPTION
connected boolean Whether the user is currently connected
deleted boolean Whether the user account is deleted
loginFailCount number Number of failed login attempts
blockedUntil string|null Date until the user is blocked (null if not blocked)
disabled boolean Whether the account is disabled
isBlocked boolean Whether the user is blocked
validatedUser boolean Whether the user is validated
isBusinessType boolean Whether the account type is business
firstLoginRequired boolean Whether the user must complete a first login action
changePasswordRequired boolean Whether the user must change their password
twofAuthEnabled boolean Whether two-factor authentication is enabled
registeredUser boolean Whether the user has completed registration
defaultCurrency string Default currency for transactions (e.g., CAD)
language string Preferred language code (e.g., es_ES)
allowFaceRecognition boolean Whether the user allows face recognition
needKYCVerification boolean Whether KYC verification is required
verified boolean Whether the user is verified
userWasUpdate boolean Whether the user information was updated
trustLevel number User trust level (numeric score)
transactionCount number Total number of transactions performed by the user
beneficiaries [string] Array of beneficiary IDs linked to the user
requestOTPCount number Number of OTP requests made by the user
_id string Unique user identifier
firstName string User’s first name
lastName string User’s last name
avatar string URL to the user’s avatar image
walletAddress string Blockchain wallet address of the user
status string Current account status (e.g., Activated)
email string User’s email address
reviews array Array of user reviews (empty if none)
createdAt string Timestamp of account creation
updatedAt string Timestamp of last update
lastLoginAt string Timestamp of the last login
location object Location object (see below)
location_timestamp number Timestamp when the location was recorded
activeCreditCard object|null Active credit card details if available
address string|null User’s address
biometricPublicKey string|null Public key for biometric authentication
birthDate string User’s birthdate (ISO 8601 format)
identityNumber string User’s identity number
phone string User’s phone number
country string Country name
country_iso_code string Country ISO code
nameFull string Full formatted name
availableServices object Object containing flags for all services available to the user (see below)
activationCode string|null Activation code if required
city string User’s city
houseNumber string House number
street string Street address
zipcode string Postal/ZIP code
fullNameShort string Short version of the user’s full name
fullNameLong string Long version of the user’s full name
fullName string User’s complete name
fullAddress string Full formatted address
score number User score
id string Alias for _id (same value)

location Object

NAME TYPE DESCRIPTION
coordinates [number] Array with longitude and latitude
_id string Location object ID
type string Geometry type (e.g., Point)

availableServices Object

NAME TYPE DESCRIPTION
ADD_FUND boolean Ability to add funds to the wallet
BANK_ACCOUNT_TRANSACTION boolean Enable bank account transactions
CREDIT_CARD_TRANSACTION boolean Enable credit card transactions
CREDIT_CARD_TRANSACTION_USD boolean Enable credit card transactions in USD
MLC_CREDIT_CARD_TRANSACTION boolean Enable credit card transactions in MLC
DELIVERY_TRANSACTION boolean Enable delivery transactions
DELIVERY_TRANSACTION_USD boolean Enable delivery transactions in USD
THUNES_TRANSACTION boolean Enable Thunes transactions
EMAIL_MONEY_TRANSACTION boolean Enable email-based money transfers
EMAIL_PAYMENT_REQUEST boolean Enable email-based payment requests
PAYMENT_REQUEST boolean Whether generic payment requests are enabled
P2P_TRANSFER boolean Enable peer-to-peer transfers
TOKENS_BUY boolean Ability to buy tokens
TOKENS_BUY_MCP boolean Ability to buy tokens using MCP
TOKENS_BUY_CRYPTO boolean Ability to buy tokens using cryptocurrencies
TOKENS_BUY_GPAY boolean Ability to buy tokens with Google Pay
TOKENS_BUY_APPLE_PAY boolean Ability to buy tokens with Apple Pay
TOKEN_EXCHANGE boolean Whether token exchange is available
TOPUP_RECHARGE boolean Enable top-up recharges
TOKENS_BUY_INLINE boolean Ability to buy tokens inline
TOKENS_BUY_CRYPTO_INLINE boolean Inline token purchase with cryptocurrencies
TOKENS_BUY_GPAY_INLINE boolean Inline token purchase with Google Pay
TOKENS_BUY_APPLE_PAY_INLINE boolean Inline token purchase with Apple Pay
EMAIL_PAYMENT_REQUEST_INLINE boolean Inline email-based payment requests
ZELLE_EMAIL_PAYMENT_REQUEST boolean Enable Zelle email payment requests
ZELLE_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline Zelle email payment requests
TOKENS_BUY_CRYPTO_APPLE boolean Ability to buy tokens with crypto via Apple Pay
SEPA_EMAIL_PAYMENT_REQUEST boolean Enable SEPA email payment requests
ACH_EMAIL_PAYMENT_REQUEST boolean Enable ACH email payment requests
MLC_PAYMENT_REQUEST boolean Enable MLC-based payment requests
PAYMENT_LINK_REQUEST boolean Enable payment link requests
INSTAPAY_EUROPA boolean Enable Instapay services in Europe
SCAN_PAY_P2P_TRANSFER boolean Enable peer-to-peer transfers via Scan & Pay
DELIVERY_TRANSACTION_EUR boolean Enable delivery transactions in EUR
TOKENS_BUY_CRYPTO_INLINE_APPLE boolean Inline crypto purchase via Apple Pay
SEPA_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline SEPA email payment requests
ACH_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline ACH email payment requests
MLC_PAYMENT_REQUEST_INLINE boolean Inline MLC payment requests
PAYMENT_LINK_REQUEST_INLINE boolean Inline payment link requests
INSTAPAY_EUROPA_INLINE boolean Inline Instapay Europe services

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

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Request Body

None Required

Response Body

NAME TYPE DESCRIPTION
user Object The user info

user Object

NAME TYPE DESCRIPTION
connected boolean Whether the user is currently connected
deleted boolean Whether the user account is deleted
loginFailCount number Number of failed login attempts
blockedUntil string|null Date until the user is blocked (null if not blocked)
disabled boolean Whether the account is disabled
isBlocked boolean Whether the user is blocked
validatedUser boolean Whether the user is validated
isBusinessType boolean Whether the account type is business
firstLoginRequired boolean Whether the user must complete a first login action
changePasswordRequired boolean Whether the user must change their password
twofAuthEnabled boolean Whether two-factor authentication is enabled
registeredUser boolean Whether the user has completed registration
defaultCurrency string Default currency for transactions (e.g., CAD)
language string Preferred language code (e.g., es_ES)
allowFaceRecognition boolean Whether the user allows face recognition
needKYCVerification boolean Whether KYC verification is required
verified boolean Whether the user is verified
userWasUpdate boolean Whether the user information was updated
trustLevel number User trust level (numeric score)
transactionCount number Total number of transactions performed by the user
beneficiaries [string] Array of beneficiary IDs linked to the user
requestOTPCount number Number of OTP requests made by the user
_id string Unique user identifier
firstName string User’s first name
lastName string User’s last name
avatar string URL to the user’s avatar image
walletAddress string Blockchain wallet address of the user
status string Current account status (e.g., Activated)
email string User’s email address
reviews array Array of user reviews (empty if none)
createdAt string Timestamp of account creation
updatedAt string Timestamp of last update
lastLoginAt string Timestamp of the last login
location object Location object (see below)
location_timestamp number Timestamp when the location was recorded
activeCreditCard object|null Active credit card details if available
address string|null User’s address
biometricPublicKey string|null Public key for biometric authentication
birthDate string User’s birthdate (ISO 8601 format)
identityNumber string User’s identity number
phone string User’s phone number
country string Country name
country_iso_code string Country ISO code
nameFull string Full formatted name
availableServices object Object containing flags for all services available to the user (see below)
activationCode string|null Activation code if required
city string User’s city
houseNumber string House number
street string Street address
zipcode string Postal/ZIP code
fullNameShort string Short version of the user’s full name
fullNameLong string Long version of the user’s full name
fullName string User’s complete name
fullAddress string Full formatted address
score number User score
id string Alias for _id (same value)
source1 object First verification source, passport (see below)
source2 object Second verification source, driving license / DNI (see below)

location Object

NAME TYPE DESCRIPTION
coordinates [number] Array with longitude and latitude
_id string Location object ID
type string Geometry type (e.g., Point)

availableServices Object

NAME TYPE DESCRIPTION
PAYMENT_REQUEST boolean Whether generic payment requests are enabled
TOKENS_BUY boolean Ability to buy tokens
TOKENS_BUY_GPAY boolean Ability to buy tokens with Google Pay
TOKENS_BUY_APPLE_PAY boolean Ability to buy tokens with Apple Pay
TOKENS_BUY_CRYPTO boolean Ability to buy tokens using cryptocurrencies
TOKENS_BUY_CRYPTO_APPLE boolean Ability to buy tokens with crypto via Apple Pay
EMAIL_PAYMENT_REQUEST boolean Enable email-based payment requests
ZELLE_EMAIL_PAYMENT_REQUEST boolean Enable Zelle email payment requests
SEPA_EMAIL_PAYMENT_REQUEST boolean Enable SEPA email payment requests
ACH_EMAIL_PAYMENT_REQUEST boolean Enable ACH email payment requests
MLC_PAYMENT_REQUEST boolean Enable MLC-based payment requests
PAYMENT_LINK_REQUEST boolean Enable payment link requests
INSTAPAY_EUROPA boolean Enable Instapay services in Europe
AUTHORIZENET_CAD boolean Enable Authorize.net payments in CAD
AUTHORIZENET_USD boolean Enable Authorize.net payments in USD
TOKEN_EXCHANGE boolean Whether token exchange is available
TOKENS_BUY_MCP boolean Ability to buy tokens using MCP
ADD_FUND boolean Ability to add funds to the wallet
P2P_TRANSFER boolean Enable peer-to-peer transfers
SCAN_PAY_P2P_TRANSFER boolean Enable peer-to-peer transfers via Scan & Pay
TOPUP_RECHARGE boolean Enable top-up recharges
CREDIT_CARD_TRANSACTION boolean Enable credit card transactions
CREDIT_CARD_TRANSACTION_USD boolean Enable credit card transactions in USD
MLC_CREDIT_CARD_TRANSACTION boolean Enable credit card transactions in MLC
DELIVERY_TRANSACTION boolean Enable delivery transactions
DELIVERY_TRANSACTION_USD boolean Enable delivery transactions in USD
DELIVERY_TRANSACTION_EUR boolean Enable delivery transactions in EUR
EMAIL_MONEY_TRANSACTION boolean Enable email-based money transfers
THUNES_TRANSACTION boolean Enable Thunes transactions
BANK_ACCOUNT_TRANSACTION boolean Enable bank account transactions
TOKENS_BUY_INLINE boolean Ability to buy tokens inline
TOKENS_BUY_GPAY_INLINE boolean Inline token purchase with Google Pay
TOKENS_BUY_APPLE_PAY_INLINE boolean Inline token purchase with Apple Pay
TOKENS_BUY_CRYPTO_INLINE boolean Inline token purchase with cryptocurrencies
TOKENS_BUY_CRYPTO_INLINE_APPLE boolean Inline crypto purchase via Apple Pay
EMAIL_PAYMENT_REQUEST_INLINE boolean Inline email-based payment requests
ZELLE_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline Zelle email payment requests
SEPA_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline SEPA email payment requests
ACH_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline ACH email payment requests
MLC_PAYMENT_REQUEST_INLINE boolean Inline MLC payment requests
PAYMENT_LINK_REQUEST_INLINE boolean Inline payment link requests
INSTAPAY_EUROPA_INLINE boolean Inline Instapay Europe services
AUTHORIZENET_CAD_INLINE boolean Inline Authorize.net payments in CAD
AUTHORIZENET_USD_INLINE boolean Inline Authorize.net payments in USD

source Object (source1 / source2)

NAME TYPE DESCRIPTION
isActive boolean Whether this verification source is active
wasChanged boolean Whether this source was modified
verificationId string Unique ID of the verification process
_id string Unique identifier
name string Name of the document/source (e.g., Passport)
allowAttachment boolean Whether attachments are allowed
order number Order priority of the verification
key string Key identifier of the source

Find User by ID

Endpoint to obtain a specific user profile by user ID.

curl --location --request GET 'https://backend.ducapp.net/api/private/users/5ebaf91c80b385353b9283da' \
--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/users/5ebaf91c80b385353b9283da", requestOptions)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests

url = "https://backend.ducapp.net/api/private/users/5ebaf91c80b385353b9283da"

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers)

print(response.text)

Example Response:

{
  "user": {
    "_id": "5ebaf91c80b385353b9283da",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@gmail.com",
    "phone": "+5355555555",
    "walletAddress": "0x0F673BAF2C67eb6165CC526df5386032d653fbB4",
    "status": "Activated",
    "defaultCurrency": "USD",
    "language": "en_US",
    "trustLevel": 8,
    "isBlocked": false,
    "verified": true,
    "registeredUser": true,
    "providersNotification": [
      { "provider": "email", "active": true },
      { "provider": "sms", "active": true },
      { "provider": "push", "active": true }
    ],
    "privacyConfigurationsSettings": [
      { "key": "localization", "value": true }
    ],
    "identityNumber": "02090970502",
    "country": "Canada",
    "country_iso_code": "CAN",
    "city": "Toronto",
    "street": "Main Street 123",
    "houseNumber": "16",
    "zipcode": "M5J2N8",
    "createdAt": "2020-03-10T15:57:56.489Z",
    "updatedAt": "2025-08-21T19:31:02.589Z",
    "lastLoginAt": "2025-08-21T19:31:02.324Z",
    "score": 3
  }
}

Request

GET /api/private/users/{userId}

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Path Parameters

NAME TYPE DESCRIPTION
userId string The unique user ID

Request Body

None Required

Response Body

NAME TYPE DESCRIPTION
user object Main container with user data
firstName / lastName string User’s first and last name
email / phone string Registered email and phone number
walletAddress string Wallet address linked to the account
status string Account status (e.g., Activated)
defaultCurrency string Default selected currency
language string Preferred language (locale)
trustLevel number User trust/security score
isBlocked boolean Whether the user is blocked or not
verified boolean Whether the user is identity-verified
registeredUser boolean Whether the user is fully registered
providersNotification array Notification providers (email, sms, push)
privacyConfigurationsSettings array Privacy preferences (e.g. localization sharing)
identityNumber string User identity or document number
country / city / street string User residence information
houseNumber / zipcode string Address details
createdAt / updatedAt datetime Account creation and last update timestamps
lastLoginAt datetime Last login datetime
score number Internal user score

Find Users

Endpoint to search for users by a given value (e.g., name, email, phone number).

curl --location --request POST 'https://backend.ducapp.net/api/private/users/find' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "value": "john.doe@test.com",
  "projection": {
    "firstName": 1,
    "lastName": 1,
    "email": 1,
    "phone": 1
  },
  "limit": 1
}'
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({
  "value": "john.doe@test.com",
  "projection": {
    "firstName": 1,
    "lastName": 1,
    "email": 1,
    "phone": 1
  },
  "limit": 1
});

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

fetch("https://backend.ducapp.net/api/private/users/find", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://backend.ducapp.net/api/private/users/find"

payload = json.dumps({
  "value": "john.doe@test.com",
  "projection": {
    "firstName": 1,
    "lastName": 1,
    "email": 1,
    "phone": 1
  },
  "limit": 1
})
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
  "users": [
    {
      "_id": "64a97c15ec25226662f661ed",
      "firstName": "John",
      "lastName": "Doe",
      "email": "john.doe@test.com",
      "phone": "+1-202-555-0123",
      "fullNameShort": "John D.",
      "fullNameLong": "John Doe",
      "fullName": "John Doe",
      "fullAddress": "123 Main St, New York, USA",
      "score": 3,
      "id": "64a97c15ec25226662f661ed"
    }
  ]
}

Request

POST /api/private/users/find

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
value string Text to search for (can be name, email, phone, etc.)
projection object Fields to return for each user (similar to MongoDB projection). (Default: all)
limit number Maximum number of results. (Default = 10)

Only the value field is required, projection and limit are optional

If you specify a projection you will recieve only _id, fullNameShort, fullAddress, score, id and the values specified on the proyection.

Response Body

NAME TYPE DESCRIPTION
users [object] Array of users matching the search criteria

user Object

NAME TYPE DESCRIPTION
connected boolean Whether the user is currently connected
deleted boolean Whether the user account is deleted
loginFailCount number Number of failed login attempts
blockedUntil string|null Date until the user is blocked (null if not blocked)
disabled boolean Whether the account is disabled
isBlocked boolean Whether the user is blocked
validatedUser boolean Whether the user is validated
isBusinessType boolean Whether the account type is business
firstLoginRequired boolean Whether the user must complete a first login action
changePasswordRequired boolean Whether the user must change their password
twofAuthEnabled boolean Whether two-factor authentication is enabled
registeredUser boolean Whether the user has completed registration
defaultCurrency string Default currency for transactions (e.g., CAD)
language string Preferred language code (e.g., es_ES)
allowFaceRecognition boolean Whether the user allows face recognition
needKYCVerification boolean Whether KYC verification is required
verified boolean Whether the user is verified
userWasUpdate boolean Whether the user information was updated
trustLevel number User trust level (numeric score)
transactionCount number Total number of transactions performed by the user
beneficiaries [string] Array of beneficiary IDs linked to the user
requestOTPCount number Number of OTP requests made by the user
_id string Unique user identifier
firstName string User’s first name
lastName string User’s last name
avatar string URL to the user’s avatar image
walletAddress string Blockchain wallet address of the user
status string Current account status (e.g., Activated)
email string User’s email address
reviews array Array of user reviews (empty if none)
createdAt string Timestamp of account creation
updatedAt string Timestamp of last update
lastLoginAt string Timestamp of the last login
location object Location object (see below)
location_timestamp number Timestamp when the location was recorded
activeCreditCard object|null Active credit card details if available
address string|null User’s address
biometricPublicKey string|null Public key for biometric authentication
birthDate string User’s birthdate (ISO 8601 format)
identityNumber string User’s identity number
phone string User’s phone number
country string Country name
country_iso_code string Country ISO code
nameFull string Full formatted name
availableServices object Object containing flags for all services available to the user (see below)
activationCode string|null Activation code if required
city string User’s city
houseNumber string House number
street string Street address
zipcode string Postal/ZIP code
fullNameShort string Short version of the user’s full name
fullNameLong string Long version of the user’s full name
fullName string User’s complete name
fullAddress string Full formatted address
score number User score
id string Alias for _id (same value)

location Object

NAME TYPE DESCRIPTION
coordinates [number] Array with longitude and latitude
_id string Location object ID
type string Geometry type (e.g., Point)

availableServices Object

NAME TYPE DESCRIPTION
ADD_FUND boolean Ability to add funds to the wallet
BANK_ACCOUNT_TRANSACTION boolean Enable bank account transactions
CREDIT_CARD_TRANSACTION boolean Enable credit card transactions
CREDIT_CARD_TRANSACTION_USD boolean Enable credit card transactions in USD
MLC_CREDIT_CARD_TRANSACTION boolean Enable credit card transactions in MLC
DELIVERY_TRANSACTION boolean Enable delivery transactions
DELIVERY_TRANSACTION_USD boolean Enable delivery transactions in USD
THUNES_TRANSACTION boolean Enable Thunes transactions
EMAIL_MONEY_TRANSACTION boolean Enable email-based money transfers
EMAIL_PAYMENT_REQUEST boolean Enable email-based payment requests
PAYMENT_REQUEST boolean Whether generic payment requests are enabled
P2P_TRANSFER boolean Enable peer-to-peer transfers
TOKENS_BUY boolean Ability to buy tokens
TOKENS_BUY_MCP boolean Ability to buy tokens using MCP
TOKENS_BUY_CRYPTO boolean Ability to buy tokens using cryptocurrencies
TOKENS_BUY_GPAY boolean Ability to buy tokens with Google Pay
TOKENS_BUY_APPLE_PAY boolean Ability to buy tokens with Apple Pay
TOKEN_EXCHANGE boolean Whether token exchange is available
TOPUP_RECHARGE boolean Enable top-up recharges
TOKENS_BUY_INLINE boolean Ability to buy tokens inline
TOKENS_BUY_CRYPTO_INLINE boolean Inline token purchase with cryptocurrencies
TOKENS_BUY_GPAY_INLINE boolean Inline token purchase with Google Pay
TOKENS_BUY_APPLE_PAY_INLINE boolean Inline token purchase with Apple Pay
EMAIL_PAYMENT_REQUEST_INLINE boolean Inline email-based payment requests
ZELLE_EMAIL_PAYMENT_REQUEST boolean Enable Zelle email payment requests
ZELLE_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline Zelle email payment requests
TOKENS_BUY_CRYPTO_APPLE boolean Ability to buy tokens with crypto via Apple Pay
SEPA_EMAIL_PAYMENT_REQUEST boolean Enable SEPA email payment requests
ACH_EMAIL_PAYMENT_REQUEST boolean Enable ACH email payment requests
MLC_PAYMENT_REQUEST boolean Enable MLC-based payment requests
PAYMENT_LINK_REQUEST boolean Enable payment link requests
INSTAPAY_EUROPA boolean Enable Instapay services in Europe
SCAN_PAY_P2P_TRANSFER boolean Enable peer-to-peer transfers via Scan & Pay
DELIVERY_TRANSACTION_EUR boolean Enable delivery transactions in EUR
TOKENS_BUY_CRYPTO_INLINE_APPLE boolean Inline crypto purchase via Apple Pay
SEPA_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline SEPA email payment requests
ACH_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline ACH email payment requests
MLC_PAYMENT_REQUEST_INLINE boolean Inline MLC payment requests
PAYMENT_LINK_REQUEST_INLINE boolean Inline payment link requests
INSTAPAY_EUROPA_INLINE boolean Inline Instapay Europe services

Get Balance

Endpoint to get the balance of the authenticated user.

import requests
import json

url = "https://backend.ducapp.net/api/private/users/get-balance"

payload = json.dumps({})

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
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({});

var requestOptions = {
  method: "GET",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://backend.ducapp.net/api/private/users/get-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/users/get-balance' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--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/users/get-balance

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Request Body

None Required

Response Body

NAME TYPE DESCRIPTION
balance [Account] Array of Account with the balance of each coin

Account Array

NAME TYPE DESCRIPTION
currency string Code of the account currency
amount float Amount of the account

Get User System Status

Endpoint to obtain the logged-in user system status.

curl --location --request GET 'https://backend.ducapp.net/api/v2/settings/' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://backend.ducapp.net/api/v2/settings/", requestOptions)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests

url_all = "https://backend.ducapp.net/api/v2/settings/"
url_one = "https://backend.ducapp.net/api/v2/settings/exchange_spread"

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response_all = requests.request("GET", url_all, headers=headers)
print(response_all.text)

Example Response:

{
  "payment_link_auto_expiry_recurrence": {
    "_id": "686dd3498905cfc72673a727",
    "key": "payment_link_auto_expiry_recurrence",
    "active": true,
    "createdAt": "2025-07-09T02:26:17.438Z",
    "updatedAt": "2025-07-09T03:25:50.258Z",
    "value": {
      "type": "expression",
      "cronSpec": "0 0 1 * * *",
      "recurrenceType": "expression"
    },
    "valueType": "json"
  },
  "enable_custom_payment_link": {
    "_id": "683fbfd11c5c316ec7f37dcd",
    "key": "enable_custom_payment_link",
    "active": true,
    "createdAt": "2025-06-04T03:38:57.760Z",
    "updatedAt": "2025-06-04T03:44:06.586Z",
    "value": false,
    "valueType": "boolean"
  }
  ///Rest of the settings...
}

Example Response:

{
  "exchange_spread": {
    "_id": "5dc0f95add34e70f6ed9efb1",
    "active": true,
    "key": "exchange_spread",
    "value": "2.5",
    "type": "coins",
    "createdAt": "2019-11-05T04:23:54.353Z",
    "updatedAt": "2023-01-30T15:28:36.347Z",
    "__v": 0,
    "scope": "coins"
  }
}

Request

GET /api/v2/settings/

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Request Body

None required

Response Body

Key Value Type Value Example Description
payment_link_auto_expiry_recurrence JSON { "type": "expression", "cronSpec": "0 0 1 * * *", "recurrenceType": "expression" } Defines recurrence rules for auto-expiring payment links.
payment_link_auto_expiry_past_times JSON { "unit": "days", "amount": "7" } Defines how long past payment links remain valid before expiration.
enable_custom_payment_link Boolean true Enables or disables custom payment links.
interac_etransfer_minimum_amount Number 0 Minimum amount allowed for Interac e-transfer.
sepa_account_information JSON { "recipientName": "Lemargo Inc", "iban": "GB89...", "bic": "TCCLGB3L" } Stores SEPA account information for transfers.
ach_account_information JSON { "recipientName": "Lemargo Inc", "bankName": "TD Bank", "routingNumber": "004", "accountNumber": "1234567890" } ACH account details for US transfers.
api_client_secret_key String "test.f06f2444-e2ef-5d41-bf1e-de36fec7c2dd" Secret key used by API clients for authentication.
default_receiver_info JSON { "countryCode": "CUB", "address": "CALLE 23...", "city": "PLAZA DE LA REVOLUCIÓN" } Default receiver information for money transfers.
topups_schedule_recurrence_rule JSON { "type": "expression", "cronSpec": "0 0 6 * * *", "recurrenceType": "expression" } Defines recurrence schedule for top-up operations.
default_sender_info JSON { "senderName": "Henry", "senderLastName": "Martinez", "senderDocumentType": "PAS", ... } Default sender’s KYC and identity information.
payments_drop_in Boolean true Indicates if "drop-in" payment method is enabled.
interac_etransfer_update_task Boolean true Indicates whether Interac e-transfer updates are active.
interac_etransfer_update_period JSON { "amount": "15", "unit": "minutes" } Frequency of Interac e-transfer update checks.
interac_etransfer_active Boolean true Enables Interac e-transfer service.
interac_etransfer_moderate Boolean false Enables moderation on Interac e-transfers.
collection_provider String "thunes" Provider for collection services.
payments_provider String "authorizenetcad" Payment gateway provider.
payments_provider_currency String "CAD" Currency used by payment provider.
ftp_export_to_path String "transactionsStatus" FTP export directory path.
ftp_import_from_path String "transactionsFile" FTP import directory path.
ftp_base_path String "data" Base FTP directory path.
valid_kyc_period JSON { "AMOUNT": "6", "UNIT": "months" } Period for which KYC remains valid.
crypto_buy_is_active String "true" Indicates if crypto buying is enabled.
min_amount_to_verification Number 5 Minimum transaction amount requiring user verification.
thunes_source_currency String "USD" Source currency for Thunes cashout transactions.
require_documents_user_register Boolean true Whether user registration requires documents.
user_register_moderate Boolean false Enables moderation on new user registrations.
thunes_exchange_spread Number 0 Exchange spread applied to Thunes transactions.
moderate_thunes_transaction Boolean true Enables moderation for Thunes transactions.
duc_app_fee_multiplier Number 3 Application fee multiplier.
duc_app_fee_percent Number 0 Application fee as a percentage.
max_amount_buy_auto_without_trust_level Number 0 Max amount users can buy automatically without trust level.
max_amount_without_use_face_verification Number 0 Max amount allowed without face verification.
must_use_face_verification Boolean false Whether face verification is mandatory.
cashout_limit_amount String "50" Default limit for cashout transactions.
cashout_min_limit_amount Number 4 Minimum allowed cashout amount.
cashout_max_limit_amount Number 12000000 Maximum allowed cashout amount.
denied_countries_by_sanctions Array ["CF","CG","IR","IQ",...] List of countries denied due to sanctions.
topups_agent_discount_percent Number 10 Discount percentage for top-up agents.
topups_provider String "dtone" Provider for top-up services.
enable_disable_services JSON { "PAYMENT_REQUEST": true, "TOKENS_BUY": false, ... } Controls availability of different system services.
ccard_buying_period String "2419200" Credit card buying period (in seconds).
user_kyc_verification_is_active Boolean true Enables KYC verification system.
is_on_maintenance Boolean false Whether the system is under maintenance.
ccard_buying_amount String "700000" Credit card buying amount limit.
email_money_transfer_address String "emailtransfer@ducapp.com" Email address used for money transfers.
cashout_card_allow_send_money Boolean false Whether sending money via cashout card is allowed.
allowed_app_versions Array ["0.1","1.80.2","2.0.0"] Allowed versions of the application.
topups_discount_percent Number 10 Discount applied on top-up transactions.
exchange_spread String "2.5" Exchange spread applied to coin transactions.
exchange_update_mode Number 6 Exchange update frequency/mode.
apple_pay_buy_is_active String "true" Indicates if Apple Pay buy option is active.
moderate_min_buy_flow_limit Number 5 Minimum limit to apply moderation in buy flow.
user_register_enabled Boolean true Enables user registration.
max_face_detection Number 2 Maximum allowed detected faces in verification.
exchange_fee Number 253.6 Exchange fee applied to transactions.
allowed_email_verification Boolean false Whether email verification is allowed.
mcp_buy_is_active Boolean false Enables/disables MCP buy feature.
expiry_time_transaction_order JSON { "amount": "24", "unit": "hours" } Expiry time for transaction orders.
qr_logo_src String "https://backoffice.ducapp.com/assets/image/logo-collapse.png" URL for QR code logo.
balance_delta Number 0.5 Adjustment value applied to balances.
face_recognition_distance_threshold Number 0.6 Threshold for face recognition similarity.
allowed_phone_verification Boolean false Whether phone verification is allowed.
google_pay_buy_is_active String "true" Indicates if Google Pay buy option is active.
send_user_location_on_buy Boolean false Sends user location during buy transactions.
kyc_verification_items JSON [{"name":"Email","value":"email"},{"name":"Phone","value":"phone"}] List of required KYC verification items.
crypto_spread String "2.5" Spread applied to crypto transactions.
avs_moneris_verify Boolean true Enables AVS verification with Moneris.
cuban_cards_regex JSON { "BPA_CARD": "^((92)\\d{0,2})(1299)\\d{0,8}?$", ... } Regex patterns for validating Cuban bank cards.
validate_captcha_enabled Boolean false Whether captcha validation is required.
check_request_otp Boolean true Enables OTP validation for requests.
request_otp_max Number 5 Maximum number of OTP requests allowed.
request_otp_max_time JSON { "amount": "1", "unit": "days" } Maximum time window for OTP requests.
mailgun_active_domain String "mail.ducapp.com" Active Mailgun domain used for sending emails.
transaction_fee_source String "range" Source used for determining transaction fee.
zelle_money_transfer_address String "emailtransfer@ducapp.com" Email address used for Zelle transfers.

Get User System Status by Key

Endpoint to retrieve the details of a specific application setting using its key.

curl --location --request GET 'https://backend.ducapp.net/api/v2/settings/payments_drop_in' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>'
--header 'Content-Type': application/json'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "<Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://backend.ducapp.net/api/v2/settings/payments_drop_in", requestOptions)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error))
import requests

url = "https://backend.ducapp.net/api/v2/settings/payments_drop_in"

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers)

print(response.text)

Example Response:

{
    "payments_drop_in": {
        "_id": "6384ed3aadf38b000e9f54f2",
        "key": "payments_drop_in",
        "active": true,
        "value": true,
        "type": "system",
        "scope": "payment",
        "updatedAt": "2025-05-12T20:11:31.709Z",
        "createdAt": "2022-11-28T17:17:46.546Z",
        "valueType": "boolean"
    }
}

Request

GET /api/v2/settings/{key}

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Path Parameters

NAME TYPE DESCRIPTION
settingKey string The key of the setting to be retrieved

Response Body

The response is an object where the key matches the settingKey.

NAME TYPE DESCRIPTION
_id string Unique identifier of the setting
active boolean Whether the setting is active
key string Setting key
value any Value of the setting (string, number, boolean)
type string Category/type of the setting (e.g. system, coins, topups)
scope string Scope of the setting
createdAt string Timestamp of creation
updatedAt string Timestamp of last update
valueType string Defines the type of the value field (e.g., string, number, boolean, json).

Available key Values

The following keys can be used in the path parameter {key}:

key type scope
exchange_update_mode coins coins
exchange_spread coins coins
ccard_buying_period blockchain blockchain
email_money_transfer_address system email_transfer
topups_agent_discount_percent topups
topups_provider system topups
duc_app_fee_multiplier system cashout
moderate_thunes_transaction system cashout
user_kyc_verification_is_active system app
apple_pay_buy_is_active system app
crypto_buy_is_active system app
moderate_min_buy_flow_limit system tokenbuy
ftp_base_path
user_register_enabled system signup
max_face_detection system face-recognition
exchange_fee coins
topups_discount_percent topups topups
is_on_maintenance system app
cashout_card_allow_send_money system cashout
enable_disable_services system service
min_amount_to_verification system app
allowed_email_verification system signup
thunes_exchange_spread system cashout
cashout_limit_amount system cashout
valid_kyc_period system app
mcp_buy_is_active system app
expiry_time_transaction_order system

Get User Service Status

Endpoint to retrieve the status of the different services available to the authenticated user

curl --location --request GET 'https://backend.ducapp.net/api/v2/settings/user/service-status' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>'
--header 'Content-Type: application/json
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://backend.ducapp.net/api/v2/settings/user/service-status", requestOptions)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests

url = "https://backend.ducapp.net/api/v2/settings/user/service-status"

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers)

print(response.text)

Example Response:

{
  "PAYMENT_REQUEST": true,
  "TOKENS_BUY": false,
  "TOKENS_BUY_GPAY": false,
  "TOKENS_BUY_APPLE_PAY": false,
  "TOKENS_BUY_CRYPTO": true,
  "TOKENS_BUY_CRYPTO_APPLE": true,
  "EMAIL_PAYMENT_REQUEST": true,
  "ZELLE_EMAIL_PAYMENT_REQUEST": true,
  "SEPA_EMAIL_PAYMENT_REQUEST": true,
  "ACH_EMAIL_PAYMENT_REQUEST": true,
  "MLC_PAYMENT_REQUEST": false,
  "PAYMENT_LINK_REQUEST": true,
  "INSTAPAY_EUROPA": true,
  "AUTHORIZENET_CAD": true,
  "AUTHORIZENET_USD": true,
  "TOKEN_EXCHANGE": true,
  "TOKENS_BUY_MCP": false,
  "ADD_FUND": false,
  "P2P_TRANSFER": true,
  "SCAN_PAY_P2P_TRANSFER": true,
  "TOPUP_RECHARGE": true,
  "CREDIT_CARD_TRANSACTION": true,
  "CREDIT_CARD_TRANSACTION_USD": true,
  "MLC_CREDIT_CARD_TRANSACTION": true,
  "DELIVERY_TRANSACTION": true,
  "DELIVERY_TRANSACTION_USD": true,
  "DELIVERY_TRANSACTION_EUR": true,
  "EMAIL_MONEY_TRANSACTION": true,
  "THUNES_TRANSACTION": true,
  "BANK_ACCOUNT_TRANSACTION": false,
  "TOKENS_BUY_INLINE": true,
  "TOKENS_BUY_GPAY_INLINE": false,
  "TOKENS_BUY_APPLE_PAY_INLINE": false,
  "TOKENS_BUY_CRYPTO_INLINE": true,
  "TOKENS_BUY_CRYPTO_INLINE_APPLE": true,
  "EMAIL_PAYMENT_REQUEST_INLINE": true,
  "ZELLE_EMAIL_PAYMENT_REQUEST_INLINE": true,
  "SEPA_EMAIL_PAYMENT_REQUEST_INLINE": true,
  "ACH_EMAIL_PAYMENT_REQUEST_INLINE": true,
  "MLC_PAYMENT_REQUEST_INLINE": false,
  "PAYMENT_LINK_REQUEST_INLINE": true,
  "INSTAPAY_EUROPA_INLINE": true,
  "AUTHORIZENET_CAD_INLINE": true,
  "AUTHORIZENET_USD_INLINE": false
}

Request

GET /api/v2/settings/user/service-status

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Request Body

None Required

Response Body

The response is an object where each property is a service flag (boolean), indicating whether the service is available (true) or not (false).

NAME TYPE DESCRIPTION
PAYMENT_REQUEST boolean Whether generic payment requests are enabled
TOKENS_BUY boolean Ability to buy tokens
TOKENS_BUY_GPAY boolean Ability to buy tokens using Google Pay
TOKENS_BUY_APPLE_PAY boolean Ability to buy tokens using Apple Pay
TOKENS_BUY_CRYPTO boolean Ability to buy tokens using cryptocurrencies
TOKENS_BUY_CRYPTO_APPLE boolean Ability to buy tokens with crypto via Apple Pay
EMAIL_PAYMENT_REQUEST boolean Whether email-based payment requests are enabled
ZELLE_EMAIL_PAYMENT_REQUEST boolean Enable payment requests via Zelle email
SEPA_EMAIL_PAYMENT_REQUEST boolean Enable payment requests via SEPA email
ACH_EMAIL_PAYMENT_REQUEST boolean Enable payment requests via ACH email
MLC_PAYMENT_REQUEST boolean Enable MLC-based payment requests
PAYMENT_LINK_REQUEST boolean Whether payment link requests are enabled
INSTAPAY_EUROPA boolean Enable Instapay services in Europe
AUTHORIZENET_CAD boolean Enable Authorize.net payments in CAD
AUTHORIZENET_USD boolean Enable Authorize.net payments in USD
TOKEN_EXCHANGE boolean Whether token exchange is available
TOKENS_BUY_MCP boolean Ability to buy tokens using MCP
ADD_FUND boolean Ability to add funds to the wallet
P2P_TRANSFER boolean Enable peer-to-peer transfers
SCAN_PAY_P2P_TRANSFER boolean Enable peer-to-peer transfers via Scan & Pay
TOPUP_RECHARGE boolean Enable top-up recharges
CREDIT_CARD_TRANSACTION boolean Enable credit card transactions
CREDIT_CARD_TRANSACTION_USD boolean Enable credit card transactions in USD
MLC_CREDIT_CARD_TRANSACTION boolean Enable credit card transactions in MLC
DELIVERY_TRANSACTION boolean Enable delivery-related transactions
DELIVERY_TRANSACTION_USD boolean Enable delivery transactions in USD
DELIVERY_TRANSACTION_EUR boolean Enable delivery transactions in EUR
EMAIL_MONEY_TRANSACTION boolean Enable email-based money transactions
THUNES_TRANSACTION boolean Enable Thunes transactions
BANK_ACCOUNT_TRANSACTION boolean Enable bank account transactions
TOKENS_BUY_INLINE boolean Ability to buy tokens inline (UI option)
TOKENS_BUY_GPAY_INLINE boolean Inline token purchase with Google Pay
TOKENS_BUY_APPLE_PAY_INLINE boolean Inline token purchase with Apple Pay
TOKENS_BUY_CRYPTO_INLINE boolean Inline token purchase with cryptocurrencies
TOKENS_BUY_CRYPTO_INLINE_APPLE boolean Inline crypto purchase via Apple Pay
EMAIL_PAYMENT_REQUEST_INLINE boolean Inline email-based payment requests
ZELLE_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline Zelle email payment requests
SEPA_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline SEPA email payment requests
ACH_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline ACH email payment requests
MLC_PAYMENT_REQUEST_INLINE boolean Inline MLC payment requests
PAYMENT_LINK_REQUEST_INLINE boolean Inline payment link requests
INSTAPAY_EUROPA_INLINE boolean Inline Instapay Europe services
AUTHORIZENET_CAD_INLINE boolean Inline Authorize.net payments in CAD
AUTHORIZENET_USD_INLINE boolean Inline Authorize.net payments in USD

Get User Service Status by Key

Endpoint to retrieve the status of a specific user service by its key.

curl --location --request GET 'https://backend.ducapp.net/api/v2/settings/user/service-status/PAYMENT_REQUEST' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://backend.ducapp.net/api/v2/settings/user/service-status/PAYMENT_REQUEST", requestOptions)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests

url = "https://backend.ducapp.net/api/v2/settings/user/service-status/PAYMENT_REQUEST"

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers)

print(response.text)

Example Response:

{
  "PAYMENT_REQUEST": true
}

Request

GET /api/v2/settings/user/service-status/{key}

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Path Parameters

NAME TYPE DESCRIPTION
key string The service key to check availability status

Response Body

The response is an object where the property matches the requested key. Each property is a boolean flag (true or false) indicating if the service is enabled.

Key Type Description
PAYMENT_REQUEST boolean Whether generic payment requests are enabled
TOKENS_BUY boolean Ability to buy tokens
TOKENS_BUY_GPAY boolean Ability to buy tokens using Google Pay
TOKENS_BUY_APPLE_PAY boolean Ability to buy tokens using Apple Pay
TOKENS_BUY_CRYPTO boolean Ability to buy tokens using cryptocurrencies
TOKENS_BUY_CRYPTO_APPLE boolean Ability to buy tokens with crypto via Apple Pay
EMAIL_PAYMENT_REQUEST boolean Whether email-based payment requests are enabled
ZELLE_EMAIL_PAYMENT_REQUEST boolean Enable payment requests via Zelle email
SEPA_EMAIL_PAYMENT_REQUEST boolean Enable payment requests via SEPA email
ACH_EMAIL_PAYMENT_REQUEST boolean Enable payment requests via ACH email
MLC_PAYMENT_REQUEST boolean Enable MLC-based payment requests
PAYMENT_LINK_REQUEST boolean Whether payment link requests are enabled
INSTAPAY_EUROPA boolean Enable Instapay services in Europe
AUTHORIZENET_CAD boolean Enable Authorize.net payments in CAD
AUTHORIZENET_USD boolean Enable Authorize.net payments in USD
TOKEN_EXCHANGE boolean Whether token exchange is available
TOKENS_BUY_MCP boolean Ability to buy tokens using MCP
ADD_FUND boolean Ability to add funds to the wallet
P2P_TRANSFER boolean Enable peer-to-peer transfers
SCAN_PAY_P2P_TRANSFER boolean Enable peer-to-peer transfers via Scan & Pay
TOPUP_RECHARGE boolean Enable top-up recharges
CREDIT_CARD_TRANSACTION boolean Enable credit card transactions
CREDIT_CARD_TRANSACTION_USD boolean Enable credit card transactions in USD
MLC_CREDIT_CARD_TRANSACTION boolean Enable credit card transactions in MLC
DELIVERY_TRANSACTION boolean Enable delivery-related transactions
DELIVERY_TRANSACTION_USD boolean Enable delivery transactions in USD
DELIVERY_TRANSACTION_EUR boolean Enable delivery transactions in EUR
EMAIL_MONEY_TRANSACTION boolean Enable email-based money transactions
THUNES_TRANSACTION boolean Enable Thunes transactions
BANK_ACCOUNT_TRANSACTION boolean Enable bank account transactions
TOKENS_BUY_INLINE boolean Ability to buy tokens inline (UI option)
TOKENS_BUY_GPAY_INLINE boolean Inline token purchase with Google Pay
TOKENS_BUY_APPLE_PAY_INLINE boolean Inline token purchase with Apple Pay
TOKENS_BUY_CRYPTO_INLINE boolean Inline token purchase with cryptocurrencies
TOKENS_BUY_CRYPTO_INLINE_APPLE boolean Inline crypto purchase via Apple Pay
EMAIL_PAYMENT_REQUEST_INLINE boolean Inline email-based payment requests
ZELLE_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline Zelle email payment requests
SEPA_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline SEPA email payment requests
ACH_EMAIL_PAYMENT_REQUEST_INLINE boolean Inline ACH email payment requests
MLC_PAYMENT_REQUEST_INLINE boolean Inline MLC payment requests
PAYMENT_LINK_REQUEST_INLINE boolean Inline payment link requests
INSTAPAY_EUROPA_INLINE boolean Inline Instapay Europe services
AUTHORIZENET_CAD_INLINE boolean Inline Authorize.net payments in CAD
AUTHORIZENET_USD_INLINE boolean Inline Authorize.net payments in USD

Update Notification Settings

Endpoint to update the user’s notification providers preferences.

curl --location --request PATCH 'https://backend.ducapp.net/api/v2/users/update-settings-notifications' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "notificationProviders": [
    { "provider": "email", "active": false },
    { "provider": "sms", "active": true },
    { "provider": "push", "active": true }
  ]
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "notificationProviders": [
    { "provider": "email", "active": false },
    { "provider": "sms", "active": true },
    { "provider": "push", "active": true }
  ]
});

var requestOptions = {
  method: "PATCH",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://backend.ducapp.net/api/v2/users/update-settings-notifications", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://backend.ducapp.net/api/v2/users/update-settings-notifications"

payload = json.dumps({
  "notificationProviders": [
    { "provider": "email", "active": false },
    { "provider": "sms", "active": true },
    { "provider": "push", "active": true }
  ]
})
headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("PATCH", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
  "data": {
    "status": 201,
    "payload": "Notification providers successfully updated"
  }
}

Request

PATCH /api/v2/users/update-settings-notifications

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
notificationProviders [object] Array of providers with their active status

notificationProvider Object

NAME TYPE DESCRIPTION
provider string Notification channel (email, sms, push)
active boolean Whether the notification provider is active

Response Body

NAME TYPE DESCRIPTION
data object Response object (see below)

data Object

NAME TYPE DESCRIPTION
status number HTTP-like status code (201 if successfully updated)
payload string Confirmation message

Request OTP

Endpoint to request a new One-Time Password (OTP) for a specific user. This endpoint allows configuration of whether the request should be validated before generating the OTP.

By default, the parameter evaluateBeforeRequest is set to true.

curl --location --request POST 'https://backend.ducapp.net/api/private/users/otp' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "userId": "5ebaf91c80b385353b9283da",
    "value": "john.doe@gmail.com",
    "evaluateBeforeRequest": false
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  userId: "5ebaf91c80b385353b9283da",
  value: "john.doe@gmail.com",
  evaluateBeforeRequest: false
});

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

fetch("https://backend.ducapp.net/api/private/users/otp", requestOptions)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests
import json

url = "https://backend.ducapp.net/api/private/users/otp"

payload = json.dumps({
  "userId": "5ebaf91c80b385353b9283da",
  "value": "john.doe@gmail.com",
  "evaluateBeforeRequest": false
})
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
    "requestCompleted": true,
    "message": {
        "code": 200,
        "message": "260144"
    }
}

Request

POST /api/private/users/otp

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
userId string Unique ID of the user requesting the OTP
value string Destination for OTP (phone number or email)
evaluateBeforeRequest boolean Whether to validate request conditions before sending the OTP

Response Body

NAME TYPE DESCRIPTION
requestCompleted boolean Indicates if the OTP request was successfully completed
message object Container with OTP details
message.code number Response status code (e.g., 200)
message.message string The generated OTP code sent to the user

Request Simple OTP

Endpoint to request a new One-Time Password (OTP) for a specific user in a simplified way.

Unlike /otp, this endpoint always disables pre-validation (evaluateBeforeRequest = false) and directly generates the OTP.

curl --location --request POST 'https://backend.ducapp.net/api/private/users/simple-otp' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "userId": "5ebaf91c80b385353b9283da",
    "value": "john.doe@gmail.com"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  userId: "5ebaf91c80b385353b9283da",
  value: "john.doe@gmail.com"
});

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

fetch("https://backend.ducapp.net/api/private/users/simple-otp", requestOptions)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests
import json

url = "https://backend.ducapp.net/api/private/users/simple-otp"

payload = json.dumps({
  "userId": "5ebaf91c80b385353b9283da",
  "value": "john.doe@gmail.com"
})
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
    "requestCompleted": true,
    "message": {
        "code": 200,
        "message": "260144"
    }
}

Request

POST /api/private/users/simple-otp

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
userId string Unique ID of the user requesting the OTP
value string Destination for OTP (phone number or email)

Response Body

NAME TYPE DESCRIPTION
requestCompleted boolean Indicates if the OTP request was successfully completed
message object Container with OTP details
message.code number Response status code (e.g., 200)
message.message string The generated OTP code sent to the user

Request Password Change

Endpoint to request a password change for a user account via email or phone number.

curl --location --request POST 'https://backend.ducapp.net/api/auth/request-password-change' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "john.doe@gmail.com"
}'
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@gmail.com"
});

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

fetch("https://backend.ducapp.net/api/auth/request-password-change", requestOptions)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests
import json

url = "https://backend.ducapp.net/api/auth/request-password-change"

payload = json.dumps({
  "email": "john.doe@gmail.com"
})
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
    "changeCompleted": true,
    "message": "We have sent a confirmation code to your email/phone to recover your password"
}

Request

POST /api/auth/request-password-change

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
email string Registered email of the user
phone string Registered phone number of the user (without spaces)

⚠️ Note: You must provide either email or phone, not both.

Response Body

NAME TYPE DESCRIPTION
changeCompleted boolean Indicates if the password reset process was successfully started
message string Confirmation message

Change Password

Endpoint to confirm and complete the user password reset process using the received activation code.

curl --location --request POST 'https://backend.ducapp.net/api/auth/change-password' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "activationCode": "704202",
    "password": "NarutoSasuke*69"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  activationCode: "704202",
  password: "NarutoSasuke*69"
});

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

fetch("https://backend.ducapp.net/api/auth/change-password", requestOptions)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests
import json

url = "https://backend.ducapp.net/api/auth/change-password"

payload = json.dumps({
  "activationCode": "704202",
  "password": "NarutoSasuke*69"
})
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
  "changeCompleted": true,
  "message": "Password successfully updated"
}

Request:

POST /api/auth/change-password

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
activationCode string Code received by email/phone to confirm
password string New password to set for the account

Response Body

NAME TYPE DESCRIPTION
changeCompleted boolean Indicates if password change was successful
message string Informational message

Gift Card

Create

Endpoint to generate a gift card.

curl --location --request POST 'https://backend.ducapp.net/api/private/cards/create' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "holderName": "Pepito Perez",
  "email": "pepito.perez@email.com",
  "phone": "+5355555555",
  "idNumber": "92051540268"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  holderName: "Pepito Perez",
  email: "pepito.perez@email.com",
  phone: "+5355555555",
  idNumber: "92051540268",
});

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

fetch("https://backend.ducapp.net/api/private/cards/create", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests
import json

url = "https://backend.ducapp.net/api/private/cards/create"

payload = json.dumps({
  "holderName": "Pepito Perez",
  "email": "pepito.perez@email.com",
  "phone": "+5355555555",
  "idNumber": "92051540268"
})

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
  "record": {
    "isExpired": false,
    "_id": "65cbef0b5ec3cb655f60196c",
    "holder": "John Doe Doe",
    "idNumber": "92051540267",
    "email": "john.doe@email.com",
    "phone": "+5355555556",
    "number": "1605661015643626",
    "cvv2": "385",
    "expiry": {
      "month": "01",
      "year": "25"
    },
    "balance": [],
    "negativeRetentions": [],
    "positiveRetentions": [],
    "createdAt": "2024-02-13T22:36:59.775Z",
    "updatedAt": "2024-02-13T22:36:59.775Z"
  }
}

Request

POST /api/private/cards/create

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
holderName string (Optional) Gift card holder name
email string Gift card associated email
phone string Gift card associated phone number
idNumber string Gift card associated identification number

Response Body

NAME TYPE DESCRIPTION
accessToken string Token to access authenticated endpoints
error string General error name
message string Error description
statusCode number Error code

Validate

Endpoint to check whether a gift card is valid.

curl --location --request POST 'https://backend.ducapp.net/api/private/cards/validate' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "number": "1261053544885941",
    "cvv2": "952"
}
'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  number: "1261053544885941",
  cvv2: "952",
});

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

fetch("https://backend.ducapp.net/api/private/cards/validate", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests
import json

url = "https://backend.ducapp.net/api/private/cards/validate"

payload = json.dumps({
    number: '1261053544885941',
    cvv2: '952',
})
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
  "valid": false
}

Request

POST /api/private/cards/validate

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
id or number string The id or the number of the gift card
cvv2 string The security code of the gift card

Response Body

NAME TYPE DESCRIPTION
valid boolean Whether the provided information is valid or not
message string Description message

Credit

This endpoint could be used to add funds to a gift card.

import requests
import json

url = "https://backend.ducapp.net/api/private/cards/credit"

payload = json.dumps({
  "number": "1261053544885941",
  "currency": "USD",
  "amount": 10,
  "externalID": "GiftCard-CREDIT-4e604f32-0b33-4631-88ac-2f3e56e3ee15",
  "concept": "Try to reboot the SMTP card, maybe it will index the digital matrix!",
  "paymentMethod": {
    "paymentLink": true
  }
})

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/cards/credit' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "number": "1261053544885941",
  "currency": "USD",
  "amount": 10,
  "externalID": "GiftCard-CREDIT-4e604f32-0b33-4631-88ac-2f3e56e3ee15",
  "concept": "Try to reboot the SMTP card, maybe it will index the digital matrix!",
  "paymentMethod": {
    "paymentLink": true
  }
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  number: "1261053544885941",
  currency: "USD",
  amount: 10,
  externalID: "GiftCard-CREDIT--4e604f32-0b33-4631-88ac-2f3e56e3ee15",
  concept:
    "Try to reboot the SMTP card, maybe it will index the digital matrix!",
  paymentMethod: {
    paymentLink: true,
  },
});

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

fetch("https://backend.ducapp.net/api/private/cards/credit", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));

Example Response:

{
  "data": {
    "status": 200,
    "payload": "The transaction is being processed, a notify will be sent to your email (john.doe@gmail.com).",
    "paymentLink": {
      "url": "https://pay.ducapp.com/cnrHRA",
      "id": "plink_1OP7d1KHKfW45102zV3baPGa",
      "qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAACcCAYAAACKuMJNAAAABmJLR0QA/wD/AP+gvaeTg=="
    }
  }
}

Request

POST /api/private/cards/credit

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
number string Number of the gift card for the funds to be added to
currency CAD, USD, EUR Account currency
amount number Amount to be added
externalID string A unique identifier to keep track of the state of the associated transaction
concept string (Optional) Descriptive short sentence of the operation
paymentMethod {Payment Method} Payment method information

Payment Method

NAME TYPE DESCRIPTION
paymentLink {Payment Link} or boolean Whether to complete de payment process using a payment link.
serverToServer Server to Server Complete the payment process sending credit card information
NAME TYPE DESCRIPTION
provider string The payment link provider. Could be default or duc to use a DUC platform custom payment link
redirectUrl string Url to be redirected to after the payment have been completed

Server to Server

NAME TYPE DESCRIPTION
number string Credit card number
expiry_date string Credit card expiry date
cvc string Credit card security code
avs_street_name string Credit card address street name
avs_street_number string Credit card address house number
avs_zipcode string Credit card address zip code
name_on_card string Name on card
email string Credit card associated email
phone string Credit card associated phone
location string Location of the credit card owner at the moment of the operation

Location

NAME TYPE DESCRIPTION
latitude string Latitude
longitude string Longitude
timestamp string Timestamp

Response Body

NAME TYPE DESCRIPTION
status number Status of the request
payload string Description message
paymentLink Payment Link Response Payment link information to complete the payment process
error boolean General error name
message string Error description
statusCode string Error status code
NAME TYPE DESCRIPTION
url string Url of the payment link
id string Id of the payment link
qrCode string QR code associated to the payment link

Debit

Endpoint to debit funds from a gift card.

import requests
import json

url = "https://backend.ducapp.net/api/private/cards/debit"

payload = json.dumps({
  "number": "1374207233653440",
  "cvv2": "105",
  "amount": 1,
  "currency": "USD",
  "externalID": "GiftCard-DEBIT-8ea02b91-bb13-4acf-abb5-102541278844"
})

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/cards/debit' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "number": "1374207233653440",
  "cvv2": "105",
  "amount": 1,
  "currency": "USD",
  "externalID": "GiftCard-DEBIT-8ea02b91-bb13-4acf-abb5-102541278844"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  number: "1374207233653440",
  cvv2: "105",
  amount: 1,
  currency: "USD",
  externalID: "GiftCard-DEBIT-8ea02b91-bb13-4acf-abb5-102541278844",
});

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

fetch("https://backend.ducapp.net/api/private/cards/debit", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));

Example Response:

{
  "transactionID": "AA00380689",
  "status": 200,
  "payload": "The transaction is being processed, a notify will be sent to your email (john.doe@gmail.com)."
}

Request

POST /api/private/cards/debit

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
number string The gift card number
cvv2 string The gift card security code
amount number The amount to be debit
currency string The currency account to be debit from
externalID string Unique id to keep track of the status changes for the associate transaction

Response Body

NAME TYPE DESCRIPTION
transactionID string Transaction id reference
status number Status of the request
payload string Description of the response

Get Balance

Endpoint to get the balance of a gift card.

import requests
import json

url = "https://backend.ducapp.net/api/private/cards/balance/657a05df7c8a8598bf217605"

payload = {}
headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch(
  "https://backend.ducapp.net/api/private/cards/balance/657a05df7c8a8598bf217605 ",
  requestOptions
)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
curl --location --request GET 'https://backend.ducapp.net/api/private/cards/balance/657a05df7c8a8598bf217605 ' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \

Example Response:

{
  "balance": [
    {
      "currency": "USD",
      "amount": "30.00"
    },
    {
      "currency": "CAD",
      "amount": 0
    },
    {
      "currency": "CUP",
      "amount": 0
    },
    {
      "currency": "EUR",
      "amount": 0
    }
  ],
  "negativeRetentions": [
    {
      "currency": "USD",
      "amount": 6
    }
  ],
  "positiveRetentions": [
    {
      "currency": "USD",
      "amount": 10
    }
  ]
}

Request

GET /api/private/cards/balance/:id

Host: backend.ducapp.net

Headers:

x-api-key: <YOUR_API_KEY>

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Response Body

NAME TYPE DESCRIPTION
balance [Account] Array of Account with the balance of each coin
negativeRetentions [Account] Array of Account with debit type pending operations of each coin
positiveRetentions [Account] Array of Account with add fund type pending operations of each coin

Account

NAME TYPE DESCRIPTION
currency string Code of the account currency
amount float Amount of the account

List Gift Cards

Endpoint to get the associated gift cards.

import requests
import json

url = "https://backend.ducapp.net/api/private/cards"

payload = json.dumps({})
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/cards' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

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

Example Response:

{
  "data": [
    {
      "_id": "659880af93331a457c224bbc",
      "isExpired": false,
      "holder": "Kathleen Ernser PhD",
      "number": "1421476434954286",
      "cvv2": "799",
      "expiry": {
        "month": "07",
        "year": "25"
      },
      "balance": [
        {
          "amount": 32,
          "currency": "USD"
        },
        {
          "amount": 0,
          "currency": "CAD"
        },
        {
          "amount": 0,
          "currency": "CUP"
        },
        {
          "amount": 0,
          "currency": "EUR"
        }
      ],
      "negativeRetentions": [
        {
          "amount": 8,
          "currency": "USD"
        }
      ],
      "positiveRetentions": [
        {
          "amount": 10,
          "currency": "USD"
        }
      ]
    }
  ]
}

Request

GET /api/private/cards

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

Headers:

Response Body

NAME TYPE DESCRIPTION
data [Gift Card] Array of gift card object

Gift Card

NAME TYPE DESCRIPTION
_id string Gift card identifier
isExpired boolean Whether the gift card is expired or not
holder string Gift card holder name
number string Gift card number
cvv2 string Gift card security code
expiry {Expiry} Gift card expiry date
balance [Account] Array of Account with the balance of each coin
negativeRetentions [Account] Array of Account with debit type pending operations of each coin
positiveRetentions [Account] Array of Account with add fund type pending operations of each coin

Expiry

NAME TYPE DESCRIPTION
month string Expiry month
year string Expiry year two numbers format

Account

NAME TYPE DESCRIPTION
currency string Code of the account currency
amount float Amount of the account

Expire

Endpoint to expire a gift card.

import requests
import json

url = "https://backend.ducapp.net/api/private/cards/expire/657a05df7c8a8598bf217605"

payload = {}
headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: "POST",
  headers: myHeaders,
  redirect: "follow"
};

fetch(
  "https://backend.ducapp.net/api/private/cards/expire/657a05df7c8a8598bf217605 ",
  requestOptions
)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
curl --location --request POST 'https://backend.ducapp.net/api/private/cards/expire/657a05df7c8a8598bf217605 ' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \

Example Response:

{
  "success": true,
  "message": "Card expired successfully"
}

Request

POST /api/private/cards/expire/:id

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Response Body

NAME TYPE DESCRIPTION
success boolean Whether the gift card was expired or not
message string Description message

Beneficiaries

Get Beneficiaries

Endpoint to obtain the user beneficiaries list.

curl --location --request POST 'https://backend.ducapp.net/api/private/users/beneficiary' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

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

fetch("https://backend.ducapp.net/api/private/users/beneficiary", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://backend.ducapp.net/api/private/users/beneficiary"

payload = {}
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

[
      {
        "isBlocked": false,
        "_id": "64a6eb05f9bd31b44b52a244",
        "deliveryCI": "43120112345",
        "deliveryContact": "Juan",
        "deliveryLastName": "Perez",
        "deliverySecondLastName": "Cruz",
        "deliveryArea": "Matanzas",
        "deliveryZone": "Provincias",
        "country_iso_code": "CU",
        "deliveryCity": "Limonar",
        "streetName": "asdf",
        "houseNumber": "34",
        "zipcode": "54",
        "deliveryPhone": "3243434",
        "email": "wewe@d.cu",
        "country": "Cuba",
        "beneficiaryFullName": "Juan Perez Cruz",
        "creditCards": [
            {
                "number": "9227959873502222",
                "cardHolderName": "Juan Perez Cruz",
                "bankName": "Banco Metropolitano",
                "currency": "CUP"
            }
        ]
    }
]

Request

POST /api/private/users/beneficiary

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Response Body

NAME TYPE DESCRIPTION
data [{Beneficiary}] Array of beneficiary objects

Beneficiary

NAME TYPE DESCRIPTION
isBlocked string Wheter the beneficiary is blocked or not
_id string Beneficiary Id
deliveryCI string Beneficiary Identification Number
deliveryContact string Beneficiary Name
deliveryLastName string Beneficiary Lastname
deliverySecondLastName string Beneficiary Second Lastname
deliveryArea string Beneficiary Province
deliveryZone string Zone to which the province of the beneficiary belongs
country_iso_code string The ISO code of the country
deliveryCity string Beneficiary Municipality
streetName string Beneficiary street name
houseNumber string Beneficiary house number
zipcode string Beneficiary zip code
deliveryPhone string Beneficiary phone number
email string Beneficiary email
country string Beneficiary country name
beneficiaryFullName string Beneficiary full name
creditCards [{Credit Card}] Array of credit card asociated to this beneficiary

Credit Card

NAME TYPE DESCRIPTION
number string The credit card numeber
cardHolderName string The credit card holder name
bankName string The credit card bank name
currency string The credit card currency

Search Beneficiaries by CI

Endpoint to obtain a beneficiary given his identity number.

curl --location --request POST 'https://backend.ducapp.net/api/private/users/beneficiary/92062743322' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

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

fetch("https://backend.ducapp.net/api/private/users/beneficiary/92062743322", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://backend.ducapp.net/api/private/users/beneficiary/92062743322"

payload = {}
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

[
    {
        "_id": "61a5151e6732e5442b4c482c",
        "isBlocked": false,
        "deliveryCI": "92062743322",
        "deliveryContact": "John",
        "deliveryLastName": "Doe",
        "deliverySecondLastName": "Doe",
        "country_iso_code": "CU",
        "country": "Cuba",
        "deliveryArea": "Santiago de Cuba",
        "deliveryZone": "Provincias",
        "deliveryCity": "Songo la Maya",
        "streetName": "Main",
        "houseNumber": "195",
        "zipcode": "80100",
        "email": "john.doe@test.com",
        "deliveryPhone": "+5358542711",
        "beneficiaryFullName": "John Doe Doe",
        "creditCards": [
            {
                "number": "9225959870121891",
                "cardHolderName": "John Doe",
                "bankName": "Banco Metropolitano",
                "currency": "USD"
            },
        ]
    }
]

Request

POST /api/private/users/beneficiary/{identifier}

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Response Body

NAME TYPE DESCRIPTION
data [{Beneficiary}] Array of beneficiary objects

Beneficiary

NAME TYPE DESCRIPTION
isBlocked string Wheter the beneficiary is blocked or not
_id string Beneficiary Id
deliveryCI string Beneficiary Identification Number
deliveryContact string Beneficiary Name
deliveryLastName string Beneficiary Lastname
deliverySecondLastName string Beneficiary Second Lastname
deliveryArea string Beneficiary Province
deliveryZone string Zone to which the province of the beneficiary belongs
country_iso_code string The ISO code of the country
deliveryCity string Beneficiary Municipality
streetName string Beneficiary street name
houseNumber string Beneficiary house number
zipcode string Beneficiary zip code
deliveryPhone string Beneficiary phone number
email string Beneficiary email
country string Beneficiary country name
beneficiaryFullName string Beneficiary full name
creditCards [{Credit Card}] Array of credit card asociated to this beneficiary

Credit Card

NAME TYPE DESCRIPTION
number string The credit card numeber
cardHolderName string The credit card holder name
bankName string The credit card bank name
currency string The credit card currency

Create beneficiary

Endpoint to create a beneficiary for the authenticated user.

curl --location --request POST 'https://backend.ducapp.net/api/private/users/beneficiary/create' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "identityNumber": "92062743323",
    "firstName": "John",
    "lastName": "Doe",
    "secondLastName": "Doe",
    "countryIsoCode": "CU",
    "country": "Cuba",
    "zone": "Santa Clara",
    "province": "Villa Clara",
    "municipality": "Santa Clara",
    "streetName": "Street",
    "houseNumber": "15",
    "zipcode": "80100",
    "email": "john.doe@test.com",
    "phone": "+5357575757",
    "creditCards": []
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({{
    "identityNumber": "92062743323",
    "firstName": "John",
    "lastName": "Doe",
    "secondLastName": "Doe",
    "countryIsoCode": "CU",
    "country": "Cuba",
    "zone": "Santa Clara",
    "province": "Villa Clara",
    "municipality": "Santa Clara",
    "streetName": "Street",
    "houseNumber": "15",
    "zipcode": "80100",
    "email": "john.doe@test.com",
    "phone": "+5357575757",
    "creditCards": []
});

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

fetch("https://backend.ducapp.net/api/private/users/beneficiary/create", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://backend.ducapp.net/api/private/users/beneficiary/create"

payload = json.dumps({
    "identityNumber": "92062743323",
    "firstName": "John",
    "lastName": "Doe",
    "secondLastName": "Doe",
    "countryIsoCode": "CU",
    "country": "Cuba",
    "zone": "Santa Clara",
    "province": "Villa Clara",
    "municipality": "Santa Clara",
    "streetName": "Street",
    "houseNumber": "15",
    "zipcode": "80100",
    "email": "john.doe@test.com",
    "phone": "+5357575757",
    "creditCards": []
})
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
    "creditCardIds": [],
    "senders": [
        "6e67b9045016f12effaa2f9d"
    ],
    "isBlocked": false,
    "_id": "68b67e3d8eb80b4e5b2a5831",
    "deliveryCI": "92062743329",
    "deliveryContact": "John",
    "deliveryLastName": "Doe",
    "deliverySecondLastName": "Doe",
    "deliveryArea": "Villa Clara",
    "deliveryZone": "Santa Clara",
    "country_iso_code": "CU",
    "metadata": {
        "apiClientId": "67b3f875bf625ceee691evb8"
    },
    "deliveryCity": "Santa Clara",
    "streetName": "Street",
    "houseNumber": "15",
    "zipcode": "80100",
    "deliveryPhone": "+5357575757",
    "country": "Cuba",
    "email": "john.doe@test.com",
    "owner": "6e67b9045016f12effaa2f9d",
    "createdAt": "2025-09-02T05:18:53.933Z",
    "updatedAt": "2025-09-02T05:18:53.933Z",
    "beneficiaryFullName": "John Doe Doe",
    "__v": 0,
    "deliveryFullName": "John Doe Doe",
    "deliveryAddress": "Street 15, ZIP: 80100, Santa Clara, Cuba",
    "birthdate": "1991-06-06T04:00:00.000Z",
    "id": "68b67e3d8eb80b4e5b2a5831"
}

Request

POST /api/private/users/beneficiary/create

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
identityNumber string Beneficiary identification number
firstName string Beneficiary first name
lastName string Beneficiary last name
secondLastName string Beneficiary second last name
countryIsoCode string ISO code of the country (e.g., "CU")
country string Country name
zone string Zone of the beneficiary (e.g., "Santa Clara")
province string Province of the beneficiary
municipality string Municipality of the beneficiary
streetName string Street name of the beneficiary
houseNumber string House number of the beneficiary
zipcode string ZIP/postal code of the beneficiary
email string Email address of the beneficiary
phone string Phone number of the beneficiary
creditCards array Array of credit cards associated (optional)

Response Body

NAME TYPE DESCRIPTION
data {Beneficiary} Beneficiary object

Beneficiary

NAME TYPE DESCRIPTION
creditCardIds [string] IDs of the credit cards linked to this beneficiary
senders [string] Array of sender IDs linked to this beneficiary
isBlocked boolean Whether the beneficiary is blocked or not
_id string Beneficiary ID
deliveryCI string Beneficiary identification number
deliveryContact string Beneficiary first name
deliveryLastName string Beneficiary last name
deliverySecondLastName string Beneficiary second last name
deliveryArea string Beneficiary province
deliveryZone string Beneficiary zone
country_iso_code string ISO code of the country
metadata object Metadata object (e.g., apiClientId)
deliveryCity string Beneficiary municipality
streetName string Beneficiary street name
houseNumber string Beneficiary house number
zipcode string Beneficiary ZIP/postal code
deliveryPhone string Beneficiary phone number
country string Beneficiary country name
email string Beneficiary email
owner string ID of the user who owns this beneficiary
createdAt string (date) Date of creation (ISO 8601 format)
updatedAt string (date) Date of last update (ISO 8601 format)
beneficiaryFullName string Beneficiary full name
__v number Version key (MongoDB internal)
deliveryFullName string Full delivery name of the beneficiary
deliveryAddress string Full formatted delivery address
birthdate string (date) Beneficiary birthdate (if available)
id string Alias of _id (duplicate beneficiary ID)

Credit Card

NAME TYPE DESCRIPTION
number string The credit card number
cardHolderName string The credit card holder name
bankName string The credit card bank name
currency string The credit card currency

Update beneficiary

Endpoint to update a beneficiary given his id.

curl --location --request POST 'https://backend.ducapp.net/api/private/users/beneficiary/update' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header : Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "isBlocked": false,
  "deliveryCI": "92062743329",
  "deliveryContact": "John",
  "deliveryLastName": "Doe",
  "deliverySecondLastName": "Doe",
  "deliveryArea": "Holguín",
  "deliveryZone": "Provincias",
  "country_iso_code": "CU",
  "deliveryCity": "Holguin",
  "streetName": "Main",
  "houseNumber": "200",
  "zipcode": "80100",
  "deliveryPhone": "+5357575757",
  "country": "Cuba",
  "email": "john.doe@test.com",
  "beneficiaryFullName": "John Doe Doe",
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authentication", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "isBlocked": false,
  "deliveryCI": "92062743329",
  "deliveryContact": "John",
  "deliveryLastName": "Doe",
  "deliverySecondLastName": "Doe",
  "deliveryArea": "Holguín",
  "deliveryZone": "Provincias",
  "country_iso_code": "CU",
  "deliveryCity": "Holguin",
  "streetName": "Main",
  "houseNumber": "200",
  "zipcode": "80100",
  "deliveryPhone": "+5357512618",
  "country": "Cuba",
  "email": "john.doe@test.com",
  "beneficiaryFullName": "John Doe Doe",
  "_id": "64b6e055af1bb56a944098db"
});

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

fetch("https://backend.ducapp.net/api/private/users/beneficiary/update", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://backend.ducapp.net/api/private/users/beneficiary/update"

payload = json.dumps({
  "isBlocked": False,
  "deliveryCI": "92062743329",
  "deliveryContact": "John",
  "deliveryLastName": "Doe",
  "deliverySecondLastName": "Doe",
  "deliveryArea": "Holguín",
  "deliveryZone": "Provincias",
  "country_iso_code": "CU",
  "deliveryCity": "Holguin",
  "streetName": "Main",
  "houseNumber": "200",
  "zipcode": "80100",
  "deliveryPhone": "+5357575757",
  "country": "Cuba",
  "email": "john.doe@test.com",
  "beneficiaryFullName": "John Doe Doe",
})
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authentication': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
    "creditCardIds": [],
    "isBlocked": false,
    "_id": "64b6e055af1bb56a944098db",
    "deliveryCI": "92062743329",
    "deliveryContact": "John",
    "deliveryLastName": "Doe",
    "deliverySecondLastName": "Doe",
    "deliveryArea": "Holguín",
    "deliveryZone": "Provincias",
    "country_iso_code": "CU",
    "deliveryCity": "Holguin",
    "streetName": "Main",
    "houseNumber": "200",
    "zipcode": "80100",
    "deliveryPhone": "+5357575757",
    "country": "Cuba",
    "email": "john.doe@test.com",
    "beneficiaryFullName": "John Doe Doe"
}

Request

POST /api/private/users/beneficiary/update

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Response Body

NAME TYPE DESCRIPTION
data {Beneficiary} Beneficiary object

Beneficiary

NAME TYPE DESCRIPTION
isBlocked string Wheter the beneficiary is blocked or not
_id string Beneficiary Id
deliveryCI string Beneficiary Identification Number
deliveryContact string Beneficiary Name
deliveryLastName string Beneficiary Lastname
deliverySecondLastName string Beneficiary Second Lastname
deliveryArea string Beneficiary Province
deliveryZone string Zone to which the province of the beneficiary belongs
country_iso_code string The ISO code of the country
deliveryCity string Beneficiary Municipality
streetName string Beneficiary street name
houseNumber string Beneficiary house number
zipcode string Beneficiary zip code
deliveryPhone string Beneficiary phone number
email string Beneficiary email
country string Beneficiary country name
beneficiaryFullName string Beneficiary full name
creditCards [{Credit Card}] Array of credit cards asociated to this beneficiary

Credit Card

NAME TYPE DESCRIPTION
number string The credit card number
cardHolderName string The credit card holder name
bankName string The credit card bank name
currency string The credit card currency

Add Funds

Credit/Debit Card

Endpoint to add funds using credit/debit card

import requests
import json

url = "https://backend.ducapp.net/api/private/transactions/token/buy"

payload = json.dumps({
    "amount": 100,
    "currency": "USD",
    "location": {
        "latitude": "-76.25804853625596",
        "longitude": "20.888864980079234",
        "timestamp": "1635185398"
    },
    "creditCardNumber": "5454545454545454",
    "creditCardHolderName": "Ruben Gonzalez Ramirez",
    "expiryDate": "07/29",
    "cvc": "123",
    "email": "john.doe@test.ducapp.net",
    "phone": "+19058025826",
    "avs_street_name": "Main Street",
    "avs_street_number": "508",
    "avs_zipcode": "33186",
    "merchant_external_id": "Ext-46562452"
})

headers = {
   'Authorization': 'Bearer <YOUR_ACCESS_TOKEN> ',
   'x-api-key': '<YOUR_API_KEY>',
   'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/token/buy' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN> ' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 100,
    "currency": "USD",
    "location": {
        "latitude": "-76.25804853625596",
        "longitude": "20.888864980079234",
        "timestamp": "1635185398"
    },
    "creditCardNumber": "5454545454545454",
    "creditCardHolderName": "Ruben Gonzalez Ramirez",
    "expiryDate": "07/29",
    "cvc": "123",
    "email": "john.doe@test.ducapp.net",
    "phone": "+19058025826",
    "avs_street_name": "Main Street",
    "avs_street_number": "508",
    "avs_zipcode": "33186",
    "merchant_external_id": "Ext-46562452"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN> ");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  amount: 100,
  currency: "USD",
  location: {
    latitude: "-76.25804853625596",
    longitude: "20.888864980079234",
    timestamp: "1635185398",
  },
  creditCardNumber: "5454545454545454",
  creditCardHolderName: "Ruben Gonzalez Ramirez",
  expiryDate: "07/29",
  cvc: "123",
  email: "john.doe@test.ducapp.net",
  phone: "+19058025826",
  avs_street_name: "Main Street",
  avs_street_number: "508",
  avs_zipcode: "33186",
  merchant_external_id: "Ext-46562452",
});

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

fetch(
  "https://backend.ducapp.net/api/private/transactions/token/buy",
  requestOptions
)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));

Example Response

{
  "data": {
    "status": 200,
    "payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
  }
}

Request

POST /api/private/transactions/token/buy

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
amount number The amount to send buy
currency number 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

Headers:

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

Endpoint to add funds via payment link

import requests
import json

url = "https://backend.ducapp.net/api/private/transactions/token/createPaymentLink"

payload = json.dumps({
    "product": {
        "name": "Online Shop",
        "description": "Products & Shipping"
    },
    "amount": 14,
    "currency": "USD",
    "merchant_external_id": "Payment-Link-{{$randomUUID}}",
    "redirectUrl": "https://ducapp.net",
    "customize": {
        "toWalletAddress": "0x0a300E48AaA17746d15b0Db8185a84B4B72B01Ae",
        "price": {
            "allowCustomAmount": false,
            "minAmount": 13,
            "maxAmount": 14
        },
        "link": {
            "provider": "default",
            "allowPromoCode": false,
            "collectBillingAddress": true,
            "collectPhoneNumber": true
        }
    }
})

headers = {
   'Authorization': 'Bearer <YOUR_ACCESS_TOKEN> ',
   'x-api-key': '<YOUR_API_KEY>',
   'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location 'https://backend.ducapp.net/api/private/transactions/token/createPaymentLink' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN> ' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
    "product": {
        "name": "Online Shop",
        "description": "Products & Shipping"
    },
    "amount": 14,
    "currency": "USD",
    "merchant_external_id": "Payment-Link-{{$randomUUID}}",
    "redirectUrl": "https://ducapp.net",
    "customize": {
        "toWalletAddress": "0x0a300E48AaA17746d15b0Db8185a84B4B72B01Ae",
        "price": {
            "allowCustomAmount": false,
            "minAmount": 13,
            "maxAmount": 14
        },
        "link": {
            "provider": "default",
            "allowPromoCode": false,
            "collectBillingAddress": true,
            "collectPhoneNumber": true
        }
    }
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN> ");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  product: {
    name: "Online Shop",
    description: "Products & Shipping",
  },
  amount: 14,
  currency: "USD",
  merchant_external_id: "Payment-Link-{{$randomUUID}}",
  redirectUrl: "https://ducapp.net",
  customize: {
    toWalletAddress: "0x0a300E48AaA17746d15b0Db8185a84B4B72B01Ae",
    price: {
      allowCustomAmount: false,
      minAmount: 13,
      maxAmount: 14,
    },
    link: {
      provider: "default",
      allowPromoCode: false,
      collectBillingAddress: true,
      collectPhoneNumber: true,
    },
  },
});

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

fetch(
  "https://backend.ducapp.net/api/private/transactions/token/createPaymentLink",
  requestOptions
)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));

Example Response

{
  "data": {
    "status": 200,
    "payload": {
      "message": "To complete the transaction you must pay using the payment link. A notification will be sent to your email (john.doe@test.ducapp.net) when done.",
      "link": "https://pay.ducapp.com/adeWqj",
      "qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAACcCAYAAACKuMJNAAAABmJLR0QA/wD/AP+gvaeTAAAKVUlEQVR4nO3dW2wcVx0G8O/Mend9v6w3iZM6jl3nolx6SQgVoYiC0hQSqiZFqhBUICEeUHmI8oBkqY+8hPCAAKnvSEh94FYQ0KAKEFSIKC0lpA1NSHNxWjtOUl+zttd7m8ND1sY7u/Z4PHP+s2t/P2kfrPXOHu9+PnPm3EZprTWIhFhhF4DWFwaORDFwJIqBI1EMHIli4EgUA0eiGDgSxcCRKAaORDFwJKrO6wuUUibKsSS3oV5neZy/7/d5N14/D7f39/r7Xo8XNK+fF2s4EsXAkSgGjkR5bsM5BT2dzq0N4vV5v202r7/vt03l9fh+j+eV3zYiazgSxcCRKAaORPluwzkF3WYJ+vVe22xe+W2Dej2+dL+hX6zhSBQDR6IYOBIVeBtOmt9+NSe/bULTbcBaX0bMGo5EMXAkioEjUTXfhnPjt9/K7/Gl56dVO9ZwJIqBI1EMHIkKvA1X7f1EptdABN1mDLoNGPb3wxqORDFwJIqBI1G+23Bh9zNV+7pNJ+k2Yth/rxNrOBLFwJEoBo5EeW7Dhd2PY7rfy8n0GgW/7+8U9vfjhjUciWLgSBQDR6KMr0s13U8U9N4gXo/v9n5ej+f175Hud/TbRmQNR6IYOBLFwJGoqhtLNb1XRtCvd/K7h6+T1/KZXtfqt03MGo5ErflVW8lkEkeOHEFPT0/F5wcGBoy+v+nj1xrl9xbkQZ8ygjylnjp1CqdPn0Z9fb2nY1aTsJssTn6/L9/3aQh6fzfT/Vi14NixYzh79mzF5/z+Q4Y9Nss2XBU6efJk2EUwhoGrQgcPHgy7CMZ4bsOFPR1IenpSGGzbRiQSqficdLdR4LeK8hs4N0G30dzMH7/Wg7fSz1n68/WLp1QSxcCRKAaORBlf0+D3IsCrlZTvv2N/w4V7f8R03kYeMaS1QgYaaVth/M5OTAztBewolJUve61SQFM8gk2tcezZ3IwD29rQk2hArM7M/27YewgH3SZc80NblUykh3Bz8h1M5gqYthWmbQszsDFdsHDzgxw+vNSBQj6GSF3W8cryDz9iKWzf2IhnH+vCC5/cjEe6W2BV2eLjarIuA7csBQAaSmso2/mk879Zw7aBq7dT+OHtFF750w186dFN+O7Rfjy+rU2kuLWGbbgFxVrJ1lCF4kO7PVDyyGbzeO2fwzj+o/P4wR+uYSpdfkpe76quhjM92O9GASWh8qT462NTGXzvV5dx/U4KLx/fhW3JxtWXR3jNh9vr/Zan6gIXHg0NCzpfBxQUVPG0WnYW9eDVv3+EXM7Gyyd2YXtXc3BFrWEM3DytYFkF7Hwojiei3YhaUWgrjflTrQIApZAr2BhPZXHj3gzuTM6hYC+fyF+fH0KyJYaB53ahsyVm/M+odgxckbYjgJXH0QMJfKN3F5qjy58GMzkb7304hZ/+dRCvXxjBWMp5RQugWEH+9vwwdm9pwTc/32um8DUk8DUN0us4g1TIxWDn66CsssvTMvGohYP9HTjY34F3B/vw/deu4PV/jVT83bsTafz+7dvY292KJ3YkVlSW+b/b6+frdbBdemyVV6llFLT21jB+tLcdP/nWfrz0TD+illV29ao0cO7KKN78zz1kcgVD5a4NDFyJ1f+3J1vj+M7R7fjKk92LrnLthcdcJod3ro3j8lAqwPLWHgYuQFuTjXjh01txaGcnlP2g43jx4/3BKbx/ayrsYobKdxtOeq+OlfYrhTXv61O7kvjcvg24eH0cc9nS0+fw6AwuDU5gYnozOpqXv2Jd6u+Qno8YdL8na7iAxaMWDvQnsK+nDdC69GFrDI/OYnh0NuxihoaBM6BvUxP6NjbBsnXpQ2uMT81hPJUJu4ihYT+cAcm2eiRbYhWHxqZnc0jN5EIoVXUQX5e6Hu4J39IQxZZEI1rjUaTSpR3C6XQO6czKB/X97rcnvT+eG55SDZifpNkYK++Ty2YLyGTXb18cT6kGaa0BbZdM21RaV5jGuX4wcAZoDcykc0jP5aAcZ6RYnYV4tPKa0/Ug8DUNYe9PFnY/HADcn81iZHQGs7O5+QnEC5piETTG3QO31Fiqaaa/P9ZwBoxNzmFscg6qwtSl1sYoWhqiIZSqOjBwBty8ncLg8P2K3SKdLTF0tsVDKFV1YOACNj2bw1vv3cXl6xOL2m/zp0ege2MTHtrQFFr5wiZ+z3vTc/TD7od769JdnLs4gkIuX3Y1urWrGXv7OtDqMo4KrP5zkl43zHWpIbp6axK/fOMa3r0yWrHrY09fAnseXtkEzLWKgSuhVj0l7ubQfbzy6kWcfXOwYtiaG6P4xO4N2Nnb7quEtY6BW0xpIKKhnJ1nLv587iP8+GcXcOmDsf+HzXGIQ4904cn9m1EXWd+DO8bv0+A2h97rvaKM9cMpDSuWh7Js6HwEWKKrTGuNdKaAoZEU/vHvEfzuLzdw6eoocnl7yRGE7q4WfOEzPdi3o9NbmVYh6LHToOfDsYYrUhEbsC38/De38Iu334ClAMSzQHF9w/znnskUMJXKID2XX6jEFCoMShe/mPpYBM8ffhhHn+oT+CuqHwO3iNYKqXQaUx9/DJ2NwootP6tjccjK/u+1RkQpPP/Mdnz1ud1orOdHDTBwZdTCRja6fKRg8dml7KnSQfl4LIKvndiDb7/4OBLttXufiKCF3g/nt80Q/F4jxaDZFfYWcTn0fEl6t7bhpa/vx7NH+ld9kbDasdSg16WyH86wB/PWHqxB8LSZjQYS7fU4/sUdePHLe7F1S6u5Qtaw9Rk4paGs4gMPTodQxYUuSi/M8FhJDdfaEsfuHZ14+qk+PP3ZXmzeyE1rlrMuA9fVtAePJU5gztbIoQ5ZWyGrNDJaIXdoE+yuLVCFCBApnZmrNRCJWGior0Oiox59Pe3o7+1Aa8v6HYz3yvfN3coOGHAbbLX3dA97TNWvapjXt7gcS+H9UqmqMXAkioEjUb7XpTqZ7ldbizdzq2Sl+8MF/X34fT83rOFIFANHohg4EhV4P1zZGxgeC3STTqfR0NDg6TVrWdh7s6z5wCWTSRw+fBi9vb1IJBIYGBgoef7MmTMlPzufd+P2eufzTl7fzy8GziHwW14bvuoN+irStLDLwzYciQq8H86rsOfD+f2PNt2PZXpvEem9YljDkSgGjkQxcCTK+FVq0IJuU4R9FSzdZjXdBnfDGo5EMXAkioEjUaH3w7nxu27S6/Gke+KDPp7pfknOh6OawsCRKAaORInfL9VN0HsA+52t4lXYe6NU2/fhxBqORDFwJIqBI1GBb2Zjus1kuh/M9NinV26vD3u+nFes4UgUA0eiGDgSVfMbEvrdw9ZrGynoPXRNr2oLemzZb5uONRyJYuBIFANHomquDed3Xaffe395fT+noN8/6PmCftu0bljDkSgGjkQxcCTK87pU03vsVtvx/e6h65X0fD7pPZNZw5EoBo5EMXAkyvg9700zPd/M9DrWoNuIpu+zwH44qikMHIli4EhUze0PR7WNNRyJYuBIFANHohg4EsXAkSgGjkQxcCSKgSNRDByJYuBIFANHov4Hx3sQqVPmp/gAAAAASUVORK5CYII="
    }
  }
}

Request

POST api/private/transactions/token/createPaymentLink

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
product {PRODUCT} The product to be paid for
amount number The amount to pay for the product
currency CURRENCY The currency
merchant_external_id string Merchant External ID
redirectUrl string Redirect url when the payment is completed
customize {CUSTOMIZE} Object to apply some level of customizations to the payment link

Product

NAME TYPE DESCRIPTION
name string The name of the product
description string A brief description of the product

Currency

CAD USD EUR

Customize

NAME TYPE DESCRIPTION
toWalletAddress string Wallet address to add the funds to
price {PRICE} Object to configure the product price
link {LINK} Object to configure the product link

Price

NAME TYPE DESCRIPTION
allowCustomAmount boolean Whether to allow a custom amount or not
minAmount number Minimum amount (Only effective if allowCustomAmount is true)
maxAmount number Maximum amount (Only effective if allowCustomAmount is true)
NAME TYPE DESCRIPTION
provider string The payment link provider. Could be default or duc to use a DUC platform custom payment link
allowPromoCode boolean Whether to allow a promo code or not
collectBillingAddress boolean Whether to collect the customer billing address or not
collectPhoneNumber boolean Whether to collect the customer phone number or not

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload {PAYLOAD} Corresponding message

Payload

NAME TYPE DESCRIPTION
message string A brief instruction to follow
link string The payment link to complete the transaction
qrCode string (base64) The QRCode (base64 image) for payment link

Payment Link

P2P Transfer

Endpoint to send money to internal users of the platform.

import requests
import json

url = "https://backend.ducapp.net/api/private/transactions/token/p2p"

payload = json.dumps({
    "toAddress": "0x14A205B953359F24F41B9b029ee62dc791A07F50",
    "amount": 100,
    "currency": "USD",
    "concept": "Testing 4",
    "paymentLink": true,
    "redirectUrl": "https://ducapp.net",
    "externalID": "Ext-2adfdf5245339"
})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/token/p2p' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "toAddress": "0x14A205B953359F24F41B9b029ee62dc791A07F50",
    "amount": 100,
    "currency": "USD",
    "concept": "Testing 4",
    "redirectUrl": "https://ducapp.net",
    "paymentLink": true,
    "externalID": "Ext-2adfdf5245339"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "toAddress": "0x14A205B953359F24F41B9b029ee62dc791A07F50",
  "amount": 100,
  "currency": "USD",
  "concept": "Testing 4",
  "redirectUrl": "https://ducapp.net",
  "paymentLink": true,
  "externalID": "Ext-2adfdf5245339"
});

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

fetch("https://backend.ducapp.net/api/private/transactions/token/p2p", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example Response:

{
  "status": 200,
  "payload": "The transaction is being processed, a notify will be sent to your email (darian.alvarez.t@gmail.com).",
  "paymentLink": {
    "url": "https://pay.ducapp.com/JdxGxk",
    "id": "plink_1MtBG0KHKfW45102wDSphKTh"
  }
}

Request

POST /api/private/transactions/token/p2p

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

NAME TYPE DESCRIPTION
toAddress string The receiver wallet address
amount number The the amount to send
currency string The the currency of the user
concept string A brief description
merchant_external_id string External id for the current merchant for this transaction
redirectUrl string Redirect url when the payment is completed
paymentLink boolean Whether to create a payment link or not, to complete the payment

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

Top up

Endpoint to send mobile recharge to one or multiple phone numbers.

import requests
import json

url = "https://backend.ducapp.net/api/private/transactions/topup/send"

payload = json.dumps({
    "product": 500,
    "productId": "0",
    "salePrice": 27.02,
    "operatorId": 3645,
    "receiverName": "Juan Perez",
    "destinations": [
        "+5352552615",
        "+5356580949"
    ],
    "currency": "CAD",
    "scheduled": false,
    "redirectUrl": "https://ducapp.net",
    "paymentLink": true,
    "externalID": "Ext-546sdfsdf636"
})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/topup/send' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "product": 500,
    "productId": "0",
    "salePrice": 27.02,
    "operatorId": 3645,
    "receiverName": "Juan Perez",
    "destinations": [
        "+5352552615",
        "+5356580949"
    ],
    "currency": "CAD",
    "scheduled": false,
    "redirectUrl": "https://ducapp.net",
    "paymentLink": true,
    "externalID": "Ext-546sdfsdf636"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "product": 500,
  "productId": "0",
  "salePrice": 27.02,
  "operatorId": 3645,
  "receiverName": "Juan Perez",
  "destinations": [
    "+5352552615",
    "+5356580949"
  ],
  "currency": "CAD",
  "scheduled": false,
  "redirectUrl": "https://ducapp.net",
  "paymentLink": true,
  "externalID": "Ext-546sdfsdf636"
});

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

fetch("https://backend.ducapp.net/api/private/transactions/topup/send", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example Response:

{
  "data": {
    "status": 200,
    "payload": "The transaction is being processed, a notify will be sent to your email (darian.alvarez.t@gmail.com).",
    "paymentLink": {
      "url": "https://pay.ducapp.com/oWGZyE",
      "id": "plink_1MtBKuKHKfW45102BmBLbrjV"
    }
  }
}

Request

POST /api/private/transactions/topup/send

Host: backend.ducapp.net

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

NAME TYPE DESCRIPTION
product string The product name
productId string The product id
salePrice number The sale price of the product
operatorId string The operator id of the product
receiverName string The name of the receiver person
destinations [string] An array of phone numbers
currency string The account currency to be used
scheduled boolean (Optional) To indicate that the top up will be scheduled
posted_date string (Optional) Date for the top up to be processed (scheduled needs to be true)
merchant_external_id string External id for the current merchant for this transaction
redirectUrl string Redirect url when the payment is completed
paymentLink boolean Whether to create a payment link or not, to complete the payment

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

Confirm Quotation

Endpoint to confirm a previously requested transaction.

import requests
import json

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

payload = json.dumps({
    "quotation_id": "33904512",
    "external_id": "AA00376852",
    "credit_party_identifier": {
        "msisdn": "488404618693"
    },
    "sender": {
        "lastname": "Gonzalez Ramirez",
        "firstname": "Ruben",
        "date_of_birth": "1992-06-27",
        "country_iso_code": "CAN"
    },
    "beneficiary": {
        "lastname": "Barboza",
        "firstname": "Lewis"
    },
    "sending_business": {},
    "receiving_business": {},
    "totalAmount": "103.18",
    "currency": "USD",
    "country_iso_code": "NPL",
    "service_id": "1",
    "payer_id": "467",
    "amount": 100,
    "redirectUrl": "https://ducapp.net",
    "paymentLink": true,
    "merchant_external_id": "Ext-125678899987779"
})

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/confirm-send' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "quotation_id": "33904512",
    "external_id": "AA00376852",
    "credit_party_identifier": {
        "msisdn": "488404618693"
    },
    "sender": {
        "lastname": "Gonzalez Ramirez",
        "firstname": "Ruben",
        "date_of_birth": "1992-06-27",
        "country_iso_code": "CAN"
    },
    "beneficiary": {
        "lastname": "Barboza",
        "firstname": "Lewis"
    },
    "sending_business": {},
    "receiving_business": {},
    "totalAmount": "103.18",
    "currency": "USD",
    "country_iso_code": "NPL",
    "service_id": "1",
    "payer_id": "467",
    "amount": 100,
    "redirectUrl": "https://ducapp.net",
    "paymentLink": true,
    "merchant_external_id": "Ext-125678899987779"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "quotation_id": "33904512",
  "external_id": "AA00376852",
  "credit_party_identifier": {
    "msisdn": "488404618693"
  },
  "sender": {
    "lastname": "Gonzalez Ramirez",
    "firstname": "Ruben",
    "date_of_birth": "1992-06-27",
    "country_iso_code": "CAN"
  },
  "beneficiary": {
    "lastname": "Barboza",
    "firstname": "Lewis"
  },
  "sending_business": {},
  "receiving_business": {},
  "totalAmount": "103.18",
  "currency": "USD",
  "country_iso_code": "NPL",
  "service_id": "1",
  "payer_id": "467",
  "amount": 100,
  "redirectUrl": "https://ducapp.net",
  "paymentLink": true,
  "merchant_external_id": "Ext-125678899987779"
});

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

fetch("https://backend.ducapp.net/api/private/transactions/cash-out/confirm-send", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example Response:

{
  "data": {
    "status": 200,
    "payload": "The transaction is being processed, a notify will be sent to your email (darian.alvarez.t@gmail.com).",
    "paymentLink": {
      "url": "https://pay.ducapp.com/gXroOw",
      "id": "plink_1MtBSCKHKfW45102wM0kXoOP"
    }
  }
}

Request

POST /api/private/transactions/cash-out/confirm-send

Host: backend.ducapp.net

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
quotation_id string The id of the requested quotation
external_id object The external id of the requested quotation
credit_party_identifier string Dynamic fields to be completed by the user
sender string Dynamic fields to be completed by the user (Only for C2C transactions type)
beneficiary string Dynamic fields to be completed by the user (Only for C2C transactions type)
sending_business string Dynamic fields to be completed by the user (Only for B2B transactions type)
receiving_business string Dynamic fields to be completed by the user (Only for B2B transactions type)
totalAmount string The total amount to be paid by the user with the fee included
currency string The user's currency
country_iso_code string The ISO code of the country to send money to
service_id string The Id of the service of the selected country
payer_id string The Id of the payer of the selected service
amount string The amount entered by the user
merchant_external_id string External id for the current merchant for this transaction
redirectUrl string Redirect url when the payment is completed
paymentLink boolean Whether to create a payment link or not, to complete the payment

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

Email Money Transfer

Endpoint to send money via email address.

import requests
import json

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

payload = json.dumps({
    "amount": 100,
    "currency": "EUR",
    "concept": "Testing",
    "emailToSend": "testing2@gmail.com",
    "redirectUrl": "https://ducapp.net",
    "paymentLink": true,
    "merchant_external_id": "Ext-13sdsf45435sgfh41"
})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "amount": 100,
  "currency": "EUR",
  "concept": "Testing",
  "emailToSend": "testing2@gmail.com",
  "redirectUrl": "https://ducapp.net",
  "paymentLink": true,
  "merchant_external_id": "Ext-13sdsf45435sgfh41"
});

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

fetch("https://backend.ducapp.net/api/private/transactions/cash-out/email", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/email' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 100,
    "currency": "EUR",
    "concept": "Testing",
    "emailToSend": "testing2@gmail.com",
    "redirectUrl": "https://ducapp.net",
    "paymentLink": true,
    "merchant_external_id": "Ext-13sdsf45435sgfh41"
}'

Example Response:

{
  "data": {
    "status": 200,
    "payload": "The transaction is being processed, a notify will be sent to your email (darian.alvarez.t@gmail.com).",
    "paymentLink": {
      "url": "https://pay.ducapp.com/StldYg",
      "id": "plink_1MtBZ8KHKfW45102fdDcV2mD"
    }
  }
}

Request

POST /api/private/transactions/cash-out/email

Host: backend.ducapp.net

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

NAME TYPE DESCRIPTION
emailToSend string The destination email
amount number The the amount to send
currency string The the currency of the user
concept string A brief description
redirectUrl string Redirect url when the payment is completed
paymentLink boolean Whether to create a payment link or not, to complete the payment

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

Home Delivery

Endpoint to send home delivery money.

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "service": "deliveryEUR",
  "amount": 112,
  "currency": "USD",
  "concept": "TRAVEL",
  "deliveryAmount": 92,
  "deliveryAddress": "principal calle 5 test",
  "deliveryFirstName": "test uno",
  "deliveryID": "25736757",
  "deliveryPhone": "+53555555",
  "deliveryArea": "La Habana",
  "deliveryCity": "La Lisa",
  "deliveryZona": "Habana",
  "deliveryCountry": "Cuba",
  "deliveryCurrency": "EUR",
  "deliveryCountryCode": "CU",
  "deliveryLastName": "test dos",
  "deliverySecondLastName": "test tres",
  "redirectUrl": "https://ducapp.net",
  "paymentLink": true,
  "merchant_external_id": "SM59sdfdf41499"
});

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

fetch("https://backend.ducapp.net/api/private/transactions/cash-out/delivery", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

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

payload = json.dumps({
    "service": "deliveryEUR",
    "amount": 112,
    "currency": "USD",
    "concept": "TRAVEL",
    "deliveryAmount": 92,
    "deliveryAddress": "principal calle 5 test",
    "deliveryFirstName": "test uno",
    "deliveryID": "25736757",
    "deliveryPhone": "+53555555",
    "deliveryArea": "La Habana",
    "deliveryCity": "La Lisa",
    "deliveryZona": "Habana",
    "deliveryCountry": "Cuba",
    "deliveryCurrency": "EUR",
    "deliveryCountryCode": "CU",
    "deliveryLastName": "test dos",
    "deliverySecondLastName": "test tres",
    "redirectUrl": "https://ducapp.net",
    "paymentLink": true,
    "merchant_external_id": "SM59sdfdf41499"
})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/delivery' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "service": "deliveryEUR",
    "amount": 112,
    "currency": "USD",
    "concept": "TRAVEL",
    "deliveryAmount": 92,
    "deliveryAddress": "principal calle 5 test",
    "deliveryFirstName": "test uno",
    "deliveryID": "25736757",
    "deliveryPhone": "+53555555",
    "deliveryArea": "La Habana",
    "deliveryCity": "La Lisa",
    "deliveryZona": "Habana",
    "deliveryCountry": "Cuba",
    "deliveryCurrency": "EUR",
    "deliveryCountryCode": "CU",
    "deliveryLastName": "test dos",
    "deliverySecondLastName": "test tres",
    "redirectUrl": "https://ducapp.net",
    "paymentLink": true,
    "merchant_external_id": "SM59sdfdf41499"
}'

Example Response:

{
  "data": {
    "status": 200,
    "payload": "The transaction is being processed, a notify will be sent to your email (darian.alvarez.t@gmail.com).",
    "paymentLink": {
      "url": "https://pay.ducapp.com/FsMvOH",
      "id": "plink_1MtBc9KHKfW45102BIWlGSJ7"
    }
  }
}

Request

POST /api/private/transactions/cash-out/delivery

Host: backend.ducapp.net

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

NAME TYPE DESCRIPTION
service SERVICES The service identifier
amount number The the amount to send
currency string The the currency of the user
concept string A brief description
deliveryFirstName string The beneficiary's first name
deliveryLastName string The beneficiary's lastname
deliverySecondLastName string The beneficiary's second lastname
deliveryID string The beneficiary's identification number
deliveryPhone string The beneficiary's phone number
deliveryCountry string The beneficiary's country
deliveryCountryCode string The beneficiary's country ISO code in alpha2 format
deliveryArea string The beneficiary's province (Defined in Get Regions endpoint response )
deliveryCity string The beneficiary's municipality (Defined in Get Regions endpoint response )
deliveryZone string The beneficiary's zone (Defined in Get Zones endpoint response )
deliveryAddress string The beneficiary's address
deliveryCurrency string The beneficiary's currency
deliveryAmount string The amount to receive by the beneficiary
senderName string The name of the person who send the transaction
senderLastName string The lastname of the person who send the transaction
senderDocumentType DOCUMENT TYPE The type of document of identification of the person who send the transaction
senderDocumentNumber string The identification number of the person who send the transaction
senderNationalityCountry string The nationality of the person who send the transaction in format ISO 3166 alpha3
senderBirthdate string The birthdate of the person who send the transaction in format (yyyy-MM-dd)
senderBirthCountry string The birth country of the person who send the transaction in format ISO 3166 alpha3
senderSex GENDER The gender of the person who send the transaction
senderAddress string The address of the person who send the transaction
senderCity string The city name of the person who send the transaction
senderPostalCode string The postal code of the person who send the transaction
senderProvince string The province of the person who send the transaction
senderCountry string The resident country of the person who send the transaction in format ISO 3166 alpha3
receiverCity string The city name of the person who receive the transaction
receiverPhone2 string Alternative phone number of the person who receive the transaction. Only if have a contactPhone and it's a different number
receiverCountry string The country of the person who receive the transaction in format ISO 3166 alpha3
merchant_external_id string External id for the current merchant for this transaction
redirectUrl string Redirect url when the payment is completed
paymentLink boolean Whether to create a payment link or not, to complete the payment

Services

deliveryCUP deliveryUSD deliveryEUR

Document Type

NAME DESCRIPTION
PAS Passport
RES National ID
OTH Others
EUI Resident card
CED Cédula
DRV Drive Licence

Gender

M F

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

Credit Card

Endpoint to Send money to MLC/CUP cuban cards.

import requests
import json

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

payload = json.dumps({
  "cardNumber": "9225 1299 7929 0027",
  "cardHolderName": "Deicy Johana Morales Cadavid",
  "bankName": "BPA",
  "contactPhone": "005353129327",
  "service": "cardUSD",
  "amount": 374.0,
  "currency": "USD",
  "concept": "Economic assistance",
  "deliveryAmount": "350",
  "deliveryCurrency": "USD",
  "deliveryAddress": "Cll 48A #103BB31 23 , ESMERALDA, CAMAGUEY, Cuba",
  "deliveryCountry": "Cuba",
  "deliveryCountryCode": "CU",
  "senderName": "Juan ",
  "senderLastName": "Kiros ",
  "senderDocumentType": "RES",
  "senderDocumentNumber": "785487487968",
  "senderNationalityCountry": "CAN",
  "senderBirthdate": "1989-12-08",
  "senderBirthCountry": "AGO",
  "senderSex": "M",
  "senderAddress": "Cll 48A #103BB31 678 , Edmonton, Alberta, Canada",
  "senderCountry": "CAN",
  "senderProvince": "Alberta",
  "senderCity": "Edmonton",
  "senderPostalCode": "050032",
  "receiverCity": "ESMERALDA",
  "receiverCountry": "CUB",
  "redirectUrl": "https://ducapp.net",
  "paymentLink": true,
  "merchant_external_id": "10171340fdfe42015"
})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/creditcard' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "cardNumber": "9225 1299 7929 0027",
  "cardHolderName": "Deicy Johana Morales Cadavid",
  "bankName": "BPA",
  "contactPhone": "005353129327",
  "service": "cardUSD",
  "amount": 374.0,
  "currency": "USD",
  "concept": "Economic assistance",
  "deliveryAmount": "350",
  "deliveryCurrency": "USD",
  "deliveryAddress": "Cll 48A #103BB31 23 , ESMERALDA, CAMAGUEY, Cuba",
  "deliveryCountry": "Cuba",
  "deliveryCountryCode": "CU",
  "senderName": "Juan ",
  "senderLastName": "Kiros ",
  "senderDocumentType": "RES",
  "senderDocumentNumber": "785487487968",
  "senderNationalityCountry": "CAN",
  "senderBirthdate": "1989-12-08",
  "senderBirthCountry": "AGO",
  "senderSex": "M",
  "senderAddress": "Cll 48A #103BB31 678 , Edmonton, Alberta, Canada",
  "senderCountry": "CAN",
  "senderProvince": "Alberta",
  "senderCity": "Edmonton",
  "senderPostalCode": "050032",
  "receiverCity": "ESMERALDA",
  "receiverCountry": "CUB",
  "redirectUrl": "https://ducapp.net",
  "paymentLink": true,
  "merchant_external_id": "10171340fdfe42015"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "cardNumber": "9225 1299 7929 0027",
  "cardHolderName": "Deicy Johana Morales Cadavid",
  "bankName": "BPA",
  "contactPhone": "005353129327",
  "service": "cardUSD",
  "amount": 374.0,
  "currency": "USD",
  "concept": "Economic assistance",
  "deliveryAmount": "350",
  "deliveryCurrency": "USD",
  "deliveryAddress": "Cll 48A #103BB31 23 , ESMERALDA, CAMAGUEY, Cuba",
  "deliveryCountry": "Cuba",
  "deliveryCountryCode": "CU",
  "senderName": "Juan ",
  "senderLastName": "Kiros ",
  "senderDocumentType": "RES",
  "senderDocumentNumber": "785487487968",
  "senderNationalityCountry": "CAN",
  "senderBirthdate": "1989-12-08",
  "senderBirthCountry": "AGO",
  "senderSex": "M",
  "senderAddress": "Cll 48A #103BB31 678 , Edmonton, Alberta, Canada",
  "senderCountry": "CAN",
  "senderProvince": "Alberta",
  "senderCity": "Edmonton",
  "senderPostalCode": "050032",
  "receiverCity": "ESMERALDA",
  "receiverCountry": "CUB",
  "redirectUrl": "https://ducapp.net",
  "paymentLink": true,
  "merchant_external_id": "10171340fdfe42015"
});

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

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

Example Response:

{
  "data": {
    "status": 200,
    "payload": "The transaction is being processed, a notify will be sent to your email (darian.alvarez.t@gmail.com).",
    "paymentLink": {
      "url": "https://pay.ducapp.com/jqseQF",
      "id": "plink_1MtBfLKHKfW45102ky6GWtQO"
    }
  }
}

Request

POST /api/private/transactions/cash-out/creditcard

Host: backend.ducapp.net

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

NAME TYPE DESCRIPTION
service SERVICES The service identifier
amount number The the amount to send (Calculated Fee included)
currency string The the currency of the user
concept string A brief description
cardNumber string The beneficiary card number
cardHolderName string The beneficiary card name
bankName string The beneficiary bank name
contactPhone string The beneficiary phone number
deliveryCurrency string The beneficiary card currency
deliveryCountry string The beneficiary country
deliveryAmount string The amount to receive by the beneficiary
deliveryAddress string The beneficiarys address
deliveryCountryCode string The beneficiary alpha2 country iso code
senderName string The name of the person who send the transaction
senderLastName string The lastname of the person who send the transaction
senderDocumentType DOCUMENT TYPE The type of document of identification of the person who send the transaction
senderDocumentNumber string The identification number of the person who send the transaction
senderNationalityCountry string The nationality of the person who send the transaction in format ISO 3166 alpha3
senderBirthdate string The birthdate of the person who send the transaction in format (yyyy-MM-dd)
senderBirthCountry string The birth country of the person who send the transaction in format ISO 3166 alpha3
senderSex GENDER The gender of the person who send the transaction
senderAddress string The address of the person who send the transaction
senderCity string The city name of the person who send the transaction
senderPostalCode string The postal code of the person who send the transaction
senderProvince string The province of the person who send the transaction
senderCountry string The resident country of the person who send the transaction in format ISO 3166 alpha3
receiverCity string The city name of the person who receive the transaction
receiverPhone2 string Alternative phone number of the person who receive the transaction. Only if have a contactPhone and it's a different number
receiverCountry string The country of the person who receive the transaction in format ISO 3166 alpha3
merchant_external_id string External id for the current merchant for this transaction
redirectUrl string Redirect url when the payment is completed
paymentLink boolean Whether to create a payment link or not, to complete the payment

Services

cardCUP cardUSD

Document Type

NAME DESCRIPTION
PAS Passport
RES National ID
OTH Others
EUI Resident card
CED Cedula
DRV Drive Licence

Gender

M F

Bank Name

Banco Popular de Ahorro Banco Metropolitano Banco de Crédito y Comercio BANDEC

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

Crypto

Get Supported Coins

Endpoint to get the supported crypto coins by our platform.

It is recommended to use the endpoint /api/v2/transactions/crypto/coins
instead of /api/private/transactions/crypto/coins, since v2 is the most up-to-date version.

curl --location --request GET 'https://backend.ducapp.net/api/v2/transactions/crypto/coins' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
import requests
import json

url = "https://backend.ducapp.net/api/v2/transactions/crypto/coins"

payload = json.dumps({})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
}

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>");

var raw = JSON.stringify({});

var requestOptions = {
  method: "GET",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch(
  "https://backend.ducapp.net/api/v2/transactions/crypto/coins",
  requestOptions
)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));

Example Response:

[
  {
    "label": "Bitcoin",
    "key": "bitcoin",
    "symbol": "BTC"
  },
  {
    "label": "Bitcoin Cash",
    "key": "bitcoincash",
    "symbol": "BCH"
  },
  {
    "label": "Dai",
    "key": "dai",
    "symbol": "DAI"
  },
  {
    "label": "Ethereum",
    "key": "ethereum",
    "symbol": "ETH"
  }
]

Request

GET /api/private/transactions/crypto/coins

GET /api/v2/transactions/crypto/coins (Recomended)

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

None Required

Response Body

The response is an array [], where each element is a cryptocurrency object with the following properties:

NAME TYPE DESCRIPTION
label string Full name of the cryptocurrency (e.g., Bitcoin)
key string Internal identifier / slug of the coin (e.g., ethereum, litecoin)
symbol string Short ticker symbol of the coin (e.g., BTC, ETH, LTC)

Get Crypto Buy Price

Endpoint to get the approximated crypto buy price.

It is recommended to use the endpoint /api/v2/transactions/crypto/price
instead of /api/private/transactions/crypto/price, since v2 is the most up-to-date version.

import requests
import json

url = "https://backend.ducapp.net/api/v2/transactions/crypto/price"

payload = json.dumps({
    "amount": 10,
    "crypto": "BTC",
    "currency": "USD"
})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/v2/transactions/crypto/price' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 10,
    "crypto": "BTC",
    "currency": "USD"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  amount: 10,
  crypto: "BTC",
  currency: "USD",
});

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

fetch(
  "https://backend.ducapp.net/api/v2/transactions/crypto/price",
  requestOptions
)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));

Example Response:

{
  "amount": "0.00009155"
}

Request

POST /api/private/transactions/crypto/price

POST /api/v2/transactions/crypto/price (Recomended)

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
amount number The amount to calculate the approximated price
crypto string Symbol of the selected crypto currency
currency string The selected currency

Response Body

NAME TYPE DESCRIPTION
amount number The approximated price

Create Charge

Endpoint to create a crypto charge.

It is recommended to use the endpoint /api/v2/transactions/crypto/charge
instead of /api/private/transactions/crypto/charge, since v2 is the most up-to-date version.

import requests
import json

url = "https://backend.ducapp.net/api/v2/transactions/crypto/charge"

payload = json.dumps({
    "name": "{{$randomFullName}}",
    "description": "{{$randomPhrase}}",
    "localPrice": {
        "currency": "USD",
        "amount": 10
    },
    "merchant_external_id": "Crypto-{{$randomUUID}}"
})

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/v2/transactions/crypto/charge' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "{{$randomFullName}}",
    "description": "{{$randomPhrase}}",
    "localPrice": {
        "currency": "USD",
        "amount": 10
    },
    "merchant_external_id": "Crypto-{{$randomUUID}}"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  name: "{{$randomFullName}}",
  description: "{{$randomPhrase}}",
  localPrice: {
    currency: "USD",
    amount: 10,
  },
  merchant_external_id: "Crypto-{{$randomUUID}}",
});

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

fetch(
  "https://backend.ducapp.net/api/v2/transactions/crypto/charge",
  requestOptions
)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));

Example Response:

{
  "data": {
    "status": 201,
    "payload": "The transaction is being processed, a notify will be sent to your email (john.doe@gmail.com).",
    "paymentLink": {
      "url": "https://commerce.coinbase.com/pay/9d060eb6-d4e9-4997-b05b-9114f5965b9e"
    }
  }
}

Request

POST /api/private/transactions/crypto/charge

POST /api/v2/transactions/crypto/charge (Recomended)

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
name string Name of the product to buy
description object Description of the product to buy
localPrice {LocalPrice} Local price information
merchant_external_id string External id for the current merchant for this transaction

Local Price

NAME TYPE DESCRIPTION
currency string Currency to be fund
amount object Amount to be fund

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

Send Money

Get Countries

Endpoint to browse the available countries to send money.

import requests

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

payload={}
headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN> '
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions/cash-out/countries' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN> '
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN> ");

var urlencoded = new URLSearchParams();

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: urlencoded,
  redirect: 'follow'
};

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

Example Response:

{
    "statusText": "OK",
    "status": 200,
    "data": [
        {
            "iso_code": "AND",
            "name": "Andorra"
        },
        {
            "iso_code": "AUT",
            "name": "Austria"
        }
    ],
    "pagination": {
        "totalPages": "1",
        "total": "45",
        "perPage": "50",
        "page": "1"
    }
}

Request

GET /api/private/transactions/cash-out/countries

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

None Required

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

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
country_iso_code string The ISO code of the country to send money to

Response Body

NAME TYPE DESCRIPTION
statusText string Text that indicates the status of the request
status number The request status code
data [Service] An array of services object

Service

NAME TYPE DESCRIPTION
id number The service id
name string The service name

Get payers

Endpoint to browse the list of available payers by country services.

import requests
import json

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

payload = json.dumps({
  "service_id": 1,
  "country_iso_code": "NPL"
})
headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "service_id": 1,
  "country_iso_code": "NPL"
});

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

fetch("https://backend.ducapp.net/api/private/transactions/cash-out/payers", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions/cash-out/payers' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "service_id": 1,
    "country_iso_code": "NPL"
}
'

Example Response:

{
    "statusText": "OK",
    "status": 200,
    "data": [
        {
            "country_iso_code": "NPL",
            "currency": "NPR",
            "id": 467,
            "increment": 0.01,
            "name": "eSewa",
            "precision": 2,
            "service": {
                "id": 1,
                "name": "MobileWallet"
            },
            "transaction_types": {
                "C2C": {
                    "maximum_transaction_amount": null,
                    "minimum_transaction_amount": "100.00000000",
                    "credit_party_identifiers_accepted": [
                        "msisdn"
                    ],
                    "required_documents": [],
                    "required_receiving_entity_fields": [
                        "lastname",
                        "firstname"
                    ],
                    "required_sending_entity_fields": [
                        "lastname",
                        "firstname",
                        "date_of_birth",
                        "country_iso_code"
                    ]
                }
            }
        }
    ],
    "pagination": {
        "totalPages": "1",
        "total": "1",
        "perPage": "100",
        "page": "1"
    }
}

Request

GET /api/private/transactions/cash-out/payers

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
service_id number The Id of the service of the selected country
country_iso_code string The ISO code of the country to send money to
page number (Optional) Number of the page
per_page number (Optional) Amount of result per page

Response Body

NAME TYPE DESCRIPTION
statusText string Text that indicates the status of the request
status number The request status code
data [Payer] An array of payers object

Payer

NAME TYPE DESCRIPTION
id string The payer id
name string The payer name
transaction_types {Transaction Type} The payers associated transactions type (C2C\B2B)
currency string The payer currency

Transaction Type

NAME TYPE DESCRIPTION
maximum_transaction_amount string Maximum transaction amount allowed
minimum_transaction_amount string Minimum transaction amount allowed
credit_party_identifiers_accepted [String] Dynamic set of required information field
required_documents [String] Dynamic set of required information
required_receiving_entity_fields [String] Dynamic set of required information
required_sending_entity_fields [String] Dynamic set of required information

Get payer details

Endpoint to a payer details by Id.

import requests

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

payload = {}

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://backend.ducapp.net/api/private/transactions/cash-out/payers/3890", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions/cash-out/payers/3890' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'

Example Response:

{
    "statusText": "OK",
    "status": 200,
    "data": {
        "country_iso_code": "HTI",
        "currency": "HTG",
        "id": 3890,
        "increment": 0.01,
        "name": "MonCash",
        "precision": 2,
        "service": {
            "id": 1,
            "name": "MobileWallet"
        },
        "transaction_types": {
            "C2C": {
                "maximum_transaction_amount": 100000,
                "minimum_transaction_amount": 150,
                "credit_party_identifiers_accepted": [
                    "msisdn"
                ],
                "required_documents": [],
                "required_receiving_entity_fields": [
                    "lastname",
                    "firstname"
                ],
                "required_sending_entity_fields": [
                    "lastname",
                    "firstname",
                    "date_of_birth",
                    "country_iso_code",
                    "msisdn",
                    "address",
                    "code"
                ]
            }
        }
    }
}

Request

GET /api/private/transactions/cash-out/payers/{identifier}

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Path

NAME TYPE DESCRIPTION
identifier number Payer id

Response Body

NAME TYPE DESCRIPTION
statusText string Text that indicates the status of the request
status number The request status code
data Payer Payer object

Payer

NAME TYPE DESCRIPTION
id string The payer id
name string The payer name
transaction_types {Transaction Type} The payers associated transactions type (C2C\B2B)
currency string The payer currency

Transaction Type

NAME TYPE DESCRIPTION
maximum_transaction_amount string Maximum transaction amount allowed
minimum_transaction_amount string Minimum transaction amount allowed
credit_party_identifiers_accepted [String] Dynamic set of required information field
required_documents [String] Dynamic set of required information
required_receiving_entity_fields [String] Dynamic set of required information
required_sending_entity_fields [String] Dynamic set of required information

Get Fee and Exchange Rate

Endpoint to get the current fee and exchange rate for the transaction.

import requests
import json

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

payload = json.dumps({
  "payer_id": "467",
  "destinationAmount": 13876,
  "mode": "DESTINATION_AMOUNT",
  "transactionType": "C2C",
  "currency": "USD"
})
headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/request-send' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "payer_id": "467",
  "destinationAmount": 13876,
  "mode": "DESTINATION_AMOUNT",
  "transactionType": "C2C",
  "currency": "USD"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "payer_id": "467",
  "destinationAmount": 13876,
  "mode": "DESTINATION_AMOUNT",
  "transactionType": "C2C",
  "currency": "USD"
});

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

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

Example Response:

{
    "data": {
        "rate": 137.9051,
        "fee": {
            "currency": "USD",
            "amount": 3
        },
        "currencies": {
            "from": "USD",
            "to": "HTG"
        }
    }
}

Request

POST /api/private/transactions/cash-out/rate-fee

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
payer_id string The Id of the payer of the selected service
destinationAmount number Amount to deliver
mode string `SOURCE_AMOUNT
transactionType string The type of transaction selected from those available by the payer
sourceAmount number The amount to deliver in the source currency
sourceCurrency string Currency of the sending user

Response Body

NAME TYPE DESCRIPTION
rate number Current exchange rate
fee {Fee} Fee amount and currency
currencies {Currencies} Currencies for the exchange rate

Fee

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

Currencies

NAME TYPE DESCRIPTION
from string The base currency
to string The destination currency

Send

Endpoint to send the transaction.

import requests
import json

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

payload = json.dumps({
    "credit_party_identifiers_accepted": {
        "msisdn": "3784046187654"
    },
    "required_sending_entity_fields": {
        "lastname": "Gonzalez Rodriguez",
        "firstname": "Ruben",
        "date_of_birth": "1992-06-27",
        "country_iso_code": "CAN",
        "msisdn": "3784046187654",
        "address": "Main 191",
        "code": "80100"
    },
    "required_receiving_entity_fields": {
        "lastname": "Bush",
        "firstname": "Lewis"
    },
    "payer_id": "3890",
    "transaction_type": "C2C",

    "sourceCurrency": "USD",
    "sourceAmount": 600,

    "mode": "SOURCE_AMOUNT",

    "destinationAmount": 35785543,

    "purpose_of_remittance": "FAMILY_SUPPORT",
    "merchant_external_id": "Ext-1234ffdfwadfsdffefed333634535678",

    "paymentLink": true,
    "redirectUrl": "https://ducapp.net"
})

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/confirm-send' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "credit_party_identifiers_accepted": {
        "msisdn": "3784046187654"
    },
    "required_sending_entity_fields": {
        "lastname": "Gonzalez Rodriguez",
        "firstname": "Ruben",
        "date_of_birth": "1992-06-27",
        "country_iso_code": "CAN",
        "msisdn": "3784046187654",
        "address": "Main 191",
        "code": "80100"
    },
    "required_receiving_entity_fields": {
        "lastname": "Bush",
        "firstname": "Lewis"
    },
    "payer_id": "3890",
    "transaction_type": "C2C",

    "sourceCurrency": "USD",
    "sourceAmount": 600,

    "mode": "SOURCE_AMOUNT",

    "destinationAmount": 35785543,

    "purpose_of_remittance": "FAMILY_SUPPORT",
    "merchant_external_id": "Ext-1234ffdfwadfsdffefed333634535678",

    "paymentLink": true,
    "redirectUrl": "https://ducapp.net"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
    "credit_party_identifiers_accepted": {
        "msisdn": "3784046187654"
    },
    "required_sending_entity_fields": {
        "lastname": "Gonzalez Rodriguez",
        "firstname": "Ruben",
        "date_of_birth": "1992-06-27",
        "country_iso_code": "CAN",
        "msisdn": "3784046187654",
        "address": "Main 191",
        "code": "80100"
    },
    "required_receiving_entity_fields": {
        "lastname": "Bush",
        "firstname": "Lewis"
    },
    "payer_id": "3890",
    "transaction_type": "C2C",

    "sourceCurrency": "USD",
    "sourceAmount": 600,

    "mode": "SOURCE_AMOUNT",

    "destinationAmount": 35785543,

    "purpose_of_remittance": "FAMILY_SUPPORT",
    "merchant_external_id": "Ext-1234ffdfwadfsdffefed333634535678",

    "paymentLink": true,
    "redirectUrl": "https://ducapp.net"
});

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

fetch("https://backend.ducapp.net/api/private/transactions/cash-out/confirm-send", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example Response:

{
    "data": {
        "status": 200,
        "payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
    }
}

Request

POST /api/private/transactions/cash-out/send

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Content-Type: application/json

Request Body

NAME TYPE DESCRIPTION
credit_party_identifiers_accepted string Dynamic fields to be completed by the user
required_sending_entity_fields string Dynamic fields to be completed by the user
required_receiving_entity_fields string Dynamic fields to be completed by the user
required_documents string Dynamic fields to be completed by the user
sourceAmount number The amount to send in the user currency
sourceCurrency string The user's currency
mode string `SOURCE_AMOUNT
transaction_type string The type of transaction selected from those available by the payer
payer_id string The Id of the payer of the selected service
destinationAmount number The amount to deliver in the destination currency
location {Location} Information on the users GPS location at the time of the transaction
creditCardNumber string Information for payment, credit card number
creditCardHolderName string Information for payment, name that appears on the credit card
expiryDate string Information for payment, expiration date
cvc string Information for payment, cvc
avs_street_name string Information for payment, street name
avs_street_number string Information for payment, residence number
avs_zipcode string Information for payment, zip code
email string Email of the credit card owner
phone string Phone number of the credit card owner
merchant_external_id string External id for the current merchant for this transaction
paymentLink boolean Whether to create a payment link or not, to complete the payment
redirectUrl string URL to be redirected after the payment link confirmation
purpose_of_remittance string A brief description of the transaction purpose

Location

NAME TYPE DESCRIPTION
latitude string Latitude
longitude string Longitude
timestamp string Timestamp

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

Send Money (Specific)

Get Zones

Endpoint to get the defined zones for the fee calculation.

import requests

url = "https://backend.ducapp.net/api/private/CU/zones"

payload={}

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/CU/zones' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

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

Example Response:

{
    "countryName": "Cuba",
    "countryShortCode": "CU",
    "zones": [
        {
            "name": "Provincias",
            "locations": [
                "Artemisa",
                "Ciego de Ávila",
                "Camagüey",
                "Cienfuegos",
                "Granma",
                "Guantánamo",
                "Isla de la Juventud",
                "Las Tunas",
                "Mayabeque",
                "Pinar del Río",
                "Sancti Spíritus",
                "Santiago de Cuba",
                "Villa Clara",
                "Holguín",
                "Matanzas"
            ]
        },
        {
            "name": "Habana",
            "locations": [
                "La Habana"
            ]
        }
    ]
}

Request

GET /api/private/CU/zones

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

None Required

Response Body

NAME TYPE DESCRIPTION
zones [Zone] Zone object

Zone

NAME TYPE DESCRIPTION
name string Zonee name

Get Fee

Endpoint to get the current transaction fee.

import requests

url = "https://backend.ducapp.net/api/private/fees/cu/cardCUP/Provincias?amount=7499"

payload={}
headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/fees/cu/cardCUP/Provincias?amount=7499' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://backend.ducapp.net/api/private/fees/cu/cardCUP/Provincias?amount=7499", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example Response:

{
    "countryName": "Cuba",
    "countryShortCode": "CU",
    "zoneName": "Provincias",
    "service": "cardCUP",
    "rangeMin": 6000.01,
    "rangeMax": 12000,
    "amountToDeliver": 7499,
    "currencyToDeliver": "CUP",
    "fee": 6,
    "currencyFee": "USD"
}

Request

GET /api/private/fees/cu/{service}/{zone}?amount={amount}

Host: backend.ducapp.net

Headers:

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

None Required

Response Body

NAME TYPE DESCRIPTION
zoneName string Requested zone name
service string Requested service name
currencyToDeliver string Currency to deliver for given service
fee string The fee amount
currencyFee string The fee currency

Get Fees

Endpoint to get all the fee dataset.

import requests

url = "https://backend.ducapp.net/api/private/fees"

payload={}
headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/fees' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

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

Example Response:

{
  "results": {
    "Habana": {
      "cardCUP": [
        {
          "fromAmount": 0,
          "toAmount": 6000,
          "fee": 3,
          "createdAt": "2022-09-29T15:38:51.773Z",
          "updatedAt": "2022-11-18T15:22:35.099Z"
        },
        {
        "fromAmount": 6000.01,
        "toAmount": 12000,
        "fee": 6,
        "createdAt": "2022-09-29T15:38:51.777Z",
        "updatedAt": "2022-09-29T15:38:51.777Z"
        }  
      ],
      "deliveryCUP": [
        {
          "fromAmount": 0,
          "toAmount": 6000,
          "fee": 3,
          "createdAt": "2022-09-29T15:40:18.988Z",
          "updatedAt": "2022-11-18T15:22:00.879Z"
        },
        {
          "fromAmount": 6000.01,
          "toAmount": 12000,
          "fee": 6,
          "createdAt": "2022-09-29T15:40:18.990Z",
          "updatedAt": "2022-09-29T15:40:18.990Z"
        }
      ]
    },
    "Provincias": {
      "deliveryUSD": [
        {
          "fromAmount": 0,
          "toAmount": 100,
          "fee": 12,
          "createdAt": "2022-10-03T16:31:43.609Z",
          "updatedAt": "2022-11-18T15:25:08.645Z"
        },
        {
          "fromAmount": 100.01,
          "toAmount": 150,
          "fee": 18,
          "createdAt": "2022-10-03T16:31:43.614Z",
          "updatedAt": "2022-10-03T16:31:43.614Z"
        }
      ],
      "cardUSD": [
        {
          "fromAmount": 20.01,
          "toAmount": 50,
          "fee": 6,
          "createdAt": "2023-03-16T20:28:58.800Z",
          "updatedAt": "2023-03-16T20:28:58.800Z"
        },
        {
          "fromAmount": 50.01,
          "toAmount": 100,
          "fee": 10,
          "createdAt": "2023-03-16T20:28:58.802Z",
          "updatedAt": "2023-03-16T20:28:58.802Z"
        }
      ]
    }
  }
}

Request

GET /api/private/fees

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

None Required

Response Body

NAME TYPE DESCRIPTION
[zoneName] {ZONE} Requested zone name

Zone

NAME TYPE DESCRIPTION
[serviceName] {SERVICE} Latitude

Service

NAME TYPE DESCRIPTION
[serviceName] [FEE] Latitude

Fee

NAME TYPE DESCRIPTION
fromAmount number Amount lower limit
toAmount number Amount upper limit
fee number Amount to pay
createdAt Date Fee creation date
updatedAt Date Fee update date

Get Exchange Rate

Endpoint to get the current exchange rate.

import requests

url = "https://backend.ducapp.net/api/private/rates?base=usd"

payload={}
headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/rates?base=usd' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://backend.ducapp.net/api/private/rates?base=usd", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example Response:

{
    "base": "USD",
    "rates": {
        "USD": "1.0000",
        "CAD": "1.3283",
        "CUP": "160.0000",
        "EUR": "0.9217"
    },
    "date": "2023-01-21"
}

Request

GET /api/private/rates?base={currency}

Host: backend.ducapp.net

Headers:

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

None Required

Response Body

NAME TYPE DESCRIPTION
rates {Rate} Rate info object
date string Current date for the exchange rate values

Rate

NAME TYPE DESCRIPTION
rates {Rate} Rate info object
date string Current date for the exchange rate values

Get Regions

Endpoint to get the region's info.

import requests

url = "https://backend.ducapp.net/api/private/transactions/country-region"

payload={}
headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions/country-region' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

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

Example Response:

{
    "data": {
        "status": 200,
        "payload": {
            "countryName": "Cuba",
            "countryShortCode": "CU",
            "regions": [
                {
                    "name": "Pinar del Río",
                    "shortCode": "01",
                    "municipalities": [
                        {
                            "name": "Pinar del Río",
                            "code": "M011100"
                        },
                        {
                            "name": "Consolación del Sur",
                            "code": "M011000"
                        },
                        {
                            "name": "San Juan y Martínez",
                            "code": "M011300"
                        },
                        {
                            "name": "Los Palacios",
                            "code": "M010900"
                        },
                        {
                            "name": "Sandino",
                            "code": "M010100"
                        },
                        {
                            "name": "Guane",
                            "code": "M011400"
                        },
                        {
                            "name": "La Palma",
                            "code": "M010500"
                        },
                        {
                            "name": "San Luis",
                            "code": "M011200"
                        },
                        {
                            "name": "Minas de Matahambre",
                            "code": "M010300"
                        },
                        {
                            "name": "Viñales",
                            "code": "M010400"
                        },
                        {
                            "name": "Mantua",
                            "code": "M010200"
                        }
                    ]
                },
                {
                    "name": "Artemisa",
                    "shortCode": "02",
                    "municipalities": [
                        {
                            "name": "Artemisa",
                            "code": "M021900"
                        },
                        {
                            "name": "San Cristóbal",
                            "code": "M022100"
                        },
                        {
                            "name": "San Antonio",
                            "code": "M020500"
                        },
                        {
                            "name": "Bauta",
                            "code": "M020400"
                        },
                        {
                            "name": "Bahía Honda",
                            "code": "M022000"
                        },
                        {
                            "name": "Mariel",
                            "code": "M020100"
                        },
                        {
                            "name": "Caimito",
                            "code": "M020300"
                        },
                        {
                            "name": "Güira de Melena",
                            "code": "M021700"
                        },
                        {
                            "name": "Alquízar",
                            "code": "M021800"
                        },
                        {
                            "name": "Guanajay",
                            "code": "M020200"
                        },
                        {
                            "name": "Candelaria",
                            "code": "M022200"
                        }
                    ]
                }
            ]
        }
    }
}

Request

GET /api/private/transactions/country-region

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

None Required

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

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

None Required

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

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

NAME TYPE DESCRIPTION
service SERVICES The service identifier
amount number The the amount to send (Calculated Fee included)
currency string The the currency of the user
concept string A brief description
cardNumber string The beneficiary card number
cardHolderName string The beneficiary card name
bankName string The beneficiary bank name
contactPhone string The beneficiary phone number
deliveryCurrency string The beneficiary card currency
deliveryCountry string The beneficiary country
deliveryAmount string The amount to receive by the beneficiary
deliveryAddress string The beneficiarys address
deliveryCountryCode string The beneficiary alpha2 country iso code
senderName string The name of the person who send the transaction
senderLastName string The lastname of the person who send the transaction
senderDocumentType DOCUMENT TYPE The type of document of identification of the person who send the transaction
senderDocumentNumber string The identification number of the person who send the transaction
senderNationalityCountry string The nationality of the person who send the transaction in format ISO 3166 alpha3
senderBirthdate string The birthdate of the person who send the transaction in format (yyyy-MM-dd)
senderBirthCountry string The birth country of the person who send the transaction in format ISO 3166 alpha3
senderSex GENDER The gender of the person who send the transaction
senderAddress string The address of the person who send the transaction
senderCity string The city name of the person who send the transaction
senderPostalCode string The postal code of the person who send the transaction
senderProvince string The province of the person who send the transaction
senderCountry string The resident country of the person who send the transaction in format ISO 3166 alpha3
receiverCity string The city name of the person who receive the transaction
receiverPhone2 string Alternative phone number of the person who receive the transaction. Only if have a contactPhone and it's a different number
receiverCountry string The country of the person who receive the transaction in format ISO 3166 alpha3
location {Location} Information on the users GPS location at the time of the transaction
creditCardNumber string Information for payment, credit card number
creditCardHolderName string Information for payment, name that appears on the credit card
expiryDate string Information for payment, expiration date
cvc string Information for payment, cvc
avs_street_name string Information for payment, street name
avs_street_number string Information for payment, residence number
avs_zipcode string Information for payment, zip code
email string Email of the credit card owner
phone string Phone number of the credit card owner
merchant_external_id string External id for the current merchant for this transaction
paymentLink boolean Whether to create a payment link or not, to complete the payment

Services

cardCUP cardUSD

Document Type

NAME DESCRIPTION
PAS Passport
RES National ID
OTH Others
EUI Resident card
CED Cedula
DRV Drive Licence

Gender

M F

Bank Name

Banco Popular de Ahorro Banco Metropolitano Banco de Crédito y Comercio BANDEC

Location

NAME TYPE DESCRIPTION
latitude string Latitude
longitude string Longitude
timestamp string Timestamp

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

Home Delivery

Endpoint to send home delivery money.

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "service": "deliveryUSD",
  "deliveryAddress": "Calle Máximo Gómez, #15 e/ Calle Libertad y Calle Maceo",
  "deliveryFirstName": "Juan",
  "deliveryLastName": "Perez",
  "deliverySecondLastName": "Perez",
  "deliveryID": "00120814909",
  "deliveryPhone": "005353129327",
  "deliveryArea": "Sancti Spíritus",
  "deliveryCity": "Trinidad",
  "deliveryZone": "Provincias",
  "amount": 209,
  "deliveryAmount": "201",
  "currency": "USD",
  "concept": "Family Support",
  "deliveryCurrency": "USD",
  "creditCardNumber": "5454545454545454",
  "creditCardHolderName": "Ruben Gonzalez Ramirez",
  "senderName": "Ruben",
  "senderLastName": "Gonzalez Ramirez",
  "senderDocumentType": "PASSPORT",
  "senderDocumentNumber": "C254362",
  "senderNationalityCountry": "CAN",
  "senderBirthdate": "1966-03-11",
  "senderBirthCountry": "CAN",
  "senderSex": "M",
  "senderAddress": "Some Address",
  "senderCity": "Toronto",
  "senderPostalCode": "KJ4345",
  "senderProvince": "Ontario",
  "senderCountry": "Canada",
  "receiverPhone2": "2444676867",
  "receiverCountry": "CUB",
  "expiryDate": "07/29",
  "cvc": "123",
  "avs_street_name": "Main Street",
  "avs_street_number": "8",
  "avs_zipcode": "STJ3143",
  "email": "john.doe@test.ducapp.net",
  "phone": "+35699452438",
  "location": {
    "latitude": "35.92591105461136",
    "longitude": "14.492235823330882",
    "timestamp": "21:08:14.2556202"
  },
  "merchant_external_id": "Ext-6736222352"
});

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

fetch("https://backend.ducapp.net/api/private/transactions/cash-out/delivery", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

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

payload = json.dumps({
  "service": "deliveryUSD",

  "deliveryAddress": "Calle Máximo Gómez, #15 e/ Calle Libertad y Calle Maceo",
  "deliveryFirstName": "Juan",
  "deliveryLastName": "Perez",
  "deliverySecondLastName": "Perez",
  "deliveryID": "00120814909",
  "deliveryPhone": "005353129327",
  "deliveryArea": "Sancti Spíritus",
  "deliveryCity": "Trinidad",
  "deliveryZone": "Provincias",
  "amount": 209.0,
  "deliveryAmount": "201",
  "currency": "USD",
  "concept": "Family Support",
  "deliveryCurrency": "USD",
  "creditCardNumber": "5454545454545454",
  "creditCardHolderName": "Ruben Gonzalez Ramirez",

  "senderName": "Ruben",
  "senderLastName": "Gonzalez Ramirez",
  "senderDocumentType": "PASSPORT",
  "senderDocumentNumber": "C254362",
  "senderNationalityCountry": "CAN",
  "senderBirthdate": "1966-03-11",
  "senderBirthCountry": "CAN",
  "senderSex": "M",
  "senderAddress": "Some Address",
  "senderCity": "Toronto",
  "senderPostalCode": "KJ4345",
  "senderProvince": "Ontario",
  "senderCountry": "Canada",

  "receiverPhone2": "2444676867",
  "receiverCountry": "CUB",

  "expiryDate": "07/29",
  "cvc": "123",
  "avs_street_name": "Main Street",
  "avs_street_number": "8",
  "avs_zipcode": "STJ3143",
  "email": "john.doe@test.ducapp.net",
  "phone": "+35699452438",
  "location": {
    "latitude": "35.92591105461136",
    "longitude": "14.492235823330882",
    "timestamp": "21:08:14.2556202"
  },
  "merchant_external_id": "Ext-6736222352"
})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/delivery' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "service": "deliveryUSD",

  "deliveryAddress": "Calle Máximo Gómez, #15 e/ Calle Libertad y Calle Maceo",
  "deliveryFirstName": "Juan",
  "deliveryLastName": "Perez",
  "deliverySecondLastName": "Perez",
  "deliveryID": "00120814909",
  "deliveryPhone": "005353129327",
  "deliveryArea": "Sancti Spíritus",
  "deliveryCity": "Trinidad",
  "deliveryZone": "Provincias",
  "amount": 209.0,
  "deliveryAmount": "201",
  "currency": "USD",
  "concept": "Family Support",
  "deliveryCurrency": "USD",
  "creditCardNumber": "5454545454545454",
  "creditCardHolderName": "Ruben Gonzalez Ramirez",

  "senderName": "Ruben",
  "senderLastName": "Gonzalez Ramirez",
  "senderDocumentType": "PASSPORT",
  "senderDocumentNumber": "C254362",
  "senderNationalityCountry": "CAN",
  "senderBirthdate": "1966-03-11",
  "senderBirthCountry": "CAN",
  "senderSex": "M",
  "senderAddress": "Some Address",
  "senderCity": "Toronto",
  "senderPostalCode": "KJ4345",
  "senderProvince": "Ontario",
  "senderCountry": "Canada",

  "receiverPhone2": "2444676867",
  "receiverCountry": "CUB",

  "expiryDate": "07/29",
  "cvc": "123",
  "avs_street_name": "Main Street",
  "avs_street_number": "8",
  "avs_zipcode": "STJ3143",
  "email": "john.doe@test.ducapp.net",
  "phone": "+35699452438",
  "location": {
    "latitude": "35.92591105461136",
    "longitude": "14.492235823330882",
    "timestamp": "21:08:14.2556202"
  },
  "merchant_external_id": "Ext-6736222352"
}'

Example Response:

{
    "data": {
        "status": 200,
        "payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
    }
}

Request

POST /api/private/transactions/cash-out/delivery

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

NAME TYPE DESCRIPTION
service SERVICES The service identifier
amount number The the amount to send
currency string The the currency of the user
concept string A brief description
deliveryFirstName string The beneficiarys first name
deliveryLastName string The beneficiarys lastname
deliverySecondLastName string The beneficiarys second lastname
deliveryID string The beneficiarys identification number
deliveryPhone string The beneficiarys phone number
deliveryCountry string The beneficiarys country
deliveryCountryCode string The beneficiarys country ISO code in alpha2 format
deliveryArea string The beneficiarys province (Defined in Get Regions endpoint response )
deliveryCity string The beneficiarys municipality (Defined in Get Regions endpoint response )
deliveryZone string The beneficiarys zone (Defined in Get Zones endpoint response )
deliveryAddress string The beneficiarys address
deliveryCurrency string The beneficiarys currency
deliveryAmount string The amount to receive by the beneficiary
senderName string The name of the person who send the transaction
senderLastName string The lastname of the person who send the transaction
senderDocumentType DOCUMENT TYPE The type of document of identification of the person who send the transaction
senderDocumentNumber string The identification number of the person who send the transaction
senderNationalityCountry string The nationality of the person who send the transaction in format ISO 3166 alpha3
senderBirthdate string The birthdate of the person who send the transaction in format (yyyy-MM-dd)
senderBirthCountry string The birth country of the person who send the transaction in format ISO 3166 alpha3
senderSex GENDER The gender of the person who send the transaction
senderAddress string The address of the person who send the transaction
senderCity string The city name of the person who send the transaction
senderPostalCode string The postal code of the person who send the transaction
senderProvince string The province of the person who send the transaction
senderCountry string The resident country of the person who send the transaction in format ISO 3166 alpha3
receiverCity string The city name of the person who receive the transaction
receiverPhone2 string Alternative phone number of the person who receive the transaction. Only if have a contactPhone and it's a different number
receiverCountry string The country of the person who receive the transaction in format ISO 3166 alpha3
location {Location} Information on the users GPS location at the time of the transaction
creditCardNumber string Information for payment, credit card number
creditCardHolderName string Information for payment, name that appears on the credit card
expiryDate string Information for payment, expiration date
cvc string Information for payment, cvc
avs_street_name string Information for payment, street name
avs_street_number string Information for payment, residence number
avs_zipcode string Information for payment, zip code
email string Email of the credit card owner
phone string Phone number of the credit card owner
merchant_external_id string External id for the current merchant for this transaction
paymentLink boolean Whether to create a payment link or not, to complete the payment

Services

deliveryCUP deliveryUSD deliveryEUR

Document Type

NAME DESCRIPTION
PAS Passport
RES National ID
OTH Others
EUI Resident card
CED Cedula
DRV Drive Licence

Gender

M F

Location

NAME TYPE DESCRIPTION
latitude string Latitude
longitude string Longitude
timestamp string Timestamp

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

Send Money (Alternatives)

Email Money Transfer

Endpoint to send money via email address.

import requests
import json

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

payload = json.dumps({
    "amount": 100,
    "currency": "EUR",
    "concept": "Testing",
    "emailToSend": "testing2@gmail.com",
    "location": {
        "latitude": "-76.25804853625596",
        "longitude": "20.888864980079234",
        "timestamp": "1635185398"
    },
    "creditCardNumber": "5454545454545454",
    "creditCardHolderName": "TRuben Gonzalez Ramirezst",
    "expiryDate": "07/29",
    "cvc": "123",
    "avs_street_name": "Main Street",
    "avs_street_number": "508",
    "avs_zipcode": "80100",
    "email": "john.doe@test.ducapp.net",
    "phone": "+19058025826",
    "merchant_external_id": "Ext-12345346536541"
})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
    "amount": 100,
    "currency": "EUR",
    "concept": "Testing",
    "emailToSend": "testing2@gmail.com",
    "location": {
        "latitude": "-76.25804853625596",
        "longitude": "20.888864980079234",
        "timestamp": "1635185398"
    },
    "creditCardNumber": "5454545454545454",
    "creditCardHolderName": "TRuben Gonzalez Ramirezst",
    "expiryDate": "07/29",
    "cvc": "123",
    "avs_street_name": "Main Street",
    "avs_street_number": "508",
    "avs_zipcode": "80100",
    "email": "john.doe@test.ducapp.net",
    "phone": "+19058025826",
    "merchant_external_id": "Ext-12345346536541"
});

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

fetch("https://backend.ducapp.net/api/private/transactions/cash-out/email", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/email' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 100,
    "currency": "EUR",
    "concept": "Testing",
    "emailToSend": "testing2@gmail.com",
    "location": {
        "latitude": "-76.25804853625596",
        "longitude": "20.888864980079234",
        "timestamp": "1635185398"
    },
    "creditCardNumber": "5454545454545454",
    "creditCardHolderName": "TRuben Gonzalez Ramirezst",
    "expiryDate": "07/29",
    "cvc": "123",
    "avs_street_name": "Main Street",
    "avs_street_number": "508",
    "avs_zipcode": "80100",
    "email": "john.doe@test.ducapp.net",
    "phone": "+19058025826",
    "merchant_external_id": "Ext-12345346536541"
}'

Example Response:

{
    "data": {
        "status": 200,
        "payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
    }
}

Request

POST /api/private/transactions/cash-out/email

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

NAME TYPE DESCRIPTION
emailToSend string The destination email
amount number The the amount to send
currency string The the currency of the user
concept string A brief description
location {Location} Information on the users GPS location at the time of the transaction
creditCardNumber string Information for payment, credit card number
creditCardHolderName string Information for payment, name that appears on the credit card
expiryDate string Information for payment, expiration date
cvc string Information for payment, cvc
avs_street_name string Information for payment, street name
avs_street_number string Information for payment, residence number
avs_zipcode string Information for payment, zip code
email string Email of the credit card owner
phone string Phone number of the credit card owner
merchant_external_id string External id for the current merchant for this transaction
paymentLink boolean Whether to create a payment link or not, to complete the payment

Location

NAME TYPE DESCRIPTION
latitude string Latitude
longitude string Longitude
timestamp string Timestamp

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

P2P Transfer

Endpoint to send money to internal users of the platform.

import requests
import json

url = "https://backend.ducapp.net/api/private/transactions/token/p2p"

payload = json.dumps({
    "toAddress": "0x14A205B953359F24F41B9b029ee62dc791A07F50",
    "amount": 1,
    "currency": "USD",
    "concept": "Testing 4",
    "location": {
        "latitude": "-76.25804853625596",
        "longitude": "20.888864980079234",
        "timestamp": "1635185398"
    },
    "creditCardNumber": "5454545454545454",
    "creditCardHolderName": "Ruben Gonzalez Ramirez",
    "expiryDate": "07/29",
    "cvc": "123",
    "avs_street_name": "Main Street",
    "avs_street_number": "508",
    "avs_zipcode": "80100",
    "email": "john.doe@test.ducapp.net",
    "phone": "+12345678901",
    "externalID": "Ext-2542643735"
})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/token/p2p' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "toAddress": "0x14A205B953359F24F41B9b029ee62dc791A07F50",
    "amount": 1,
    "currency": "USD",
    "concept": "Testing 4",
    "location": {
        "latitude": "-76.25804853625596",
        "longitude": "20.888864980079234",
        "timestamp": "1635185398"
    },
    "creditCardNumber": "5454545454545454",
    "creditCardHolderName": "Ruben Gonzalez Ramirez",
    "expiryDate": "07/29",
    "cvc": "123",
    "avs_street_name": "Main Street",
    "avs_street_number": "508",
    "avs_zipcode": "80100",
    "email": "john.doe@test.ducapp.net",
    "phone": "+12345678901",
    "externalID": "Ext-2542643735"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
    "toAddress": "0x14A205B953359F24F41B9b029ee62dc791A07F50",
    "amount": 1,
    "currency": "USD",
    "concept": "Testing 4",
    "location": {
        "latitude": "-76.25804853625596",
        "longitude": "20.888864980079234",
        "timestamp": "1635185398"
    },
    "creditCardNumber": "5454545454545454",
    "creditCardHolderName": "Ruben Gonzalez Ramirez",
    "expiryDate": "07/29",
    "cvc": "123",
    "avs_street_name": "Main Street",
    "avs_street_number": "508",
    "avs_zipcode": "80100",
    "email": "john.doe@test.ducapp.net",
    "phone": "+12345678901",
    "externalID": "Ext-2542643735"
});

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

fetch("https://backend.ducapp.net/api/private/transactions/token/p2p", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example Response:

{
    "status": 200,
    "payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
}

Request

POST /api/private/transactions/token/p2p

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

NAME TYPE DESCRIPTION
toAddress string The receiver wallet address
amount number The the amount to send
currency string The the currency of the user
concept string A brief description
location {Location} Information on the users GPS location at the time of the transaction
creditCardNumber string Information for payment, credit card number
creditCardHolderName string Information for payment, name that appears on the credit card
expiryDate string Information for payment, expiration date
cvc string Information for payment, cvc
avs_street_name string Information for payment, street name
avs_street_number string Information for payment, residence number
avs_zipcode string Information for payment, zip code
email string Email of the credit card owner
phone string Phone number of the credit card owner
merchant_external_id string External id for the current merchant for this transaction
paymentLink boolean Whether to create a payment link or not, to complete the payment

Location

NAME TYPE DESCRIPTION
latitude string Latitude
longitude string Longitude
timestamp string Timestamp

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

Payments

Create Payment Order

Endpoint to create a payment order. It could be completed via dynamic link or QR Code.

import requests
import json

url = "https://backend.ducapp.net/api/private/payments/order"

payload = json.dumps({
    "toWalletAddress": "0x2485EAeF87343A2e51c9E52BDA02D51D9d51202E",
    "amount": 1,
    "currency": "USD",
    "callbackUrl": "https://webhook.site/5f5351e3-4a49-4586-af1e-72b34307d7b6",
    "expiryTime": {
        "amount": 24,
        "unit": "hours"
    },
    "description": "Testing",
    "externalID": "Ext-13323521379524536",
    "merchantId": "Merchant-c22682FE6724542"
})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/payments/order' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "toWalletAddress": "0x2485EAeF87343A2e51c9E52BDA02D51D9d51202E",
    "amount": 1,
    "currency": "USD",
    "callbackUrl": "https://webhook.site/5f5351e3-4a49-4586-af1e-72b34307d7b6",
    "expiryTime": {
        "amount": 24,
        "unit": "hours"
    },
    "description": "Testing",
    "externalID": "Ext-13323521379524536",
    "merchantId": "Merchant-c22682FE6724542"
}'
var myHeaders = new Headers()
myHeaders.append('Authorization', 'Bearer <YOUR_ACCESS_TOKEN>')
myHeaders.append('x-api-key', '<YOUR_API_KEY>')
myHeaders.append('Content-Type', 'application/json')

var raw = JSON.stringify({
    toWalletAddress: '0x2485EAeF87343A2e51c9E52BDA02D51D9d51202E',
    amount: 1,
    currency: 'USD',
    callbackUrl: 'https://webhook.site/5f5351e3-4a49-4586-af1e-72b34307d7b6',
    expiryTime: {
        amount: 24,
        unit: 'hours',
    },
    description: 'Testing',
    externalID: 'Ext-13323521379524536',
    merchantId: 'Merchant-c22682FE6724542',
})

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

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

Example Response:

{
    "status": "pending",
    "externalID": "Ext-13323521379524536",
    "toWalletAddress": "0x2485EAeF87343A2e51c9E52BDA02D51D9d51202E",
    "amount": 1,
    "currency": "USD",
    "description": "Testing",
    "createdAt": "2023-01-22T02:29:39.765Z",
    "updatedAt": "2023-01-22T02:29:39.974Z",
    "orderId": "OI0000000229",
    "qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUwAAAFMCAYAAACg...gAkASgRMAFAiYAKA0v8DEJvs1M02O2gAAAAASUVORK5CYII=",
    "dynamicLink": "https://ducwallet.page.link/payment/1/USD/Testing/Ext-13323521379524536/OI0000000229/0x2485EAeF87343A2e51c9E52BDA02D51D9d51202E/DYNAMIC_PAYMENT",
    "expiresAt": "2023-01-23T02:29:39.765Z"
}

Request

POST /api/private/payments/order

Host: backend.ducapp.net

Headers:

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

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Path

NAME TYPE DESCRIPTION
orderId string The order id

Request Body

None Required

Response Body

NAME TYPE DESCRIPTION
toWalletAddress string The wallet address of the user that is goint to receive the payment
amount number The amount of the payment
currency string The currency of the payment
expiresAt string Payment expiration date
description string A biref description of the payment
externalID string External ID
status string Initial status of the payment
orderId string Order ID
qrCode string QR Code to complete the payment
dynamicLink string Dynamic link to complet the payment

Order Status Changes

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

Example Payload:

{
    "expiryTime": {
        "amount": 24,
        "unit": "hours"
    },
    "status": "confirmed",
    "externalID": "PaymentOrder-24b2c4cc-e881-4242-972a-93ee271802bd",
    "amount": 15.49,
    "currency": "CAD",
    "description": "We need to generate the back-end SCSI firewall!",
    "callbackUrl": "https://webhook.site/461607fc-0f7a-49db-974b-8a6ae9d86ef1",
    "createdAt": "2024-01-08T16:30:06.927Z",
    "updatedAt": "2024-01-08T16:43:09.532Z",
    "confirmedAt": "2024-01-08T16:43:09.532Z",
    "expiresAt": "2024-01-09T16:30:06.927Z",
    "id": "659c230e2b388a5a7d327561"
}

Top up

Get Operators

Endpoint to get the operators given a valid phone number.

import requests
import json

url = "https://backend.ducapp.net/api/private/transactions/topup/operators"

payload = json.dumps({
  "destination": "+5352552615",
  "currency": "USD"
})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/topup/operators' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
    "destination": "+5352552615",
    "currency": "USD"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "destination": "+5352552615",
  "currency": "USD"
});

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

fetch("https://backend.ducapp.net/api/private/transactions/topup/operators", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example Response:

{
    "data": {
        "operators": [
            {
                "id": 161,
                "name": "CubaCel Cuba",
                "countryName": "Cuba",
                "countryIsoCode": "CUB",
                "products": [
                    {
                        "id": 35718,
                        "name": "CubaCel Cuba 250 CUP",
                        "description": "250 CUP",
                        "operatorId": 161,
                        "operator": "CubaCel Cuba",
                        "serviceId": 1,
                        "service": "Mobile",
                        "label": "250 CUP (11.02 USD)",
                        "wholesalePrice": {
                            "amount": 13.18,
                            "currency": "CAD"
                        },
                        "salePrice": {
                            "amount": 11.02,
                            "currency": "USD"
                        },
                        "retailPrice": {
                            "amount": 15.36,
                            "currency": "CAD"
                        },
                        "source": {
                            "amount": 13.18,
                            "currency": "CAD"
                        },
                        "destination": {
                            "amount": 250,
                            "currency": "CUP"
                        },
                        "requiredFields": {
                            "creditPartyIdentifier": [
                                "mobileNumber"
                            ],
                            "debitPartyIdentifier": [],
                            "statementIdentifier": [],
                            "beneficiary": [],
                            "sender": []
                        }
                    },
                    {
                        "id": 35719,
                        "name": "CubaCel Cuba 500 CUP",
                        "description": "500 CUP",
                        "operatorId": 161,
                        "operator": "CubaCel Cuba",
                        "serviceId": 1,
                        "service": "Mobile",
                        "label": "500 CUP (22.04 USD)",
                        "wholesalePrice": {
                            "amount": 26.36,
                            "currency": "CAD"
                        },
                        "salePrice": {
                            "amount": 22.04,
                            "currency": "USD"
                        },
                        "retailPrice": {
                            "amount": 30.71,
                            "currency": "CAD"
                        },
                        "source": {
                            "amount": 26.36,
                            "currency": "CAD"
                        },
                        "destination": {
                            "amount": 500,
                            "currency": "CUP"
                        },
                        "requiredFields": {
                            "creditPartyIdentifier": [
                                "mobileNumber"
                            ],
                            "debitPartyIdentifier": [],
                            "statementIdentifier": [],
                            "beneficiary": [],
                            "sender": []
                        }
                    }
                ]
            }
        ]
    }
}

Request

POST /api/private/transactions/topup/operators

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

NAME TYPE DESCRIPTION
destination string The phone number to get asociated operators
currency string The currency in which you want to display the prices of the products

Response Body

NAME TYPE DESCRIPTION
operators [Operator] Array of operators

Operator

NAME TYPE DESCRIPTION
id string Opeartor Id
name string Opeartor name
countryName string Opeartor country name
products [Product] Array of products

Product

NAME TYPE DESCRIPTION
id string Product Id
name string Product name
service string Product service name
label string Product label
salePrice [SalePrice] SalePrice obejct
destination [Destination] Destination obejct

SalePrice

NAME TYPE DESCRIPTION
amount number Product sale price amount
currency string Product sale price currency

Destination

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

Top up

Endpoint to send mobile recharge to one or multiple phone numbers.

import requests
import json

url = "https://backend.ducapp.net/api/private/transactions/topup/send"

payload = json.dumps({
  "productId": 35718,
  "receiverName": "Darian",
  "destinations": [
    "+5352552615"
  ],
  "currency": "USD",
  "isScheduled": False,
  "scheduledDate": None,
  "paymentLink": True,
  "merchant_external_id": "Top-Up Test-1"
})

headers = {
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'x-api-key': '<YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/topup/send' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "productId": 35718,
    "receiverName": "Darian",
    "destinations": [
        "+5352552615"
    ],
    "currency": "USD",
    "isScheduled": false,
    "scheduledDate": null,
    "paymentLink": true,
    "merchant_external_id": "Top-Up Test-1"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "productId": 35718,
  "receiverName": "John",
  "destinations": [
    "+5352552615"
  ],
  "currency": "USD",
  "isScheduled": false,
  "scheduledDate": null,
  "paymentLink": true,
  "merchant_external_id": "Top-Up Test-1"
});

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

fetch("https://backend.ducapp.net/api/private/transactions/topup/send", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example Response:

{
    "data": {
        "status": 200,
        "payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
    }
}

Request

POST /api/private/transactions/topup/send

Host: backend.ducapp.net

Headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

x-api-key: <YOUR_API_KEY>

Request Body

NAME TYPE DESCRIPTION
productId number The product id
receiverName string Name of the beneficiary of the top up
destinations [string] *Array of phone numbers
currency string The user currency
isScheduled string If the top up wants to be scheduled or not
scheduledDate string Schedule date
paymentLink string Whether to create a payment link or not, to complete the payment
merchant_external_id boolean External id for the current merchant for this transaction
location {Location} Information on the users GPS location at the time of the transaction
creditCardNumber string Information for payment, credit card number
creditCardHolderName string Information for payment, name that appears on the credit card
expiryDate string Information for payment, expiration date
cvc string Information for payment, cvc
avs_street_name string Information for payment, street name
avs_street_number string Information for payment, residence number
avs_zipcode string Information for payment, zip code
email string Email of the credit card owner
phone string Phone number of the credit card owner

Location

NAME TYPE DESCRIPTION
latitude string Latitude
longitude string Longitude
timestamp string Timestamp

Response Body

NAME TYPE DESCRIPTION
status number The status of the transaction
payload string Corresponding message
paymentLink {Payment Link} Payment Link Object
NAME TYPE DESCRIPTION
url string Payment link
id string Payment link Id

Transactions

Get Transactions

Endpoint to get the user transactions as sender or receiver.

import requests
import json

url = "https://backend.ducapp.net/api/private/transactions?skip=0&limit=10"

payload = json.dumps({
  "filter": {
    "status": "queued"
  }
})

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
curl --location --request GET 'https://backend.ducapp.net/api/private/transactions?skip=0&limit=10' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "filter": {
        "status": "queued"
    }
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  filter: {
    status: "queued",
  },
});

var requestOptions = {
  method: "GET",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch(
  "https://backend.ducapp.net/api/private/transactions?skip=0&limit=10",
  requestOptions
)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));

Example Response

{
  "data": [
    {
      "transactionAmount": 100,
      "transactionStatus": "queued",
      "currency": "EUR",
      "type": "CASH_OUT_TRANSACTION",
      "concept": "Testing",
      "transactionID": "AA00376276",
      "id": "63cc8dd9859b0932b196eb1e"
    },
    {
      "transactionAmount": 100,
      "transactionStatus": "queued",
      "currency": "EUR",
      "type": "CASH_OUT_TRANSACTION",
      "concept": "Testing",
      "transactionID": "AA00376274"
    }
  ]
}

Request

GET /api/private/transactions?skip={spik}&limit={limit}

Host: backend.ducapp.net

Headers:

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}

Host: backend.ducapp.net

Headers:

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

None Required

Response Body

NAME TYPE DESCRIPTION
data [Transaction] Transaction info

Transaction

NAME TYPE DESCRIPTION
transactionAmount number The amount of the transaction
transactionStatus string The status of the transaction
currency string The currency of the transaction
type string The type of the transaction
concept string The concept of the transaction
transactionID string The id of the transaction

Cancel Transaction

Endpoint to cancel a transaction given an externalId.

import requests
import json

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

payload = json.dumps({
    "externalID": "Ext-546735635",
    "description": "Testing"
})

headers = {
  'x-api-key': '<YOUR_API_KEY>',
  'Authorization': 'Bearer <YOUR_ACCESS_TOKEN>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'https://backend.ducapp.net/api/private/transactions/cash-out/changeStatus' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "externalID": "Ext-546735635",
    "description": "Testing"
}'
var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR_API_KEY>");
myHeaders.append("Authorization", "Bearer <YOUR_ACCESS_TOKEN>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  externalID: "Ext-546735635",
  description: "Testing",
});

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

fetch(
  "https://backend.ducapp.net/api/private/transactions/cash-out/changeStatus",
  requestOptions
)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));

Example Response

{
  "data": {
    "status": 200,
    "payload": "The transaction is being processed, a notify will be sent to your email (john.doe@test.ducapp.net)."
  }
}

Request

POST /api/private/transactions/{id}

Host: backend.ducapp.net

Headers:

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

None Required

Response Body

NAME TYPE DESCRIPTION
data [Transaction] The status of the transaction

Transactions Error Status

CODE MESSAGE
CREATED The transaction is created
CONFIRMED The transaction is confirmed
CONFIRMED-UNDER-REVIEW-SLS The transaction is under sanctions list screening for sender or beneficiary
CONFIRMED-WAITING-FOR-PICKUP The transaction is available for cash pick up by the beneficiary. Applicable for universal cash pick up only
REJECTED The transaction is rejected
REJECTED-SLS-SENDER The transaction is rejected as the sender failed the sanctions list screening
REJECTED-SLS-BENEFICIARY The transaction is rejected as the beneficiary failed the sanctions list screening
REJECTED-INVALID-BENEFICIARY The transaction is rejected as the beneficiary account is invalid
REJECTED-BARRED-BENEFICIARY The transaction is rejected as the beneficiary is blacklisted
REJECTED-BARRED-SENDER The transaction is rejected as the sender is blacklisted
REJECTED-INVALID-BENEFICIARY-DETAILS The transaction is rejected as the beneficiary details are invalid, e.g. name, email, phone number
REJECTED-LIMITATIONS-ON-TRANSACTION-VALUE The transaction is rejected as the transaction value exceeds the transaction value limit
REJECTED-LIMITATIONS-ON-SENDER-VALUE The transaction is rejected as the transaction value exceeds the value that the sender can send
REJECTED-LIMITATIONS-ON-BENEFICIARY-VALUE The transaction is rejected as the transaction value exceeds the value that the beneficiary can receive
REJECTED-LIMITATIONS-ON-ACCOUNT-VALUE The transaction is rejected as the transaction value exceeds the value that the account can receive
REJECTED-LIMITATIONS-ON-SENDER-QUANTITY The transaction is rejected as the sender exceeded the number of transactions that the sender can send
REJECTED-LIMITATIONS-ON-BENEFICIARY-QUANTITY The transaction is rejected as the beneficiary exceeded the number of transactions that the beneficiary can receive
REJECTED-LIMITATIONS-ON-ACCOUNT-QUANTITY The transaction is rejected as the account exceeded the number of transactions that the account can receive
REJECTED-COMPLIANCE-REASON The transaction is rejected due to compliance reason
REJECTED-PAYER-CURRENTLY-UNAVAILABLE The transaction is rejected as the payer is either under payer maintenance or currently unavailable
REJECTED-INSUFFICIENT-BALANCE The transaction is rejected due to insufficient balance on the pay-in partner’s account
CANCELLED The transaction is cancelled upon request
SUBMITTED The transaction is submitted to the pay-out partner for processing
AVAILABLE The transaction is available for cash pick up by the beneficiary
COMPLETED The transaction is completed and payout has been made to the beneficiary
REVERSED The transaction is reversed
DECLINED The transaction is declined by the pay-out partner
DECLINED-SLS-SENDER The transaction is declined by the pay-out partner as the sender failed the sanctions list screening
DECLINED-SLS-BENEFICIARY The transaction is declined by the pay-out partner as the beneficiary failed the sanctions list screening
DECLINED-INVALID-BENEFICIARY The transaction is declined by the pay-out partner due to invalid beneficiary, e.g. bank account number
DECLINED-BARRED-BENEFICIARY The transaction is declined by the pay-out partner as the beneficiary is blacklisted
DECLINED-UNSUPPORTED-BENEFICIARY The transaction is declined by the pay-out partner as the beneficary does not allow overseas transaction or payer is unavailable for pay out
DECLINED-INVALID-BENEFICIARY-DETAILS The transaction is declined by the pay-out partner as the beneficiary’s details is invalid, e.g. name or address
DECLINED-INVALID-SENDER-DETAILS The transaction is declined by the pay-out partner as the sender details is in wrong format per pay-out partners’ rules on sender. eg: character type length
DECLINED-LIMITATIONS-ON-TRANSACTION-VALUE The transaction is declined by the pay-out partner as the value exceeds the amount allowed per transaction
DECLINED-LIMITATIONS-ON-SENDER-VALUE The transaction is declined by the pay-out partner as the transaction value exceeds the value that the sender can send per transaction
DECLINED-LIMITATIONS-ON-BENEFICIARY-VALUE The transaction is declined by the pay-out partner as the transaction value exceeds the total value that the beneficiary can receive
DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE The transaction is declined by the pay-out partner as the transaction value exceeds the total value that the beneficiary can receive per account
DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-DAILY The transaction is declined by the pay-out partner as the transaction value exceeds the total value that the beneficiary can receive per day
DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-WEEKLY The transaction is been declined by the pay-out partner as the transaction value exceeds the total value that the beneficiary can receive per week
DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-MONTHLY The transaction is declined by the pay-out partner as the transaction value exceeds the total value that the beneficiary can receive per month
DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-YEARLY The transaction is declined by the pay-out partner as the transaction value exceeds the total value that the beneficiary can receive per year
DECLINED-LIMITATIONS-ON-SENDER-QUANTITY The transaction is declined by the pay-out partner as the sender has exceeded the number of transactions that the sender can send
DECLINED-LIMITATIONS-ON-BENEFICIARY-QUANTITY The transaction is declined by the pay-out partner as the beneficiary exceeds the total number of transactions that the beneficiary can receive
DECLINED-LIMITATIONS-ON-ACCOUNT-QUANTITY The transaction is declined by the pay-out partner as the beneficiary’s account exceeds the total number of transactions that the account can receive
DECLINED-DUPLICATED-TRANSACTION The transaction is declined by the pay-out partner due to duplication in the transaction
DECLINED-CANCELLED The transaction is declined by the pay-out partner as the pay-in partner contacted support and asked for the transaction to be cancelled (this can only happen during the beneficiary registration time)
DECLINED-REFUSED The transaction is declined by the pay-out partner as the beneficiary has actively refused to perform the required onboarding, the time has elapsed or the beneficiary was unresponsive
DECLINED-COMPLIANCE-REASON The transaction is declined by the pay-out partner due to compliance reason
DECLINED-INVALID-PURPOSE-OF-REMITTANCE The transaction is declined by the pay-out partner due to invalid purpose of remittance, e.g. pay-out partner does not allow gifts/donations
DECLINED-PAYER-CURRENTLY-UNAVAILABLE The transaction is declined by the pay-out partner as their system are not available

Web Hooks

Transaction Status Changes

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

Example Payload:

{
    "event": "GIFT_CARD_ADD_TOKEN",
    "transaction": {
        "transactionAmount": 10,
        "transactionStatus": "confirmed",
        "currency": "USD",
        "type": "GIFT_CARD_ADD_TOKEN",
        "concept": "transmitting the firewall won't do anything, we need to generate the back-end SQL sensor!",
        "externalID": "GiftCard-CREDIT-9ae68789-5b74-4efc-bede-23de1792d34f",
        "createdAt": "2024-01-06T00:34:12.930Z",
        "updatedAt": "2024-01-06T00:39:43.786Z",
        "transactionID": "AA00380577",
        "completedAt": "2024-01-06T00:39:42.640Z"
    }
}

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
}