Skip to main content
POST
Create a reverse swap

Authorizations

Authorization
string
header
required

Secret organization API key from the partner panel, for servers. Sent on swap creation as Authorization: Bearer <key> to attribute the swap to your organization. Optional; an invalid key is rejected. Never use it in client-side code.

Body

application/json

Body of POST /v2/swap/reverse — Boltz-shaped, camelCase.

invoiceAmount
integer<int64>
required

Amount, in sats, the taker pays via the hold invoice (Boltz convention: invoiceAmount on Reverse). v0 BTC/BTC is 1:1 so this is also what the taker receives on-chain.

Required range: x >= 0
address
string | null

Optional taker-owned Liquid destination for an L-BTC Magic Routing Hint. Must be paired with addressSignature.

addressSignature
string | null

BIP-340 signature by claimPublicKey over SHA256(address UTF-8).

beneficiary
string | null

A kaleidoswap: beneficiary handoff, in place of preimageHash + claimPublicKey. This is how a payer pays someone else without having to take the recipient's hash and key apart: the recipient's wallet emits one string, the payer's passes it through. The maker checks the request's network, expiry, destination layer and asset against the route it resolves, and refuses to under-deliver what the recipient asked for.

bolt12Refund
string | null

BOLT12: an lnr1… refund (a BOLT12 invoice request not tied to an offer) the taker's node created for invoiceAmount. When present the maker answers it — instead of minting a BOLT11 hold invoice — with a BOLT12 invoice locked to preimageHash, holds it identically, and delivers it back over the refund's onion-message paths; the response's invoice is then that lni1…. The refund's amount must equal invoiceAmount.

claimPublicKey
string | null

The 33-byte compressed claim public key, hex — the key that claims the maker's lockup. Optional only when beneficiary carries it.

from
string | null

Boltz: Lightning currency symbol (e.g. "BTC"). Combined with to.

pairHash
string | null

Optional pairHash rate-lock: the hash the taker quoted against. Verified against the pair's current rate card when present; a mismatch is rejected with 400 pair_hash_mismatch.

pairId
string | null

Trading-pair key, e.g. "BTC/BTC". Optional when from+to are given.

preimageHash
string | null

The BOLT11 payment hash — SHA256(preimage), 32 bytes hex. The hold invoice is locked to this hash; whoever holds the preimage reveals it on-chain when claiming the maker's lockup. Optional only when beneficiary carries it instead.

to
string | null

Boltz: on-chain currency symbol the taker receives (e.g. "BTC").

webhook
object | null

Optional HTTPS callback for status changes (Boltz webhook shape).

Response

Swap created; hold invoice minted.

POST /v2/swap/reverse response.

id
string
required
invoice
string
required

BOLT11 hold invoice the taker pays.

lockupAddress
string
required

Maker's on-chain (or Liquid/Arkade) lockup address.

onchainAmount
integer<int64>
required

On-chain amount the maker locks for the taker to claim.

Required range: x >= 0
refundPublicKey
string
required

33-byte compressed maker refund pubkey (hex).

swapAuth
string
required

Per-swap taker credential, 32 bytes hex — see swapAuth.

swapTree
object
required

swapTree returned on every swap creation + status response.

timeoutBlockHeight
integer<int64>
required

Block height (BTC/Liquid) or unix-ts (Arkade) at which the maker's refund branch opens.

assetId
string | null
blindingKey
string | null

null for Liquid; absent for Bitcoin, which has no such field. The maker mints its Liquid HTLC lockups unconfidential on purpose, so no output blinding key exists to return: treat lockupAddress as explicit — fund it with an unblinded output where the taker funds, and build claims against an explicit prevout where the taker claims.

feeAssetId
string | null
rgb
object | null

RGB routes only (to on rgb_l1): how to find and claim the RGB asset the maker locks in the swap tree's P2TR lockupAddress. onchainAmount is then the asset amount in the contract's units, not sats.