The smarter way
  • Getting Started
  • USER GUIDE
    • Payment Gateway
    • Currencies
    • Apple Pay
      • Setup MPGS
      • Setup Cybersource
    • Payment Tracking
      • Payment Transactions Insights
      • Payment Transactions States
      • Notifications, URLs & Timing
    • Plugins
      • Payment Request
      • E-Commerce
      • Bulk payment request
    • Features
      • Refund & Void Access Control
      • Two-Step Refund & Void Authorization
    • Integration
    • Configuration
      • Global Configuration
      • Webhooks Configuration
      • Transaction Report Configuration
      • How to Get API Keys
      • URL Shortener Configuration
    • Notification Communication Channels
      • Email Notifications
      • SMS Notifications
      • WhatsApp Notifications
        • Integrated WhatsApp Channel
        • Manual WhatsApp Channel
      • Notification Templates
      • Notification Process: Automatic and Manual
    • Satellite
    • Real Estate
      • Regular Activities
        • Property management
        • Tenant and Contract Management
          • Tenant & Contract Dashboard
          • Tenant Management
          • Contract Management
            • Add New Contract
            • Contract Action
              • Renew Contract
              • Terminate Contract
              • Manual Payment
              • Suspend Contract
              • Resume Contract
              • Advance Payment
        • Generate Invoice
        • Invoices Management
        • Maintenance
        • Transactions
        • Auditing and Rolling Back Activities
      • Merchant First Journey
  • developer
    • Getting Started
    • Tokenization
    • Authentication
    • Payment Methods
    • Checkout API
    • Operations
    • User Cards
    • Payment Status-Inquiry
    • Auto-Debit
    • Invoice API
    • Message Notifications
    • Upload Attachment
    • Checkout SDK
      • Web
      • iOS
      • Android
      • Flutter
    • Webhooks
      • Payment Notification
      • Operation Notification
      • Signing Mechanism
      • Integration Guides
        • Laravel Webhook Receiver Guide
        • .NET Webhook Receiver Guide
    • Test Cards
Powered by GitBook
On this page
  1. developer

User Cards

PreviousOperationsNextPayment Status-Inquiry

Last updated 1 year ago

Before diving into this section, it’s recommended to first review the section for an understanding of how Ottu securely manages user card data. Optionally, you may also want to familiarize yourself with the for a smoother integration process. With Ottu, managing your customers’ saved cards is straightforward and secure, thanks to our user-friendly API endpoints. These APIs allow you to all saved cards for a customer or a specific card. By incorporating this functionality into your system, you’re ensuring a seamless, personalized, and efficient payment experience for your customers.

User Cards API is not available in KSA.

When integrating the User Saved Cards endpoints into your system, here are the key points you need to be aware of:

  1. You will not receive the full card number (PAN) of the user. Instead, you’ll be provided with the last 4 digits of the card number and a token. This token is what you’ll use for executing payments or authorizations

  2. If you’re using the Ottu , customers can delete their saved cards at any point in time. This flexibility gives users more control over their payment information and helps foster trust in your services.

  3. When a customer chooses to save their card for payment, the corresponding token will be included in the payload sent to your designated . This allows you to retrieve and handle the saved card token as required for your application.

Successful Payment is a Prerequisite: A saved card, represented by a unique token, can only be created after the customer completes a successful payment transaction. This process ensures the validity of the card and enables tokenization. For a detailed guide on how to implement the card-saving feature, please refer to the .

  1. Ottu already facilitates the display of saved cards and allows customers to delete their own cards. However, if you wish for a more granular level of control, you can perform these actions yourself using the provided tokens.

Enhance your integration with User Card APIs by utilizing our Python SDK tailored for user card management operations. This SDK facilitates efficient interaction with APIs that manage customer card details.

Available Package:

  • Python SDK: Provides an object-oriented approach to list all cards associated with a customer and delete a customer's card using a token. This SDK encapsulates the complexities of API calls, focusing on efficiency and simplicity.

  • Django SDK: Facilitates the integration of payment methods into Django projects by providing Django-specific tools and utilities that streamline payment processing.

For successful implementation, comprehending the fundamental concepts and structures documented is essential. This understanding guarantees robust and maintainable integration of the SDK into your projects.

For a more detailed technical understanding and the implementation specifics of these operations, please refer to the OpenAPI schema in the API Schema Reference section below

Fetch Cards

Delete Card

At present, it is not possible to save a card without the customer making a successful payment. However, we continually work to expand and improve our services, so stay tuned for updates.

