### Create Billing Request - JSON Response Example Source: https://developer.coingate.com/reference/create-billing-request This example shows a successful response when creating a billing request. It includes details about the payment, received currency, and amounts. ```json { "id": 1, "order_id": "order_123", "created_at": "2023-01-01T12:00:00Z", "expires_at": "2023-01-03T12:00:00Z", "status": "new", "price_amount": "20.0", "receive_amount": "19.5", "pay_amount": "20.0", "currency": { "id": 1, "title": "US Dollar", "kind": "fiat", "symbol": "USD" }, "receive_currency": { "id": 2, "title": "Euro", "kind": "fiat", "symbol": "EUR" }, "pay_currency": { "id": 1, "title": "US Dollar", "kind": "fiat", "symbol": "USD" }, "pay_currency_rate": "1.0", "payment_url": "https://pay.coingate.com/", "billing_request_url": "" } ``` -------------------------------- ### GET /websites/developer_coingate_reference Source: https://developer.coingate.com/reference/cancel-conversion This section details the structure and response of a GET request to retrieve developer reference information. It includes success and error response examples. ```APIDOC ## GET /websites/developer_coingate_reference ### Description Retrieves detailed information about a specific developer reference, likely a payment or transaction. This endpoint provides comprehensive data including amounts, status, currency details, and associated fees. ### Method GET ### Endpoint /websites/developer_coingate_reference ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **conversion** (object) - Contains details about the conversion, including amount and currency information. - **fees** (object) - Contains details about conversion fees. - **created_at** (string) - Timestamp when the record was created. - **expires_at** (string) - Timestamp when the record expires. #### Response Example ```json { "conversion": { "amount": "1468.8", "status": "active", "currency": { "id": 2, "title": "Euro", "kind": "fiat", "symbol": "EUR", "enabled": true, "disabled_message": null } }, "fees": { "conversion_fee": { "amount": "0.00001", "currency": { "id": 1, "title": "Bitcoin", "kind": "crypto", "symbol": "BTC", "enabled": true, "disabled_message": null } } }, "created_at": "2025-05-29T08:41:19.159Z", "expires_at": "2025-05-29T08:42:24.149Z" } ``` #### Error Response (404) - **message** (string) - Error message indicating the resource was not found. - **reason** (string) - Specific reason for the error. #### Error Response Example (404) ```json { "message": "Ledger conversion not found", "reason": "LedgerConversionNotFound" } ``` #### Error Response (422) - **message** (string) - Error message indicating invalid input. - **reason** (string) - Specific reason for the error. - **errors** (array) - List of specific validation errors. #### Error Response Example (422) ```json { "message": "Ledger Conversion is not valid", "reason": "LedgerConversionIsNotValid", "errors": [ "Conversion can only be canceled when in 'pending' state. Current state: completed." ] } ``` ``` -------------------------------- ### Example Refund Callback JSON Source: https://developer.coingate.com/reference/refund-callback This is an example of the JSON payload received by the merchant's callback URL when a refund is processed or its status changes. It includes all relevant details about the refund transaction. ```json { "id": 123, "order_id": 124, "status": "completed", "request_amount": "123.0", "request_currency": { "id": 2, "symbol": "EUR" }, "address": "mvKFTr6M8NtKrD659qBCpT9hfM1LTwnQV3", "additional_address_field": null, "refund_amount": "0.00012345", "refund_currency": { "id": 1, "symbol": "BTC", "platform": { "id": 6, "title": "Bitcoin" } }, "email": "test@example.com", "reason": "Callbacks Testing Reason", "ledger_account": { "id": "01HBDE32A9FKNJT5S8MYFFYY6JJ", "currency": { "id": 1, "symbol": "BTC" } } } ``` -------------------------------- ### GET /websites/developer_coingate_reference Source: https://developer.coingate.com/reference/get-refund This endpoint retrieves reference documentation for the CoinGate API. ```APIDOC ## GET /websites/developer_coingate_reference ### Description Retrieves reference documentation for the CoinGate API, including details about data structures and potential responses. ### Method GET ### Endpoint /websites/developer_coingate_reference ### Parameters #### Query Parameters None #### Path Parameters None ### Request Example ``` GET /websites/developer_coingate_reference ``` ### Response #### Success Response (200) - **body** (object) - Contains the API reference documentation. #### Response Example ```json { "id": { "type": "integer", "example": 1, "default": 0 }, "title": { "type": "string", "example": "Ethereum" }, "transactions": { "type": "array" }, "ledger_account": { "type": "object", "properties": { "id": { "type": "string", "example": "01G27GBKX653FKV2S0SCXXDBES" }, "currency": { "type": "object", "properties": { "id": { "type": "integer", "example": 97, "default": 0 }, "title": { "type": "string", "example": "Tether" }, "symbol": { "type": "string", "example": "USDT" } } } } } } ``` #### Error Response (404) - **message** (string) - A message indicating the error. - **reason** (string) - A specific reason for the error. ```json { "message": "Order not found", "reason": "OrderNotFound" } ``` ``` -------------------------------- ### Create Order API Source: https://developer.coingate.com/reference/api-overview Initiates a new payment order with CoinGate. This is the first step in accepting a cryptocurrency payment. ```APIDOC ## POST /v2/orders ### Description Creates a new payment order. This endpoint is used to initiate a transaction for a customer to pay with cryptocurrency. ### Method POST ### Endpoint /v2/orders ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **order_id** (string) - Required - Your unique order identifier. - **price** (string) - Required - The amount that must be paid. - **currency** (string) - Required - The currency of the amount that must be paid (e.g., EUR, USD, GBP). - **receive_currency** (string) - Optional - The currency you want to receive. If not specified, it will be the same as the `currency` parameter. - **callback_url** (string) - Optional - URL to receive payment status updates. If not set, the default callback URL from your CoinGate profile will be used. - **cancel_url** (string) - Optional - URL to redirect the customer to if the payment is canceled. - **success_url** (string) - Optional - URL to redirect the customer to after a successful payment. - **title** (string) - Optional - The title of the order. - **description** (string) - Optional - The description of the order. ### Request Example ```json { "order_id": "YOUR-ORDER-ID-123", "price": "100.50", "currency": "EUR", "receive_currency": "EUR", "callback_url": "https://example.com/webhooks/coingate", "cancel_url": "https://example.com/checkout/cancel", "success_url": "https://example.com/checkout/success", "title": "Example Product", "description": "Order for product XYZ" } ``` ### Response #### Success Response (200) - **status** (string) - The status of the order. - **order_id** (string) - Your unique order identifier. - **created_at** (string) - The date and time when the order was created. - **expires_at** (string) - The date and time when the order expires. - **payment_url** (string) - The URL where the customer can complete the payment. - **price** (string) - The amount that must be paid. - **currency** (string) - The currency of the amount that must be paid. - **receive_currency** (string) - The currency you will receive. - **estimated_amount** (string) - The estimated amount in the payment currency. - **estimated_rate** (string) - The estimated exchange rate. - **conversion_rate** (string) - The actual conversion rate used. - **pay_amount** (string) - The exact amount to be paid in the payment currency. - **pay_currency** (string) - The payment currency. #### Response Example ```json { "status": "new", "order_id": "YOUR-ORDER-ID-123", "created_at": "2023-10-27T10:00:00Z", "expires_at": "2023-10-27T11:00:00Z", "payment_url": "https://coingate.com/pay/YOUR-PAYMENT-ID", "price": "100.50", "currency": "EUR", "receive_currency": "EUR", "estimated_amount": "0.003 BTC", "estimated_rate": "33500.00", "conversion_rate": "33500.00", "pay_amount": "0.003", "pay_currency": "BTC" } ``` #### Error Response (422 Unprocessable Entity) - **message** (string) - A message explaining why the order could not be created. ``` -------------------------------- ### Create Order using cURL Source: https://developer.coingate.com/reference/create-order This snippet demonstrates how to create a new order using the cURL command-line tool. It includes all necessary parameters for defining the order details, pricing, currency, callback URLs, and shopper information. Ensure you replace 'YOU_API_TOKEN' with your actual API token. ```curl ## Create Order curl -X "POST" "http://localhost:3000/api/v2/orders" \ -H 'Authorization: Token YOU_API_TOKEN' \ -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \ --data-urlencode "title=My Store Order #111" \ --data-urlencode "price_amount=1369" \ --data-urlencode "price_currency=EUR" \ --data-urlencode "receive_currency=USDC" \ --data-urlencode "callback_url=https://example.com/test" \ --data-urlencode "success_url=http://example.com/success" \ --data-urlencode "cancel_url=http://example.com/cancel" \ --data-urlencode "order_id=111" \ --data-urlencode "description=iPhone 16 Pro Max (256 GB)" \ --data-urlencode "shopper[type]=personal" \ --data-urlencode "shopper[ip_address]=127.0.0.1" \ --data-urlencode "shopper[email]=test@example.com" \ --data-urlencode "shopper[first_name]=Joe" \ --data-urlencode "shopper[last_name]=Doe" \ --data-urlencode "shopper[date_of_birth]=1987-02-12" ``` -------------------------------- ### Get Withdrawal Endpoint Definition (OpenAPI) Source: https://developer.coingate.com/reference/get-withdrawal Defines the GET request for the '/withdrawals/{id}' endpoint. It specifies the required 'id' parameter and outlines the structure of a successful (200) response, including example data for a completed withdrawal. ```json { "openapi": "3.1.0", "info": { "title": "api-settings", "version": "2" }, "servers": [ { "url": "https://api.coingate.com/api/v2" } ], "security": [ {} ], "paths": { "/withdrawals/{id}": { "get": { "summary": "Get Withdrawal", "description": "This is private API endpoint and requires [authentication](https://developer.coingate.com/docs/api-authentication).", "operationId": "get-withdrawal", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "integer", "format": "int32" }, "required": true } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\n \"id\": 5,\n \"status\": \"completed\",\n \"amount\": \"1.112617\",\n \"created_at\": \"2022-06-23T09:53:39+00:00\",\n \"completed_at\": \"2022-06-23T09:54:51+00:00\",\n \"currency\": {\n \"id\": 1,\n \"title\": \"Bitcoin\",\n \"symbol\": \"BTC\"\n },\n \"payout_setting\": {\n \"id\": 68,\n \"title\": \"My Test Bitcoin Wallet\",\n \"address\": \"2N9HGaH3ExTU9tarhdrnxmH9PgBv2JhG5sT\",\n \"currency\": {\n \"id\": 1,\n \"title\": \"Bitcoin\",\n \"symbol\": \"BTC\"\n },\n \"platform\": {\n \"id\": 6,\n \"title\": \"Bitcoin\",\n \"id_name\": \"bitcoin\"\n }\n }\n}" } }, "schema": { "type": "object", "properties": { "id": { "type": "integer", "example": 5, "default": 0 }, "status": { "type": "string", "example": "completed" }, "amount": { "type": "string", "example": "1.112617" }, "created_at": { "type": "string", "example": "2022-06-23T09:53:39+00:00" }, "completed_at": { "type": "string", "example": "2022-06-23T09:54:51+00:00" }, "currency": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "default": 0 }, "title": { "type": "string", "example": "Bitcoin" }, "symbol": { "type": "string", "example": "BTC" } } }, "payout_setting": { "type": "object", "properties": { "id": { "type": "integer", "example": 68, "default": 0 }, "title": { "type": "string", "example": "My Test Bitcoin Wallet" }, "address": { "type": "string", "example": "2N9HGaH3ExTU9tarhdrnxmH9PgBv2JhG5sT" }, "currency": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "default": 0 }, "title": { "type": "string", "example": "Bitcoin" }, "symbol": { "type": "string", "example": "BTC" } } }, "platform": { "type": "object", "properties": { "id": { "type": "integer", "example": 6, "default": 0 }, "title": { "type": "string", "example": "Bitcoin" } } } } } } } } } } } } } ] } ``` -------------------------------- ### GET /websites/developer_coingate_reference Source: https://developer.coingate.com/reference/get-order-transactions This endpoint retrieves reference information related to the CoinGate developer API, potentially including data schemas and examples. ```APIDOC ## GET /websites/developer_coingate_reference ### Description Retrieves reference data for the CoinGate developer API. This may include details about data structures, types, and examples used within the API. ### Method GET ### Endpoint /websites/developer_coingate_reference ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **symbol** (string) - The symbol of the cryptocurrency. - **platform** (object) - Information about the platform the cryptocurrency is on. - **id** (integer) - The ID of the platform. - **title** (string) - The name of the platform. #### Response Example ```json { "symbol": { "type": "string", "example": "BTC" }, "platform": { "type": "object", "properties": { "id": { "type": "integer", "example": 6, "default": 0 }, "title": { "type": "string", "example": "Bitcoin" } } } } ``` #### Error Response (400) - Description: Indicates a bad request. - Content: application/json - Schema: An empty object. ``` -------------------------------- ### GET /websites/developer_coingate_reference/currencies Source: https://developer.coingate.com/reference/platforms Retrieves a list of supported cryptocurrencies with their details, including ID, title, symbol, enabled status, and minimum refundable amount if applicable. ```APIDOC ## GET /websites/developer_coingate_reference/currencies ### Description Retrieves a list of supported cryptocurrencies and their associated details. ### Method GET ### Endpoint /websites/developer_coingate_reference/currencies ### Parameters This endpoint does not accept any path or query parameters. ### Request Body This endpoint does not accept a request body. ### Response #### Success Response (200) - **currencies** (array) - An array of cryptocurrency objects. - **id** (integer) - The unique identifier for the cryptocurrency. - **title** (string) - The name of the cryptocurrency. - **symbol** (string) - The trading symbol for the cryptocurrency. - **enabled** (boolean) - Indicates if the cryptocurrency is currently enabled for transactions. - **void** (object) - Optional. Contains details about the voiding of transactions. - **min_refundable_amount** (string) - The minimum amount that can be refunded. #### Response Example ```json { "currencies": [ { "id": 104, "title": "carVertical", "symbol": "CV", "enabled": true, "void": { "min_refundable_amount": "2500.0" } }, { "id": 113, "title": "USDC", "symbol": "USDC", "enabled": true, "void": { "min_refundable_amount": "5.989" } }, { "id": 115, "title": "Uniswap", "symbol": "UNI", "enabled": true } ] } ``` ``` -------------------------------- ### Get Outgoing Fees - OpenAPI Definition Source: https://developer.coingate.com/reference/get-outgoing_fees This snippet defines the OpenAPI 3.1.0 specification for the CoinGate API v2's 'Get Outgoing Fees' endpoint. It outlines the request parameters (currency_id, applied_for, crypto_platform_id) and the structure of the response, including examples of single and multiple fee results. This definition is crucial for generating client libraries and understanding API interactions. ```json { "openapi": "3.1.0", "info": { "title": "v2", "version": "2" }, "servers": [ { "url": "https://api.coingate.com/api/v2" } ], "security": [ {} ], "paths": { "/outgoing_fees?currency_id={currency_id}&crypto_platform_id={crypto_platform_id}&applied_for={applied_for}": { "get": { "summary": "Get Outgoing Fees", "description": "Get Outgoing Fees. Outgoing fees apply to all outgoing transactions, such as withdrawals, trader orders, and both refund requests and merchant refunds. CoinGate API provides various ways to retrieve these fees based on currency, crypto platform, or specific types of payments. You can use endpoints like api/v2/outgoing_fees to get an array of all enabled fees or filter it further with other parameters to get more specific information.", "operationId": "get-outgoing_fees", "parameters": [ { "name": "currency_id", "in": "query", "description": "ID for crypto platform that belongs to currency. Examples: 1, 2, 24, 123, [etc](https://developer.coingate.com/reference/currencies).", "schema": { "type": "integer", "format": "int32" } }, { "name": "applied_for", "in": "query", "description": "String of a transaction type. Examples: withdrawal, trader_order, void_transaction, merchant_refund", "schema": { "type": "string" } }, { "name": "crypto_platform_id", "in": "query", "description": "ID for crypto platform that belongs to currency. Examples: 1, 2, 24, 123, [etc](https://developer.coingate.com/reference/platforms).", "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "page": { "type": "integer", "description": "Current page number", "default": 1, "format": "int32" }, "per_page": { "type": "string", "description": "Number of subscribers per page (max - 100)", "default": "100" } } } } } }, "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\n \"current_page\": 1,\n \"per_page\": 100,\n \"total_outgoing_fees\": 2,\n \"total_pages\": 0,\n \"outgoing_fees\": [\n {\n \"amount_eur\": \"3.0\",\n \"applied_for\": [\n\t\t\t\t\"withdrawal\",\n\t\t\t\t\"void_transaction\"\n\t\t\t], \"currency\": {\n \"id\": 50,\n \"title\": \"Ethereum\",\n \"symbol\": \"ETH\"\n },\n \"crypto_platform\": {\n \"id\": 1,\n \"title\": \"Ethereum\"\n }\n },\n {\n \"amount_eur\": \"5.0\",\n \"applied_for\": [\n\t\t\t\t\"withdrawal\",\n\t\t\t],\n \"currency\": {\n \"id\": 61,\n \"title\": \"Dai\",\n \"symbol\": \"DAI\"\n },\n \"crypto_platform\": {\n \"id\": 1,\n \"title\": \"Ethereum\"\n }\n }\n ]\n}\n" }, "Result single Outgoing fee": { "value": "{\n \"amount_eur\": \"3.0\",\n \"applied_for\": [\n \"withdrawal\",\n \"void_transaction\"\n ],\n \"currency\": {\n \"id\": 50,\n \"title\": \"Ethereum\",\n \"symbol\": \"ETH\"\n },\n \"crypto_platform\": {\n \"id\": 1,\n \"title\": \"Ethereum\"\n }\n}\n" } }, "schema": { "type": "object", "properties": { "amount_eur": { "type": "string", "example": "3.0" }, "applied_for": { "type": "array", "items": { "type": "string", "example": "withdrawal" } }, "currency": { "type": "object", "properties": { "id": { "type": "integer", "example": 50, "default": 0 }, "title": { "type": "string", "example": "Ethereum" } } }, "crypto_platform": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "default": 0 }, "title": { "type": "string", "example": "Ethereum" } } } } } } } } } } } } } ``` -------------------------------- ### List All Supported Conversion Rates Source: https://developer.coingate.com/reference/conversion-rates Retrieve a list of all supported currency conversion pairs and their current rates. ```APIDOC ## GET /api/v2/ledger/conversions/rates ### Description Retrieve a list of all supported currency conversion pairs and their current rates available on CoinGate. ### Method GET ### Endpoint /api/v2/ledger/conversions/rates ### Parameters #### Query Parameters None ### Request Example None ### Response #### Success Response (200) - **data** (object) - An object containing supported conversion pairs and rates. - **{base_currency}** (object) - An object where keys are quote currencies and values are their conversion rates. - **{quote_currency}** (number) - The conversion rate from base_currency to quote_currency. #### Response Example ```json { "data": { "BTC": { "EUR": 15000.50, "USD": 16000.75 }, "ETH": { "EUR": 1000.25, "USD": 1100.50 } } } ``` ``` -------------------------------- ### List Orders - OpenAPI Definition Source: https://developer.coingate.com/reference/list-orders This snippet defines the 'list-orders' operation within the CoinGate API. It specifies the GET request for the '/orders' endpoint, detailing available query parameters such as pagination, sorting, creation/payment dates, and order status. The response structure for a 200 OK status is also outlined, including an example of the expected JSON output. ```json { "openapi": "3.1.0", "info": { "title": "v2", "version": "2" }, "servers": [ { "url": "https://api.coingate.com/api/v2" } ], "security": [ {} ], "paths": { "/orders": { "get": { "summary": "List Orders", "description": "Retrieving information of all placed orders.", "operationId": "list-orders", "parameters": [ { "name": "per_page", "in": "query", "description": "How many orders per page. Max: 100. Default: 100.", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "page", "in": "query", "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "sort", "in": "query", "description": "Sort orders by field. Available sort options: created_at_asc, created_at_desc. Default: created_at_desc.", "schema": { "type": "string", "default": "created_at_desc" } }, { "name": "created_at[from]", "in": "query", "description": "Optional. Where order creation time is equal or greater. Example: 2018-09-01", "schema": { "type": "string" } }, { "name": "created_at[to]", "in": "query", "description": "Optional. Where order creation time is equal or less. Example: 2018-09-30", "schema": { "type": "string" } }, { "name": "status", "in": "query", "description": "Filter by order status. [Order statuses](https://developer.coingate.com/reference/order-statuses)", "schema": { "type": "string" } }, { "name": "paid_at[from]", "in": "query", "description": "Optional. Where order paid at time is equal or greater. Example: 2018-09-01", "schema": { "type": "string" } }, { "name": "paid_at[to]", "in": "query", "description": "Optional. Where order creation time is equal or less. Example: 2018-09-30", "schema": { "type": "string" } } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\n \"current_page\": 1,\n \"per_page\": 2,\n \"total_orders\": 455,\n \"total_pages\": 228,\n \"orders\": [\n {\n \"id\": 537,\n \"status\": \"canceled\",\n \"title\": \"test\",\n \"do_not_convert\": false,\n \"orderable_type\": \"Button\",\n \"orderable_id\": 2,\n \"price_currency\": \"EUR\",\n \"price_amount\": \"10.0\",\n \"lightning_network\": false,\n \"receive_currency\": \"\",\n \"receive_amount\": \"0\",\n \"created_at\": \"2022-12-09T13:53:43+00:00\",\n \"order_id\": \"\",\n \"payment_url\": \"http://localhost:3000/invoice/e386db94-d648-4b4b-9b19-1f2825f7eb32\",\n \"underpaid_amount\": \"0\",\n \"overpaid_amount\": \"0\",\n \"is_refundable\": false,\n \"refunds\": [],\n \"voids\": [],\n \"fees\": [],\n\t\t\t\"blockchain_transactions\": []\n },\n {\n \"id\": 536,\n \"status\": \"canceled\",\n \"title\": \"test\",\n \"do_not_convert\": false,\n \"orderable_type\": \"Button\",\n \"orderable_id\": 2,\n \"price_currency\": \"EUR\",\n \"price_amount\": \"20.0\",\n \"pay_currency\": \"BTC\",\n \"pay_amount\": \"0.0009822\",\n \"lightning_network\": false,\n \"receive_currency\": \"USDT\",\n \"receive_amount\": \"0\",\n \"created_at\": \"2022-12-07T11:27:11+00:00\",\n \"expire_at\": \"2022-12-07T11:47:18+00:00\",\n \"payment_address\": \"00e5602a-3380-4437-b1df-483ff84c47de\",\n \"order_id\": \"\",\n \"payment_url\": \"http://localhost:3000/invoice/725ee4b4-4a75-45a5-8f3d-c8012546cda9\",\n \"underpaid_amount\": \"0.0009822\",\n \"overpaid_amount\": \"0\",\n \"is_refundable\": false,\n \"conversion_rate\": \"20566.0\",\n \"refunds\": [],\n \"voids\": [],\n \"fees\": [],\n \"blockchain_transactions\": []\n }\n ]\n}" } }, "schema": { "type": "object", "properties": { "current_page": { "type": "integer", "example": 1 } } } } } } } } } } } ``` -------------------------------- ### Cryptocurrency and Platform Data Structure Example Source: https://developer.coingate.com/reference/refund-supported-currencies This JSON snippet illustrates the structure for representing cryptocurrencies and their associated platforms. It includes details like ID, title, symbol, enabled status, and a list of supported platforms with their respective IDs and names. This structure is useful for fetching and displaying available payment options. ```json [ { "id":113, "title":"USDC", "kind":"crypto", "symbol":"USDC", "enabled":true, "disabled_message":null, "platforms":[ { "id":1, "id_name":"ethereum", "title":"Ethereum", "enabled":true }, { "id":3, "id_name":"binance_smart_chain", "title":"Binance Smart Chain", "enabled":true }, { "id":4, "id_name":"tron", "title":"Tron", "enabled":true }, { "id":20, "id_name":"solana", "title":"Solana", "enabled":true }, { "id":39, "id_name":"polygon", "title":"Polygon", "enabled":true }, { "id":40, "id_name":"arbitrum", "title":"Arbitrum", "enabled":true } ] }, { "id":117, "title":"Solana", "kind":"crypto", "symbol":"SOL", "enabled":true, "disabled_message":null, "platforms":[ { "id":20, "id_name":"solana", "title":"Solana", "enabled":true } ] }, { "id":165, "title":"SHIBA INU", "kind":"crypto", "symbol":"SHIB", "enabled":true, "disabled_message":null, "platforms":[ { "id":1, "id_name":"ethereum", "title":"Ethereum", "enabled":true }, { "id":3, "id_name":"binance_smart_chain", "title":"Binance Smart Chain", "enabled":true }, { "id":39, "id_name":"polygon", "title":"Polygon", "enabled":true } ] } ] ``` -------------------------------- ### GET /invoice/{uuid}/request-void Source: https://developer.coingate.com/reference/get-void-request Retrieves a void request for a specific order using its UUID. This is a public endpoint and does not require authentication. ```APIDOC ## GET /invoice/{uuid}/request-void ### Description Retrieves a void request for a specific order. This endpoint is public, authentication is not required. ### Method GET ### Endpoint /invoice/{uuid}/request-void ### Parameters #### Path Parameters - **uuid** (string) - Required - The UUID of the invoice for which to retrieve the void request. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **id** (integer) - The ID of the void request. - **status** (string) - The status of the void request (e.g., "pending"). - **address** (string) - The payment address associated with the void request. - **comment** (string|null) - Any comments associated with the void request. - **additional_field** (any|null) - Additional fields, if any. - **accept_payment** (boolean) - Indicates if payment is accepted for this request. - **created_at** (string) - The timestamp when the void request was created. - **currency** (object) - Information about the currency. - **id** (integer) - The ID of the currency. - **title** (string) - The name of the currency (e.g., "Bitcoin"). - **symbol** (string) - The symbol of the currency (e.g., "BTC"). - **platform** (object) - Information about the currency's platform. - **id** (integer) - The ID of the platform. - **title** (string) - The name of the platform (e.g., "Bitcoin"). #### Response Example (Success) ```json { "id": 9, "status": "pending", "address": "36c3KtqTpnhCRXp5179HR6hpKxP2XDahKF", "comment": null, "additional_field": null, "accept_payment": false, "created_at": "2022-12-06T10:58:21+00:00", "currency": { "id": 1, "title": "Bitcoin", "symbol": "BTC", "platform": { "id": 5, "title": "Bitcoin" } } } ``` #### Error Response (404) - **message** (string) - A message describing the error. - **reason** (string) - The reason for the error (e.g., "VoidRequestNotFound"). #### Response Example (Error) ```json { "message": "Void Request not found", "reason": "VoidRequestNotFound" } ``` ``` -------------------------------- ### Create Conversion API Source: https://developer.coingate.com/reference/conversion-overview Initiates a currency conversion process. You specify the source ledger account, the target currency, and the amount to convert. The API calculates the deduction and provides actions required for confirmation or cancellation. ```APIDOC ## POST /conversions ### Description Initiates a currency conversion from a specified ledger account balance to a target currency. ### Method POST ### Endpoint /conversions ### Parameters #### Request Body - **ledger_account_id** (string) - Required - The ID of the ledger account balance to convert from. - **quote_currency_id** (string) - Required - The ID of the currency to convert to. - **base_amount** (number) - Required - The amount of the ledger balance to convert. ### Request Example ```json { "ledger_account_id": "eur-account-id", "quote_currency_id": "btc-currency-id", "base_amount": 100 } ``` ### Response #### Success Response (200) - **conversion_id** (string) - The unique identifier for the conversion. - **actions_required** (array) - An array of actions that need to be performed to complete or cancel the conversion (e.g., "confirm", "cancel"). #### Response Example ```json { "conversion_id": "conv-12345", "actions_required": [ "confirm", "cancel" ] } ``` ``` -------------------------------- ### Create Billing Request - 422 Error Response Example Source: https://developer.coingate.com/reference/create-billing-request This example illustrates a validation error response (HTTP 422) when a billing request is not valid. It details the message, reason, and specific errors. ```json { "message": "Billing request is not valid", "reason": "BillingRequestIsNotValid", "errors": [ "Amount must be greater than 0" ] } ``` -------------------------------- ### Initiate Order Checkout (cURL) Source: https://developer.coingate.com/reference/checkout This snippet demonstrates how to initiate a checkout for an order using a cURL request. It requires the order ID, authorization token, payment currency, and platform ID. The response will contain details about the payment, including a payment URL. ```curl curl -X "POST" "https://api.coingate.com/v2/orders/10568600/checkout" \ -H 'Authorization: Token 1234' \ -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \ --data-urlencode "pay_currency=ETH" \ --data-urlencode "platform_id=2" ``` -------------------------------- ### Get Exchange Rate Source: https://developer.coingate.com/reference/get-rate Retrieves the current exchange rate between any two specified currencies, whether fiat or crypto. This is a public endpoint and does not require authentication. ```APIDOC ## GET /rates/merchant/{from}/{to} ### Description Retrieves the current exchange rate between any two specified currencies (fiat or crypto). Authentication is not required. Supported currencies can be found here: [https://coingate.com/currencies](https://coingate.com/currencies) ### Method GET ### Endpoint https://api.coingate.com/api/v2/rates/merchant/{from}/{to} ### Parameters #### Path Parameters - **from** (string) - Required - ISO Symbol of the source currency. Example: EUR, USD, BTC, ETH. - **to** (string) - Required - ISO Symbol of the target currency. Example: EUR, USD, BTC, ETH. ### Request Example (No request body for this endpoint) ### Response #### Success Response (200) - **(number)** - The exchange rate between the specified currencies. Example: 7469.5 #### Response Example ```text 7469.5 ``` ```