API 传输的每个对象的结构:字段、类型、是否必填以及说明。
下面的模型描述了各端点接受和返回的对象。字段名区分大小写,金额始终以分为单位。
Billing address
| 字段 | 类型 | 必填 | 说明 |
|---|
street | string | 是 | Billing address street |
number | string | 是 | Billing address number |
complement | string | 否 | Billing address complement |
zipCode | string | 是 | Billing address postal code |
city | string | 是 | Billing address city |
state | string | 是 | Billing address state |
country | string | 是 | Billing address country |
district | string | 是 | Billing address district |
Buyer data
| 字段 | 类型 | 必填 | 说明 |
|---|
name | string | 是 | Buyer's full name |
identity | string | 否 | Buyer's identification document number |
identityType | string | 否 | Buyer's identification document type |
email | string | 否 | Buyer's email |
birthdate | string | 否 | Buyer's birthdate |
phone | string | 否 | Buyer's phone number |
address | Address | 否 | |
Buyer data
| 字段 | 类型 | 必填 | 说明 |
|---|
id | number | 否 | Internal buyer identifier |
name | string | 否 | Buyer's full name |
identity | string | 否 | Buyer's identification document number |
identityType | string | 否 | Buyer's identification document type |
email | string | 否 | Buyer's email |
birthdate | string | 否 | Buyer's birthdate |
phone | string | 否 | Buyer's phone number |
address | object | 否 | Billing address |
| 字段 | 类型 | 必填 | 说明 |
|---|
name | string | 是 | Product name |
quantity | number | 是 | Product quantity |
sku | string | 是 | Product SKU (Stock Keeping Unit) |
unitPrice | number | 是 | Product unit price in cents |
Card details
| 字段 | 类型 | 必填 | 说明 |
|---|
number | string | 是 | Credit card number |
holder | string | 是 | Cardholder name as printed on the credit card |
expiration | string | 是 | Credit card expiration date |
cvv | string | 是 | Security code on the back of the credit card |
Details of the card used in the charge
| 字段 | 类型 | 必填 | 说明 |
|---|
id | number | 否 | Internal card identifier |
number | string | 否 | Credit card number |
holder | string | 否 | Cardholder name as printed on the credit card |
expiration | string | 否 | Credit card expiration date |
brand | string | 否 | Card brand. See Brand. 取值: Visa, Master, Elo, Diners, Hipercard |
3DS authentication data performed outside PayZu (external authentication)
| 字段 | 类型 | 必填 | 说明 |
|---|
cavv | string | 是 | Signature returned on successful authentication scenarios |
xid | string | 否 | XID returned in the authentication process |
eci | string | 是 | Electronic Commerce Indicator returned in the authentication process. See ECI table |
version | string | 是 | 3DS version applied in the authentication process |
referenceId | string | 是 | RequestID returned in the authentication process |
Data for the antifraud engine. Required on international charges. See Using Antifraud
| 字段 | 类型 | 必填 | 说明 |
|---|
fingerPrintId | string | 是 | Identifier used to correlate information collected from the buyer's device |
browser | object | 是 | Information about the buyer's browser |
definedFields | object[] | 是 | Merchant Defined Data (MDD). See MDD table |
| 字段 | 类型 | 必填 | 说明 |
|---|
id | number | 否 | Chargeback identifier |
number | string | 否 | Chargeback number at the acquirer |
amount | number | 否 | Chargeback amount in cents |
status | string | 否 | Chargeback status. See Chargeback status list. 取值: RECEIVED, ACCEPTED, DEFENDED |
reasonCode | string | 否 | Reason code provided by the card brand |
reasonDescription | string | 否 | Reason description provided by the card brand |
issuedAt | string | 否 | Chargeback issue date |
createdAt | string | 否 | Record creation date |
updatedAt | string | 否 | Date the record was last updated |
Credit card payment details
| 字段 | 类型 | 必填 | 说明 |
|---|
installments | number | 否 | Number of installments |
authenticate | boolean | 否 | Indicates whether the buyer was redirected to the issuer for 3DS authentication |
currency | string | 否 | Charge currency. See Supported currencies |
acquirerTransactionId | string | 否 | Transaction identifier at the acquirer |
authorizationCode | string | 否 | Authorization code returned by the acquirer |
reasonCode | number | 否 | Reason code of the result. See Transaction status and reasons |
reasonMessage | string | 否 | Reason message of the result. See Transaction status and reasons |
status | integer | 否 | Transaction status. See Transaction status list |
returnCode | string | 否 | Return code from the acquirer. See Error Codes and ABECS return codes |
returnMessage | string | 否 | Return message from the acquirer |
externalAuthentication | object | 否 | External 3DS authentication data, when sent at creation |
reversedAmount | number | 否 | Reversed amount in cents, when a reversal exists |
reversedDate | string | 否 | Reversal date, when present |
chargeId | string | 否 | Charge identifier |
card | CardResponse | 否 | |
chargebacks | Chargeback[] | 否 | Chargebacks linked to the charge |
Recurring payment configuration. The first charge is created immediately; the following cycles are generated automatically. Requires installments equal to 1. See Recurring payments
| 字段 | 类型 | 必填 | 说明 |
|---|
interval | string | 是 | Interval between charges: Monthly or Annual. 取值: Monthly, Annual |
endDate | string | 否 | Recurrence end date in YYYY-MM-DD format. Without it, the recurrence runs indefinitely |
State of a recurrence
| 字段 | 类型 | 必填 | 说明 |
|---|
recurrentPaymentId | string | 否 | Recurrence identifier. Use it on the recurrence query and management endpoints |
interval | string | 否 | Configured interval. 取值: MONTHLY, ANNUAL |
status | string | 否 | Recurrence status. See Recurring payments. 取值: ACTIVE, INACTIVE, ENDED |
amount | number | 否 | Amount of each cycle, in cents |
nextRecurrency | string | 否 | Date of the next automatic charge |
endDate | string | 否 | End date, if provided at creation |
| 字段 | 类型 | 必填 | 说明 |
|---|
id | string | 否 | Charge identifier |
externalId | string | 否 | Unique identifier generated externally |
postbackUrl | string | 否 | Url for notifications about the charge status |
amount | number | 否 | Charge amount in cents |
paymentType | string | 否 | Charge payment type. See Payment types |
createdAt | string | 否 | Charge creation date |
updatedAt | string | 否 | Date the charge was last updated |
customer | CustomerResponse | 否 | |
cart | CartItem[] | 否 | Buyer's cart |
creditCardPayment | CreditCardPaymentResponse | 否 | |
recurrence | Recurrence | 否 | Present when the charge belongs to a recurrence |
recurrenceCycle | integer | 否 | Cycle number of the recurrence this charge belongs to: 0 is the initial charge, 1..n are the automatically generated cycles. Present only on recurrence charges |
| 字段 | 类型 | 必填 | 说明 |
|---|
amount | number | 是 | Charge amount in cents |
customer | CustomerRequest | 是 | |
postbackUrl | string | 否 | Url for notifications about the charge status. See Webhooks |
paymentType | string | 是 | Charge payment type. See Payment types. 取值: creditcard |
cart | CartItem[] | 是 | Buyer's cart |
creditCardPayment | object | 是 | Settings for the payment type: credit card |
recurrence | RecurrenceRequest | 否 | |
externalId | string | 是 | Unique identifier generated externally |
| 字段 | 类型 | 必填 | 说明 |
|---|
code | string | 是 | |
rate | object | 是 | |
| 字段 | 类型 | 必填 | 说明 |
|---|
amount | number | 是 | Converted amount in the target currency, rounded to 2 decimals. |
currency | object | 是 | |