{"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":"tutorial-e-commerce-platform-integration","__idx":0},"children":["Tutorial: E-commerce platform integration"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"what-you-will-build","__idx":1},"children":["What you will build"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An end-to-end payment flow for an e-commerce store that:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Tokenizes card data at checkout"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Authorizes payment when the order is placed"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Captures payment when the order ships"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Handles cancellations and refunds"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"architecture","__idx":2},"children":["Architecture"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"https://files.modern-mermaid.live/images/1776277780602-mermaid-diagram-1776277780541.png","alt":"image"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":3},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A sandbox 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 server-side application (Python, Node.js, or equivalent)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A database for order and payment state"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-design-your-payment-data-model","__idx":4},"children":["Step 1: Design your payment data model"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Track the relationship between orders and payments in your database."]},{"$$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":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Purpose"},"children":["Purpose"]}]}]},{"$$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":["order_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Your internal order ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Paradise Gateway transaction ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_token"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Tokenized payment method"]}]},{"$$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":["integer"]},{"$$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":["state"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["enum"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pending"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorized"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["captured"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canceled"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refunded"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["correlation_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["For support requests"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2-tokenize-at-checkout","__idx":5},"children":["Step 2: Tokenize at checkout"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When the customer submits payment details, tokenize the card before doing anything else. This keeps raw card data off your systems."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"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, os\n\nAPI_KEY = os.environ[\"PARADISE_API_KEY\"]\nBASE = os.environ.get(\"PARADISE_BASE_URL\", \"https://api.dev.paradisegateway.net\")\nHEADERS = {\"Content-Type\": \"application/json\", \"APIKEY\": API_KEY}\n\ndef tokenize_card(card_data: dict, customer_id: str) -> str:\n    resp = requests.post(f\"{BASE}/v1/payment_tokens\", headers=HEADERS, json={\n        \"customer_id\": customer_id,\n        \"card\": {\n            \"pan\": card_data[\"pan\"],\n            \"expiry_month\": card_data[\"expiry_month\"],\n            \"expiry_year\": card_data[\"expiry_year\"],\n            \"cvv\": card_data[\"cvv\"],\n            \"cardholder_name\": card_data[\"name\"],\n        },\n    })\n    resp.raise_for_status()\n    return resp.json()[\"token\"]\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 API_KEY = process.env.PARADISE_API_KEY;\nconst BASE = process.env.PARADISE_BASE_URL || \"https://api.dev.paradisegateway.net\";\nconst headers = { \"Content-Type\": \"application/json\", \"APIKEY\": API_KEY };\n\nasync function tokenizeCard(cardData, customerId) {\n  const resp = await fetch(`${BASE}/v1/payment_tokens`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify({\n      customer_id: customerId,\n      card: {\n        pan: cardData.pan,\n        expiry_month: cardData.expiryMonth,\n        expiry_year: cardData.expiryYear,\n        cvv: cardData.cvv,\n        cardholder_name: cardData.name,\n      },\n    }),\n  });\n  if (!resp.ok) throw new Error(`Tokenization failed: ${resp.status}`);\n  const body = await resp.json();\n  return body.token;\n}\n","lang":"javascript"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-3-authorize-on-order-placement","__idx":6},"children":["Step 3: Authorize on order placement"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Place a hold on the customer's card for the order amount. Do not capture yet — you'll do that when the order ships."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"def authorize_payment(token: str, amount: int, order_id: str) -> dict:\n    resp = requests.post(f\"{BASE}/v1/transactions\", headers=HEADERS, json={\n        \"type\": \"card_auth\",\n        \"amount\": amount,\n        \"payment_token\": token,\n        \"order_id\": order_id,\n    })\n    resp.raise_for_status()\n    result = resp.json()\n\n    if result[\"response_status\"] != \"approved\":\n        raise ValueError(f\"Auth declined: {result['response_code']}\")\n\n    return {\n        \"transaction_id\": result[\"id\"],\n        \"correlation_id\": result[\"correlation_id\"],\n        \"state\": \"authorized\",\n    }\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":"async function authorizePayment(token, amount, orderId) {\n  const resp = await fetch(`${BASE}/v1/transactions`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify({\n      type: \"card_auth\",\n      amount,\n      payment_token: token,\n      order_id: orderId,\n    }),\n  });\n  if (!resp.ok) throw new Error(`Auth request failed: ${resp.status}`);\n  const result = await resp.json();\n\n  if (result.response_status !== \"approved\") {\n    throw new Error(`Auth declined: ${result.response_code}`);\n  }\n\n  return {\n    transactionId: result.id,\n    correlationId: result.correlation_id,\n    state: \"authorized\",\n  };\n}\n","lang":"javascript"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-4-capture-on-shipment","__idx":7},"children":["Step 4: Capture on shipment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When the warehouse marks the order as shipped, capture the authorized amount."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"def capture_payment(transaction_id: str, amount: int | None = None) -> dict:\n    payload = {}\n    if amount is not None:\n        payload[\"amount\"] = amount\n\n    resp = requests.post(\n        f\"{BASE}/v1/transactions/{transaction_id}/capture\",\n        headers=HEADERS,\n        json=payload,\n    )\n    resp.raise_for_status()\n    return 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":"async function capturePayment(transactionId, amount = null) {\n  const payload = amount !== null ? { amount } : {};\n  const resp = await fetch(`${BASE}/v1/transactions/${transactionId}/capture`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify(payload),\n  });\n  if (!resp.ok) throw new Error(`Capture failed: ${resp.status}`);\n  return resp.json();\n}\n","lang":"javascript"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Partial shipments"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you ship part of the order, capture only the shipped amount. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/how-tos/process-payments/handle-partial-capture"},"children":["Handle partial captures"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-5-handle-cancellations-and-refunds","__idx":8},"children":["Step 5: Handle cancellations and refunds"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"https://files.modern-mermaid.live/images/1776277818109-mermaid-diagram-1776277818051.png","alt":"image"},"children":[]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"def cancel_or_refund(transaction_id: str, is_settled: bool, amount: int | None = None) -> dict:\n    payload = {}\n    if is_settled:\n        payload[\"type\"] = \"card_refund\"\n        if amount:\n            payload[\"amount\"] = amount\n    resp = requests.post(\n        f\"{BASE}/v1/transactions/{transaction_id}/cancel\",\n        headers=HEADERS,\n        json=payload,\n    )\n    resp.raise_for_status()\n    return 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":"async function cancelOrRefund(transactionId, isSettled, amount = null) {\n  const payload = {};\n  if (isSettled) {\n    payload.type = \"card_refund\";\n    if (amount) payload.amount = amount;\n  }\n  const resp = await fetch(`${BASE}/v1/transactions/${transactionId}/cancel`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify(payload),\n  });\n  if (!resp.ok) throw new Error(`Cancel/refund failed: ${resp.status}`);\n  return resp.json();\n}\n","lang":"javascript"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-6-synchronize-payment-state","__idx":9},"children":["Step 6: Synchronize payment state"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Keep your order database in sync with Paradise Gateway by checking transaction state."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"def sync_payment_state(transaction_id: str) -> str:\n    resp = requests.get(f\"{BASE}/v1/transactions/{transaction_id}\", headers=HEADERS)\n    resp.raise_for_status()\n    return resp.json()[\"transaction_state\"]\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"state-mapping","__idx":10},"children":["State mapping"]},{"$$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":"Paradise Gateway state"},"children":["Paradise Gateway state"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Your order state"},"children":["Your order state"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Next action"},"children":["Next action"]}]}]},{"$$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":["authorized"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Order confirmed"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Ship or cancel"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["captured"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Payment pending settlement"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Wait for settlement"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Payment complete"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Fulfill order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canceled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Canceled"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Restock inventory"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["declined"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Payment failed"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Prompt for new card"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refunded"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Refunded"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Process return"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"best-practices","__idx":11},"children":["Best practices"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Always auth first, capture on ship"]}," — avoids charging for out-of-stock items."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Store ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction_id"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["correlation_id"]}]}," — you'll need them for refunds and support."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use tokens for returning customers"]}," — skip tokenization on repeat purchases."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Implement idempotency keys"]}," — prevent duplicate charges on checkout retries."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Log every API interaction"]}," — see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/tutorials/error-handling/log-monitor-api-errors"},"children":["Log and monitor API errors"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Handle declines gracefully"]}," — see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/tutorials/payment-cookbook/handle-declined-transactions"},"children":["Handle declined transactions"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":12},"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/how-tos/manage-transactions/refund-settled-auth"},"children":["Refund a settled transaction"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/tutorials/build-checkout-page"},"children":["Build a checkout page"]}]}]}]},"headings":[{"value":"Tutorial: E-commerce platform integration","id":"tutorial-e-commerce-platform-integration","depth":1},{"value":"What you will build","id":"what-you-will-build","depth":2},{"value":"Architecture","id":"architecture","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Step 1: Design your payment data model","id":"step-1-design-your-payment-data-model","depth":2},{"value":"Step 2: Tokenize at checkout","id":"step-2-tokenize-at-checkout","depth":2},{"value":"Step 3: Authorize on order placement","id":"step-3-authorize-on-order-placement","depth":2},{"value":"Step 4: Capture on shipment","id":"step-4-capture-on-shipment","depth":2},{"value":"Step 5: Handle cancellations and refunds","id":"step-5-handle-cancellations-and-refunds","depth":2},{"value":"Step 6: Synchronize payment state","id":"step-6-synchronize-payment-state","depth":2},{"value":"State mapping","id":"state-mapping","depth":3},{"value":"Best practices","id":"best-practices","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Tutorial: E-commerce platform integration","shortTitle":"E-commerce integration","intro":"Learn how to integrate Paradise Gateway into an e-commerce platform — from checkout to fulfillment — covering tokenization, auth/capture, refunds, and order synchronization.","type":"tutorial","seo":{"title":""}},"lastModified":"2026-06-05T02:46:44.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/tutorials/integration-patterns/ecomm-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}