Payments API

Create payments, check payment status, and manage invoices. Use these endpoints to initiate card, crypto, Setype crypto, or SBP transactions, monitor their progress, download invoices, and retrieve the list of supported cryptocurrencies.

Payment Operations

GET /v1/payments Requires Auth

List Payments

List Payments

Retrieve all payments for the authenticated account. Returns payment history including invoice IDs, amounts, statuses, and payment gateways.

curl https://api.proxyhat.com/v1/payments \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Accept: application/json"
import requests

response = requests.get(
    "https://api.proxyhat.com/v1/payments",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Accept": "application/json",
    },
)

data = response.json()
for payment in data["data"]:
    print(f"{payment["invoice_id"]}: ${payment["amount_usd"]} ({payment["status"]})")
const response = await fetch("https://api.proxyhat.com/v1/payments", {
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Accept": "application/json",
  },
});

const { data: payments } = await response.json();
payments.forEach(p => console.log(`${p.invoice_id}: $${p.amount_usd} (${p.status})`));
req, _ := http.NewRequest("GET", "https://api.proxyhat.com/v1/payments", nil)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["data"])
Response 200
{
  "success": true,
  "data": [
    {
      "id": "uuid",
      "invoice_id": "INV-ABC123",
      "created_at": "2026-01-20T10:00:00Z",
      "amount_usd": 50.00,
      "status": "completed",
      "gate": "crypto"
    }
  ]
}
POST /v1/payments Requires Auth

Create Payment

Create Payment

Create a new payment for a plan purchase. Supported gateways include "card", "crypto", "crypto_setype", and "sbp". Crypto gateways require `cryptocurrency_code`.

Request Body
Name Type Required Description
type string Required The payment type. One of "regular" or "subscription".
plan_id string Required The UUID of the plan to purchase.
gate string Required The payment gateway. Use "card", "crypto", "crypto_setype", or "sbp".
cryptocurrency_code string Optional Required for "crypto" and "crypto_setype" gateways. The cryptocurrency code to pay with (e.g. "btc", "eth", "usdt").
coupon_code string Optional An optional coupon code to apply a discount to the payment.
curl -X POST https://api.proxyhat.com/v1/payments \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "type": "regular",
    "plan_id": "uuid",
    "gate": "crypto",
    "cryptocurrency_code": "BTC"
  }'
import requests

response = requests.post(
    "https://api.proxyhat.com/v1/payments",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Content-Type": "application/json",
        "Accept": "application/json",
    },
    json={
        "type": "regular",
        "plan_id": "uuid",
        "gate": "crypto",
        "cryptocurrency_code": "BTC",
    },
)

data = response.json()
print(f"Payment created: {data["payment_id"]}")
const response = await fetch("https://api.proxyhat.com/v1/payments", {
  method: "POST",
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Content-Type": "application/json",
    "Accept": "application/json",
  },
  body: JSON.stringify({
    type: "regular",
    plan_id: "uuid",
    gate: "crypto",
    cryptocurrency_code: "BTC",
  }),
});

const data = await response.json();
console.log(`Payment created: ${data.payment_id}`);
payload := strings.NewReader(`{
  "type": "regular",
  "plan_id": "uuid",
  "gate": "crypto",
  "cryptocurrency_code": "BTC"
}`)

req, _ := http.NewRequest("POST", "https://api.proxyhat.com/v1/payments", payload)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println("Payment created:", result["payment_id"])
Response 200
{
  "success": true,
  "payment_id": "uuid"
}
GET /v1/payments/{payment} Requires Auth

Get Payment Details

Get Payment Details

Retrieve full details for a specific payment including the pay address, crypto amount, status, and expiration time. Use this to display payment instructions to the user.

Path Parameters
Name Type Required Description
payment string Required The UUID of the payment.
curl https://api.proxyhat.com/v1/payments/{payment_id} \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Accept: application/json"
import requests

payment_id = "uuid"

response = requests.get(
    f"https://api.proxyhat.com/v1/payments/{payment_id}",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Accept": "application/json",
    },
)

data = response.json()["data"]
print(f"Send {data["crypto_amount"]} {data["crypto"]["code"]} to {data["pay_address"]}")
const paymentId = "uuid";

const response = await fetch(`https://api.proxyhat.com/v1/payments/${paymentId}`, {
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Accept": "application/json",
  },
});

const { data } = await response.json();
console.log(`Send ${data.crypto_amount} ${data.crypto.code} to ${data.pay_address}`);
paymentID := "uuid"
url := fmt.Sprintf("https://api.proxyhat.com/v1/payments/%s", paymentID)

