> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/checkout/card-payment/submit-credit-card-details-and-process-payment.md).

# Submit Credit Card Details and Process Payment

Submits full credit card details and processes the payment. May route to 3D Secure verification or complete order directly.

**Required Fields**:

* `card_number`: Full 16-digit card number
* `card_holder`: Cardholder name as printed on card
* `card_month`: Expiration month (MM format, e.g., "01", "12")
* `card_year`: Expiration year (YYYY format, e.g., "2026")
* `card_cvv`: CVV/CVC security code (3-4 digits)
* `agreement`: User must accept terms and conditions (boolean, must be true)

**Optional Fields**:

* `card_name`: Nickname for saved card (required if `save` is true)
* `save`: Whether to save card for future use (boolean, default false)
* `use_three_d`: User preference for 3D Secure (may be overridden by rules)
* `client_time`: Client-side timestamp for fraud detection
* Browser information fields for 3D Secure:
  * `browser_java_enabled`: Boolean
  * `browser_language`: Language code (e.g., "en-US")
  * `browser_color_depth`: Screen color depth (e.g., "24")
  * `browser_screen_height`: Screen height in pixels
  * `browser_screen_width`: Screen width in pixels
  * `browser_time_zone`: Timezone offset in minutes
  * `browser_header`: Accept header (auto-captured)
  * `browser_user_agent`: User agent string (auto-captured)

**Card Validation**:

* Card number validated using Luhn algorithm
* Expiration date must be in the future
* CVV must be 3-4 digits
* Cardholder name validated against format rules

**3D Secure Decision**: System determines if 3D Secure is required based on:

* Payment gateway configuration
* Card type and BIN rules
* Transaction amount thresholds
* User risk profile
* Bank requirements

**Save Card Processing**:

* If `save` is true and user is authenticated: Card is tokenized and saved
* Card details are encrypted and stored securely
* Only token and last 4 digits are retained
* Saved cards can be used in future checkouts

**Identity Number Validation**:

* If `IDENTITY_NUMBER_REQUIRED_AMOUNT` setting is configured:
  * Validates shipping address has identity\_number field
  * Required when order total exceeds configured threshold

**3D Secure Decision Logic**:

* Master switch: `THREE_D_SECURE_ENABLED` must be true
* If enabled, evaluates `THREE_D_SECURE_RULES` conditions:
  * Amount limits
  * Guest user checks
  * First order checks
  * POS terminal restrictions
  * Failed attempt limits per user/IP
  * Currency restrictions
* If ANY rule returns true, 3D Secure is required

**Next Pages**:

* If 3D Secure required: `CreditCardThreeDSecurePage`
* If 3D Secure not required: `ThankYouPage` (order completed)

