> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dodopayments.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Credit & Debit Cards

> Accept all major credit and debit card networks globally with Dodo Payments. Learn about 3D Secure, saved cards, tokenization, and regional card support.

Card payments are the foundation of online payments, accepted globally and trusted by customers worldwide. Dodo Payments supports all major card networks with built-in fraud protection and PCI compliance.

## Supported Card Networks

### Global Networks

| Network              | Coverage                                |
| :------------------- | :-------------------------------------- |
| **Visa**             | Global leader, 4B+ cards worldwide      |
| **Mastercard**       | Global reach, strong security features  |
| **American Express** | Premium cardholders, higher spending    |
| **Discover**         | US-focused, growing globally            |
| **JCB**              | Leading in Japan, expanding across Asia |
| **UnionPay**         | Dominant in China, 8B+ cards            |
| **Diners Club**      | Premium international travelers         |

### Regional Networks

| Network                | Region                    |
| :--------------------- | :------------------------ |
| **Interac**            | Canada's debit network    |
| **Cartes Bancaires**   | France's national network |
| **Korean Local Cards** | Korean domestic networks  |
| **Rupay**              | India's national network  |

## Configuration

Use these values in `allowed_payment_method_types`:

| Type     | Description      |
| :------- | :--------------- |
| `credit` | All credit cards |
| `debit`  | All debit cards  |

```javascript theme={null}
const session = await client.checkoutSessions.create({
  product_cart: [{ product_id: 'prod_123', quantity: 1 }],
  allowed_payment_method_types: ['credit', 'debit'],
  return_url: 'https://example.com/success'
});
```

<Tip>
  Include both `credit` and `debit` unless you have a specific reason to exclude one. Debit cards are preferred by many customers and often have lower fees.
</Tip>

## 3D Secure Authentication

3D Secure (3DS) adds an authentication layer that reduces fraud and chargebacks by verifying the cardholder's identity.

### When 3DS is Triggered

3DS is automatically triggered when:

* Required by the card network
* Required by regional regulations (e.g., PSD2 in Europe)
* The transaction is flagged as high-risk

### Force 3DS

You can require 3DS on all transactions:

```javascript theme={null}
const session = await client.checkoutSessions.create({
  product_cart: [{ product_id: 'prod_123', quantity: 1 }],
  force_3ds: true,
  return_url: 'https://example.com/success'
});
```

<Note>
  Enabling 3DS for all transactions reduces fraud but may slightly decrease conversion as some customers abandon during authentication.
</Note>

### Handling Authentication Failures

When a payment needs 3DS authentication, the payment moves through intermediate states before it succeeds or fails:

