Skip to content
Last updated

Update a stored payment method

Prerequisites

What you can update

FieldCard tokensBank account tokens
nicknameYesYes
is_defaultYesYes
card.expiry_monthYesN/A
card.expiry_yearYesN/A
Immutable fields

You cannot change the card number (PAN), bank account number, or routing number. To change these, delete the token and create a new one.

Step 1: Send the update request

Send POST /v1/payment_tokens/{token} with the fields to update.

Update card expiry and nickname

curl -X POST \
  https://api.dev.paradisegateway.net/v1/payment_tokens/PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB \
  -H "Content-Type: application/json" \
  -H "APIKEY: YOUR-API-KEY" \
  -d '{
    "nickname": "Updated Business Visa",
    "is_default": true,
    "card": {
      "expiry_month": "06",
      "expiry_year": "2029"
    }
  }'

Step 2: Verify the response

A 200 response returns the updated token details.

{
  "payment_token": "PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB",
  "object": "payment_token",
  "type": "card",
  "status": "active",
  "customer_id": "CUSTOMER-01KFDKXMQ637EKEAY410MSQSXB",
  "is_default": true,
  "nickname": "Updated Business Visa",
  "card": {
    "brand": "visa",
    "last_four": "1111",
    "bin": "411111",
    "funding": "credit"
  },
  "correlation_id": "c3d4e5f6-a7b8-9012-cdef-123456789abc"
}

Updating expiry to reactivate an expired token

If a card token has status: expired because the expiry date passed, updating card.expiry_month and card.expiry_year to a future date moves the token back to active.

Common update scenarios

ScenarioFields to update
Card renewed with new expirycard.expiry_month, card.expiry_year
Rename for claritynickname
Set as default for checkoutis_default: true
Demote from defaultis_default: false

Next steps