Skip to content

Cancel a top-up

POST/billing/deposits/{fundDeposit}/cancel

Overview

Cancels an unpaid top-up. Cancellation is rejected while a payment is being processed. The response normally has a cancelled status. If billing is unavailable or a payment arrives during cancellation, the top-up remains awaiting payment with an earlier deadline. Processing continues in the background; check again until the status is final. Top-ups belonging to another account return 404.

Permissions

Requires the account permission billing.manage (Manage billing).

curl --request POST \
  --url 'https://console.advinservers.com/api/v1/client/billing/deposits/{fundDeposit}/cancel' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
{
  "uuid": "20a09a3f-a6cf-4470-b078-7330235aa5d5",
  "uuid_short": "Uuid short",
  "status": "cancelled",
  "status_label": "Cancelled",
  "payment_in_progress": true,
  "billing": {
    "service_id": null,
    "invoice_id": 18386,
    "invoice_url": null,
    "checkout_uuid": null,
    "invoice_status": "Cancelled",
    "amount": "25.00",
    "currency": "USD",
    "billing_cycle": null,
    "payment_due_at": "2026-09-14T17:12:09+00:00",
    "payment_window_minutes": null,
    "paid_at": null
  },
  "credited_at": null,
  "cancelled_at": "2026-09-14T16:44:31+00:00",
  "created_at": "2026-09-14T16:42:09+00:00"
}

Authorization

Authorizationstringheaderrequired

Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

Send it as Bearer <token>.

Path parameters

fundDepositstringrequired

The fund deposit uuid short

Response 202

application/json

The request was accepted and is being carried out in the background.

uuidstringrequired

The uuid UUID.

uuid_shortstringrequired

The value of uuid_short.

statusstringrequired

The value of status.

One of: pending_payment, credited, expired, cancelled

status_labelstringrequired

The status in the customer's words, written once on the enum.

payment_in_progressbooleanrequired

Paid or being paid at a checkout, before the top-up shows it. The dialog reads it to stop a second payment; the list shows only Unpaid or Paid.

billingobjectrequired

The value of billing.

Show child attributes
service_idinteger | nullrequired

The customer's service number, once a recurring service exists.

invoice_idinteger | nullrequired

The customer's invoice number, once an invoice exists.

invoice_urlstring | nullrequired

A complete URL where the invoice can be paid.

checkout_uuidstring | nullrequired

The checkout UUID, or null when no checkout is available.

checkout_uuid_shortstring | nullrequired

The value of checkout_uuid_short.

invoice_statusstring | nullrequired

The current invoice status, or null before an invoice exists.

amountstring | nullrequired

The amount in the currency shown by currency.

currencystring | nullrequired

The three-letter currency code used for amount.

billing_cyclestring | nullrequired

How often the service renews, or null for a one-time charge.

payment_due_atstring | nullrequired

When payment is due before the reservation is released.

payment_window_minutesinteger | nullrequired

How many minutes the original payment window allowed.

paid_atstring | nullrequired

When the charge was paid, or null while payment is outstanding.

credited_atstring | nullrequired

The date and time for credited at, in UTC.

cancelled_atstring | nullrequired

The date and time for cancelled at, in UTC.

created_atstring | nullrequired

The date and time for created at, in UTC.

Errors

401
The key was missing, malformed, revoked, or belongs to an account that no longer exists.
403
Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
404
The resource was not found in the selected team. Resources in another account or team also return 404.
422
A field is missing or invalid, or the resource cannot accept this change in its current state. Check message for details. Field validation also includes an errors object keyed by field name.
429
Too many requests. The Retry-After header says how many seconds to wait. Limits are per account, so several keys on one account share them.