| Status                     | Meaning                                                                                                                         | What to do                                                                                                             |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `requires_customer_action` | The customer must complete a 3DS challenge                                                                                      | Have the customer complete authentication during checkout                                                              |
| `requires_payment_method`  | The customer never provided a payment method (didn't enter details or abandoned the prompt) — usually a drop-off, not a decline | Re-engage the customer to complete checkout; see [Abandoned Cart Recovery](/features/recovery/abandoned-cart-recovery) |

If authentication does not complete, the payment fails with one of these decline codes:

* `AUTHENTICATION_FAILURE` — the customer could not be authenticated.
* `AUTHENTICATION_REQUIRED` — authentication is required but was not performed.
* `AUTHENTICATION_TIMEOUT` — the customer did not respond in time.

See the [Transaction Failures](/api-reference/transaction-failures) reference for the recommended action for each.

#### At Checkout vs. on Renewal

* **At checkout (customer present):** The customer is present, so the 3DS challenge is shown during checkout. If it fails, ask them to retry or use another card.
* **On subscription renewal (customer not present):** The customer is not present, so a 3DS challenge cannot be displayed in real time. If a renewal requires authentication, the subscription moves to `on_hold`. Recover it by prompting the customer to return and update their payment method — see [Handle Payment Failures](/developer-resources/handle-payment-failures) and [Subscription Dunning](/features/recovery/subscription-dunning).

## Saved Payment Methods

Customers can save their cards for faster future checkouts.

<CardGroup cols={3}>
  <Card title="Tokenized" icon="lock">
    Original card numbers never stored.
  </Card>

  <Card title="PCI Compliant" icon="shield-check">
    Dodo handles all compliance.
  </Card>

  <Card title="Customer-Scoped" icon="user">
    Cards tied to specific customers.
  </Card>
</CardGroup>

### Enable Saved Cards

```javascript theme={null}
const session = await client.checkoutSessions.create({
  product_cart: [{ product_id: 'prod_123', quantity: 1 }],
  show_saved_payment_methods: true,
  customer: { customer_id: 'cus_existing_123' },
  return_url: 'https://example.com/success'
});
```

### One-Click Purchases

```javascript theme={null}
// Get customer's saved payment methods
const methods = await client.customers.retrievePaymentMethods('cus_123');

// Use saved card for instant checkout
const session = await client.checkoutSessions.create({
  product_cart: [{ product_id: 'prod_123', quantity: 1 }],
  customer: { customer_id: 'cus_123' },
  payment_method_id: methods.items[0].payment_method_id,
  confirm: true,
  return_url: 'https://example.com/success'
});
```

## Testing

<Tabs>
  <Tab title="Successful Payments">
    | Region | Brand      | Card Number        | Expiry | CVV |
    | :----- | :--------- | :----------------- | :----- | :-- |
    | US     | Visa       | `4242424242424242` | 06/32  | 123 |
    | US     | Mastercard | `5555555555554444` | 06/32  | 123 |
    | India  | Visa       | `4576238912771450` | 06/32  | 123 |
    | India  | Mastercard | `5409162669381034` | 06/32  | 123 |
  </Tab>

  <Tab title="Declined Payments">
    | Region | Brand      | Card Number        | Scenario           |
    | :----- | :--------- | :----------------- | :----------------- |
    | US     | Visa       | `4000000000000002` | Generic decline    |
    | US     | Mastercard | `4000000000009995` | Insufficient funds |
    | India  | Visa       | `4706131211212123` | Generic decline    |
    | India  | Mastercard | `5105105105105100` | Generic decline    |
  </Tab>
</Tabs>

<Warning>
  Test cards only work in test mode. Never use them for production transactions.
</Warning>

## Security & Compliance

| Feature             | Description                        |
| :------------------ | :--------------------------------- |
| **PCI DSS Level 1** | Highest level of certification     |
| **Tokenization**    | Card numbers immediately tokenized |
| **Fraud Scoring**   | Real-time risk assessment          |
| **AVS**             | Address Verification Service       |
| **CVV Validation**  | Security code verification         |
| **3D Secure**       | Cardholder authentication          |

## Best Practices

<AccordionGroup>
  <Accordion title="Accept all major networks">
    Don't restrict card types unless necessary. Customers expect their preferred card to work.
  </Accordion>

  <Accordion title="Display card logos">
    Show Visa, Mastercard, Amex logos on your checkout to build trust.
  </Accordion>

  <Accordion title="Handle declines gracefully">
    Show clear error messages. Don't expose raw error codes to customers.
  </Accordion>

  <Accordion title="Enable saved cards for returning customers">
    Saved payment methods significantly boost conversion for repeat purchases.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Card declined">
    **Causes:** Insufficient funds, card expired, incorrect CVV, bank fraud protection.

    **Solution:** Ask customer to verify details or try a different card. Look up the specific decline `Error Code` and its recommended action in the [Transaction Failures](/api-reference/transaction-failures) reference, and see [Handle Payment Failures](/developer-resources/handle-payment-failures) for programmatic handling.
  </Accordion>

  <Accordion title="3DS authentication failed">
    **Causes:** Customer abandoned, bank system unavailable, timeout.

    **Solution:** Retry or ask customer to contact their bank. See [Handling Authentication Failures](#handling-authentication-failures) for the payment states and decline codes involved.
  </Accordion>

  <Accordion title="Card not supported">
    **Causes:** Regional card not supported, prepaid restrictions.

    **Solution:** Customer should try a different card from a major network.
  </Accordion>
</AccordionGroup>

## Related Pages

<CardGroup cols={2}>
  <Card title="Payment Methods Overview" icon="layer-group" href="/features/payment-methods">
    All supported payment methods.
  </Card>

  <Card title="Upsells & Downsells" icon="arrow-up-right-dots" href="/features/upsells-and-downsells">
    One-click purchases with saved cards.
  </Card>

  <Card title="Testing Process" icon="flask" href="/miscellaneous/testing-process">
    Complete testing guide.
  </Card>

  <Card title="Subscriptions" icon="repeat" href="/features/subscription">
    Recurring billing with cards.
  </Card>
</CardGroup>
