CoinbarPay Official Docs
  • Introduction
    • πŸ”΅Coinbar Pay
    • πŸ”΅Key Features
    • πŸ”΅Target Audience
    • πŸ”΅Security and Compliance
  • Getting Started
    • πŸ”΅Summary
  • Service Activation
    • πŸ”΅Create Account
    • πŸ”΅Account Verification
    • πŸ”΅Activate Service
  • Point of Sale
    • πŸ”΅App Installation
    • πŸ”΅App Activation
    • πŸ”΅User Interface
    • πŸ”΅Accepting Payments
    • πŸ”΅Transactions & Reports
  • E-Commerce Plugins
    • πŸ”΅Introduction
    • πŸ”΅Downloads - Plugin
      • ⏺️Wordpress/WooCommerce
      • ⏺️Magento
      • ⏺️Request New
    • πŸ”΅Setup and Configuration
    • πŸ”΅Try your service
  • API Web Integration
    • πŸ”΅Introduction
    • πŸ”΅Service Configuration
    • πŸ”΅API Keys Management
    • πŸ”΅Payment Flow
    • πŸ”΅Payment Statuses
    • πŸ”΅API Documentation
      • ⏺️Authentication
      • ⏺️Request New Payment (web page)
      • ⏺️Payment Gateway
      • ⏺️Get Conversion Quotes (server-to-server)
      • ⏺️Execute Payment External Platform (server-to-server)
      • ⏺️Get Payment Status (server-to-server)
      • ⏺️Reports
    • πŸ”΅Sandbox Enviroment
  • Dashboard Platform
    • πŸ”΅Overview
    • πŸ”΅Manage...
      • ⏺️Payments
      • ⏺️Settlements
    • πŸ”΅Refunds & Assistance
    • πŸ”΅Reports & Exports
Powered by GitBook
On this page
  • Create new payment
  • Generate a new payment request token
  • Input Products example:
  1. API Web Integration
  2. API Documentation

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

Name
Type
Description

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

Name
Type
Description

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"
}

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

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"
    }
]

PreviousGet Conversion Quotes (server-to-server)NextGet Payment Status (server-to-server)

Last updated 1 year ago

πŸ”΅
⏺️