> For the complete documentation index, see [llms.txt](https://docs.hyperswitch.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperswitch.io/integrations/connectors-integrations/payment-processor-capabilities/available-connectors/trustpay.md).

# TrustPay

Accept card, network token, bank redirect, bank transfer, and wallet payments through TrustPay.

<div align="left"><img src="https://hyperswitch.io/icons/homePageIcons/logos/trustpayLogo.svg" alt=""></div>

TrustPay is a payment gateway for cards, network tokens, bank redirects, bank transfers, and digital wallets. Every declared method supports refunds and does not support mandates. Cards run without 3DS, while network tokens support optional 3DS. Webhooks cover payment, refund, and dispute updates.

### Status and capabilities

**Integration status:** live

**Category:** payment gateway

**Webhook flows:** disputes, payments, refunds

| Payment method | Type                          | Mandates      | Refunds   | Capture methods                 | 3DS                 | Card networks                                                                                       | Countries                    | Currencies    |
| -------------- | ----------------------------- | ------------- | --------- | ------------------------------- | ------------------- | --------------------------------------------------------------------------------------------------- | ---------------------------- | ------------- |
| bank redirect  | BLIK                          | not supported | supported | automatic, sequential automatic | not applicable      | -                                                                                                   | -                            | -             |
| bank redirect  | EPS                           | not supported | supported | automatic, sequential automatic | not applicable      | -                                                                                                   | -                            | -             |
| bank redirect  | Giropay                       | not supported | supported | automatic, sequential automatic | not applicable      | -                                                                                                   | -                            | -             |
| bank redirect  | iDEAL                         | not supported | supported | automatic, sequential automatic | not applicable      | -                                                                                                   | -                            | -             |
| bank redirect  | Sofort                        | not supported | supported | automatic, sequential automatic | not applicable      | -                                                                                                   | -                            | -             |
| bank transfer  | Instant Bank Transfer         | not supported | supported | automatic, sequential automatic | not applicable      | -                                                                                                   | AUT, CZE, DEU, GBR, ITA, SVK | CZK, EUR, GBP |
| bank transfer  | Instant Bank Transfer Finland | not supported | supported | automatic, sequential automatic | not applicable      | -                                                                                                   | FIN                          | EUR           |
| bank transfer  | Instant Bank Transfer Poland  | not supported | supported | automatic, sequential automatic | not applicable      | -                                                                                                   | POL                          | PLN           |
| bank transfer  | SEPA Bank Transfer            | not supported | supported | automatic, sequential automatic | not applicable      | -                                                                                                   | -                            | -             |
| card           | Credit Card                   | not supported | supported | automatic, sequential automatic | not supported       | American Express, Cartes Bancaires, Diners Club, Discover, Interac, JCB, Mastercard, UnionPay, Visa | -                            | -             |
| card           | Debit Card                    | not supported | supported | automatic, sequential automatic | not supported       | American Express, Cartes Bancaires, Diners Club, Discover, Interac, JCB, Mastercard, UnionPay, Visa | -                            | -             |
| network token  | Network Token                 | not supported | supported | automatic, sequential automatic | supported, optional | American Express, Cartes Bancaires, Diners Club, Discover, Interac, JCB, Mastercard, UnionPay, Visa | -                            | -             |
| wallet         | Apple Pay                     | not supported | supported | automatic, sequential automatic | not applicable      | -                                                                                                   | -                            | -             |
| wallet         | Google Pay                    | not supported | supported | automatic, sequential automatic | not applicable      | -                                                                                                   | -                            | -             |

### Authentication

Supply an API Key, Project ID, and Secret Key in the connector configuration. Card and wallet requests send `X-API-Key: <API key>`. Bank redirect and bank transfer flows first send `Authorization: Basic <base64 project ID and secret key>` to obtain an access token, then send `Authorization: Bearer <access token>` on payment requests. See [`TrustpayAuthType::try_from()`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs#L64-L87), [`build_headers()`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/trustpay.rs#L84-L121), and [`RefreshTokenType::get_headers()`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/trustpay.rs#L276-L302).

### Before you start

1. Register with TrustPay at [trustpay.eu](https://www.trustpay.eu/).
2. Create or sign in to your account in the [Hyperswitch control center](https://app.hyperswitch.io/).
3. Find the API Key, Project ID, and Secret Key in your TrustPay dashboard.
4. Enable the same payment methods in TrustPay that you plan to select in Hyperswitch.
5. Have the credentials listed in [Authentication](#authentication) ready.

To connect TrustPay to your Hyperswitch account, follow [Activate a connector on Hyperswitch](/integrations/connectors-integrations/activate-connector-on-hyperswitch.md), then return here for what TrustPay supports.

### Webhooks

Configure a webhook merchant secret in Hyperswitch; the shared webhook verifier uses that value as the signature key. See [`verify_webhook_source()`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_interfaces/src/webhooks.rs#L266-L301). TrustPay webhooks use HMAC-SHA256 verification: Hyperswitch decodes the hex `signature` in the webhook body, removes that field, sorts the remaining values, and joins them with `/` before verification. See [`get_webhook_source_verification_algorithm()`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/trustpay.rs#L1181-L1218).

The connector handles six status and credit/debit-indicator combinations. An empty body is treated as endpoint verification.

| `creditDebitIndicator` | `status`       | Effect in Hyperswitch        |
| ---------------------- | -------------- | ---------------------------- |
| `CRDT`                 | `Paid`         | Payment is marked successful |
| `CRDT`                 | `Rejected`     | Payment is marked failed     |
| `DBIT`                 | `Paid`         | Refund is marked successful  |
| `DBIT`                 | `Refunded`     | Refund is marked successful  |
| `DBIT`                 | `Rejected`     | Refund is marked failed      |
| `DBIT`                 | `Chargebacked` | Dispute is marked lost       |

The wire values and mappings are defined by [`get_webhook_event_type()`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/trustpay.rs#L1111-L1167) and [`CreditDebitIndicator`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs#L2074-L2091).

### Source reference

[TrustPay connector implementation](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/trustpay.rs) and [TrustPay data mappings](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs)


---

# 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://docs.hyperswitch.io/integrations/connectors-integrations/payment-processor-capabilities/available-connectors/trustpay.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.
