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.

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": true,
"details": "string",
"data": {}
}
Response example 404
 { 
"success": true,
"details": "string",
"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": true,
"details": "string",
"data": {}
}
Response example 404
 { 
"success": true,
"details": "string",
"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

Amount in PLN for Blik

If you want to be certain about an amount in PLN that will be sent to your BLIK account, please provide amountQuote in your request body. Otherwise, leave it as null.

Examples
request Body example
{
  "orders": [
    {
      "amount": 1000,
      "method": "paypal" | "usdt",
      "receiver": "test@test.com",
      "comment": "id: 141"
    }
  ]
}
{
  "orders": [
    {
      "amount": 1000,
      "method": "blik",
      "receiver": {
        "name": "John Doe",
        "phoneNumber": "+48551671915",
        "accountNumber": "PL57109024028593174953674724",
        "amountQuote": 45920 | 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": true,
"details": "string",
"data": {}
}
Response example 404
 { 
"success": true,
"details": "string",
"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, either 'paypal' or 'usdt'
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": true,
"details": "string",
"data": {}
}
Response example 401
 { 
"success": true,
"details": "string",
"data": {}
}
Response example 404
 { 
"success": true,
"details": "string",
"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": true,
"details": "string",
"data": {}
}
Response example 404
 { 
"success": true,
"details": "string",
"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')