BitcofyDevelopers
RUENDashboard ↗
BITCOFY MERCHANT API

Payments, clearly documented

A practical Merchant API guide, from the first invoice to payout reconciliation. Start with hosted checkout, then connect webhooks and server-side automation.

BASE URLhttps://pay.bitcofy.prov1

Your first payment

  1. Create a project in the merchant cabinet. Complete activation if payment is required.
  2. Obtain the project ID, API key and API secret under Integrations. Keep secrets on your server.
  3. Create an invoice with the request below. Store its invoice_id against your order_id.
  4. Redirect the buyer to the returned invoice_url. Bitcofy offers the available networks and assets.
  5. Verify a signed webhook or read the invoice through the API. Fulfil only on the verified result, never on a browser redirect alone.
bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/invoices' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"project_id":"YOUR_PROJECT_ID","order_id":"order-1001","amount":"49.90","currency":"USD","buy_type":"package","success_url":"https://merchant.example/order/success","cancel_url":"https://merchant.example/order/cancel"}'

This example prices an order in USD and lets the buyer choose the payment asset. Use the selected option's amount_crypto as the amount to send. A repeat with the same project_id and order_id returns the existing invoice with its original terms. Use a new order_id for a new invoice.

Authentication and secrets

Base origin: https://pay.bitcofy.pro. Reference paths already include /api/v1.

OperationCredentialsPurpose
Public informationNoneNetworks, rates and integration capabilities
Project readsX-API-Key or Authorization: Bearer <project_api_key>Access to your own project
Project writesAPI key plus X-API-SecretInvoices, settings and payouts
Signed payout or request decisionWrite access plus signature, nonce, timestampAdditional Ed25519 signature
Cabinet loginUser sessionNot a Merchant API key

API keys start with bpk_, API secrets with bps_, webhook secrets with bwhsec_live_. These credentials are distinct. Register the Base64 Ed25519 public key; keep the private key on your server. HTTP headers are case-insensitive; JSON names and network/asset values must match the API. JSON writes use Content-Type: application/json.

Invoice lifecycle

Invoice status, transaction confirmations and withdrawable balance are different states.

StatusMeaningAction
createdInvoice exists; payment window has not startedShare checkout URL
waiting_paymentRoute selected and payment window startedAwait payment before session expiry
pendingTransfer detected, processing incompleteWait for confirmations and resolution
paidPayment acceptedFulfil once
paid_overConfirmed amount exceeds the accepted rangeReconcile the credit and apply your overpayment policy
partially_paid, wrong_amount, additional_paymentConfirmed amount is below the accepted rangeCheck the credit and keep the order open for reconciliation
late_paymentAn attributable late transfer was confirmedReconcile the credit and apply your late-payment policy
expired, cancelWindow expired or invoice cancelledReconcile any payment before deciding whether to fulfil

Read required_confirmations from the selected payment option and items[].confirmations and items[].crediting_status from the authenticated payments endpoint. Treat the transaction hash as an identifier and verify posted credit using the totals below.

Invoice and payment deadlines

PhaseDefault deadline
created, awaiting the buyer's route selection24 hours from the original creation time. The invoice expires automatically if no session opens by this deadline.
waiting_payment, after route selection20 minutes from successful POST …/payment-session. This window can run past the original selection deadline.
waiting_payment, fixed route20 minutes from creation. The route and session are active immediately.
Initial price quote for a route the buyer can select120 seconds. Each option shows its quote deadline in rate_locked_until. A quote refresh leaves expires_at unchanged.

expires_at is the deadline for the current phase. Once a session opens, it matches payment_session_expires_at. Repeating the request for the same active route returns the existing deadline. Starting a session on an expired invoice returns HTTP 400 with Invoice is already finalized.

An active selection keeps its payable amount for the payment window. For a fixed route, the payable amount is set at creation through the session deadline.

Automatic expiry applies while the invoice is in created or waiting_payment. A detected transfer in pending can finish confirming after the payment deadline. An attributable transfer that arrives after expiry can move the invoice to late_payment. Where a deposit address is reused, the service matches the transfer to an invoice when the available evidence identifies one. A transfer with ambiguous ownership can remain unassigned. Reconcile against your original invoice ID before taking action.

Choose the invoice denomination and route

Requestamount and currencyPayment route and timer
amount_type: "fiat" or omitted, no network or assetOrder amount in USD, RUB or EURThe buyer chooses an available pair. A new invoice begins in created and enters waiting_payment when the buyer starts a session.
amount_type: "fiat" or omitted, both network and assetOrder amount in USD, RUB or EURThe chosen pair and its conversion rate are fixed through invoice expiry. The invoice starts in waiting_payment with the session already open.
amount_type: "asset", both network and assetThe requested net quantity of the asset. Set currency to that asset ticker.One fixed pair, with the payment amount set at creation through invoice expiry.

Use the network name and ticker from GET /api/v1/public/networks. A fixed route uses buy_type: "balance". Omit buy_type to select this automatically. Explicit "package" or a missing half of the pair returns 400. With a buyer-selected route, buy_type still defaults to "package".

Fiat invoices use the applicable deposit fee and convert the result to the payment asset. POL and XPL quotes in fiat mode use two decimal places. To request an exact POL or XPL amount with up to 18 decimal places, use amount_type: "asset". Asset-denominated invoices add the applicable deposit fee directly in asset units, rounding the fee down to network precision. GRAM has its own payable precision in both modes, described under TON payments. Market price changes do not reprice the asset-denominated amount_crypto. Use the amount returned in payment_options in either mode.

A fixed route must pass project and platform availability and the invoice minimum, which is evaluated against the USD value at creation. A EUR invoice requires a fresh EUR/USD rate. If the rate is missing or stale, the API returns 400 with Fresh EUR/USD rate is unavailable. Retry when a fresh quote is available.

An asset-denominated request for a net 10 USDT on Tron can use this JSON body with the same headers as in the quickstart.

json
{
  "project_id": "YOUR_PROJECT_ID",
  "order_id": "top-up-1002",
  "network": "Tron",
  "asset": "USDT",
  "amount_type": "asset",
  "amount": "10.00",
  "currency": "USDT"
}

At an illustrative fee of 1.5%, checkout asks the buyer to send 10.15 USDT. If that amount confirms, 0.15 USDT is booked as the fee and 10 USDT is credited.

How confirmed payments are credited

Use the exact payment_options[].amount_crypto for the selected pair. Asset-denominated invoices use an exact comparison at the asset's precision. Fiat-denominated invoices accept a range around the quoted amount, with tolerance defined in the units of the selected asset. The status uses the cumulative confirmed amount for that pair.

Invoice statuspackage automatic creditbalance automatic credit
created, waiting_payment, pending, expired, cancelNo automatic credit in this stateNo automatic credit in this state
paidExpected payment amount after the invoice feeActual confirmed amount after the fee
paid_overExpected payment amount after the invoice feeActual confirmed amount including the overpayment, after the fee
wrong_amount, partially_paid, additional_paymentCredit is held while the confirmed amount is below the accepted rangeThe confirmed amount is credited after the fee, while the invoice still shows the shortfall
late_paymentExpected payment amount after the invoice fee, including when the transfer differs from the quoteActual confirmed amount after the fee

A first confirmed short payment normally produces wrong_amount. partially_paid can represent multiple confirmed transfers below the target, and additional_payment indicates another confirmed transfer while the invoice remains short. A top-up that reaches the accepted range can take the invoice to paid, and exceeding that range can take it to paid_over.

Before fulfilling an order paid late, verify the actual confirmed quantity and your order deadline.

Read the requested and credited amounts

Fixed-route responses include payment_route_locked: true, amount_type, requested_amount and requested_currency. A EUR invoice with buyer selection also includes the three request fields. Older invoices may omit all four fields. In asset mode requested_amount and requested_currency describe the original request. The amount_fiat and fiat_currency fields on authenticated status responses still use the USD accounting basis in asset mode.

The authenticated create and status responses provide asset_settlement for fixed routes. All three amounts are decimal strings in the selected asset. Zero values are valid before confirmation or credit.

FieldMeaning
network, assetPair recorded for the fixed route
confirmed_amountTotal of qualifying transfers on the route with the required confirmations
credited_fee_amountFee recorded against the invoice in units of asset
credited_net_amountActual net quantity credited to the project in units of asset

Use credited_net_amount for reconciliation and the invoice status for your order workflow. Fields such as requested_usd_amount and service_fee_usd_amount describe the quote in USD.

For either payment mode, get invoice payments with your project key.

  • credited_total_amount is the net quantity posted to the project, and credited_fee_total is the recorded fee. Use these totals to reconcile the whole invoice. A package credit may be recorded on one of several transfers.
  • items[].amount is the gross transfer quantity in the item's asset. items[].status and items[].confirmations track the on-chain transfer.
  • items[].crediting_status, items[].net_amount_after_fee and items[].fee_amount describe the accounting result. pending_confirmation is the initial credit state. credited marks a posted credit. withheld_exact_payment_required marks a transfer held under the package settlement rule, such as a short payment.

The public checkout payments method shows invoice status and each transfer's network, asset, confirmations and status. Use the authenticated methods to reconcile credit.

When credited funds can be withdrawn

Get project balances for the merchant_balance row of the same network and asset. balance is the recorded ledger balance, pending_aggregation_balance is the credited portion still awaiting collection where applicable, and available_for_withdrawal is the project's current calculated amount ready for withdrawal. On networks that collect deposits, the service may wait for the applicable threshold before moving funds into the wallet used for payouts. For Litecoin and Zcash, eligibility also depends on confirmed spendable transaction outputs. Check the latest balance and your payout budget before requesting a withdrawal.

Hosted checkout and available assets

Prefer the returned invoice_url. Public by-hash methods support hosted checkout; they do not replace authenticated Merchant API methods.

For payment_route_locked: true, render the active route and its expiry immediately. Read selected_network, selected_asset, payment_options and payment_session_expires_at from the invoice. The fixed route requires no POST …/payment-session call or buyer network selection. Use the authenticated invoice read to reconcile credits.

For invoices where the buyer chooses a route, open the hosted page in the same browser before calling POST …/payment-session. The endpoint requires a valid access cookie and applies rate limits. A 403 asking to open the hosted page indicates missing access.

/api/v1/public/networks describes platform capabilities. For an invoice, use its current payment_options; project and administrator restrictions can change availability. Do not offer an option from an obsolete cache. Read address and amount for the same network/asset pair. A token symbol on another network is not interchangeable. Return URLs control navigation, not payment confirmation.

Networks, assets and payment identifiers

Pass the exact network and asset codes in requests. Use chain_id to identify the network in a wallet. Use the invoice's current payment_options to determine which pairs it accepts.

API network code networkChain identifier chain_idAPI asset codes asset
Arbitrum42161ETH, USDT, USDC
Avalanche (Avalanche C-Chain)43114AVAX, USDT
BSC56BNB, USDT
Base8453ETH, USDC, USDT
Cosmos (Cosmos Hub)cosmoshub-4ATOM
Ethereum1ETH, USDT, USDC
Litecoinlitecoin-mainnetLTC
Plasma9745XPL, USDT
Polkadot (Polkadot Asset Hub)polkadot-asset-hubDOT
Polygon (Polygon PoS)137POL, USDT, USDC
Solanasolana-mainnet-betaSOL, USDC
TON-239GRAM, USDT
Trontron-mainnetTRX, USDT
XRPL (XRP Ledger)xrpl-mainnetXRP, RLUSD
Zcashzcash-mainnetZEC

Match tokens by the contract, mint or issuer returned for the selected pair. For example, Base uses bridged Tether under the USDT code, and Solana uses the registered USDC mint. The network's native_asset pays on-chain fees. Current network and asset catalog

Incoming transfers to Cosmos Hub require the invoice's Memo. Incoming transfers to XRP Ledger require its Destination Tag. Both are returned as memo. Zcash uses transparent payment addresses.

TON payments

In API requests use network: "TON" and asset: "GRAM" for the native coin Gram (formerly Toncoin), or asset: "USDT" for the official Tether token on TON. GRAM uses nine decimal places on chain, including payouts and settlement. USDT uses six. Pass amounts as decimal strings. Copy the wallet owner address provided by the invoice or deposit route. TON payment and deposit routes do not require a Memo.

New GRAM invoice quotes use up to six decimal places for the amount payable. Fiat invoices round to the nearest 0.000001 GRAM, with halfway values rounded up and a minimum positive payment of 0.000001 GRAM. In amount_type: "asset", you can request a net amount with up to nine decimal places. The total payable after adding the fee rounds up to the next 0.000001 GRAM when needed. Use the exact amount_crypto returned by the API. Existing locked quotes keep their original amount until expiry. Unstarted options use the new precision.

For a payout, pass the recipient's TON mainnet address. Address formats include checksummed UQ… and EQ… addresses and the raw form 0:<64 hex>. Preserve the address's letter case. Network fees are paid in GRAM.

Paying an ATOM invoice

Cosmos Hub uses one provider deposit address and a unique numeric memo for each route. Copy both the address and the exact memo from the selected route; Memo is a string, even when it contains only digits. Do not parse it as a JavaScript Number, trim it, reuse another invoice's Memo or infer it from the address. Network metadata marks this with memo_required / requires_memo. Do not send if the route's required Memo is missing.

On the hosted checkout, scan the address QR in Keplr or copy the cosmos1… address into the recipient field. Copy the exact Memo and enter the displayed ATOM amount in their separate fields before approving the transfer. Checkout also provides a separate QR for the Memo text. For a custom integration, call the payment QR endpoint with kind=address (the default) for the address or kind=memo for the Memo.

Send native ATOM on Cosmos (cosmoshub-4, six decimals), using a bank transfer. Incoming IBC transfers and IBC vouchers are not supported for invoice credit. Missing, incorrect or reused Memo prevents automatic attribution; an address-only transfer does not identify your invoice. Check the invoice status and credited_total_amount before fulfilling an order.

Sending ATOM to a recipient

For a Cosmos payout or approval request, supply destination_memo when the recipient requires it, for example for an exchange deposit. It is optional for an ordinary wallet. Preserve its exact contents, including spaces. The limit is 256 UTF-8 bytes and control characters are rejected. Preserve it across reconciliation and retries. memo identifies an incoming route and destination_memo is sent with an outgoing payout.

XRP Ledger payments and deposits

Use network: "XRPL" with asset: "XRP" or asset: "RLUSD". Send to the exact classic r… address plus Destination Tag of the selected invoice or deposit route. The API carries the tag as a decimal string in memo. Address and tag together identify the deposit. Copy both values and the exact payment amount into their corresponding wallet fields. A transfer with an absent or incorrect tag cannot be credited automatically. The hosted page can prefill these values in Xaman.

The address QR contains the classic address. Request kind=memo to get the separate Destination Tag QR for XRP or RLUSD. XRPL deposits are credited after the transaction succeeds in a validated ledger. XRP supports six decimal places and the ledger records it in drops.

RLUSD on XRPL is identified by the issuer rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De and currency code 524C555344000000000000000000000000000000. Use this issuer for your trust line. XRP pays the network fee. Ripple USD on XRP Ledger

Withdrawing XRP or RLUSD

Use the recipient's classic address in destination_address. When the recipient provides a Destination Tag, pass it as destination_memo, a decimal string from "0" through "4294967295". A blank field leaves the tag unset. A mainnet X-address is accepted. If it already contains a tag, the separate field may be omitted and any supplied value must match. A recipient must have an active trust line with the RLUSD issuer to receive RLUSD. Check payout_enabled at both network and asset level before making a request.

DOT on Polkadot Asset Hub

Use network: "Polkadot" with asset: "DOT". In your wallet choose Polkadot Asset Hub (parachain 1000). The provider monitors that chain. The same address format can be used on the Relay Chain, so check the network selected in your wallet before sending. Copy the full deposit address from the invoice or scan its address QR and enter the exact DOT amount. No Memo or Destination Tag is needed. A successful transfer qualifies for credit after its Asset Hub block is finalized. Polkadot Asset Hub

Pass DOT amounts as decimal strings with up to 10 decimal places. The default minimum payable invoice amount is 0.015 DOT. It includes the Asset Hub account minimum and a fee allowance. Read minimum_invoice_amount from GET /api/v1/public/networks for the effective network minimum and use the invoice's payment_options to determine what the project can accept.

For DOT payouts use a Polkadot SS58 address with format 0, typically beginning with 1. Leave destination_memo empty. An unfunded recipient account may need at least 0.01 DOT to be created, so check the amount the recipient will receive after fees. Existing accounts can receive smaller amounts when the network allows it. Polkadot address formats, Asset Hub account minimum

Litecoin and transparent Zcash

Use network: "Litecoin" with asset: "LTC", or network: "Zcash" with asset: "ZEC". Both support up to eight decimal places. Copy the address and exact amount from the current invoice. LTC invoice addresses begin with ltc1q. ZEC invoice addresses begin with t1 and receive transparent outputs. The invoice QR contains the address. These routes need no Memo or Destination Tag. Read minimum_invoice_amount in the network catalog and required_confirmations from checkout. The default thresholds are six confirmations for LTC and 24 for ZEC.

The provider can reuse Litecoin and Zcash addresses within a project. Reuse is enabled by default and follows the effective aggregation policy. An address serves one active invoice at a time. If the new amount is close to the latest confirmed transfer of the same asset on that address, the provider selects a different address. The same rule applies to other networks where threshold-based address reuse is enabled. Use fresh instructions for every invoice.

On a reused address, automatic matching requires an exact amount that identifies a single invoice. Ambiguous transfers need manual review. Wait for the invoice status before fulfilling the order.

For Litecoin payouts, provide a regular mainnet address beginning with L, M, 3, ltc1q or ltc1p. For Zcash payouts, provide a transparent mainnet t1 or t3 address, or a transparent-source tex1 address. Leave destination_memo empty for either network. Litecoin mainnet address parameters, Zcash transparent addresses and TEX

Receive and verify webhooks

Configure a public HTTPS URL through the cabinet or POST …/webhook/config, send a test through POST …/webhook/test, and inspect delivery records through GET …/webhook/events.

Headers: X-Bitcofy-Event-Id, X-Bitcofy-Event-Type, X-Bitcofy-Timestamp, X-Bitcofy-Signature, X-Bitcofy-Retry-Count. Signature: hex HMAC-SHA256 using the webhook secret over the exact timestamp string, a dot, and the original request body bytes. Do not re-serialize JSON before verification.

