Saved cards
Save a customer’s card at checkout, with their consent, and charge it later without them present.
How a card is saved
A card is saved only when the customer agrees. Create the checkout session with saveCard: true, and the checkout page shows a "Save this card" box. If the customer ticks it and pays by card, the card is saved for your business only, and you get payment_method.saved with the new payment method (pm_...).
The card number and the token used to charge it are never returned by the API or sent in webhooks. You see the brand, the last four digits, the expiry and when the customer agreed.
Finding a customer’s cards
List saved cards with GET /v1/payment-methods, filtered by customerEmail or customerId. Removed cards are not listed. GET /v1/customers/:id also returns savedPaymentMethods.
Charging a saved card
POST /v1/payment-methods/:id/charges with an amount (at least ₦100), and optionally a description and your orderReference. Send an Idempotency-Key so a retry never charges twice.
The answer has a status: succeeded, failed or pending, with a failureReason when it failed, and the charge itself. A declined card is simply a failed charge; the customer is not there to try again. A pending charge is checked again by rafiqPay, and you get charge.succeeded when it settles. Each charge is a charge like any other, with the usual fee.
Removing a card
DELETE /v1/payment-methods/:id removes the card for good. It can never be charged again, and you get payment_method.removed. A subscription that was charging the card goes back to emailing invoices.