SeloraXDEVELOPERS

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

  1. Your app creates a charge (one-time, recurring, usage, or wallet top-up).
  2. The merchant approves the charge in their SeloraX dashboard.
  3. The merchant pays via the EPS payment gateway (a Bangladesh-based payment processor).
  4. The platform splits the revenue — commission to the platform, remainder to the developer.
  5. Your app receives a webhook confirming the charge is active.

Fees & Commission

Every charge has two fixed platform fees:

FeeRateDescription
SeloraX commission10%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_payerWhat happensMerchant seesDeveloper receives
developer (default)Fees deducted from your payoutThe price you setPrice minus 12.5%
merchantFees added on top of your pricePrice + fee breakdownThe 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)
StatusDescription
pendingCharge created, waiting for merchant action
activeMerchant approved and payment succeeded
declinedMerchant explicitly declined the charge
cancelledCancelled by merchant, app, or system (e.g. on uninstall)
expiredNo 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:

  1. EPS redirects to the platform callback URL with a transaction ID and status.
  2. Platform verifies the payment with EPS to confirm it succeeded.
  3. On success: Charge status is set to active, revenue is recorded, and a charge.activated webhook is fired.
  4. On failure: A charge.payment_failed webhook is fired. The charge remains pending so 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} (or payment=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

EventWhen Fired
charge.createdApp creates a new charge
charge.activatedPayment succeeds
charge.declinedMerchant declines the charge
charge.cancelledCharge is cancelled (by merchant, app, or uninstall)
charge.expired48 hours pass without merchant action
charge.payment_failedEPS payment fails or merchant cancels at gateway
subscription.renewal_pendingA recurring charge auto-generates a renewal charge

Amount Limits

All charges must fall within the following bounds:

LimitValue
Minimum10.00 BDT
Maximum50,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:

FieldDescription
amountThe total amount the merchant pays (= base_amount if developer pays)
base_amountThe price you set when creating the charge
commission_ratePlatform commission rate applied (always 0.1000)
platform_amountSeloraX commission amount
gateway_fee_ratePayment gateway fee rate (always 0.0250)
gateway_fee_amountPayment gateway fee amount
fee_payerWho pays the fees: developer or merchant
developer_amountNet 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.