Payments API - Chile
This guide shows you how to leverage these services to enhance your customers’ payment experience by providing flexible and secure payment options tailored to the local market.
Note
To integrate the Payments API, direct your requests to the following URLs according to the corresponding environment:
- Testing:
https://sandbox.api.payulatam.com/payments-api/4.0/service.cgi
- Production:
https://api.payulatam.com/payments-api/4.0/service.cgi
Available Methods
Payments API includes the following methods:
- Submit Transactions Using Credit, Debit or Prepaid Cards
- Submit Transactions Using Cash
- Submit Transactions Using Debit and Prepaid Cards Through WebPay Plus
- Available Payment Methods Query
- Ping
Note
To confirm the status of a transaction, you can use one of the following options:
- Navigate to the the URL set in the
transaction.notifyUrl
parameter or the Confirmation URL option located in the PayU Module in Settings > Technical configuration. - Use the Queries API or SDK.
Submit Transactions Using Credit, Debit or Prepaid Cards
This method lets you process the payments that your customers perform using credit, debit or prepaid cards. For Chile, you can perform the two-step flows (Authorization, Capture), and one-step flows (Charge). For more information, refer to Payment flows.
Note
Transactions using two-step flows are available under demand. Contact your sales representative for more information.Parameters for Request and Response
Request
Field Name | Format | Size | Description | Mandatory |
---|---|---|---|---|
language | Alphanumeric | 2 | Language used in the request, this language is used to display the error messages generated. See supported languages. | Yes |
command | Alphanumeric | Max:32 | Set SUBMIT_TRANSACTION . |
Yes |
test (JSON) isTest (XML) |
Boolean | Set true if the request is in test mode. Otherwise, set false . |
Yes | |
merchant | Object | This object has the authentication data. | Yes | |
merchant > apiLogin | Alphanumeric | Min:12 Max:32 | User or login provided by PayU. How do I get my API Login | Yes |
merchant > apiKey | Alphanumeric | Min:6 Max:32 | Password provided by PayU. How do I get my API Key | Yes |
transaction | Object | This object has the transaction data. | Yes | |
transaction > order | Object | This object has the order data. | Yes | |
transaction > order > accountId | Number | Identifier of your account. | Yes | |
transaction > order > referenceCode | Alphanumeric | Min:1 Max:255 | Represents the identifier of the order in your system. | Yes |
transaction > order > description | Alphanumeric | Min:1 Max:255 | Description of the order. | Yes |
transaction > order > language | Alphanumeric | 2 | Language used in emails sent to the buyer and the seller. | Yes |
transaction > order > notifyUrl | Alphanumeric | Max:2048 | Confirmation URL of the order. | No |
transaction > order > partnerId | Alphanumeric | Max:255 | Partner ID in PayU. | No |
transaction > order > signature | Alphanumeric | Max:255 | The signature associated to the form. For more information refer Authentication signature. | Yes |
transaction > order > shippingAddress | Object | Shipping address. | No | |
transaction > order > shippingAddress > street1 | Alphanumeric | Max:100 | Address Line 1. | No |
transaction > order > shippingAddress > street2 | Alphanumeric | Max:100 | Address Line 2. | No |
transaction > order > shippingAddress > city | Alphanumeric | Max:50 | Address city. | No |
transaction > order > shippingAddress > state | Alphanumeric | Max:40 | Address State. | No |
transaction > order > shippingAddress > country | Alphanumeric | 2 | Address country. | No |
transaction > order > shippingAddress > postalCode | Alphanumeric | Max:8 | Address Zip code. | No |
transaction > order > shippingAddress > phone | Alphanumeric | Max:11 | Phone number associated to the address. | No |
transaction > order > buyer | Object | Buyer information. | Yes | |
transaction > order > buyer > merchantBuyerId | Alphanumeric | Max:100 | Buyer ID in your system. | No |
transaction > order > buyer > fullName | Alphanumeric | Max:150 | Full name of the buyer. | Yes |
transaction > order > buyer > emailAddress | Alphanumeric | Max:255 | E-mail of the buyer. | Yes |
transaction > order > buyer > contactPhone | Alphanumeric | Max:20 | Phone number of the buyer. | Yes |
transaction > order > buyer > dniNumber | Alphanumeric | Max:20 | Identification number of the buyer. | Yes |
transaction > order > buyer > shippingAddress | Alphanumeric | Shipping address of the buyer. | Yes | |
transaction > order > buyer > shippingAddress > street1 | Alphanumeric | Max:150 | Buyer’s shipping address Line 1. | Yes |
transaction > order > buyer > shippingAddress > city | Alphanumeric | Max:50 | Buyer’s shipping address city. | Yes |
transaction > order > buyer > shippingAddress > state | Alphanumeric | Max:40 | Buyer’s shipping address state. | Yes |
transaction > order > buyer > shippingAddress > country | Alphanumeric | 2 | Buyer’s shipping address country in format ISO 3166 alpha-2. | Yes |
transaction > order > buyer > shippingAddress > postalCode | Number | Max:20 | Buyer’s shipping address zip code. | Yes |
transaction > order > buyer > shippingAddress > phone | Number | Max:20 | Buyer’s shipping address phone number. | Yes |
transaction > order > additionalValues > | Object | 64 | Amount of the order or its associated values. | Yes |
transaction > order > additionalValues > TX_VALUE | Alphanumeric | 64 | Amount of the transaction. | Yes |
transaction > order > additionalValues > TX_VALUE > value | Number | 12, 2 | Specifies the amount of the transaction. This amount cannot include decimals. | Yes |
transaction > order > additionalValues > TX_VALUE > currency | Alphanumeric | 3 | ISO code of the currency. See accepted currencies. | Yes |
transaction > order > additionalValues > TX_TAX | Alphanumeric | 64 | Amount of the Value Added Tax (VAT). | Yes |
transaction > order > additionalValues > TX_TAX > value | Number | 12, 2 | Specifies the amount of the VAT. | No |
transaction > order > additionalValues > TX_TAX > currency | Alphanumeric | 3 | ISO code of the currency. See accepted currencies. | No |
transaction > order > additionalValues > TX_TAX_RETURN_BASE | Alphanumeric | 64 | Base value to calculate the VAT. If the amount does not have IVA, send 0. This value may have two decimal digits. |
No |
transaction > order > additionalValues > TX_TAX_RETURN_BASE > value | Number | 12, 2 | Specifies the base amount of the transaction. | No |
transaction > order > additionalValues > TX_TAX_RETURN_BASE > currency | Alphanumeric | 3 | ISO code of the currency. See accepted currencies. | No |
transaction > creditCardTokenId | Alphanumeric | Include this parameter when the transaction is done using a tokenized card replacing the information of the credit card. For more information, refer to Tokenization API | No | |
transaction > creditCard | Object | Credit card information. This object and its parameters are mandatory when the payment is performed using not tokenized credit card. | No | |
transaction > creditCard > number | Alphanumeric | Min:13 Max:20 | Credit card number. | No |
transaction > creditCard > securityCode | Alphanumeric | Min:1 Max:4 | Credit card security code (CVC2, CVV2, CID). | No |
transaction > creditCard > expirationDate | Alphanumeric | 7 | Credit card expiration date. Format YYYY/MM . |
No |
transaction > creditCard > name | Alphanumeric | Min:1 Max:255 | Holder’s name displayed in the credit card. | No |
transaction > creditCard > processWithoutCvv2 | Boolean | Max:255 | Allows you to process transactions without including the credit card security code. Your commerce requires PayU’s authorization before using this feature. | No |
transaction > debitCard | Object | Debit card information. This object and its parameters are mandatory when the payment is performed using debit card. | No | |
transaction > debitCard > number | Alphanumeric | Min:13 Max:20 | Debit card number. | No |
transaction > debitCard > securityCode | Alphanumeric | Min:1 Max:4 | Debit card security code (CVC2, CVV2, CID). | No |
transaction > debitCard > expirationDate | Alphanumeric | 7 | Debit card expiration date. Format YYYY/MM . |
No |
transaction > debitCard > name | Alphanumeric | Min:1 Max:255 | Holder’s name displayed in the debit card. | No |
transaction > payer | Object | Payer information. | Yes | |
transaction > payer > emailAddress | Alphanumeric | Max:255 | Payer e-mail address. | Yes |
transaction > payer > merchantPayerId | Alphanumeric | Max:100 | Identifier of the payer in your system. | No |
transaction > payer > fullName | Alphanumeric | Max:150 | Name of the payer which must meet the name sent in the parameter transaction.creditCard.name for credit card payments. |
Yes |
transaction > payer > billingAddress | Object | Billing address. | Yes | |
transaction > payer > billingAddress > street1 | Alphanumeric | Max:100 | Billing Address Line 1. | Yes |
transaction > payer > billingAddress > street2 | Alphanumeric | Max:100 | Billing Address Line 2. | No |
transaction > payer > billingAddress > city | Alphanumeric | Max:50 | Billing address city. | Yes |
transaction > payer > billingAddress > state | Alphanumeric | Max:40 | Billing address state. | No |
transaction > payer > billingAddress > country | Alphanumeric | 2 | Billing address country in format ISO 3166 Alpha-2. | Yes |
transaction > payer > billingAddress > postalCode | Alphanumeric | Max:20 | Billing address zip code. | No |
transaction > payer > billingAddress > phone | Alphanumeric | Max:20 | Billing address phone number. | No |
transaction > payer > birthdate | Alphanumeric | Max:10 | Payer’s date of birth. | No |
transaction > payer > contactPhone | Alphanumeric | Max:20 | Payer’s phone number. | Yes |
transaction > payer > dniNumber | Alphanumeric | Max:20 | Identification number of the buyer. | Yes |
transaction > payer > dniType | Alphanumeric | 2 | Identification type of the buyer. See Document types. | No |
transaction > type | Alphanumeric | 32 | Set this value according to the transaction you want:
|
Yes |
transaction > paymentMethod | Alphanumeric | 32 | Select a valid Credit or Debit card Payment Method. See the available Payment Methods for Chile. | Yes |
transaction > paymentCountry | Alphanumeric | 2 | Set CL for Chile. |
Yes |
transaction > deviceSessionId | Alphanumeric | Max:255 | Session identifier of the device where the customer performs the transaction. For more information, refer to this topic. | Yes |
transaction > ipAddress | Alphanumeric | Max:39 | IP address of the device where the customer performs the transaction. | Yes |
transaction > cookie | Alphanumeric | Max:255 | Cookie stored by the device where the customer performs the transaction. | Yes |
transaction > userAgent | Alphanumeric | Max:1024 | The User agent of the browser where the customer performs the transaction. | Yes |
transaction > extraParameters | Object | Additional parameters or data associated with the request. The maximum size of each extraParameters name is 64 characters. In JSON, the extraParameters parameter follows this structure: "extraParameters": { "INSTALLMENTS_NUMBER": 1 } In XML, the extraParameters parameter follows this structure: <extraParameters> <entry> <string>INSTALLMENTS_NUMBER</string> <string>1</string> </entry> </extraParameters> |
No |
Response
Field Name | Format | Size | Description |
---|---|---|---|
code | Alphanumeric | The response code of the transaction. Possible values are ERROR and SUCCESS . |
|
error | Alphanumeric | Max:2048 | The error message associated when the response code is ERROR . |
transactionResponse | Object | The response data. | |
transactionResponse > orderId | Number | The generated or existing order Id in PayU. | |
transactionResponse > transactionId | Alphanumeric | 36 | The identifier of the transaction in PayU. |
transactionResponse > state | Alphanumeric | Max:32 | The status of the transaction. |
transactionResponse > responseCode | Alphanumeric | Max:64 | The response code associated with the status. |
transactionResponse > paymentNetworkResponseCode | Alphanumeric | Max:255 | The response code returned by the financial network. |
transactionResponse > paymentNetworkResponseErrorMessage | Alphanumeric | Max:255 | The error message returned by the financial network. |
transactionResponse > trazabilityCode | Alphanumeric | Max:32 | The traceability code returned by the financial network. |
transactionResponse > authorizationCode | Alphanumeric | Max:12 | The authorization code returned by the financial network. |
transactionResponse > responseMessage | Alphanumeric | Max:2048 | Message associated with the response code. |
transactionResponse > operationDate | Date | Creation date of the response in the PayU´s system. | |
transactionResponse > extraParameters | Object | Additional parameters or data associated with the response. In JSON, the extraParameters parameter follows this structure: "extraParameters": { "BANK_REFERENCED_CODE": "CREDIT" } In XML, the extraParameters parameter follows this structure: <extraParameters> <entry> <string>BANK_REFERENCED_CODE</string> <string>CREDIT</string> </entry> </extraParameters> |
Considerations
- Credit Card Tokens: When using credit card tokens for payments, include the following parameters:
transaction.creditCardTokenId:
Identifies the stored credit card token.transaction.creditCard.securityCode
(Optional): The card’s security code (CVV) if required for your processing. For more information on creating and using tokens, refer to the Tokenization API.
- Currency: Transactions must be submitted in Chilean Pesos (CLP) with whole numbers only. Decimals are not allowed.
- Two-Step Flows (Authorization & Capture):
- Currently available for single installment payments only. The integration will automatically reject transactions with multiple installments.
- Two-step flow functionality requires prior activation. Please contact your PayU sales representative for more information and activation.
- Security Code (CVV):
- By default, processing credit cards without the security code (CVV) is not enabled.
- To enable processing without CVV, contact your PayU sales representative. Once enabled, include the parameter
creditCard.processWithoutCvv2
set totrue
in your request and omit thecreditCard.securityCode
parameter.
Authorization
Use this method to perform the Authorization step of a two-step flow. In this step, you authorize the payment but the amount is not debited until you capture the funds.
The following are the request and response bodies for this transaction type.
Request Example:
{
"language": "es",
"command": "SUBMIT_TRANSACTION",
"merchant": {
"apiKey": "4Vj8eK4rloUd272L48hsrarnUA",
"apiLogin": "pRRXKOl8ikMmt9u"
},
"transaction": {
"order": {
"accountId": "512325",
"referenceCode": "PRODUCT_TEST_2021-06-25T16:33:48.512Z",
"description": "Payment test description",
"language": "es",
"signature": "77d72fb91eb43f9b15fb300d5f173da3",
"notifyUrl": "http://www.payu.com/notify",
"additionalValues": {
"TX_VALUE": {
"value": 10000,
"currency": "CLP"
}
},
"buyer": {
"merchantBuyerId": "1",
"fullName": "First name and second buyer name",
"emailAddress": "buyer_test@test.com",
"contactPhone": "7563126",
"dniNumber": "123456789",
"shippingAddress": {
"street1": "Autopista Del Sol, 0 - Km.43 Costado Sur",
"street2": "5555487",
"city": "RM",
"state": "Talagante",
"country": "CL",
"postalCode": "000000",
"phone": "7563126"
}
},
"shippingAddress": {
"street1": "Autopista Del Sol, 0 - Km.43 Costado Sur",
"street2": "5555487",
"city": "RM",
"state": "Talagante",
"country": "CL",
"postalCode": "0000000",
"phone": "7563126"
}
},
"payer": {
"merchantPayerId": "1",
"fullName": "First name and second payer name",
"emailAddress": "payer_test@test.com",
"contactPhone": "7563126",
"dniNumber": "5415668464654",
"billingAddress": {
"street1": "Autopista Del Sol, 0 - Km.43 Costado Sur",
"street2": "125544",
"city": "RM",
"state": "Talagante",
"country": "CL",
"postalCode": "000000",
"phone": "7563126"
}
},
"creditCard": {
"number": "4097440000000004",
"securityCode": "777",
"expirationDate": "2022/12",
"name": "APPROVED"
},
"extraParameters": {
"INSTALLMENTS_NUMBER": 1
},
"type": "AUTHORIZATION",
"paymentMethod": "VISA",
"paymentCountry": "CL",
"deviceSessionId": "vghs6tvkcle931686k1900o6e1",
"ipAddress": "127.0.0.1",
"cookie": "pt1t38347bs6jc9ruv2ecpv7o2",
"userAgent": "Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0"
},
"test": false
}
Response Example:
{
"code": "SUCCESS",
"error": null,
"transactionResponse": {
"orderId": 1400455722,
"transactionId": "49cb24d9-eda6-43de-aad9-a17ffa9e5fb8",
"state": "APPROVED",
"paymentNetworkResponseCode": "195569",
"paymentNetworkResponseErrorMessage": null,
"trazabilityCode": "49cb24d9-eda6-43de-aad9-a17ffa9e5fb8",
"authorizationCode": "195569",
"pendingReason": null,
"responseCode": "APPROVED",
"errorCode": null,
"responseMessage": "Approved transaction",
"transactionDate": null,
"transactionTime": null,
"operationDate": 1624616739664,
"referenceQuestionnaire": null,
"extraParameters": {
"BANK_REFERENCED_CODE": "CREDIT",
"TRANSBANK_DIRECT_TOKEN": "01ab3984007f3010d2adb6c02d104f85b8268ccf4b95da4b56f3abdb339e1c52"
},
"additionalInfo": null
}
}
Request Example:
<request>
<language>es</language>
<command>SUBMIT_TRANSACTION</command>
<merchant>
<apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
<apiLogin>pRRXKOl8ikMmt9u</apiLogin>
</merchant>
<transaction>
<order>
<accountId>512325</accountId>
<referenceCode>PRODUCT_TEST_2021-06-25T16:33:48.512ZZ</referenceCode>
<description>Payment test description</description>
<language>es</language>
<signature>77d72fb91eb43f9b15fb300d5f173da3</signature>
<notifyUrl>http://www.payu.com/notify</notifyUrl>
<additionalValues>
<entry>
<string>TX_VALUE</string>
<additionalValue>
<value>10000</value>
<currency>CLP</currency>
</additionalValue>
</entry>
</additionalValues>
<buyer>
<merchantBuyerId>1</merchantBuyerId>
<fullName>First name and second buyer name</fullName>
<emailAddress>buyer_test@test.com</emailAddress>
<contactPhone>7563126</contactPhone>
<dniNumber>123456789</dniNumber>
<shippingAddress>
<street1>Autopista Del Sol, 0 - Km.43 Costado Sur</street1>
<street2>5555487</street2>
<city>RM</city>
<state>Talagante</state>
<country>CL</country>
<postalCode>000000</postalCode>
<phone>7563126</phone>
</shippingAddress>
</buyer>
<shippingAddress>
<street1>Autopista Del Sol, 0 - Km.43 Costado Sur</street1>
<street2>5555487</street2>
<city>RM</city>
<state>Talagante</state>
<country>CL</country>
<postalCode>0000000</postalCode>
<phone>7563126</phone>
</shippingAddress>
</order>
<payer>
<merchantPayerId>1</merchantPayerId>
<fullName>First name and second payer name</fullName>
<emailAddress>payer_test@test.com</emailAddress>
<contactPhone>7563126</contactPhone>
<dniNumber>5415668464654</dniNumber>
<billingAddress>
<street1>Autopista Del Sol, 0 - Km.43 Costado Sur</street1>
<street2>5555487</street2>
<city>RM</city>
<state>Talagante</state>
<country>CL</country>
<postalCode>000000</postalCode>
<phone>7563126</phone>
</billingAddress>
</payer>
<creditCard>
<number>4097440000000004</number>
<securityCode>777</securityCode>
<expirationDate>2022/12</expirationDate>
<name>APPROVED</name>
</creditCard>
<extraParameters>
<entry>
<string>INSTALLMENTS_NUMBER</string>
<string>1</string>
</entry>
</extraParameters>
<type>AUTHORIZATION</type>
<paymentMethod>VISA</paymentMethod>
<paymentCountry>CL</paymentCountry>
<deviceSessionId>vghs6tvkcle931686k1900o6e1</deviceSessionId>
<ipAddress>127.0.0.1</ipAddress>
<cookie>pt1t38347bs6jc9ruv2ecpv7o2</cookie>
<userAgent>Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0</userAgent>
</transaction>
<isTest>false</isTest>
</request>
Response Example:
<paymentResponse>
<code>SUCCESS</code>
<transactionResponse>
<orderId>1400455931</orderId>
<transactionId>56f77e02-447a-4c98-a04b-9a8f3f92f3e7</transactionId>
<state>APPROVED</state>
<paymentNetworkResponseCode>363838</paymentNetworkResponseCode>
<trazabilityCode>56f77e02-447a-4c98-a04b-9a8f3f92f3e7</trazabilityCode>
<authorizationCode>363838</authorizationCode>
<responseCode>APPROVED</responseCode>
<responseMessage>Approved transaction</responseMessage>
<operationDate>2021-06-25T06:33:55</operationDate>
<extraParameters>
<entry>
<string>BANK_REFERENCED_CODE</string>
<string>CREDIT</string>
</entry>
<entry>
<string>TRANSBANK_DIRECT_TOKEN</string>
<string>01ab79a6030063a6b4039a64a8cf7de471d7ad02390c118fbd7d66cfd1af9864</string>
</entry>
</extraParameters>
</transactionResponse>
</paymentResponse>
Capture
Use this method to perform the Capture step of a two-step flow. In this step, you capture the funds previously Authorized to transfer them to your PayU account.
Considerations
Take into account the following considerations for capture.
- The maximum time to capture an approved transaction is 7 days. After this time, the transaction is auto-voided.
- Only the parameters displayed in the request body are mandatory to invoke a Capture transaction. Consider that the order and transaction ids must meet with a currently authorized transaction.
- You can perform partial captures on an authorized amount. For more information, see the Partial Capture section.
- It is not allowed to capture a higher amount than the amount previously authorized.
- Captures are only allowed for transactions in one installment.
The following are the request and response bodies for this transaction type.
Request Example:
{
"language": "es",
"command": "SUBMIT_TRANSACTION",
"merchant": {
"apiLogin": "pRRXKOl8ikMmt9u",
"apiKey": "4Vj8eK4rloUd272L48hsrarnUA"
},
"transaction": {
"order": {
"id": "1400421560"
},
"type": "CAPTURE",
"parentTransactionId": "db9d9d7f-b62c-4ed2-a3b9-d146d33bdaf5"
},
"test": false
}
Response Example:
{
"code": "SUCCESS",
"error": null,
"transactionResponse": {
"orderId": 1400455931,
"transactionId": "da91c0ec-632b-44e3-883d-b85821390519",
"state": "APPROVED",
"paymentNetworkResponseCode": "0",
"paymentNetworkResponseErrorMessage": null,
"trazabilityCode": "da91c0ec-632b-44e3-883d-b85821390519",
"authorizationCode": "169018",
"pendingReason": null,
"responseCode": "APPROVED",
"errorCode": null,
"responseMessage": "Approved transaction",
"transactionDate": null,
"transactionTime": null,
"operationDate": 1624629865424,
"referenceQuestionnaire": null,
"extraParameters": {
"TRANSBANK_DIRECT_TOKEN": "01ab5a10f3c1bdd401ac86d7c21e4347a7b848171fad7830157abcaac0373c7e"
},
"additionalInfo": null
}
}
Request Example:
<request>
<language>es</language>
<command>SUBMIT_TRANSACTION</command>
<merchant>
<apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
<apiLogin>pRRXKOl8ikMmt9u</apiLogin>
</merchant>
<transaction>
<order>
<id>1400456250</id>
</order>
<type>CAPTURE</type>
<parentTransactionId>ead41073-a03a-45aa-9e83-23d4b03197f0</parentTransactionId>
</transaction>
<isTest>false</isTest>
</request>
Response Example:
<paymentResponse>
<code>SUCCESS</code>
<transactionResponse>
<orderId>1400456250</orderId>
<transactionId>9c4d12c4-277d-4936-9d15-735e21dd5a19</transactionId>
<state>APPROVED</state>
<paymentNetworkResponseCode>0</paymentNetworkResponseCode>
<trazabilityCode>9c4d12c4-277d-4936-9d15-735e21dd5a19</trazabilityCode>
<authorizationCode>698999</authorizationCode>
<responseCode>APPROVED</responseCode>
<responseMessage>Approved transaction</responseMessage>
<operationDate>2021-06-25T09:08:16</operationDate>
<extraParameters>
<entry>
<string>TRANSBANK_DIRECT_TOKEN</string>
<string>01ab6ddef1f9350f7b970d33b9766db9b0d52c6b9cb353618ddc8cd58d076b59</string>
</entry>
</extraParameters>
</transactionResponse>
</paymentResponse>
Partial Capture
A partial capture is an operation that allows you to request the disbursement of an amount less than what was previously authorized in a transaction.
This means that if your integration initially authorized a payment of $100, you can perform a partial capture for $60, and release the remaining $40, which the integration will not be able to capture later.
Considerations
- The total amount captured cannot exceed the originally authorized amount.
- Each payment processor and each country may have rules or restrictions regarding the amount you can capture partially.
- You must specify the value you wish to partially capture in the
value
field, within theTX_VALUE
parameter, as shown in the example below. - The minimum amount for partial capture is 50 CLP.
The following are examples of the request and response bodies for this type of transaction.
Request Example:
{
"language": "es",
"command": "SUBMIT_TRANSACTION",
"merchant": {
"apiLogin": "pRRXKOl8ikMmt9u",
"apiKey": "4Vj8eK4rloUd272L48hsrarnUA"
},
"transaction": {
"order": {
"id": "2152525133"
},
"additionalValues": {
"TX_VALUE": {
"value": 50,
"currency": "CLP"
}
},
"type": "CAPTURE",
"parentTransactionId": "4b6adba7-e43b-45f8-88a6-d290755d6c04"
},
"test": false
}
Response Example:
{
"code": "SUCCESS",
"error": null,
"transactionResponse": {
"orderId": 2152543423,
"transactionId": "6f523681-1587-4a2d-8a15-605d27f89c26",
"state": "APPROVED",
"paymentNetworkResponseCode": "0",
"paymentNetworkResponseErrorMessage": null,
"trazabilityCode": "6f523681-1587-4a2d-8a15-605d27f89c26",
"authorizationCode": "NPS-011111",
"pendingReason": null,
"responseCode": "APPROVED",
"errorCode": null,
"responseMessage": "APROBADA - Autorizada",
"transactionDate": null,
"transactionTime": null,
"operationDate": 1723724052207,
"referenceQuestionnaire": null,
"extraParameters": null,
"additionalInfo": {
"paymentNetwork": "NPS_AR",
"rejectionType": "NONE",
"responseNetworkMessage": null,
"travelAgencyAuthorizationCode": null,
"cardType": null,
"transactionType": "CAPTURE"
}
}
}
Request Example:
<request>
<language>es</language>
<command>SUBMIT_TRANSACTION</command>
<merchant>
<apiLogin>pRRXKOl8ikMmt9u</apiLogin>
<apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
</merchant>
<transaction>
<order>
<id>2152525133</id>
</order>
<additionalValues>
<TX_VALUE>
<value>50</value>
<currency>CLP</currency>
</TX_VALUE>
</additionalValues>
<type>CAPTURE</type>
<parentTransactionId>4b6adba7-e43b-45f8-88a6-d290755d6c04</parentTransactionId>
</transaction>
<test>false</test>
</request>
Response Example:
<response>
<code>SUCCESS</code>
<error />
<transactionResponse>
<orderId>2152543423</orderId>
<transactionId>6f523681-1587-4a2d-8a15-605d27f89c26</transactionId>
<state>APPROVED</state>
<paymentNetworkResponseCode>0</paymentNetworkResponseCode>
<paymentNetworkResponseErrorMessage />
<trazabilityCode>6f523681-1587-4a2d-8a15-605d27f89c26</trazabilityCode>
<authorizationCode>NPS-011111</authorizationCode>
<pendingReason />
<responseCode>APPROVED</responseCode>
<errorCode />
<responseMessage>APROBADA - Autorizada</responseMessage>
<transactionDate />
<transactionTime />
<operationDate>1723724052207</operationDate>
<referenceQuestionnaire />
<extraParameters />
<additionalInfo>
<paymentNetwork>NPS_AR</paymentNetwork>
<rejectionType>NONE</rejectionType>
<responseNetworkMessage />
<travelAgencyAuthorizationCode />
<cardType />
<transactionType>CAPTURE</transactionType>
</additionalInfo>
</transactionResponse>
</response>
Charge
Use this method to perform a one-step flow, namely a charge. In this step, both steps of the two-step flow are combined in a single transaction and the funds are transferred from the customers account to your PayU account once they have been approved:
The following are the request and response bodies for this transaction type.
Request Example:
{
"language": "es",
"command": "SUBMIT_TRANSACTION",
"merchant": {
"apiKey": "4Vj8eK4rloUd272L48hsrarnUA",
"apiLogin": "pRRXKOl8ikMmt9u"
},
"transaction": {
"order": {
"accountId": "512325",
"referenceCode": "PRODUCT_TEST_2021-06-15T20:35:48.975Z",
"description": "Payment test description",
"language": "es",
"signature": "75ae7a887dfd759894c57eb1bc5a4288",
"notifyUrl": "http://www.payu.com/notify",
"additionalValues": {
"TX_VALUE": {
"value": 10000,
"currency": "CLP"
}
},
"buyer": {
"merchantBuyerId": "1",
"fullName": "First name and second buyer name",
"emailAddress": "buyer_test@test.com",
"contactPhone": "7563126",
"dniNumber": "123456789",
"shippingAddress": {
"street1": "Autopista Del Sol, 0 - Km.43 Costado Sur",
"street2": "5555487",
"city": "RM",
"state": "Talagante",
"country": "CL",
"postalCode": "000000",
"phone": "7563126"
}
},
"shippingAddress": {
"street1": "Autopista Del Sol, 0 - Km.43 Costado Sur",
"street2": "5555487",
"city": "RM",
"state": "Talagante",
"country": "CL",
"postalCode": "0000000",
"phone": "7563126"
}
},
"payer": {
"merchantPayerId": "1",
"fullName": "First name and second payer name",
"emailAddress": "payer_test@test.com",
"contactPhone": "7563126",
"dniNumber": "5415668464654",
"billingAddress": {
"street1": "Autopista Del Sol, 0 - Km.43 Costado Sur",
"street2": "125544",
"city": "RM",
"state": "Talagante",
"country": "CL",
"postalCode": "000000",
"phone": "7563126"
}
},
"creditCard": {
"number": "4037997623271984",
"securityCode": "321",
"expirationDate": "2030/12",
"name": "APPROVED"
},
"extraParameters": {
"INSTALLMENTS_NUMBER": 1
},
"type": "AUTHORIZATION_AND_CAPTURE",
"paymentMethod": "VISA",
"paymentCountry": "CL",
"deviceSessionId": "vghs6tvkcle931686k1900o6e1",
"ipAddress": "127.0.0.1",
"cookie": "pt1t38347bs6jc9ruv2ecpv7o2",
"userAgent": "Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0"
},
"test": false
}
Response Example:
{
"code": "SUCCESS",
"error": null,
"transactionResponse": {
"orderId": 1400431556,
"transactionId": "14aed0cc-95cb-4b04-b4dd-0c7f8c3296e8",
"state": "APPROVED",
"paymentNetworkResponseCode": "456505",
"paymentNetworkResponseErrorMessage": null,
"trazabilityCode": "14aed0cc-95cb-4b04-b4dd-0c7f8c3296e8",
"authorizationCode": "456505",
"pendingReason": null,
"responseCode": "APPROVED",
"errorCode": null,
"responseMessage": "Approved transaction",
"transactionDate": null,
"transactionTime": null,
"operationDate": 1623834912248,
"referenceQuestionnaire": null,
"extraParameters": {
"BANK_REFERENCED_CODE": "CREDIT",
"TRANSBANK_DIRECT_TOKEN": "01ab306b62cd0ce17d462501b121ed6cac3794375054b80a51c01bad4ec51550"
},
"additionalInfo": null
}
}
Request Example:
<request>
<language>es</language>
<command>SUBMIT_TRANSACTION</command>
<merchant>
<apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
<apiLogin>pRRXKOl8ikMmt9u</apiLogin>
</merchant>
<transaction>
<order>
<accountId>512325</accountId>
<referenceCode>PRODUCT_TEST_2021-06-15T20:35:48.975Z</referenceCode>
<description>Payment test description</description>
<language>es</language>
<signature>75ae7a887dfd759894c57eb1bc5a4288</signature>
<notifyUrl>http://www.payu.com/notify</notifyUrl>
<additionalValues>
<entry>
<string>TX_VALUE</string>
<additionalValue>
<value>10000</value>
<currency>CLP</currency>
</additionalValue>
</entry>
</additionalValues>
<buyer>
<merchantBuyerId>1</merchantBuyerId>
<fullName>First name and second buyer name</fullName>
<emailAddress>buyer_test@test.com</emailAddress>
<contactPhone>7563126</contactPhone>
<dniNumber>123456789</dniNumber>
<shippingAddress>
<street1>Autopista Del Sol, 0 - Km.43 Costado Sur</street1>
<street2>5555487</street2>
<city>RM</city>
<state>Talagante</state>
<country>CL</country>
<postalCode>000000</postalCode>
<phone>7563126</phone>
</shippingAddress>
</buyer>
<shippingAddress>
<street1>Autopista Del Sol, 0 - Km.43 Costado Sur</street1>
<street2>5555487</street2>
<city>RM</city>
<state>Talagante</state>
<country>CL</country>
<postalCode>0000000</postalCode>
<phone>7563126</phone>
</shippingAddress>
</order>
<payer>
<merchantPayerId>1</merchantPayerId>
<fullName>First name and second payer name</fullName>
<emailAddress>payer_test@test.com</emailAddress>
<contactPhone>7563126</contactPhone>
<dniNumber>5415668464654</dniNumber>
<billingAddress>
<street1>Autopista Del Sol, 0 - Km.43 Costado Sur</street1>
<street2>5555487</street2>
<city>RM</city>
<state>Talagante</state>
<country>CL</country>
<postalCode>000000</postalCode>
<phone>7563126</phone>
</billingAddress>
</payer>
<creditCard>
<number>4037997623271984</number>
<securityCode>321</securityCode>
<expirationDate>2030/12</expirationDate>
<name>APPROVED</name>
</creditCard>
<extraParameters>
<entry>
<string>INSTALLMENTS_NUMBER</string>
<string>1</string>
</entry>
</extraParameters>
<type>AUTHORIZATION_AND_CAPTURE</type>
<paymentMethod>VISA</paymentMethod>
<paymentCountry>CL</paymentCountry>
<deviceSessionId>vghs6tvkcle931686k1900o6e1</deviceSessionId>
<ipAddress>127.0.0.1</ipAddress>
<cookie>pt1t38347bs6jc9ruv2ecpv7o2</cookie>
<userAgent>Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0</userAgent>
</transaction>
<isTest>false</isTest>
</request>
Response Example:
<paymentResponse>
<code>SUCCESS</code>
<transactionResponse>
<orderId>1400431549</orderId>
<transactionId>937ed9fe-72d3-44e2-b1b8-e38e9f8e08a4</transactionId>
<state>APPROVED</state>
<paymentNetworkResponseCode>185495</paymentNetworkResponseCode>
<trazabilityCode>937ed9fe-72d3-44e2-b1b8-e38e9f8e08a4</trazabilityCode>
<authorizationCode>185495</authorizationCode>
<responseCode>APPROVED</responseCode>
<responseMessage>Approved transaction</responseMessage>
<operationDate>2021-06-16T04:13:51</operationDate>
<extraParameters>
<entry>
<string>BANK_REFERENCED_CODE</string>
<string>CREDIT</string>
</entry>
<entry>
<string>TRANSBANK_DIRECT_TOKEN</string>
<string>01abc29e7b32bbf011cdd2a1e9961c5d6bd068220f4b506b06c66e15de1acfd2</string>
</entry>
</extraParameters>
</transactionResponse>
</paymentResponse>
Submit Transactions Using Cash
This method lets you process the payments in cash of your customers. To integrate with cash transactions, you must redirect the customer to the URL found in the response of the method; your customer selects cash and generates the payment code.
Note
Klap is formerly known as MULTICAJA. You can still see elements or configurations related to MULTICAJA.Parameters for Request and Response
Request
Field Name | Format | Size | Description | Mandatory |
---|---|---|---|---|
language | Alphanumeric | 2 | Language used in the request, this language is used to display the error messages generated. See supported languages. | Yes |
command | Alphanumeric | Max:32 | Set SUBMIT_TRANSACTION . |
Yes |
test (JSON) isTest (XML) |
Boolean | Set true if the request is in test mode. Otherwise, set false . |
Yes | |
merchant | Object | This object has the authentication data. | Yes | |
merchant > apiLogin | Alphanumeric | Min:12 Max:32 | User or login provided by PayU. How do I get my API Login | Yes |
merchant > apiKey | Alphanumeric | Min:6 Max:32 | Password provided by PayU. How do I get my API Key | Yes |
transaction | Object | This object has the transaction data. | Yes | |
transaction > order | Object | This object has the order data. | Yes | |
transaction > order > accountId | Number | Identifier of your account. | Yes | |
transaction > order > referenceCode | Alphanumeric | Min:1 Max:255 | Represents the identifier of the order in your system. | Yes |
transaction > order > description | Alphanumeric | Min:1 Max:255 | Description of the order. | Yes |
transaction > order > language | Alphanumeric | 2 | Language used in emails sent to the buyer and the seller. | Yes |
transaction > order > notifyUrl | Alphanumeric | Max:2048 | Confirmation URL of the order. | No |
transaction > order > partnerId | Alphanumeric | Max:255 | Partner ID in PayU. | No |
transaction > order > signature | Alphanumeric | Max:255 | The signature associated to the form. For more information refer Authentication signature. | Yes |
transaction > order > shippingAddress | Object | Shipping address. | No | |
transaction > order > shippingAddress > street1 | Alphanumeric | Max:100 | Address Line 1. | No |
transaction > order > shippingAddress > street2 | Alphanumeric | Max:100 | Address Line 2. | No |
transaction > order > shippingAddress > city | Alphanumeric | Max:50 | Address city. | No |
transaction > order > shippingAddress > state | Alphanumeric | Max:40 | Address State. | No |
transaction > order > shippingAddress > country | Alphanumeric | 2 | Address country. | No |
transaction > order > shippingAddress > postalCode | Alphanumeric | Max:8 | Address Zip code. | No |
transaction > order > shippingAddress > phone | Alphanumeric | Max:11 | Phone number associated to the address. | No |
transaction > order > buyer | Object | Buyer information. | Yes | |
transaction > order > buyer > merchantBuyerId | Alphanumeric | Max:100 | Buyer ID in your system. | No |
transaction > order > buyer > fullName | Alphanumeric | Max:150 | Full name of the buyer. | Yes |
transaction > order > buyer > emailAddress | Alphanumeric | Max:255 | E-mail of the buyer. | Yes |
transaction > order > buyer > contactPhone | Alphanumeric | Max:20 | Phone number of the buyer. | Yes |
transaction > order > buyer > dniNumber | Alphanumeric | Max:20 | Identification number of the buyer. | Yes |
transaction > order > buyer > shippingAddress | Alphanumeric | Shipping address of the buyer. | Yes | |
transaction > order > buyer > shippingAddress > street1 | Alphanumeric | Max:150 | Buyer’s shipping address Line 1. | Yes |
transaction > order > buyer > shippingAddress > city | Alphanumeric | Max:50 | Buyer’s shipping address city. | Yes |
transaction > order > buyer > shippingAddress > state | Alphanumeric | Max:40 | Buyer’s shipping address state. | Yes |
transaction > order > buyer > shippingAddress > country | Alphanumeric | 2 | Buyer’s shipping address country in format ISO 3166 alpha-2. | Yes |
transaction > order > buyer > shippingAddress > postalCode | Number | Max:20 | Buyer’s shipping address zip code. | Yes |
transaction > order > buyer > shippingAddress > phone | Number | Max:20 | Buyer’s shipping address phone number. | Yes |
transaction > order > additionalValues > | Object | 64 | Amount of the order or its associated values. | Yes |
transaction > order > additionalValues > TX_VALUE | Alphanumeric | 64 | Amount of the transaction. | Yes |
transaction > order > additionalValues > TX_VALUE > value | Number | 12, 2 | Specifies the amount of the transaction. This amount cannot include decimals. | Yes |
transaction > order > additionalValues > TX_VALUE > currency | Alphanumeric | 3 | ISO code of the currency. See accepted currencies. | Yes |
transaction > order > additionalValues > TX_TAX | Alphanumeric | 64 | Amount of the Value Added Tax (VAT). | Yes |
transaction > order > additionalValues > TX_TAX > value | Number | 12, 2 | Specifies the amount of the VAT. | No |
transaction > order > additionalValues > TX_TAX > currency | Alphanumeric | 3 | ISO code of the currency. See accepted currencies. | No |
transaction > order > additionalValues > TX_TAX_RETURN_BASE | Alphanumeric | 64 | Base value to calculate the VAT. If the amount does not have IVA, send 0. This value may have two decimal digits. |
No |
transaction > order > additionalValues > TX_TAX_RETURN_BASE > value | Number | 12, 2 | Specifies the base amount of the transaction. | No |
transaction > order > additionalValues > TX_TAX_RETURN_BASE > currency | Alphanumeric | 3 | ISO code of the currency. See accepted currencies. | No |
transaction > payer | Object | Payer information. | Yes | |
transaction > payer > emailAddress | Alphanumeric | Max:255 | Payer e-mail address. | Yes |
transaction > payer > merchantPayerId | Alphanumeric | Max:100 | Identifier of the payer in your system. | No |
transaction > payer > fullName | Alphanumeric | Max:150 | Name of the payer. | Yes |
transaction > payer > billingAddress | Object | Billing address. | Yes | |
transaction > payer > billingAddress > street1 | Alphanumeric | Max:100 | Billing Address Line 1. | Yes |
transaction > payer > billingAddress > street2 | Alphanumeric | Max:100 | Billing Address Line 2. | No |
transaction > payer > billingAddress > city | Alphanumeric | Max:50 | Billing address city. | Yes |
transaction > payer > billingAddress > state | Alphanumeric | Max:40 | Billing address state. | No |
transaction > payer > billingAddress > country | Alphanumeric | 2 | Billing address country in format ISO 3166 Alpha-2. | Yes |
transaction > payer > billingAddress > postalCode | Alphanumeric | Max:20 | Billing address zip code. | No |
transaction > payer > billingAddress > phone | Alphanumeric | Max:20 | Billing address phone number. | No |
transaction > payer > birthdate | Alphanumeric | Max:10 | Payer’s date of birth. | No |
transaction > payer > contactPhone | Alphanumeric | Max:20 | Payer’s phone number. | Yes |
transaction > payer > dniNumber | Alphanumeric | Max:20 | Identification number of the buyer. | Yes |
transaction > payer > dniType | Alphanumeric | 2 | Identification type of the buyer. See Document types. | No |
transaction > type | Alphanumeric | 32 | As cash payments are performed in physical offices, the only available transaction type is AUTHORIZATION_AND_CAPTURE |
Yes |
transaction > paymentMethod | Alphanumeric | 32 | Select a valid Payment Method in cash. See the available Payment Methods for Chile. | Yes |
transaction > paymentCountry | Alphanumeric | 2 | Set CL for Chile. |
Yes |
transaction > expirationDate | Alphanumeric | 23 | Maximum date and time that the payer has to make the payment. Format YYYY-MM-DDTHH:MM:SS , for example 2021-06-12T16:07:11.586 . |
No |
transaction > ipAddress | Alphanumeric | Max:39 | IP address of the device where the customer performs the transaction. | Yes |
transaction > extraParameters | Object | Additional parameters or data associated with the request. For cash payments, you need to include the response URL to redirect your customers back when they complete their payment. In JSON, the extraParameters parameter is set as: "extraParameters": { "NETWORK_CALLBACK_URL": "http://www.test.com/response" } In XML, the extraParameters parameter is set as: <extraParameters> <entry> <string>NETWORK_CALLBACK_URL</string> <string>http://www.test.com/response</string> </entry> </extraParameters> |
No |
Response
Field Name | Format | Size | Description |
---|---|---|---|
code | Alphanumeric | The response code of the transaction. Possible values are ERROR and SUCCESS . |
|
error | Alphanumeric | Max:2048 | The error message associated when the response code is ERROR . |
transactionResponse | Object | The response data. | |
transactionResponse > orderId | Number | The generated or existing order Id in PayU. | |
transactionResponse > transactionId | Alphanumeric | 36 | The identifier of the transaction in PayU. |
transactionResponse > state | Alphanumeric | Max:32 | The status of the transaction. As the payment is performed by the user in a physical office, the state for a successful transaction is PENDING |
transactionResponse > paymentNetworkResponseCode | Alphanumeric | Max:255 | The response code returned by the financial network. |
transactionResponse > paymentNetworkResponseErrorMessage | Alphanumeric | Max:255 | The error message returned by the financial network. |
transactionResponse > trazabilityCode | Alphanumeric | Max:32 | The traceability code returned by the financial network. |
transactionResponse > authorizationCode | Alphanumeric | Max:12 | The authorization code returned by the financial network. |
transactionResponse > pendingReason | Alphanumeric | Max:21 | The reason code associated with the status, as mentioned in transactionResponse > state , the transaction is waiting for the payment. |
transactionResponse > responseCode | Alphanumeric | Max:64 | The response code associated with the status. In this case, for successful transactions is PENDING_TRANSACTION_CONFIRMATION . |
transactionResponse > responseMessage | Alphanumeric | Max:2048 | Message associated with the response code. |
transactionResponse > operationDate | Date | Creation date of the response in the PayU´s system. | |
transactionResponse > extraParameters | Object | For cash payments, extraParameters has a single element with the URL to which you must redirect your customer.In JSON, the extraParameters parameter is: "extraParameters": { "BANK_URL": "https://www.multicaja.cl/bdp/order.xhtml?id=123456789012345" } In XML, the extraParameters parameter is: <extraParameters> <entry> <string>BANK_URL</string> <string>https://www.multicaja.cl/bdp/order.xhtml?id=123456789012345</string> </entry> </extraParameters> |
Considerations
- The parameter
transaction.expirationDate
is not mandatory. If you don’t send this parameter, its default value is seven days after the current date at 12:00 pm.
If you send a date later than the default number of days, PayU will ignore this value and the expiration will be set as default. - You must set a response URL in the parameter
NETWORK_CALLBACK_URL
insidetransaction.extraParameters
; this URL redirects the user back to your page after they finish the online payment procedure. - You must redirect the payer to the Klap webpage (fka as Multicaja) to let them perform the cash payment. This URL is found in the
BANK_URL
parameter in the response.
API Call
The following are the bodies of the request and response of this payment method.
Request Example:
{
"language": "es",
"command": "SUBMIT_TRANSACTION",
"merchant": {
"apiKey": "4Vj8eK4rloUd272L48hsrarnUA",
"apiLogin": "pRRXKOl8ikMmt9u"
},
"transaction": {
"order": {
"accountId": "512325",
"referenceCode": "PRODUCT_TEST_2021-06-15T20:35:48.975Z",
"description": "Payment test description",
"language": "es",
"signature": "75ae7a887dfd759894c57eb1bc5a4288",
"notifyUrl": "http://www.payu.com/notify",
"additionalValues": {
"TX_VALUE": {
"value": 10000,
"currency": "CLP"
}
},
"buyer": {
"merchantBuyerId": "1",
"fullName": "First name and second buyer name",
"emailAddress": "buyer_test@test.com",
"contactPhone": "7563126",
"dniNumber": "5415668464654",
"shippingAddress": {
"street1": "Autopista Del Sol, 0 - Km.43 Costado Sur",
"street2": "5555487",
"city": "RM",
"state": "Talagante",
"country": "CL",
"postalCode": "000000",
"phone": "7563126"
}
},
"shippingAddress": {
"street1": "Autopista Del Sol, 0 - Km.43 Costado Sur",
"street2": "5555487",
"city": "RM",
"state": "Talagante",
"country": "CL",
"postalCode": "0000000",
"phone": "7563126"
}
},
"payer": {
"merchantPayerId": "1",
"fullName": "First name and second payer name",
"emailAddress": "payer_test@test.com",
"contactPhone": "7563126",
"dniNumber": "5415668464654",
"billingAddress": {
"street1": "Autopista Del Sol, 0 - Km.43 Costado Sur",
"street2": "125544",
"city": "RM",
"state": "Talagante",
"country": "CL",
"postalCode": "000000",
"phone": "7563126"
}
},
"extraParameters": {
"NETWORK_CALLBACK_URL": "http://domain.com/backup_cart/response.php"
},
"type": "AUTHORIZATION_AND_CAPTURE",
"paymentMethod": "MULTICAJA",
"expirationDate": "2021-06-18T20:00:03.105",
"paymentCountry": "CL",
"ipAddress": "127.0.0.1"
},
"test": false
}
Response Example:
{
"code": "SUCCESS",
"error": null,
"transactionResponse": {
"orderId": 857794995,
"transactionId": "f468aa69-82e0-410e-9cc2-3cabba0f970d",
"state": "PENDING",
"paymentNetworkResponseCode": null,
"paymentNetworkResponseErrorMessage": null,
"trazabilityCode": "462623325642199",
"authorizationCode": null,
"pendingReason": "AWAITING_NOTIFICATION",
"responseCode": "PENDING_TRANSACTION_CONFIRMATION",
"errorCode": null,
"responseMessage": null,
"transactionDate": null,
"transactionTime": null,
"operationDate": null,
"referenceQuestionnaire": null,
"extraParameters": {
"BANK_URL": "https://apidev.mcdesaqa.cl/bdp/order.xhtml?id=462623325642199"
},
"additionalInfo": null
}
}
Request Example:
<request>
<language>es</language>
<command>SUBMIT_TRANSACTION</command>
<merchant>
<apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
<apiLogin>pRRXKOl8ikMmt9u</apiLogin>
</merchant>
<transaction>
<order>
<accountId>512325</accountId>
<referenceCode>PRODUCT_TEST_2021-06-15T20:35:48.975Z</referenceCode>
<description>Payment test description</description>
<language>es</language>
<signature>75ae7a887dfd759894c57eb1bc5a4288</signature>
<notifyUrl>http://www.payu.com/notify</notifyUrl>
<additionalValues>
<entry>
<string>TX_VALUE</string>
<additionalValue>
<value>10000</value>
<currency>CLP</currency>
</additionalValue>
</entry>
</additionalValues>
<buyer>
<merchantBuyerId>1</merchantBuyerId>
<fullName>First name and second buyer name</fullName>
<emailAddress>buyer_test@test.com</emailAddress>
<contactPhone>7563126</contactPhone>
<dniNumber>5415668464654</dniNumber>
<shippingAddress>
<street1>Autopista Del Sol, 0 - Km.43 Costado Sur</street1>
<street2>5555487</street2>
<city>RM</city>
<state>Talagante</state>
<country>CL</country>
<postalCode>000000</postalCode>
<phone>7563126</phone>
</shippingAddress>
</buyer>
<shippingAddress>
<street1>Autopista Del Sol, 0 - Km.43 Costado Sur</street1>
<street2>5555487</street2>
<city>RM</city>
<state>Talagante</state>
<country>CL</country>
<postalCode>0000000</postalCode>
<phone>7563126</phone>
</shippingAddress>
</order>
<payer>
<merchantPayerId>1</merchantPayerId>
<fullName>First name and second payer name</fullName>
<emailAddress>payer_test@test.com</emailAddress>
<contactPhone>7563126</contactPhone>
<dniNumber>5415668464654</dniNumber>
<billingAddress>
<street1>Autopista Del Sol, 0 - Km.43 Costado Sur</street1>
<street2>5555487</street2>
<city>RM</city>
<state>Talagante</state>
<country>CL</country>
<postalCode>000000</postalCode>
<phone>7563126</phone>
</billingAddress>
</payer>
<extraParameters>
<entry>
<string>NETWORK_CALLBACK_URL</string>
<string>http://domain.com/backup_cart/response.php</string>
</entry>
</extraParameters>
<type>AUTHORIZATION_AND_CAPTURE</type>
<paymentMethod>MULTICAJA</paymentMethod>
<paymentCountry>CL</paymentCountry>
<expirationDate>2021-06-18T20:00:03.105</expirationDate>
<ipAddress>127.0.0.1</ipAddress>
</transaction>
<isTest>false</isTest>
</request>
Response Example:
<paymentResponse>
<code>SUCCESS</code>
<transactionResponse>
<orderId>1400432986</orderId>
<transactionId>71a72319-f143-4359-8cb9-bc44a21d2b25</transactionId>
<state>PENDING</state>
<trazabilityCode>a0d9d7d6-000a-4777-af78-e33917a30fd8</trazabilityCode>
<pendingReason>AWAITING_PAYMENT_IN_ENTITY</pendingReason>
<responseCode>PENDING_PAYMENT_IN_ENTITY</responseCode>
<operationDate>2021-06-16T12:22:28</operationDate>
<extraParameters>
<entry>
<string>EXPIRATION_DATE</string>
<date>2021-06-16T17:42:53</date>
</entry>
<entry>
<string>URL_PAYMENT_REDIRECT</string>
<string>https://webpay3gint.transbank.cl/webpayserver/initTransaction</string>
</entry>
<entry>
<string>TRANSBANK_DIRECT_TOKEN</string>
<string>01abbca6da54f4e4ef9eb37fb9cacf72fdcc52797f6a9ca20377bc59eb0d2706</string>
</entry>
</extraParameters>
</transactionResponse>
</paymentResponse>
Submit Transactions Using Debit and Prepaid Cards Through WebPay Plus
This method lets you process the bank debit and prepaid card payments of your customers. To integrate with these transactions, you must redirect the customer to the URL found in the response of the method.
Parameters for Request and Response
Request
Field Name | Format | Size | Description | Mandatory |
---|---|---|---|---|
language | Alphanumeric | 2 | Language used in the request, this language is used to display the error messages generated. See supported languages. | Yes |
command | Alphanumeric | Max:32 | Set SUBMIT_TRANSACTION . |
Yes |
test (JSON) isTest (XML) |
Boolean | Set true if the request is in test mode. Otherwise, set false . |
Yes | |
merchant | Object | This object has the authentication data. | Yes | |
merchant > apiLogin | Alphanumeric | Min:12 Max:32 | User or login provided by PayU. How do I get my API Login | Yes |
merchant > apiKey | Alphanumeric | Min:6 Max:32 | Password provided by PayU. How do I get my API Key | Yes |
transaction | Object | This object has the transaction data. | Yes | |
transaction > order | Object | This object has the order data. | Yes | |
transaction > order > accountId | Number | Identifier of your account. | Yes | |
transaction > order > referenceCode | Alphanumeric | Min:1 Max:255 | Represents the identifier of the order in your system. | Yes |
transaction > order > description | Alphanumeric | Min:1 Max:255 | Description of the order. | Yes |
transaction > order > language | Alphanumeric | 2 | Language used in emails sent to the buyer and the seller. | Yes |
transaction > order > notifyUrl | Alphanumeric | Max:2048 | Confirmation URL of the order. | No |
transaction > order > partnerId | Alphanumeric | Max:255 | Partner ID in PayU. | No |
transaction > order > signature | Alphanumeric | Max:255 | The signature associated to the form. For more information refer Authentication signature. | Yes |
transaction > order > shippingAddress | Object | Shipping address. | No | |
transaction > order > shippingAddress > street1 | Alphanumeric | Max:100 | Address Line 1. | No |
transaction > order > shippingAddress > street2 | Alphanumeric | Max:100 | Address Line 2. | No |
transaction > order > shippingAddress > city | Alphanumeric | Max:50 | Address city. | No |
transaction > order > shippingAddress > state | Alphanumeric | Max:40 | Address State. | No |
transaction > order > shippingAddress > country | Alphanumeric | 2 | Address country. | No |
transaction > order > shippingAddress > postalCode | Alphanumeric | Max:8 | Address Zip code. | No |
transaction > order > shippingAddress > phone | Alphanumeric | Max:11 | Phone number associated to the address. | No |
transaction > order > buyer | Object | Buyer information. | Yes | |
transaction > order > buyer > merchantBuyerId | Alphanumeric | Max:100 | Buyer ID in your system. | No |
transaction > order > buyer > fullName | Alphanumeric | Max:150 | Full name of the buyer. | Yes |
transaction > order > buyer > emailAddress | Alphanumeric | Max:255 | E-mail of the buyer. | Yes |
transaction > order > buyer > contactPhone | Alphanumeric | Max:20 | Phone number of the buyer. | Yes |
transaction > order > buyer > dniNumber | Alphanumeric | Max:20 | Identification number of the buyer. | Yes |
transaction > order > buyer > shippingAddress | Alphanumeric | Shipping address of the buyer. | Yes | |
transaction > order > buyer > shippingAddress > street1 | Alphanumeric | Max:150 | Buyer’s shipping address Line 1. | Yes |
transaction > order > buyer > shippingAddress > city | Alphanumeric | Max:50 | Buyer’s shipping address city. | Yes |
transaction > order > buyer > shippingAddress > state | Alphanumeric | Max:40 | Buyer’s shipping address state. | Yes |
transaction > order > buyer > shippingAddress > country | Alphanumeric | 2 | Buyer’s shipping address country in format ISO 3166 alpha-2. | Yes |
transaction > order > buyer > shippingAddress > postalCode | Number | Max:20 | Buyer’s shipping address zip code. | Yes |
transaction > order > buyer > shippingAddress > phone | Number | Max:20 | Buyer’s shipping address phone number. | Yes |
transaction > order > additionalValues > | Object | 64 | Amount of the order or its associated values. | Yes |
transaction > order > additionalValues > TX_VALUE | Alphanumeric | 64 | Amount of the transaction. | Yes |
transaction > order > additionalValues > TX_VALUE > value | Number | 12, 2 | Specifies the amount of the transaction. This amount cannot include decimals. | Yes |
transaction > order > additionalValues > TX_VALUE > currency | Alphanumeric | 3 | ISO code of the currency. See accepted currencies. | Yes |
transaction > order > additionalValues > TX_TAX | Alphanumeric | 64 | Amount of the Value Added Tax (VAT). | Yes |
transaction > order > additionalValues > TX_TAX > value | Number | 12, 2 | Specifies the amount of the VAT. | No |
transaction > order > additionalValues > TX_TAX > currency | Alphanumeric | 3 | ISO code of the currency. See accepted currencies. | No |
transaction > order > additionalValues > TX_TAX_RETURN_BASE | Alphanumeric | 64 | Base value to calculate the VAT. If the amount does not have IVA, send 0. This value may have two decimal digits. |
No |
transaction > order > additionalValues > TX_TAX_RETURN_BASE > value | Number | 12, 2 | Specifies the base amount of the transaction. | No |
transaction > order > additionalValues > TX_TAX_RETURN_BASE > currency | Alphanumeric | 3 | ISO code of the currency. See accepted currencies. | No |
transaction > payer | Object | Payer information. | Yes | |
transaction > payer > emailAddress | Alphanumeric | Max:255 | Payer e-mail address. | Yes |
transaction > payer > merchantPayerId | Alphanumeric | Max:100 | Identifier of the payer in your system. | No |
transaction > payer > fullName | Alphanumeric | Max:150 | Name of the payer. | Yes |
transaction > payer > billingAddress | Object | Billing address. | Yes | |
transaction > payer > billingAddress > street1 | Alphanumeric | Max:100 | Billing Address Line 1. | Yes |
transaction > payer > billingAddress > street2 | Alphanumeric | Max:100 | Billing Address Line 2. | No |
transaction > payer > billingAddress > city | Alphanumeric | Max:50 | Billing address city. | Yes |
transaction > payer > billingAddress > state | Alphanumeric | Max:40 | Billing address state. | No |
transaction > payer > billingAddress > country | Alphanumeric | 2 | Billing address country in format ISO 3166 Alpha-2. | Yes |
transaction > payer > billingAddress > postalCode | Alphanumeric | Max:20 | Billing address zip code. | No |
transaction > payer > billingAddress > phone | Alphanumeric | Max:20 | Billing address phone number. | No |
transaction > payer > birthdate | Alphanumeric | Max:10 | Payer’s date of birth. | No |
transaction > payer > contactPhone | Alphanumeric | Max:20 | Payer’s phone number. | Yes |
transaction > payer > dniNumber | Alphanumeric | Max:20 | Identification number of the buyer. | Yes |
transaction > payer > dniType | Alphanumeric | 2 | Identification type of the buyer. See Document types. | No |
transaction > type | Alphanumeric | 32 | As payments are made on the WebPay plus page, the only available transaction type is AUTHORIZATION_AND_CAPTURE |
Yes |
transaction > paymentMethod | Alphanumeric | 32 | Select a valid Payment Method for Debit and prepaid cards. See the available Payment Methods for Chile. | Yes |
transaction > paymentCountry | Alphanumeric | 2 | Set CL for Chile. |
Yes |
transaction > deviceSessionId | Alphanumeric | Max:255 | Session identifier of the device where the customer performs the transaction. For more information, refer to this topic. | Yes |
transaction > ipAddress | Alphanumeric | Max:39 | IP address of the device where the customer performs the transaction. | Yes |
transaction > cookie | Alphanumeric | Max:255 | Cookie stored by the device where the customer performs the transaction. | Yes |
transaction > userAgent | Alphanumeric | Max:1024 | The User agent of the browser where the customer performs the transaction. | Yes |
transaction > extraParameters | Object | Additional parameters or data associated with the request. For payments through WebPay plus, this is the response page of your commerce. In JSON, the extraParameters parameter is set as: "extraParameters": { "RESPONSE_URL": "http://www.test.com/response" } In XML, the extraParameters parameter is set as: <extraParameters> <entry> <string>RESPONSE_URL</string> http://www.test.com/response </entry> </extraParameters> |
No |
Response
Field Name | Format | Size | Description |
---|---|---|---|
code | Alphanumeric | The response code of the transaction. Possible values are ERROR and SUCCESS . |
|
error | Alphanumeric | Max:2048 | The error message associated when the response code is ERROR . |
transactionResponse | Object | The response data. | |
transactionResponse > orderId | Number | The generated or existing order Id in PayU. | |
transactionResponse > transactionId | Alphanumeric | 36 | The identifier of the transaction in PayU. |
transactionResponse > state | Alphanumeric | Max:32 | The status of the transaction. As the payment is performed by the user in a physical office, the state for a successful transaction is PENDING |
transactionResponse > paymentNetworkResponseCode | Alphanumeric | Max:255 | The response code returned by the financial network. |
transactionResponse > paymentNetworkResponseErrorMessage | Alphanumeric | Max:255 | The error message returned by the financial network. |
transactionResponse > trazabilityCode | Alphanumeric | Max:32 | The traceability code returned by the financial network. |
transactionResponse > authorizationCode | Alphanumeric | Max:12 | The authorization code returned by the financial network. |
transactionResponse > pendingReason | Alphanumeric | Max:21 | The reason code associated with the status, as mentioned in transactionResponse > state , the transaction is waiting for the payment. |
transactionResponse > responseCode | Alphanumeric | Max:64 | The response code associated with the status. In this case, for successful transactions is PENDING_PAYMENT_IN_ENTITY . |
transactionResponse > responseMessage | Alphanumeric | Max:2048 | Message associated with the response code. |
transactionResponse > operationDate | Date | Creation date of the response in the PayU´s system. | |
transactionResponse > extraParameters | Object | Additional parameters or data associated with the response. In JSON, the extraParameters parameter follows this structure: "extraParameters": { "URL_PAYMENT_REDIRECT": "xxxx" } In XML, the extraParameters parameter follows this structure: <extraParameters> <entry> <string>URL_PAYMENT_REDIRECT</string> <string>xxxx</string> </entry> </extraParameters> |
Considerations
- If you don’t send the
RESPONSE_URL
parameter intransaction.extraParameters
, the API takes the value from the Response URL variable in your PayU Module (Settings > Technical configuration). - When you process payments through WebPay plus, you must redirect the customer to the URL found in the
URL_PAYMENT_REDIRECT
extra parameter concatenated with theTRANSBANK_DIRECT_TOKEN
extra parameter as follows:
URL_PAYMENT_REDIRECT?token_ws=TRANSBANK_DIRECT_TOKEN
. - If the payment request is successful, the transaction has state
PENDING
and responseCodePENDING_PAYMENT_IN_ENTITY
; this is because the payer is redirected to the selected bank to complete the payment. - The response page must have the following variables:
Variable | Description |
---|---|
transactionState | State of the transaction. |
reference_pol | Reference code to identify a transaction in PayU. |
TX_VALUE | Transaction amount. |
authorizationCode | Authorization code of the transaction. |
processingDate | Transaction date. |
cc_number | Visible number of the card used in the transaction. |
The variables above are sent via GET.
API Call
The following are the bodies of the request and response of this payment method.
Request Example:
{
"language": "es",
"command": "SUBMIT_TRANSACTION",
"merchant": {
"apiKey": "4Vj8eK4rloUd272L48hsrarnUA",
"apiLogin": "pRRXKOl8ikMmt9u"
},
"transaction": {
"order": {
"accountId": "512325",
"referenceCode": "PRODUCT_TEST_2021-06-15T20:35:48.975Z",
"description": "Payment test description",
"language": "es",
"signature": "75ae7a887dfd759894c57eb1bc5a4288",
"notifyUrl": "http://www.payu.com/notify",
"additionalValues": {
"TX_VALUE": {
"value": 10000,
"currency": "CLP"
}
},
"buyer": {
"merchantBuyerId": "1",
"fullName": "First name and second buyer name",
"emailAddress": "buyer_test@test.com",
"contactPhone": "7563126",
"dniNumber": "5415668464654",
"shippingAddress": {
"street1": "Autopista Del Sol, 0 - Km.43 Costado Sur",
"street2": "5555487",
"city": "RM",
"state": "Talagante",
"country": "CL",
"postalCode": "000000",
"phone": "7563126"
}
},
"shippingAddress": {
"street1": "Autopista Del Sol, 0 - Km.43 Costado Sur",
"street2": "5555487",
"city": "RM",
"state": "Talagante",
"country": "CL",
"postalCode": "000000",
"phone": "7563126"
}
},
"payer": {
"merchantPayerId": "1",
"fullName": "First name and second payer name",
"emailAddress": "payer_test@test.com",
"contactPhone": "7563126",
"dniNumber": "5415668464654",
"billingAddress": {
"street1": "Autopista Del Sol, 0 - Km.43 Costado Sur",
"street2": "5555487",
"city": "RM",
"state": "Talagante",
"country": "CL",
"postalCode": "000000",
"phone": "7563126"
}
},
"extraParameters": {
"RESPONSE_URL": "http://www.test.com/response"
},
"type": "AUTHORIZATION_AND_CAPTURE",
"paymentMethod": "TRANSBANK_DEBIT",
"paymentCountry": "CL",
"deviceSessionId": "vghs6tvkcle931686k1900o6e1",
"ipAddress": "127.0.0.1",
"cookie": "pt1t38347bs6jc9ruv2ecpv7o2",
"userAgent": "Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0"
},
"test": false
}
Response Example:
{
"code": "SUCCESS",
"error": null,
"transactionResponse": {
"orderId": 1400432466,
"transactionId": "e2609a58-97d6-4a65-8638-1b03da03cc7a",
"state": "PENDING",
"paymentNetworkResponseCode": null,
"paymentNetworkResponseErrorMessage": null,
"trazabilityCode": "5f0cac61-c023-4fa3-bf27-ff888fa36c3c",
"authorizationCode": null,
"pendingReason": "AWAITING_PAYMENT_IN_ENTITY",
"responseCode": "PENDING_PAYMENT_IN_ENTITY",
"errorCode": null,
"responseMessage": null,
"transactionDate": null,
"transactionTime": null,
"operationDate": 1623856942412,
"referenceQuestionnaire": null,
"extraParameters": {
"EXPIRATION_DATE": 1623875847781,
"URL_PAYMENT_REDIRECT": "https://webpay3gint.transbank.cl/webpayserver/initTransaction",
"TRANSBANK_DIRECT_TOKEN": "01ab155164939156988ee462d09ed5613b7efd297fe97b099c684ec8599c5cc5"
},
"additionalInfo": null
}
}
Request Example:
<request>
<language>es</language>
<command>SUBMIT_TRANSACTION</command>
<merchant>
<apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
<apiLogin>pRRXKOl8ikMmt9u</apiLogin>
</merchant>
<transaction>
<order>
<accountId>512325</accountId>
<referenceCode>PRODUCT_TEST_2021-06-15T20:35:48.975Z</referenceCode>
<description>Payment test description</description>
<language>es</language>
<signature>75ae7a887dfd759894c57eb1bc5a4288</signature>
<notifyUrl>http://www.payu.com/notify</notifyUrl>
<additionalValues>
<entry>
<string>TX_VALUE</string>
<additionalValue>
<value>10000</value>
<currency>CLP</currency>
</additionalValue>
</entry>
</additionalValues>
<buyer>
<merchantBuyerId>1</merchantBuyerId>
<fullName>First name and second buyer name</fullName>
<emailAddress>buyer_test@test.com</emailAddress>
<contactPhone>7563126</contactPhone>
<dniNumber>5415668464654</dniNumber>
<shippingAddress>
<street1>Autopista Del Sol, 0 - Km.43 Costado Sur</street1>
<street2>5555487</street2>
<city>RM</city>
<state>Talagante</state>
<country>CL</country>
<postalCode>000000</postalCode>
<phone>7563126</phone>
</shippingAddress>
</buyer>
<shippingAddress>
<street1>Autopista Del Sol, 0 - Km.43 Costado Sur</street1>
<street2>5555487</street2>
<city>RM</city>
<state>Talagante</state>
<country>CL</country>
<postalCode>0000000</postalCode>
<phone>7563126</phone>
</shippingAddress>
</order>
<payer>
<merchantPayerId>1</merchantPayerId>
<fullName>First name and second payer name</fullName>
<emailAddress>payer_test@test.com</emailAddress>
<contactPhone>7563126</contactPhone>
<dniNumber>5415668464654</dniNumber>
<billingAddress>
<street1>Autopista Del Sol, 0 - Km.43 Costado Sur</street1>
<street2>5555487</street2>
<city>RM</city>
<state>Talagante</state>
<country>CL</country>
<postalCode>000000</postalCode>
<phone>7563126</phone>
</billingAddress>
</payer>
<extraParameters>
<entry>
<string>RESPONSE_URL</string>
<string>http://www.test.com/response</string>
</entry>
</extraParameters>
<type>AUTHORIZATION_AND_CAPTURE</type>
<paymentMethod>TRANSBANK_DEBIT</paymentMethod>
<paymentCountry>CL</paymentCountry>
<deviceSessionId>vghs6tvkcle931686k1900o6e1</deviceSessionId>
<ipAddress>127.0.0.1</ipAddress>
<cookie>pt1t38347bs6jc9ruv2ecpv7o2</cookie>
<userAgent>Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0</userAgent>
</transaction>
<isTest>false</isTest>
</request>
Response Example:
<paymentResponse>
<code>SUCCESS</code>
<transactionResponse>
<orderId>1400432986</orderId>
<transactionId>71a72319-f143-4359-8cb9-bc44a21d2b25</transactionId>
<state>PENDING</state>
<trazabilityCode>a0d9d7d6-000a-4777-af78-e33917a30fd8</trazabilityCode>
<pendingReason>AWAITING_PAYMENT_IN_ENTITY</pendingReason>
<responseCode>PENDING_PAYMENT_IN_ENTITY</responseCode>
<operationDate>2021-06-16T12:22:28</operationDate>
<extraParameters>
<entry>
<string>EXPIRATION_DATE</string>
<date>2021-06-16T17:42:53</date>
</entry>
<entry>
<string>URL_PAYMENT_REDIRECT</string>
<string>https://webpay3gint.transbank.cl/webpayserver/initTransaction</string>
</entry>
<entry>
<string>TRANSBANK_DIRECT_TOKEN</string>
<string>01abbca6da54f4e4ef9eb37fb9cacf72fdcc52797f6a9ca20377bc59eb0d2706</string>
</entry>
</extraParameters>
</transactionResponse>
</paymentResponse>
Available Payment Methods Query
This method returns a list of the payment methods available in all countries.
Parameters for Request and Response
Request
Field Name | Format | Size | Description | Mandatory |
---|---|---|---|---|
language | Alphanumeric | 2 | Language used in the request, this language is used to display the error messages generated. See supported languages. | Yes |
command | Alphanumeric | Max:32 | Set GET_PAYMENT_METHODS . |
Yes |
test (JSON) isTest (XML) |
Boolean | Set true if the request is in test mode. Otherwise, set false . |
Yes | |
merchant | Object | This object has the authentication data. | Yes | |
merchant > apiLogin | Alphanumeric | Min:12 Max:32 | User or login provided by PayU. How do I get my API Login | Yes |
merchant > apiKey | Alphanumeric | Min:6 Max:32 | Password provided by PayU. How do I get my API Key | Yes |
Response
Field Name | Format | Size | Description |
---|---|---|---|
code | Alphanumeric | The response code of the transaction. Possible values are ERROR and SUCCESS . |
|
error | Alphanumeric | Max:2048 | The error message associated when the response code is ERROR . |
paymentMethods | Object | List of the payment methods. | |
paymentMethods > paymentMethodComplete | Object | This object has the information of a payment method. | |
paymentMethods > paymentMethodComplete > id | Numeric | Payment method identifier. | |
paymentMethods > paymentMethodComplete > description | Alphanumeric | Max:32 | Payment method name. |
paymentMethods > paymentMethodComplete > country | Alphanumeric | 2 | ISO code of the Payment method country. |
API Call
The following are the examples of the request and response of this method. For the sake of the example, the response here shows two payment methods.
Request Example:
{
"test": false,
"language": "en",
"command": "GET_PAYMENT_METHODS",
"merchant": {
"apiLogin": "pRRXKOl8ikMmt9u",
"apiKey": "4Vj8eK4rloUd272L48hsrarnUA"
}
}
Response Example:
{
"code": "SUCCESS",
"error": null,
"paymentMethods": [
{
"id": "716",
"description": "VISA",
"country": "CL",
"enabled": true,
"reason": null
},
{
"id": "712",
"description": "DINERS",
"country": "CL",
"enabled": true,
"reason": null
}
]
}
Request Example:
<request>
<language>en</language>
<command>GET_PAYMENT_METHODS</command>
<merchant>
<apiLogin>pRRXKOl8ikMmt9u</apiLogin>
<apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
</merchant>
<isTest>false</isTest>
</request>
Response Example:
<paymentMethodsResponse>
<code>SUCCESS</code>
<paymentMethods>
<paymentMethodComplete>
<id>716</id>
<description>VISA</description>
<country>CL</country>
<enabled>true</enabled>
</paymentMethodComplete>
<paymentMethodComplete>
<id>712</id>
<description>DINERS</description>
<country>CL</country>
<enabled>true</enabled>
</paymentMethodComplete>
</paymentMethods>
</paymentMethodsResponse>
Ping
The PING
method lets you verify the connection to our platform.
Parameters for Request and Response
Request
Field Name | Format | Size | Description | Mandatory |
---|---|---|---|---|
language | Alphanumeric | 2 | Language used in the request, this language is used to display the error messages generated. See supported languages. | Yes |
command | Alphanumeric | Max:32 | Set PING . |
Yes |
test (JSON) isTest (XML) |
Boolean | Set true if the request is in test mode. Otherwise, set false . |
Yes | |
merchant | Object | This object has the authentication data. | Yes | |
merchant > apiLogin | Alphanumeric | Min:12 Max:32 | User or login provided by PayU. How do I get my API Login | Yes |
merchant > apiKey | Alphanumeric | Min:6 Max:32 | Password provided by PayU. How do I get my API Key | Yes |
Response
Field Name | Format | Size | Description | Mandatory |
---|---|---|---|---|
code | Alphanumeric | The response code of the transaction. | Yes | |
error | Alphanumeric | Max:2048 | The error message associated if an error ocurred. | Yes |
transactionResponse | Object | Max:2048 | The response of the PING method if an error ocurred. | Yes |
API Call
The following are the examples of the request and response of this method.
Request Example:
{
"test": false,
"language": "en",
"command": "PING",
"merchant": {
"apiLogin": "pRRXKOl8ikMmt9u",
"apiKey": "4Vj8eK4rloUd272L48hsrarnUA"
}
}
Response Example:
{
"code": "SUCCESS",
"error": null,
"transactionResponse": null
}
Request Example:
<request>
<language>en</language>
<command>PING</command>
<merchant>
<apiLogin>pRRXKOl8ikMmt9u</apiLogin>
<apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
</merchant>
<isTest>false</isTest>
</request>
Response Example:
<paymentResponse>
<code>SUCCESS</code>
</paymentResponse>