tokenKey). From then on, you charge the card by sending that token.
This section uses the API for the first payment: you collect the customerβs card details on your own page and send them to Nomba. To send the customer to the Nomba checkout page instead, see Recurring payments with hosted checkout.
Use recurring payments for:
- Subscriptions and memberships
- Instalment plans
- Automatic top-ups, such as wallet or airtime reloads
- One-click repeat purchases (βPay with saved cardβ)
How it works
1
Create a checkout order
Create the first order with
tokenizeCard: true. Create a checkout order β2
Submit card details
Send the card details the customer entered on your page. Submit card details β
3
Submit card OTP
Send the OTP from the customerβs bank to complete the first payment. Submit card OTP β
4
Store the card token
Read the
tokenKey from the payment_success webhook and save it with your customerβs record. Store the card token β5
Charge a saved card
When a payment is due, send the
tokenKey and the amount to Nomba. Charge a saved card β6
Complete an OTP challenge, if the bank asks for one
Some banks ask the customer to approve a charge with an OTP. Collect it and submit it. Complete an OTP challenge β
7
Confirm the charge
Verify the final status before you give the customer value. Confirm the charge β
What Nomba does and what you do
If you donβt want to run your own billing schedule, use a payment link with a recurring frequency instead. Nomba then saves the customerβs card on the first payment and charges it daily, weekly, monthly or on another schedule you choose. This guide is for merchants who want to control billing from their own server through the API.
Before you begin
- API keys and an access token. See Obtain API keys and Authenticate.
- A webhook URL. The card token arrives in a webhook. See Setting up webhooks.
- PCI DSS compliance. You handle the customerβs card details, so your systems must be PCI DSS compliant.
- Card payments enabled on your account. Saving a card doesnβt need to be switched on separately, but every charge on a saved card is a card payment. If card payments arenβt enabled for your business, the charge is rejected with βCard payment is not supported for this orderβ. Contact Nomba support to enable them.
Key terms
Next: Create a checkout order
Create the order that saves the customerβs card.