req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["data"])
Response 200
{
  "success": true,
  "data": {
    "pay_address": "bc1q...",
    "crypto_amount": "0.00123456",
    "amount_usd": 50.00,
    "crypto": {
      "code": "BTC",
      "currency": "Bitcoin",
      "network": "bitcoin",
      "icon": "btc.svg",
      "label": "Bitcoin (BTC)"
    },
    "status": "pending",
    "tx_hash": null,
    "expires_at": "2026-01-21T10:15:00Z",
    "completed_at": null
  }
}
GET /v1/payments/{payment}/check Requires Auth

Check Payment Status

Check Payment Status

Poll the current status of a payment and retrieve the transaction hash once confirmed. Use this endpoint to check whether a pending payment has been completed.

Path Parameters
Name Type Required Description
payment string Required The UUID of the payment to check.
curl https://api.proxyhat.com/v1/payments/{payment_id}/check \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Accept: application/json"
import requests

payment_id = "uuid"

response = requests.get(
    f"https://api.proxyhat.com/v1/payments/{payment_id}/check",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Accept": "application/json",
    },
)

data = response.json()["data"]
print(f"Status: {data["status"]}, TX: {data["tx_hash"]}")
const paymentId = "uuid";

const response = await fetch(`https://api.proxyhat.com/v1/payments/${paymentId}/check`, {
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Accept": "application/json",
  },
});

const { data } = await response.json();
console.log(`Status: ${data.status}, TX: ${data.tx_hash}`);
paymentID := "uuid"
url := fmt.Sprintf("https://api.proxyhat.com/v1/payments/%s/check", paymentID)

req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["data"])
Response 200
{
  "success": true,
  "data": {
    "status": "completed",
    "tx_hash": "abc123..."
  }
}
GET /v1/payments/{payment}/invoice Requires Auth

Download Invoice

Download Invoice

Download an invoice for a completed payment. Returns an HTML document by default, or a PDF when the format query parameter is set to "pdf".

Query Parameters
Name Type Required Description
format string Optional The invoice format. One of "html" or "pdf". Defaults to "html".
Path Parameters
Name Type Required Description
payment string Required The UUID of the payment.
curl "https://api.proxyhat.com/v1/payments/{payment_id}/invoice?format=pdf" \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Accept: application/json" \
  -o invoice.pdf
import requests

payment_id = "uuid"

response = requests.get(
    f"https://api.proxyhat.com/v1/payments/{payment_id}/invoice",
    headers={
        "Authorization": "Bearer __API_KEY__",
    },
    params={
        "format": "pdf",
    },
)

with open("invoice.pdf", "wb") as f:
    f.write(response.content)
print("Invoice saved to invoice.pdf")
const paymentId = "uuid";

const response = await fetch(
  `https://api.proxyhat.com/v1/payments/${paymentId}/invoice?format=pdf`,
  {
    headers: {
      "Authorization": "Bearer __API_KEY__",
    },
  },
);

const blob = await response.blob();
console.log(`Invoice downloaded: ${blob.size} bytes`);
paymentID := "uuid"
url := fmt.Sprintf("https://api.proxyhat.com/v1/payments/%s/invoice?format=pdf", paymentID)

req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Authorization", "Bearer __API_KEY__")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

body, _ := io.ReadAll(resp.Body)
os.WriteFile("invoice.pdf", body, 0644)
fmt.Println("Invoice saved to invoice.pdf")
Response 200
HTML or PDF document

Cryptocurrencies

GET /v1/payments/cryptocurrencies

List Cryptocurrencies

List Cryptocurrencies

Retrieve supported cryptocurrencies for payments. This is a public endpoint that does not require authentication. Use the optional `gate` query parameter (`crypto` or `crypto_setype`) to fetch only the currencies supported by a specific crypto gateway.

curl https://api.proxyhat.com/v1/payments/cryptocurrencies \
  -H "Accept: application/json"
import requests

response = requests.get(
    "https://api.proxyhat.com/v1/payments/cryptocurrencies",
    headers={
        "Accept": "application/json",
    },
)

data = response.json()
for crypto in data["data"]:
    print(f"{crypto["label"]} ({crypto["network"]})")
const response = await fetch("https://api.proxyhat.com/v1/payments/cryptocurrencies", {
  headers: {
    "Accept": "application/json",
  },
});

const { data: cryptos } = await response.json();
cryptos.forEach(c => console.log(`${c.label} (${c.network})`));
req, _ := http.NewRequest("GET", "https://api.proxyhat.com/v1/payments/cryptocurrencies", nil)
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["data"])
Response 200
{
  "success": true,
  "data": [
    {
      "code": "BTC",
      "currency": "Bitcoin",
      "network": "bitcoin",
      "icon": "btc.svg",
      "label": "Bitcoin (BTC)"
    },
    {
      "code": "ETH",
      "currency": "Ethereum",
      "network": "ethereum",
      "icon": "eth.svg",
      "label": "Ethereum (ETH)"
    }
  ]
}