Billing Overview
Billing Overview
All payments for apps on SeloraX flow through the platform. Merchants never pay app developers directly — instead, the platform collects payment, deducts a commission, and credits the developer. This model mirrors how Shopify handles app billing.
How It Works
- Your app creates a charge (one-time, recurring, usage, or wallet top-up).
- The merchant approves the charge in their SeloraX dashboard.
- The merchant pays via the EPS payment gateway (a Bangladesh-based payment processor).
- The platform splits the revenue — commission to the platform, remainder to the developer.
- Your app receives a webhook confirming the charge is active.
Fees & Commission
Every charge has two fixed platform fees:
| Fee | Rate | Description |
|---|---|---|
| SeloraX commission | 10% | Platform commission on every charge |
| Payment gateway | ~2.5% | EPS payment processing fee |
Who Pays the Fees?
You choose who absorbs these fees by setting fee_payer in your app's billing settings on the Developer Portal:
fee_payer | What happens | Merchant sees | Developer receives |
|---|---|---|---|
developer (default) | Fees deducted from your payout | The price you set | Price minus 12.5% |
merchant | Fees added on top of your price | Price + fee breakdown | The full price you set |
Example: 500 BDT charge
Developer pays (default):
Merchant pays: 500.00 BDT
Platform fee (10%): - 50.00 BDT
Gateway fee (2.5%): - 12.50 BDT
Developer receives: 437.50 BDT
Merchant pays:
Base price: 500.00 BDT
Platform fee (10%): + 50.00 BDT
Gateway fee (2.5%): + 12.50 BDT
Merchant pays: 562.50 BDT ← shown with breakdown on approval page
Developer receives: 500.00 BDT
When fee_payer is merchant, the approval page shows a clear breakdown of base price, platform fee, payment processing fee, and total — so the merchant knows exactly what they're paying.
Charge Types
SeloraX supports four billing models:
1. One-Time Charges
A single payment for a service or product. Useful for setup fees, content packs, or premium features that don't recur.
Learn more about one-time charges
2. Recurring Charges
Monthly or yearly subscriptions with auto-renewal. Supports optional free trial periods.
Learn more about recurring charges
3. Usage Charges
Metered billing based on consumption. The charge amount is calculated as quantity * unit_price. Ideal for per-SMS, per-API-call, or per-transaction billing.
Learn more about usage charges
4. Wallet Top-Up
A pre-paid balance system. Merchants top up a wallet, and your app debits it as services are consumed. Useful when you need real-time deductions without requiring merchant approval for every micro-transaction.
Learn more about the wallet system
Charge Status Flow
Every charge follows this lifecycle:
pending
├──→ merchant approves ──→ EPS payment succeeds ──→ active
│ └──→ EPS payment fails ──→ pending (charge.payment_failed)
├──→ merchant declines ──→ declined
├──→ merchant/app cancels ──→ cancelled
└──→ no action for 48h ──→ expired
active (recurring only)
├──→ auto-renewal creates new pending charge ──→ (cycle repeats)
└──→ merchant cancels subscription ──→ cancelled
active (on app uninstall)
├──→ recurring charges ──→ cancelled (reason: app_uninstalled)
└──→ one-time / wallet_topup ──→ stays active (already paid)
| Status | Description |
|---|---|
pending | Charge created, waiting for merchant action |
active | Merchant approved and payment succeeded |
declined | Merchant explicitly declined the charge |
cancelled | Cancelled by merchant, app, or system (e.g. on uninstall) |
expired | No merchant action within 48 hours |
Payment Callback Flow
After the merchant approves a charge and completes payment through EPS, the platform handles the callback automatically:
- EPS redirects to the platform callback URL with a transaction ID and status.
- Platform verifies the payment with EPS to confirm it succeeded.
- On success: Charge status is set to
active, revenue is recorded, and acharge.activatedwebhook is fired. - On failure: A
charge.payment_failedwebhook is fired. The charge remainspendingso the merchant can retry.
Redirect after payment
After processing the callback, the platform redirects the merchant:
- If your charge has a
return_url: Redirects to{return_url}?payment=success&charge_id={id}(orpayment=cancelled/payment=failed) - Otherwise: Redirects to the dashboard billing page
Your app should handle these query parameters to show the appropriate confirmation UI.
Billing Webhook Events
| Event | When Fired |
|---|---|
charge.created | App creates a new charge |
charge.activated | Payment succeeds |
charge.declined | Merchant declines the charge |
charge.cancelled | Charge is cancelled (by merchant, app, or uninstall) |
charge.expired | 48 hours pass without merchant action |
charge.payment_failed | EPS payment fails or merchant cancels at gateway |
subscription.renewal_pending | A recurring charge auto-generates a renewal charge |
Amount Limits
All charges must fall within the following bounds:
| Limit | Value |
|---|---|
| Minimum | 10.00 BDT |
| Maximum | 50,000.00 BDT |
Attempting to create a charge outside these limits will return a 400 error.
Response Fields
Every charge response includes the full fee breakdown:
| Field | Description |
|---|---|
amount | The total amount the merchant pays (= base_amount if developer pays) |
base_amount | The price you set when creating the charge |
commission_rate | Platform commission rate applied (always 0.1000) |
platform_amount | SeloraX commission amount |
gateway_fee_rate | Payment gateway fee rate (always 0.0250) |
gateway_fee_amount | Payment gateway fee amount |
fee_payer | Who pays the fees: developer or merchant |
developer_amount | Net amount credited to the developer |
Revenue Tracking
The platform maintains two tables for financial reconciliation:
app_revenue_ledger— Records every charge with the full commission split (gross amount, platform amount, developer amount).app_developer_balances— Tracks the running balance owed to each developer, updated after every successful charge.
Payment Gateway
All payments are processed through EPS (Electronic Payment Solutions), a Bangladesh-based payment gateway. The platform handles the entire EPS integration — your app never needs to interact with EPS directly. You simply create charges and listen for webhooks.