Crypto Payment API: A Developer’s Integration Guide
CoinGate released a developer-focused guide for integrating its crypto payment API, detailing sandbox testing, order creation, callback verification, and settlement options for merchants.
CoinGate’s guide explains how to integrate its crypto payment API for merchants who need to accept cryptocurrency payments without handling blockchain complexities. The API operates in two separate environments: a live system connected to real blockchains and a sandbox for testing. Developers are advised to build against the sandbox first, as it allows testing without requiring merchant verification. The API returns structured responses, such as a 200 status with order details or a 422 error with reasons for invalid requests, which must be handled programmatically.
The API supports three settlement strategies via the receive_currency field: converting payments to fiat currencies like EUR, USD, or GBP; crediting the merchant with the exact cryptocurrency paid; or retaining the customer’s payment without conversion. After creating an order, merchants redirect customers to a hosted payment page where the customer selects their preferred cryptocurrency and completes the transaction. Alternatively, merchants can use a checkout endpoint to generate a QR code for self-hosted invoices, though this feature requires approval.
Callback verification is critical to ensuring payment authenticity, as the API sends HTTP POST requests to a merchant’s callback_url when an order’s status changes. Merchants must verify the callback by matching the token provided during order creation with the one returned in the callback, while also confirming the amount and currency. The callback serves as the definitive source of truth, as customer actions like closing a browser tab do not affect its delivery.
Beyond basic payments, CoinGate’s API includes additional features such as payouts, billing for recurring invoices, currency conversion, and ledger endpoints for account management. Developers are encouraged to use official libraries for PHP, Ruby, and Node.js, or community wrappers, and to leverage pre-built plugins for platforms like WooCommerce or Magento. Rate limits of 200 requests per minute and 500 orders per hour apply by default, with higher limits available upon request.