Skip to main content
POST
Credit Z$ to a user

Authorizations

X-API-Key
string
header
required

Per-company partner API key (zupy_pk_…). Validated by Zupy against the company integration key hash (Story 14.x); send it on every request as the X-API-Key header. Scoped read-write to the owning company's data.

Body

Body of a credit. Your partner account is never in the body: it is the API key's.

campaign_id
integer
required
Required range: x >= 1
quantity
string<decimal>
required

Units of the campaign's action (e.g. litres), > 0, at most 6 decimals.

Pattern: ^-?\d{0,18}(?:\.\d{0,6})?$
external_reference
string
required

The partner's own id for this credit. Same reference + same data = the same credit.

Maximum string length: 200
phone
string | null
Maximum string length: 32
email
string<email> | null
cpf
string | null
Maximum string length: 20
wallet_address
string | null
Maximum string length: 64
name
string | null
Maximum string length: 255

Response

A credit your partner account made.

id
string<uuid>
required
external_reference
string
required
campaign_id
integer
required
quantity
string<decimal>
required
Pattern: ^-?\d{0,18}(?:\.\d{0,6})?$
unit
string
required
unit_value
string<decimal>
required
Pattern: ^-?\d{0,16}(?:\.\d{0,2})?$
amount
string<decimal>
required
Pattern: ^-?\d{0,16}(?:\.\d{0,2})?$
customer_id
string
required
status
string
required
read-only

settling: the Z$ is already spendable and its on-chain record is pending; settled: recorded on-chain; settlement_failed: the on-chain record failed for good; unknown: contact Zupy support.

created_at
string<date-time>
required