Gateway
Start a credit top-up
Changed onAsks to add credits to the authenticated workspace. Needs the opt-in billing:write scope and workspace membership. Nothing is charged here. With a saved card, every workspace owner and admin is emailed a single-use link and one of them confirms or declines the charge. Without one, the response has a checkout_url where an owner or admin pays with a new card, which is saved for later top-ups. Amounts are $5 to $500. A workspace can have 5 pending top-ups, and each expires after 30 minutes.
post/credits/topups
Request
- Base URLhttps://api.phaseo.app/v1
- URLhttps://api.phaseo.app/v1/credits/topups
- AuthHTTP bearer
Headers
Idempotency-Keystring
Optional idempotency key. Repeating it returns the same top-up instead of creating another. Same as the idempotency_key field.
Request body
Example request
{
"amount_usd": 20
}Response
Existing top-up for this idempotency key
Example response
{
"topup": {
"reason": "declined",
"amount_cents": 2000,
"amount_usd": 20,
"currency": "usd",
"payment_method": {
"brand": "visa",
"last4": "4242"
}
}
}Changes
- info
endpoint added
- info