Add funds by card
POST/v1/topups
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
| Field | Type | Description |
|---|---|---|
| amount_microsrequired | integer | Micro-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.
| Field | Type | Description |
|---|---|---|
| object | string | One of topup. |
| id | string | |
| status | string | One of pending, paid, expired, failed. |
| provider | string | |
| url | string | Where to pay. Present while pending. |
| amount_micros | integer | |
| currency | string | |
| reference | string | The provider's payment reference once paid; also on the ledger line. |
| created_at | timestamp | |
| paid_at | timestamp |
Errors
| Status | Codes |
|---|---|
| 400 | invalid_request, unsupported_version |
| 503 | route_unavailable |
Also in Billing
- GET /v1/topups/{id} — One top-up
- POST /v1/subscriptions — Start a product subscription
- GET /v1/subscriptions/{product} — Current product subscription
- POST /v1/payments/stripe/webhook — Stripe's webhook
- GET /v1/ledger — The account statement
- GET /v1/billing/payment_options — How this account can pay
- PUT /v1/billing/payment_currency — Choose to pay in birr or in US dollars
- GET /v1/billing/bank_deposits — Recent birr bank deposits
- POST /v1/billing/bank_deposits — Request a birr bank deposit
- POST /v1/billing/bank_deposits/{id}/receipt — Upload the bank receipt for a deposit
- POST /v1/billing/bank_deposits/{id}/cancel — Cancel a deposit that has not been submitted or was returned
- GET /v1/balance — Retrieve account balance
- GET /v1/billing/email_tariff — The email price this account pays
- GET /v1/billing/email_subscription — This account's monthly email plan
- PUT /v1/billing/email_subscription — Take an email plan, or change it
- POST /v1/billing/email_subscription/cancel — Stop the email plan renewing
- GET /v1/pricing/email — The published email tariff