payment_success webhook. Save it so you can charge the card later.
payment_success webhook
Nomba sends the webhook to your webhook URL. The card token is in data.tokenizedCardData. For the full payload, see Webhooks.
Webhook body
string
required
payment_successobject
The saved card
object
required
The order the customer paid
If the webhook has no
tokenizedCardData, or tokenKey is "N/A", the card token wasnβt ready when Nomba sent the webhook. This can happen when the bank approves the payment without an OTP, because Nomba saves the card in the background. Wait a few seconds, then list the customerβs saved cards by email.Store the token
Save these details with the customerβs record in your database:
A token works only with the email address it was saved with. If you charge it with a different
customerEmail, Nomba rejects the charge with βEmail address doesnβt match token keyβ. If the customer changes their email in your app, change the email on the saved card too.
Avoid duplicate cards
If the customer saves the same card again with the same email, Nomba returns the sametokenKey as before. Check whether you already have that tokenKey for the customer before you add a new record. If the customer saves the same card with a different email, Nomba creates a new token.
Show the saved card to the customer
When a customer pays again, show them which card youβll charge, for example Visa ending 1119. Let them choose a different saved card, or add a new one with a new card-saving payment.Keep the token safe
StoretokenKey on your server only. Donβt send it to the browser or your mobile app, and donβt log it in plain text.
Next: Charge a saved card
Use the token to charge the customer when a payment is due.