{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["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":"add-a-tip-or-surcharge","__idx":0},"children":["Add a tip or surcharge"]},{"$$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 authorized transaction (from a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sale"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auth"]},", or tokenized equivalent)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"when-to-use-this","__idx":2},"children":["When to use this"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Restaurant / hospitality"]},": The person adds a tip after signing the receipt."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Service industry"]},": A gratuity is added after the service is complete."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Surcharges"]},": An additional fee is applied after initial authorization (where legally permitted)."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-authorize-the-transaction","__idx":3},"children":["Step 1: Authorize the transaction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["First, request an authorization for the base amount (before tip)."]},{"$$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\": \"auth\",\n    \"amount\": 15000,\n    \"tip\": 0,\n    \"payment_method\": {\n      \"type\": \"card\",\n      \"pan\": \"4111111111111111\",\n      \"expiry\": {\n        \"month\": \"03\",\n        \"year\": \"2028\"\n      },\n    },\n      \"cardholder_name\": \"Spock\",\n      \"cvv\": \"999\",\n      \"address_line1\": \"1701 Enterprise Dr\",\n      \"zip\": \"94102\"\n  },\n  \"metadata\": {},\n  \"recurring\": false,\n  \"purchase_description\": \"Romulan ale\"\n  }'\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Save the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," from the response."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2-update-with-the-tip","__idx":4},"children":["Step 2: Update with the tip"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Send ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/transactions/{id}"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type: update"]}," and include the updated ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tip"]},"."]},{"$$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/TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y \\\n  -H \"Content-Type: application/json\" \\\n  -H \"APIKEY: YOUR-API-KEY\" \\\n  -d '{\n    \"type\": \"update\",\n    \"amount\": 18000,\n    \"tip\": 3000\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\ntransaction_id = \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\"\nresp = requests.post(\n    f\"https://api.dev.paradisegateway.net/v1/transactions/{transaction_id}\",\n    headers={\"Content-Type\": \"application/json\", \"APIKEY\": \"YOUR-API-KEY\"},\n    json={\n        \"type\": \"card_update\",\n        \"amount\": 18000,\n        \"tip\": 3000,\n        \"payment_method\": {\n            \"type\": \"card\",\n            \"pan\": \"4111111111111234\",\n            \"expiry_month\": \"03\",\n            \"expiry_year\": \"2028\",\n            \"cardholder_name\": \"Spock\",\n            \"cvv\": \"456\",\n            \"address_line1\": \"1701 Enterprise Dr\",\n            \"zip\": \"94102\",\n        },\n        \"recurring\": False,\n        \"purchase_description\": \"Romulan ale\",\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 transactionId = \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\";\nconst resp = await fetch(\n  `https://api.dev.paradisegateway.net/v1/transactions/${transactionId}`,\n  {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"APIKEY\": \"YOUR-API-KEY\",\n    },\n    body: JSON.stringify({\n      type: \"update\",\n      amount: 18000,\n      tip: 3000\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 transactionId = \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\";\nvar payload = new\n{\n    type = \"update\", amount = 18000, tip = 3000\n};\nvar resp = await client.PostAsJsonAsync(\n    $\"https://api.dev.paradisegateway.net/v1/transactions/{transactionId}\",\n    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 transactionId = \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\";\nString body = \"\"\"\n    {\n      \"type\": \"update\", \"amount\": 18000, \"tip\": 3000\n    }\n    \"\"\";\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\n        \"https://api.dev.paradisegateway.net/v1/transactions/\" + transactionId))\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":"transactionID := \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\"\npayload := strings.NewReader(`{\n  \"type\": \"update\", \"amount\": 18000, \"tip\": 3000\n}`)\nreq, _ := http.NewRequest(\"POST\",\n    \"https://api.dev.paradisegateway.net/v1/transactions/\"+transactionID, 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":"$id = \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\";\n$ch = curl_init(\"https://api.dev.paradisegateway.net/v1/transactions/$id\");\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        \"type\" => \"update\", \"amount\" => 18000, \"tip\" => 3000,\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":"id = \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\"\nuri = URI(\"https://api.dev.paradisegateway.net/v1/transactions/#{id}\")\nreq = Net::HTTP::Post.new(uri, {\n  \"Content-Type\" => \"application/json\", \"APIKEY\" => \"YOUR-API-KEY\",\n})\nreq.body = {\n  type: \"update\", amount: 18000, tip: 3000\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-verify-the-update","__idx":5},"children":["Step 3: Verify the update"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response confirms the updated amounts. The 30.00 is added to the original 150.00 amount and the new amount is 180.00 USD."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\",\n  \"type\": \"update\",\n  \"transaction_state\": \"authorized\",\n  \"response_status\": \"Approved\",\n  \"response_code\": \"00\",\n  \"amount\": 18000,\n  \"tip\": 3000,\n  \"correlation_id\": \"e5f6a7b8-c9d0-1234-ef01-23456789abcd\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The person's card will be charged 180.00 USD (150.00 + 30.00 tip) at settlement."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"tip-field-rules","__idx":6},"children":["Tip field rules"]},{"$$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":"Rule"},"children":["Rule"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Details"},"children":["Details"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Minimum"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["50 cents (if provided; ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}," is allowed to clear a tip)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Maximum"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["99,999,999 cents (999,999.99 USD)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Currency"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["USD only (all amounts in cents)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Timing"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Must be updated before batch settlement"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":7},"children":["Next steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$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"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/how-tos/process-payments/handle-partial-capture"},"children":["Handle partial captures"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/transactions/transaction-lifecycle"},"children":["About the transaction lifecycle"]}]}]}]},"headings":[{"value":"Add a tip or surcharge","id":"add-a-tip-or-surcharge","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"When to use this","id":"when-to-use-this","depth":2},{"value":"Step 1: Authorize the transaction","id":"step-1-authorize-the-transaction","depth":2},{"value":"Step 2: Update with the tip","id":"step-2-update-with-the-tip","depth":2},{"value":"Step 3: Verify the update","id":"step-3-verify-the-update","depth":2},{"value":"Tip field rules","id":"tip-field-rules","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Add a tip or surcharge","shortTitle":"Add a tip","intro":"Update an authorized transaction to add a tip or adjust the amount before capture and settlement. Use the Update Transaction endpoint to modify the amount after the initial authorization.","type":"how-to","seo":{"title":""}},"lastModified":"2026-06-05T02:46:44.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/how-tos/process-payments/add-tip","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}