βΊοΈExecute Payment External Platform (server-to-server)
Last updated
Last updated
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.
To make the API request, use the following :
POST
https://sandbox.coinbar.io/coinbar/api/v2/pay/gateway/initiate
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Valid response will include the payment string with coin protocol and all other variables needed to execute the transaction in blockchain, the trade pair and the destination coin price used for the conversion
Here's an example of products JSON body parameter :
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"
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...)