Skip to main content
GET
Check wallet access

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id_or_alias
string
required

Customer ID or alias

Query Parameters

currency
enum<string>

Defaults to the customer's currency.

Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHF,
CLP,
CNH,
CNY,
COP,
CRC,
CUC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
SSP,
STD,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VES,
VND,
VUV,
WST,
XAF,
XCD,
XOF,
XPF,
YER,
ZAR,
ZMW,
ZWL
Example:

"EUR"

credit_unit
string

Checks the wallet of this credit unit (its code) instead of a currency.

product_id
string<MeteroidId>

Checks only the credit that can pay for this product: credit not restricted to products, and credit restricted to it. Absent checks all credit.

Example:

"prd_7n42DGM5Tflk9n8mt7Fhc7"

subscription_id
string<MeteroidId>

Checks only the credit this subscription (sub_…) can spend, net of its own usage no credit pays: the credit that belongs to it and the customer's credit that belongs to no subscription, once every subscription's unbilled usage is paid. has_access is then the decision the access gate makes for that subscription's usage. Absent checks the customer's credit as a whole.

Example:

"sub_7n42DGM5Tflk9n8mt7Fhc7"

Response

Whether the customer still has credit

Whether a customer may keep consuming what their prepaid credit pays for.

as_of
string<date-time>
required

When balance was computed.

balance
integer<int64>
required

The balance: credit on account net of the usage not invoiced yet that it will pay, in minor units of currency or credit_unit; never negative for the customer as a whole, as balance of GET /wallets. With product_id, only the credit that can pay for that product, net of its usage no credit covers. With subscription_id, only the credit that subscription can spend (credit restricted to products it is not charged for left out), net of its usage no credit covers; credit that belongs to no subscription counts in every subscription's balance (see shared_balance).

exact
boolean
required

Always false: balance may lag usage by a few seconds (see as_of), and the answer is cached for one second.

exhausted
boolean
required

True once balance is at or below zero, or, with subscription_id, once no credit is left for some of its usage. Independent of has_access: a wallet that allows overage still reports this, so the caller can warn without refusing.

has_access
boolean
required

False only once balance is at or below zero and blocks_when_exhausted is true. Customers without a wallet in currency do not prepay, and always have access. With subscription_id: false when blocks_when_exhausted is true and no credit that subscription can spend is left for some of its usage (of product_id when given), as the access gate refuses it; a subscription charged no usage in the wallet keeps access.

lag_ms
integer<int64>
required

Age of balance, in milliseconds.

pauses_at_zero
boolean
required

Whether usage is refused as soon as the credit is used up: the wallet's usage_at_zero, else the plan of the subscription checked (of any active subscription without one). A plan that invoices usage up to a cap refuses it past the cap only, as has_access reports.

credit_unit
string | null

The credit unit (its code) checked; absent for a currency.

credit_unit_precision
integer<int32> | null

Decimal places of credit_unit: balance is in integers of 10^-precision credit.

Required range: x >= 0
currency
enum<string> | null

Absent when a credit unit was checked.

Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHF,
CLP,
CNH,
CNY,
COP,
CRC,
CUC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
SSP,
STD,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VES,
VND,
VUV,
WST,
XAF,
XCD,
XOF,
XPF,
YER,
ZAR,
ZMW,
ZWL
Example:

"EUR"

shared_balance
integer<int64> | null

With subscription_id only: the part of balance that belongs to no subscription, which the customer's other subscriptions can spend too.