Last Updated: 19 February 2025 | Change Log

WeChat Pay

WeChat Pay, officially referred to as Weixin Pay in China, is a mobile payment and digital wallet service.

Note

Make yourself familiar with our API Principles to ensure a resilient integration.

Product Overview

Why use WeChat Pay?

WeChat Pay is a digital wallet allowing your customers to make online or mobile wallet payments. It is considered a vital payment method if you are operating in China.

Feature summary

Payment typeRecurringReversalsPartial ReversalsDisputesAuth and Settlement (Sale)
Digital wallet
  • Maximum Transaction Value: 50.000 CNY
  • Maximum Transaction per consumer wallet per day: 100.000 CNY

Acceptance currencies

CurrencyCurrency codes
Australian DollarAUD
Canadian DollarCAD
Chinese YuanCNY
EuroEUR
Hong Kong DollarHKD
Japanese YenJPY
New Zeland DollarNZD
Pound SterlingGBP
US DollarUSD
Singapore DollarSGD

Acceptance currencies

Get Started

Get started using our API Reference and set your headers.


Request

POST https://try.access.worldpay.com/apmPayments

Example requests

Response
application/json
{ "paymentId": "HZ75WBkfRwmD9YzLSZFnQ--xazN30hqhileEoUF53VKlDSUrxrcX5x_wn93uYUZB26bWaGtSc4n1mbKHCn5p1tAsrh_YcN6kEXom71Xl4C2K6uz6RKmSmP_m7-TgEHezOhzH5eLvBJHPh6ir8ugqJqGjb7dlrQPJ4byuGHVAMZ8", "lastEvent": "pending", "_links": { "self": { "href": "https://try.access.worldpay.com/apmPayments/HZ75WBkfRwmD9YzLSZFnQ--xazN30hqhileEoUF53VKlDSUrxrcX5x_wn93uYUZB26bWaGtSc4n1mbKHCn5p1tAsrh_YcN6kEXom71Xl4C2K6uz6RKmSmP_m7-TgEHezOhzH5eLvBJHPh6ir8ugqJqGjb7dlrQPJ4byuGHVAMZ8" } }, "_actions": {}, "redirect": "https://mock.hpp.worldpay.com/app/hpp/xyz/integration/wpg?Ticket=12345678&OrderKey=blah", "paymentInstrument": { "method": "paypal", "type": "redirect" } }

Parameters

transactionReferencestring[ 1 .. 64 ] characters^[a-zA-Z0-9\-_/!@#$%()*=.:;?\[\]{}~+]*$required
merchantobject(MerchantV2)required
merchant.​entitystring[ 1 .. 32 ] characters^([a-zA-Z0-9]*)$required

Used to route the request in Access Worldpay, created as part of on-boarding.

Example: "default"
instructionobject(InstructionV2)required

Object that contains the payment type and details.

instruction.​methodstringrequired

The type of instrument.

Value"paypal"
Discriminator
instruction.​valueobject(Value)required

The value of the payment.

instruction.​value.​amountinteger(int64)[ 1 .. 2147483647 ]required

The amount in the lowest denomination of the currency e.g. pennies for GBP, cents for USD.

Example: 12
instruction.​value.​currencystringrequired
Enum"AED""AFN""ANG""AOA""ARS""AUD""AWG""AZN""BAM""BBD"
instruction.​narrativeobject(NarrativeBase)required
instruction.​narrative.​line1string[ 1 .. 24 ] characters^[a-zA-Z0-9\\-\\.\\,\\ ]*$required

The description shown on your customer's bank statement for the payment.

Example: "MindPalace"
instruction.​paymentInstrumentobject(PayPalInstrumentV2)required
instruction.​paymentInstrument.​typestringrequired

The type of instruction.

Value"direct"
instruction.​paymentInstrument.​billingAddressobject(PayPalBillingAddressV2)
instruction.​settlementobject(Settlement)

Indicates whether the transaction should be sent for settlement now = true, or later = false at a time of your choosing.

instruction.​resultUrlsobject(ResultUrls)
instruction.​shippingobject(Shipping)
instruction.​customerobject(Customer)

Response

Successful request response

  • an HTTP code 201
  • an id which is unique to the payment - we recommend storing the "id" as this can be used to manage the payment later
  • in redirect field there will be a qrcode in base 64 to display to your customer to complete the payment
  • a link to query the payment status
  • an object which will give flow information such as method (e.g. wechatpay) and type (direct)

Testing

All requests return the same encoded QR code, allowing you to test the synchronous response and the embedding of the QR code image within your checkout page.

Following a short delay test payments will automatically update to authorize once you receive the successful payment response.

Example Response

{
  "paymentId": "HZ75WBkfRwmD9YzLSZFnQ5v2I5ddQFtUqfQjfH6MtZWlDSUrxrcX5x_wn93uYUZBrpxTgfQTxtQsmy9dE_z-m-zZvrP-LeCRz0uWrqdvJK9lFEMgr042IFWuXU4qz5JB5ruD3eXP8P1s6nqEcRq5d-NwnkVtXPzEhC9FQ_77m3c",
  "lastEvent": "pending",
  "_links": {
    "self": {
      "href": "https://try.access.worldpay.com/apmPayments/HZ75WBkfRwmD9YzLSZFnQ5v2I5ddQFtUqfQjfH6MtZWlDSUrxrcX5x_wn93uYUZBrpxTgfQTxtQsmy9dE_z-m-zZvrP-LeCRz0uWrqdvJK9lFEMgr042IFWuXU4qz5JB5ruD3eXP8P1s6nqEcRq5d-NwnkVtXPzEhC9FQ_77m3c"
    }
  },
  "_actions": {},
  "redirect": "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQAAAAB0CZXLAAABdklEQVR4Xu2VS27DMAxE6ZWP4ZvG1E19DK3EzpBKgrhAu+2gGjiCTD0vJvzI4hfZPXDXAkoLKC2gtIDSvwLcoCN6PnGdne+bGtDw68fYAw+AjVgGtYBuCDYYpEeadTtEAXh02My9OoDyO0WBYMmlwWwZ7CsoBTjDR+uvJzE1oNSycWzH+pYQgALz9NXS8qPGshqAluHRDo+BZIEfn40jAXi2fI2vwTnGqtvUgLFfeB1MGbN2svamtAAzWjvTZjJ6QDB+PTJlgyTWj2RJAKPu9NzgtGUR6gGZHTg95yi+6lQLcDRO5wRuT8svRggIvrLk4NFyCETmTgtonUGn2bm52ZQABg1OLJPFtakBjcwxR7Gl9s//QQEoOXKECTaHGFctwGlsZqoFC4+rGkBHGUS/WBp0kmpAt40Ag3AK11t9JQgE70ScHjOiCdAdzD7J7zb/OhBZcmR4m9As7xQxwA1CyXGIOYfw/VqUAH7QAkoLKC2gtIDSAkpfsu6k9bsX4o0AAAAASUVORK5CYII=",
  "paymentInstrument": {
    "method": "wechatpay",
    "type": "direct"
  }
}

Errors

Check out our API reference for the full error code schema.

Manage your WeChat Pay payment