Skip to Content
Account

Switch the auto top-up of an account that pays through the Shopify app off or on, or change the balance it runs at and the tokens of one top-up — under the usage charge the merchant already approved in Shopify. Switching off needs neither that charge nor the numbers: it only stops spending. The cap is not checked: a top-up that does not fit under it is not charged, and the state then reads cap_reached. Asks nothing of Shopify and charges nothing. A store key needs developer:account:read, an account-wide key developer:billing:checkout

PUT
/developer-api/billing/auto_top_up

Authorization

bearer
headerAuthorizationBearer <secret_api_key>

Use Authorization: Bearer <secret_api_key>.

Request Body

application/json
  1. body
enabled*boolean

false: no auto top-up is charged. Never refused for the state of the account: no usage charge and no payment platform are needed, and the two numbers of the request, if sent, are not used — the saved ones stay. It is written before anything else is read, so a server error answered to it does not mean auto top-up stayed on: the request can be repeated. The usage charge the merchant approved in Shopify stays too, so true switches auto top-up back on without a new approval.

threshold_tokens?integer

Top up when the balance falls to this many tokens. Given together with top_up_tokens; without the two auto top-up is switched on at the saved ones.

Range0 <= value <= 9007199254740991
top_up_tokens?integer

Tokens of one top-up, between token_catalog.min_tokens and max_tokens and above threshold_tokens. Given together with threshold_tokens; without the two auto top-up is switched on at the saved ones.

Range0 < value <= 9007199254740991

Response Body

Invalid request

application/json
  1. response
status*number
Value in100101102103200201202203204205206207208210300301302303304307308400401402403404405406407408409410411412413414415416417418421422423424428429456500501502503504505507508
code*string

Machine-readable error id (i18n dictionary key), e.g. shopify.ERROR_ID_TOKEN_INVALID; http_error.<STATUS> when there is no specific one.

error*array<string>
retryAfterSeconds?integer
Range0 <= value <= 9007199254740991
manageUrl?string

Where this account pays instead: the Vizbl app billing page in the Shopify admin (subscription.ERROR_PAYMENTS_THROUGH_SHOPIFY_APP).

Formaturi
manage_url?stringDeprecated

Deprecated: the same as manageUrl, kept for the clients that still read it.

Formaturi
stack?string
curl -X PUT 'https://api.vizbl.com/developer-api/billing/auto_top_up' \  -H 'Content-Type: application/json' \  -d '{  "enabled": false}'
Example Response
{  "status": 100,  "code": "string",  "error": [    "string"  ],  "retryAfterSeconds": 0,  "manageUrl": "http://example.com",  "manage_url": "http://example.com",  "stack": "string"}