> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/get-started-with-the-2checkout-api/get-started-with-the-2checkout-api/authentication-and-use-cases/2checkout-api-use-cases/payment-flow-with-credit-cards.md).

# Payment flow with credit cards

The following payment methods are supported for the Credit/debit cards with 3DS flow: Visa, Visa Electron, Mastercard, Maestro, American Express, JCB, Discover, UnionPay, and Dankort.

{% hint style="info" %}
While 3DS-related fields were not mandatory for the previous API versions, they are required starting with API 6.0 to fully support the regulations brought by [PSD2](/payments/payments/payment-operations/payment-services-directive-2-psd2.md) and SCA.\
We always recommend using the latest version of the API to benefit from the latest functionalities and best performance.
{% endhint %}

## Availability

Available for all 2Checkout accounts.

## Requirements

To place orders with credit/debit cards via API, merchants fall under the requirements of the Payment Card Industry's Security Standards Council and are required to provide proof of attestation for an SAQ-D questionnaire before activation of this feature.

If you want to use the 2Checkout API, contact [2Checkout](mailto:supportplus@2checkout.com) for activation.

## Payment method object structure

<table><thead><tr><th width="193">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>CardNumber</code></td><td><p><strong>Required (string)</strong></p><p>The number of credit/debit cards.</p></td></tr><tr><td><code>CardType</code></td><td><p><strong>Optional (string)</strong></p><p>Can be: Visa, Visa electron, Mastercard, Maestro, Amex, Discover, Dankort, Carte bancaire, JCB, Hypercard, Elo card.</p></td></tr><tr><td><code>ExpirationYear</code></td><td><p><strong>Required (string)</strong></p><p>Card expiration year.</p></td></tr><tr><td><code>ExpirationMonth</code></td><td><p><strong>Required (string)</strong></p><p>Card expiration month.</p></td></tr><tr><td><code>CCID</code></td><td><p><strong>Required (string)</strong></p><p>The CVV/card security code.</p></td></tr><tr><td><code>HolderName</code></td><td><p><strong>Required (string)</strong></p><p>Cardholder name.</p></td></tr><tr><td><code>Vendor3DSReturnURL</code></td><td><p><strong>Required (string)</strong></p><p>URL address to which customers are redirected after the 3DS details get validated by the bank and the order is successfully authorized.</p></td></tr><tr><td><code>Vendor3DSCancelURL</code></td><td><p><strong>Required (string)</strong></p><p>URL address to which customers are redirected if the 3DS details were not validated or the order could not be authorized.</p></td></tr><tr><td><code>RecurringEnabled</code></td><td><p><strong>Optional (boolean)</strong></p><p><strong>True</strong> or <strong>false</strong>, depending on whether the shoppers checked the subscription auto-renewal checkbox or not, during the purchase process.</p></td></tr></tbody></table>

### Request sample

The full JSON used to place an order with credit cards would look like this:

```json
{
  "Items": [\
    {\
      "Code": "5DCB30C6B0",\
      "Quantity": 1\
    }\
  ],
  "BillingDetails": {
    "Email": "example@email.com",
    "FirstName": "Customer First Name",
    "LastName": "Customer Last Name",
    "CountryCode": "US",
    "State": "California",
    "City": "San Francisco",
    "Address1": "Example Street",
    "Zip": "90210"
  },
  "PaymentDetails": {
    "Type": "CC",
    "Currency": "USD",
    "CustomerIP": "10.10.10.10",
    "PaymentMethod": {
      "CardNumber": "4111111111111111",
      "CardType": "VISA",
      "ExpirationYear": "2023",
      "ExpirationMonth": "12",
      "HolderName": "Red Doe",
      "CCID": "123",
      "Vendor3DSReturnURL": "http://yoursuccessurl.com",
      "Vendor3DSCancelURL": "http://yourcancelurl.com"
    }
  },
  "Language": "en",
  "Country": "US",
  "CustomerIP": "10.10.10.10",
  "Source": "Website",
  "ExternalCustomerReference": "externalCustomerId",
  "Currency": "USD",
  "MachineId": "123456789"
}
```

The API will respond with the full order object (for orders placed successfully) or with an error message.

## 3D Secure Flow

For more information on the 3DS flow, refer to [this](/get-started-with-the-2checkout-api/get-started-with-the-2checkout-api/authentication-and-use-cases/2checkout-api-use-cases/3d-secure-flow.md) article.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.2checkout.com/get-started-with-the-2checkout-api/get-started-with-the-2checkout-api/authentication-and-use-cases/2checkout-api-use-cases/payment-flow-with-credit-cards.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
