Skip to main content
POST
Use something a person holds

Authorizations

Authorization
string
header
required

A project key (Developers → API keys). Keep it on your server, not in an app.

Headers

traceparent
string

W3C Trace Context; joins your trace to ours

Idempotency-Key
string
required

A retry with the same key and body returns the first response

Required string length: 1 - 255

Body

application/json
user
string
required

The person: a usr_… ID or the brand's own ID

Required string length: 1 - 256
unit
string
required

The unit to use: its key

Pattern: ^[a-z][a-z0-9_-]{0,63}$
amount
integer
default:1

How many to use. One by default

Required range: x <= 1000000
reason
string

Where or why, written on the receipt: Table 4. Used when left out

Required string length: 1 - 280
reference
string

The brand's own scan or redemption ID. It can be used once per unit: a second use with it is refused with reference_used. Matching is exact and case-sensitive, after the text is put in Unicode NFC form

Required string length: 1 - 128

Response

Use something a person holds

id
string
required

The receipt's act_… ID, as the audit log names it

Pattern: ^act_[0-7][0-9a-hjkmnp-tv-z]{25}$
user
object
required

The person it was taken from

unit
string
required

The unit's key

Pattern: ^[a-z][a-z0-9_-]{0,63}$
amount
integer
required

How many were used

balance_after
integer
required

What the person holds now

reference
string | null
required

The reference it was spent under