Build a BIP 321 payment URI
Builds a single BIP 321 bitcoin: URI bundling multiple ways to receive the same payment, so one call prepares everything needed for an incoming payment. A fresh Ark address is always included. When amount_sat is given, a BOLT11 invoice for that amount is generated and the amount is embedded in the URI. When onchain is true, a fresh on-chain address is added (placed in the URI body on mainnet, as a tb= parameter on test networks). Set the uppercase query parameter to upper-case the bip321 URI so QR encoders can use the compact alphanumeric mode; this fails if the URI carries case-sensitive data. The individual ark, bolt11, and onchain destinations are always returned in their natural case for direct use.
Authorizations
Base64url-encoded auth token
Query Parameters
Upper-case the returned bip321 URI for compact QR encoding. Defaults to false. Fails with 400 if the URI carries case-sensitive data (a label, message, or base58 address).
Body
Request to build a BIP 321 unified payment URI.
An Ark address is always included. A BOLT11 invoice is only included when
amount_sat is given (an amount is required to create one). An on-chain
address is included only when onchain is true.
Optional amount (in satoshis) to request. When set, it is embedded in the URI and used to create the BOLT11 invoice. Any server-configured LightningReceiveFees [blocked] are deducted from the amount the client ultimately receives over Lightning.
x >= 0Optional label describing the payment, recorded in the URI's label.
Optional message describing the payment, recorded in the URI's message.
Whether to include a fresh on-chain address as a payment destination.
Defaults to false.
Response
Returns the BIP 321 URI and its destinations
A BIP 321 unified payment URI together with its individual destinations.
The bip321 field is the combined bitcoin: URI; the other fields expose
each generated destination separately for convenience. A field is null
when that destination was not requested or could not be produced.