javascript
import { createHmac, timingSafeEqual } from 'node:crypto';
export function verifyWebhook(rawBody, timestamp, signature, secret) {
  if (!Buffer.isBuffer(rawBody) || typeof timestamp !== 'string' ||
      typeof signature !== 'string' || !/^[a-f0-9]{64}$/i.test(signature)) return false;
  const expected = createHmac('sha256', secret)
    .update(timestamp + '.', 'utf8').update(rawBody).digest();
  return timingSafeEqual(expected, Buffer.from(signature, 'hex'));
}
  1. Verify signature, timestamp freshness and project ownership. Choose your receiver freshness window with clock skew in mind.
  2. Persist and deduplicate by event_id atomically with order processing.
  3. Return any 2xx after durable acceptance. Queue slow processing.
  4. Handle duplicate and out-of-order deliveries; retrieve the current object when needed.

Delivery timeout is 5 seconds, with up to 10 total attempts. Retry delays are 15, 30, 60, 120, 240 seconds, then capped at 300 seconds; queue scheduling affects actual delivery time. Exhausted events become dead. Use API reconciliation as well as webhooks.

Core events: invoice.created, invoice.status_changed, payout.created, payout.processing, payout.status_changed, payout.rejected, payout.request.expired, payout.review_required, webhook.test. Additional payout transition events can occur. Do not depend on arrival order.

On request expiry, payout.request.expired includes project_id, request_id, status: "expired", final: true, funds_released: true, the amounts, and the deadline in expires_at and decided_at. payout.review_required includes review_required: true, review_required_at, status: "pending", provider_status: "processing", and final: false. Funds remain reserved while the payout is under review. If a review notification arrives after a final event, reconcile the current state via GET /api/v1/payouts/{payout_id}.

invoice.created and invoice.status_changed add amount_type, requested_amount and requested_currency when present. Both add payment_route_locked: true for a fixed route. For fixed routes, invoice.status_changed also includes the same cumulative asset_settlement snapshot as the authenticated invoice response. These fields are at the top level of the signed JSON. A status event is sent when the invoice changes status. Confirmations and credit totals can continue to change within one status. Reconcile the current invoice and its payments after duplicate, missing or out-of-order events and whenever you need up-to-date totals.

json
{
  "event_type": "invoice.status_changed",
  "previous_status": "pending",
  "status": "paid",
  "payment_route_locked": true,
  "amount_type": "asset",
  "requested_amount": "10",
  "requested_currency": "USDT",
  "asset_settlement": {
    "network": "Tron",
    "asset": "USDT",
    "confirmed_amount": "10.150000",
    "credited_fee_amount": "0.150000",
    "credited_net_amount": "10.000000"
  }
}

Payouts and approval requests

Merchant dashboard withdrawals and customer payouts

The withdrawal page is for merchant owners. Sign in to withdraw funds available across your projects, review the debit, fee and recipient amount, and approve or reject payout requests. The /withdraw_{payout_id} page shows an existing payout to the owner of its project.

Use your project's own interface for customer payouts. Your server checks the customer's identity, eligibility, allowed amount and destination details. It then submits either a directly signed POST /api/v1/payouts or a POST /api/v1/projects/{project_id}/payout-requests for separate approval. The Bitcofy withdrawal link serves the merchant owner. Provide status to your customers through your project. Keep the API key, API secret and signing key on your server.

Access to the withdrawal page follows the owner session. The five-minute timestamp window applies to signed API requests, including direct payouts and signed decisions on requests.

Network and asset budget

Check the network / asset pair and destination, including the Cosmos Memo or XRP Ledger Destination Tag when required by the recipient. The server rejects new payouts and requests when the network or asset is marked payout_enabled: false in GET /api/v1/public/networks. The asset-level merchant_enabled flag controls invoice acceptance. Use GET /api/v1/projects/{project_id}/balances to inspect balances for the selected pair. The project API draws from the project and any other eligible projects of the same owner when shared funding is enabled.

For both direct payouts and approval requests, amount is the full debit. Bitcofy deducts the fee from it and sends the remainder to the recipient. Fetch GET /api/v1/payouts/fee?network=Tron&asset=USDT with your project API key while preparing the payout. fee_amount is a decimal string in units of the selected asset. The fee can change with network and market conditions. Reconcile gross_amount, fee_amount and net_amount in the payout creation response.

Litecoin and Zcash quotes may also include network_fee_estimate, the estimated cost of a standard transfer in the same asset. Use fee_amount to calculate the recipient amount.

In the dashboard, “Available” is the maximum total debit including the fee. Funds ready to withdraw limit the recipient amount. Open requests reduce the available budget.

The server checks whether the budget for the selected pair covers the full debit after open requests, and whether funds ready for withdrawal cover the recipient amount. Request approval checks both limits again. A 409 with error_code=insufficient_project_reserve means the free budget is too low. error_code=insufficient_aggregated_balance means too little is ready to send. Read available_balance, available_aggregated_amount and pending_aggregation_balance for details. Refresh the data before retrying.

Request expiry and payout review

A request in requested has exactly 24 hours from created_at for a decision. expires_at gives the exact UTC deadline. If no decision is made in time, the request becomes final with status expired and releases its reserved budget. A late approval or rejection returns 409 with error_code=payout_request_expired and expires_at. If a payout is still needed, recheck the available budget and create a separate request with a new idempotency_key.

After approval, track the created payout. If it is still pending after 60 minutes, Bitcofy sets review_required: true, records review_required_at and sends payout.review_required. Processing continues with final: false, and the funds remain reserved. Reconcile the existing payout using its ID or idempotency key. Once the payout is final, review_required becomes false and the review timestamp remains available.

Payout processing is asynchronous after a successful creation response. Wait for the final payout status to confirm sending.

StateMeaning
requestedAwaiting a decision
expiredDecision deadline reached, request final, reserved budget released
approved, rejectedRequest decision; approval does not prove payout completion
pending / provider_status=processingPayout processing
success / provider_status=completedCompleted
send_error / provider_status=failedSending error; reconcile result and reservation release

Store request, payout and idempotency IDs, transaction hash and final-state flags. GET …/payouts/reconcile accepts exactly one of request_id, payout_id or idempotency_key. If a request exists, the reconciliation result includes its deadline in request_expires_at.

Ed25519 signing

Generate keys on your server and register the public key with POST …/security/payout-key. Base64-encode the signature. API key and secret remain required.

The direct payout message is UTF-8, joined with LF (\n), without a trailing newline:

text
bitcofy-payout-v1
{project_id}
{network}
{asset}
{amount}
{destination_address}
{idempotency_key}
{nonce}
{timestamp_utc}

When a direct payout has a nonempty destination_memo, append a line formed by memo: followed by the JSON-encoded string, with no trailing newline. Sign the field as submitted. Memo 123456789 adds memo:"123456789" and an explicit XRPL tag of zero adds memo:"0". An omitted, null or empty field keeps the original signature format. The approval and rejection signature formats stay the same.

javascript
// Append to the canonical message above before signing.
if (destinationMemo) message += '\nmemo:' + JSON.stringify(destinationMemo);
python
# Equivalent UTF-8 canonical suffix; keep non-ASCII text unchanged.
if destination_memo:
    message += "\nmemo:" + json.dumps(destination_memo, ensure_ascii=False, separators=(",", ":"))

Approval/rejection uses a different message. Action is approve or reject; keep the reason line empty for approval:

text
bitcofy-payout-approval-v1
{project_id}
{request_id}
{action}
{rejection_reason_or_empty}
{nonce}
{timestamp_utc}

Timestamp must be within 5 minutes of server time. The server normalizes it using Python UTC isoformat(). Send and sign a timestamp without fractional seconds and with +00:00, for example 2026-09-29T12:00:00+00:00, to avoid Z/offset and fractional-second differences. Generate a unique nonce for each new signed attempt.

Send amount as a plain decimal string without exponent notation and sign the identical string. Avoid floating-point numbers. A server-provided example message illustrates the format; sign the actual values of your operation.

These examples sign an already assembled canonical message. API-generated private_key is a Base64 32-byte seed. This differs from the expanded 64-byte TweetNaCl/Go key; convert the seed as shown below.

Node.js

javascript
import { createPrivateKey, sign } from 'node:crypto';

// message: canonical UTF-8 message shown above, no trailing newline.
export function signMessage(seedBase64, message) {
  const seed = Buffer.from(seedBase64, 'base64');
  if (seed.length !== 32) throw new Error('Expected a 32-byte Ed25519 seed');
  const pkcs8 = Buffer.concat([
    Buffer.from('302e020100300506032b657004220420', 'hex'), seed
  ]);
  const key = createPrivateKey({ key: pkcs8, format: 'der', type: 'pkcs8' });
  return sign(null, Buffer.from(message, 'utf8'), key).toString('base64');
}

Python

python
# Dependency: cryptography
import base64
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey

def sign_message(seed_base64: str, message: str) -> str:
    seed = base64.b64decode(seed_base64, validate=True)
    key = Ed25519PrivateKey.from_private_bytes(seed)  # 32-byte seed
    return base64.b64encode(key.sign(message.encode('utf-8'))).decode('ascii')

Go

go
package payouts

import (
    "crypto/ed25519"
    "encoding/base64"
    "fmt"
)

func SignMessage(seedBase64 string, message string) (string, error) {
    seed, err := base64.StdEncoding.DecodeString(seedBase64)
    if err != nil || len(seed) != ed25519.SeedSize {
        return "", fmt.Errorf("expected a Base64 32-byte Ed25519 seed")
    }
    key := ed25519.NewKeyFromSeed(seed)
    signature := ed25519.Sign(key, []byte(message))
    return base64.StdEncoding.EncodeToString(signature), nil
}

Retries and reconciliation

SituationAction
Invoice creation timeoutFind by order ID or retry with the same order ID
Payout timeoutQuery by the same idempotency key or reconcile first
Payout already existsObserve it; do not create a second payout
New signed attempt after reconciliationKeep the logical operation key, refresh nonce/timestamp, sign again
400, 401, 403, 422Fix parameters, access or signature before retrying
Payout 409Inspect the structured reason, available balance and reservation
429 or temporary unavailabilityBack off with jitter; respect Retry-After when present

Do not change the idempotency key just because a response was lost. A failed connection can leave a write's outcome unknown. Prefer status reads and webhooks over repeated POST requests.

Before going live

  1. Verify project access, activation and asset availability.
  2. Exercise successful, partial, expired and late payments.
  3. Verify raw-body webhook signatures, duplicates and out-of-order events.
  4. Ensure browser redirects cannot fulfil orders without API confirmation.
  5. Exercise response loss, identifier lookup and payout duplicate protection.
  6. Verify payout fees, available balances, Ed25519 encoding, nonce and timestamp.
  7. Log operation identifiers and errors without credentials or private keys.

For agents and automated readers

Share the documentation URL directly. The full guide and reference are present in HTML without JavaScript or authentication.

Choose a workflow, then consult the exact endpoint. Replace illustrative IDs and example values; they are not real credentials. Fetch networks, fees and confirmation requirements from the API.

Every request, explained

Choose an endpoint. Expand parameters, success responses and errors separately. Examples illustrate shape; replace identifiers and sign the actual values before sending.

Reference data

GET

Health

/api/v1/health
No API key
Parameters & request example

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/health'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
statusstringRequiredObject state; see the relevant workflow for values and actions.
appstringRequiredApp
json
{
  "status": "ok",
  "app": "string"
}
Errors & recovery

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
json
{
  "detail": "Error description"
}
GET

List Rates

/api/v1/public/rates
No API key
Parameters & request example

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/public/rates'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
ratesarray<object>RequiredRates
rates[].base_currencystringRequiredBase Currency
rates[].quote_currencystringRequiredQuote Currency
rates[].ratestringRequiredRate pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
rates[].sourcestringRequiredSource
rates[].captured_atstringRequiredCaptured At format: date-time
json
{
  "rates": [
    {
      "base_currency": "USD",
      "quote_currency": "USD",
      "rate": "string",
      "source": "api",
      "captured_at": "2026-07-13T12:00:00Z"
    }
  ]
}
Errors & recovery

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
json
{
  "detail": "Error description"
}
GET

List Networks

/api/v1/public/networks
No API key
  • The catalog returns exact network and asset codes. Use a pair from the current invoice payment_options for payment. Incoming Cosmos transfers require a Memo and XRP Ledger transfers require a Destination Tag.
  • When present, deposit_enabled or payout_enabled set to false on the network or asset disables the operation. merchant_enabled describes platform-wide invoice eligibility. When returned, minimum_invoice_amount is in the native asset.
  • The example shows the registered pairs. Call this endpoint for current availability flags.
Parameters & request example

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/public/networks'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
[].networkstringRequiredCase-sensitive network code to pass as network.
[].display_namestringOptionalHuman-readable network label, when present.
[].chain_idinteger / stringRequiredchain id
[].native_assetstringRequiredTicker of the native coin used for network fees.
[].memo_requiredbooleanOptionalIncoming routes require the issued Cosmos Memo or XRPL Destination Tag.
[].requires_memobooleanOptionalCompatibility flag for the same payment identifier requirement.
[].deposit_enabledbooleanOptionalNetwork availability for receiving deposits, when reported.
[].payout_enabledbooleanRequiredNetwork availability for new payouts and requests.
[].minimum_invoice_amountstringOptionalMinimum payable amount in the native asset, when reported.
[].ss58_formatintegerOptionalAddress format on a Substrate network, when reported.
[].assetsarray<object>Requiredassets
[].assets[].symbolstringRequiredExact asset code to pass as asset for this network.
[].assets[].decimalsintegerRequiredOn-chain asset precision. ≥: 0
[].assets[].confirmationsintegerRequiredDefault confirmation count for this pair. ≥: 1
[].assets[].token_standardstringRequiredtoken standard
[].assets[].contract_addressstringOptionalToken contract or mint where applicable.
[].assets[].mint_addressstringOptionalSolana SPL token mint where applicable.
[].assets[].denomstringOptionalNative denomination used by a Cosmos network.
[].assets[].issuerstringOptionalIssuer of the XRPL asset, when applicable.
[].assets[].currencystringOptionalXRPL currency code for an issued asset.
[].assets[].merchant_enabledbooleanRequiredPlatform-wide eligibility for merchant invoices.
[].assets[].deposit_enabledbooleanOptionalAsset availability for receiving deposits, when reported.
[].assets[].payout_enabledbooleanOptionalAsset availability for new payouts, when reported.
json
[
  {
    "network": "Arbitrum",
    "chain_id": 42161,
    "native_asset": "ETH",
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "ETH",
        "decimals": 18,
        "confirmations": 20,
        "token_standard": "native",
        "merchant_enabled": true
      },
      {
        "symbol": "USDT",
        "decimals": 6,
        "confirmations": 20,
        "token_standard": "ERC20",
        "contract_address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
        "merchant_enabled": true
      },
      {
        "symbol": "USDC",
        "decimals": 6,
        "confirmations": 20,
        "token_standard": "ERC20",
        "contract_address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "Avalanche",
    "display_name": "Avalanche C-Chain",
    "chain_id": 43114,
    "native_asset": "AVAX",
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "AVAX",
        "decimals": 18,
        "confirmations": 1,
        "token_standard": "native",
        "merchant_enabled": true
      },
      {
        "symbol": "USDT",
        "decimals": 6,
        "confirmations": 1,
        "token_standard": "ERC20",
        "contract_address": "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "BSC",
    "chain_id": 56,
    "native_asset": "BNB",
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "BNB",
        "decimals": 18,
        "confirmations": 15,
        "token_standard": "native",
        "merchant_enabled": true
      },
      {
        "symbol": "USDT",
        "decimals": 18,
        "confirmations": 15,
        "token_standard": "BEP20",
        "contract_address": "0x55d398326f99059fF775485246999027B3197955",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "Base",
    "display_name": "Base",
    "chain_id": 8453,
    "native_asset": "ETH",
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "ETH",
        "decimals": 18,
        "confirmations": 1,
        "token_standard": "native",
        "merchant_enabled": true
      },
      {
        "symbol": "USDC",
        "decimals": 6,
        "confirmations": 1,
        "token_standard": "ERC20",
        "contract_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "merchant_enabled": true
      },
      {
        "symbol": "USDT",
        "decimals": 6,
        "confirmations": 1,
        "token_standard": "ERC20",
        "contract_address": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "Cosmos",
    "display_name": "Cosmos Hub",
    "chain_id": "cosmoshub-4",
    "native_asset": "ATOM",
    "memo_required": true,
    "requires_memo": true,
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "ATOM",
        "decimals": 6,
        "confirmations": 2,
        "token_standard": "native",
        "denom": "uatom",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "Ethereum",
    "chain_id": 1,
    "native_asset": "ETH",
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "ETH",
        "decimals": 18,
        "confirmations": 12,
        "token_standard": "native",
        "merchant_enabled": true
      },
      {
        "symbol": "USDT",
        "decimals": 6,
        "confirmations": 12,
        "token_standard": "ERC20",
        "contract_address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
        "merchant_enabled": true
      },
      {
        "symbol": "USDC",
        "decimals": 6,
        "confirmations": 12,
        "token_standard": "ERC20",
        "contract_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "Litecoin",
    "display_name": "Litecoin",
    "chain_id": "litecoin-mainnet",
    "native_asset": "LTC",
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "LTC",
        "decimals": 8,
        "confirmations": 6,
        "token_standard": "native",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "Plasma",
    "display_name": "Plasma",
    "chain_id": 9745,
    "native_asset": "XPL",
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "XPL",
        "decimals": 18,
        "confirmations": 2,
        "token_standard": "native",
        "merchant_enabled": true
      },
      {
        "symbol": "USDT",
        "decimals": 6,
        "confirmations": 2,
        "token_standard": "ERC20",
        "contract_address": "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "Polkadot",
    "display_name": "Polkadot Asset Hub",
    "chain_id": "polkadot-asset-hub",
    "native_asset": "DOT",
    "ss58_format": 0,
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "DOT",
        "decimals": 10,
        "confirmations": 1,
        "token_standard": "native",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "Polygon",
    "display_name": "Polygon PoS",
    "chain_id": 137,
    "native_asset": "POL",
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "POL",
        "decimals": 18,
        "confirmations": 128,
        "token_standard": "native",
        "merchant_enabled": true
      },
      {
        "symbol": "USDT",
        "decimals": 6,
        "confirmations": 128,
        "token_standard": "ERC20",
        "contract_address": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
        "merchant_enabled": true
      },
      {
        "symbol": "USDC",
        "decimals": 6,
        "confirmations": 128,
        "token_standard": "ERC20",
        "contract_address": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "Solana",
    "display_name": "Solana",
    "chain_id": "solana-mainnet-beta",
    "native_asset": "SOL",
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "SOL",
        "decimals": 9,
        "confirmations": 32,
        "token_standard": "native",
        "merchant_enabled": true
      },
      {
        "symbol": "USDC",
        "decimals": 6,
        "confirmations": 32,
        "token_standard": "SPL",
        "contract_address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "mint_address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "TON",
    "display_name": "TON",
    "chain_id": -239,
    "native_asset": "GRAM",
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "GRAM",
        "decimals": 9,
        "confirmations": 2,
        "token_standard": "native",
        "merchant_enabled": true
      },
      {
        "symbol": "USDT",
        "decimals": 6,
        "confirmations": 2,
        "token_standard": "TEP-74",
        "contract_address": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "Tron",
    "chain_id": "tron-mainnet",
    "native_asset": "TRX",
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "TRX",
        "decimals": 6,
        "confirmations": 20,
        "token_standard": "native",
        "merchant_enabled": true
      },
      {
        "symbol": "USDT",
        "decimals": 6,
        "confirmations": 20,
        "token_standard": "TRC20",
        "contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "XRPL",
    "display_name": "XRP Ledger",
    "chain_id": "xrpl-mainnet",
    "native_asset": "XRP",
    "memo_required": true,
    "requires_memo": true,
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "XRP",
        "decimals": 6,
        "confirmations": 1,
        "token_standard": "native",
        "merchant_enabled": true
      },
      {
        "symbol": "RLUSD",
        "decimals": 18,
        "confirmations": 1,
        "token_standard": "xrpl_issued_currency",
        "issuer": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
        "currency": "524C555344000000000000000000000000000000",
        "merchant_enabled": true
      }
    ]
  },
  {
    "network": "Zcash",
    "display_name": "Zcash",
    "chain_id": "zcash-mainnet",
    "native_asset": "ZEC",
    "payout_enabled": true,
    "assets": [
      {
        "symbol": "ZEC",
        "decimals": 8,
        "confirmations": 24,
        "token_standard": "native",
        "merchant_enabled": true
      }
    ]
  }
]
Errors & recovery

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
json
{
  "detail": "Error description"
}
GET

