---
updatedAt: 2026-09-16T08:41:50.000Z
agentTools:
  projectIndex: https://developers.upayments.com/llms.txt
---

# Add Card

User card details are stored securely and easily accessible for future transactions.

To save a user's card details, you should include a unique numeric value in the "**[customerUniqueToken](https://developers.upayments.com/reference/createcustomeruniquetoken)**" variable when sending a request. If the user has not opted to save their card, this field should be left empty. The value you choose should be unique, such as the user's mobile number.

Users will be able to see their saved cards within the system and select them for future transactions. If there are no saved cards for the requested customer with the current merchant, the system will save the details for future transactions. By following this process, you can ensure that user card details are stored securely and easily accessible for future transactions.

## Request Model

The request is a POST request with the following parameters:

| Input Parameter                                                                   | Type               | Length      | Description                                                                                                                                                                      |
| :-------------------------------------------------------------------------------- | :----------------- | :---------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [customerUniqueToken](https://uint.readme.io/reference/createcustomeruniquetoken) | integer, mandatory | 8 (minimum) | This card will attach to this customer token. You will get **customerUniqueToken** from [Create Token](https://developers.upayments.com/reference/createcustomeruniquetoken) API |
| returnUrl                                                                         | string, mandatory  | 255         | Pass the redirect URL here                                                                                                                                                       |

```json Add Card Request
{
		"customerUniqueToken":"8866268287",
    "returnUrl":"https://upayments.com/en/"
}
```

## Response Model

```json Add Card Response
{
    "status": true,
    "message": "Data received successfully",
    "data": {
        "link": "https://sandbox.upayments.com/my-cards?session_id=259728N7127B05l673679224g05202250803k5w5b50Yn8"
    }
}

```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "sandbox-api-base-url",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://sandboxapi.upayments.com/api/v1/"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/add-card": {
      "post": {
        "summary": "Add Card",
        "description": "User card details are stored securely and easily accessible for future transactions.",
        "operationId": "addcard",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "Bearer jtest123"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customerUniqueToken": {
                    "type": "string",
                    "description": "Insert your own Customer Unique Token",
                    "default": "9904917379121"
                  },
                  "returnUrl": {
                    "type": "string",
                    "description": "Pass the redirect URL here",
                    "default": "https://webhook.site/d7c6e1c8-b98b-4f77-8b51-b487540df336"
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "customerUniqueToken": "8866268287",
                    "returnUrl": "https://upayments.com/en/"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "status": true,
                      "message": "Data received successfully",
                      "data": {
                        "link": "https://sandbox.upayments.com/my-cards?session_id=0667021n1210651V22U2FHj75672416644M754i1254kC2"
                      }
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Data received successfully"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "link": {
                          "type": "string",
                          "example": "https://sandbox.upayments.com/my-cards?session_id=0667021n1210651V22U2FHj75672416644M754i1254kC2"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "accept",
        "value": "application/json"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```