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. The user data (name, cpf, birth_date, gender, address) only fills what is empty on the person; phone and email identify the person and never change an existing account.

action_id
integer
required

The action's code: the Code column of your actions list in the dashboard, or the id in GET /api/v2/partner/actions/. A body with the former name of this field is refused with a 422.

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

Units of the 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
birth_date
string<date> | null

ISO YYYY-MM-DD. Fills the person's birth date only when it is empty.

gender
enum<string> | null

Fills the person's gender only when it is empty.

Available options:
male,
female,
non_binary,
other,
prefer_not_to_say,
null
address
object | null

Added as an address sent by your company; the customer's own address is never touched.

Response

A credit your partner account made.

id
string<uuid>
required
external_reference
string
required
action_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