Single-use and stored instruments
Single-use instruments are created automatically on every card payment. If the customer doesn’t save their card, the instrument processes that payment and its operations, then expires. You can still capture, void, or refund without touching card data, as the instrument carries the credential for the payment. Stored instruments are instruments the customer has agreed to keep. The customer can select a stored instrument at future checkouts, and, under an agreement, you can charge it when they’re not present. Whether or not the customer saved their card, capture, void, and refund work identically, because every payment has an instrument behind it.Fields
How card data reaches lite
Lite accepts card data as an encrypted instrument payload, never a raw card number. Card details are collected through lite’s secure collection flow, so a full card number never touches your servers.Use one customer identifier everywhere
Stored instruments are retrieved by the customer identifier you send. Send the same value when the instrument is created and at every lookup. This is the value you pass asholder_id on the instrument and as customer.id on payments.
Use a stable, permanent identifier from your own system, such as your internal user ID. If the identifier at checkout differs from the one at save time, the saved card doesn’t appear and no error is returned: an empty result is indistinguishable from a new customer. The customer re-enters their card, and you accumulate duplicate instruments for the same card.
Understand what a transaction is allowed to do
Every transaction on an instrument falls into one of three categories. The category determines whether the customer authenticates and who carries fraud liability.
A customer-initiated payment is any payment the customer actively makes, including repeat purchases with a stored instrument. mada requires 3D Secure on every customer-initiated transaction. Visa and Mastercard follow the schemes’ authentication rules.
An operation on an existing authorization captures, or voids a charge the customer already authenticated. The operation references the original transaction, and the authentication travels with it.
A charge under an agreement is the only case where you originate a new charge with no cardholder present. It requires an agreement and shifts fraud liability to you. The consent record and the authenticated first transaction are your protection.
Create a stored instrument
There are three ways to create a stored instrument.Save a card at checkout
The customer chooses to save their card during a purchase. They authenticate the payment, and on success lite stores the instrument and links it to this first authenticated transaction. Saving creates no agreement and grants no permission to originate charges. Every future purchase is a fresh, customer-initiated payment with its own authentication. The gain is convenience: the customer picks their card by brand and last four digits instead of retyping it.Tokenize a card without a payment
Using the Web SDK, you can store a customer’s card without charging it:id, which you use to charge the card later.
An instrument created this way has no authenticated transaction behind it. The customer can pay with it at checkout, authenticating like any customer-initiated payment. To charge it under an agreement, the first charge under that agreement must be authenticated.
Store a card with an agreement
An agreement is the customer’s documented permission to charge their instrument when they’re not present. lite supports two types:- Recurring. Charges on a fixed schedule for a defined amount. Subscriptions, memberships, utility-style billing.
- Unscheduled. Charges triggered by usage or events, with variable timing. Automatic wallet top-up, parking, usage-based billing.
Present the terms and capture consent
Before the customer accepts an agreement, you present the full terms. mada requires nine disclosure steps:- Agreement identifier The unique identifier of the agreement.
- Service A description of the service.
- Amount The amount, or how the amount is determined.
- Payment type Fixed or variable.
- Duration The duration of the agreement.
- Timing When charges occur.
- Terms The full terms and conditions, with cancellation rights.
- Confirmation The customer’s explicit confirmation.
- First charge notice Notice that the first transaction is charged now, with authentication.