List Public Integrations

/api/v1/public/integrations
No API key
Parameters & request example

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/public/integrations'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
[].slugstringRequiredSlug
[].display_namestringRequiredDisplay Name
[].categorystringRequiredCategory
[].descriptionstringRequiredDescription
[].supports_webhooksbooleanRequiredSupports Webhooks
[].supports_embedded_checkoutbooleanRequiredSupports Embedded Checkout
[].docs_markdownstringRequiredDocs Markdown
json
[
  {
    "slug": "string",
    "display_name": "string",
    "category": "string",
    "description": "string",
    "supports_webhooks": false,
    "supports_embedded_checkout": false,
    "docs_markdown": "string"
  }
]
Errors & recovery

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
json
{
  "detail": "Error description"
}

Invoices & checkout

POST

Create Invoice

/api/v1/invoices
X-API-Key + X-API-Secret
  • Fiat mode supports USD, RUB and EUR. Supply network and asset together to fix the route and start the session at creation. In amount_type=asset, supply the target net quantity and use the asset ticker as currency.
  • The same project_id and order_id return the existing invoice. A fixed route uses balance and includes asset_settlement in the response.
  • In created, the buyer has 24 hours from creation to choose a route. A fixed route enters waiting_payment and starts its 20-minute window immediately. Use expires_at as the deadline of the current phase.
Parameters & request example
FieldTypePresenceMeaning & constraints
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.
X-API-SecretheaderRequiredAPI secret for this key; required for writes.

JSON body

FieldTypePresenceMeaning & constraints
project_idstringRequiredMerchant project ID. The supplied credentials must belong to this project.
order_idstringRequiredMerchant's order ID, unique within the project. Reusing the same ID returns the existing invoice.
amountnumber / stringRequiredPositive decimal amount in currency units. In amount_type=asset this is the target net quantity after the fee. >: 0; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
currencystringRequiredFor fiat use USD, RUB or EUR. In asset mode use the ticker matching asset.
buy_typestringOptionalpackage is an order payment with buyer route selection. balance credits the actual confirmed amount after the fee. For a fixed route, use balance or omit this field. default: "package"; min length: 1; max length: 32
amount_typestringOptionalDenomination of the original request. fiat is an amount in USD, RUB or EUR. asset is the target net quantity of the selected asset. enum: "fiat", "asset"; default: "fiat"
networkstring / nullOptionalSupply network and asset together to fix the payment route at creation. min length: 1; max length: 32
assetstring / nullOptionalSupply network and asset together to fix the payment route at creation. min length: 1; max length: 32
callback_urlstring / nullOptionalLegacy invoice field; does not configure project webhooks. Use /webhook/config.
success_urlstring / nullOptionalAbsolute HTTP(S) return URL after payment. A redirect does not prove credit.
cancel_urlstring / nullOptionalAbsolute HTTP(S) return URL on cancellation.
customer_idstring / nullOptionalOptional customer identifier in your system.
customer_emailstring / nullOptionalOptional valid customer email. format: email
metadataobjectOptionalYour JSON order metadata. System billing_invoice_kind fields are reserved.
bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/invoices' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{
  "project_id": "project_demo_001",
  "order_id": "order_1001",
  "amount": "100.00",
  "currency": "USD",
  "buy_type": "package",
  "callback_url": "https://merchant.example/api/bitcofy/webhook",
  "success_url": "https://merchant.example/payment/success",
  "cancel_url": "https://merchant.example/payment/cancel",
  "customer_id": "customer_42",
  "customer_email": "buyer@example.com",
  "metadata": {
    "order_ref": "SO-1001",
    "source": "landing",
    "plan": "pro"
  }
}'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
invoice_idstringRequiredInvoice ID for authenticated merchant API requests.
invoice_hashstringRequiredHosted payment identifier used in the checkout link and its public endpoints.
invoice_urlstringRequiredHosted checkout URL to share with the payer.
requested_usd_amountstringRequiredUSD equivalent of the requested amount before the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
service_fee_usd_amountstring / nullOptionalCommon quoted fee in USD, if it is the same across options. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
total_payable_usd_amountstring / nullOptionalCommon quoted total including the fee in USD, if it is the same across options. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
expires_atstringRequiredDeadline of the current phase. In created it is the route selection deadline, 24 hours from creation by default. Once a session opens it is the payment deadline. format: date-time
statusstringRequiredInvoice lifecycle status. created awaits route selection, waiting_payment has an open payment session, and pending has a detected transfer awaiting confirmations. paid is accepted, paid_over has an overpayment, wrong_amount, partially_paid and additional_payment require amount reconciliation, and late_payment records an attributed late transfer. expired and cancel close payment. Check settlement separately from invoice status.
buy_typestringRequiredpackage is an order payment with buyer route selection. balance credits the actual confirmed amount after the fee. For a fixed route, use balance or omit this field.
invoice_languagestringRequiredInvoice Language
resolved_languagestringRequiredResolved Language
success_urlstring / nullOptionalAbsolute HTTP(S) return URL after payment. A redirect does not prove credit.
cancel_urlstring / nullOptionalAbsolute HTTP(S) return URL on cancellation.
payment_session_started_atstring / nullOptionalTime the payment session opened. For a fixed route it is the invoice creation time. Before route selection the value is null. format: date-time
payment_session_expires_atstring / nullOptionalDeadline of the opened payment session, 20 minutes from session start by default. Before the session opens the value is null. format: date-time
payment_session_activebooleanOptionalThe payment window is open and the selected option is currently available. default: false
selected_networkstring / nullOptionalSelected Network
selected_assetstring / nullOptionalSelected Asset
payment_optionsarray<object>RequiredPayment routes currently offered for this invoice.
payment_options[].networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
payment_options[].assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
payment_options[].option_keystringRequiredNetwork and asset combined as network:asset.
payment_options[].fee_percentstringOptionalService fee percentage applied to this payment option. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].fee_usd_amountstringOptionalUSD valuation of the quoted service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].total_payable_usd_amountstringOptionalUSD valuation of the quoted payment including the service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].amount_cryptostringRequiredExact amount to send in units of this asset, including the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].rate_valuestringRequiredUSD quote per one unit of this asset used to price the payment option. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].rate_locked_untilstringRequiredQuote deadline for this option. The initial quote before route selection lasts 120 seconds by default. For a fixed route it matches the payment deadline. format: date-time
payment_options[].required_confirmationsintegerRequiredConfirmation threshold for this option. Some networks report a finalized transfer directly.
payment_options[].network_logo_urlstring / nullOptionalNetwork Logo Url
payment_options[].asset_logo_urlstring / nullOptionalAsset Logo Url
tracked_payment_optionobject / nullOptionalPreviously offered route retained to track an existing transfer when that route becomes unavailable.
tracked_payment_option.networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
tracked_payment_option.assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
tracked_payment_option.option_keystringRequiredNetwork and asset combined as network:asset.
tracked_payment_option.fee_percentstringOptionalService fee percentage applied to this payment option. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.fee_usd_amountstringOptionalUSD valuation of the quoted service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.total_payable_usd_amountstringOptionalUSD valuation of the quoted payment including the service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.amount_cryptostringRequiredExact amount to send in units of this asset, including the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.rate_valuestringRequiredUSD quote per one unit of this asset used to price the payment option. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.rate_locked_untilstringRequiredQuote deadline for this option. The initial quote before route selection lasts 120 seconds by default. For a fixed route it matches the payment deadline. format: date-time
tracked_payment_option.required_confirmationsintegerRequiredConfirmation threshold for this option. Some networks report a finalized transfer directly.
tracked_payment_option.network_logo_urlstring / nullOptionalNetwork Logo Url
tracked_payment_option.asset_logo_urlstring / nullOptionalAsset Logo Url
payment_route_lockedboolean / nullOptionalPresent for a network and asset fixed by the merchant at invoice creation.
amount_typestring / nullOptionalDenomination of the original request. fiat is an amount in USD, RUB or EUR. asset is the target net quantity of the selected asset. enum: "fiat", "asset"
requested_amountstring / nullOptionalOriginal requested amount before the fee, when recorded. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
requested_currencystring / nullOptionalFiat currency or asset symbol of the original request, when recorded.
asset_settlementobject / nullOptionalSettlement totals in units of the selected asset for a fixed route.
asset_settlement.networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
asset_settlement.assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
asset_settlement.confirmed_amountstringRequiredTotal confirmed transfers for the selected pair. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
asset_settlement.credited_fee_amountstringRequiredFee recorded in units of the selected asset. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
asset_settlement.credited_net_amountstringRequiredActual quantity of the asset credited to the project after the fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
json
{
  "invoice_id": "inv_demo_001",
  "invoice_hash": "dd8659b3058a",
  "invoice_url": "string",
  "requested_usd_amount": "string",
  "service_fee_usd_amount": "string",
  "total_payable_usd_amount": "string",
  "expires_at": "2026-12-03T12:00:00Z",
  "status": "created",
  "buy_type": "package",
  "invoice_language": "auto",
  "resolved_language": "auto",
  "success_url": "https://merchant.example/payment/success",
  "cancel_url": "https://merchant.example/payment/cancel",
  "payment_session_started_at": null,
  "payment_session_expires_at": null,
  "payment_session_active": false,
  "selected_network": null,
  "selected_asset": null,
  "payment_options": [
    {
      "network": "Ethereum",
      "asset": "USDT",
      "option_key": "Ethereum:USDT",
      "fee_percent": "0",
      "fee_usd_amount": "0",
      "total_payable_usd_amount": "0",
      "amount_crypto": "string",
      "rate_value": "string",
      "rate_locked_until": "2026-12-02T12:02:00Z",
      "required_confirmations": 1,
      "network_logo_url": "Tron",
      "asset_logo_url": "USDT"
    }
  ],
  "tracked_payment_option": null
}
Errors & recovery400 · 401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Invoice not found after creation
  • Both network and asset are required for a fixed payment route
  • Unsupported payment network or asset
  • Fixed payment routes require buy_type balance
  • In asset mode currency must match the specified asset
  • Invoice amount does not match the asset's precision
  • The specified payment asset is not enabled for this project
  • No supported payment asset is available for this invoice amount
  • No invoice assets currently have valid USD quotes
  • Fresh EUR/USD rate is unavailable
json
{
  "detail": "Error description"
}
GET

Get Invoice

/api/v1/invoices/{invoice_id}
X-API-Key
  • For a fixed route, asset_settlement gives total confirmed transfers, recorded fees, and the credited asset quantity.
Parameters & request example
FieldTypePresenceMeaning & constraints
invoice_idpath · stringRequiredInvoice identifier returned on creation.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/invoices/YOUR_INVOICE_ID' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
invoice_idstringRequiredInvoice ID for authenticated merchant API requests.
invoice_hashstringRequiredHosted payment identifier used in the checkout link and its public endpoints.
invoice_urlstringRequiredHosted checkout URL to share with the payer.
requested_usd_amountstringRequiredUSD equivalent of the requested amount before the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
service_fee_usd_amountstring / nullOptionalCommon quoted fee in USD, if it is the same across options. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
total_payable_usd_amountstring / nullOptionalCommon quoted total including the fee in USD, if it is the same across options. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
expires_atstringRequiredDeadline of the current phase. In created it is the route selection deadline, 24 hours from creation by default. Once a session opens it is the payment deadline. format: date-time
statusstringRequiredInvoice lifecycle status. created awaits route selection, waiting_payment has an open payment session, and pending has a detected transfer awaiting confirmations. paid is accepted, paid_over has an overpayment, wrong_amount, partially_paid and additional_payment require amount reconciliation, and late_payment records an attributed late transfer. expired and cancel close payment. Check settlement separately from invoice status.
buy_typestringRequiredSettlement mode selected at creation. package or balance.
invoice_languagestringRequiredInvoice Language
resolved_languagestringRequiredResolved Language
success_urlstring / nullOptionalAbsolute HTTP(S) return URL after payment. A redirect does not prove credit.
cancel_urlstring / nullOptionalAbsolute HTTP(S) return URL on cancellation.
payment_session_started_atstring / nullOptionalTime the payment session opened. For a fixed route it is the invoice creation time. Before route selection the value is null. format: date-time
payment_session_expires_atstring / nullOptionalDeadline of the opened payment session, 20 minutes from session start by default. Before the session opens the value is null. format: date-time
payment_session_activebooleanOptionalThe payment window is open and the selected option is currently available. default: false
selected_networkstring / nullOptionalSelected Network
selected_assetstring / nullOptionalSelected Asset
payment_optionsarray<object>RequiredPayment routes currently offered for this invoice.
payment_options[].networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
payment_options[].assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
payment_options[].option_keystringRequiredNetwork and asset combined as network:asset.
payment_options[].fee_percentstringOptionalService fee percentage applied to this payment option. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].fee_usd_amountstringOptionalUSD valuation of the quoted service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].total_payable_usd_amountstringOptionalUSD valuation of the quoted payment including the service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].amount_cryptostringRequiredExact amount to send in units of this asset, including the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].rate_valuestringRequiredUSD quote per one unit of this asset used to price the payment option. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].rate_locked_untilstringRequiredQuote deadline for this option. The initial quote before route selection lasts 120 seconds by default. For a fixed route it matches the payment deadline. format: date-time
payment_options[].required_confirmationsintegerRequiredConfirmation threshold for this option. Some networks report a finalized transfer directly.
payment_options[].network_logo_urlstring / nullOptionalNetwork Logo Url
payment_options[].asset_logo_urlstring / nullOptionalAsset Logo Url
tracked_payment_optionobject / nullOptionalPreviously offered route retained to track an existing transfer when that route becomes unavailable.
tracked_payment_option.networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
tracked_payment_option.assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
tracked_payment_option.option_keystringRequiredNetwork and asset combined as network:asset.
tracked_payment_option.fee_percentstringOptionalService fee percentage applied to this payment option. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.fee_usd_amountstringOptionalUSD valuation of the quoted service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.total_payable_usd_amountstringOptionalUSD valuation of the quoted payment including the service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.amount_cryptostringRequiredExact amount to send in units of this asset, including the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.rate_valuestringRequiredUSD quote per one unit of this asset used to price the payment option. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.rate_locked_untilstringRequiredQuote deadline for this option. The initial quote before route selection lasts 120 seconds by default. For a fixed route it matches the payment deadline. format: date-time
tracked_payment_option.required_confirmationsintegerRequiredConfirmation threshold for this option. Some networks report a finalized transfer directly.
tracked_payment_option.network_logo_urlstring / nullOptionalNetwork Logo Url
tracked_payment_option.asset_logo_urlstring / nullOptionalAsset Logo Url
payment_route_lockedboolean / nullOptionalPresent for a network and asset fixed by the merchant at invoice creation.
amount_typestring / nullOptionalDenomination of the original request when recorded. enum: "fiat", "asset"
requested_amountstring / nullOptionalOriginal requested amount before the fee, when recorded. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
requested_currencystring / nullOptionalFiat currency or asset symbol of the original request, when recorded.
asset_settlementobject / nullOptionalSettlement totals in units of the selected asset for a fixed route.
asset_settlement.networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
asset_settlement.assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
asset_settlement.confirmed_amountstringRequiredTotal confirmed transfers for the selected pair. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
asset_settlement.credited_fee_amountstringRequiredFee recorded in units of the selected asset. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
asset_settlement.credited_net_amountstringRequiredActual quantity of the asset credited to the project after the fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
order_idstringRequiredYour order identifier. Reuse in the same project returns the existing invoice.
fiat_currencystringRequiredCurrency of amount_fiat. For an asset-denominated request, this is USD.
amount_fiatstringRequiredOriginal fiat amount, or its USD accounting value for an asset-denominated request. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
deposit_addressesarray<object>RequiredDeposit Addresses
deposit_addresses[].networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
deposit_addresses[].addressstringRequiredAddress
deposit_addresses[].memostringOptionalIncoming route identifier as a string. This is the Memo on Cosmos or the decimal Destination Tag on XRP Ledger. Use it with the address. default: ""
deposit_addresses[].derivation_pathstringRequiredDerivation Path
deposit_addresses[].wallet_statusstringRequiredWallet Status
json
{
  "invoice_id": "inv_demo_001",
  "invoice_hash": "dd8659b3058a",
  "invoice_url": "string",
  "requested_usd_amount": "10",
  "service_fee_usd_amount": "0.15",
  "total_payable_usd_amount": "10.15",
  "expires_at": "2026-12-02T12:20:00Z",
  "status": "waiting_payment",
  "buy_type": "balance",
  "invoice_language": "auto",
  "resolved_language": "auto",
  "success_url": "https://merchant.example/payment/success",
  "cancel_url": "https://merchant.example/payment/cancel",
  "payment_session_started_at": "2026-12-02T12:00:00Z",
  "payment_session_expires_at": "2026-12-02T12:20:00Z",
  "payment_session_active": true,
  "selected_network": "Tron",
  "selected_asset": "USDT",
  "payment_options": [
    {
      "network": "Tron",
      "asset": "USDT",
      "option_key": "Tron:USDT",
      "fee_percent": "1.5",
      "fee_usd_amount": "0.15",
      "total_payable_usd_amount": "10.15",
      "amount_crypto": "10.150000",
      "rate_value": "1",
      "rate_locked_until": "2026-12-02T12:20:00Z",
      "required_confirmations": 1,
      "network_logo_url": "Tron",
      "asset_logo_url": "USDT"
    }
  ],
  "tracked_payment_option": null,
  "payment_route_locked": true,
  "amount_type": "asset",
  "requested_amount": "10",
  "requested_currency": "USDT",
  "asset_settlement": {
    "network": "Tron",
    "asset": "USDT",
    "confirmed_amount": "0.000000",
    "credited_fee_amount": "0.000000",
    "credited_net_amount": "0.000000"
  },
  "order_id": "order_1001",
  "fiat_currency": "USD",
  "amount_fiat": "10",
  "deposit_addresses": [
    {
      "network": "Tron",
      "address": "TQ9ExampleDestinationAddress123456789",
      "memo": "",
      "derivation_path": "string",
      "wallet_status": "string"
    }
  ]
}
Errors & recovery401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Invoice not found
  • Project API key is required
