# WeChat Pay

WeChat Pay transactions can be processed via the Saferpay JSON API. However, as WeChat Pay is a third party provider, there are a few things to consider.

## General requirements

The handling of WeChat Pay payments with Saferpay requires:

* A [corresponding license ](https://docs.saferpay.com/home/master/licensing)and thus a valid identification with a username and password for the Saferpay system.
* At least one active Saferpay terminal on which the payment can be carried out. This could be a Saferpay Payment Page or a Saferpay Secure PayGate terminal.
* A valid WeChat Pay contract.&#x20;
  * Make sure, to apply for the H5 permission on WeChat-side, as this is mandatory for mobile payments and the web-to-app switch. If this permission is not granted by their Risk Department, **mobile payments will be rejected**.

{% hint style="warning" %}
Currently, WeChat does not allow the usage of WeChat Pay with the [Secure PayGate](https://docs.saferpay.com/home/interfaces/backoffice/secure-paygate) and is therefore not available in this use-case.
{% endhint %}

{% hint style="info" %}
For WeChat Pay activation on the Saferpay terminal, please contact our[ **customer service** ](https://docs.saferpay.com/home/support#customer-services)
{% endhint %}

### Technical requirements

The general integration of WeChat Pay can only be done via the [Payment Page](https://docs.saferpay.com/home/integration-guide/licences-and-interfaces/payment-page) and requires the following things to be noted:

* JSON API Version 1.40 or later
* **Refund:**&#x20;
  * A refund cannot be cancelled, so make sure that you really want to execute it. Furthermore, in order to execute a refund, the turnover on this day must be greater than or equal to the amount to be refunded. The refunded amount won't be taken from your bank account, instead it will be subtracted from the overall turnover since the last batch close.
  * Note that the **CaptureId**, needed for a refund, is returned as part of the response of [Payment Page Assert](https://saferpay.github.io/jsonapi/#Payment_v1_PaymentPage_Assert).
* The parameter **`OrderId`** is limited to 50 characters.
* The notification URLs, inside the`Notification` conatiner are **mandatory**, in order to avoid missing payment successes. See the [Payment Page process](https://docs.saferpay.com/home/licences-and-interfaces/payment-page#notification.successnotifyurl-and-notification.failnotifyurl) for further information.

### Supported features

| Feature                                                                                                           |                                   Support                                   |
| ----------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------: |
| Capture/Cancel                                                                                                    |                                   ❌**/**❌                                   |
| Multipart Captures                                                                                                |                                      ❌                                      |
| Secure Card Data                                                                                                  |                                      ❌                                      |
| [Refunds](https://docs.saferpay.com/home/integration-guide/licences-and-interfaces/transaction-interface/refunds) | <p>✅</p><p><a href="#integration"><strong>Needs attention!</strong></a></p> |
| Recurring Payments                                                                                                |                                      ❌                                      |
| 3D Secure                                                                                                         |                                      ❌                                      |
| Dynamic Currency Conversion (DCC)                                                                                 |                                      ❌                                      |
| Mail Phone Order                                                                                                  |                                      ❌                                      |
| [Testing](#testing)                                                                                               |                                      ✅                                      |
| [Omni-Channel](https://docs.saferpay.com/home/integration-guide/licences-and-interfaces/omni-channel)             |                                      ✅                                      |

## Testing

Please refer to [this chapter](https://docs.saferpay.com/home/testing-and-go-live#wechat-pay), if you want to test WeChat Pay.


---

# Agent Instructions: 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:

```
GET https://docs.saferpay.com/home/integration-guide/payment-methods/wechat-pay.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
