With Retrieving Saved Cards

Make Charge While Retrieving Saved Cards

The Charge request with Retrieving Saved Cards API allows merchants to seamlessly retrieve a customer’s previously saved (tokenized) payment cards while simultaneously initiating a new payment session. By supplying a valid customerUniqueToken, you can fetch all stored cards associated with that customer and present them during checkout—enabling a faster, frictionless, and secure payment experience for the customer.

This endpoint is designed to streamline returning-customer flows by reducing the number of API calls required. Instead of fetching saved cards and starting a charge separately, both actions are handled in a single request. The response includes a payment link that automatically retrieves the customer’s saved cards during checkout.

Request Model

{
    "products": [
        {
            "name": "Logitech K380",
            "description": "Logitech K380 / Easy-Switch for Upto 3 Devices, Slim Bluetooth Tablet Keyboard",
            "price": 10.00,
            "quantity": 1
        },
        {
            "name": "Logitech M171 Wireless Optical Mouse",
            "description": "Logitech M171 Wireless Optical Mouse  (2.4GHz Wireless, Blue Grey)",
            "price": 10.00,
            "quantity": 1
        }
    ],
    "order": {
        "id": "202210101255255144669",
        "reference": "11111991",
        "description": "Purchase order received for Logitech K380 Keyboard",
        "currency": "KWD",
        "amount": 20.00
    },
    "paymentGateway": {
        "src": "knet"
    },
    "tokens":{
        "customerUniqueToken":"{{customerUniqueToken}}"
    },
    "language": "en",
    "reference": {
        "id": "202210101202210101"
    },
    "customer": {
        "uniqueId": "2129879kjbljg767881",
        "name": "John Smith",
        "email": "[email protected]",
        "mobile": "+96512345678"
    },
    "returnUrl": "https://upayments.com/en/",
    "cancelUrl": "https://error.com",
    "notificationUrl": "https://webhook.site/2547b895-5899-4a21-a6f2-ed34c4228216",
    "customerExtraData": "User define data"
}

Response Model

{
    "status": true,
    "message": "Data received successfully",
    "data": {
        "link": "https://sandbox.upayments.com?session_id=202516274322067103583751562510398765914687174639"
    }
}