{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab","admonition"]},"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":"process-a-payment-transaction-with-a-stored-token","__idx":0},"children":["Process a payment transaction with a stored token"]},{"$$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":["A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token"]}," value — obtained from a previous transaction response or from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/payment_tokens"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-build-the-request","__idx":2},"children":["Step 1: Build the request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method.type"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token"]}," and include the token."]},{"$$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":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$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":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sale"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auth"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payout"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Amount in cents"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method.type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method.payment_token"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Token from a prior transaction or the Payment Tokens API"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recurring"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Tes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," for merchant-initiated recurring charges"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2-send-the-request","__idx":3},"children":["Step 2: Send the request"]},{"$$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/transactions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"APIKEY: YOUR-API-KEY\" \\\n  -d '{\n    \"type\": \"sale\",\n    \"amount\": 15000,\n    \"tip\": 0,\n    \"payment_method\": {\n      \"type\": \"payment_token\",\n      \"payment_token\": \"PAYMENT_TOKEN-01JMRSPCK8WLXDPRMW3SNPVQEA\"\n    },\n    \"recurring\": true,\n    \"purchase_description\": \"Monthly subscription\"\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\nresp = requests.post(\n    \"https://api.dev.paradisegateway.net/v1/transactions\",\n    headers={\"Content-Type\": \"application/json\", \"APIKEY\": \"YOUR-API-KEY\"},\n    json={\n        \"type\": \"sale\",\n        \"amount\": 15000,\n        \"tip\": 0,\n        \"payment_method\": {\n            \"type\": \"token\",\n            \"payment_token\": \"PAYMENT_TOKEN-01JMRSPCK8WLXDPRMW3SNPVQEA\",\n        },\n        \"recurring\": True,\n        \"purchase_description\": \"Monthly subscription\",\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 resp = await fetch(\n  \"https://api.dev.paradisegateway.net/v1/transactions\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"APIKEY\": \"YOUR-API-KEY\",\n    },\n    body: JSON.stringify({\n      type: \"sale\",\n      amount: 15000,\n      tip: 0,\n      payment_method: {\n        type: \"token\",\n        payment_token: \"PAYMENT_TOKEN-01JMRSPCK8WLXDPRMW3SNPVQEA\",\n      },\n      recurring: true,\n      purchase_description: \"Monthly subscription\",\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":"using var client = new HttpClient();\nclient.DefaultRequestHeaders.Add(\"APIKEY\", \"YOUR-API-KEY\");\n\nvar payload = new\n{\n    type = \"sale\",\n    amount = 15000,\n    tip = 0,\n    payment_method = new\n    {\n        type = \"token\",\n        payment_token = \"PAYMENT_TOKEN-01JMRSPCK8WLXDPRMW3SNPVQEA\"\n    },\n    recurring = true,\n    purchase_description = \"Monthly subscription\"\n};\n\nvar resp = await client.PostAsJsonAsync(\n    \"https://api.dev.paradisegateway.net/v1/transactions\", 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":"HttpClient client = HttpClient.newHttpClient();\nString body = \"\"\"\n    {\n      \"type\": \"sale\",\n      \"amount\": 0,\n      \"tip\": 1000,\n      \"payment_method\": {\n        \"type\": \"token\",\n        \"payment_token\": \"PAYMENT_TOKEN-01JMRSPCK8WLXDPRMW3SNPVQEA\"\n      },\n      \"recurring\": true,\n      \"purchase_description\": \"Monthly subscription\"\n    }\n    \"\"\";\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.dev.paradisegateway.net/v1/transactions\"))\n    .header(\"Content-Type\", \"application/json\")\n    .header(\"APIKEY\", \"YOUR-API-KEY\")\n    .POST(HttpRequest.BodyPublishers.ofString(body))\n    .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":"payload := strings.NewReader(`{\n  \"type\": \"sale\",\n  \"amount\": 15000,\n  \"tip\": 0,\n  \"payment_method\": {\n    \"type\": \"token\",\n    \"payment_token\": \"PAYMENT_TOKEN-01JMRSPCK8WLXDPRMW3SNPVQEA\"\n  },\n  \"recurring\": true,\n  \"purchase_description\": \"Monthly subscription\"\n}`)\nreq, _ := http.NewRequest(\"POST\",\n    \"https://api.dev.paradisegateway.net/v1/transactions\", 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":"$ch = curl_init(\"https://api.dev.paradisegateway.net/v1/transactions\");\ncurl_setopt_array($ch, [\n    CURLOPT_RETURNTRANSFER => true,\n    CURLOPT_POST => true,\n    CURLOPT_HTTPHEADER => [\n        \"Content-Type: application/json\",\n        \"APIKEY: YOUR-API-KEY\",\n    ],\n    CURLOPT_POSTFIELDS => json_encode([\n        \"type\" => \"sale\",\n        \"amount\" => 15000,\n        \"tip\" => 0,\n        \"payment_method\" => [\n            \"type\" => \"token\",\n            \"payment_token\" => \"PAYMENT_TOKEN-01JMRSPCK8WLXDPRMW3SNPVQEA\",\n        ],\n        \"recurring\" => true,\n        \"purchase_description\" => \"Monthly subscription\",\n    ]),\n]);\necho curl_exec($ch);\ncurl_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\"\nrequire \"json\"\n\nuri = URI(\"https://api.dev.paradisegateway.net/v1/transactions\")\nreq = Net::HTTP::Post.new(uri, {\n  \"Content-Type\" => \"application/json\",\n  \"APIKEY\" => \"YOUR-API-KEY\",\n})\nreq.body = {\n  type: \"sale\", amount: 15000, tip: 0,\n  payment_method: {\n    type: \"token\",\n    payment_token: \"PAYMENT_TOKEN-01JMRSPCK8WLXDPRMW3SNPVQEA\",\n  },\n  recurring: true, purchase_description: \"Monthly subscription\",\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-3-handle-the-response","__idx":4},"children":["Step 3: Handle the response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response is identical in structure to a raw-card sale. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method"]}," section echoes the token and masked card details."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\",\n  \"object\": \"transaction\",\n  \"type\": \"sale\",\n  \"transaction_state\": \"authorized\",\n  \"response_status\": \"Approved\",\n  \"response_code\": \"00\",\n  \"amount\": 15000,\n  \"tip\": 0,\n  \"payment_method\": {\n    \"type\": \"token\",\n    \"payment_token\": \"PAYMENT_TOKEN-01JMRSPCK8WLXDPRMW3SNPVQEA\",\n  },\n  \"correlation_id\": \"b2c3d4e5-f6a7-8901-bcde-f12345678901\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"CVV not required for tokens"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When using a stored token, CVV is not sent (PCI-DSS prohibits storing CVV). AVS results may not be available on tokenized transactions unless address data was stored with the token."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"when-to-use-tokens","__idx":5},"children":["When to use tokens"]},{"$$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":"Set recurring"},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recurring"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Returning customer checks out again"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Subscription or scheduled billing"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["One-click reorder"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Installment payments"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Setting ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recurring: true"]}," flags the transaction as merchant-initiated, which meets card network rules and can improve authorization rates."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":6},"children":["Next steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/tokenization/what-is-tokenization"},"children":["About tokenization"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/tokenization/stored-payment-methods"},"children":["About stored payment methods"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/how-tos/process-payments/authorize-capture-separately"},"children":["Authorize and capture separately"]}]}]}]},"headings":[{"value":"Process a payment transaction with a stored token","id":"process-a-payment-transaction-with-a-stored-token","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Step 1: Build the request","id":"step-1-build-the-request","depth":2},{"value":"Step 2: Send the request","id":"step-2-send-the-request","depth":2},{"value":"Step 3: Handle the response","id":"step-3-handle-the-response","depth":2},{"value":"When to use tokens","id":"when-to-use-tokens","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Process a payment transaction with a stored token","shortTitle":"Payment with token","intro":"Charge a previously tokenized card or bank account without collecting payment details again. Use the payment_token from a prior transaction or the Payment Tokens API.","type":"how-to","seo":{"title":""}},"lastModified":"2026-06-05T02:46:44.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/how-tos/process-payments/process-payment-with-token","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}