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
  • Opening the Payment Gateway
  • Post-Payment Actions
  • (1) Backend Callback
  • (2) Frontend Redirect User
  1. API Web Integration
  2. API Documentation

Payment Gateway

The CoinbarPay Payment Gateway is a secure web interface that allows your customers to select their preferred cryptocurrency and complete the payment process.

By following the steps in this topic, you will learn how to open the CoinbarPay Payment Gateway using the appropriate URL and understand what happens once the payment is executed, canceled, or times out.

Opening the Payment Gateway

To open the CoinbarPay Payment Gateway for a customer, you will need to construct a URL with the following format:

https://sandbox.coinbar.io/paymentgateway/pay?requestToken={{REQUEST_TOKEN}}&serviceClientId={{SERVICE_CLIENT_ID}}&timestamp={{current_timestamp}}

Replace the following placeholders with actual values for your specific transaction:

  • REQUEST_TOKEN (requestToken): The payment request token received from the CoinbarPay API upon initiating a new payment request.

  • SERVICE_CLIENT_ID (serviceClientId): Your account's authentication key (Service Client ID).

  • timestamp (timestamp): The current timestamp in milliseconds.

When directing the customer to this URL, they will be presented with the CoinbarPay Payment Gateway, where they can choose their preferred cryptocurrency to complete the payment.

Post-Payment Actions

Once the payment is either executed, canceled, or times out, CoinbarPay will perform the following actions:

(1) Backend Callback

Warning

Your backend system should handle this request by updating the relevant database records, triggering necessary actions, and maintaining a log for future reference.

The server will send a secure HTTP request to your configured BE_CALLBACK_URL to update the payment status on your shop.

Here is an example of response sent by Coinbar Payment Gateway to your web shop :

SUCCESS Response :

{
    "result" : "success",
    "payment_id_coinbar": "id_48483",
    "payment_request_id_client" : "id_48485354",
    "service_client_id" : "SERVICE_CLIENT_ID",
    "customer" : {
        "email" : "customer.email",
    },
    "products" : [Array of products..],
    "input_coin" : "EUR",
    "status" : "SUCCESS",
    "status_descr" : "Payment Executed",
    "payment_detail" : {
        "transaction_id": "transaction_id",
        "timestamp"  : "timestamp",
        "total_price" :  "total_price",
    },
    "creation_time" : 11111111111,
    "update_time" : 1111111111,
}

FAILED/CANCELED Response :

{
    "result" : "success",
    "payment_id_coinbar": "id_48483",
    "payment_request_id_client" : "id_48485354",
    "service_client_id" : "SERVICE_CLIENT_ID",
    "customer" : {
        "email" : "customer.email",
    },
    "products" : [Array of products..],
    "input_coin" : "EUR",
    "status" : "FAILED",
    "status_descr" : "Payment timeout",
    "payment_detail" : {
        "transaction_id": "transaction_id",
        "timestamp"  : "timestamp",
        "total_price" :  "total_price",
    },
    "creation_time" : 11111111111,
    "update_time" : 1111111111,
}

As for incoming calls, the Payment Gateway will send its callback with SERVICE_CLIENT_ID and SIGNATURE_TOKEN to let your application manage securely the incoming calls.

(2) Frontend Redirect User

CoinbarPay will redirect the customer to the configured WEB_CALLBACK_URL as set in the CoinbarPay Dashboard, in order to complete the payment flow.

PreviousRequest New Payment (web page)NextGet Conversion Quotes (server-to-server)

Last updated 1 year ago

πŸ”΅
⏺️