paybridgeAPI
The API supports only GET and POST requests, with POST requests requiring JSON for data submission.
All responses, whether successful or failed, follow a consistent structure, as shown on the right side of the page.
Please note that all numbers in this documentation are displayed in the following format: $1 = 100. The one exception is amount when creating orders, which is sent in US dollars (see Create orders).
{ success: true, details: '', data: {...some data} } { success: false, details: 'details on the error', data: {} }Retrieves the information about the user
| Status code | Description |
|---|---|
| 200 | User is logged in |
| 401 | User is not logged in |
| 404 | User has not been found |
{
"success": true,
"details": "",
"data": {
"id": "66a4e99a0151621a45429a40",
"username": "username",
"name": "DMarket",
"balance": 1000,
"settings": {
"language": "en"
},
"statistics": {
"deposit": 1000,
"orders": {
"paypal": 1000,
"usdt": 1000
}
},
"createdAt": "2024-08-21",
"updatedAt": "2024-08-21"
}
} {
"success": false,
"details": "You need to log in to access this feature",
"data": {}
} {
"success": false,
"details": "User has not been found",
"data": {}
}Retrieves user's API Key and webhook
| Status code | Description |
|---|---|
| 200 | User is logged in |
| 401 | User is not logged in |
| 404 | User has not been found |
{
"success": true,
"details": "",
"data": {
"key": "fc18e0c514c9dc34c26d2d6b08fe80d9101fe513cad3feb9ebc"
}
} {
"success": false,
"details": "You need to log in to access this feature",
"data": {}
} {
"success": false,
"details": "User has not been found",
"data": {}
}Creates multiple withdraw orders based on different parameters
| Status code | Description |
|---|---|
| 200 | User is logged in |
| 401 | User is not logged in |
| 404 | User has not been found |
| Method | Receiver |
|---|---|
| paypal | PayPal e-mail as a string |
| usdt | USDT TRC20 address as a string |
| blik | Object with name, phoneNumber, accountNumber (IBAN) and amountQuote |
| uah | Object with name, card and amountQuote |
| kzt | Object with name, card, bankName and amountQuote |
| try | Object with name, bankName, accountNumber (Turkish IBAN) and amountQuote |
name is the recipient's full name. card is a 16 to 19 digit card number that must pass the Luhn check; spaces are allowed. bankName is the recipient's bank and is required for KZT and TRY. For TRY, accountNumber must be a Turkish IBAN (TR followed by 24 characters) and the order amount must be between $50 and $1000.
Unlike the numbers in responses, amount in the request body is in US dollars with up to two decimals: 10 creates a $10.00 order and 25.5 a $25.50 order. Do not multiply it by 100.
BLIK, UAH, KZT and TRY orders are paid out in PLN, UAH, KZT and TRY. If you want to be certain about the local amount the recipient receives, provide amountQuote in minor units (grosz, kopiykas, tiyn or kuruş) in your request body. Otherwise leave it as null and it will be calculated from the current exchange rate.
We do not make payments to Ozan Elektronik Para A.Ş. A TRY order whose bankName refers to it is rejected at creation, so route such payouts through another bank.
{
"orders": [
{
"amount": 10,
"method": "paypal" | "usdt",
"receiver": "test@test.com",
"comment": "id: 141"
}
]
}{
"orders": [
{
"amount": 10,
"method": "blik",
"receiver": {
"name": "John Doe",
"phoneNumber": "+48551671915",
"accountNumber": "PL57109024028593174953674724",
"amountQuote": 4592 | null
},
"comment": "id: 141"
}
]
}{
"orders": [
{
"amount": 10,
"method": "uah",
"receiver": {
"name": "Ivan Shevchenko",
"card": "4111 1111 1111 1111",
"amountQuote": 44500 | null
},
"comment": "id: 141"
}
]
}{
"orders": [
{
"amount": 10,
"method": "kzt",
"receiver": {
"name": "Aibek Nurlanov",
"card": "5555 5555 5555 4444",
"bankName": "Kaspi Bank",
"amountQuote": 520000 | null
},
"comment": "id: 141"
}
]
}{
"orders": [
{
"amount": 100,
"method": "try",
"receiver": {
"name": "Mehmet Yilmaz",
"bankName": "Ziraat Bankasi",
"accountNumber": "TR330006100519786457841326",
"amountQuote": 340000 | null
},
"comment": "id: 141"
}
]
} {
"success": true,
"details": "",
"data": {
"results": {
"created": [
{
"id": 670696d284683836c55e766a,
"amount": 1000,
"method": "paypal",
"receiver": "test@test.com",
"comment": "id: 141",
"status": 1,
"reason": "string"
}
],
"failed": [
{
"id": 670696d284683836c55e766a,
"amount": 1000,
"method": "paypal",
"receiver": "test@test.com",
"comment": "id: 141",
"reason": "Bad method"
}
]
}
}
} {
"success": false,
"details": "You need to log in to access this feature",
"data": {}
} {
"success": false,
"details": "User has not been found",
"data": {}
}Retrieves user's orders using limit, offset and allows to filter them by method and status
| Status code | Description |
|---|---|
| 200 | User is logged in |
| 400 | Invalid range OR method OR status provided |
| 401 | User is not logged in |
| 404 | User has not been found |
| Property | Description |
|---|---|
| limit | Number of orders returned, default to 20 |
| skip | Number of orders you want to offset |
| method | Payment method: 'paypal', 'usdt', 'blik', 'uah', 'kzt' or 'try' |
| status | 2 - processing, 3 - completed, 5 - rejected |
| search | Phrase that will be looked for |
| filter | Processing (status 2) or finished (statuses 3, 5) |
{
"success": true,
"details": "",
"data": {
"total": 981,
"orders": [
{
"id": 670696d284683836c55e766a,
"amount": 1000,
"method": "paypal",
"receiver": "test@test.com",
"comment": "id: 141",
"status": 1,
"reason": "string"
}
]
}
} {
"success": false,
"details": "Invalid method provided",
"data": {}
} {
"success": false,
"details": "You need to log in to access this feature",
"data": {}
} {
"success": false,
"details": "User has not been found",
"data": {}
}Retrieves current tariffs for orders
| Status code | Description |
|---|---|
| 200 | User is logged in |
| 401 | User is not logged in |
| 404 | User has not been found |
{
"success": true,
"details": "",
"data": {
"prices": [
{
"method": "paypal",
"base": 0,
"multiplier": 1.01,
"min": 0,
"max": null
}
]
}
} {
"success": false,
"details": "You need to log in to access this feature",
"data": {}
} {
"success": false,
"details": "User has not been found",
"data": {}
}Retrieves the latest exchange rate for the requested currency pair
| Status code | Description |
|---|---|
| 200 | User is logged in |
| 400 | Requested pair is not supported |
| 401 | User is not logged in |
| 404 | User has not been found |
| Property | Description |
|---|---|
| pair | Currency pair, required. Supported pairs: 'USD_PLN' (BLIK), 'USD_UAH' (UAH), 'USD_KZT' (KZT) and 'USD_TRY' (TRY) |
The rate is returned without a decimal point, so divide it by 100. For example, a value of 4450 means 1 USD = 44.50. This is the very same rate we use to calculate amountQuote for your BLIK, UAH, KZT and TRY orders.
{
"success": true,
"details": "",
"data": {
"pair": "USD_PLN",
"value": 365,
"createdAt": "2024-08-23T15:05:02.107Z"
}
} {
"success": false,
"details": "Pair USD_EUR is not supported",
"data": {}
} {
"success": false,
"details": "You need to log in to access this feature",
"data": {}
} {
"success": false,
"details": "User has not been found",
"data": {}
}Retrieves the latest exchange rate for every supported currency pair in a single request. The endpoint takes no parameters and returns the rates in the order USD_PLN, USD_UAH, USD_KZT, USD_TRY, each in the same format as GET /rates/current.
| Status code | Description |
|---|---|
| 200 | User is logged in |
| 401 | User is not logged in |
| 404 | User has not been found |
{
"success": true,
"details": "",
"data": [
{
"pair": "USD_PLN",
"value": 365,
"createdAt": "2024-08-23T15:05:02.107Z"
},
{
"pair": "USD_UAH",
"value": 4450,
"createdAt": "2024-08-23T15:05:02.107Z"
},
{
"pair": "USD_KZT",
"value": 52000,
"createdAt": "2024-08-23T15:05:02.107Z"
},
{
"pair": "USD_TRY",
"value": 3400,
"createdAt": "2024-08-23T15:05:02.107Z"
}
]
} {
"success": false,
"details": "You need to log in to access this feature",
"data": {}
} {
"success": false,
"details": "User has not been found",
"data": {}
}A webhook allows our server to communicate with your application, particularly when there is a change in the status of your order. \
This is achieved through a POST request to the webhook URL that you configure on your settings page. The data is sent in JSON format (an example is provided on the right side of the page).
| Property | Description |
|---|---|
| method | Payment method, either 'paypal' or 'usdt' |
| receiver | Credentials of the receiving party |
| comment | Comment you've sent us when creating an order |
| status | One of 3 order statuses. Read more about it below |
| amount | Amount you asked us to send to the receiver |
| checkout | Amount you paid for this order (including fee) |
| reason | Reason for order rejection at status 5 |
| sign | Verification signature. Read more about it here |
| Status | Description |
|---|---|
| 2 | Order is being processed |
| 3 | Order is fulfilled |
| 5 | Order is rejected (In this case, you will also find a reason behind this in a "reason" field) |
{
"method": "paypal",
"receiver": "penta@gmail.com",
"comment": null,
"status": 3,
"amount": 100,
"checkout": 101,
"createdAt": "2024-08-23T15:05:02.107Z",
"updatedAt": "2024-08-26T11:55:42.924Z",
"reason": null,
"id": "66c8a51eb47bfdea9730d617",
"sign": "OGZiNzVlN2Y3OGI4ZDYwOTY1OTYyZmRjMTk0ODNiZjU1NjZhZTBlMzZiZDY2NGExMmVhNjRlMWRhYTNkODRiZA=="
}To verify the authenticity of the message, we include a signature alongside the data we send. You can confirm that the data is from us by generating a signature using your API key and comparing it with the signature provided. See the example below for details:
const data = { ... } // Data you have received from us
const key = '...' // Your api key
const sortedData = Object.keys(data)
.filter((key) => key !== 'sign')
.sort()
.reduce((object, key) => { object[key] = data[key]; return object }, {}) // Sort the keys
const sign = Buffer.from(crypto.createHash('sha256').update(JSON.stringify({ ...sortedData, key })).digest('hex')).toString('base64')