json
{
  "detail": "Error description"
}
GET

Get Invoice Payments

/api/v1/invoices/{invoice_id}/payments
X-API-Key
  • Reconcile cumulative net credit with credited_total_amount, the fee with credited_fee_total, and each transfer with items[].crediting_status.
  • The example shows a confirmed underpayment in balance mode. A package underpayment usually has zero credited total.
Parameters & request example
FieldTypePresenceMeaning & constraints
invoice_idpath · stringRequiredInvoice identifier returned on creation.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/invoices/YOUR_INVOICE_ID/payments' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
invoice_idstringRequiredInvoice identifier returned on creation.
invoice_statusstringRequiredCurrent invoice status. Use the monetary fields of the authenticated endpoint to reconcile credit.
buy_typestringRequiredpackage: order payment; balance: credit actual confirmed amount after fee.
credited_total_amountstringOptionalCurrent cumulative net credit for the invoice, in asset units. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
credited_fee_totalstringOptionalCurrent cumulative invoice fee, in asset units. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
itemsarray<object>RequiredTransfers attributed to the invoice, including those still awaiting confirmations.
items[].transaction_idstringRequiredTransaction Id
items[].invoice_idstringRequiredInvoice identifier returned on creation.
items[].networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
items[].assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
items[].tx_hashstringRequiredTx Hash
items[].logical_indexstringRequiredLogical Index
items[].addressstringRequiredAddress
items[].amountstringRequiredGross quantity detected in the transfer, in units of asset. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
items[].confirmationsintegerRequiredCurrent confirmation count of this transfer. Compare with required_confirmations in the selected invoice option.
items[].block_numberinteger / nullOptionalBlock Number
items[].statusstringRequiredTransfer state. pending is awaiting network confirmations. confirmed meets the required confirmation threshold.
items[].buy_typestringRequiredpackage: order payment; balance: credit actual confirmed amount after fee.
items[].crediting_statusstringRequiredCredit state for this transfer. Examples include pending_confirmation, credited, and withheld_exact_payment_required.
items[].net_amount_after_feestringOptionalNet credit recorded on the transfer. For package invoices, reconcile against the invoice-level credited_total_amount. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
items[].fee_amountstringOptionalFee recorded on the transfer, in asset units. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
items[].detected_atstringRequiredTime the transfer was detected. format: date-time
items[].confirmed_atstring / nullOptionalTime the confirmation threshold was reached. It may be null before confirmation. format: date-time
json
{
  "invoice_id": "inv_demo_001",
  "invoice_status": "wrong_amount",
  "buy_type": "balance",
  "credited_total_amount": "6.000000",
  "credited_fee_total": "0.090000",
  "items": [
    {
      "network": "Tron",
      "asset": "USDT",
      "confirmations": 20,
      "status": "confirmed",
      "transaction_id": "tx_demo_001",
      "invoice_id": "inv_demo_001",
      "tx_hash": "DEMO_TX_HASH",
      "logical_index": "0",
      "address": "YOUR_INVOICE_ADDRESS",
      "amount": "6.090000",
      "block_number": 80000000,
      "buy_type": "balance",
      "crediting_status": "credited",
      "net_amount_after_fee": "6.000000",
      "fee_amount": "0.090000",
      "detected_at": "2026-12-03T11:04:00Z",
      "confirmed_at": "2026-12-03T11:05:00Z"
    }
  ]
}
Errors & recovery401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Invoice not found
  • Project API key is required
json
{
  "detail": "Error description"
}
GET

Get Invoice By Hash

/api/v1/public/invoices/by-hash/{invoice_hash}
No API key
  • With payment_route_locked: true, use the selected pair, amount and active session in the response. Use the authenticated invoice read to reconcile credits.
Parameters & request example
FieldTypePresenceMeaning & constraints
invoice_hashpath · stringRequiredPublic identifier from the checkout URL. Keep customer links private.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/public/invoices/by-hash/YOUR_INVOICE_HASH'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
invoice_idstringRequiredInvoice ID for authenticated merchant API requests.
invoice_hashstringRequiredHosted payment identifier used in the checkout link and its public endpoints.
invoice_urlstringRequiredHosted checkout URL to share with the payer.
requested_usd_amountstringRequiredUSD equivalent of the requested amount before the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
service_fee_usd_amountstring / nullOptionalCommon quoted fee in USD, if it is the same across options. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
total_payable_usd_amountstring / nullOptionalCommon quoted total including the fee in USD, if it is the same across options. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
expires_atstringRequiredDeadline of the current phase. In created it is the route selection deadline, 24 hours from creation by default. Once a session opens it is the payment deadline. format: date-time
statusstringRequiredInvoice lifecycle status. created awaits route selection, waiting_payment has an open payment session, and pending has a detected transfer awaiting confirmations. paid is accepted, paid_over has an overpayment, wrong_amount, partially_paid and additional_payment require amount reconciliation, and late_payment records an attributed late transfer. expired and cancel close payment. Check settlement separately from invoice status.
buy_typestringRequiredSettlement mode selected at creation. package or balance.
invoice_languagestringRequiredInvoice Language
resolved_languagestringRequiredResolved Language
success_urlstring / nullOptionalAbsolute HTTP(S) return URL after payment. A redirect does not prove credit.
cancel_urlstring / nullOptionalAbsolute HTTP(S) return URL on cancellation.
payment_session_started_atstring / nullOptionalTime the payment session opened. For a fixed route it is the invoice creation time. Before route selection the value is null. format: date-time
payment_session_expires_atstring / nullOptionalDeadline of the opened payment session, 20 minutes from session start by default. Before the session opens the value is null. format: date-time
payment_session_activebooleanOptionalThe payment window is open and the selected option is currently available. default: false
selected_networkstring / nullOptionalSelected Network
selected_assetstring / nullOptionalSelected Asset
payment_optionsarray<object>RequiredPayment routes currently offered for this invoice.
payment_options[].networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
payment_options[].assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
payment_options[].option_keystringRequiredNetwork and asset combined as network:asset.
payment_options[].fee_percentstringOptionalService fee percentage applied to this payment option. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].fee_usd_amountstringOptionalUSD valuation of the quoted service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].total_payable_usd_amountstringOptionalUSD valuation of the quoted payment including the service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].amount_cryptostringRequiredExact amount to send in units of this asset, including the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].rate_valuestringRequiredUSD quote per one unit of this asset used to price the payment option. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].rate_locked_untilstringRequiredQuote deadline for this option. The initial quote before route selection lasts 120 seconds by default. For a fixed route it matches the payment deadline. format: date-time
payment_options[].required_confirmationsintegerRequiredConfirmation threshold for this option. Some networks report a finalized transfer directly.
payment_options[].network_logo_urlstring / nullOptionalNetwork Logo Url
payment_options[].asset_logo_urlstring / nullOptionalAsset Logo Url
tracked_payment_optionobject / nullOptionalPreviously offered route retained to track an existing transfer when that route becomes unavailable.
tracked_payment_option.networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
tracked_payment_option.assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
tracked_payment_option.option_keystringRequiredNetwork and asset combined as network:asset.
tracked_payment_option.fee_percentstringOptionalService fee percentage applied to this payment option. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.fee_usd_amountstringOptionalUSD valuation of the quoted service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.total_payable_usd_amountstringOptionalUSD valuation of the quoted payment including the service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.amount_cryptostringRequiredExact amount to send in units of this asset, including the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.rate_valuestringRequiredUSD quote per one unit of this asset used to price the payment option. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.rate_locked_untilstringRequiredQuote deadline for this option. The initial quote before route selection lasts 120 seconds by default. For a fixed route it matches the payment deadline. format: date-time
tracked_payment_option.required_confirmationsintegerRequiredConfirmation threshold for this option. Some networks report a finalized transfer directly.
tracked_payment_option.network_logo_urlstring / nullOptionalNetwork Logo Url
tracked_payment_option.asset_logo_urlstring / nullOptionalAsset Logo Url
payment_route_lockedboolean / nullOptionalPresent for a network and asset fixed by the merchant at invoice creation.
amount_typestring / nullOptionalDenomination of the original request when recorded. enum: "fiat", "asset"
requested_amountstring / nullOptionalOriginal requested amount before the fee, when recorded. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
requested_currencystring / nullOptionalFiat currency or asset symbol of the original request, when recorded.
deposit_addressesarray<object>RequiredPayment address and any required memo or destination tag by network.
deposit_addresses[].networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
deposit_addresses[].addressstringRequiredPayment address for this network.
deposit_addresses[].memostringOptionalRequired payment memo on Cosmos or destination tag on XRPL. Empty for other networks. default: ""
json
{
  "invoice_id": "inv_demo_001",
  "invoice_hash": "dd8659b3058a",
  "invoice_url": "string",
  "requested_usd_amount": "10",
  "service_fee_usd_amount": "0.15",
  "total_payable_usd_amount": "10.15",
  "expires_at": "2026-12-02T12:20:00Z",
  "status": "waiting_payment",
  "buy_type": "balance",
  "invoice_language": "auto",
  "resolved_language": "auto",
  "success_url": "https://merchant.example/payment/success",
  "cancel_url": "https://merchant.example/payment/cancel",
  "payment_session_started_at": "2026-12-02T12:00:00Z",
  "payment_session_expires_at": "2026-12-02T12:20:00Z",
  "payment_session_active": true,
  "selected_network": "Tron",
  "selected_asset": "USDT",
  "payment_options": [
    {
      "network": "Tron",
      "asset": "USDT",
      "option_key": "Tron:USDT",
      "fee_percent": "1.5",
      "fee_usd_amount": "0.15",
      "total_payable_usd_amount": "10.15",
      "amount_crypto": "10.150000",
      "rate_value": "1",
      "rate_locked_until": "2026-12-02T12:20:00Z",
      "required_confirmations": 1,
      "network_logo_url": "Tron",
      "asset_logo_url": "USDT"
    }
  ],
  "tracked_payment_option": null,
  "payment_route_locked": true,
  "amount_type": "asset",
  "requested_amount": "10",
  "requested_currency": "USDT",
  "deposit_addresses": [
    {
      "network": "Tron",
      "address": "TQ9ExampleDestinationAddress123456789",
      "memo": ""
    }
  ]
}
Errors & recovery404 · 422 · 429

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
429Rate limit exceededBack off with jitter and honor Retry-After when present.

Possible detail messages

  • Too many public invoice requests
  • Invoice not found
json
{
  "detail": "Error description"
}
POST

Start Public Invoice Payment Session

/api/v1/public/invoices/by-hash/{invoice_hash}/payment-session
Checkout page cookie
  • First open /payment_{invoice_hash} to obtain the access cookie. Normally called by hosted checkout.
  • Selecting a pair before the created deadline opens a separate 20-minute payment window. expires_at becomes payment_session_expires_at. Repeating the same active pair retains the existing deadline.
  • An expired invoice returns HTTP 400 with Invoice is already finalized. With payment_route_locked: true, the session is already open.
Parameters & request example
FieldTypePresenceMeaning & constraints
invoice_hashpath · stringRequiredPublic identifier from the checkout URL. Keep customer links private.

JSON body

FieldTypePresenceMeaning & constraints
networkstringRequiredNetwork of an available option returned by the hosted invoice. min length: 1; max length: 32
assetstringRequiredAsset of the same available payment option. min length: 1; max length: 32
bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/public/invoices/by-hash/YOUR_INVOICE_HASH/payment-session' \
  --cookie checkout-cookies.txt \
  --header 'Content-Type: application/json' \
  --data '{
  "network": "Ethereum",
  "asset": "USDT"
}'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
invoice_idstringRequiredInvoice ID for authenticated merchant API requests.
invoice_hashstringRequiredHosted payment identifier used in the checkout link and its public endpoints.
invoice_urlstringRequiredHosted checkout URL to share with the payer.
requested_usd_amountstringRequiredUSD equivalent of the requested amount before the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
service_fee_usd_amountstring / nullOptionalCommon quoted fee in USD, if it is the same across options. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
total_payable_usd_amountstring / nullOptionalCommon quoted total including the fee in USD, if it is the same across options. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
expires_atstringRequiredDeadline of the current phase. In created it is the route selection deadline, 24 hours from creation by default. Once a session opens it is the payment deadline. format: date-time
statusstringRequiredInvoice lifecycle status. created awaits route selection, waiting_payment has an open payment session, and pending has a detected transfer awaiting confirmations. paid is accepted, paid_over has an overpayment, wrong_amount, partially_paid and additional_payment require amount reconciliation, and late_payment records an attributed late transfer. expired and cancel close payment. Check settlement separately from invoice status.
buy_typestringRequiredSettlement mode selected at creation. package or balance.
invoice_languagestringRequiredInvoice Language
resolved_languagestringRequiredResolved Language
success_urlstring / nullOptionalAbsolute HTTP(S) return URL after payment. A redirect does not prove credit.
cancel_urlstring / nullOptionalAbsolute HTTP(S) return URL on cancellation.
payment_session_started_atstring / nullOptionalTime the payment session opened. For a fixed route it is the invoice creation time. Before route selection the value is null. format: date-time
payment_session_expires_atstring / nullOptionalDeadline of the opened payment session, 20 minutes from session start by default. Before the session opens the value is null. format: date-time
payment_session_activebooleanOptionalThe payment window is open and the selected option is currently available. default: false
selected_networkstring / nullOptionalSelected Network
selected_assetstring / nullOptionalSelected Asset
payment_optionsarray<object>RequiredPayment routes currently offered for this invoice.
payment_options[].networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
payment_options[].assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
payment_options[].option_keystringRequiredNetwork and asset combined as network:asset.
payment_options[].fee_percentstringOptionalService fee percentage applied to this payment option. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].fee_usd_amountstringOptionalUSD valuation of the quoted service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].total_payable_usd_amountstringOptionalUSD valuation of the quoted payment including the service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].amount_cryptostringRequiredExact amount to send in units of this asset, including the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].rate_valuestringRequiredUSD quote per one unit of this asset used to price the payment option. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].rate_locked_untilstringRequiredQuote deadline for this option. The initial quote before route selection lasts 120 seconds by default. For a fixed route it matches the payment deadline. format: date-time
payment_options[].required_confirmationsintegerRequiredConfirmation threshold for this option. Some networks report a finalized transfer directly.
payment_options[].network_logo_urlstring / nullOptionalNetwork Logo Url
payment_options[].asset_logo_urlstring / nullOptionalAsset Logo Url
tracked_payment_optionobject / nullOptionalPreviously offered route retained to track an existing transfer when that route becomes unavailable.
tracked_payment_option.networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
tracked_payment_option.assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
tracked_payment_option.option_keystringRequiredNetwork and asset combined as network:asset.
tracked_payment_option.fee_percentstringOptionalService fee percentage applied to this payment option. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.fee_usd_amountstringOptionalUSD valuation of the quoted service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.total_payable_usd_amountstringOptionalUSD valuation of the quoted payment including the service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.amount_cryptostringRequiredExact amount to send in units of this asset, including the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.rate_valuestringRequiredUSD quote per one unit of this asset used to price the payment option. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.rate_locked_untilstringRequiredQuote deadline for this option. The initial quote before route selection lasts 120 seconds by default. For a fixed route it matches the payment deadline. format: date-time
tracked_payment_option.required_confirmationsintegerRequiredConfirmation threshold for this option. Some networks report a finalized transfer directly.
tracked_payment_option.network_logo_urlstring / nullOptionalNetwork Logo Url
tracked_payment_option.asset_logo_urlstring / nullOptionalAsset Logo Url
payment_route_lockedboolean / nullOptionalPresent for a network and asset fixed by the merchant at invoice creation.
amount_typestring / nullOptionalDenomination of the original request when recorded. enum: "fiat", "asset"
requested_amountstring / nullOptionalOriginal requested amount before the fee, when recorded. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
requested_currencystring / nullOptionalFiat currency or asset symbol of the original request, when recorded.
deposit_addressesarray<object>RequiredPayment address and any required memo or destination tag by network.
deposit_addresses[].networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
deposit_addresses[].addressstringRequiredPayment address for this network.
deposit_addresses[].memostringOptionalRequired payment memo on Cosmos or destination tag on XRPL. Empty for other networks. default: ""
json
{
  "invoice_id": "inv_demo_001",
  "invoice_hash": "dd8659b3058a",
  "invoice_url": "string",
  "requested_usd_amount": "string",
  "service_fee_usd_amount": "string",
  "total_payable_usd_amount": "string",
  "expires_at": "2026-12-03T12:15:00Z",
  "status": "waiting_payment",
  "buy_type": "package",
  "invoice_language": "auto",
  "resolved_language": "auto",
  "success_url": "https://merchant.example/payment/success",
  "cancel_url": "https://merchant.example/payment/cancel",
  "payment_session_started_at": "2026-12-03T11:55:00Z",
  "payment_session_expires_at": "2026-12-03T12:15:00Z",
  "payment_session_active": true,
  "selected_network": "Ethereum",
  "selected_asset": "USDT",
  "payment_options": [
    {
      "network": "Ethereum",
      "asset": "USDT",
      "option_key": "Ethereum:USDT",
      "fee_percent": "0",
      "fee_usd_amount": "0",
      "total_payable_usd_amount": "0",
      "amount_crypto": "string",
      "rate_value": "string",
      "rate_locked_until": "2026-12-03T11:57:00Z",
      "required_confirmations": 1,
      "network_logo_url": "Tron",
      "asset_logo_url": "USDT"
    }
  ],
  "tracked_payment_option": null,
  "deposit_addresses": [
    {
      "network": "Tron",
      "address": "TQ9ExampleDestinationAddress123456789",
      "memo": ""
    }
  ]
}
Errors & recovery400 · 403 · 404 · 422 · 429

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
429Rate limit exceededBack off with jitter and honor Retry-After when present.

