ApplePay Payment API
About 1267 wordsAbout 4 min
Warning
Before reading this API documentation, be sure to check the API Description Guide
Check your device and browser setup
If you can’t see your expected wallet in the demos, your device or browser might not meet the following Apple Pay or Google Pay conditions.
- The wallet must have at least one card.
- You must use a compatible Apple Pay device and Google Pay device.
- You must use a HTTPS of a supported browser for the wallet you’re testing.
- Allow applicable browsers to access your wallet.
- Chrome: Settings > Autofill and passwords > Payment methods > Allow sites to check if you have payment methods saved
- Safari: Settings > Advanced > Allow websites to check for Apple Pay and Apple card
- Don’t use a Chrome incognito window or Safari private window.
- Confirm you’re operating from a supported Apple Pay region and Google Pay region.
- Stripe doesn’t display Apple Pay or Google Pay for IP addresses in India or for Stripe accounts based in India.
- For Apple Pay, confirm your device supports biometric authentication.
Supported browsers
desktop browser versions:
- Chrome 38+
- Safari 10.1+
- Firefox 29+
- Edge 15+
- Opera 25+
mobile browsers:
- iOS Safari 9+ and other browsers and web views which use the system-provided WebKit engine
- Android Chrome 38+
- Samsung Browser 7.1+
Additional Notes
- We require TLS 1.2 to be supported by the browser.
- We require browsers that are sufficiently modern enough that they support Promises in the JavaScript programming language.
- We respond to bug reports but do not proactively test other browsers.
Warning
The following regions are prohibited from use!!!
List of Prohibited Regions
AD-Andorra
AE-United Arab Emirates
AF-Afghanistan
AG-Antigua and Barbuda
AI-Anguilla
AL-Albania
AM-Armenia
AO-Angola
AQ-Antarctica
AR-Argentina
AS-American Samoa
AW-Aruba
AX-Åland Islands
BA-Bosnia and Herzegovina
BB-Barbados
BD-Bangladesh
BF-Burkina Faso
BH-Bahrain
BI-Burundi
BJ-Benin
BL-Saint Barthélemy
BM-Bermuda
BN-Brunei Darussalam
BQ-Bonaire, Sint Eustatius and Saba
BS-Bahamas
BT-Bhutan
BV-Bouvet Island
BW-Botswana
BY-Belarus
BZ-Belize
CC-Cocos (Keeling) Islands
CD-Congo, The Democratic Republic of the
CF-Central African Republic
CG-Congo
CI-Côte d'Ivoire
CK-Cook Islands
CM-Cameroon
CO-Colombia
CU-Cuba
CV-Cabo Verde
CW-Curaçao
CX-Christmas Island
CY-Cyprus
DJ-Djibouti
DM-Dominica
DO-Dominican Republic
DZ-Algeria
EC-Ecuador
EE-Estonia
EG-Egypt
EH-Western Sahara
ER-Eritrea
ET-Ethiopia
FJ-Fiji
FK-Falkland Islands (Malvinas)
FM-Micronesia, Federated States of
FO-Faroe Islands
GA-Gabon
GD-Grenada
GE-Georgia
GF-French Guiana
GG-Guernsey
GH-Ghana
GI-Gibraltar
GL-Greenland
GM-Gambia
GN-Guinea
GP-Guadeloupe
GQ-Equatorial Guinea
GS-South Georgia and the South Sandwich Islands
GT-Guatemala
GW-Guinea-Bissau
HK-Hong Kong
HM-Heard Island and McDonald Islands
HN-Honduras
HT-Haiti
ID-Indonesia
IL-Israel
IM-Isle of Man
IN-India
IO-British Indian Ocean Territory
IQ-Iraq
IR-Iran, Islamic Republic of
JM-Jamaica
JO-Jordan
JP-Japan
KE-Kenya
KH-Cambodia
KI-Kiribati
KM-Comoros
KN-Saint Kitts and Nevis
KP-Korea, Democratic People's Republic of
KR-Korea, Republic of
KW-Kuwait
KY-Cayman Islands
KZ-Kazakhstan
LA-Lao People's Democratic Republic
LB-Lebanon
LC-Saint Lucia
LI-Liechtenstein
LK-Sri Lanka
LR-Liberia
LS-Lesotho
LV-Latvia
LY-Libya
MD-Moldova, Republic of
ME-Montenegro
MF-Saint Martin (French part)
MG-Madagascar
MH-Marshall Islands
MK-North Macedonia
ML-Mali
MM-Myanmar
MN-Mongolia
MP-Northern Mariana Islands
MQ-Martinique
MR-Mauritania
MS-Montserrat
MU-Mauritius
MV-Maldives
MW-Malawi
MY-Malaysia
MZ-Mozambique
NA-Namibia
NC-New Caledonia
NE-Niger
NF-Norfolk Island
NG-Nigeria
NI-Nicaragua
NP-Nepal
NR-Nauru
NU-Niue
OM-Oman
PA-Panama
PE-Peru
PF-French Polynesia
PG-Papua New Guinea
PH-Philippines
PK-Pakistan
PM-Saint Pierre and Miquelon
PN-Pitcairn
PR-Puerto Rico
PS-Palestine, State of
PW-Palau
RE-Réunion
RU-Russian Federation
RW-Rwanda
SA-Saudi Arabia
SB-Solomon Islands
SC-Seychelles
SD-Sudan
SH-Saint Helena, Ascension and Tristan da Cunha
SJ-Svalbard and Jan Mayen
SK-Slovakia
SL-Sierra Leone
SM-San Marino
SN-Senegal
SO-Somalia
SR-Suriname
SS-South Sudan
ST-Sao Tome and Principe
SV-El Salvador
SX-Sint Maarten (Dutch part)
SY-Syrian Arab Republic
SZ-Eswatini
TC-Turks and Caicos Islands
TD-Chad
TF-French Southern Territories
TG-Togo
TH-Thailand
TK-Tokelau
TL-Timor-Leste
TM-Turkmenistan
TN-Tunisia
TO-Tonga
TR-Türkiye
TT-Trinidad and Tobago
TV-Tuvalu
TW-Taiwan, Province of China
TZ-Tanzania, United Republic of
UA-Ukraine
UG-Uganda
UM-United States Minor Outlying Islands
UY-Uruguay
UZ-Uzbekistan
VA-Holy See (Vatican City State)
VC-Saint Vincent and the Grenadines
VE-Venezuela, Bolivarian Republic of
VG-Virgin Islands, British
VI-Virgin Islands, U.S.
VN-Viet Nam
VU-Vanuatu
WF-Wallis and Futuna
WS-Samoa
YE-Yemen
YT-Mayotte
ZA-South Africa
ZM-Zambia
ZW-Zimbabwe
Transaction Limits
Transaction Type | Limit (Unit: USD) |
---|---|
Collection | 0.99-1000 |
Collection API
Collection Request
Brief Description:
- Create a collection order
URL:
USD: /usd/collect/apply
Note: appId in USD, amount in USD, actual settlement in USD
Parameters:
Parameter Name | Required | Type | Description |
---|---|---|---|
appId | Yes | Long | Business ID (obtained from the backend, corresponding to the currency in the URL) |
orderId | Yes | String | Merchant order number (must be unique, length not exceeding 48) |
name | Yes | String | User's full name, real name is recommended. Format: firstName and lastName separated by a space, e.g., Donald John Trump |
phone | Yes | String | Real mobile number (format reference Phone Number Format) |
Yes | String | Real email address | |
amount | Yes | String | Transaction amount (accurate to two decimal places; no punctuation, e.g., ",") |
payType | Yes | String | EWALLET |
inBankCode | Yes | String | APPLE_PAY |
callBackUrl | Yes | String | Redirect URL after successful user payment |
callBackFailUrl | Yes | String | Redirect URL after failed user payment |
notifyUrl | No | String | Callback URL |
subject | Yes | String | Payment memo |
body | No | String | Memo details |
partnerUserId | Yes | String | Unique user ID (e.g., userId), used for the risk control system. Must be real and valid, otherwise it will affect transactions. Format requirements: numbers, uppercase and lowercase letters, or common symbols -~!@#$%&*()_ |
sign | Yes | String | Signature |
Return data parameter description
Parameter Name | Type | Description |
---|---|---|
orderId | String | Merchant order number (must be unique) |
orderNo | String | Platform order number |
payUrl | String | Payment link |
sign | String | Signature |
Collection Query
Brief Description:
- Query a collection order
URL:
USD: /usd/collect/query
Parameters:
Parameter Name | Required | Type | Description |
---|---|---|---|
appId | Yes | Long | Business ID (obtained from the backend, corresponding to the currency in the URL) |
orderId | Yes | String | Merchant order number |
orderNo | No | String | Platform order number (faster response) |
sign | Yes | String | Signature |
Return data parameter description
Parameter Name | Type | Description |
---|---|---|
orderId | String | Merchant order number (must be unique) |
orderNo | String | Platform order number |
amount | String | Transaction amount |
actualAmount | String | Amount received |
fee | String | Fee |
status | Integer | Status (0 not started, 1 in payment, 2 success (final state), 3 failed (final state), -1 abnormal pending confirmation) |
payTime | String | Payment success time (only available when status=2) (local time), Format: yyyy-MM-dd HH:mm:ss |
errorMsg | String | Payment failure reason (only available when status=3) |
sign | String | Signature |