billing

POST /v1/payment-methods/paypal/confirm

Finish saving a PayPal account after the buyer approved it.

همه نقاط پایانی billing

همهٔ مستندات توسعه‌دهندگان

احراز هویت

یک کلید API را به عنوان یک توکن برbearer ارسال کنید. این نقطه پایانی مجوز خاصی را در مشخصات خود ذکر نمی‌کند، بنابراین به جای فرض کردن، حداقل نیازهای کلید خود را بدهید و پاسخ را بررسی کنید.

جایی که شناسه سازمان شما قرار می‌گیرد

این نقطه پایانی org_id را به عنوان یک فیلد در بدنه JSON دریافت می‌کند.

شناسه سازمان شما در صفحه کلیدهای API در داشبوردتان، در کنار خود کلید قرار دارد. این شناسه در تمام درخواست‌هایی که ارسال می‌کنید یکسان است.

امتحان کنید

هر چیزی را که داخل براکت‌های زاویه‌دار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.

curl -X POST https://api.zinndigital.com/v1/payment-methods/paypal/confirm \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "setup_token_id": <string> }'

وارد شده‌اید؟ کنسول API در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر می‌کند و درخواست را روی API زنده اجرا می‌کند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول API باز کنید

جزئیات

Exchanges an approved setup token for the permanent vault token and stores the mandate. The organization is read from PayPal's answer and must match the caller's, so a setup token belonging to another account cannot be attached here. Idempotent, and it deliberately races PayPal's VAULT.PAYMENT-TOKEN.CREATED webhook: whichever arrives first writes the mandate and the other converges on it, so a buyer whose browser never returns still ends up with a saved method.

بدنه درخواست

نامنوعالزامیچیست
setup_token_idstringبلهThe setup_token_id returned by POST /v1/payment-methods/paypal.
org_idstringخیرOrganization to attach the mandate to. The caller must hold billing.payment.manage in that organization, and PayPal's own answer must name the same organization.

پاسخ

نامنوعالزامیچیست
idstringبله
gatewaystring<stripe, paypal>بلهThe rail holding the mandate. Crypto (NOWPayments) is absent by design — it has no mandate primitive, so those customers are invoiced ahead rather than rebilled (ADR 0011 §6).
statusstring<pending, active, expired, revoked>بلهOnly active is chargeable; pending means the gateway has not confirmed it yet.
rolestring<, primary, backup>بلهWhich job this mandate does for the organisation. primary is charged first; backup is charged immediately if the primary declines; "" is simply stored. ⛔ Replaced…
removal_blocked_bystring<, subscription, adhoc_charge, reseller_programme>بلهEmpty when this method may be removed. Otherwise the obligation that keeps the floor binding: this is the account's last operational way to pay and the named thing is still…
method_typestringبلهThe gateway's own name for what kind of mandate this is — Stripe's PaymentMethod.type (card, sepa_debit, klarna, kakao_pay, …). Empty on a rail that does not type its…
can_auto_renewbooleanبلهWhether this mandate can be charged off-session, i.e. whether a renewal can be taken without the customer present. false means the subscription renews manually: the…
brandstringبله
last4stringبله
exp_monthintegerخیر
exp_yearintegerخیر
holder_namestringخیر
confirmed_atstringخیرWhen the gateway confirmed the mandate. Null while pending.
created_atstringبله

خطاهایی که این نقطه پایانی می‌تواند برگرداند

401 · 403 · 409 · 422 · 429 · 503