Possible detail messages

  • Too many public invoice requests
  • Open the hosted invoice page before starting a payment session
  • Invoice not found
  • Invoice does not support the specified network and asset
  • Payment route is already locked for this invoice
  • Invoice is already finalized
json
{
  "detail": "Error description"
}
GET

Get Public Invoice Payments By Hash

/api/v1/public/invoices/by-hash/{invoice_hash}/payments
No API key
  • Use this endpoint for checkout progress. It returns the invoice status, network, asset, transfer state and confirmations. Reconcile credit with GET /api/v1/invoices/{invoice_id}/payments using the project API key.
Parameters & request example
FieldTypePresenceMeaning & constraints
invoice_hashpath · stringRequiredPublic identifier from the checkout URL. Keep customer links private.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/public/invoices/by-hash/YOUR_INVOICE_HASH/payments'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
invoice_idstringRequiredInvoice identifier returned on creation.
invoice_statusstringRequiredCurrent invoice status. Use the monetary fields of the authenticated endpoint to reconcile credit.
itemsarray<object>RequiredPayer-facing transfer progress for each network and asset.
items[].networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
items[].assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
items[].confirmationsintegerRequiredCurrent confirmation count of this transfer. Compare with required_confirmations in the selected invoice option.
items[].statusstringRequiredTransfer state. pending is awaiting network confirmations. confirmed meets the required confirmation threshold.
json
{
  "invoice_id": "inv_demo_001",
  "invoice_status": "wrong_amount",
  "items": [
    {
      "network": "Tron",
      "asset": "USDT",
      "confirmations": 20,
      "status": "confirmed"
    }
  ]
}
Errors & recovery404 · 422 · 429

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
429Rate limit exceededBack off with jitter and honor Retry-After when present.

Possible detail messages

  • Too many public invoice requests
  • Invoice not found
json
{
  "detail": "Error description"
}
GET

Poll Invoice By Order

/api/v1/projects/{project_id}/invoices/by-order/{order_id}
X-API-Key
  • For a fixed route, asset_settlement gives total confirmed transfers, recorded fees, and the credited asset quantity.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
order_idpath · stringRequiredYour order identifier. Reuse in the same project returns the existing invoice.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/invoices/by-order/YOUR_ORDER_ID' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
invoice_idstringRequiredInvoice ID for authenticated merchant API requests.
invoice_hashstringRequiredHosted payment identifier used in the checkout link and its public endpoints.
invoice_urlstringRequiredHosted checkout URL to share with the payer.
requested_usd_amountstringRequiredUSD equivalent of the requested amount before the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
service_fee_usd_amountstring / nullOptionalCommon quoted fee in USD, if it is the same across options. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
total_payable_usd_amountstring / nullOptionalCommon quoted total including the fee in USD, if it is the same across options. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
expires_atstringRequiredDeadline of the current phase. In created it is the route selection deadline, 24 hours from creation by default. Once a session opens it is the payment deadline. format: date-time
statusstringRequiredInvoice lifecycle status. created awaits route selection, waiting_payment has an open payment session, and pending has a detected transfer awaiting confirmations. paid is accepted, paid_over has an overpayment, wrong_amount, partially_paid and additional_payment require amount reconciliation, and late_payment records an attributed late transfer. expired and cancel close payment. Check settlement separately from invoice status.
buy_typestringRequiredSettlement mode selected at creation. package or balance.
invoice_languagestringRequiredInvoice Language
resolved_languagestringRequiredResolved Language
success_urlstring / nullOptionalAbsolute HTTP(S) return URL after payment. A redirect does not prove credit.
cancel_urlstring / nullOptionalAbsolute HTTP(S) return URL on cancellation.
payment_session_started_atstring / nullOptionalTime the payment session opened. For a fixed route it is the invoice creation time. Before route selection the value is null. format: date-time
payment_session_expires_atstring / nullOptionalDeadline of the opened payment session, 20 minutes from session start by default. Before the session opens the value is null. format: date-time
payment_session_activebooleanOptionalThe payment window is open and the selected option is currently available. default: false
selected_networkstring / nullOptionalSelected Network
selected_assetstring / nullOptionalSelected Asset
payment_optionsarray<object>RequiredPayment routes currently offered for this invoice.
payment_options[].networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
payment_options[].assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
payment_options[].option_keystringRequiredNetwork and asset combined as network:asset.
payment_options[].fee_percentstringOptionalService fee percentage applied to this payment option. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].fee_usd_amountstringOptionalUSD valuation of the quoted service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].total_payable_usd_amountstringOptionalUSD valuation of the quoted payment including the service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].amount_cryptostringRequiredExact amount to send in units of this asset, including the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].rate_valuestringRequiredUSD quote per one unit of this asset used to price the payment option. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payment_options[].rate_locked_untilstringRequiredQuote deadline for this option. The initial quote before route selection lasts 120 seconds by default. For a fixed route it matches the payment deadline. format: date-time
payment_options[].required_confirmationsintegerRequiredConfirmation threshold for this option. Some networks report a finalized transfer directly.
payment_options[].network_logo_urlstring / nullOptionalNetwork Logo Url
payment_options[].asset_logo_urlstring / nullOptionalAsset Logo Url
tracked_payment_optionobject / nullOptionalPreviously offered route retained to track an existing transfer when that route becomes unavailable.
tracked_payment_option.networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
tracked_payment_option.assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
tracked_payment_option.option_keystringRequiredNetwork and asset combined as network:asset.
tracked_payment_option.fee_percentstringOptionalService fee percentage applied to this payment option. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.fee_usd_amountstringOptionalUSD valuation of the quoted service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.total_payable_usd_amountstringOptionalUSD valuation of the quoted payment including the service fee. default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.amount_cryptostringRequiredExact amount to send in units of this asset, including the service fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.rate_valuestringRequiredUSD quote per one unit of this asset used to price the payment option. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tracked_payment_option.rate_locked_untilstringRequiredQuote deadline for this option. The initial quote before route selection lasts 120 seconds by default. For a fixed route it matches the payment deadline. format: date-time
tracked_payment_option.required_confirmationsintegerRequiredConfirmation threshold for this option. Some networks report a finalized transfer directly.
tracked_payment_option.network_logo_urlstring / nullOptionalNetwork Logo Url
tracked_payment_option.asset_logo_urlstring / nullOptionalAsset Logo Url
payment_route_lockedboolean / nullOptionalPresent for a network and asset fixed by the merchant at invoice creation.
amount_typestring / nullOptionalDenomination of the original request when recorded. enum: "fiat", "asset"
requested_amountstring / nullOptionalOriginal requested amount before the fee, when recorded. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
requested_currencystring / nullOptionalFiat currency or asset symbol of the original request, when recorded.
asset_settlementobject / nullOptionalSettlement totals in units of the selected asset for a fixed route.
asset_settlement.networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
asset_settlement.assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
asset_settlement.confirmed_amountstringRequiredTotal confirmed transfers for the selected pair. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
asset_settlement.credited_fee_amountstringRequiredFee recorded in units of the selected asset. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
asset_settlement.credited_net_amountstringRequiredActual quantity of the asset credited to the project after the fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
order_idstringRequiredYour order identifier. Reuse in the same project returns the existing invoice.
fiat_currencystringRequiredCurrency of amount_fiat. For an asset-denominated request, this is USD.
amount_fiatstringRequiredOriginal fiat amount, or its USD accounting value for an asset-denominated request. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
deposit_addressesarray<object>RequiredDeposit Addresses
deposit_addresses[].networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
deposit_addresses[].addressstringRequiredAddress
deposit_addresses[].memostringOptionalIncoming route identifier as a string. This is the Memo on Cosmos or the decimal Destination Tag on XRP Ledger. Use it with the address. default: ""
deposit_addresses[].derivation_pathstringRequiredDerivation Path
deposit_addresses[].wallet_statusstringRequiredWallet Status
project_idstringRequiredProject identifier; must belong to the API key.
json
{
  "invoice_id": "inv_demo_001",
  "invoice_hash": "dd8659b3058a",
  "invoice_url": "string",
  "requested_usd_amount": "10",
  "service_fee_usd_amount": "0.15",
  "total_payable_usd_amount": "10.15",
  "expires_at": "2026-12-02T12:20:00Z",
  "status": "waiting_payment",
  "buy_type": "balance",
  "invoice_language": "auto",
  "resolved_language": "auto",
  "success_url": "https://merchant.example/payment/success",
  "cancel_url": "https://merchant.example/payment/cancel",
  "payment_session_started_at": "2026-12-02T12:00:00Z",
  "payment_session_expires_at": "2026-12-02T12:20:00Z",
  "payment_session_active": true,
  "selected_network": "Tron",
  "selected_asset": "USDT",
  "payment_options": [
    {
      "network": "Tron",
      "asset": "USDT",
      "option_key": "Tron:USDT",
      "fee_percent": "1.5",
      "fee_usd_amount": "0.15",
      "total_payable_usd_amount": "10.15",
      "amount_crypto": "10.150000",
      "rate_value": "1",
      "rate_locked_until": "2026-12-02T12:20:00Z",
      "required_confirmations": 1,
      "network_logo_url": "Tron",
      "asset_logo_url": "USDT"
    }
  ],
  "tracked_payment_option": null,
  "payment_route_locked": true,
  "amount_type": "asset",
  "requested_amount": "10",
  "requested_currency": "USDT",
  "asset_settlement": {
    "network": "Tron",
    "asset": "USDT",
    "confirmed_amount": "0.000000",
    "credited_fee_amount": "0.000000",
    "credited_net_amount": "0.000000"
  },
  "order_id": "order_1001",
  "fiat_currency": "USD",
  "amount_fiat": "10",
  "deposit_addresses": [
    {
      "network": "Tron",
      "address": "TQ9ExampleDestinationAddress123456789",
      "memo": "",
      "derivation_path": "string",
      "wallet_status": "string"
    }
  ],
  "project_id": "project_demo_001"
}
Errors & recovery401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Invoice not found
  • Project API key is required
json
{
  "detail": "Error description"
}
GET

Get Invoice Qr

/api/v1/invoices/{invoice_id}/qr
X-API-Key
Parameters & request example
FieldTypePresenceMeaning & constraints
invoice_idpath · stringRequiredInvoice identifier returned on creation.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/invoices/YOUR_INVOICE_ID/qr' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · image/svg+xml

Shape illustration: values are examples; actual state may differ.

xml
<svg xmlns="http://www.w3.org/2000/svg">…</svg>
Errors & recovery401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Invoice not found
  • Project API key is required
json
{
  "detail": "Error description"
}
GET

Get Public Invoice Payment Qr

/api/v1/public/invoices/by-hash/{invoice_hash}/payment-qr
No API key
  • The address QR contains the recipient address. This is cosmos1… for Cosmos or a classic r… address for XRP Ledger. Enter the amount and the required Memo or Destination Tag in separate wallet fields.
  • The 200 response returns SVG with Cache-Control: no-store.
Parameters & request example
FieldTypePresenceMeaning & constraints
invoice_hashpath · stringRequiredPublic identifier from the checkout URL. Keep customer links private.
networkquery · stringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
assetquery · stringRequiredAsset code, e.g. USDT. Must be available for this network and project.
kindquery · stringOptionaladdress encodes the exact recipient address. memo returns a separate QR containing the required Cosmos Memo or XRP Ledger Destination Tag. enum: "address", "memo"; default: "address"

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/public/invoices/by-hash/YOUR_INVOICE_HASH/payment-qr?network=Cosmos&asset=ATOM' --output cosmos-address.svg

curl --request GET 'https://pay.bitcofy.pro/api/v1/public/invoices/by-hash/YOUR_INVOICE_HASH/payment-qr?network=Cosmos&asset=ATOM&kind=memo' --output cosmos-memo.svg
Successful response

200 · image/svg+xml

Shape illustration: values are examples; actual state may differ.

xml
<svg xmlns="http://www.w3.org/2000/svg">…</svg>
Errors & recovery400 · 404 · 409 · 422 · 429

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400A separate identifier QR is unavailable for the selected pairUse kind=address. For kind=memo, select Cosmos / ATOM or XRP Ledger / XRP or RLUSD.
404Invoice or payment option unavailableVerify invoice_hash and the network and asset pair in payment_options.
409Required payment identifier unavailableOpen checkout again. Wait until you have the exact Memo or Destination Tag before paying.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
429Rate limit exceededBack off with jitter and honor Retry-After when present.

Possible detail messages

  • Too many public invoice requests
  • Invoice not found
  • Payment option not found
  • This option does not use a Memo or Destination Tag
  • Cosmos payment Memo is unavailable
  • XRPL Destination Tag is unavailable
json
{
  "detail": "Error description"
}

Project & keys

GET

List Project Api Keys

/api/v1/projects/{project_id}/api-keys
X-API-Key
  • Creation returns the key and secret once. Listing exposes prefixes and state.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/api-keys' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
[].key_idstringRequiredKey identifier from the project key list.
[].project_idstringRequiredProject identifier; must belong to the API key.
[].namestringRequiredHuman-readable key label.
[].key_prefixstringRequiredKey Prefix
[].secret_prefixstring / nullOptionalSecret Prefix
[].api_keystring / nullOptionalProject API access key; store immediately on creation.
[].api_secretstring / nullOptionalWrite API secret; returned on creation, keep on your server.
[].is_activebooleanRequiredIs Active
[].last_used_atstring / nullOptionalLast Used At format: date-time
[].created_atstringRequiredCreated At format: date-time
json
[
  {
    "key_id": "string",
    "project_id": "project_demo_001",
    "name": "string",
    "key_prefix": "string",
    "secret_prefix": "secret_123456",
    "api_key": "string",
    "api_secret": "secret_123456",
    "is_active": false,
    "last_used_at": "2026-07-13T12:00:00Z",
    "created_at": "2026-07-13T12:00:00Z"
  }
]
Errors & recovery401 · 403 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Project API key is required
json
{
  "detail": "Error description"
}
POST

Create Project Api Key

/api/v1/projects/{project_id}/api-keys
X-API-Key + X-API-Secret
  • Creation returns the key and secret once. Listing exposes prefixes and state.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.
X-API-SecretheaderRequiredAPI secret for this key; required for writes.

JSON body

FieldTypePresenceMeaning & constraints
namestringRequiredHuman-readable key label. min length: 1; max length: 128
bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/api-keys' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Integration key"
}'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
key_idstringRequiredKey identifier from the project key list.
project_idstringRequiredProject identifier; must belong to the API key.
namestringRequiredHuman-readable key label.
key_prefixstringRequiredKey Prefix
secret_prefixstring / nullOptionalSecret Prefix
api_keystringRequiredProject API access key; store immediately on creation.
api_secretstringRequiredWrite API secret; returned on creation, keep on your server.
is_activebooleanRequiredIs Active
last_used_atstring / nullOptionalLast Used At format: date-time
created_atstringRequiredCreated At format: date-time
json
{
  "key_id": "string",
  "project_id": "project_demo_001",
  "name": "string",
  "key_prefix": "string",
  "secret_prefix": "secret_123456",
  "api_key": "string",
  "api_secret": "secret_123456",
  "is_active": false,
  "last_used_at": "2026-07-13T12:00:00Z",
  "created_at": "2026-07-13T12:00:00Z"
}
Errors & recovery400 · 401 · 403 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
json
{
  "detail": "Error description"
}
POST

Deactivate Project Api Key

/api/v1/projects/{project_id}/api-keys/{key_id}/deactivate
X-API-Key + X-API-Secret
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
key_idpath · stringRequiredKey identifier from the project key list.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.
X-API-SecretheaderRequiredAPI secret for this key; required for writes.

No request body.

bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/api-keys/YOUR_KEY_ID/deactivate' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
key_idstringRequiredKey identifier from the project key list.
project_idstringRequiredProject identifier; must belong to the API key.
namestringRequiredHuman-readable key label.
key_prefixstringRequiredKey Prefix
secret_prefixstring / nullOptionalSecret Prefix
api_keystring / nullOptionalProject API access key; store immediately on creation.
api_secretstring / nullOptionalWrite API secret; returned on creation, keep on your server.
is_activebooleanRequiredIs Active
last_used_atstring / nullOptionalLast Used At format: date-time
created_atstringRequiredCreated At format: date-time
json
{
  "key_id": "string",
  "project_id": "project_demo_001",
  "name": "string",
  "key_prefix": "string",
  "secret_prefix": "secret_123456",
  "api_key": "string",
  "api_secret": "secret_123456",
  "is_active": false,
  "last_used_at": "2026-07-13T12:00:00Z",
  "created_at": "2026-07-13T12:00:00Z"
}
Errors & recovery400 · 401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
json
{
  "detail": "Error description"
}
POST

Register Payout Key

/api/v1/projects/{project_id}/security/payout-key
X-API-Key + X-API-Secret
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.
X-API-SecretheaderRequiredAPI secret for this key; required for writes.

JSON body

FieldTypePresenceMeaning & constraints
public_keystringRequiredEd25519 public key, 32 bytes encoded as Base64. min length: 32
algorithmstringOptionalEd25519. default: "Ed25519"
namestring / nullOptionalHuman-readable key label. max length: 128
bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/security/payout-key' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{
  "public_key": "BASE64_ED25519_PUBLIC_KEY",
  "algorithm": "Ed25519",
  "name": "string"
}'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
key_idstringRequiredKey identifier from the project key list.
project_idstringRequiredProject identifier; must belong to the API key.
namestringRequiredHuman-readable key label.
algorithmstringRequiredEd25519.
public_keystringRequiredEd25519 public key, 32 bytes encoded as Base64.
public_key_previewstringRequiredPublic Key Preview
originstringRequiredOrigin
is_activebooleanRequiredIs Active
created_atstringRequiredCreated At format: date-time
private_keystring / nullOptionalPrivate key: returned only on generation. Store securely immediately.
signing_message_examplestringRequiredCanonical message example; sign your actual operation values.
json
{
  "key_id": "string",
  "project_id": "project_demo_001",
  "name": "string",
  "algorithm": "string",
  "public_key": "BASE64_ED25519_PUBLIC_KEY",
  "public_key_preview": "BASE64_ED25519_PUBLIC_KEY",
  "origin": "string",
  "is_active": false,
  "created_at": "2026-07-13T12:00:00Z",
  "private_key": "BASE64_ED25519_PRIVATE_KEY",
  "signing_message_example": "string"
}
Errors & recovery400 · 401 · 403 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
json
{
  "detail": "Error description"
}
GET

