Skip to main content
Creates a payment for a fiat amount in the crypto asset you specify, locks the live exchange rate, and returns a unique deposit address to show the buyer. The quote is valid for 30 minutes. Requires the payments:write scope.

Request

POST https://api.blockra.io/payments

Body parameters

asset
string
required
The coin the buyer pays in. One of BTC, LTC, ETH, USDC, or USDT.
fiat_amount
number
required
The amount to charge, expressed in fiat. Blockra locks the live exchange rate and computes the exact crypto amount. Example: 9.99.
fiat_currency
string
default:"USD"
The fiat currency to price in. One of USD, EUR, or GBP. Defaults to USD.
reference
string
Your own order or reference ID (max 255 characters). Echoed back on the payment object and in webhook payloads.
customer_email
string
Associates the payment with a customer by email. A customer record is created automatically if one does not already exist.
metadata
object
Arbitrary key/value pairs stored on the payment and returned as-is in all responses.

Response

Returns a 201 with the newly created payment object wrapped in the standard data envelope.
id
string
The payment ID, prefixed pay_.
status
string
Lifecycle status: pending, detected, completed, overpaid, underpaid, expired, failed, or cancelled.
asset
string
The crypto asset (e.g. LTC).
network
string
The blockchain network: bitcoin, litecoin, or ethereum.
fiat_currency
string
The fiat currency code.
fiat_amount
number
Gross amount the buyer is charged (fiat).
fee_fiat
number
The Blockra fee in fiat.
net_fiat
number
Amount credited to your balance (fiat_amount − fee_fiat).
confirmations
number
On-chain confirmations seen so far. Always 0 on a freshly created payment.
reference
string
Your reference ID, if provided.
expires_at
string
ISO-8601 time the quote expires (30 minutes from creation).
created_at
string
ISO-8601 timestamp when the payment was created.
deposit
object
Where and how much the buyer should send.