User Cards
With Ottu, managing your customers' saved cards is straightforward and secure. The User Cards API lets you fetch all saved cards for a customer or delete a specific card. By incorporating this functionality, you ensure a seamless, personalized, and efficient payment experience.
info
User Cards API is not available in KSA.
Boost Your Integration
Ottu offers SDKs and tools to speed up your integration. See Getting Started for all available options.
When to Use
- Display saved cards — show customers their previously tokenized cards at checkout for one-click payments.
- Delete saved cards — let customers or your backend remove cards they no longer want stored.
- Build custom card management UI — if the Checkout SDK doesn't fit your UX needs, use these APIs directly.
- Pre-filter cards for auto-debit — retrieve tokenized cards before initiating recurring payments.
Setup
When integrating the User Cards API, here are the key points:
- You will not receive the full card number (PAN). Instead, you'll get the last 4 digits and a token. This token is what you use for payments or authorizations.
- If you're using the Checkout SDK, customers can delete their saved cards at any point. This gives users control over their payment information.
- When a customer saves their card during payment, the corresponding token is included in the payload sent to your webhook_url.
- Ottu already handles displaying saved cards and card deletion. Use these APIs only if you need more granular control.
Successful Payment is a Prerequisite
A saved card (token) can only be created after the customer completes a successful payment transaction. This ensures card validity and enables tokenization. See the Tokenization documentation for implementation details.
Guide
Workflow
- Customer pays and saves card — during a Checkout API payment with tokenization enabled, Ottu creates a token.
- Token delivered via webhook — the token is included in the webhook payload sent to your
webhook_url. - List saved cards — call the User Cards API with
customer_idto retrieve all saved cards (masked PAN + token). - Delete a card — call the delete endpoint with the card token to remove it.
Step-by-Step
- Fetch saved cards — call
GET /b/pbl/v2/card/?customer_id={id}to retrieve all tokenized cards for a customer. - Display cards — show the masked card number, brand, and expiry in your UI.
- Delete a card — call
DELETE /b/pbl/v2/card/{token}/to remove a specific card. - Use a card for payment — pass the token to the Checkout API or Auto-Debit API for subsequent charges.
API Reference
Retrieve a list of saved cards for the customer.
Delete a saved card for the customer.
FAQ
What's Next?
- Recurring Payments — Use saved tokens for auto-debit and recurring billing
- Tokenization — How cards get saved during payment
- Checkout SDK — Drop-in UI that handles card management automatically