{
  "info": {
    "name": "ChainPay API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Public ChainPay (acquiring) API: deposits, status, balance, rates, payouts."
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.chainpay.site"
    },
    {
      "key": "apiKey",
      "value": ""
    },
    {
      "key": "addressId",
      "value": ""
    },
    {
      "key": "walletAddress",
      "value": ""
    },
    {
      "key": "walletAccessToken",
      "value": ""
    },
    {
      "key": "payoutId",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Deposits",
      "item": [
        {
          "name": "Create deposit address (TRC20 USDT)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/deposit-address",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "deposit-address"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ticker\": \"trc20/usdt\",\n  \"callbackUrl\": \"https://your-service.example.com/webhook?token=your-secret\",\n  \"forwardAddress\": \"TYourOwnTronWallet\",\n  \"externalReference\": \"order-123\",\n  \"pending\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Public, get-or-create. Optional x-api-key attributes the address to your cabinet account."
          }
        },
        {
          "name": "Create deposit address (multi-token TRON)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/deposit-address",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "deposit-address"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ticker\": \"trx\",\n  \"multiToken\": true,\n  \"callbackUrl\": \"https://your-service.example.com/webhook?token=your-secret\",\n  \"forwardAddress\": \"TYourOwnTronWallet\",\n  \"externalReference\": \"order-124\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Create deposit address (multi-token BSC)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/deposit-address",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "deposit-address"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ticker\": \"bnb\",\n  \"multiToken\": true,\n  \"callbackUrl\": \"https://your-service.example.com/webhook?token=your-secret\",\n  \"forwardAddress\": \"0xYourOwnBscWallet\",\n  \"externalReference\": \"order-125\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Deposit status",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/deposit-address/{{addressId}}/status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "deposit-address",
                "{{addressId}}",
                "status"
              ]
            }
          }
        },
        {
          "name": "Deposit transactions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/deposit-address/{{addressId}}/transactions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "deposit-address",
                "{{addressId}}",
                "transactions"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Balance",
      "item": [
        {
          "name": "Balance (single address)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/balance/tron/TYourAddress?token=USDT",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "balance",
                "tron",
                "TYourAddress"
              ],
              "query": [
                {
                  "key": "token",
                  "value": "USDT"
                }
              ]
            }
          }
        },
        {
          "name": "Balance (batch)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/balance/eth?wallets=0xAddr1,0xAddr2&token=USDC",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "balance",
                "eth"
              ],
              "query": [
                {
                  "key": "wallets",
                  "value": "0xAddr1,0xAddr2"
                },
                {
                  "key": "token",
                  "value": "USDC"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Rates",
      "item": [
        {
          "name": "All rates",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/rates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "rates"
              ]
            }
          }
        },
        {
          "name": "Currencies",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/rates/currencies",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "rates",
                "currencies"
              ]
            }
          }
        },
        {
          "name": "Pair rate",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/rates/pair/TRX/USDT",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "rates",
                "pair",
                "TRX",
                "USDT"
              ]
            }
          }
        },
        {
          "name": "Convert",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/rates/convert?amount=100&from=USDT&to=TRX",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "rates",
                "convert"
              ],
              "query": [
                {
                  "key": "amount",
                  "value": "100"
                },
                {
                  "key": "from",
                  "value": "USDT"
                },
                {
                  "key": "to",
                  "value": "TRX"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Payouts (x-api-key)",
      "item": [
        {
          "name": "Get or create payout wallet",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/payout/wallet",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "payout",
                "wallet"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"chain\": \"tron\",\n  \"tokenSymbol\": \"USDT\",\n  \"externalReference\": \"site-42\",\n  \"callbackUrl\": \"https://your-service.example.com/payout-webhook?token=your-secret\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Estimate payout",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/payout/estimate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "payout",
                "estimate"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"address\": \"{{walletAddress}}\",\n  \"destination\": \"TDestinationAddress\",\n  \"amount\": \"100.5\",\n  \"walletAccessToken\": \"{{walletAccessToken}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Withdraw",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/payout/withdraw",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "payout",
                "withdraw"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"address\": \"{{walletAddress}}\",\n  \"destination\": \"TDestinationAddress\",\n  \"amount\": \"100.5\",\n  \"invoiceId\": \"withdraw-001\",\n  \"walletAccessToken\": \"{{walletAccessToken}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Payout status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "x-api-key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/payout/{{payoutId}}/status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "payout",
                "{{payoutId}}",
                "status"
              ]
            }
          }
        }
      ]
    }
  ]
}
