Skip to content

Apply automatic payments to every service

POST/billing/autopay/sync

Overview

Makes every service follow the account's settings instead of its own, as changing them does. Each automatic payment a service set up on its own is stopped, so the default method pays for it while enabled is true and nothing does while it is false; one already ending at the end of its period is left to end. While pays_from_credit is false, each service still paying from account credit by its own setting has that turned off. Services that already follow the account are not touched.

A service that cannot be changed does not stop the others. The request then answers with an error naming each one, and those keep their own setting. Returns the account's setting.

Permissions

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

curl --request POST \
  --url 'https://console.advinservers.com/api/v1/client/billing/autopay/sync' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
{
  "enabled": true,
  "pays_from_credit": true,
  "credit_available": true,
  "methods": [
    {
      "uuid": "b71cfb0d-abab-4721-9254-622be47149cb",
      "uuid_short": "Uuid short",
      "type": "Type",
      "label": "Label",
      "brand": "Brand",
      "last_four": "Last four",
      "expires": "Expires",
      "is_default": true,
      "service_ids": [
        1
      ],
      "created_at": "2026-09-14T16:42:09.000000Z"
    }
  ],
  "cards_available": true,
  "paypal_available": true
}

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>.

Response 200

application/json

The record, as a JSON object. There is no envelope.

enabledbooleanrequired

Whether every service and postpaid invoice is charged to the default method.

pays_from_creditbooleanrequired

Whether the account credit pays as much of every invoice as it can when it is due, with automatic payments on or off.

credit_availablebooleanrequired

Whether that can be chosen: account credit is offered and the billing system can apply it to every service.

methodsobject[]required

Saved cards and PayPal accounts, the default first.

Show child attributes
uuidstringrequired

The uuid UUID.

uuid_shortstringrequired

The value of uuid_short.

typestringrequired

card or paypal.

labelstringrequired

How the method is named, such as "Visa ending 4242" or the PayPal account's email address.

brandstring | nullrequired

The card network as Stripe names it, such as visa or amex. Null for PayPal.

last_fourstring | nullrequired

A card's last four digits, null for PayPal.

expiresstring | nullrequired

A card's expiry as MM/YY, null for PayPal.

is_defaultbooleanrequired

Whether everything is charged to this method while automatic payments are on for the whole account.

service_idsinteger[]required

The services whose renewals are charged to it on their own.

created_atstringrequired

The date and time for created at, in UTC.

cards_availablebooleanrequired

Whether a card can be added, and whether a PayPal account can.

paypal_availablebooleanrequired

The value of paypal_available.

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.
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.