One-Stop Cross-Border Shopping — Shop the World
UnionPay Content & Service Platform (UCSP) for Channel Partner
UnionPay Content & Service Platform (UCSP) for Service Provider
UnionPay Transportation Solutions
POS Transaction API is steadily getting recognition from institutions for its satisfactory readability and scalability. In order to assist UPI members with POS businesses in an easier manner, UPI has enabled POS Transaction API with JSON message foramt.This API enable Acquirer to initiate and deal with POS Pre-Authorization transaction.
Easier to develop.
Reduce development workload.
When acquirers and merchants involve in UnionPay POS retail business, contactless transportation payment solutions.
1. Acquirer initiates POS transaction to UPI system. (in JSON format).
2.UPI system forwards POS transaction request to issuer.
3.Issuer authorizes the transaction and responds to UPI.
4.UPI forwards transaction response to acquirer (in JSON format).
Field name | Identifier | Type | Length | Request | Default value | Note | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Message ID | msgID | AN | 37 | M:Mandatory | "S00010340001034420171230235959000000" | It is used to match a response to its request. The value must uniquely identify any message that the Acquirer initiates on any day. The value in the response must match the value in the request. Components: “S”+ Acquirer IIN +Forwarding IIN+ Transmission Year (YYYY) + Transmission Date and Time (MMDDhhmmss) + System Trace Audit Number (6 numeric digits) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Acquirer IIN | acquirerIIN | AN | 8 | M:Mandatory | "00010344" | The distinctive value associated to the Acquirer. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Forwarding IIN | forwardingIIN | AN | 8 | M:Mandatory | “00010344” | The Identifier associate to the payment processor.If the transaction is initiated by the Acquirer, this field shall be filled in with Acquirer IIN.If the transaction is initiated by Gateway, PSP, Payment facilitator, etc., this field shall be filled in with the corresponding identifier assigned by UPI. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Local Transaction Date &Time | localTxnDateTime | N | 10 | M:Mandatory | Format: MMDDhhmmss | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Staged Digital Wallet (SDW) ID | sdwID | AN | 8 | C:Conditional | "00010344" | For definition and business cope of SDW, please refer to [UPI OR].It is present if SDW is used to initiate the transaction. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Staged Digital Wallet (SDW) Name | sdwName | ANS | 25 | C:Conditional | For definition and business cope of SDW, please refer to [UPI OR]. It is present if SDW is used to initiate the transaction. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Payment Facilitator ID (PF ID) | pfID | AN | 8 | C:Conditional | The Payment Facilitator ID assigned by UPI. It is present if the transaction is submitted by Merchants registered with the Payment Facilitator, who contracts with the Sending Party as TPSP. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Merchant ID | merchantID | ANS | 1-15 | M:Mandatory | “ABCDE01” | The distinctive value associated to the Merchant. The value must uniquely identify any Merchant of the Acquirer. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Merchant Category Code | mcc | N | 4 | M:Mandatory | Convenience store is represented by "5411". | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Merchant Name | merchantName | ANS | 1-25 | M:Mandatory | "UnionPay International" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Merchant City | merchantCity | ANS | 1-12 | M:Mandatory | "Shanghai" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Merchant Country Code | merchantCountry | N | 3 | M:Mandatory | "156" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Retrieval Reference Number | retrievalReferenceNumber | AN | 12 | M:Mandatory | The Retrieval Reference Number shall be a unique value of the any transactions presented by the acquirer on each settlement day. Format: MMDDhh (first 6 digits of Transmission Date and Time) + System Trace Audit Number (6 numeric digits) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Encrypted Data | encData | Object | M:Mandatory | JWE |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PIN Data | pinData | B | 64 | C:Conditional | “0000011000010010010100111101111111111110110111001011101010011000” | Filled with the cipher text of PIN, which contains 64 bits binary data. PIN in ANSIX9.8 format (with PAN) is encrypted with PIN encryption key and performed with Base64 encoding.It is present upon the business requirement. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PIN Encryption Algorithm | pinEncryptAlg | N | 1 | C:Conditional | “7” | Filled with the digital encryption algorithm to encrypt the PIN. Valid value: “7”: Triple length 3DES algorithm; It is present if the PIN Data exists. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Terminal Information | terminalInfo | Object | M:Mandatory | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Card Information Capture Method | captureMethod | N | 2 | M:Mandatory | "02" | Valid Values: “02”: Magnetic stripe read. "05": Integrated circuit card read, card data reliable (contact). "07": qUICS Debit/Credit Integrated Circuit Card read (contactless). Other values: Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Chip Condition Code | chipCondCode | N | 1 | M:Mandatory | “2” | Valid Values: “0”: Not applicable. “1”: Last read was not a chip transaction or was a successful chip transaction. “2”: Last read at terminal was a chip transaction, but the transaction failed, e.g., chip had been used as the transaction channel yet could not read the application. The terminal read the magnetic stripe instead. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Signature-Only Indicator | sigOnlyIndicator | N | 1 | M:Mandatory | “0” | Valid Values: “0”: Non Signature-based Credit Card Network. “1”: Signature-based Credit Card Network | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Transaction Initiation Mode | trxnInitMode | N | 1 | M:Mandatory | “1” | Valid Values: “0”: Unknown. “1”: Attended transactions that are initiated on attended terminals. “2”: Unattended transactions, including card-present transaction initiated from the Cardholder-activated terminal (CAT), ATM transaction and card-not-present self-service transaction. “3”: Agent transactions that are initiated by the Merchant on behalf of the Cardholder who is not present, like recurring and MO/TO. “4”: Batch Agent transactions that are initiated by the Merchant in batch on behalf of the Cardholder who is not present, like batch recurring and batch MO/TO. “5”: Deferred online authorization, unattended transactions. “6”: Deferred online authorization, attended transactions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Transaction Amount | trxAmt | ANS | 1-13 | M:Mandatory | "101.10" | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. The following are examples of valid Transaction Amounts: "98.73", "98" and "98.". The following are NOT valid Transaction Amounts: "98,73" and "3 705". The value must include the transaction fee amount if it exists. The transaction amount in the response message may be not equal to that in the request message due to discount activity, which will be used in settlement. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Transaction Currency | trxCurrency | N | 3 | M:Mandatory | "156" | A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code of the transaction. The currency also applies to the "discount", "costAmount", and "trxFeeAmt" if they exist. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Transaction Fee Amount | trxFeeAmt | ANS | 1-13 | C:Conditional | "1.10" | The tip or the convenience fee. It is present if the tip or convenience fee exists. |
Filed name | Identifier | Type | Length | Request | Default value | Note | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Message ID | msgID | AN | 37 | R:Returned | "S00010340001034420171230235959000000" | It is used to match a response to its request. The value must uniquely identify any message that the Acquirer initiates on any day. The value in the response must match the value in the request. Components: “S”+ Acquirer IIN +Forwarding IIN+ Transmission Year (YYYY) + Transmission Date and Time (MMDDhhmmss) + System Trace Audit Number (6 numeric digits) | |||||||||||||||||||||||||
Issuer IIN | receivePartyIIN | AN | 8 | M:Mandatory | The identifier associate to the Issuer. | ||||||||||||||||||||||||||
Retrieval Reference Number | retrievalReferenceNumber | AN | 12 | R:Returned | The Retrieval Reference Number shall be a unique value of the any transactions presented by the acquirer on each settlement day. Format: MMDDhh (first 6 digits of Transmission Date and Time) + System Trace Audit Number (6 numeric digits) | ||||||||||||||||||||||||||
Transaction Amount | trxAmt | ANS | 1-13 | M:Mandatory | "101.10" | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. The following are examples of valid Transaction Amounts: "98.73", "98" and "98.". The following are NOT valid Transaction Amounts: "98,73" and "3 705". The value must include the transaction fee amount if it exists. The transaction amount in the response message may be not equal to that in the request message due to discount activity, which will be used in settlement. | |||||||||||||||||||||||||
Transaction Currency | trxCurrency | N | 3 | R:Returned | "156" | A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code of the transaction. The currency also applies to the "discount", "costAmount", and "trxFeeAmt" if they exist. | |||||||||||||||||||||||||
Authorization Identification Response | authCode | AN | 6 | O:Optional | “000000” | The authorization code for the approved transaction assigned by the Issuer. | |||||||||||||||||||||||||
Payment Reference Number (PAR) | par | AN | 29 | C:Conditional | It is present when PAR is available. | ||||||||||||||||||||||||||
Discount Details | discountDetails | Array | O:Optional | [{“discountAmt”:”10”,”discountNote”:”Reduction Discount”}] | The details of discount. The discount information could be displayed to the cardholder in the terminal interface or the receipt printed to the cardholder. | ||||||||||||||||||||||||||
|
Original Amount | originalAmount | ANS | 1-13 | O:Optional | “131.10” | The original amount, which could be displayed to the cardholder in the terminal interface or the receipt printed to the cardholder. | ||||||||||||||||||||||||
Cost Amount | costAmount | ANS | 1-13 | O:Optional | “101.10” | The cost amount after the discount, indicating the amount the Cardholder actually pays for the transaction when a promotion is involved. The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. The cost amount could be displayed to the cardholder in the terminal interface or the receipt printed to the cardholder. | |||||||||||||||||||||||||
Settlement Date | settlementDate | N | 4 | C:Conditional | "1230" | Format: MMDD. It is present if the payment is approved. | |||||||||||||||||||||||||
Cardholder Billing Currency | cardholderBillingCurrency | N | 3 | C:Conditional | “840” | A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code of the card account. It is present if the payment is approved and the "cardholderBillingCurrency" has a different value from "trxCurrency" | |||||||||||||||||||||||||
Cardholder Billing Amount | cardholderBillingAmt | ANS | 1-13 | C:Conditional | “15.17” | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. It is present if the payment is approved and the "cardholderBillingCurrency" has a different value from "trxCurrency" | |||||||||||||||||||||||||
Cardholder Billing Conversion Rate | cardholderBillingConvRate | ANS | 1-9 | C:Conditional | "71212345 " | It is present if the payment is approved and the "cardholderBillingCurrency" has a different value from "trxCurrency". The 1st digit indicates the number position where the decimal point should be moved from the right (allowed values are 0–7). The 2nd-final digits indicate the value of the conversion rate, and are right justified with no decimal point. For example, 71212345 indicates that the conversion rate is 0.1212345 | |||||||||||||||||||||||||
Conversion Date | conversionDate | N | 4 | C:Conditional | "1230" | Format: MMDD. It is present if either "settlementAmt" or “cardholderBillingAmt”exists | |||||||||||||||||||||||||
Message Response | msgResponse | Object | M:Mandatory | ||||||||||||||||||||||||||||
|
Field name | Identifier | Type | Length | Request | Default value | Note | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Message ID | msgID | AN | 37 | M:Mandatory | "S00010340001034420171230235959000000" | It is used to match a response to its request. The value must uniquely identify any message that the Acquirer initiates on any day. The value in the response must match the value in the request. Components: “S”+ Acquirer IIN +Forwarding IIN+ Transmission Year (YYYY) + Transmission Date and Time (MMDDhhmmss) + System Trace Audit Number (6 numeric digits) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Original Message ID | originalMsgID | AN | 37 | M:Mandatory | "S00010340001034420171230235959000000" | It is filled with the “msgID” value of the POS_PREAUTH. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Authorization Identification Response | authCode | AN | 6 | M:Mandatory | “000000” | The value shall be filled with the authorization code obtained in the pre-authorization transaction. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Acquirer IIN | acquirerIIN | AN | 8 | M:Mandatory | "00010344" | The distinctive value associated to the Acquirer. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Forwarding IIN | forwardingIIN | AN | 8 | M:Mandatory | “00010344” | The Identifier associate to the payment processor.If the transaction is initiated by the Acquirer, this field shall be filled in with Acquirer IIN.If the transaction is initiated by Gateway, PSP, Payment facilitator, etc., this field shall be filled in with the corresponding identifier assigned by UPI. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Merchant ID | merchantID | ANS | 1-15 | M:Mandatory | “ABCDE01” | The distinctive value associated to the Merchant. The value must uniquely identify any Merchant of the Acquirer. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Merchant Category Code | mcc | N | 4 | M:Mandatory | Convenience store is represented by "5411". | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Merchant Name | merchantName | ANS | 1-25 | M:Mandatory | "UnionPay International" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Merchant City | merchantCity | ANS | 1-12 | M:Mandatory | "Shanghai" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Merchant Country Code | merchantCountry | N | 3 | M:Mandatory | "156" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Retrieval Reference Number | retrievalReferenceNumber | AN | 12 | M:Mandatory | The Retrieval Reference Number shall be a unique value of the any transactions presented by the acquirer on each settlement day. Format: MMDDhh (first 6 digits of Transmission Date and Time) + System Trace Audit Number (6 numeric digits) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Encrypted Data | encData | Object | M:Mandatory | JWE |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PIN Data | pinData | B | 64 | C:Conditional | “0000011000010010010100111101111111111110110111001011101010011000” | Filled with the cipher text of PIN, which contains 64 bits binary data. PIN in ANSIX9.8 format (with PAN) is encrypted with PIN encryption key and performed with Base64 encoding.It is present upon the business requirement. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PIN Encryption Algorithm | pinEncryptAlg | N | 1 | C:Conditional | “7” | Filled with the digital encryption algorithm to encrypt the PIN. Valid value: “7”: Triple length 3DES algorithm; It is present if the PIN Data exists. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Terminal Information | terminalInfo | Object | M:Mandatory | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Card Information Capture Method | captureMethod | N | 2 | M:Mandatory | "02" | Valid Values: “02”: Magnetic stripe read. "05": Integrated circuit card read, card data reliable (contact). "07": qUICS Debit/Credit Integrated Circuit Card read (contactless). Other values: Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Chip Condition Code | chipCondCode | N | 1 | M:Mandatory | “2” | Valid Values: “0”: Not applicable. “1”: Last read was not a chip transaction or was a successful chip transaction. “2”: Last read at terminal was a chip transaction, but the transaction failed, e.g., chip had been used as the transaction channel yet could not read the application. The terminal read the magnetic stripe instead. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Signature-Only Indicator | sigOnlyIndicator | N | 1 | M:Mandatory | “0” | Valid Values: “0”: Non Signature-based Credit Card Network. “1”: Signature-based Credit Card Network | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Transaction Initiation Mode | trxnInitMode | N | 1 | M:Mandatory | “1” | Valid Values: “0”: Unknown. “1”: Attended transactions that are initiated on attended terminals. “2”: Unattended transactions, including card-present transaction initiated from the Cardholder-activated terminal (CAT), ATM transaction and card-not-present self-service transaction. “3”: Agent transactions that are initiated by the Merchant on behalf of the Cardholder who is not present, like recurring and MO/TO. “4”: Batch Agent transactions that are initiated by the Merchant in batch on behalf of the Cardholder who is not present, like batch recurring and batch MO/TO. “5”: Deferred online authorization, unattended transactions. “6”: Deferred online authorization, attended transactions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Transaction Amount | trxAmt | ANS | 1-13 | M:Mandatory | "101.10" | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. The following are examples of valid Transaction Amounts: "98.73", "98" and "98.". The following are NOT valid Transaction Amounts: "98,73" and "3 705". The value must include the transaction fee amount if it exists. The transaction amount in the response message may be not equal to that in the request message due to discount activity, which will be used in settlement. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Transaction Currency | trxCurrency | N | 3 | M:Mandatory | "156" | A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code of the transaction. The currency also applies to the "discount", "costAmount", and "trxFeeAmt" if they exist. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Transaction Fee Amount | trxFeeAmt | ANS | 1-13 | C:Conditional | "1.10" | The tip or the convenience fee. It is present if the tip or convenience fee exists. |
Filed name | Identifier | Type | Length | Request | Default value | Note | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Message ID | msgID | AN | 37 | R:Returned | "S00010340001034420171230235959000000" | It is used to match a response to its request. The value must uniquely identify any message that the Acquirer initiates on any day. The value in the response must match the value in the request. Components: “S”+ Acquirer IIN +Forwarding IIN+ Transmission Year (YYYY) + Transmission Date and Time (MMDDhhmmss) + System Trace Audit Number (6 numeric digits) | |||||||||||||||||||||||||
Original Message ID | originalMsgID | AN | 37 | R:Returned | "S00010340001034420171230235959000000" | It is filled with the “msgID” value of the POS_PREAUTH. | |||||||||||||||||||||||||
Issuer IIN | receivePartyIIN | AN | 8 | M:Mandatory | The identifier associate to the Issuer. | ||||||||||||||||||||||||||
Retrieval Reference Number | retrievalReferenceNumber | AN | 12 | R:Returned | The Retrieval Reference Number shall be a unique value of the any transactions presented by the acquirer on each settlement day. Format: MMDDhh (first 6 digits of Transmission Date and Time) + System Trace Audit Number (6 numeric digits) | ||||||||||||||||||||||||||
Transaction Amount | trxAmt | ANS | 1-13 | M:Mandatory | "101.10" | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. The following are examples of valid Transaction Amounts: "98.73", "98" and "98.". The following are NOT valid Transaction Amounts: "98,73" and "3 705". The value must include the transaction fee amount if it exists. The transaction amount in the response message may be not equal to that in the request message due to discount activity, which will be used in settlement. | |||||||||||||||||||||||||
Transaction Currency | trxCurrency | N | 3 | R:Returned | "156" | A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code of the transaction. The currency also applies to the "discount", "costAmount", and "trxFeeAmt" if they exist. | |||||||||||||||||||||||||
Authorization Identification Response | authCode | AN | 6 | O:Optional | “000000” | The authorization code for the approved transaction assigned by the Issuer. | |||||||||||||||||||||||||
Payment Reference Number (PAR) | par | AN | 29 | C:Conditional | It is present when PAR is available. | ||||||||||||||||||||||||||
Discount Details | discountDetails | Array | O:Optional | [{“discountAmt”:”10”,”discountNote”:”Reduction Discount”}] | The details of discount. The discount information could be displayed to the cardholder in the terminal interface or the receipt printed to the cardholder. | ||||||||||||||||||||||||||
|
Original Amount | originalAmount | ANS | 1-13 | O:Optional | “131.10” | The original amount, which could be displayed to the cardholder in the terminal interface or the receipt printed to the cardholder. | ||||||||||||||||||||||||
Cost Amount | costAmount | ANS | 1-13 | O:Optional | “101.10” | The cost amount after the discount, indicating the amount the Cardholder actually pays for the transaction when a promotion is involved. The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. The cost amount could be displayed to the cardholder in the terminal interface or the receipt printed to the cardholder. | |||||||||||||||||||||||||
Settlement Date | settlementDate | N | 4 | C:Conditional | "1230" | Format: MMDD. It is present if the payment is approved. | |||||||||||||||||||||||||
Settlement Currency | settlementCurrency | N | 3 | C:Conditional | “840” | A 3-digit numeric value, as defined by [ISO 4217], that indicates acquirer’s settlement currency. It is present if the payment is approved and the "settlementCurrency" has a different value from "trxCurrency" | |||||||||||||||||||||||||
Settlement Amount | settlementAmt | ANS | 1-13 | C:Conditional | “15.17” | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. It is present if the payment is approved and the "settlementCurrency" has a different value from "trxCurrency" | |||||||||||||||||||||||||
Settlement Conversion Rate | settlementConvRate | ANS | 1-9 | C:Conditional | "71212345 " | It is present if the payment is approved and the "settlementCurrency" has a different value from "trxCurrency". The 1st digit indicates the number position where the decimal point should be moved from the right (allowed values are 0–7). The 2nd-final digits indicate the value of the conversion rate, and are right justified with no decimal point. For example, 71212345 indicates that the conversion rate is 0.1212345 | |||||||||||||||||||||||||
Cardholder Billing Currency | cardholderBillingCurrency | N | 3 | C:Conditional | “840” | A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code of the card account. It is present if the payment is approved and the "cardholderBillingCurrency" has a different value from "trxCurrency" | |||||||||||||||||||||||||
Cardholder Billing Amount | cardholderBillingAmt | ANS | 1-13 | C:Conditional | “15.17” | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. It is present if the payment is approved and the "cardholderBillingCurrency" has a different value from "trxCurrency" | |||||||||||||||||||||||||
Cardholder Billing Conversion Rate | cardholderBillingConvRate | ANS | 1-9 | C:Conditional | "71212345 " | It is present if the payment is approved and the "cardholderBillingCurrency" has a different value from "trxCurrency". The 1st digit indicates the number position where the decimal point should be moved from the right (allowed values are 0–7). The 2nd-final digits indicate the value of the conversion rate, and are right justified with no decimal point. For example, 71212345 indicates that the conversion rate is 0.1212345 | |||||||||||||||||||||||||
Conversion Date | conversionDate | N | 4 | C:Conditional | "1230" | Format: MMDD. It is present if either "settlementAmt" or “cardholderBillingAmt”exists | |||||||||||||||||||||||||
Message Response | msgResponse | Object | M:Mandatory | ||||||||||||||||||||||||||||
|
Field name | Identifier | Type | Length | Request | Default value | Note | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Message ID | msgID | AN | 37 | M:Mandatory | "S00010340001034420171230235959000000" | It is used to match a response to its request. The value must uniquely identify any message that the Acquirer initiates on any day. The value in the response must match the value in the request.Components: “S” + Acquirer IIN + Forwarding IIN+ Transmission Year (YYYY) + Transmission Date and Time (MMDDhhmmss) + System Trace Audit Number (6 numeric digits) | |||||||||
Acquirer IIN | acquirerIIN | AN | 8 | M:Mandatory | "00010344" | The distinctive value associated to the Acquirer. | |||||||||
Forwarding IIN | forwardingIIN | AN | 8 | M:Mandatory | “00010344” | The Identifier associate to the payment processor.If the transaction is initiated by the Acquirer, this field shall be filled in with Acquirer IIN.If the transaction is initiated by Gateway, PSP, Payment facilitator, etc., this field shall be filled in with the corresponding identifier assigned by UPI. | |||||||||
Local Transaction Date &Time | localTxnDateTime | N | 10 | M:Mandatory | Format: MMDDhhmmss | ||||||||||
Original Message ID | originalMsgID | AN | 37 | M:Mandatory | "S00010340001034420171230235959000000" | When it is used to cancel purchase transaction, the value shall be the “msgID” value of the POS_PURCHASE.When it is used to cancel pre-authorization transaction, the value shall be the “msgID” value of the POS_PREAUTH.When it is used to cancel pre-authorization completion transaction, the value shall be the “msgID” value of the POS_PREAUTH_COMPLETION. | |||||||||
Encrypted Data | encData | Object | M:Mandatory | JWE |
|||||||||||
|
Authorization Identification Response | authCode | AN | 6 | C:Conditional | “000000” | This field shall be present if it is present in the last related transaction.The value of this field shall be obtained from the response message of the original transaction. | ||||||||
Transaction Amount | trxAmt | ANS | 1-13 | M:Mandatory | "101.10" | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. The following are examples of valid Transaction Amounts: "98.73", "98" and "98.". The following are NOT valid Transaction Amounts: "98,73" and "3 705".The value must include the transaction fee amount if it exists. The transaction amount in the response message may be not equal to that in the request message due to discount activity, which will be used in settlement. | |||||||||
Transaction Currency | trxCurrency | N | 3 | M:Mandatory | "156" | A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code of the transaction. The currency also applies to the "discount", "costAmount", and "trxFeeAmt" if they exist. | |||||||||
Merchant ID | merchantID | ANS | 1-15 | M:Mandatory | “ABCDE01” | The distinctive value associated to the Merchant. The value must uniquely identify any Merchant of the Acquirer. |
Filed name | Identifier | Type | Length | Request | Default value | Note | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Message ID | msgID | AN | 37 | R:Returned | "S00010340001034420171230235959000000" | It is used to match a response to its request. The value must uniquely identify any message that the Acquirer initiates on any day. The value in the response must match the value in the request.Components: “S” + Acquirer IIN + Forwarding IIN+ Transmission Year (YYYY) + Transmission Date and Time (MMDDhhmmss) + System Trace Audit Number (6 numeric digits) | |||||||||||||||||||||||||
Original Message ID | originalMsgID | AN | 37 | R:Returned | "S00010340001034420171230235959000000" | When it is used to cancel purchase transaction, the value shall be the “msgID” value of the POS_PURCHASE.When it is used to cancel pre-authorization transaction, the value shall be the “msgID” value of the POS_PREAUTH.When it is used to cancel pre-authorization completion transaction, the value shall be the “msgID” value of the POS_PREAUTH_COMPLETION. | |||||||||||||||||||||||||
Authorization Identification Response | authCode | AN | 6 | O:Optional | “000000” | This field shall be present if it is present in the last related transaction.The value of this field shall be obtained from the response message of the original transaction. | |||||||||||||||||||||||||
Payment Reference Number (PAR) | par | AN | 29 | C:Conditional | It is present when PAR is available. | ||||||||||||||||||||||||||
Transaction Amount | trxAmt | ANS | 1-13 | M:Mandatory | "101.10" | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. The following are examples of valid Transaction Amounts: "98.73", "98" and "98.". The following are NOT valid Transaction Amounts: "98,73" and "3 705".The value must include the transaction fee amount if it exists. The transaction amount in the response message may be not equal to that in the request message due to discount activity, which will be used in settlement. | |||||||||||||||||||||||||
Transaction Currency | trxCurrency | N | 3 | R:Returned | "156" | A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code of the transaction. The currency also applies to the "discount", "costAmount", and "trxFeeAmt" if they exist. | |||||||||||||||||||||||||
Message Response | msgResponse | Object | M:Mandatory | ||||||||||||||||||||||||||||
|
Field name | Identifier | Type | Length | Request | Default value | Note | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Message ID | msgID | AN | 37 | M:Mandatory | "S00010340001034420171230235959000000" | It is used to match a response to its request. The value must uniquely identify any message that the Acquirer initiates on any day. The value in the response must match the value in the request.Components: “S”+ Acquirer IIN +Forwarding IIN+ Transmission Year (YYYY) + Transmission Date and Time (MMDDhhmmss) + System Trace Audit Number (6 numeric digits) | |||||||||
Original Message ID | originalMsgID | AN | 37 | M:Mandatory | "S00010340001034420171230235959000000" | When it is used to cancel purchase transaction, the value shall be the “msgID” value of the POS_PURCHASE.When it is used to cancel pre-authorization completion transaction, the value shall be the “msgID” value of the POS_PREAUTH_COMPLETION. | |||||||||
Local Transaction Date &Time | localTxnDateTime | N | 10 | M:Mandatory | Format: MMDDhhmmss | ||||||||||
Retrieval Reference Number | retrievalReferenceNumber | AN | 12 | M:Mandatory | The Retrieval Reference Number shall be a unique value of the any transactions presented by the acquirer on each settlement day.Format: MMDDhh (first 6 digits of Transmission Date and Time) + System Trace Audit Number (6 numeric digits) | ||||||||||
Encrypted Data | encData | Object | M:Mandatory | JWE |
|||||||||||
|
Authorization Identification Response | authCode | AN | 6 | C:Conditional | “000000” | This field shall be present if it is present in the last related transaction.The value of this field shall be obtained from the response message of the original transaction. | ||||||||
Transaction Amount | trxAmt | ANS | 1-13 | M:Mandatory | "101.10" | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. The following are examples of valid Transaction Amounts: "98.73", "98" and "98.". The following are NOT valid Transaction Amounts: "98,73" and "3 705".The value must include the transaction fee amount if it exists. The transaction amount in the response message may be not equal to that in the request message due to discount activity, which will be used in settlement. | |||||||||
Transaction Currency | trxCurrency | N | 3 | M:Mandatory | "156" | A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code of the transaction. The currency also applies to the "discount", "costAmount", and "trxFeeAmt" if they exist. |
Filed name | Identifier | Type | Length | Request | Default value | Note | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Message ID | msgID | AN | 37 | R:Returned | "S00010340001034420171230235959000000" | It is used to match a response to its request. The value must uniquely identify any message that the Acquirer initiates on any day. The value in the response must match the value in the request.Components: “S”+ Acquirer IIN +Forwarding IIN+ Transmission Year (YYYY) + Transmission Date and Time (MMDDhhmmss) + System Trace Audit Number (6 numeric digits) | |||||||||||||||||||||||||
Original Message ID | originalMsgID | AN | 37 | R:Returned | "S00010340001034420171230235959000000" | When it is used to cancel purchase transaction, the value shall be the “msgID” value of the POS_PURCHASE.When it is used to cancel pre-authorization completion transaction, the value shall be the “msgID” value of the POS_PREAUTH_COMPLETION. | |||||||||||||||||||||||||
Retrieval Reference Number | retrievalReferenceNumber | AN | 12 | R:Returned | The Retrieval Reference Number shall be a unique value of the any transactions presented by the acquirer on each settlement day.Format: MMDDhh (first 6 digits of Transmission Date and Time) + System Trace Audit Number (6 numeric digits) | ||||||||||||||||||||||||||
Payment Reference Number (PAR) | par | AN | 29 | C:Conditional | It is present when PAR is available. | ||||||||||||||||||||||||||
Transaction Amount | trxAmt | ANS | 1-13 | M:Mandatory | "101.10" | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals. The following are examples of valid Transaction Amounts: "98.73", "98" and "98.". The following are NOT valid Transaction Amounts: "98,73" and "3 705".The value must include the transaction fee amount if it exists. The transaction amount in the response message may be not equal to that in the request message due to discount activity, which will be used in settlement. | |||||||||||||||||||||||||
Transaction Currency | trxCurrency | N | 3 | R:Returned | "156" | A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code of the transaction. The currency also applies to the "discount", "costAmount", and "trxFeeAmt" if they exist. | |||||||||||||||||||||||||
Settlement Date | settlementDate | N | 4 | C:Conditional | "1230" | It is present if the refund is approved.Format: MMDD | |||||||||||||||||||||||||
Settlement Currency | settlementCurrency | N | 3 | C:Conditional | “840” | A 3-digit numeric value, as defined by [ISO 4217], that indicates acquirer’s settlement currency. It is present if the refund is approved and the "settlementCurrency" has a different value from "trxCurrency". | |||||||||||||||||||||||||
Settlement Amount | settlementAmt | ANS | 1-13 | C:Conditional | “15.17” | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals.It is present if the refund is approved and the"settlementCurrency" has a different value from "trxCurrency". | |||||||||||||||||||||||||
Settlement Conversion Rate | settlementConvRate | ANS | 1-9 | C:Conditional | "71212345 " | It is present if the refund is approved and the"settlementCurrency" has a different value from "trxCurrency".The 1st digit indicates the number position where the decimal point should be moved from the right (allowed values are 0–7). The 2nd-final digits indicate the value of the conversion rate, and are right justified with no decimal point.For example, 71212345 indicates that the conversion rate is 0.1212345 | |||||||||||||||||||||||||
Conversion Date | conversionDate | N | 4 | C:Conditional | "1230" | It is present if"settlementAmt"exists.Format: MMDD | |||||||||||||||||||||||||
Message Response | msgResponse | Object | M:Mandatory | ||||||||||||||||||||||||||||
|
Field name | Identifier | Type | Length | Request | Default value | Note | |
---|---|---|---|---|---|---|---|
Message ID | msgID | AN | 37 | M:Mandatory | "S00010340001034420171230235959000000" | It is used to match a response to its request. The value must uniquely identify any message that the Acquirer initiates on any day. The value in the response must match the value in the request.Format: “S”+ Sending Party IIN + Forwarding IIN + Transmission Date and Time (YYYYMMDDhhmmss) + System Trace Audit Number (6 numeric digits) Transmission Date and Time shall be filled by Beijing time (UTC+8). |
Filed name | Identifier | Type | Length | Request | Default value | Note | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Message ID | msgID | AN | 37 | R:Returned | "S00010340001034420171230235959000000" | It is used to match a response to its request. The value must uniquely identify any message that the Acquirer initiates on any day. The value in the response must match the value in the request.Format: “S”+ Sending Party IIN + Forwarding IIN + Transmission Date and Time (YYYYMMDDhhmmss) + System Trace Audit Number (6 numeric digits) Transmission Date and Time shall be filled by Beijing time (UTC+8). | |||||||||||||||||||||||||
Original Message ID | originalMsgID | AN | 37 | R:Returned | "S00010340001034420171230235959000000" | The same value of the “msgID” in the inquired message. | |||||||||||||||||||||||||
Authorization Identification Response | authCode | AN | 6 | C:Conditional | “000000” | The authorization code for the approved transaction assigned by the Issuer.It is returned if the inquired message is successful. | |||||||||||||||||||||||||
Payment Reference Number (PAR) | par | AN | 29 | C:Conditional | It is present when PAR is available. | ||||||||||||||||||||||||||
Transaction Amount | trxAmt | ANS | 1-13 | C:Conditional | "101.10" | The cost amount of the payment.The transaction amount returned in the MSG_RESULT_INQUIRY message may be not equal to that in the payment request message due to discount activity.It is returned if the inquired message is successful and it exists in the inquired message. | |||||||||||||||||||||||||
Transaction Currency | trxCurrency | N | 3 | C:Conditional | "156" | A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code of the transaction. The currency also applies to the "discount", "costAmount", and "trxFeeAmt" if they exist.It is returned if the inquired message is successful and it exists in the inquired message. | |||||||||||||||||||||||||
Discount Details | discountDetails | Array | O:Optional | [{“discountAmt”:”10”,”discountNote”:”Reduction Discount”}] | The details of discount.The discount information could be displayed to the cardholder in the terminal interface or the receipt printed to the cardholder. | ||||||||||||||||||||||||||
|
Original Amount | originalAmount | ANS | 1-13 | O:Optional | “131.10” | The original amount, which could be displayed to the cardholder in the terminal interface or the receipt printed to the cardholder. | ||||||||||||||||||||||||
Cost Amount | costAmount | ANS | 1-13 | O:Optional | “101.10” | The cost amount after the discount, indicating the amount the Cardholder actually pays for the transaction when a promotion is involved. The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals.The cost amount could be displayed to the cardholder in the terminal interface or the receipt printed to the cardholder. | |||||||||||||||||||||||||
Settlement Date | settlementDate | N | 4 | C:Conditional | "1230" | Format: MMDDIt is returned if the inquired message is successful and it exists in the inquired message. | |||||||||||||||||||||||||
Settlement Currency | settlementCurrency | N | 3 | C:Conditional | “840” | A 3-digit numeric value, as defined by [ISO 4217], that indicates acquirer’s settlement currency. It is returned if the inquired message is successful and it exists in the inquired message. | |||||||||||||||||||||||||
Settlement Amount | settlementAmt | ANS | 1-13 | C:Conditional | “15.17” | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals.It is returned if the inquired message is successful and it exists in the inquired message. | |||||||||||||||||||||||||
Settlement Conversion Rate | settlementConvRate | ANS | 1-9 | C:Conditional | "71212345 " | It is returned if the inquired message is successful and it exists in the inquired message. | |||||||||||||||||||||||||
Cardholder Billing Currency | cardholderBillingCurrency | N | 3 | C:Conditional | “840” | A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code of the card account. It is returned if the inquired message is successful and it exists in the inquired message. | |||||||||||||||||||||||||
Cardholder Billing Amount | cardholderBillingAmt | ANS | 1-13 | C:Conditional | “15.17” | The value shall only include (numeric) digits "0" to "9" and may contain a single "." character as the decimal mark. When the amount includes decimals, the "." character shall be used to separate the decimals from the integer value, and the "." character may be present even if there are no decimals.It is returned if the inquired message is successful and it exists in the inquired message. | |||||||||||||||||||||||||
Cardholder Billing Conversion Rate | cardholderBillingConvRate | ANS | 1-9 | C:Conditional | "71212345 " | It is returned if the inquired message is successful and it exists in the inquired message. | |||||||||||||||||||||||||
Conversion Date | conversionDate | N | 4 | C:Conditional | "1230" | Format: MMDD It is present if either "settlementAmt" or “cardholderBillingAmt”exists. | |||||||||||||||||||||||||
Retrieval Reference Number | retrievalReferenceNumber | AN | 12 | C:Conditional | It is returned if the inquired message is successful and it exists in the inquired message. | ||||||||||||||||||||||||||
Original Message Response | origMsgResponse | Object | C:Conditional | ||||||||||||||||||||||||||||
|
Message Response | msgResponse | Object | M:Mandatory | |||||||||||||||||||||||||||
|
UnionPay International has adopted unified security requirement, please refer to UPI Server-based API General Requirements for signature and encryption guide.
1. Pre-authorization
1.The Acquirer submits a POS_PREAUTH request message to the UNIONPAY API system.
2.The UNIONPAY API system forwards the payment request to the Issuer and brings back the transaction outcome to the Acquirer in the POS_PREAUTH response message.
Exceptional flows:
3.When the Acquirer does not receive the POS_PREAUTH response message within 45 seconds, it can initiate a MSG_RESULT_INQUIRY message, using the Message ID of the POS_PREAUTH to check if the payment is successful.
4.The UNIONPAY API system will return the POS_PREAUTH transaction outcome to the Acquirer.
Acquirers are required to be UPI member and fill in the application form;
Perform system enhancement according to UPI specifications;
Perform POS terminal enhancement and certification.
Please contact Developer Operation Team by submitting order