List Project Payout Keys

/api/v1/projects/{project_id}/payout-keys
X-API-Key
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/payout-keys' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
[].key_idstringRequiredKey identifier from the project key list.
[].project_idstringRequiredProject identifier; must belong to the API key.
[].namestringRequiredHuman-readable key label.
[].algorithmstringRequiredEd25519.
[].public_keystringRequiredEd25519 public key, 32 bytes encoded as Base64.
[].public_key_previewstringRequiredPublic Key Preview
[].originstringRequiredOrigin
[].is_activebooleanRequiredIs Active
[].created_atstringRequiredCreated At format: date-time
json
[
  {
    "key_id": "string",
    "project_id": "project_demo_001",
    "name": "string",
    "algorithm": "string",
    "public_key": "BASE64_ED25519_PUBLIC_KEY",
    "public_key_preview": "BASE64_ED25519_PUBLIC_KEY",
    "origin": "string",
    "is_active": false,
    "created_at": "2026-07-13T12:00:00Z"
  }
]
Errors & recovery401 · 403 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Project API key is required
json
{
  "detail": "Error description"
}
POST

Generate Project Payout Key

/api/v1/projects/{project_id}/payout-keys/generate
X-API-Key + X-API-Secret
  • Returns an Ed25519 private_key once. Alternatively generate locally and register only public_key via /security/payout-key.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.
X-API-SecretheaderRequiredAPI secret for this key; required for writes.

JSON body

FieldTypePresenceMeaning & constraints
namestring / nullOptionalHuman-readable key label. max length: 128
bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/payout-keys/generate' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string"
}'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
key_idstringRequiredKey identifier from the project key list.
project_idstringRequiredProject identifier; must belong to the API key.
namestringRequiredHuman-readable key label.
algorithmstringRequiredEd25519.
public_keystringRequiredEd25519 public key, 32 bytes encoded as Base64.
public_key_previewstringRequiredPublic Key Preview
originstringRequiredOrigin
is_activebooleanRequiredIs Active
created_atstringRequiredCreated At format: date-time
private_keystring / nullOptionalPrivate key: returned only on generation. Store securely immediately.
signing_message_examplestringRequiredCanonical message example; sign your actual operation values.
json
{
  "key_id": "string",
  "project_id": "project_demo_001",
  "name": "string",
  "algorithm": "string",
  "public_key": "BASE64_ED25519_PUBLIC_KEY",
  "public_key_preview": "BASE64_ED25519_PUBLIC_KEY",
  "origin": "string",
  "is_active": false,
  "created_at": "2026-07-13T12:00:00Z",
  "private_key": "BASE64_ED25519_PRIVATE_KEY",
  "signing_message_example": "string"
}
Errors & recovery400 · 401 · 403 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
json
{
  "detail": "Error description"
}
POST

Delete Project Payout Key

/api/v1/projects/{project_id}/payout-keys/{key_id}/delete
X-API-Key + X-API-Secret
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
key_idpath · stringRequiredKey identifier from the project key list.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.
X-API-SecretheaderRequiredAPI secret for this key; required for writes.

No request body.

bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/payout-keys/YOUR_KEY_ID/delete' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
key_idstringRequiredKey identifier from the project key list.
project_idstringRequiredProject identifier; must belong to the API key.
namestringRequiredHuman-readable key label.
algorithmstringRequiredEd25519.
public_keystringRequiredEd25519 public key, 32 bytes encoded as Base64.
public_key_previewstringRequiredPublic Key Preview
originstringRequiredOrigin
is_activebooleanRequiredIs Active
created_atstringRequiredCreated At format: date-time
json
{
  "key_id": "string",
  "project_id": "project_demo_001",
  "name": "string",
  "algorithm": "string",
  "public_key": "BASE64_ED25519_PUBLIC_KEY",
  "public_key_preview": "BASE64_ED25519_PUBLIC_KEY",
  "origin": "string",
  "is_active": false,
  "created_at": "2026-07-13T12:00:00Z"
}
Errors & recovery400 · 401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
json
{
  "detail": "Error description"
}
GET

Get Project Payout Key Signing Message Example

/api/v1/projects/{project_id}/payout-keys/{key_id}/signing-message-example
X-API-Key
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
key_idpath · stringRequiredKey identifier from the project key list.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/payout-keys/YOUR_KEY_ID/signing-message-example' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
key_idstringRequiredKey identifier from the project key list.
project_idstringRequiredProject identifier; must belong to the API key.
algorithmstringRequiredEd25519.
public_keystringRequiredEd25519 public key, 32 bytes encoded as Base64.
originstringRequiredOrigin
signing_message_examplestringRequiredCanonical message example; sign your actual operation values.
json
{
  "key_id": "string",
  "project_id": "project_demo_001",
  "algorithm": "string",
  "public_key": "BASE64_ED25519_PUBLIC_KEY",
  "origin": "string",
  "signing_message_example": "string"
}
Errors & recovery401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Project API key is required
json
{
  "detail": "Error description"
}
GET

Get Project Balances

/api/v1/projects/{project_id}/balances
X-API-Key
  • Select the merchant_balance row matching the exact network and asset. balance is the ledger balance, available_for_withdrawal is the amount ready for withdrawal, and pending_aggregation_balance is the amount awaiting aggregation.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/balances' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
balancesarray<object>RequiredBalances
balances[].project_idstringRequiredProject identifier; must belong to the API key.
balances[].networkstring / nullRequiredNetwork of the balance, when applicable.
balances[].assetstring / nullRequiredAsset of the balance. Amounts for this row use units of this asset.
balances[].account_codestringRequiredLedger account type. Use merchant_balance for merchant funds.
balances[].balancestringRequiredLedger balance for this network and asset, in asset units. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
balances[].available_for_withdrawalstring / nullOptionalAmount available to this project for withdrawal in this pair, accounting for aggregation and reservations. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
balances[].pending_aggregation_balancestring / nullOptionalAmount recorded for this pair and awaiting aggregation, where applicable. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
json
{
  "balances": [
    {
      "project_id": "YOUR_PROJECT_ID",
      "network": "Tron",
      "asset": "USDT",
      "account_code": "merchant_balance",
      "balance": "6.000000",
      "available_for_withdrawal": "0.000000",
      "pending_aggregation_balance": "6.000000"
    }
  ]
}
Errors & recovery401 · 403 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Project API key is required
json
{
  "detail": "Error description"
}
GET

Get Project Transactions

/api/v1/projects/{project_id}/transactions
X-API-Key
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/transactions' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
itemsarray<object>RequiredItems
items[].transaction_typestringRequiredTransaction Type
items[].reference_idstringRequiredReference Id
items[].statusstringRequiredObject state; see the relevant workflow for values and actions.
items[].networkstring / nullOptionalNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
items[].assetstring / nullOptionalAsset code, e.g. USDT. Must be available for this network and project.
items[].amountstringRequiredPositive amount as a decimal string. For invoices use currency units. For payouts use asset units including the fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
items[].currencystring / nullOptionalFor fiat use USD, RUB or EUR. In asset mode use the ticker matching asset.
items[].created_atstringRequiredCreated At format: date-time
items[].metaobjectOptionalMeta
json
{
  "items": [
    {
      "transaction_type": "string",
      "reference_id": "string",
      "status": "ok",
      "network": "Tron",
      "asset": "USDT",
      "amount": "string",
      "currency": "USD",
      "created_at": "2026-07-13T12:00:00Z",
      "meta": {
        "example_key": "string"
      }
    }
  ]
}
Errors & recovery401 · 403 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Project API key is required
json
{
  "detail": "Error description"
}
GET

Export Project Transactions Csv

/api/v1/projects/{project_id}/transactions/export.csv
X-API-Key
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/transactions/export.csv' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · text/csv

Shape illustration: values are examples; actual state may differ.

text
Transaction CSV file. Columns depend on the export format.
Errors & recovery401 · 403 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Project API key is required
json
{
  "detail": "Error description"
}
GET

Export Project Transactions Quickbooks Csv

/api/v1/projects/{project_id}/transactions/export-quickbooks.csv
X-API-Key
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/transactions/export-quickbooks.csv' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · text/csv

Shape illustration: values are examples; actual state may differ.

text
Transaction CSV file. Columns depend on the export format.
Errors & recovery401 · 403 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Project API key is required
json
{
  "detail": "Error description"
}

Payouts

GET

List Project Payout Requests

/api/v1/projects/{project_id}/payout-requests
X-API-Key
  • A request in requested has exactly 24 hours from created_at for a decision. expires_at gives the UTC deadline. On expiry the request becomes expired and releases its reserved budget.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/payout-requests' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
[].request_idstringRequiredPayout approval request identifier.
[].project_idstringRequiredProject identifier; must belong to the API key.
[].networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
[].assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
[].amountstringRequiredPositive amount as a decimal string. For invoices use currency units. For payouts use asset units including the fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
[].destination_addressstringRequiredRecipient address in the selected network. Zcash supports transparent t1, t3 and tex1 addresses. Polkadot Asset Hub uses SS58 format 0. Verify the network before signing.
[].destination_memostring / nullOptionalFor Cosmos, supply the recipient Memo when required. It accepts up to 256 UTF-8 bytes without control characters. For XRP Ledger, use a decimal string from 0 to 4294967295. Sign a nonempty value for a direct payout exactly as submitted. max length: 256
[].statusstringRequiredObject state; see the relevant workflow for values and actions.
[].idempotency_keystringRequiredYour stable identifier for one logical payout; reuse for reconciliation.
[].requested_viastringRequiredRequested Via
[].requested_by_user_idstring / nullOptionalRequested By User Id
[].approved_by_user_idstring / nullOptionalApproved By User Id
[].rejected_by_user_idstring / nullOptionalRejected By User Id
[].approved_payout_idstring / nullOptionalApproved Payout Id
[].approved_payout_statusstring / nullOptionalApproved Payout Status
[].rejection_reasonstring / nullOptionalRejection reason; included verbatim in the signed message.
[].notestring / nullOptionalOptional note on the payout request.
[].created_atstringRequiredCreated At format: date-time
[].expires_atstringRequiredUTC decision deadline. Exactly 24 hours from created_at. format: date-time
[].decided_atstring / nullOptionalDecided At format: date-time
json
[
  {
    "request_id": "req_demo_001",
    "project_id": "project_demo_001",
    "network": "Tron",
    "asset": "USDT",
    "amount": "string",
    "destination_address": "TQ9ExampleDestinationAddress123456789",
    "destination_memo": "string",
    "status": "requested",
    "idempotency_key": "action_001",
    "requested_via": "string",
    "requested_by_user_id": "string",
    "approved_by_user_id": "string",
    "rejected_by_user_id": "string",
    "approved_payout_id": null,
    "approved_payout_status": "string",
    "rejection_reason": "string",
    "note": "string",
    "created_at": "2026-12-03T11:00:00Z",
    "expires_at": "2026-12-04T11:00:00Z",
    "decided_at": null
  }
]
Errors & recovery401 · 403 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Project API key is required
json
{
  "detail": "Error description"
}
POST

Create Project Payout Request

/api/v1/projects/{project_id}/payout-requests
X-API-Key + X-API-Secret
  • Fee is included in amount. API acceptance does not confirm blockchain broadcast; track payout state.
  • Before calling this endpoint, the merchant server checks customer eligibility and the allowed amount. Bitcofy checks the budget for the full debit and availability of the recipient amount for the selected network and asset.
  • A request in requested has exactly 24 hours from created_at for a decision. expires_at gives the UTC deadline. On expiry the request becomes expired and releases its reserved budget.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.
X-API-SecretheaderRequiredAPI secret for this key; required for writes.

JSON body

FieldTypePresenceMeaning & constraints
networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
amountnumber / stringRequiredPositive amount as a decimal string. For invoices use currency units. For payouts use asset units including the fee. >: 0; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
destination_addressstringRequiredRecipient address in the selected network. Zcash supports transparent t1, t3 and tex1 addresses. Polkadot Asset Hub uses SS58 format 0. Verify the network before signing.
destination_memostring / nullOptionalFor Cosmos, supply the recipient Memo when required. It accepts up to 256 UTF-8 bytes without control characters. For XRP Ledger, use a decimal string from 0 to 4294967295. Sign a nonempty value for a direct payout exactly as submitted. max length: 256
idempotency_keystringRequiredYour stable identifier for one logical payout; reuse for reconciliation. min length: 1; max length: 255
notestring / nullOptionalOptional note on the payout request. max length: 500
bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/payout-requests' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{
  "network": "Tron",
  "asset": "USDT",
  "amount": "50.00",
  "destination_address": "TQ9ExampleDestinationAddress123456789",
  "idempotency_key": "withdraw_001",
  "note": "Manual withdrawal from merchant UI"
}'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
request_idstringRequiredPayout approval request identifier.
project_idstringRequiredProject identifier; must belong to the API key.
networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
amountstringRequiredPositive amount as a decimal string. For invoices use currency units. For payouts use asset units including the fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
destination_addressstringRequiredRecipient address in the selected network. Zcash supports transparent t1, t3 and tex1 addresses. Polkadot Asset Hub uses SS58 format 0. Verify the network before signing.
destination_memostring / nullOptionalFor Cosmos, supply the recipient Memo when required. It accepts up to 256 UTF-8 bytes without control characters. For XRP Ledger, use a decimal string from 0 to 4294967295. Sign a nonempty value for a direct payout exactly as submitted. max length: 256
statusstringRequiredObject state; see the relevant workflow for values and actions.
idempotency_keystringRequiredYour stable identifier for one logical payout; reuse for reconciliation.
requested_viastringRequiredRequested Via
requested_by_user_idstring / nullOptionalRequested By User Id
approved_by_user_idstring / nullOptionalApproved By User Id
rejected_by_user_idstring / nullOptionalRejected By User Id
approved_payout_idstring / nullOptionalApproved Payout Id
approved_payout_statusstring / nullOptionalApproved Payout Status
rejection_reasonstring / nullOptionalRejection reason; included verbatim in the signed message.
notestring / nullOptionalOptional note on the payout request.
created_atstringRequiredCreated At format: date-time
expires_atstringRequiredUTC decision deadline. Exactly 24 hours from created_at. format: date-time
decided_atstring / nullOptionalDecided At format: date-time
json
{
  "request_id": "req_demo_001",
  "project_id": "project_demo_001",
  "network": "Tron",
  "asset": "USDT",
  "amount": "string",
  "destination_address": "TQ9ExampleDestinationAddress123456789",
  "destination_memo": "string",
  "status": "requested",
  "idempotency_key": "action_001",
  "requested_via": "string",
  "requested_by_user_id": "string",
  "approved_by_user_id": "string",
  "rejected_by_user_id": "string",
  "approved_payout_id": null,
  "approved_payout_status": "string",
  "rejection_reason": "string",
  "note": "string",
  "created_at": "2026-12-03T11:00:00Z",
  "expires_at": "2026-12-04T11:00:00Z",
  "decided_at": null
}
Errors & recovery400 · 401 · 403 · 409 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
409Payout availability conflictInspect error_code and available balance. insufficient_project_reserve: insufficient reserve; insufficient_aggregated_balance: funds not ready to send. Reconcile first.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Payout availability conflict; inspect structured error fields
json
{
  "detail": "Error description"
}
json
{
  "detail": "Payout availability conflict",
  "error_code": "insufficient_aggregated_balance",
  "network": "Tron",
  "asset": "USDT",
  "requested_amount": "100",
  "fee_amount": "1",
  "available_balance": "100",
  "available_aggregated_amount": "50",
  "pending_aggregation_balance": "50"
}
GET

Poll Project Payout Request By Idempotency

/api/v1/projects/{project_id}/payout-requests/by-idempotency/{idempotency_key}
X-API-Key
  • A request in requested has exactly 24 hours from created_at for a decision. expires_at gives the UTC deadline. On expiry the request becomes expired and releases its reserved budget.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
idempotency_keypath · stringRequiredYour stable identifier for one logical payout; reuse for reconciliation.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/payout-requests/by-idempotency/YOUR_IDEMPOTENCY_KEY' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
request_idstringRequiredPayout approval request identifier.
project_idstringRequiredProject identifier; must belong to the API key.
networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
amountstringRequiredPositive amount as a decimal string. For invoices use currency units. For payouts use asset units including the fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
destination_addressstringRequiredRecipient address in the selected network. Zcash supports transparent t1, t3 and tex1 addresses. Polkadot Asset Hub uses SS58 format 0. Verify the network before signing.
destination_memostring / nullOptionalFor Cosmos, supply the recipient Memo when required. It accepts up to 256 UTF-8 bytes without control characters. For XRP Ledger, use a decimal string from 0 to 4294967295. Sign a nonempty value for a direct payout exactly as submitted. max length: 256
statusstringRequiredObject state; see the relevant workflow for values and actions.
idempotency_keystringRequiredYour stable identifier for one logical payout; reuse for reconciliation.
requested_viastringRequiredRequested Via
requested_by_user_idstring / nullOptionalRequested By User Id
approved_by_user_idstring / nullOptionalApproved By User Id
rejected_by_user_idstring / nullOptionalRejected By User Id
approved_payout_idstring / nullOptionalApproved Payout Id
approved_payout_statusstring / nullOptionalApproved Payout Status
rejection_reasonstring / nullOptionalRejection reason; included verbatim in the signed message.
notestring / nullOptionalOptional note on the payout request.
created_atstringRequiredCreated At format: date-time
expires_atstringRequiredUTC decision deadline. Exactly 24 hours from created_at. format: date-time
decided_atstring / nullOptionalDecided At format: date-time
json
{
  "request_id": "req_demo_001",
  "project_id": "project_demo_001",
  "network": "Tron",
  "asset": "USDT",
  "amount": "string",
  "destination_address": "TQ9ExampleDestinationAddress123456789",
  "destination_memo": "string",
  "status": "requested",
  "idempotency_key": "action_001",
  "requested_via": "string",
  "requested_by_user_id": "string",
  "approved_by_user_id": "string",
  "rejected_by_user_id": "string",
  "approved_payout_id": null,
  "approved_payout_status": "string",
  "rejection_reason": "string",
  "note": "string",
  "created_at": "2026-12-03T11:00:00Z",
  "expires_at": "2026-12-04T11:00:00Z",
  "decided_at": null
}
Errors & recovery401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Payout request not found
  • Project API key is required
json
{
  "detail": "Error description"
}
POST

Approve Project Payout Request Via Api

