{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","tabs","tab"]},"type":"markdown"},"seo":{"title":"Reefpay Docs","description":"Reefpay is the groundbreaking payment gateway that lets you integrate with the future of payments.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"update-a-stored-payment-method","__idx":0},"children":["Update a stored payment method"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":1},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A valid API key — see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/how-tos/setup/obtain-credentials"},"children":["Obtain API credentials"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An existing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_token"]}," value"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"what-you-can-update","__idx":2},"children":["What you can update"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Card tokens"},"children":["Card tokens"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Bank account tokens"},"children":["Bank account tokens"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nickname"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["is_default"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.expiry_month"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.expiry_year"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["N/A"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Immutable fields"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You cannot change the card number (PAN), bank account number, or routing number. To change these, ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/how-tos/tokenization-vaulting/delete-payment-method"},"children":["delete the token"]}," and create a new one."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-send-the-update-request","__idx":3},"children":["Step 1: Send the update request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Send ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/payment_tokens/{token}"]}," with the fields to update."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"update-card-expiry-and-nickname","__idx":4},"children":["Update card expiry and nickname"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"curl","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"curl -X POST \\\n  https://api.dev.paradisegateway.net/v1/payment_tokens/PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB \\\n  -H \"Content-Type: application/json\" \\\n  -H \"APIKEY: YOUR-API-KEY\" \\\n  -d '{\n    \"nickname\": \"Updated Business Visa\",\n    \"is_default\": true,\n    \"card\": {\n      \"expiry_month\": \"06\",\n      \"expiry_year\": \"2029\"\n    }\n  }'\n","lang":"shell"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\ntoken = \"PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB\"\nresp = requests.post(\n    f\"https://api.dev.paradisegateway.net/v1/payment_tokens/{token}\",\n    headers={\"Content-Type\": \"application/json\", \"APIKEY\": \"YOUR-API-KEY\"},\n    json={\n        \"nickname\": \"Updated Business Visa\",\n        \"is_default\": True,\n        \"card\": {\"expiry_month\": \"06\", \"expiry_year\": \"2029\"},\n    },\n)\nprint(resp.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"JavaScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const token = \"PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB\";\nconst resp = await fetch(\n  `https://api.dev.paradisegateway.net/v1/payment_tokens/${token}`,\n  {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"APIKEY\": \"YOUR-API-KEY\",\n    },\n    body: JSON.stringify({\n      nickname: \"Updated Business Visa\",\n      is_default: true,\n      card: { expiry_month: \"06\", expiry_year: \"2029\" },\n    }),\n  }\n);\nconsole.log(await resp.json());\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"var token = \"PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB\";\nvar payload = new\n{\n    nickname = \"Updated Business Visa\",\n    is_default = true,\n    card = new { expiry_month = \"06\", expiry_year = \"2029\" }\n};\nvar resp = await client.PostAsJsonAsync(\n    $\"https://api.dev.paradisegateway.net/v1/payment_tokens/{token}\", payload);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());\n","lang":"csharp"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"String token = \"PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB\";\nString body = \"\"\"\n    {\n      \"nickname\": \"Updated Business Visa\",\n      \"is_default\": true,\n      \"card\": { \"expiry_month\": \"06\", \"expiry_year\": \"2029\" }\n    }\n    \"\"\";\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\n        \"https://api.dev.paradisegateway.net/v1/payment_tokens/\" + token))\n    .header(\"Content-Type\", \"application/json\")\n    .header(\"APIKEY\", \"YOUR-API-KEY\")\n    .POST(HttpRequest.BodyPublishers.ofString(body)).build();\nHttpResponse<String> resp = client.send(request,\n    HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Go","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"token := \"PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB\"\npayload := strings.NewReader(`{\n  \"nickname\": \"Updated Business Visa\",\n  \"is_default\": true,\n  \"card\": { \"expiry_month\": \"06\", \"expiry_year\": \"2029\" }\n}`)\nreq, _ := http.NewRequest(\"POST\",\n    \"https://api.dev.paradisegateway.net/v1/payment_tokens/\"+token, payload)\nreq.Header.Set(\"Content-Type\", \"application/json\")\nreq.Header.Set(\"APIKEY\", \"YOUR-API-KEY\")\nresp, _ := http.DefaultClient.Do(req)\ndefer resp.Body.Close()\nbody, _ := io.ReadAll(resp.Body)\nfmt.Println(string(body))\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"PHP","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"$token = \"PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB\";\n$ch = curl_init(\"https://api.dev.paradisegateway.net/v1/payment_tokens/$token\");\ncurl_setopt_array($ch, [\n    CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true,\n    CURLOPT_HTTPHEADER => [\"Content-Type: application/json\", \"APIKEY: YOUR-API-KEY\"],\n    CURLOPT_POSTFIELDS => json_encode([\n        \"nickname\" => \"Updated Business Visa\",\n        \"is_default\" => true,\n        \"card\" => [\"expiry_month\" => \"06\", \"expiry_year\" => \"2029\"],\n    ]),\n]);\necho curl_exec($ch); curl_close($ch);\n","lang":"php"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Ruby","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","header":{"controls":{"copy":{}}},"source":"require \"net/http\"; require \"json\"\ntoken = \"PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB\"\nuri = URI(\"https://api.dev.paradisegateway.net/v1/payment_tokens/#{token}\")\nreq = Net::HTTP::Post.new(uri, {\n  \"Content-Type\" => \"application/json\", \"APIKEY\" => \"YOUR-API-KEY\",\n})\nreq.body = {\n  nickname: \"Updated Business Visa\", is_default: true,\n  card: { expiry_month: \"06\", expiry_year: \"2029\" },\n}.to_json\nresp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }\nputs resp.body\n","lang":"ruby"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2-verify-the-response","__idx":5},"children":["Step 2: Verify the response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}," response returns the updated token details."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"payment_token\": \"PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB\",\n  \"object\": \"payment_token\",\n  \"type\": \"card\",\n  \"status\": \"active\",\n  \"customer_id\": \"CUSTOMER-01KFDKXMQ637EKEAY410MSQSXB\",\n  \"is_default\": true,\n  \"nickname\": \"Updated Business Visa\",\n  \"card\": {\n    \"brand\": \"visa\",\n    \"last_four\": \"1111\",\n    \"bin\": \"411111\",\n    \"funding\": \"credit\"\n  },\n  \"correlation_id\": \"c3d4e5f6-a7b8-9012-cdef-123456789abc\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"updating-expiry-to-reactivate-an-expired-token","__idx":6},"children":["Updating expiry to reactivate an expired token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If a card token has ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status: expired"]}," because the expiry date passed, updating ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.expiry_month"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.expiry_year"]}," to a future date moves the token back to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["active"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"common-update-scenarios","__idx":7},"children":["Common update scenarios"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Scenario"},"children":["Scenario"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Fields to update"},"children":["Fields to update"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Card renewed with new expiry"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.expiry_month"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.expiry_year"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Rename for clarity"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nickname"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Set as default for checkout"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["is_default: true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Demote from default"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["is_default: false"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":8},"children":["Next steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/how-tos/tokenization-vaulting/delete-payment-method"},"children":["Delete a stored payment method"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/tokenization/stored-payment-methods"},"children":["About stored payment methods"]}]}]}]},"headings":[{"value":"Update a stored payment method","id":"update-a-stored-payment-method","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"What you can update","id":"what-you-can-update","depth":2},{"value":"Step 1: Send the update request","id":"step-1-send-the-update-request","depth":2},{"value":"Update card expiry and nickname","id":"update-card-expiry-and-nickname","depth":3},{"value":"Step 2: Verify the response","id":"step-2-verify-the-response","depth":2},{"value":"Updating expiry to reactivate an expired token","id":"updating-expiry-to-reactivate-an-expired-token","depth":3},{"value":"Common update scenarios","id":"common-update-scenarios","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Update a stored payment method","shortTitle":"Update payment method","intro":"Change the nickname, default status, or card expiry date for a stored payment token. Bank account details cannot be updated — delete and re-create instead.","type":"how-to","seo":{"title":""}},"lastModified":"2026-06-05T02:46:44.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/how-tos/tokenization-vaulting/update-payment-method","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}