> For the complete documentation index, see [llms.txt](https://docs.mews.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mews.com/booking-engine-guide/booking-engine-api/use-cases/supporting-payment-cards.md).

# Supporting payment cards

When creating a reservation, it is possible to attach a payment card to the reservation. As part of creating your own custom booking engine, you may want to have a form within your application where customers can enter their payment card data and send this data to the Booking Engine API for further use. Payment card data can then be used by Mews for charging the customer. To do that, some Booking Engine API operations support or require [Credit card data](/booking-engine-guide/booking-engine-api/operations/reservation-groups.md#credit-card-data) in the request.

### Where to get `CreditCardData` values

* Confirm that the hotel or property supports PCI Proxy by checking the field [Payment card storage type](/booking-engine-guide/booking-engine-api/operations/hotels.md#payment-card-storage-type) in the configuration data returned from [Get hotels](/booking-engine-guide/booking-engine-api/operations/hotels.md#get-hotels). Also refer to the [Payment gateway](/booking-engine-guide/booking-engine-api/operations/hotels.md#payment-gateway) documentation to see what other API data you could potentially use for your implementation.
* Follow the [PCI Proxy Secure Fields](https://docs.pci-proxy.com/docs/secure-fields) guide to handle the sensitive card data and obtain `PaymentGatewayData`. Use [PublicKey](/booking-engine-guide/booking-engine-api/operations/hotels.md#payment-gateway) as the `merchantId` while implementing PCI Proxy fields.
* The PCI Proxy service will return a `transactionId` in the response which you use as `PaymentGatewayData` inside the [Credit card data](/booking-engine-guide/booking-engine-api/operations/reservation-groups.md#credit-card-data) object.
* Once you have the `PaymentGatewayData`, you can create a payment card by providing [Credit card data](/booking-engine-guide/booking-engine-api/operations/reservation-groups.md#credit-card-data) in the request body.

> **Production environment**: Note PCI Proxy documentation only highlights the sandbox endpoints, used for the staging environment. For the production environment, omit the `sandbox.` part from the address. For example, `https://pay.sandbox.datatrans.com/upp/payment/js/secure-fields-2.0.0.min.js` becomes `https://pay.datatrans.com/upp/payment/js/secure-fields-2.0.0.min.js`.


---

# 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.mews.com/booking-engine-guide/booking-engine-api/use-cases/supporting-payment-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.