/api/v1/projects/{project_id}/payout-requests/{request_id}/approve
X-API-Key + X-API-Secret
  • Requires API key, API secret and Ed25519 signature. See Signatures for canonical message, UTC, nonce and 5-minute freshness.
  • Fee is included in amount. API acceptance does not confirm blockchain broadcast; track payout state.
  • A request in requested has exactly 24 hours from created_at for a decision. expires_at gives the UTC deadline. On expiry the request becomes expired and releases its reserved budget.
  • A decision after the deadline returns HTTP 409 with error_code=payout_request_expired and expires_at.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
request_idpath · stringRequiredPayout approval request identifier.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.
X-API-SecretheaderRequiredAPI secret for this key; required for writes.

JSON body

FieldTypePresenceMeaning & constraints
noncestringRequiredUnique value for a new signed attempt; prevents signature replay. min length: 1; max length: 255
timestampstringRequiredUTC date-time within ±5 minutes. Sign canonical +00:00 representation; see Signatures. format: date-time
signaturestringRequiredEd25519 signature of the canonical message, 64 bytes encoded as Base64. min length: 32
bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/payout-requests/YOUR_REQUEST_ID/approve' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{
  "nonce": "nonce_20260713_approve_001",
  "timestamp": "2026-07-13T12:00:00Z",
  "signature": "BASE64_ED25519_SIGNATURE"
}'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
request_idstringRequiredPayout approval request identifier.
project_idstringRequiredProject identifier; must belong to the API key.
networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
amountstringRequiredPositive amount as a decimal string. For invoices use currency units. For payouts use asset units including the fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
destination_addressstringRequiredRecipient address in the selected network. Zcash supports transparent t1, t3 and tex1 addresses. Polkadot Asset Hub uses SS58 format 0. Verify the network before signing.
destination_memostring / nullOptionalFor Cosmos, supply the recipient Memo when required. It accepts up to 256 UTF-8 bytes without control characters. For XRP Ledger, use a decimal string from 0 to 4294967295. Sign a nonempty value for a direct payout exactly as submitted. max length: 256
statusstringRequiredObject state; see the relevant workflow for values and actions.
idempotency_keystringRequiredYour stable identifier for one logical payout; reuse for reconciliation.
requested_viastringRequiredRequested Via
requested_by_user_idstring / nullOptionalRequested By User Id
approved_by_user_idstring / nullOptionalApproved By User Id
rejected_by_user_idstring / nullOptionalRejected By User Id
approved_payout_idstring / nullOptionalApproved Payout Id
approved_payout_statusstring / nullOptionalApproved Payout Status
rejection_reasonstring / nullOptionalRejection reason; included verbatim in the signed message.
notestring / nullOptionalOptional note on the payout request.
created_atstringRequiredCreated At format: date-time
expires_atstringRequiredUTC decision deadline. Exactly 24 hours from created_at. format: date-time
decided_atstring / nullOptionalDecided At format: date-time
json
{
  "request_id": "req_demo_001",
  "project_id": "project_demo_001",
  "network": "Tron",
  "asset": "USDT",
  "amount": "string",
  "destination_address": "TQ9ExampleDestinationAddress123456789",
  "destination_memo": "string",
  "status": "approved",
  "idempotency_key": "action_001",
  "requested_via": "string",
  "requested_by_user_id": "string",
  "approved_by_user_id": "string",
  "rejected_by_user_id": "string",
  "approved_payout_id": "payout_demo_001",
  "approved_payout_status": "string",
  "rejection_reason": "string",
  "note": "string",
  "created_at": "2026-12-03T11:00:00Z",
  "expires_at": "2026-12-04T11:00:00Z",
  "decided_at": "2026-12-03T11:30:00Z"
}
Errors & recovery400 · 401 · 403 · 409 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
409Payout availability conflictInspect error_code and available balance. insufficient_project_reserve: insufficient reserve; insufficient_aggregated_balance: funds not ready to send. Reconcile first.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Payout availability conflict; inspect structured error fields
  • payout_request_expired
json
{
  "detail": "Error description"
}
json
{
  "detail": "Payout availability conflict",
  "error_code": "insufficient_aggregated_balance",
  "network": "Tron",
  "asset": "USDT",
  "requested_amount": "100",
  "fee_amount": "1",
  "available_balance": "100",
  "available_aggregated_amount": "50",
  "pending_aggregation_balance": "50"
}
POST

Reject Project Payout Request Via Api

/api/v1/projects/{project_id}/payout-requests/{request_id}/reject
X-API-Key + X-API-Secret
  • Requires API key, API secret and Ed25519 signature. See Signatures for canonical message, UTC, nonce and 5-minute freshness.
  • Fee is included in amount. API acceptance does not confirm blockchain broadcast; track payout state.
  • A request in requested has exactly 24 hours from created_at for a decision. expires_at gives the UTC deadline. On expiry the request becomes expired and releases its reserved budget.
  • A decision after the deadline returns HTTP 409 with error_code=payout_request_expired and expires_at.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
request_idpath · stringRequiredPayout approval request identifier.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.
X-API-SecretheaderRequiredAPI secret for this key; required for writes.

JSON body

FieldTypePresenceMeaning & constraints
noncestringRequiredUnique value for a new signed attempt; prevents signature replay. min length: 1; max length: 255
timestampstringRequiredUTC date-time within ±5 minutes. Sign canonical +00:00 representation; see Signatures. format: date-time
signaturestringRequiredEd25519 signature of the canonical message, 64 bytes encoded as Base64. min length: 32
rejection_reasonstringRequiredRejection reason; included verbatim in the signed message. min length: 1; max length: 500
bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/payout-requests/YOUR_REQUEST_ID/reject' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{
  "nonce": "nonce_20260713_reject_001",
  "timestamp": "2026-07-13T12:00:00Z",
  "signature": "BASE64_ED25519_SIGNATURE",
  "rejection_reason": "KYC check failed"
}'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
request_idstringRequiredPayout approval request identifier.
project_idstringRequiredProject identifier; must belong to the API key.
networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
amountstringRequiredPositive amount as a decimal string. For invoices use currency units. For payouts use asset units including the fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
destination_addressstringRequiredRecipient address in the selected network. Zcash supports transparent t1, t3 and tex1 addresses. Polkadot Asset Hub uses SS58 format 0. Verify the network before signing.
destination_memostring / nullOptionalFor Cosmos, supply the recipient Memo when required. It accepts up to 256 UTF-8 bytes without control characters. For XRP Ledger, use a decimal string from 0 to 4294967295. Sign a nonempty value for a direct payout exactly as submitted. max length: 256
statusstringRequiredObject state; see the relevant workflow for values and actions.
idempotency_keystringRequiredYour stable identifier for one logical payout; reuse for reconciliation.
requested_viastringRequiredRequested Via
requested_by_user_idstring / nullOptionalRequested By User Id
approved_by_user_idstring / nullOptionalApproved By User Id
rejected_by_user_idstring / nullOptionalRejected By User Id
approved_payout_idstring / nullOptionalApproved Payout Id
approved_payout_statusstring / nullOptionalApproved Payout Status
rejection_reasonstring / nullOptionalRejection reason; included verbatim in the signed message.
notestring / nullOptionalOptional note on the payout request.
created_atstringRequiredCreated At format: date-time
expires_atstringRequiredUTC decision deadline. Exactly 24 hours from created_at. format: date-time
decided_atstring / nullOptionalDecided At format: date-time
json
{
  "request_id": "req_demo_001",
  "project_id": "project_demo_001",
  "network": "Tron",
  "asset": "USDT",
  "amount": "string",
  "destination_address": "TQ9ExampleDestinationAddress123456789",
  "destination_memo": "string",
  "status": "rejected",
  "idempotency_key": "action_001",
  "requested_via": "string",
  "requested_by_user_id": "string",
  "approved_by_user_id": "string",
  "rejected_by_user_id": "string",
  "approved_payout_id": null,
  "approved_payout_status": "string",
  "rejection_reason": "string",
  "note": "string",
  "created_at": "2026-12-03T11:00:00Z",
  "expires_at": "2026-12-04T11:00:00Z",
  "decided_at": "2026-12-03T11:30:00Z"
}
Errors & recovery400 · 401 · 403 · 409 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
409Payout availability conflictInspect error_code and available balance. insufficient_project_reserve: insufficient reserve; insufficient_aggregated_balance: funds not ready to send. Reconcile first.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • payout_request_expired
json
{
  "detail": "Error description"
}
POST

Create Payout

/api/v1/payouts
X-API-Key + X-API-Secret
  • Requires API key, API secret and Ed25519 signature. See Signatures for canonical message, UTC, nonce and 5-minute freshness.
  • Fee is included in amount. API acceptance does not confirm blockchain broadcast; track payout state.
  • Before calling this endpoint, the merchant server checks customer eligibility and the allowed amount. Bitcofy checks the budget for the full debit and availability of the recipient amount for the selected network and asset.
Parameters & request example
FieldTypePresenceMeaning & constraints
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.
X-API-SecretheaderRequiredAPI secret for this key; required for writes.

JSON body

FieldTypePresenceMeaning & constraints
project_idstringRequiredProject identifier; must belong to the API key.
assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
amountnumber / stringRequiredPositive amount as a decimal string. For invoices use currency units. For payouts use asset units including the fee. >: 0; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
destination_addressstringRequiredRecipient address in the selected network. Zcash supports transparent t1, t3 and tex1 addresses. Polkadot Asset Hub uses SS58 format 0. Verify the network before signing.
destination_memostring / nullOptionalFor Cosmos, supply the recipient Memo when required. It accepts up to 256 UTF-8 bytes without control characters. For XRP Ledger, use a decimal string from 0 to 4294967295. Sign a nonempty value for a direct payout exactly as submitted. max length: 256
idempotency_keystringRequiredYour stable identifier for one logical payout; reuse for reconciliation.
noncestringRequiredUnique value for a new signed attempt; prevents signature replay.
timestampstringRequiredUTC date-time within ±5 minutes. Sign canonical +00:00 representation; see Signatures. format: date-time
signaturestringRequiredEd25519 signature of the canonical message, 64 bytes encoded as Base64. min length: 32
bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/payouts' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{
  "project_id": "project_demo_001",
  "network": "Tron",
  "asset": "USDT",
  "amount": "25.00",
  "destination_address": "TQ9ExampleDestinationAddress123456789",
  "idempotency_key": "payout_001",
  "nonce": "nonce_20260713_001",
  "timestamp": "2026-07-13T12:00:00Z",
  "signature": "BASE64_ED25519_SIGNATURE"
}'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
payout_idstringRequiredPayout identifier.
project_idstringRequiredProject identifier; must belong to the API key.
request_idstring / nullOptionalPayout approval request identifier.
notestring / nullOptionalOptional note on the payout request.
operational_expenseboolean / nullOptionalOperational Expense
source_scopestring / nullOptionalSource Scope
networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
amountstringRequiredPositive amount as a decimal string. For invoices use currency units. For payouts use asset units including the fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
gross_amountstring / nullOptionalGross Amount pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
net_amountstring / nullOptionalNet Amount pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
fee_amountstringOptionalFee Amount default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
provider_fee_amountstringOptionalProvider Fee Amount default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
total_reservedstring / nullOptionalTotal Reserved pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
destination_addressstringRequiredRecipient address in the selected network. Zcash supports transparent t1, t3 and tex1 addresses. Polkadot Asset Hub uses SS58 format 0. Verify the network before signing.
destination_memostring / nullOptionalFor Cosmos, supply the recipient Memo when required. It accepts up to 256 UTF-8 bytes without control characters. For XRP Ledger, use a decimal string from 0 to 4294967295. Sign a nonempty value for a direct payout exactly as submitted. max length: 256
statusstringRequiredObject state; see the relevant workflow for values and actions.
provider_statusstring / nullOptionalProvider Status
finalbooleanOptionalFinal default: false
review_requiredbooleanOptionalThe payout is still processing and requires review. Its reservation stays in place until the final decision. default: false
review_required_atstring / nullOptionalUTC timestamp when the payout was marked for review. Kept in history after the final decision. format: date-time
funds_reservedbooleanOptionalFunds Reserved default: false
funds_releasedbooleanOptionalFunds Released default: false
idempotency_keystringRequiredYour stable identifier for one logical payout; reuse for reconciliation.
request_noncestringRequiredRequest Nonce
request_timestampstringRequiredRequest Timestamp format: date-time
gas_modestring / nullOptionalGas Mode
rental_providerstring / nullOptionalRental Provider
rental_order_idstring / nullOptionalRental Order Id
gas_preparation_statusstring / nullOptionalGas Preparation Status
payout_submitted_fee_nativestring / nullOptionalPayout Submitted Fee Native pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payout_actual_fee_nativestring / nullOptionalPayout Actual Fee Native pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payout_gas_fee_sourcestring / nullOptionalPayout Gas Fee Source
payout_native_required_amountstring / nullOptionalPayout Native Required Amount pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payout_native_current_balancestring / nullOptionalPayout Native Current Balance pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
reserve_floor_reached_for_sweepsboolean / nullOptionalReserve Floor Reached For Sweeps
tx_hashstring / nullOptionalTx Hash
explorer_urlstring / nullOptionalExplorer Url
processed_atstring / nullOptionalProcessed At format: date-time
confirmed_atstring / nullOptionalConfirmed At format: date-time
error_reasonstring / nullOptionalError Reason
status_historyarray<object>OptionalStatus History
status_history[].statusstringRequiredObject state; see the relevant workflow for values and actions.
status_history[].provider_statusstring / nullOptionalProvider Status
status_history[].event_typestring / nullOptionalEvent Type
status_history[].finalbooleanOptionalFinal default: false
status_history[].atstringRequiredAt format: date-time
status_history[].actorstring / nullOptionalActor
status_history[].reasonstring / nullOptionalReason
json
{
  "payout_id": "payout_demo_001",
  "project_id": "project_demo_001",
  "request_id": "req_demo_001",
  "note": "string",
  "operational_expense": false,
  "source_scope": "string",
  "network": "Tron",
  "asset": "USDT",
  "amount": "string",
  "gross_amount": "string",
  "net_amount": "string",
  "fee_amount": "0",
  "provider_fee_amount": "0",
  "total_reserved": "string",
  "destination_address": "TQ9ExampleDestinationAddress123456789",
  "destination_memo": "string",
  "status": "ok",
  "provider_status": "string",
  "final": false,
  "review_required": false,
  "review_required_at": null,
  "funds_reserved": false,
  "funds_released": false,
  "idempotency_key": "action_001",
  "request_nonce": "nonce_20260713_001",
  "request_timestamp": "2026-07-13T12:00:00Z",
  "gas_mode": "string",
  "rental_provider": "string",
  "rental_order_id": "order_1001",
  "gas_preparation_status": "string",
  "payout_submitted_fee_native": "string",
  "payout_actual_fee_native": "string",
  "payout_gas_fee_source": "string",
  "payout_native_required_amount": "string",
  "payout_native_current_balance": "string",
  "reserve_floor_reached_for_sweeps": false,
  "tx_hash": "0xabc123def456",
  "explorer_url": "string",
  "processed_at": "2026-07-13T12:00:00Z",
  "confirmed_at": "2026-07-13T12:00:00Z",
  "error_reason": "string",
  "status_history": [
    {
      "status": "ok",
      "provider_status": "string",
      "event_type": "string",
      "final": false,
      "at": "2026-07-13T12:00:00Z",
      "actor": "string",
      "reason": "string"
    }
  ]
}
Errors & recovery400 · 401 · 403 · 409 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
409Payout availability conflictInspect error_code and available balance. insufficient_project_reserve: insufficient reserve; insufficient_aggregated_balance: funds not ready to send. Reconcile first.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Payout availability conflict; inspect structured error fields
json
{
  "detail": "Error description"
}
json
{
  "detail": "Payout availability conflict",
  "error_code": "insufficient_aggregated_balance",
  "network": "Tron",
  "asset": "USDT",
  "requested_amount": "100",
  "fee_amount": "1",
  "available_balance": "100",
  "available_aggregated_amount": "50",
  "pending_aggregation_balance": "50"
}
GET

Get the project's current payout fee

/api/v1/payouts/fee
X-API-Key
  • Returns the current service fee for the pair and the project identified by the key. The value is informational and can change before creation. Reconcile against the creation response.
Parameters & request example
FieldTypePresenceMeaning & constraints
networkquery · stringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
assetquery · stringRequiredAsset code, e.g. USDT. Must be available for this network and project.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/payouts/fee?network=Tron&asset=USDT' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
project_idstringRequiredProject identified by the API key.
networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
fee_amountstringRequiredCurrent service fee for the payout in units of asset, encoded as a decimal string.
network_fee_estimatestring / nullOptionalEstimated on-chain cost of a standard transfer in the requested asset. Available for Litecoin and Zcash when a current quote can be obtained. Independent of the fee charged to the project.
json
{
  "project_id": "project_demo_001",
  "network": "Tron",
  "asset": "USDT",
  "fee_amount": "0.500000",
  "network_fee_estimate": "Tron"
}
Errors & recovery400 · 401 · 403 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Project API key is required
  • Unsupported network or asset for payout
json
{
  "detail": "Error description"
}
GET

Get Payout

/api/v1/payouts/{payout_id}
X-API-Key
  • If the payout remains pending after 60 minutes, review_required becomes true. Keep reconciling. The reservation stays in place until the final decision.
