Payments
Owner decisions: card through Stripe (with Apple Pay and Google Pay), PayPal, crypto on the TRON network; no invoice and no bank transfer. The buyer is charged in the seller's currency; the provider converts. Every provider runs a hosted payment page, so no card or wallet data ever reaches the store.
Stripe
- Checkout Sessions (
mode=paymentormode=subscriptionwithsubscription_data.trial_period_days); Apple Pay and Google Pay come with Checkout. The return URL carriessession_id. - Confirmation reads the session with
payment_intent.latest_charge.balance_transactionexpanded: the real fee. - Webhooks:
checkout.session.completed(paid),invoice.paidwithbilling_reason=subscription_cycle(renewed),customer.subscription.deleted(ended),charge.refunded.Stripe-Signatureis checked (HMAC-SHA256 of<t>.<body>, 300 s tolerance). - Refunds:
POST /v1/refundson the payment intent. Cancelling setscancel_at_period_end. - Seller payouts: Connect transfers to the seller's
acct_account.
PayPal
- One-time: Orders v2 (
intent=CAPTURE), approve on PayPal, capture on return; the fee fromseller_receivable_breakdown.paypal_fee. - Subscriptions: a product and a plan per app and price (idempotent request ids), then a subscription; renewals by
PAYMENT.SALE.COMPLETED. - Webhooks are verified by PayPal (
/v1/notifications/verify-webhook-signaturewith[Provider_paypal] WebhookID). - Refunds of a capture (or a subscription's sale); seller payouts with Payouts to the seller's PayPal e-mail.
Crypto on TRON
- TRC-20 stablecoin (USDT by default) to the store's receiving address; the store only watches it through TronGrid, no wallet key is on the server.
- The amount is the price converted (
Rate[<currency>], USD per unit; USD = 1 for USDT) pluspurchase id mod 1000in the coin's smallest unit, so a transfer identifies its purchase. The payment page asks the chain every 15 s; the daily run checks open payments too. - The sending address is kept: a refund goes back to it, in the same coin, for the amount paid (owner decision). The
operator sends it from the store wallet and records the transaction (
refund-sent), which is checked on the chain. - No auto-renewal: a reminder with a payment link before the period ends. Free trials need a renewing method.
- Note: the existing extension called
tronis Exponential's MCP layer and has no crypto features; the TRON-network payment provider lives here (expAppMarketTronPay).
Test mode and the local sandbox
Until launch every provider runs with Mode=test: Stripe test keys (sk_test_), the PayPal sandbox, the TRON Nile
testnet. tests/sandbox/provider-sandbox.php is a local simulator of the three APIs for end-to-end tests on a
throwaway store (doc/TESTING.md); it accepts only test keys and plays the buyer on the hosted pages.