WoyraDocs
Get an API key

Add funds by card

POST/v1/topups

Billing · Requires an API key

Opens a hosted card checkout for the amount and returns its URL. Send the customer there. Nothing is credited here: the provider's webhook, verified by signature, is what moves the ledger — once, however often it is retried. Crediting on an unconfirmed payment would turn a prepaid model into an unsecured lending one (Blueprint 3.10).

The minimum is 5.00 in the account currency, and the amount must be a whole number of minor units. Wires and goodwill credits are an operator's action in the admin app, never a customer's. Requires billing:manage.

Body

FieldTypeDescription
amount_microsrequiredintegerMicro-units of the account currency. 1000000 = 1.00.

Example

curl -X POST https://api.woyra.io/v1/topups \
  -H "Authorization: Bearer $WOYRA_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "amount_micros": 1
  }'

Response

201 The pending top-up, with the page to pay on.

FieldTypeDescription
objectstring
One of topup.
idstring
statusstring
One of pending, paid, expired, failed.
providerstring
urlstringWhere to pay. Present while pending.
amount_microsinteger
currencystring
referencestringThe provider's payment reference once paid; also on the ledger line.
created_attimestamp
paid_attimestamp

Errors

StatusCodes
400invalid_request, unsupported_version
503route_unavailable

Also in Billing