High-level sequence
1. Initialize order
- Endpoint:
POST /v2/orders - Input:
cartId(UUID)
Order
record in PENDING status, and locks the cart to prevent further changes.
Returns: orderId
2. Create payment intent
- Endpoint:
POST /v2/orders/:orderId/payment-intent - Input:
orderId,paymentMethod(e.g.STRIPE,PAYPAL,CRYPTO,BONUM,TELR)
orderId) is attached to the provider’s intent so reconciliation can happen later.
Returns: clientSecret (Stripe) or checkoutUrl (PayPal, hosted PSPs).
3. Calculate distribution (internal)
Runs synchronously inside step 2. Computes:- Droplinked commission — platform fee
- Provider fees — pass-through PSP charges
- Merchant share — what settles to the merchant
- Affiliate / referral splits — when an attribution session is active
For PSPs that settle off-platform (e.g. Bonum), the saga records the split plan without
executing a live transfer — settlement happens out-of-band and is reconciled later.
4. Confirm payment
- Endpoint:
POST /v2/orders/:orderId/confirm-payment - Trigger: Webhook event (e.g.
stripe.payment_intent.succeeded)
Distribute revenue
Executes the splits calculated in step 3 (or records them for off-platform settlement).