Skip to Content
Account

Report what happened to a plan link in the app: opened, opened in a store without the app (install_required), declined in Shopify, or Shopify refused appSubscriptionCreate (blocked, with its reason). Idempotent by client_event_id. Charges nothing. A store key needs developer:account:read, an account-wide key developer:billing:checkout

POST
/developer-api/billing/plan_links/{plan_link}/events

Authorization

bearer
headerAuthorizationBearer <secret_api_key>

Use Authorization: Bearer <secret_api_key>.

Path Parameters

Request Body

application/json
  1. body
type*string

link_opened: the app was opened by the link. install_required: it was opened in a store without the app (reported after the install). declined: the merchant declined the subscription in Shopify. blocked: Shopify refused appSubscriptionCreate (reason required).

Value in"link_opened""install_required""declined""blocked"
reason?string

blocked only: no_billing_permission (the staff member may not approve charges), shop_cannot_pay (no payment method, a trial or frozen store), api_error (anything else; the merchant was shown a retry).

Value in"no_billing_permission""shop_cannot_pay""api_error"
client_event_id*string

The app's own id of the event: a retry with the same id is not recorded twice.

Length1 <= length <= 128
store_id?string

The connected Shopify store to charge through; an account-wide key only — a store key always uses its own store.

Length1 <= length

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 POST 'https://api.vizbl.com/developer-api/billing/plan_links/string/events' \  -H 'Content-Type: application/json' \  -d '{  "type": "link_opened",  "client_event_id": "plan-link-opened-0001"}'
Example Response
{  "status": 100,  "code": "string",  "error": [    "string"  ],  "retryAfterSeconds": 0,  "manageUrl": "http://example.com",  "manage_url": "http://example.com",  "stack": "string"}