Docs
API ReferenceCheckoutCreate Payment For Invoice

Create Payment For Invoice

POST/checkout/api/v1/invoices/{id}/checkoutRecommended

Locks the invoice to one blockchain/currency pair and returns the instructions the buyer needs to pay. For method "direct" the payment carries paymentAddress โ€” a one-time address leased from the wallet pool; for "web3" and "havala_wallet" it carries contractAddress, externalId (the bytes32 form), externalIdUuid, treasuryWallet, tokenAddress (null for the chain native coin) and chainId instead, and "havala_wallet" adds requiresConfirmation: true. The payment window is min(now + 30 minutes, invoice expiry) and checkout always runs on MAINNET.

Authentication

Signature Pattern

None โ€” public endpoint, no signature required.
HeaderValueDescription
Acceptapplication/jsonNo API key, signature or idempotency key โ€” the checkout surface is public
Content-Typeapplication/jsonRequest body is JSON

Request Parameters

NameTypeRequiredDescription
idstringRequiredPath parameter โ€” invoice CUID; must currently be OPEN and unexpired
blockchainstringRequiredLowercase chain key from availableBlockchains: ethereum, polygon, bsc, bitcoin, tron, solana, ton, arbitrum, optimism, base, avalanche
cryptoCurrencystringRequiredToken symbol that the chosen chain supports (see availableCurrencies); rejected with INVALID_CURRENCY otherwise
methodstringRequireddirect | web3 | havala_wallet. web3 and havala_wallet are EVM-only (ethereum, polygon, bsc, arbitrum, optimism, base, avalanche) and fail with BLOCKCHAIN_NOT_SUPPORTED elsewhere

Request Example

JSONRequest Body
{
  "blockchain": "ethereum",
  "cryptoCurrency": "USDT",
  "method": "direct"
}

Response Parameters

FieldTypeExample
paymentobject{โ€ฆ}
payment.idstring"clx7k2p9a0007qz8f1d0s9k2r"
payment.referenceIdstring"PAY-260826-118A"
payment.methodstring"direct"
payment.paymentAddressstring"0xe58b081006f7e3dfc967a64cb14028d512c9791e"
payment.amountstring"12500"
payment.cryptoCurrencystring"USDT"
payment.blockchainstring"ethereum"
payment.networkstring"MAINNET"
payment.decimalsinteger6
payment.expiresAtstring"2026-08-26T14:12:00.000Z"

Response Example

JSONResponse
{
  "success": true,
  "data": {
    "payment": {
      "id": "clx7k2p9a0007qz8f1d0s9k2r",
      "referenceId": "PAY-260826-118A",
      "method": "direct",
      "paymentAddress": "0xe58b081006f7e3dfc967a64cb14028d512c9791e",
      "amount": "12500",
      "cryptoCurrency": "USDT",
      "blockchain": "ethereum",
      "network": "MAINNET",
      "decimals": 6,
      "expiresAt": "2026-08-26T14:12:00.000Z"
    }
  },
  "timestamp": "2026-08-26T13:41:02.477Z",
  "requestId": "req_V1StGXR8_Z5j"
}

Error shape

JSONError
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found"
  },
  "timestamp": "2026-08-26T13:41:02.477Z",
  "requestId": "req_V1StGXR8_Z5j"
}

Status Codes

200Success
201Created
400Bad Request
401Unauthorized
404Not Found
429Rate Limited
Try itMockapi2.havala.io
POSThttps://api2.havala.io