Paytend Pay API provides acquiring merchants with a convenient and fast access method to connect to the Paytend payment gateway to support multiple payment methods. These payment methods include major bank card payments such as Mastercard, Visa, UPI, Discover, American Express (AM), as well as various local payment methods (APM), such as WeChat Pay, UnionPay Pay, and cryptocurrency payments. Way. Through the Paytend Pay API, merchants can easily expand payment options and provide more convenient payment methods to their customers.
Paytend Pay API supports multiple payment methods, including but not limited to the following:
Paytend Pay API provides the following main functions for merchants to easily access and manage payment methods:
Embedded Payment Forms allow you to securely process payment details on your website while maintaining compliance with industry standards. Customers can input their card details directly into a secure form, and the system will generate a token representing the payment information. This token can then be used to process the payment request.
Who Should Use Embedded Payment Forms?
Embedded Payment Forms are ideal for businesses that:
How It Works
What Is Tokenization?
Tokenization is the process of securely collecting sensitive payment details and converting them into a short-term, single-use token. This token represents the payment information without exposing the sensitive data. Since the service provider handles all sensitive information, PCI compliance is managed on their end. You use the token to initiate payments through a unified API.
Instructions for Integration
This solution helps you simplify payment acceptance while maintaining security and compliance.
Detailed access and integration documentation will be provided on the Paytend official website, including information such as API endpoints, authentication, request examples, and response examples. Merchants can access according to the documents and customize the integration according to their needs.
Communication Method
Communicate using HTTPS, the message format is JSON
Character Set
Messages are uniformly encoded in UTF-8
bizData:
Encrypted by randomly generated AES KEY.randomKey:
AES KEY is encrypted by Paytend public key.signature:
The signature source string is composed of all non-empty field contents except the signature field, sorted according to the ASCII code of the message field, and connected with the "&" symbol in the manner of "field name = field value".{
"randomKey":"qeM/mnvepEv5MFe7n77brQ==",
"requestId":"20231025102930718",
"signType":"RSA",
"bizData":{
"mobile":"13261402222",
"type":"1"
},
"partnerId":"888666000100260",
"version":"2.0"
}
The signature source string signature is as follows. The signature source string uses the partner RSA private key signature to generate the signature.
bizData={"mobile":"8613261402222","type":"1"}&partnerId=888666000100260&randomKey=gNx86vc1yttHs8ZWOf7+5g==&requestId=20231025095118321&signType=RSA&version=2.0
SHA256withRSA
.117
.128
.signature
field in the request data is generated by the Partner RSA private key signature.signature
field in the response data is generated by the Paytend RSA private key signature.randomKey
and bizData
plain text participate in the signature.Cardholder ID: EEA region supports passport or ID card. Other regions only support passport. Cardholder photo information must correspond to cardholder information (idnoType).
Payment.
Cancel. Cancellation can be initiated within 24 hours. UnionPay transactions can be canceled before 23:00 Beijing time on the same day.
Refund. Partial returns can be initiated.
Submit logistics information
Upload logistics file
request
object (OrderCancel_BizData) | |
requestId required | string = 32 characters Request serial number, globally unique. |
partnerId required | string = 15 characters Assigned by paytend. |
randomKey | string AES key |
signType required | string Fixed value RSA. |
signature | string Signed by partner RSA private key. |
version required | string Fixed value 2.0. |
respCode required | string Response code. |
respMsg | string Response message. |
object (OrderCancelResponse) | |
randomKey | string AES key. |
signType required | string Fixed value RSA. |
signature | string Signed by paytend RSA private key. |
{- "bizData": {
- "merchantId": "string",
- "orderNo": "stringstringstri",
- "origTransOrderNo": "stringstringstri"
}, - "requestId": "stringstringstringstringstringst",
- "partnerId": "stringstringstr",
- "randomKey": "string",
- "signType": "string",
- "signature": "string",
- "version": "string"
}
{- "respCode": "string",
- "respMsg": "string",
- "respData": {
- "merchantId": "string",
- "orderNo": "string",
- "origTransOrderNo": "stringstringstri",
- "paytendOrderNo": "string",
- "transactionStatus": 0
}, - "randomKey": "string",
- "signType": "string",
- "signature": "string"
}
request
object (Order_BizData) | |
requestId required | string = 32 characters Request serial number, globally unique. |
partnerId required | string = 15 characters Assigned by paytend. |
randomKey | string AES key |
signType required | string Fixed value RSA. |
signature | string Signed by partner RSA private key. |
version required | string Fixed value 2.0. |
respCode required | string Response code. |
respMsg | string Response message. |
object (OrderResponse) | |
randomKey | string AES key. |
signType required | string Fixed value RSA. |
signature | string Signed by paytend RSA private key. |
{- "bizData": {
- "merchantId": "string",
- "orderNo": "stringstringstri"
}, - "requestId": "stringstringstringstringstringst",
- "partnerId": "stringstringstr",
- "randomKey": "string",
- "signType": "string",
- "signature": "string",
- "version": "string"
}
{- "respCode": "string",
- "respMsg": "string",
- "respData": {
- "transactionStatus": 0,
- "transactionStatusMsg": "string",
- "channelResponseCode": "string",
- "merchantId": "string",
- "orderNo": "stringstringstri",
- "amount": 0,
- "currency": "str",
- "paytendOrderNo": "string",
- "completeDate": "string",
- "cavv": "string",
- "eci": "string"
}, - "randomKey": "string",
- "signType": "string",
- "signature": "string"
}
This interface bizData does not require encryption and is transmitted in plain text.
request
required | object (MerchantBindingDevices_BizData) |
requestId required | string = 32 characters Request serial number, globally unique. |
partnerId required | string = 15 characters Assigned by paytend. |
randomKey | string AES key |
signType required | string Fixed value RSA. |
signature | string Signed by partner RSA private key. |
version required | string Fixed value 2.0. |
respCode required | string Response code. |
respMsg | string Response message. |
object (MerchantBindingDevicesResponse) | |
randomKey | string AES key. |
signType required | string Fixed value RSA. |
signature | string Signed by paytend RSA private key. |
{- "bizData": {
- "paytendNo": "string",
- "merchantPublicKey": "string"
}, - "requestId": "stringstringstringstringstringst",
- "partnerId": "stringstringstr",
- "randomKey": "string",
- "signType": "string",
- "signature": "string",
- "version": "string"
}
{- "respCode": "string",
- "respMsg": "string",
- "respData": {
- "paytendPublicKey": "string",
- "merchantId": "string"
}, - "randomKey": "string",
- "signType": "string",
- "signature": "string"
}
request
required | object (Micropay_BizData) |
requestId required | string = 32 characters Request serial number, globally unique. |
partnerId required | string = 15 characters Assigned by paytend. |
randomKey | string AES key |
signType required | string Fixed value RSA. |
signature | string Signed by partner RSA private key. |
version required | string Fixed value 2.0. |
respCode required | string Response code. |
respMsg | string Response message. |
object (MicropayResponse) | |
randomKey | string AES key. |
signType required | string Fixed value RSA. |
signature | string Signed by paytend RSA private key. |
{- "bizData": {
- "merchantId": "string",
- "channelType": 1,
- "orderNo": "stringstringstri",
- "amount": 0,
- "currency": "str",
- "authCode": "string",
- "body": "string"
}, - "requestId": "stringstringstringstringstringst",
- "partnerId": "stringstringstr",
- "randomKey": "string",
- "signType": "string",
- "signature": "string",
- "version": "string"
}
{- "respCode": "string",
- "respMsg": "string",
- "respData": {
- "transactionStatus": 0,
- "transactionStatusMsg": "string",
- "merchantId": "string",
- "orderNo": "string",
- "amount": 0,
- "currency": "string",
- "remark": "string",
- "completeDate": "string"
}, - "randomKey": "string",
- "signType": "string",
- "signature": "string"
}
request
required | object (Payment_BizData) |
requestId required | string = 32 characters Request serial number, globally unique. |
partnerId required | string = 15 characters Assigned by paytend. |
randomKey | string AES key |
signType required | string Fixed value RSA. |
signature | string Signed by partner RSA private key. |
version required | string Fixed value 2.0. |
respCode required | string Response code. |
respMsg | string Response message. |
object (PaymentResponse) | |
randomKey | string AES key. |
signType required | string Fixed value RSA. |
signature | string Signed by paytend RSA private key. |
{- "bizData": {
- "merchantId": "string",
- "orderNo": "stringstringstri",
- "webOrderNo": "stringstringstri",
- "amount": 0,
- "currency": "str",
- "cardToken": "string",
- "cardType": 0,
- "cardNo": "stringstringst",
- "cvv": "str",
- "expiryDate": "string",
- "holderName": "string",
- "firstName": "string",
- "lastName": "string",
- "recipientBirth": "string",
- "mobile": "stringst",
- "email": "stringst",
- "ip": "strings",
- "goodsDesc": "string",
- "billingAddress": {
- "addressLine": "stringstri",
- "addressLine2": "stringstri",
- "city": "string",
- "state": "str",
- "postcode": "string",
- "countryCode": "st"
}, - "masterCard3DS": 0,
- "websiteId": "string",
- "notificationURL": "string",
- "returnURL": "string",
- "recurringPay": {
- "recurringId": "string",
- "recurringEndDate": "string",
- "recurringFrequency": "string"
}
}, - "requestId": "stringstringstringstringstringst",
- "partnerId": "stringstringstr",
- "randomKey": "string",
- "signType": "string",
- "signature": "string",
- "version": "string"
}
{- "respCode": "string",
- "respMsg": "string",
- "respData": {
- "transactionStatus": 0,
- "transactionStatusMsg": "string",
- "merchantId": "string",
- "orderNo": "string",
- "paytendOrderNo": "string",
- "amount": 0,
- "currency": "string",
- "goodsDesc": "string",
- "paymentURL": "string",
- "completeDate": "string"
}, - "randomKey": "string",
- "signType": "string",
- "signature": "string"
}
request
object (Refund_BizData) | |
requestId required | string = 32 characters Request serial number, globally unique. |
partnerId required | string = 15 characters Assigned by paytend. |
randomKey | string AES key |
signType required | string Fixed value RSA. |
signature | string Signed by partner RSA private key. |
version required | string Fixed value 2.0. |
respCode required | string Response code. |
respMsg | string Response message. |
object (RefundResponse) | |
randomKey | string AES key. |
signType required | string Fixed value RSA. |
signature | string Signed by paytend RSA private key. |
{- "bizData": {
- "merchantId": "string",
- "orderNo": "stringstringstri",
- "origTransOrderNo": "stringstringstri",
- "refundAmount": 0,
- "refundReason": "string"
}, - "requestId": "stringstringstringstringstringst",
- "partnerId": "stringstringstr",
- "randomKey": "string",
- "signType": "string",
- "signature": "string",
- "version": "string"
}
{- "respCode": "string",
- "respMsg": "string",
- "respData": {
- "refundStatus": 0,
- "refundStatusMsg": "string",
- "merchantId": "string",
- "orderNo": "string",
- "origTransOrderNo": "string",
- "paytendOrderNo": "string",
- "refundAmount": 0
}, - "randomKey": "string",
- "signType": "string",
- "signature": "string"
}
request
object (Logistics_BizData) | |
requestId required | string = 32 characters Request serial number, globally unique. |
partnerId required | string = 15 characters Assigned by paytend. |
randomKey | string AES key |
signType required | string Fixed value RSA. |
signature | string Signed by partner RSA private key. |
version required | string Fixed value 2.0. |
respCode required | string Response code. |
respMsg | string Response message. |
respData | object Business data. |
randomKey | string AES key. |
signType required | string Fixed value RSA. |
signature | string Signed by paytend RSA private key. |
{- "bizData": {
- "merchantId": "string",
- "orderNo": "stringstringstri",
- "businessType": 0,
- "logisticsCorporation": "string",
- "logisticsOrderNo": "stringstringstri",
- "goodsDesc": "string",
- "goodsNumber": 0,
- "deliveryDate": "stringstri",
- "shippingAddress": "stringstri"
}, - "requestId": "stringstringstringstringstringst",
- "partnerId": "stringstringstr",
- "randomKey": "string",
- "signType": "string",
- "signature": "string",
- "version": "string"
}
{- "respCode": "string",
- "respMsg": "string",
- "respData": { },
- "randomKey": "string",
- "signType": "string",
- "signature": "string"
}
request
required | object (UnifiedOrder_BizData) |
requestId required | string = 32 characters Request serial number, globally unique. |
partnerId required | string = 15 characters Assigned by paytend. |
randomKey | string AES key |
signType required | string Fixed value RSA. |
signature | string Signed by partner RSA private key. |
version required | string Fixed value 2.0. |
respCode required | string Response code. |
respMsg | string Response message. |
object (UnifiedOrderResponse) | |
randomKey | string AES key. |
signType required | string Fixed value RSA. |
signature | string Signed by paytend RSA private key. |
{- "bizData": {
- "merchantId": "string",
- "orderNo": "stringstringstri",
- "channelType": 1,
- "amount": 0,
- "currency": "str",
- "tradeType": "string",
- "openid": "string",
- "subAppid": "string",
- "subOpenid": "string",
- "body": "string",
- "notifyURL": "string",
- "returnURL": "string",
- "userAgent": "string"
}, - "requestId": "stringstringstringstringstringst",
- "partnerId": "stringstringstr",
- "randomKey": "string",
- "signType": "string",
- "signature": "string",
- "version": "string"
}
{- "respCode": "string",
- "respMsg": "string",
- "respData": {
- "transactionStatus": 0,
- "transactionStatusMsg": "string",
- "merchantId": "string",
- "orderNo": "string",
- "amount": 0,
- "currency": "string",
- "remark": "string",
- "codeValue": "string",
- "appid": "string",
- "wechatMerchantId": "string",
- "prepayId": "string",
- "timeStamp": "string",
- "nonceStr": "string",
- "extensions": "string",
- "signType": "string",
- "paySign": "string"
}, - "randomKey": "string",
- "signType": "string",
- "signature": "string"
}
request
object (LogisticsFile_BizData) | |
requestId required | string = 32 characters Request serial number, globally unique. |
partnerId required | string = 15 characters Assigned by paytend. |
randomKey | string AES key |
signType required | string Fixed value RSA. |
signature | string Signed by partner RSA private key. |
version required | string Fixed value 2.0. |
respCode required | string Response code. |
respMsg | string Response message. |
respData | object Business data. |
randomKey | string AES key. |
signType required | string Fixed value RSA. |
signature | string Signed by paytend RSA private key. |
{- "bizData": {
- "merchantId": "string",
- "orderNo": "stringstringstri",
- "fileContent": "string",
- "fileURL": "string",
- "suffix": "string",
- "fileDesc": "string"
}, - "requestId": "stringstringstringstringstringst",
- "partnerId": "stringstringstr",
- "randomKey": "string",
- "signType": "string",
- "signature": "string",
- "version": "string"
}
{- "respCode": "string",
- "respMsg": "string",
- "respData": { },
- "randomKey": "string",
- "signType": "string",
- "signature": "string"
}
request
required | object (PostCancel_BizData) |
requestId required | string = 32 characters Request serial number, globally unique. |
partnerId required | string = 15 characters Assigned by paytend. |
randomKey | string AES key |
signType required | string Fixed value RSA. |
signature | string Signed by partner RSA private key. |
version required | string Fixed value 2.0. |
respCode required | string Response code. |
respMsg | string Response message. |
object (PosCancelResponse) | |
randomKey | string AES key. |
signType required | string Fixed value RSA. |
signature | string Signed by paytend RSA private key. |
{- "bizData": {
- "merchantId": "string",
- "orderNo": "stringstringstri",
- "terminalNo": "string",
- "transactionId": "string",
- "amount": "string"
}, - "requestId": "stringstringstringstringstringst",
- "partnerId": "stringstringstr",
- "randomKey": "string",
- "signType": "string",
- "signature": "string",
- "version": "string"
}
{- "respCode": "string",
- "respMsg": "string",
- "respData": {
- "authorizationResponseCode": "string",
- "transactionId": "string",
- "message": "string"
}, - "randomKey": "string",
- "signType": "string",
- "signature": "string"
}
request
required | object (Consume_BizData) |
requestId required | string = 32 characters Request serial number, globally unique. |
partnerId required | string = 15 characters Assigned by paytend. |
randomKey | string AES key |
signType required | string Fixed value RSA. |
signature | string Signed by partner RSA private key. |
version required | string Fixed value 2.0. |
respCode required | string Response code. |
respMsg | string Response message. |
object (ConsumeResponse) | |
randomKey | string AES key. |
signType required | string Fixed value RSA. |
signature | string Signed by paytend RSA private key. |
{- "bizData": {
- "merchantId": "string",
- "orderNo": "stringstringstri",
- "terminalNo": "string",
- "amountAuthorizedNumeric": "string",
- "applicationCryptogram": "string",
- "applicationExpirationDate": "string",
- "applicationInterchangeProfile": "string",
- "applicationPAN": "string",
- "applicationPANSequenceNumber": "string",
- "applicationTransactionCounter": "string",
- "applicationUsageControl": "string",
- "applicationVersionNumberReader": "string",
- "cryptogramInformationData": "string",
- "cvmResults": "string",
- "issuerApplicationData": "string",
- "interfaceDeviceSerialNumber": "string",
- "paymentAccountReference": "string",
- "terminalCapabilities": "string",
- "terminalCountryCode": "string",
- "terminalType": "string",
- "terminalVerificationResults": "string",
- "track2EquivalentData": "string",
- "transactionCategoryCode": "string",
- "transactionCurrencyExponent": "string",
- "transactionDate": "string",
- "transactionTime": "string",
- "transactionType": "string",
- "unpredictableNumber": "string",
- "additionalTerminalCapabilities": "string",
- "thirdPartyData": "string",
- "dedicatedFileName": "string",
- "pinData": "string",
- "transactionCurrencyCode": "string",
- "posEntryMode": "string"
}, - "requestId": "stringstringstringstringstringst",
- "partnerId": "stringstringstr",
- "randomKey": "string",
- "signType": "string",
- "signature": "string",
- "version": "string"
}
{- "respCode": "string",
- "respMsg": "string",
- "respData": {
- "authorizationResponseCode": "string",
- "transactionId": "string",
- "message": "string"
}, - "randomKey": "string",
- "signType": "string",
- "signature": "string"
}
request
required | object (PostRefund_BizData) |
requestId required | string = 32 characters Request serial number, globally unique. |
partnerId required | string = 15 characters Assigned by paytend. |
randomKey | string AES key |
signType required | string Fixed value RSA. |
signature | string Signed by partner RSA private key. |
version required | string Fixed value 2.0. |
respCode required | string Response code. |
respMsg | string Response message. |
object (PosRefundResponse) | |
randomKey | string AES key. |
signType required | string Fixed value RSA. |
signature | string Signed by paytend RSA private key. |
{- "bizData": {
- "merchantId": "string",
- "orderNo": "stringstringstri",
- "terminalNo": "string",
- "transactionId": "string",
- "amount": "string"
}, - "requestId": "stringstringstringstringstringst",
- "partnerId": "stringstringstr",
- "randomKey": "string",
- "signType": "string",
- "signature": "string",
- "version": "string"
}
{- "respCode": "string",
- "respMsg": "string",
- "respData": {
- "authorizationResponseCode": "string",
- "transactionId": "string",
- "message": "string"
}, - "randomKey": "string",
- "signType": "string",
- "signature": "string"
}
The notification URL is the field notificationURL in the request parameter of the 'Web payment' interface.
notify
required | object (PaymentResult_Context) |
partnerId required | string Assigned by paytend. |
notifyType required | string
|
randomKey | string AES key. |
signature required | string Signed by partner RSA private key. |
signType required | string Fixed value RSA. |
version required | string Fixed value 2.0. |
msg | string Business description. |
status | string Status. |
{- "content": {
- "transactionStatus": 0,
- "transactionStatusMsg": "string",
- "channelResponseCode": "string",
- "merchantId": "string",
- "orderNo": "stringstringstri",
- "amount": 0,
- "currency": "str",
- "paytendOrderNo": "string",
- "completeDate": "string",
- "cavv": "string",
- "eci": "string"
}, - "partnerId": "string",
- "notifyType": "string",
- "randomKey": "string",
- "signature": "string",
- "signType": "string",
- "version": "string"
}
{- "msg": "string",
- "status": "string"
}