billing

POST /v1/subscriptions/{subscriptionId}/billing-rail

Choose which clock charges this subscription.

Gbogbo àwọn billing endpoints

Gbogbo àwọn ìwé àṣẹ olùgbékalẹ̀ àgbékalẹ̀

Ìfàṣẹ́pọ̀

Fi bọ́ọ̀lù (bearer token) ranṣẹ gẹ́gẹ́ bí kọ́kọ́rọ́ API. Kọ́kọ́rọ́ náà gbọ́dọ̀ ní ìyọ̀ǹda billing.payment.manage; a ó kọ̀ ọ́ silẹ pẹlu 403, kii ṣe 404, ti kọ́kọ́rọ́ náà kò bá ní i.

Ojú abánisọ̀rọ̀ yìí kò gba id ajọ kankan. Kọ́kọ́rọ́ rẹ ti mọ ajọ ti o jẹ ti e, a o si fèsì nipa rẹ̀.

Gbiyanju rẹ

Rọ́pọ̀ èyíkéyìí nínú àwọn àmì ìtọ́ka < > pẹ̀lú iye tirẹ̀, àti àmì ìdánimọ̀ bọ́tìnnì náà pẹ̀lú bọ́tìnnì kan láti inú dásibọ̀ọ̀dù rẹ.

curl -X POST https://api.zinndigital.com/v1/subscriptions/{subscriptionId}/billing-rail \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "rail": <string<engine, paypal>> }'

Ṣé o ti wọlé? Iwọ̀n api ní nú ìgbékalẹ̀ rẹ kún id àjọ gidi rẹ ati bọtini tirẹ, o si nṣiṣẹ ibeere na lòdì si api gidi ki o le rii esi gidi na. Ṣí ojú abáná yìí sílẹ̀ nínú kọnsólù API

Àwọn kúlẹ̀kúlẹ̀

Move a subscription between the engine rail (we invoice and charge on the renewal date) and the PayPal rail (PayPal charges on its own schedule under an agreement the customer approved). ADR 0029 records the boundary: PayPal owns only when the money is taken — the engine still owns what is owed, tax, entitlements, dunning and suspension. ⛔⛔ Switching to PayPal returns an approval_url and grants nothing. Until the buyer approves in PayPal's own interface and PayPal sends us a signed BILLING.SUBSCRIPTION.ACTIVATED webhook, the agreement cannot charge and the subscription's clock has not started. active is false for exactly that reason. The browser's return from the approval URL is an attacker-supplied claim and is never treated as approval. Switching away cancels the agreement at PayPal first and unbinds second. The reverse order would hand the subscription back to the engine's renewal sweep while PayPal was still entitled to charge it — a double charge for the window between the two calls. Requires billing.payment.manage. 422 carries a code: ALREADY_ON_RAIL, NO_CATALOGUE_PRICE, PRICE_WOULD_CHANGE (the subscription is on a price that differs from the published one, so switching would change what the customer pays — refused rather than done quietly), NOT_SWITCHABLE, or PAYPAL_REFUSED.

Àwọn ìpìlẹ̀

OrúkọIruTí a nílòKini o jẹ
subscriptionId (path)UuidBẹẹniThe subscription whose recurring rail is being changed.

Akoonu ibeere naa

OrúkọIruTí a nílòKini o jẹ
railstring<engine, paypal>Bẹẹni

Idahun

OrúkọIruTí a nílòKini o jẹ
railstring<engine, paypal>Bẹẹni
approval_urlobjectBẹẹkọWhere the buyer must approve the PayPal agreement. ⛔⛔…
activebooleanBẹẹniWhether the named rail is charging yet. false immediately after switching to PayPal — a client that rendered "you are now billed by PayPal" here would be telling the customer…
paypal_subscription_idstringBẹẹkọ

Awọn aṣiṣe ti ibudo ipari yii le da pada

401 · 403 · 404 · 422 · 429