การยืนยันตัวตน

ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ billing.payment.manage หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404

ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ

Endpoint นี้รับ org_id เป็นฟิลด์ใน JSON body

รหัสองค์กรของคุณจะแสดงอยู่บนหน้าคีย์ API ในแดชบอร์ดของคุณ โดยอยู่ถัดจากคีย์นั้นๆ รหัสนี้จะเป็นรหัสเดิมในการเรียกใช้งานทุกครั้งของคุณ

ทดลองใช้เลย

แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ

curl -X POST https://api.zinndigital.com/v1/extras/{code}/purchase \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API

รายละเอียด

Buys the extra: it is charged wallet-first then gateway, and handed to durable fulfilment (an automated workflow, or a staff task). The price and fulfilment path are server-decided (docs/26 §3). Requires billing.payment.manage. Two different 422s, and a client must tell them apart: PAYMENT_METHOD_REQUIRED means the organization holds no chargeable payment method, so nothing was presented to any gateway and nothing was refused — the remedy is to add a payment method — or pay with PayPal or cryptocurrency — and buy again. UNPROCESSABLE_ENTITY on this path is a genuine gateway decline. Reporting the first as the second tells a customer who has never entered a card that their bank refused them (docs/491 §7).

พารามิเตอร์

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
code (path)stringใช่The extra's code (e.g. db_maintenance).

เนื้อหาคำขอ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
org_idUuidไม่ใช่UUIDv7 identifier — sortable by creation time (docs/02 §8).
site_idobjectไม่ใช่
domain_idobjectไม่ใช่The domain a domain-scoped extra is bought for. Premium DNS (premium_dns) is the first: it is applied at the registrar, per zone, on a name held in our registrar account.…
currencyCurrencyCode | nullไม่ใช่The currency the customer was quoted in on the catalogue screen. Omit it and the engine uses the X-Zinn-Currency header. Extra rows are stored in the base currency only, so…
gatewayobjectไม่ใช่The payment rail the customer picked, from getPaymentOptions. Omit it (or send null) for "no preference", which follows the payment method the organization would be charged on…
pay_withstring<card, credit>ไม่ใช่Where the money comes from. Owner ruling 2026-08-24: "Credit pays, or card — customer picks". Only the AI products (ai_webmaster, ai_update_guard and any other row in those…

การตอบกลับ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
idUuidใช่UUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidใช่UUIDv7 identifier — sortable by creation time (docs/02 §8).
extra_idUuidใช่UUIDv7 identifier — sortable by creation time (docs/02 §8).
site_idobjectไม่ใช่
domain_idobjectไม่ใช่
statusExtraPurchaseStatusใช่An extra purchase's lifecycle state.
categorystringใช่
fulfilment_typeExtraFulfilmentTypeใช่How an extra is delivered.
intervalExtraIntervalใช่One-off charge or a recurring subscription.
priceMoneyAmountใช่A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
recurrencestring<none, active, ended>ใช่Whether the recurrence behind this purchase is still live. none = it never recurred (a one-off); active = a scheduled charge exists; ended = it recurred and no longer does.…
next_renewal_onobjectไม่ใช่The next charge date, or null. Also null for a live charge that has no date scheduled yet, so read recurrence — not this field — to decide whether a purchase renews at all.
sla_due_atobjectไม่ใช่
completed_atobjectไม่ใช่
failure_reasonstringไม่ใช่
created_atstringใช่
updated_atstringใช่

ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้

401 · 403 · 404 · 422 · 429