Tokenise the card
Card tokenisation happens through Nomba’s payment SDK on your frontend — the customer’s raw card number never touches your server. Nomba returns a token (starts with
tok_). Pass that token to Plinth.See Nomba’s card tokenisation docs for the frontend integration. The result is a token like tok_live_4x8bZ....In test mode, use the pre-built test tokens:| Token | Behaviour |
|---|---|
tok_test_visa | Always succeeds |
tok_test_decline | Always declines |
tok_test_decline_hard | Hard decline (stolen card) |
tok_test_decline_soft | Soft decline (insufficient funds) |
Create the subscription
Response
trialing instead of active, and next_bill_at will be the trial end date.Subscription renews automatically
When
next_bill_at arrives, the billing engine:- Creates an invoice for the new period
- Applies any customer balance credit first
- Charges the card for the remainder
- Marks the invoice
paid - Updates
next_bill_atto the next period - Fires
subscription.renewedandinvoice.paidwebhooks
Handle failed renewals
When a card declines on renewal, the subscription moves to See the dunning guide for the full retry schedule and what to do at each step.
past_due and the retry schedule starts. Listen for these:Node.js