paybridgeAPIGet my API keyBack to PayBridge
paybridgeAPI

Fast and secure payments for your applications with PayBridge API

This API enables seamless integration of the PayBridge merchant platform with your application. To interact with our API, you need a verified account and an API key, which can be obtained from the Settings Page.
Manage your accounts
Access and manage account info
Initiate new orders in few clicks
Create multiple orders at once
Access order history
Filter and review past orders
Recommendation
To fully utilize our services, we strongly recommend setting up a webhook on the settings page
Set webhook
Get started

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).

Base API URL
https://paybridge.net/api/v1
key=<your API Key>
should be added to your request query to access our endpoints
Examples
Successful Response 200
 { success: true, details: '', data: {...some data}  }
Failed Response
 { success: false, details: 'details on the error', data: {}  }
User
Get user
GET /user

Retrieves the information about the user

Responses

Status codeDescription
200User is logged in
401User is not logged in
404User has not been found
Examples
Response example 200
 { 
"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"
}
}
Response example 401
 { 
"success": false,
"details": "You need to log in to access this feature",
"data": {}
}
Response example 404
 { 
"success": false,
"details": "User has not been found",
"data": {}
}
Get settings
GET /settings

Retrieves user's API Key and webhook

Responses

Status codeDescription
200User is logged in
401User is not logged in
404User has not been found
Response example 200
 { 
"success": true,
"details": "",
"data": {
"key": "fc18e0c514c9dc34c26d2d6b08fe80d9101fe513cad3feb9ebc"
}
}
Response example 401
 { 
"success": false,
"details": "You need to log in to access this feature",
"data": {}
}
Response example 404
 { 
"success": false,
"details": "User has not been found",
"data": {}
}
Order
Create orders
POST /orders/create

Creates multiple withdraw orders based on different parameters

Responses

Status codeDescription
200User is logged in
401User is not logged in
404User has not been found

Receiver by method

MethodReceiver
paypalPayPal e-mail as a string
usdtUSDT TRC20 address as a string
blikObject with name, phoneNumber, accountNumber (IBAN) and amountQuote
uahObject with name, card and amountQuote
kztObject with name, card, bankName and amountQuote
tryObject 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.

Amount is in US dollars

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.

Amount in local currency

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.

Unsupported Turkish bank

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.

Examples
request Body example PayPal, USDT
{
  "orders": [
    {
      "amount": 10,
      "method": "paypal" | "usdt",
      "receiver": "test@test.com",
      "comment": "id: 141"
    }
  ]
}
request Body example BLIK
{
  "orders": [
    {
      "amount": 10,
      "method": "blik",
      "receiver": {
        "name": "John Doe",
        "phoneNumber": "+48551671915",
        "accountNumber": "PL57109024028593174953674724",
        "amountQuote": 4592 | null
      },
      "comment": "id: 141"
    }
  ]
}
request Body example UAH
{
  "orders": [
    {
      "amount": 10,
      "method": "uah",
      "receiver": {
        "name": "Ivan Shevchenko",
        "card": "4111 1111 1111 1111",
        "amountQuote": 44500 | null
      },
      "comment": "id: 141"
    }
  ]
}
request Body example KZT
{
  "orders": [
    {
      "amount": 10,
      "method": "kzt",
      "receiver": {
        "name": "Aibek Nurlanov",
        "card": "5555 5555 5555 4444",
        "bankName": "Kaspi Bank",
        "amountQuote": 520000 | null
      },
      "comment": "id: 141"
    }
  ]
}
request Body example TRY
{
  "orders": [
    {
      "amount": 100,
      "method": "try",
      "receiver": {
        "name": "Mehmet Yilmaz",
        "bankName": "Ziraat Bankasi",
        "accountNumber": "TR330006100519786457841326",
        "amountQuote": 340000 | null
      },
      "comment": "id: 141"
    }
  ]
}
Response example 200
 { 
"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"
}
]
}
}
}
Response example 401
 { 
"success": false,
"details": "You need to log in to access this feature",
"data": {}
}
Response example 404
 { 
"success": false,
"details": "User has not been found",
"data": {}
}
Get user's orders
GET /orders/list

Retrieves user's orders using limit, offset and allows to filter them by method and status

Responses

Status codeDescription
200User is logged in
400Invalid range OR method OR status provided
401User is not logged in
404User has not been found

Parameters

PropertyDescription
limitNumber of orders returned, default to 20
skipNumber of orders you want to offset
methodPayment method: 'paypal', 'usdt', 'blik', 'uah', 'kzt' or 'try'
status2 - processing, 3 - completed, 5 - rejected
searchPhrase that will be looked for
filterProcessing (status 2) or finished (statuses 3, 5)
Response example 200
 { 
"success": true,
"details": "",
"data": {
"total": 981,
"orders": [
{
"id": 670696d284683836c55e766a,
"amount": 1000,
"method": "paypal",
"receiver": "test@test.com",
"comment": "id: 141",
"status": 1,
"reason": "string"
}
]
}
}
Response example 400
 { 
"success": false,
"details": "Invalid method provided",
"data": {}
}
Response example 401
 { 
"success": false,
"details": "You need to log in to access this feature",
"data": {}
}
Response example 404
 { 
"success": false,
"details": "User has not been found",
"data": {}
}
Get prices
GET /orders/prices

Retrieves current tariffs for orders

Responses

Status codeDescription
200User is logged in
401User is not logged in
404User has not been found
Response example 200
 { 
"success": true,
"details": "",
"data": {
"prices": [
{
"method": "paypal",
"base": 0,
"multiplier": 1.01,
"min": 0,
"max": null
}
]
}
}
Response example 401
 { 
"success": false,
"details": "You need to log in to access this feature",
"data": {}
}
Response example 404
 { 
"success": false,
"details": "User has not been found",
"data": {}
}
Get exchange rate
GET /rates/current

Retrieves the latest exchange rate for the requested currency pair

Responses

Status codeDescription
200User is logged in
400Requested pair is not supported
401User is not logged in
404User has not been found

Parameters

PropertyDescription
pairCurrency pair, required. Supported pairs: 'USD_PLN' (BLIK), 'USD_UAH' (UAH), 'USD_KZT' (KZT) and 'USD_TRY' (TRY)

Rate format

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.

Response example 200
 { 
"success": true,
"details": "",
"data": {
"pair": "USD_PLN",
"value": 365,
"createdAt": "2024-08-23T15:05:02.107Z"
}
}
Response example 400
 { 
"success": false,
"details": "Pair USD_EUR is not supported",
"data": {}
}
Response example 401
 { 
"success": false,
"details": "You need to log in to access this feature",
"data": {}
}
Response example 404
 { 
"success": false,
"details": "User has not been found",
"data": {}
}
Get all exchange rates
GET /rates/current/all

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.

Responses

Status codeDescription
200User is logged in
401User is not logged in
404User has not been found
Response example 200
 { 
"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"
}
]
}
Response example 401
 { 
"success": false,
"details": "You need to log in to access this feature",
"data": {}
}
Response example 404
 { 
"success": false,
"details": "User has not been found",
"data": {}
}
Webhook
Webhook request

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).

Example expained

PropertyDescription
methodPayment method, either 'paypal' or 'usdt'
receiverCredentials of the receiving party
commentComment you've sent us when creating an order
statusOne of 3 order statuses. Read more about it below
amountAmount you asked us to send to the receiver
checkoutAmount you paid for this order (including fee)
reasonReason for order rejection at status 5
signVerification signature. Read more about it here

possible statuses

StatusDescription
2Order is being processed
3Order is fulfilled
5Order is rejected (In this case, you will also find a reason behind this in a "reason" field)
Examples
Response example
 { 
"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=="
}
Signature

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:

example
 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')