partner

POST /v1/partner/customers/{externalId}/trials/{trialId}/cancel

End a card-free trial you started, now.

Све partner крајње тачке

Сва документација за програмере →

Аутентификација

Пошаљите API кључ као bearer токен. Кључ мора имати дозволу partner.domains; кључ без ње се одбија уз 403, а не 404.

Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.

Испробајте

Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.

curl -X POST https://api.zinndigital.com/v1/partner/customers/{externalId}/trials/{trialId}/cancel \
  -H "Authorization: Bearer zdk_live_…"

Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли

Детаљи

Ends a trial you started with createPartnerHostingOrder trial: true (the id is trial.trial_id on getPartnerHostingOrder). The trial goes canceled at once, its site stops serving and its deletion is scheduled, and nothing is billed before or after. The response is the trial ORDER: its trial.status reads canceled; the order's own status stays completed, because a settled $0 order is a historical fact. Repeating the call is safe and returns the same body. Refusals, details[0].code: not_owned (a 404 — not a trial you started for this customer), already_converted (it became a paid plan: cancel the subscription instead), already_ended (past its cut-off; its site is already stopped). Open this on hosting_orders.trial.cancel. Requires partner.domains.

Параметри

НазивТипОбавезноШта је ово
externalId (path)stringДаYOUR id for that customer — whatever your own system calls them. It is what makes linking idempotent, and it is scoped to your partner programme: another partner's id is a 404…
trialId (path)stringДа—

Одговор

НазивТипОбавезноШта је ово
order_idstringДа—
human_refstringДаThe reference the payment page returns to you as ?order=.
pay_urlstringНеOnly in the response that placed (or replayed) the order: the hosted page the customer pays on. It carries a secret that is stored nowhere — treat it as one. Absent on a trial…
pay_expires_atstringНе—
org_idstringДа—
trialPartnerHostingTrial | nullДаPresent on an order placed with trial: true; null on every other order. Until fulfilment starts the trial, status is pending and the dates are null.
replaces_subscription_idobjectНеThe live plan subscription this order replaces, as named on the request (ADR 0036); null when the order ADDS a plan. Once fulfilled that subscription is canceled and…
statusstringДаAs on PartnerOrder.
currencystringДа—
term_monthsintegerДа—
subtotal_minorintegerДа—
tax_minorintegerДа—
total_minorintegerДа—
linesPartnerHostingOrderLine[]Да—
sitePartnerHostingOrderSite | nullДа—
subscription_idobjectДаThe subscription the paid plan line became; null until fulfilment.

Грешке које ова крајња тачка може вратити

401 · 403 · 404 · 422 · 429