{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/sidebars.yaml","oas-apis/openapi.yaml":"oas-apis/openapi.yaml"},"props":{"metadata":{"markdoc":{"tagList":["replay-openapi"]},"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":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"process-a-credit-card-sale","__idx":0},"children":["Process a credit card sale"]},{"$$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 processor integration configured for card payments (TSYS)"]}]},{"$$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":["type"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sale"]}," and include the full card details in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method"]},"."]},{"$$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":"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 (for example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1999"]}," = 19.99 USD)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tip"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Tip amount in cents (minimum 50 if provided)"]}]},{"$$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":["card"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method.pan"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Full card number"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method.expiry.month"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Two-digit expiry month"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method.expiry.year"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Four-digit expiry year"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method.cardholder_name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Name on card"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method.cvv"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Recommended"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["3- or 4-digit verification value"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method.address_line1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Recommended"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Billing street address (for AVS)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method.zip"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Recommended"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Billing ZIP code (for AVS)"]}]},{"$$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":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," if this is a recurring charge"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["purchase_description"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Description of the purchase"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2-send-the-request","__idx":3},"children":["Step 2: Send the request"]},{"$$mdtype":"Tag","name":"ReplayOpenApi","attributes":{"descriptionFile":"oas-apis/openapi.yaml","operationId":"createTransaction","parameters":{},"requestBody":{"type":"SALE","amount":20000,"currency":"USD","tip":4000,"payment_method":{"type":"Card","pan":"4263970000005262","expiry":{"month":"12","year":"2028"},"cvv":"999","first_name":"Nyota","last_name":"Uhura","contact":{"email":"nyota.uhura@example.com","phone":"+17035550123"},"billing_address":{"line1":"42 Subspace Ln","line2":"null","city":"San Francisco","state":"CA","postal_code":"94102","country":"US"}},"recurring":false,"metadata":{}},"options":{},"environments":{}},"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":["A successful sale returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction_state: authorized"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\",\n  \"object\": \"transaction\",\n  \"type\": \"card_sale\",\n  \"transaction_state\": \"authorized\",\n  \"response_status\": \"Approved\",\n  \"response_code\": \"00\",\n  \"response_message\": \"The API request is approved.\",\n  \"batch_id\": \"BATCH-01JMRSPCK7XVNP3KS8F2W4T6Y\",\n  \"amount\": 15000,\n  \"tip\": 1000,\n  \"avs_result_code\": \"y\",\n  \"cvv_result\": \"M\",\n  \"authorization_code\": \"847293\",\n  \"payment_method\": {\n    \"type\": \"card\",\n    \"payment_token\": \"PAYMENT_TOKEN-01JMRSPCK8WLXDPRMW3SNPVQEA\",\n    \"brand\": \"visa\",\n    \"last_four\": \"1234\",\n    \"bin\": \"411111\",\n    \"funding\": \"credit\"\n  },\n  \"correlation_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Save the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," for any future operations (cancel, refund). Note the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_token"]}," — you can reuse it for future transactions without collecting card details again."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-4-check-fraud-signals","__idx":5},"children":["Step 4: Check fraud signals"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Review the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["avs_result_code"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cvv_result"]}," in the response before fulfilling the order."]},{"$$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":"Good values"},"children":["Good values"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Action on mismatch"},"children":["Action on mismatch"]}]}]},{"$$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":["avs_result_code"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["y"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Partial match: review. No match (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["n"]},"): consider declining."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cvv_result"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["M"]}," (Visa), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}," (Mastercard)"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["No match: high risk — consider declining."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/security-compliance/fraud-protection"},"children":["About fraud prevention"]},"."]},{"$$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/how-tos/process-payments/process-payment-with-token"},"children":["Process a payment with a stored token"]}," — reuse the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_token"]}," from this response"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/how-tos/process-payments/add-tip"},"children":["Add a tip or surcharge"]}," — update the amount after authorization"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/transactions/transaction-lifecycle"},"children":["About the transaction lifecycle"]}]}]}]},"headings":[{"value":"Process a credit card sale","id":"process-a-credit-card-sale","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":"Step 4: Check fraud signals","id":"step-4-check-fraud-signals","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Process a credit card sale","shortTitle":"Credit card sale","intro":"Authorize and capture a card payment in a single request using raw card data. This one-step flow is ideal for immediate-fulfillment scenarios.","type":"how-to","seo":{"title":""}},"lastModified":"2026-06-05T02:46:44.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/how-tos/process-payments/process-credit-card","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}