Skip to content

Payment request URI ​

Paypunk encodes payment requests as an armada: URI. The URI is the payload in the payment-request QR code. It is deliberately small: a shielded recipient, a chain, a token, an amount, and an optional short memo reference. It is unsigned in v1, so the payer must display the decoded values and confirm them before sending anything.

Example ​

text
armada:0zk1qy...?v=1&chain=1&token=0xa0b8...eb48&amount=1000000&memo=0x0123456789abcdef

Grammar ​

text
armada-uri      = "armada:" address "?" query
address         = 0zk-address
query           = param *( "&" param )
param           = known-param / unknown-param
known-param     = version-param / chain-param / token-param / amount-param
                / memo-param
version-param   = %s"v=" version
chain-param     = %s"chain=" chain-id
token-param     = %s"token=" token
amount-param    = %s"amount=" amount
memo-param      = %s"memo=" memo
version         = %s"1"
chain-id        = positive-u64
token           = erc20-address
amount          = positive-u256
memo            = 1*512( ALPHA / DIGIT / "-" / "_" )
unknown-param   = param-name [ "=" param-value ]
param-name      = 1*( ALPHA / DIGIT / "-" / "_" / "." )
param-value     = *param-char
param-char      = %x21-22 / %x24-25 / %x27-7E
positive-u64    = %x31-39 *DIGIT
positive-u256   = %x31-39 *DIGIT
erc20-address   = "0x" 40HEXDIG
0zk-address     = <bech32m string with HRP "0zk" and a 73-byte payload>

The address is the component between armada: and the first ?. There is no authority component: armada://... is not valid. A # is not part of v1 and makes the URI invalid.

Fields ​

NameRequiredTypeValidationExample
addressyesbech32m stringHRP 0zk; valid bech32m checksum; exactly 73 decoded bytes; payload version byte 0x01; canonical lowercase. All-uppercase bech32m is accepted and canonicalized; mixed case is rejected.0zk1qy...
vyesversionExactly the ASCII string 1. Any other value, including 01, 1.0, or an empty value, is an unsupported version.1
chainyesu64Positive base-10 integer; ASCII digits only; no leading zeros; no sign, whitespace, decimal point, or exponent.1
tokenyesERC-20 address0x followed by exactly 40 hex digits (case-insensitive). No EIP-55 checksum validation. Canonical form is lowercase. The literal native is rejected.0xa0b8...eb48
amountyesu256Positive base-10 integer in the token's smallest unit; ASCII digits only; no leading zeros; no sign, whitespace, decimal point, or exponent.1000000
memonostringA short reconciliation reference. 1-512 bytes from the base64url alphabet (A-Z, a-z, 0-9, -, _). The payer copies it into the shielded note memo.0x0123456789abcdef

chain is a full u64. Implementations that use IEEE-754 numbers cannot represent values above 2^53 - 1 exactly; parse the decimal string with a big-integer type and only narrow to number when the value is in the safe range.

Every payable asset is an ERC-20 contract address. Native assets are not supported, and the zero address is not a native sentinel. The URI carries base units, not decimal token units, and it does not carry token decimals. The payer must resolve the token's decimals from its own registry or from the chain before displaying a human-readable amount.

Encoding rules ​

  • Scheme. The canonical scheme is lowercase armada:. Parsers compare the scheme ASCII case-insensitively, so ARMADA: is accepted. Encoders always emit armada:.
  • Address. The canonical address is lowercase bech32m. Parsers accept an all-uppercase bech32m address and canonicalize it to lowercase. Mixed-case bech32m is invalid.
  • Parameter names. Known parameter names are lowercase and case-sensitive. V=1 is an unknown parameter, not the version parameter. Unknown parameter names may use any of the characters in param-name and are ignored. The canonical order is v, chain, token, amount, memo. Parsers accept any order.
  • Parameter values. v1 uses no percent-encoding. Every canonical value is composed of unreserved ASCII characters. Parsers must not percent-decode; a % in the address or a known query field is invalid for that component.
  • Token. Canonical form is lowercase 0x plus 40 lowercase hex digits. Parsers accept 0x/0X prefixes and hex digits in any case, then canonicalize to lowercase. The literal native is rejected.
  • Integers. chain and amount are unsigned base-10 ASCII integers with no leading zeros. 0 is not positive and is rejected. A leading + or -, whitespace, a decimal point, or an exponent is rejected.
  • Separators. The first ? separates the address from the query. A URI without ? is treated as having an empty query, so it fails with a missing v parameter. The query is split on &. Empty query segments are ignored.

Safety ​

  • A payment request is not a proof of identity. Confirm the recipient address through a channel you trust.
  • Check the chain and token, not just the amount.
  • The URI is case-sensitive for parameter names and has no percent-encoding in v1.