Skip to main content
The PayBridgeNP Billing system handles recurring payments - create a plan, add customers, and start subscriptions. PayBridgeNP generates invoices automatically at each renewal, sends payment links to customers, and manages retries when payments fail.
In live mode, Billing requires a Growth plan or higher on your PayBridgeNP account. In sandbox (test) mode Billing is open on every plan, so you can build and test the full lifecycle before upgrading - with test-mode guardrails: invoice emails are delivered only to your own account email (50 per month, everything else is recorded but not sent), and test subscriptions auto-expire after 12 invoices or 30 days without a payment. Sandbox object limits: 25 customers, 10 active plans, 25 subscriptions, 25 coupons, 25 promotion codes, 10 dunning policies. Coupons and dunning policies are separate per mode - a test coupon or policy never applies in live mode, and the same code can exist in both.

Core concepts

Plans define the recurring charge - amount, interval (monthly, yearly, etc.), trial period, and dunning behavior. Plans are templates; subscriptions are instances. Customers are the people being billed. They exist independently of subscriptions - you can have a customer with no active subscriptions. Subscriptions link a customer to a plan. When you create a subscription, PayBridgeNP immediately generates the first invoice (unless there’s a trial period). Invoices are generated automatically at each billing cycle. Each invoice has a payment link that PayBridgeNP sends to the customer. Invoices go from openpaid once the customer pays, or overdue if they don’t pay in time.
Instead of the hosted payment link, you can collect an invoice with a Fonepay Direct-QR (POST /v1/billing/invoices/{id}/qr) - the customer scans a QR in your own app or at a counter, and on payment the invoice is marked paid and the subscription activates automatically. See Direct-QR for Fonepay.

Step 1: Create a plan

Interval options

Dunning settings

Dunning controls what happens when a customer doesn’t pay on time:

Step 2: Create a customer

The externalCustomerId field lets you link PayBridgeNP customers to your own user records.

Step 3: Create a subscription

When a subscription is created:
  • If the plan has trialDays > 0 - the subscription starts in trial mode (active / trialing), no invoice is generated until the trial ends
  • Otherwise - the subscription starts as incomplete, an invoice is generated immediately, and PayBridgeNP sends a payment link to the customer’s email. The subscription becomes active only once that first invoice is paid.
active always means paid. A subscription is incomplete until its first invoice is paid (prepaid activation). Gate access on the subscription being active, or on the first invoice.paid / subscription.activated event - not on subscription.created. The subscription.activated event fires only after the first payment is collected. You can also read latest_invoice.status on the subscription object to see whether it is paid. If the first invoice is never paid within 24 hours, the subscription moves to incomplete_expired and the invoice is voided.

Subscription lifecycle


Managing subscriptions

Pause

No invoices are generated while paused. Resume resumes billing from the current period.

Resume

Cancel

Change plan

The current period continues on the old plan. At renewal, the subscription switches to the new plan.

Invoices

Invoices are read-only from the API - PayBridgeNP creates them automatically. Use them to display billing history to customers.

Webhook events

PayBridgeNP fires webhook events throughout the subscription lifecycle: