βΊοΈExecute Payment External Platform (server-to-server)
This section of the documentation outlines the necessary steps for server-to-server payment initiation using the CoinbarPay API. It details the process of creating a new payment request and receiving a payment string token for transaction processing.
Once the payment request is processed, the CoinbarPay API will return a response. This response includes a payment string token that represents the transaction.
The total amount is calculated by input_coin and the products field, with the current conversion rate for the destination_coin selected.
Create new payment
To make the API request, use the following :
Generate a new payment request token
POST
https://sandbox.coinbar.io/coinbar/api/v2/pay/gateway/initiate
Headers
CBPAY-API-KEY*
String
{{SERVICE_CLIENT_ID
}}
Content-Type*
String
application/json
SIGNATURE*
String
{{SIGNATURE_TOKEN
}}
HMAC SHA-256 body validation
source*
String
String "web"
Request Body
service_client_id*
String
{{SERVICE_CLIENT_ID
}}
payment_request_id*
String
Generated by Your application
input_coin*
String
"EUR"
products*
Array
Products, can be provided products details or just one product with total billing receipt. See the section below for more details
email*
String
Customer email
surname
String
Customer Last Name
name
String
Customer Name
user_id*
String
Generated by Your application
timestamp*
Number
TIMESTAMP
of your request in milliseconds
destination_coin*
String
Destination coin (Available coins, example XDB, BTC, USDT...)
{
"result": "success",
"request_token": "WlpZSkE3d3ZKa2NSTTl0V....",
"payment_id_coinbar": "ca900413-.....",
"payment_total_price": 1.2,
"trade_pair": "BTC/EUR",
"payment_string": "bitcoin:....",
"destination_coin_change": 50000,
"destination_amount": 0.000024
"destination_address" : "address",
"destination_memo" : "memo"
}
Input Products example:
Here's an example of products JSON body parameter :
"products": [
{
"product_name": "Product 1",
"product_price": 1.99,
"product_amount": 1,
"product_id": "id1",
"product_type": "general"
},
{
"product_name": "Product 2",
"product_price": 0.99,
"product_amount": 2,
"product_id": "id2",
"product_type": "general"
}
]
Last updated