Now that you’re familiar with how to use and manage User Cards within the Ottu system, you might want to expand your knowledge and capabilities by exploring additional features.

Remember, our support team is here to help if you have any questions or need further assistance. Keep exploring, and let’s make your payment process as efficient and user-friendly as possible!

To access Ottu’s User Saved Cards API, ensure to use the authentication method.

You have two methods for removing a card. The first one involves utilizing the User Cards API to the customer's cards and establishing a user interface on your end to display the list of saved cards. Upon a customer's selection of a card for deletion, you can invoke the for that particular card. Alternatively, you have the option of employing the Ottu , which adeptly manages these procedures on your behalf.

Yes, but only if the customer has agreed, and their card has been enabled for auto-debit. For more details, refer to our documentation.

No, Ottu doesn’t store the cards internally. We utilize an external vault for storing card details. In most cases, the cards are saved at the with which the merchant has a contract. This approach further ensures the safety and security of the card details.

Checkout SDK: To make your integration even easier and more seamless, consider utilizing the Ottu Checkout SDK. This tool simplifies many aspects of the payment process, including UI implementation and handling specific payment methods like Apple Pay, Google Pay, STC Pay, among others. You can find more details in our Documentation.

Auto-Debit: Interested in recurring payments or charging your customers when they are offline? Our Auto-Debit feature enables you to do just that. You can learn more about setting up and using Auto-Debit in our Documentation.

Auto-Debit
Payment Gateway
Checkout SDK
Auto-Debit
API Schema Reference
FAQ
1️
Can I offer to the customer the possibility to save a card without making a successful payment?
2️
How can I delete a card?
Checkout SDK
retrieve
Delete API
3️
Can I trigger auto-debit payments?
4️
Does Ottu save the cards within the Ottu system?
What’s Next?
Tokenization
Checkout SDK
Checkout SDK
Learn more
Find out more
fetch
delete
Setup
Boost Your Integration
Authentication
API-Key
Implementation Process documentation

Retrieve a list of saved cards for the customer.

post

This endpoint retrieves a list of cards saved by the customer. The response includes details such as the card's masked number, card type, and expiration date. By using this endpoint, you can provide the customer with an overview of their saved cards for future payments.

Authorizations
Body
typestring · enumRequired

Choose between sandbox and production. Select sandbox to retrieve cards created for test Payment Gateway MIDs, or production to fetch real cards used in live transactions.

  • sandbox - Sandbox
  • production - Production
Possible values:
customer_idstringRequired

Retrieve cards associated with a specific customer using their unique customer_id.

agreement_idstringOptional

Retrieve the card associated with a specific agreement ID. When this parameter is provided, the resulting array will contain a maximum of one entry, representing the latest card the customer has used for the auto-debit payment associated with the given agreement ID.

Responses
200Success
application/json
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
405Error
application/json
415Error
application/json
post
POST /b/pbl/v2/card/ HTTP/1.1
Host: 
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 75

{
  "type": "sandbox",
  "customer_id": "text",
  "pg_codes": [],
  "agreement_id": "text"
}
{
  "brand": "text",
  "customer_id": "text",
  "cvv_required": true,
  "expiry_month": "text",
  "expiry_year": "text",
  "is_expired": true,
  "is_preferred": true,
  "name_on_card": "text",
  "number": "text",
  "pg_code": "text",
  "token": "text",
  "agreements": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

Delete a saved card for the customer.

delete

This endpoint allows you to delete a customer's saved card from the system. Provide the unique card identifier to remove the card from the customer's saved cards list. This action can help maintain up-to-date card information and ensure that customers do not accidentally use expired or unwanted cards for payments.

Authorizations
Path parameters
tokenstringRequired

The unique token associated with the card to be deleted.

Query parameters
customer_idstring · min: 1Required

Retrieve cards associated with a specific customer using their unique customer_id.

typestring · enum · min: 1Required

Choose between sandbox and production. Select sandbox to retrieve cards created for test Payment Gateway MIDs, or production to fetch real cards used in live transactions.

  • sandbox - Sandbox * production - Production
Possible values:
Responses
204
No Content
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
415Error
application/json
delete
DELETE /b/pbl/v2/card/{{token}}?customer_id=text&type=sandbox HTTP/1.1
Host: <ottu-url>
Authorization: Basic username:password
Accept: */*

No content

  • Setup
  • Boost Your Integration
  • Authentication
  • API Schema Reference
  • POSTRetrieve a list of saved cards for the customer.
  • DELETEDelete a saved card for the customer.
  • FAQ
  • What’s Next?
webhook_url