billing

POST /v1/subscriptions/{subscriptionId}/auto-renew

Turn a subscription's renewal on or off.

সমস্ত billing এন্ডপয়েন্ট

প্রমাণীকরণ

একটি বিয়ারার টোকেন হিসেবে একটি এপিআই কি পাঠান। কি-টির অবশ্যই billing.payment.manage অনুমতি থাকতে হবে; এটি ছাড়া কোনো কি ৪০৪ নয়, বরং ৪০৩ ত্রুটি দিয়ে প্রত্যাখ্যাত হবে।

এই এন্ডপয়েন্টটি কোনো অর্গানাইজেশন আইডি নেয় না। আপনার কীটি ইতিমধ্যে এটি যে অর্গানাইজেশনের অন্তর্গত তা শনাক্ত করে এবং প্রতিক্রিয়াটি সেই অনুযায়ী নির্ধারিত হয়।

চেষ্টা করুন

কোণ বন্ধনীতে থাকা যেকোনো কিছু আপনার নিজস্ব মান দিয়ে এবং কী প্লেসহোল্ডারটি আপনার ড্যাশবোর্ডের একটি কী দিয়ে প্রতিস্থাপন করুন।

curl -X POST https://api.zinndigital.com/v1/subscriptions/{subscriptionId}/auto-renew \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "auto_renew": <boolean> }'

লগ ইন করা আছে? আপনার ড্যাশবোর্ডের এপিআই কনসোল আপনার আসল অর্গানাইজেশন আইডি এবং আপনার নিজের কি পূরণ করে দেয়, এবং লাইভ এপিআই-এর বিপরীতে অনুরোধটি চালায় যাতে আপনি প্রকৃত প্রতিক্রিয়া দেখতে পান। এই এন্ডপয়েন্টটি এপিআই কনসোলে খুলুন

বিবরণ

**The customer's renewal switch, and the only one there is.** With `auto_renew` **false** the subscription runs to the end of the period already paid for and is then `expired` by the rebill sweep — nothing is minted, no card is charged, and the entitlements lapse at the same instant the period does. It is **not** an immediate cancellation: every day already bought is kept. With it **true** the subscription is selected by the nightly sweep at `current_period_end`, an order is minted and the payment method is charged. The switch is reversible right up to that moment, which is the customer's way back after turning it off. For a compute server the machine follows on its own: the provider's own renewal flag is pinned to "hold" for the life of every machine and is never exposed, so an unrenewed contract keeps serving for 24 hours, is powered down, and is deleted six days after that. Zinn® issues each vendor renewal explicitly, after the money is captured. Find a server's subscription with `subscription_id` on `GET /v1/compute/servers/{serverId}/renewal`. The response is the subscription **as the database now holds it**, not an echo of the request. Requires `billing.payment.manage` — the authority to decide what this account is charged. It deliberately does **not** require `sites.view`: a subscription is not a site, and this endpoint governs every plan, including ones that own no site. `404` for a subscription in another tenant as well as for one that does not exist — a `403` would confirm that an id belongs to somebody. `422` when the subscription has already ended (`canceled`/`expired`): writing `true` to a row the sweep can never select again would tell the customer they were covered when nothing will charge or serve them.

পরামিতি

নামধরনআবশ্যকএটি কী
subscriptionId (path)Uuidহ্যাঁThe subscription whose renewal is being changed.

অনুরোধের বডি

নামধরনআবশ্যকএটি কী
auto_renewbooleanহ্যাঁ`true` to charge again at `current_period_end`; `false` to run to the end of the paid period and then expire.

প্রতিক্রিয়া

নামধরনআবশ্যকএটি কী
idUuidহ্যাঁUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidহ্যাঁUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusSubscriptionStatusহ্যাঁA subscription's lifecycle state (docs/05 §1).
planSubscriptionPlanRefহ্যাঁThe pinned plan version a subscription was sold (a purchase-time snapshot).
priceMoneyAmountহ্যাঁThe captured price the subscriber pays (minor units + code, §2.8).
intervalstring<monthly, annual>হ্যাঁ
entitlementsobjectহ্যাঁThe resolved entitlements captured at purchase (feature/quota map).
current_period_startstringহ্যাঁ
current_period_endstringহ্যাঁ
auto_renewbooleanহ্যাঁWhether this subscription charges again at `current_period_end`. `false` does not mean it has ended: it runs to the end of the period already paid for and is then `expired`. Cha…
billing_railstring<engine, paypal>না**Which clock decides when this subscription is charged** (W41-G, ADR 0029). `engine` is the default and is what ADR 0011 describes: the engine decides money is due, mints an or…
started_atstringহ্যাঁ
canceled_atobjectনা
created_atstringহ্যাঁ
updated_atstringনা

এই এন্ডপয়েন্ট থেকে যেসব ত্রুটি আসতে পারে

401 · 403 · 404 · 422 · 429