fiat - Coin Moebius. ; . - qlh , card , renewals , . Coin Moebius.
- setup
Products , One-time- Billing field . field , . .
HTML . - product-id="-" attribute ; checkout billing API- .
<coin-moebius-buy
project-id="proj_YOUR_ID"
product-id="pro-plan"
label="Subscribe to Pro">
</coin-moebius-buy>
qlh . card . cron wIqlhbe'. . dunning . . Stripe ( fiat ) . - qlhbogh .
webhook - , serverlIj . :
| | |
|---|---|
subscription.created | . . |
subscription.renewed | - . . |
subscription.payment_failed | card . -- dunning ; . |
subscription.canceled | . , dunning , . |
subscription.updated | , card , . . |
Coin Moebius , . , , , id . user account ( ), user id customer-ref . metadata.customerRef- , , , string . ; foreign key .
<coin-moebius-buy
project-id="proj_YOUR_ID"
product-id="pro-plan"
customer-ref="user_bob_42">
</coin-moebius-buy> (, card -, ), card link (Stripe, PayPal, , Authorize.Net), . ; .
: link ,
: Stripe Customer Portal, PayPal account , . , card , download, , UI . API qlh- Dalanlah:
const res = await fetch(
`https://api.coinmoebius.com/api/subscriptions/${projectId}/${subId}/portal-url`,
{ method: 'POST', body: JSON.stringify({ returnUrl: 'https://you.example/account' }) },
);
const { url } = await res.json();
window.location.assign(url);
Stripe PayPal - . , , . renewals qlh .
Authorize.Net - . (Authorize.Net , Accept.js- card ; checkout ), webhook . (webhook , , status , link) Stripe PayPal . .
crypto (NOWPayments) - - . gatewayDaq - crypto ; QITbe' .