Skip to main content
POST
/
add-new-card
Add New Card
curl --request POST \
  --url https://app.closerx.ai/api/add-new-card/ \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '
{
  "user_id": "user_12345",
  "card_number": "4242424242424242",
  "exp_month": 12,
  "exp_year": 2027,
  "cvc": "123",
  "is_default": true
}
'
{
  "status": "success",
  "card_id": "card_abc123",
  "is_default": true
}

Authorizations

api_key
string
header
required

Body

application/json
user_id
string
required

The ID of the user adding the card.

Example:

"user_12345"

card_number
string
required

The card number.

Example:

"4242424242424242"

exp_month
integer
required

Card expiry month (1-12).

Example:

12

exp_year
integer
required

Card expiry year (4-digit).

Example:

2027

cvc
string
required

Card CVC/CVV security code.

Example:

"123"

is_default
boolean

Whether this card should be set as the default payment method.

Example:

true

Response

Card added successfully

status
string

Status of the card addition request.

Example:

"success"

card_id
string

The unique ID of the newly added card.

Example:

"card_abc123"

is_default
boolean

Whether this card is set as the default.

Example:

true