> For the complete documentation index, see [llms.txt](https://docs.commercelayer.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.commercelayer.io/data-model/payments-and-tax/payment-gateways.md).

# Payment gateways

Supported payment gateway types and how to assign them to markets

<figure><img src="https://3374657681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlDfS8CZ2kCfiwsAPFyWM%2Fuploads%2FVpiPYyMsBFbBst8m4GWL%2Fpayment-gateway.jpg?alt=media&amp;token=ce0116e3-6df8-4b5c-bdea-6bed6057bf92" alt=""><figcaption></figcaption></figure>

{% hint style="info" icon="lightbulb" %}
Three gateway types — PSD2-ready, external, and manual — can be connected to markets, giving you full control over payment processing per business context.
{% endhint %}

## How payment gateways work

[Payment gateways](/core-api-reference/payment_gateways.md) allow you to process payments through Commerce Layer's API safely. You can connect different gateways to different markets via the available payment methods. Commerce Layer currently supports PSD2-ready gateways, custom external gateways, and manual gateways.

{% hint style="success" %}
Commerce Layer payments are **idempotent**. Order and payment statuses are guaranteed to remain consistent across multiple updates throughout the whole payment process.
{% endhint %}

Taxes are automatically calculated at checkout based on the price list associated with the market.

### PSD2-ready gateways

[PSD2-ready gateways](/how-tos/placing-orders/payments.md) are compliant with the PSD2 European regulation, which applies to all credit card payments. They allow you to implement a payment flow that supports SCA (Strong Customer Authentication) and 3DS2 (3D Secure 2) using the gateway's official SDK. Commerce Layer is currently integrated with some of the most popular payment gateways — **Adyen**, **Axerve**, **Braintree**, **Checkout.com**, **Klarna**, **PayPal**, **Satispay**, and **Stripe** — all PSD2-compliant.

### External payment gateways

[External payment gateways](/core/external-resources/external-payment-gateways.md) allow you to set up and configure payment gateways not integrated with Commerce Layer by default.

You can create an external payment gateway and define custom endpoints responding to the following actions:

* **Authorization** — to authorize a payment source.
* **Capture** — to capture an authorization.
* **Void** — to cancel a payment authorization.
* **Refund** — to refund a captured payment, either totally or partially.
* **Customer token** — to create a customer payment token.

The external endpoint is responsible for the integration with the payment gateway. The payment source associated with the order must be an external payment.

### Manual payment gateways

[Manual payment gateways](/core-api-reference/manual_gateways.md) are useful for processing wire transfers, cash payments, and other kinds of manual payments. This gateway type is associated with orders as their payment source type. Payments with manual gateways are always authorized.


---

# 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.commercelayer.io/data-model/payments-and-tax/payment-gateways.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.