```json
{"openapi":"3.1.0","info":{"title":"Overview","version":"1.0.0"},"tags":[{"name":"Card Payment","description":"# Checkout Card Payment\n\nAccept credit and debit card payments through a multi-step flow covering BIN lookup, installment selection, 3D Secure verification, payment confirmation, saved card selection, and order completion.\n\n## Authentication\n\nThese endpoints support both authenticated and anonymous sessions.\n\n- **Authenticated users**: Session cookie (`sessionid`) tracks checkout progress.\n- **Anonymous users**: Guest checkout is available when the `CAN_GUEST_PURCHASE` setting is enabled.\n## Request Format\n\nInclude the following header in all checkout requests:\n\n- **x-requested-with**: `XMLHttpRequest`\n\n## Dynamic Settings\n\nThe following settings are managed at runtime through the admin interface and do not require a server restart.\n\n### THREE_D_SECURE_ENABLED\nMaster switch for 3D Secure verification. When disabled, 3D Secure is skipped regardless of other rules.\n\n### THREE_D_SECURE_RULES\nRule-based conditions that determine when 3D Secure is required. Rules are evaluated in order; the first match triggers 3D Secure. Only active when `THREE_D_SECURE_ENABLED` is enabled.\n\nAvailable rule types: amount threshold, POS terminal identifier, failed attempt limit per email address, failed attempt limit per IP address, guest user status, first-time purchaser, payment currency.\n\n### INSTALLMENT_FILTERS\nFilters that restrict which installment options are presented. Filters are applied in sequence; each may remove options or stop further filtering.\n\n## Static Settings\n\nThe following settings are configured in the server environment and require a restart to take effect.\n\n### DEFAULT_CARD_SLUG\nFallback card identifier used when a BIN number is submitted but no matching record is found. Defaults to `other`."}],"servers":[{"description":"Akinon Checkout API","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com"}}}],"paths":{"/orders/checkout/?page=CreditCardConfirmationPage":{"post":{"tags":["Card Payment"],"operationId":"submitCreditCardConfirmation","summary":"Submit Credit Card Details and Process Payment","description":"Submits full credit card details and processes the payment.\nMay route to 3D Secure verification or complete order directly.\n\n**Required Fields**:\n- `card_number`: Full 16-digit card number\n- `card_holder`: Cardholder name as printed on card\n- `card_month`: Expiration month (MM format, e.g., \"01\", \"12\")\n- `card_year`: Expiration year (YYYY format, e.g., \"2026\")\n- `card_cvv`: CVV/CVC security code (3-4 digits)\n- `agreement`: User must accept terms and conditions (boolean, must be true)\n\n**Optional Fields**:\n- `card_name`: Nickname for saved card (required if `save` is true)\n- `save`: Whether to save card for future use (boolean, default false)\n- `use_three_d`: User preference for 3D Secure (may be overridden by rules)\n- `client_time`: Client-side timestamp for fraud detection\n- Browser information fields for 3D Secure:\n  - `browser_java_enabled`: Boolean\n  - `browser_language`: Language code (e.g., \"en-US\")\n  - `browser_color_depth`: Screen color depth (e.g., \"24\")\n  - `browser_screen_height`: Screen height in pixels\n  - `browser_screen_width`: Screen width in pixels\n  - `browser_time_zone`: Timezone offset in minutes\n  - `browser_header`: Accept header (auto-captured)\n  - `browser_user_agent`: User agent string (auto-captured)\n\n**Card Validation**:\n- Card number validated using Luhn algorithm\n- Expiration date must be in the future\n- CVV must be 3-4 digits\n- Cardholder name validated against format rules\n\n**3D Secure Decision**:\nSystem determines if 3D Secure is required based on:\n- Payment gateway configuration\n- Card type and BIN rules\n- Transaction amount thresholds\n- User risk profile\n- Bank requirements\n\n**Save Card Processing**:\n- If `save` is true and user is authenticated: Card is tokenized and saved\n- Card details are encrypted and stored securely\n- Only token and last 4 digits are retained\n- Saved cards can be used in future checkouts\n\n**Identity Number Validation**:\n- If `IDENTITY_NUMBER_REQUIRED_AMOUNT` setting is configured:\n  - Validates shipping address has identity_number field\n  - Required when order total exceeds configured threshold\n\n**3D Secure Decision Logic**:\n- Master switch: `THREE_D_SECURE_ENABLED` must be true\n- If enabled, evaluates `THREE_D_SECURE_RULES` conditions:\n  - Amount limits\n  - Guest user checks\n  - First order checks\n  - POS terminal restrictions\n  - Failed attempt limits per user/IP\n  - Currency restrictions\n- If ANY rule returns true, 3D Secure is required\n\n**Next Pages**:\n- If 3D Secure required: `CreditCardThreeDSecurePage`\n- If 3D Secure not required: `ThankYouPage` (order completed)","parameters":[{"$ref":"#/components/parameters/AjaxRequestHeader"},{"$ref":"#/components/parameters/SessionCookieHeader"}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/CreditCardConfirmationInput"}}}},"responses":{"200":{"description":"Credit card details submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}}}}}},"components":{"parameters":{"AjaxRequestHeader":{"name":"x-requested-with","in":"header","required":true,"description":"Required header for AJAX requests. Must be set to `XMLHttpRequest` for all checkout requests.","schema":{"type":"string","enum":["XMLHttpRequest"],"default":"XMLHttpRequest"}},"SessionCookieHeader":{"name":"Cookie","in":"header","required":false,"description":"Session cookie header (e.g. `sessionid=abc123` or `osessionid=<session_id>`)","schema":{"type":"string"}}},"schemas":{"CreditCardConfirmationInput":{"type":"object","required":["card_number","card_holder","card_month","card_year","card_cvv","agreement"],"properties":{"card_number":{"type":"string","description":"Full credit card number (16 digits).\nValidated using Luhn algorithm.\nSpaces are automatically removed.","pattern":"^\\d{16}$"},"card_holder":{"type":"string","description":"Cardholder name as printed on the card.\nMust contain only letters and spaces.\nValidated against format rules."},"card_month":{"type":"string","description":"Card expiration month in MM format.\nMust be between 01 and 12.","pattern":"^(0[1-9]|1[0-2])$"},"card_year":{"type":"string","description":"Card expiration year in YYYY format.\nMust be current year or future.","pattern":"^\\d{4}$"},"card_cvv":{"type":"string","description":"Card security code (CVV/CVC).\nMust be 3-4 digits depending on card type.","pattern":"^\\d{3,4}$"},"card_name":{"type":"string","description":"Nickname for the card if saving for future use.\nRequired when `save` is true.\nOptional otherwise."},"agreement":{"type":"boolean","description":"User must accept terms and conditions to proceed.\nMust be true.","enum":[true]},"save":{"type":"boolean","default":false,"description":"Whether to save the card for future purchases.\nOnly available for authenticated users.\nGuest users cannot save cards."},"use_three_d":{"type":"boolean","description":"User preference for 3D Secure verification.\nMay be overridden by system rules.\nOptional field."},"client_time":{"type":"string","format":"date-time","description":"Client-side timestamp for fraud detection"},"browser_java_enabled":{"type":"boolean","description":"Whether Java is enabled in the browser"},"browser_language":{"type":"string","description":"Browser language code (e.g., \"en-US\", \"tr-TR\")"},"browser_color_depth":{"type":"string","description":"Screen color depth in bits (e.g., \"24\", \"32\")"},"browser_screen_height":{"type":"string","description":"Screen height in pixels"},"browser_screen_width":{"type":"string","description":"Screen width in pixels"},"browser_time_zone":{"type":"string","description":"Timezone offset from UTC in minutes.\nExample: UTC-4 would be \"240\" (4 hours * 60 minutes)"}}},"CheckoutResponse":{"type":"object","properties":{"context_list":{"type":"array","items":{"$ref":"#/components/schemas/PageContext"}},"pre_order":{"$ref":"#/components/schemas/PreOrder"},"errors":{"oneOf":[{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},{"type":"null"},{"type":"array","items":{"type":"string"}}]},"template_name":{"type":"string"}}},"PageContext":{"type":"object","properties":{"page_name":{"type":"string","description":"Class name of the page (e.g., \"IndexPage\", \"AddressSelectionPage\")"},"page_slug":{"type":"string","description":"URL-friendly slug for the page"},"page_context":{"type":"object","description":"Page-specific context data","additionalProperties":true}}},"PreOrder":{"type":"object","description":"Pre-order state containing basket, addresses, shipping, payment information","properties":{"basket":{"$ref":"#/components/schemas/Basket"},"shipping_address":{"oneOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"billing_address":{"oneOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"shipping_option":{"oneOf":[{"$ref":"#/components/schemas/ShippingOptionDetail"},{"type":"null"}]},"billing_and_shipping_same":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"payment_option":{"oneOf":[{"$ref":"#/components/schemas/PaymentOptionDetail"},{"type":"null"}]},"notifications":{"type":"array","items":{"type":"object"}},"shipping_amount":{"oneOf":[{"type":"string","pattern":"^\\d+\\.\\d{2}$"},{"type":"null"}]},"total_amount":{"oneOf":[{"type":"string","pattern":"^\\d+\\.\\d{2}$"},{"type":"null"}]},"unpaid_amount":{"oneOf":[{"type":"string","pattern":"^\\d+\\.\\d{2}$"},{"type":"null"}]},"loyalty_money":{"oneOf":[{"type":"string","pattern":"^\\d+\\.\\d{2}$"},{"type":"null"}]},"currency_type_label":{"type":"string"},"installment":{"oneOf":[{"$ref":"#/components/schemas/Installment"},{"type":"null"}]},"card_info":{"oneOf":[{"type":"object","description":"Card information from BIN lookup","properties":{"bin_number":{"type":"string","description":"Card BIN (first 6-8 digits)"},"card":{"type":"object","description":"Card details from BIN database","properties":{"pk":{"type":"integer"},"name":{"type":"string","description":"Card type name (e.g., \"Visa\", \"Mastercard\")"}}}}},{"type":"null"}]},"redirect_to_three_d":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"delivery_option":{"oneOf":[{"$ref":"#/components/schemas/DeliveryOption"},{"type":"null"}]},"retail_store":{"oneOf":[{"$ref":"#/components/schemas/RetailStore"},{"type":"null"}]},"funds_transfer_bank":{"oneOf":[{"$ref":"#/components/schemas/BankAccount"},{"type":"null"}]},"number":{"oneOf":[{"type":"string","description":"Pre-order/order number"},{"type":"null"}]},"order":{"oneOf":[{"type":"object","description":"Created order (after checkout completion)","properties":{"pk":{"type":"integer"},"number":{"type":"string"},"status":{"type":"string"}}},{"type":"null"}]},"payment_choice":{"oneOf":[{"$ref":"#/components/schemas/PaymentChoice"},{"type":"null"}]},"user_email":{"oneOf":[{"type":"string"},{"type":"null"}]},"phone_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"user_phone_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"gift_box":{"oneOf":[{"type":"object","properties":{"note":{"type":"string"},"gift_video":{"type":"boolean"},"gift_video_notification_sent":{"type":"boolean"},"price":{"type":"string"}}},{"type":"null"}]},"delivery_range":{"oneOf":[{"type":"object","properties":{"lower":{"type":"string","format":"date-time"},"upper":{"type":"string","format":"date-time"}}},{"type":"null"}]},"total_amount_with_interest":{"oneOf":[{"type":"string","pattern":"^\\d+\\.\\d{2}$"},{"type":"null"}]},"is_guest":{"type":"boolean"},"is_post_order":{"type":"boolean"},"data_source_shipping_options":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/DataSourceShippingOptionDetail"}},{"type":"null"}]},"attribute_based_shipping_options":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/PreOrderAttributeBasedShippingOption"}},{"type":"null"}]}}},"Basket":{"type":"object","properties":{"pk":{"type":"integer"},"total_amount":{"type":"string","pattern":"^\\d+\\.\\d{2}$"}}},"Address":{"type":"object","properties":{"pk":{"type":"integer"},"email":{"type":"string"},"phone_number":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"country":{"$ref":"#/components/schemas/Country"},"city":{"$ref":"#/components/schemas/City"},"line":{"type":"string"},"title":{"type":"string"},"township":{"$ref":"#/components/schemas/Township"},"district":{"oneOf":[{"$ref":"#/components/schemas/District"},{"type":"null"}]},"postcode":{"type":"string"},"notes":{"type":"string"},"company_name":{"type":"string"},"tax_office":{"type":"string"},"tax_no":{"type":"string"},"e_bill_taxpayer":{"type":"boolean"},"is_corporate":{"type":"boolean"},"primary":{"type":"boolean"},"identity_number":{"type":"string"}}},"Country":{"type":"object","properties":{"pk":{"type":"integer"},"code":{"type":"string"},"name":{"type":"string"}}},"City":{"type":"object","properties":{"pk":{"type":"integer"},"name":{"type":"string"}}},"Township":{"type":"object","properties":{"pk":{"type":"integer"},"name":{"type":"string"}}},"District":{"type":"object","properties":{"pk":{"type":"integer"},"name":{"type":"string"}}},"ShippingOptionDetail":{"type":"object","description":"Detailed shipping option with calculated amount","properties":{"pk":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"oneOf":[{"type":"string","format":"uri"},{"type":"null"}]},"shipping_amount":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"description":{"oneOf":[{"type":"string"},{"type":"null"}]},"kwargs":{"type":"object","additionalProperties":true}}},"PaymentOptionDetail":{"type":"object","description":"Detailed payment option with type information","properties":{"pk":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"payment_type":{"type":"string","enum":["credit_card","funds_transfer","bkm_express","loyalty_money","cash_register","gpay","redirection","stored_card","masterpass","masterpass_rest","credit_payment","pay_later","saved_card","confirmation","b2b","wallet","pay_on_delivery"]},"payment_type_label":{"type":"string"}}},"Installment":{"type":"object","properties":{"pk":{"type":"integer"},"installment_count":{"type":"integer"},"label":{"type":"string"},"price_with_accrued_interest":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"monthly_price_with_accrued_interest":{"type":"string","pattern":"^\\d+\\.\\d{2}$"}}},"DeliveryOption":{"type":"object","properties":{"pk":{"type":"integer"},"name":{"type":"string"},"delivery_option_type":{"type":"string","enum":["customer","retail_store","pickup_location"]},"is_active":{"type":"boolean"}}},"RetailStore":{"type":"object","properties":{"pk":{"type":"integer"},"name":{"type":"string"},"erp_code":{"type":"string"},"township":{"$ref":"#/components/schemas/Township"},"click_and_collect":{"type":"boolean"},"is_active":{"type":"boolean"}}},"BankAccount":{"type":"object","description":"Bank account for funds transfer payments","properties":{"pk":{"type":"integer"},"bank_name":{"type":"string","description":"Name of the bank"},"account_holder":{"type":"string","description":"Account holder name"},"iban":{"type":"string","description":"International Bank Account Number"},"currency":{"type":"string","description":"Currency code (e.g., \"USD\", \"EUR\", \"TRY\")"},"is_active":{"type":"boolean"}}},"PaymentChoice":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"price":{"type":"string","pattern":"^\\d+\\.\\d{2}$"}}},"DataSourceShippingOptionDetail":{"type":"object","description":"Data source shipping option for multi-vendor shipping","properties":{"pk":{"type":"integer"},"shipping_amount":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"shipping_option_name":{"type":"string"},"shipping_option_logo":{"oneOf":[{"type":"string","format":"uri"},{"type":"null"}]},"data_source":{"type":"object","properties":{"pk":{"type":"integer"},"title":{"type":"string"}}},"description":{"oneOf":[{"type":"string"},{"type":"null"}]}}},"PreOrderAttributeBasedShippingOption":{"type":"object","description":"Attribute-based shipping option selected for a product group","properties":{"pk":{"type":"integer"},"shipping_option_name":{"type":"string"},"shipping_option_logo":{"oneOf":[{"type":"string","format":"uri"},{"type":"null"}]},"shipping_amount":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"product_ids":{"type":"array","items":{"type":"integer"}},"attribute_value":{"type":"string"},"attribute_key":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://apidocs.akinon.com/commerce-openapis/checkout/card-payment/submit-credit-card-details-and-process-payment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