Parameters & request example
FieldTypePresenceMeaning & constraints
payout_idpath · stringRequiredPayout identifier.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/payouts/YOUR_PAYOUT_ID' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
payout_idstringRequiredPayout identifier.
project_idstringRequiredProject identifier; must belong to the API key.
request_idstring / nullOptionalPayout approval request identifier.
notestring / nullOptionalOptional note on the payout request.
operational_expenseboolean / nullOptionalOperational Expense
source_scopestring / nullOptionalSource Scope
networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
amountstringRequiredPositive amount as a decimal string. For invoices use currency units. For payouts use asset units including the fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
gross_amountstring / nullOptionalGross Amount pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
net_amountstring / nullOptionalNet Amount pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
fee_amountstringOptionalFee Amount default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
provider_fee_amountstringOptionalProvider Fee Amount default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
total_reservedstring / nullOptionalTotal Reserved pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
destination_addressstringRequiredRecipient address in the selected network. Zcash supports transparent t1, t3 and tex1 addresses. Polkadot Asset Hub uses SS58 format 0. Verify the network before signing.
destination_memostring / nullOptionalFor Cosmos, supply the recipient Memo when required. It accepts up to 256 UTF-8 bytes without control characters. For XRP Ledger, use a decimal string from 0 to 4294967295. Sign a nonempty value for a direct payout exactly as submitted. max length: 256
statusstringRequiredObject state; see the relevant workflow for values and actions.
provider_statusstring / nullOptionalProvider Status
finalbooleanOptionalFinal default: false
review_requiredbooleanOptionalThe payout is still processing and requires review. Its reservation stays in place until the final decision. default: false
review_required_atstring / nullOptionalUTC timestamp when the payout was marked for review. Kept in history after the final decision. format: date-time
funds_reservedbooleanOptionalFunds Reserved default: false
funds_releasedbooleanOptionalFunds Released default: false
idempotency_keystringRequiredYour stable identifier for one logical payout; reuse for reconciliation.
request_noncestringRequiredRequest Nonce
request_timestampstringRequiredRequest Timestamp format: date-time
gas_modestring / nullOptionalGas Mode
rental_providerstring / nullOptionalRental Provider
rental_order_idstring / nullOptionalRental Order Id
gas_preparation_statusstring / nullOptionalGas Preparation Status
payout_submitted_fee_nativestring / nullOptionalPayout Submitted Fee Native pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payout_actual_fee_nativestring / nullOptionalPayout Actual Fee Native pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payout_gas_fee_sourcestring / nullOptionalPayout Gas Fee Source
payout_native_required_amountstring / nullOptionalPayout Native Required Amount pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payout_native_current_balancestring / nullOptionalPayout Native Current Balance pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
reserve_floor_reached_for_sweepsboolean / nullOptionalReserve Floor Reached For Sweeps
tx_hashstring / nullOptionalTx Hash
explorer_urlstring / nullOptionalExplorer Url
processed_atstring / nullOptionalProcessed At format: date-time
confirmed_atstring / nullOptionalConfirmed At format: date-time
error_reasonstring / nullOptionalError Reason
status_historyarray<object>OptionalStatus History
status_history[].statusstringRequiredObject state; see the relevant workflow for values and actions.
status_history[].provider_statusstring / nullOptionalProvider Status
status_history[].event_typestring / nullOptionalEvent Type
status_history[].finalbooleanOptionalFinal default: false
status_history[].atstringRequiredAt format: date-time
status_history[].actorstring / nullOptionalActor
status_history[].reasonstring / nullOptionalReason
json
{
  "payout_id": "payout_demo_001",
  "project_id": "project_demo_001",
  "request_id": "req_demo_001",
  "note": "string",
  "operational_expense": false,
  "source_scope": "string",
  "network": "Tron",
  "asset": "USDT",
  "amount": "string",
  "gross_amount": "string",
  "net_amount": "string",
  "fee_amount": "0",
  "provider_fee_amount": "0",
  "total_reserved": "string",
  "destination_address": "TQ9ExampleDestinationAddress123456789",
  "destination_memo": "string",
  "status": "ok",
  "provider_status": "string",
  "final": false,
  "review_required": false,
  "review_required_at": null,
  "funds_reserved": false,
  "funds_released": false,
  "idempotency_key": "action_001",
  "request_nonce": "nonce_20260713_001",
  "request_timestamp": "2026-07-13T12:00:00Z",
  "gas_mode": "string",
  "rental_provider": "string",
  "rental_order_id": "order_1001",
  "gas_preparation_status": "string",
  "payout_submitted_fee_native": "string",
  "payout_actual_fee_native": "string",
  "payout_gas_fee_source": "string",
  "payout_native_required_amount": "string",
  "payout_native_current_balance": "string",
  "reserve_floor_reached_for_sweeps": false,
  "tx_hash": "0xabc123def456",
  "explorer_url": "string",
  "processed_at": "2026-07-13T12:00:00Z",
  "confirmed_at": "2026-07-13T12:00:00Z",
  "error_reason": "string",
  "status_history": [
    {
      "status": "ok",
      "provider_status": "string",
      "event_type": "string",
      "final": false,
      "at": "2026-07-13T12:00:00Z",
      "actor": "string",
      "reason": "string"
    }
  ]
}
Errors & recovery401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Payout not found
  • Project API key is required
json
{
  "detail": "Error description"
}
GET

Poll Payout By Idempotency

/api/v1/projects/{project_id}/payouts/by-idempotency/{idempotency_key}
X-API-Key
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
idempotency_keypath · stringRequiredYour stable identifier for one logical payout; reuse for reconciliation.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/payouts/by-idempotency/YOUR_IDEMPOTENCY_KEY' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
payout_idstringRequiredPayout identifier.
project_idstringRequiredProject identifier; must belong to the API key.
request_idstring / nullOptionalPayout approval request identifier.
notestring / nullOptionalOptional note on the payout request.
operational_expenseboolean / nullOptionalOperational Expense
source_scopestring / nullOptionalSource Scope
networkstringRequiredNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
assetstringRequiredAsset code, e.g. USDT. Must be available for this network and project.
amountstringRequiredPositive amount as a decimal string. For invoices use currency units. For payouts use asset units including the fee. pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
gross_amountstring / nullOptionalGross Amount pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
net_amountstring / nullOptionalNet Amount pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
fee_amountstringOptionalFee Amount default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
provider_fee_amountstringOptionalProvider Fee Amount default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
total_reservedstring / nullOptionalTotal Reserved pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
destination_addressstringRequiredRecipient address in the selected network. Zcash supports transparent t1, t3 and tex1 addresses. Polkadot Asset Hub uses SS58 format 0. Verify the network before signing.
destination_memostring / nullOptionalFor Cosmos, supply the recipient Memo when required. It accepts up to 256 UTF-8 bytes without control characters. For XRP Ledger, use a decimal string from 0 to 4294967295. Sign a nonempty value for a direct payout exactly as submitted. max length: 256
statusstringRequiredObject state; see the relevant workflow for values and actions.
provider_statusstring / nullOptionalProvider Status
finalbooleanOptionalFinal default: false
review_requiredbooleanOptionalThe payout is still processing and requires review. Its reservation stays in place until the final decision. default: false
review_required_atstring / nullOptionalUTC timestamp when the payout was marked for review. Kept in history after the final decision. format: date-time
funds_reservedbooleanOptionalFunds Reserved default: false
funds_releasedbooleanOptionalFunds Released default: false
idempotency_keystringRequiredYour stable identifier for one logical payout; reuse for reconciliation.
request_noncestringRequiredRequest Nonce
request_timestampstringRequiredRequest Timestamp format: date-time
gas_modestring / nullOptionalGas Mode
rental_providerstring / nullOptionalRental Provider
rental_order_idstring / nullOptionalRental Order Id
gas_preparation_statusstring / nullOptionalGas Preparation Status
payout_submitted_fee_nativestring / nullOptionalPayout Submitted Fee Native pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payout_actual_fee_nativestring / nullOptionalPayout Actual Fee Native pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payout_gas_fee_sourcestring / nullOptionalPayout Gas Fee Source
payout_native_required_amountstring / nullOptionalPayout Native Required Amount pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
payout_native_current_balancestring / nullOptionalPayout Native Current Balance pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
reserve_floor_reached_for_sweepsboolean / nullOptionalReserve Floor Reached For Sweeps
tx_hashstring / nullOptionalTx Hash
explorer_urlstring / nullOptionalExplorer Url
processed_atstring / nullOptionalProcessed At format: date-time
confirmed_atstring / nullOptionalConfirmed At format: date-time
error_reasonstring / nullOptionalError Reason
status_historyarray<object>OptionalStatus History
status_history[].statusstringRequiredObject state; see the relevant workflow for values and actions.
status_history[].provider_statusstring / nullOptionalProvider Status
status_history[].event_typestring / nullOptionalEvent Type
status_history[].finalbooleanOptionalFinal default: false
status_history[].atstringRequiredAt format: date-time
status_history[].actorstring / nullOptionalActor
status_history[].reasonstring / nullOptionalReason
json
{
  "payout_id": "payout_demo_001",
  "project_id": "project_demo_001",
  "request_id": "req_demo_001",
  "note": "string",
  "operational_expense": false,
  "source_scope": "string",
  "network": "Tron",
  "asset": "USDT",
  "amount": "string",
  "gross_amount": "string",
  "net_amount": "string",
  "fee_amount": "0",
  "provider_fee_amount": "0",
  "total_reserved": "string",
  "destination_address": "TQ9ExampleDestinationAddress123456789",
  "destination_memo": "string",
  "status": "ok",
  "provider_status": "string",
  "final": false,
  "review_required": false,
  "review_required_at": null,
  "funds_reserved": false,
  "funds_released": false,
  "idempotency_key": "action_001",
  "request_nonce": "nonce_20260713_001",
  "request_timestamp": "2026-07-13T12:00:00Z",
  "gas_mode": "string",
  "rental_provider": "string",
  "rental_order_id": "order_1001",
  "gas_preparation_status": "string",
  "payout_submitted_fee_native": "string",
  "payout_actual_fee_native": "string",
  "payout_gas_fee_source": "string",
  "payout_native_required_amount": "string",
  "payout_native_current_balance": "string",
  "reserve_floor_reached_for_sweeps": false,
  "tx_hash": "0xabc123def456",
  "explorer_url": "string",
  "processed_at": "2026-07-13T12:00:00Z",
  "confirmed_at": "2026-07-13T12:00:00Z",
  "error_reason": "string",
  "status_history": [
    {
      "status": "ok",
      "provider_status": "string",
      "event_type": "string",
      "final": false,
      "at": "2026-07-13T12:00:00Z",
      "actor": "string",
      "reason": "string"
    }
  ]
}
Errors & recovery401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Payout not found
  • Project API key is required
json
{
  "detail": "Error description"
}
GET

Reconcile Project Payout

/api/v1/projects/{project_id}/payouts/reconcile
X-API-Key
  • Supply exactly one of request_id, payout_id, idempotency_key. Reconcile ambiguous writes before retrying.
  • If the payout remains pending after 60 minutes, review_required becomes true. Keep reconciling. The reservation stays in place until the final decision.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
request_idquery · string / nullOptionalPayout approval request identifier. Supply exactly one of the three identifiers.
payout_idquery · string / nullOptionalPayout identifier. Supply exactly one of the three identifiers.
idempotency_keyquery · string / nullOptionalYour stable identifier for one logical payout; reuse for reconciliation. Supply exactly one of the three identifiers.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/payouts/reconcile?idempotency_key=YOUR_IDEMPOTENCY_KEY' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
project_idstringRequiredProject identifier; must belong to the API key.
query_typestringRequiredQuery Type
request_idstring / nullOptionalPayout approval request identifier. Supply exactly one of the three identifiers.
payout_idstring / nullOptionalPayout identifier. Supply exactly one of the three identifiers.
idempotency_keystring / nullOptionalYour stable identifier for one logical payout; reuse for reconciliation. Supply exactly one of the three identifiers.
request_statusstring / nullOptionalRequest Status
request_expires_atstring / nullOptionalUTC deadline of the linked request. For a direct payout the value is null. format: date-time
payout_statusstring / nullOptionalPayout Status
statusstringRequiredObject state; see the relevant workflow for values and actions.
provider_statusstring / nullOptionalProvider Status
finalbooleanOptionalFinal default: false
review_requiredbooleanOptionalThe payout is still processing and requires review. Its reservation stays in place until the final decision. default: false
review_required_atstring / nullOptionalUTC timestamp when the payout was marked for review. Kept in history after the final decision. format: date-time
funds_reservedbooleanOptionalFunds Reserved default: false
funds_releasedbooleanOptionalFunds Released default: false
networkstring / nullOptionalNetwork code from /api/v1/public/networks, such as TON. For payment use the invoice payment_options.
assetstring / nullOptionalAsset code, e.g. USDT. Must be available for this network and project.
gross_amountstring / nullOptionalGross Amount pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
fee_amountstringOptionalFee Amount default: "0"; pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
net_amountstring / nullOptionalNet Amount pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
destination_addressstring / nullOptionalRecipient address in the selected network. Zcash supports transparent t1, t3 and tex1 addresses. Polkadot Asset Hub uses SS58 format 0. Verify the network before signing.
tx_hashstring / nullOptionalTx Hash
explorer_urlstring / nullOptionalExplorer Url
processed_atstring / nullOptionalProcessed At format: date-time
confirmed_atstring / nullOptionalConfirmed At format: date-time
rejection_reasonstring / nullOptionalRejection reason; included verbatim in the signed message.
error_reasonstring / nullOptionalError Reason
status_historyarray<object>OptionalStatus History
status_history[].statusstringRequiredObject state; see the relevant workflow for values and actions.
status_history[].provider_statusstring / nullOptionalProvider Status
status_history[].event_typestring / nullOptionalEvent Type
status_history[].finalbooleanOptionalFinal default: false
status_history[].atstringRequiredAt format: date-time
status_history[].actorstring / nullOptionalActor
status_history[].reasonstring / nullOptionalReason
json
{
  "project_id": "project_demo_001",
  "query_type": "request_id",
  "request_id": "req_demo_001",
  "payout_id": null,
  "idempotency_key": "action_001",
  "request_status": "expired",
  "request_expires_at": "2026-12-04T11:00:00Z",
  "payout_status": null,
  "status": "expired",
  "provider_status": "expired",
  "final": true,
  "review_required": false,
  "review_required_at": null,
  "funds_reserved": false,
  "funds_released": true,
  "network": "Tron",
  "asset": "USDT",
  "gross_amount": "string",
  "fee_amount": "0",
  "net_amount": "string",
  "destination_address": "TQ9ExampleDestinationAddress123456789",
  "tx_hash": null,
  "explorer_url": null,
  "processed_at": null,
  "confirmed_at": null,
  "rejection_reason": "string",
  "error_reason": "string",
  "status_history": [
    {
      "status": "expired",
      "provider_status": "expired",
      "event_type": "payout.request.expired",
      "final": true,
      "at": "2026-12-04T11:00:00Z",
      "actor": "expiry",
      "reason": null
    }
  ]
}
Errors & recovery400 · 401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Provide exactly one of request_id, payout_id, or idempotency_key
  • Payout not found
  • Payout request not found
  • Project API key is required
json
{
  "detail": "Error description"
}

Webhooks

POST

Configure Project Webhook

/api/v1/projects/{project_id}/webhook/config
X-API-Key + X-API-Secret
  • Saves webhook_url. The compatibility callback_secret field does not rotate the project secret.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.
X-API-SecretheaderRequiredAPI secret for this key; required for writes.

JSON body

FieldTypePresenceMeaning & constraints
webhook_urlstringRequiredPublic HTTPS webhook handler URL; no URL user credentials.
callback_secretstring / nullOptionalCompatibility field: this endpoint does not rotate the webhook signing secret. min length: 6
bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/webhook/config' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{
  "webhook_url": "https://merchant.example/webhooks/bitcofy"
}'
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
project_idstringRequiredProject identifier; must belong to the API key.
webhook_urlstringRequiredPublic HTTPS webhook handler URL; no URL user credentials.
callback_secret_maskedstringRequiredCallback Secret Masked
json
{
  "project_id": "project_demo_001",
  "webhook_url": "https://merchant.example/api/bitcofy/webhook",
  "callback_secret_masked": "secret_123456"
}
Errors & recovery400 · 401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Project not found
json
{
  "detail": "Error description"
}
POST

Queue Test Webhook

/api/v1/projects/{project_id}/webhook/test
X-API-Key + X-API-Secret
  • Queues an event. Success does not mean your receiver has already accepted it.
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.
X-API-SecretheaderRequiredAPI secret for this key; required for writes.

No request body.

bash
curl --request POST 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/webhook/test' \
  --header "X-API-Key: $BITCOFY_API_KEY" \
  --header "X-API-Secret: $BITCOFY_API_SECRET"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
event_idstringRequiredEvent Id
event_typestringRequiredEvent Type
deliveredbooleanRequiredDelivered
deadbooleanRequiredDead
attemptsintegerRequiredAttempts
last_errorstring / nullOptionalLast Error
last_response_statusinteger / nullOptionalLast Response Status
next_attempt_atstring / nullOptionalNext Attempt At format: date-time
delivered_atstring / nullOptionalDelivered At format: date-time
payloadobjectRequiredPayload
json
{
  "event_id": "string",
  "event_type": "string",
  "delivered": false,
  "dead": false,
  "attempts": 1,
  "last_error": "string",
  "last_response_status": 1,
  "next_attempt_at": "2026-07-13T12:00:00Z",
  "delivered_at": "2026-07-13T12:00:00Z",
  "payload": {
    "example_key": "string"
  }
}
Errors & recovery400 · 401 · 403 · 404 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
400Invalid request or stateInspect detail, parameters, signature and current state; do not retry unchanged.
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
404Object not foundVerify the identifier and project.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Project not found
  • Project webhook_url or callback_secret is not configured
json
{
  "detail": "Error description"
}
GET

List Project Webhook Events

/api/v1/projects/{project_id}/webhook/events
X-API-Key
Parameters & request example
FieldTypePresenceMeaning & constraints
project_idpath · stringRequiredProject identifier; must belong to the API key.
X-API-KeyheaderRequired*Project key. Alternative: Authorization: Bearer <project_api_key>.

No request body.

bash
curl --request GET 'https://pay.bitcofy.pro/api/v1/projects/YOUR_PROJECT_ID/webhook/events' \
  --header "X-API-Key: $BITCOFY_API_KEY"
Successful response

200 · application/json

Shape illustration: values are examples; actual state may differ.

FieldTypePresenceMeaning & constraints
[].event_idstringRequiredEvent Id
[].event_typestringRequiredEvent Type
[].deliveredbooleanRequiredDelivered
[].deadbooleanRequiredDead
[].attemptsintegerRequiredAttempts
[].last_errorstring / nullOptionalLast Error
[].last_response_statusinteger / nullOptionalLast Response Status
[].next_attempt_atstring / nullOptionalNext Attempt At format: date-time
[].delivered_atstring / nullOptionalDelivered At format: date-time
[].payloadobjectRequiredPayload
json
[
  {
    "event_id": "string",
    "event_type": "string",
    "delivered": false,
    "dead": false,
    "attempts": 1,
    "last_error": "string",
    "last_response_status": 1,
    "next_attempt_at": "2026-07-13T12:00:00Z",
    "delivered_at": "2026-07-13T12:00:00Z",
    "payload": {
      "example_key": "string"
    }
  }
]
Errors & recovery401 · 403 · 422 · 423

Handler errors are listed below. detail depends on validation and state; its text is not a stable error code. After a 5xx, a write outcome may be unknown: reconcile first.

HTTPMeaningAction
401Invalid credentialsCheck the API key, active state and write secret.
403Access deniedCheck project ownership and activation; checkout session calls also need the invoice cookie.
422Validation faileddetail is an array: loc identifies the field, msg explains the error, type is its code. Correct required fields and types.
423Project lockedCheck project activation and restrictions in the dashboard. Do not retry unchanged.

Possible detail messages

  • API key does not have access to this project
  • Project API key is required
json
{
  "detail": "Error description"
}