Payments API - Peru

Payments API Peru lets your shop process different transaction types with multiple payment methods.

To integrate with Payments API Peru, target your request to the following URLs according to your environment.

Available methods

Payments API includes the following methods:

Submit transaction with credit or debit cards

This method lets you process the payments performed by your customers using credit or debit cards. For Peru, you can perform the two-step flows (Authorization, Capture), and one-step flows (Charge). For more information, refer to Payment flows.

Variables for request and response

Request
Field name Format Size Description
language Alphanumeric 2 Language used in the request, this language is used to display the error messages generated. See supported languages.
command Alphanumeric Max:32 Set SUBMIT_TRANSACTION.
test (JSON)
isTest (XML)
Boolean Set true if the request is in test mode. Otherwise, set false.
merchant This object has the authentication data.
merchant > apiLogin Alphanumeric Min:12 Max:32 User or login provided by PayU. How do I get my API Login
merchant > apiKey Alphanumeric Min:6 Max:32 Password provided by PayU. How do I get my API Key
transaction This object has the transaction data.
transaction > order This object has the order data.
transaction > order > accountId Number Identifier of your account.
transaction > order > referenceCode Alphanumeric Min:1 Max:255 Represents the identifier of the order in your system.
transaction > order > description Alphanumeric Min:1 Max:255 Description of the order.
transaction > order > language Alphanumeric 2 Language used in emails sent to the buyer and the seller.
transaction > order > notifyUrl Alphanumeric Max:2048 Confirmation URL of the order.
transaction > order > partnerId Alphanumeric Max:255 Partner ID in PayU.
transaction > order > signature Alphanumeric Max:255 The signature associated to the form. For more information refer Authentication signature.
transaction > order > shippingAddress Shipping address.
transaction > order > shippingAddress > street1 Alphanumeric Max:100 Address Line 1.
transaction > order > shippingAddress > street2 Alphanumeric Max:100 Address Line 2.
transaction > order > shippingAddress > city Alphanumeric Max:50 Address city.
transaction > order > shippingAddress > state Alphanumeric Max:40 Address State.
transaction > order > shippingAddress > country Alphanumeric 2 Address country.
transaction > order > shippingAddress > postalCode Alphanumeric Max:8 Address Zip code.
transaction > order > shippingAddress > phone Alphanumeric Max:11 Phone number associated to the address.
transaction > order > buyer Buyer information.
transaction > order > buyer > merchantBuyerId Alphanumeric Max:100 Buyer ID in your system.
transaction > order > buyer > fullName Alphanumeric Max:150 Full name of the buyer.
transaction > order > buyer > emailAddress Alphanumeric Max:255 E-mail of the buyer.
transaction > order > buyer > contactPhone Alphanumeric Max:20 Phone number of the buyer.
transaction > order > buyer > dniNumber Alphanumeric Max:20 Identification number of the buyer.
transaction > order > buyer > shippingAddress Alphanumeric Shipping address of the buyer.
transaction > order > buyer > shippingAddress > street1 Alphanumeric Max:150 Buyer’s shipping address Line 1.
transaction > order > buyer > shippingAddress > city Alphanumeric Max:50 Buyer’s shipping address city.
transaction > order > buyer > shippingAddress > state Alphanumeric Max:40 Buyer’s shipping address state.
transaction > order > buyer > shippingAddress > country Alphanumeric 2 Buyer’s shipping address country in format ISO 3166 alpha-2.
transaction > order > buyer > shippingAddress > postalCode Number Max:20 Buyer’s shipping address zip code.
transaction > order > buyer > shippingAddress > phone Number Max:20 Buyer’s shipping address phone number.
transaction > order > additionalValues > 64 Amount of the order or its associated values.
transaction > order > additionalValues > TX_VALUE Alphanumeric 64 Amount of the transaction.
transaction > order > additionalValues > TX_VALUE > value Number 19, 2 Specifies the amount of the transaction, this value may have two decimal digits (Ex. 10000.00 or 10000).
transaction > order > additionalValues > TX_VALUE > currency Alphanumeric 3 ISO code of the currency. See accepted currencies.
transaction > order > additionalValues > TX_TAX Alphanumeric 64 Amount of the Value Added Tax (VAT).
transaction > order > additionalValues > TX_TAX > value Number 19, 2 Specifies the amount of the VAT.
transaction > order > additionalValues > TX_TAX > currency Alphanumeric 3 ISO code of the currency. See accepted currencies.
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.
transaction > order > additionalValues > TX_TAX_RETURN_BASE > value Number 19, 2 Specifies the base amount of the transaction.
transaction > order > additionalValues > TX_TAX_RETURN_BASE > currency Alphanumeric 3 ISO code of the currency. See accepted currencies.
transaction > creditCardTokenId 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
transaction > creditCard Credit card information. If you process using debit card, do not send this parameter
transaction > creditCard > number Alphanumeric Min:13 Max:20 Credit card number.
transaction > creditCard > securityCode Alphanumeric Min:1 Max:4 Credit card security code (CVC2, CVV2, CID).
transaction > creditCard > expirationDate Alphanumeric 7 Credit card expiration date. Format YYYY/MM.
transaction > creditCard > name Alphanumeric Min:1 Max:255 Holder’s name displayed in the credit card.
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.
transaction > debitCard Debit card information. If you process using credit card, do not send this parameter
transaction > debitCard > number Alphanumeric Min:13 Max:20 Debit card number.
transaction > debitCard > securityCode Alphanumeric Min:1 Max:4 Debit card security code (CVC2, CVV2, CID).
transaction > debitCard > expirationDate Alphanumeric 7 Debit card expiration date. Format YYYY/MM.
transaction > debitCard > name Alphanumeric Min:1 Max:255 Holder’s name displayed in the debit card.
transaction > payer Payer information.
transaction > payer > emailAddress Alphanumeric Max:255 Payer e-mail address.
transaction > payer > merchantPayerId Alphanumeric Max:100 Identifier of the payer in your system.
transaction > payer > fullName Alphanumeric Max:150 Name of the payer which must meet the name sent in the parameter > creditCard > name for credit card payments.
transaction > payer > billingAddress Billing address.
transaction > payer > billingAddress > street1 Alphanumeric Max:100 Billing Address Line 1.
transaction > payer > billingAddress > street2 Alphanumeric Max:100 Billing Address Line 2.
transaction > payer > billingAddress > city Alphanumeric Max:50 Billing address city.
transaction > payer > billingAddress > state Alphanumeric Max:40 Billing address state.
transaction > payer > billingAddress > country Alphanumeric 2 Billing address country in format ISO 3166 Alpha-2.
transaction > payer > billingAddress > postalCode Alphanumeric Max:20 Billing address zip code.
transaction > payer > billingAddress > phone Alphanumeric Max:20 Billing address phone number.
transaction > payer > birthdate Alphanumeric Max:10 Buyer’s date of birth.
transaction > payer > contactPhone Alphanumeric Max:20 Buyer’s phone number.
transaction > payer > dniNumber Alphanumeric Max:20 Identification number of the buyer.
transaction > payer > dniType Alphanumeric 2 Identification type of the buyer. See Document types.
transaction > type Alphanumeric 32 Set this value according to the transaction you want:
  • AUTHORIZATION
  • CAPTURE
  • AUTHORIZATION_AND_CAPTURE for one-step flows.
transaction > paymentMethod Alphanumeric 32 Select a valid Credit or Debit card Payment Method. See the available Payment Methods for Peru.
transaction > paymentCountry Alphanumeric 2 Set PE for Peru.
transaction > deviceSessionId Alphanumeric Max:255 Session identifier of the device where the customer performs the transaction. For more information, refer to this topic.
transaction > ipAddress Alphanumeric Max:39 IP address of the device where the customer performs the transaction.
transaction > cookie Alphanumeric Max:255 Cookie stored by the device where the customer performs the transaction.
transaction > userAgent Alphanumeric Max:1024 The User agent of the browser where the customer performs the transaction.
transaction > extraParameters 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>
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 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 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

  • For payments with credit card tokens, include the parameters transaction.creditCardTokenId and transaction.creditCard.securityCode replacing the information of the credit card (if you process with security code). For more information, refer to Tokenization API.
  • By default, processing credit cards without security code is not enabled. If you want to enable this feature, contact your Sales representative. After this feature is enabled for you, send in the request the variable creditCard.processWithoutCvv2 as true and remove the variable creditCard.securityCode.
  • In Peru, you can select 0 or 2 to 36 installments when paying with credit card. If you select one (1) installment, PayU sends zero (0) as default value.

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 body:

{
   "language": "es",
   "command": "SUBMIT_TRANSACTION",
   "merchant": {
      "apiKey": "4Vj8eK4rloUd272L48hsrarnUA",
      "apiLogin": "pRRXKOl8ikMmt9u"
   },
   "transaction": {
      "order": {
         "accountId": "512323",
         "referenceCode": "PRODUCT_TEST_2021-06-21T16:39:10.965Z",
         "description": "Payment test description",
         "language": "es",
         "signature": "af24b22ad0aa0b14dbe3c21a07d9558c",
         "notifyUrl": "http://www.payu.com/notify",
         "additionalValues": {
            "TX_VALUE": {
               "value": 100,
               "currency": "PEN"
         }
         },
         "buyer": {
            "merchantBuyerId": "1",
            "fullName": "First name and second buyer name",
            "emailAddress": "buyer_test@test.com",
            "contactPhone": "7563126",
            "dniNumber": "123456789",
            "shippingAddress": {
               "street1": "Av. Isabel La Católica 103-La Victoria",
               "street2": "5555487",
               "city": "Lima",
               "state": "Lima y Callao",
               "country": "PE",
               "postalCode": "000000",
               "phone": "7563126"
            }
         },
         "shippingAddress": {
            "street1": "Av. Isabel La Católica 103-La Victoria",
            "street2": "5555487",
            "city": "Lima",
            "state": "Lima y Callao",
            "country": "PE",
            "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": "Av. Isabel La Católica 103-La Victoria",
            "street2": "125544",
            "city": "Lima",
            "state": "Lima y Callao",
            "country": "PE",
            "postalCode": "000000",
            "phone": "7563126"
         }
      },
      "creditCard": {
         "number": "4097440000000004",
         "securityCode": "321",
         "expirationDate": "2022/12",
         "name": "APPROVED"
      },
      "extraParameters": {
         "INSTALLMENTS_NUMBER": 1
      },
      "type": "AUTHORIZATION",
      "paymentMethod": "VISA",
      "paymentCountry": "PE",
      "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": true
}

Response body:

{
    "code": "SUCCESS",
    "error": null,
    "transactionResponse": {
        "orderId": 1400443216,
        "transactionId": "eebf01c3-7531-4952-a8e8-647a9eebac95",
        "state": "APPROVED",
        "paymentNetworkResponseCode": "000",
        "paymentNetworkResponseErrorMessage": null,
        "trazabilityCode": "77821",
        "authorizationCode": "170921",
        "pendingReason": null,
        "responseCode": "APPROVED",
        "errorCode": null,
        "responseMessage": "Aprobado y completado con exito",
        "transactionDate": null,
        "transactionTime": null,
        "operationDate": 1624275552379,
        "referenceQuestionnaire": null,
        "extraParameters": {
            "BANK_REFERENCED_CODE": "CREDIT"
        },
        "additionalInfo": null
    }
}

Request body:

<request>
   <language>es</language>
   <command>SUBMIT_TRANSACTION</command>
   <merchant>
      <apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
      <apiLogin>pRRXKOl8ikMmt9u</apiLogin>
   </merchant>
   <transaction>
      <order>
         <accountId>512323</accountId>
         <referenceCode>PRODUCT_TEST_2021-06-21T16:39:10.965Z</referenceCode>
         <description>Payment test description</description>
         <language>es</language>
         <signature>af24b22ad0aa0b14dbe3c21a07d9558c</signature>
         <notifyUrl>http://www.payu.com/notify</notifyUrl>
         <additionalValues>
            <entry>
               <string>TX_VALUE</string>
               <additionalValue>
                  <value>100</value>
                  <currency>PEN</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>Av. Isabel La Católica 103-La Victoria</street1>
               <street2>5555487</street2>
               <city>Lima</city>
               <state>Lima y Callao</state>
               <country>PE</country>
               <postalCode>000000</postalCode>
               <phone>7563126</phone>
            </shippingAddress>
         </buyer>
         <shippingAddress>
            <street1>Av. Isabel La Católica 103-La Victoria</street1>
            <street2>5555487</street2>
            <city>Lima</city>
            <state>Lima y Callao</state>
            <country>PE</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>Av. Isabel La Católica 103-La Victoria</street1>
            <street2>5555487</street2>
            <city>Lima</city>
            <state>Lima y Callao</state>
            <country>PE</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>PE</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 body:

<paymentResponse>
    <code>SUCCESS</code>
    <transactionResponse>
        <orderId>1400443244</orderId>
        <transactionId>62cb2c6a-a9d5-4438-a767-7be501f0973d</transactionId>
        <state>APPROVED</state>
        <paymentNetworkResponseCode>000</paymentNetworkResponseCode>
        <trazabilityCode>77821</trazabilityCode>
        <authorizationCode>170921</authorizationCode>
        <responseCode>APPROVED</responseCode>
        <responseMessage>Aprobado y completado con exito</responseMessage>
        <operationDate>2021-06-21T06:47:21</operationDate>
        <extraParameters>
            <entry>
                <string>BANK_REFERENCED_CODE</string>
                <string>CREDIT</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.

  • You can perform partial captures over an authorized amount. To do this, you need to send in the request the parameter transaction.order.additionalValues.TX_VALUE with its value (as sent during the Authorization) and set PARTIAL_CAPTURE for transaction.type.
  • For partial captures, the minimum value to capture can be 10% lower than the amount authorized.
  • For partial captures, the payment networks release the no captured value at 2-10 days for local cards and 28 days for foreign cards.

The following are the request and response bodies for this transaction type.


Request body:

{
   "language": "es",
   "command": "SUBMIT_TRANSACTION",
   "merchant": {
      "apiLogin": "pRRXKOl8ikMmt9u",
      "apiKey": "4Vj8eK4rloUd272L48hsrarnUA"
   },
   "transaction": {
      "order": {
         "id": "1400443216"
      },
      "type": "CAPTURE",
      "parentTransactionId": "eebf01c3-7531-4952-a8e8-647a9eebac95"
   },
   "test": false
}

Response body:

{
    "code": "SUCCESS",
    "error": null,
    "transactionResponse": {
        "orderId": 1400443382,
        "transactionId": "e82d47b3-72cf-42f0-ae30-3eeb42575cc7",
        "state": "APPROVED",
        "paymentNetworkResponseCode": "00",
        "paymentNetworkResponseErrorMessage": null,
        "trazabilityCode": "10140044338210c",
        "authorizationCode": "APPROVED",
        "pendingReason": null,
        "responseCode": "APPROVED",
        "errorCode": null,
        "responseMessage": null,
        "transactionDate": null,
        "transactionTime": null,
        "operationDate": 1624279912864,
        "referenceQuestionnaire": null,
        "additionalInfo": null
    }
}


Request body:

<request>
   <language>es</language>
   <command>SUBMIT_TRANSACTION</command>
   <merchant>
      <apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
      <apiLogin>pRRXKOl8ikMmt9u</apiLogin>
   </merchant>
   <transaction>
      <order>
         <id>1400443382</id>
      </order>
      <type>CAPTURE</type>
      <parentTransactionId>10ccdb41-3fa8-4961-b6c0-88d74f737d4e</parentTransactionId>
   </transaction>
   <isTest>false</isTest>
</request>

Response body:

<paymentResponse>
    <code>SUCCESS</code>
    <transactionResponse>
        <orderId>1400443382</orderId>
        <transactionId>e82d47b3-72cf-42f0-ae30-3eeb42575cc7</transactionId>
        <state>APPROVED</state>
        <paymentNetworkResponseCode>00</paymentNetworkResponseCode>
        <trazabilityCode>10140044338210c</trazabilityCode>
        <authorizationCode>APPROVED</authorizationCode>
        <responseCode>APPROVED</responseCode>
        <responseMessage>APPROVED</responseMessage>
        <operationDate>2021-06-21T07:51:52</operationDate>
    </transactionResponse>
</paymentResponse>

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 body:

{
   "language": "es",
   "command": "SUBMIT_TRANSACTION",
   "merchant": {
      "apiKey": "4Vj8eK4rloUd272L48hsrarnUA",
      "apiLogin": "pRRXKOl8ikMmt9u"
   },
   "transaction": {
      "order": {
         "accountId": "512323",
         "referenceCode": "PRODUCT_TEST_2021-06-21T16:39:10.965Z",
         "description": "Payment test description",
         "language": "es",
         "signature": "af24b22ad0aa0b14dbe3c21a07d9558c",
         "notifyUrl": "http://www.payu.com/notify",
         "additionalValues": {
            "TX_VALUE": {
               "value": 100,
               "currency": "PEN"
         }
         },
         "buyer": {
            "merchantBuyerId": "1",
            "fullName": "First name and second buyer name",
            "emailAddress": "buyer_test@test.com",
            "contactPhone": "7563126",
            "dniNumber": "123456789",
            "shippingAddress": {
               "street1": "Av. Isabel La Católica 103-La Victoria",
               "street2": "5555487",
               "city": "Lima",
               "state": "Lima y Callao",
               "country": "PE",
               "postalCode": "000000",
               "phone": "7563126"
            }
         },
         "shippingAddress": {
            "street1": "Av. Isabel La Católica 103-La Victoria",
            "street2": "5555487",
            "city": "Lima",
            "state": "Lima y Callao",
            "country": "PE",
            "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": "Av. Isabel La Católica 103-La Victoria",
            "street2": "125544",
            "city": "Lima",
            "state": "Lima y Callao",
            "country": "PE",
            "postalCode": "000000",
            "phone": "7563126"
         }
      },
      "creditCard": {
         "number": "4097440000000004",
         "securityCode": "321",
         "expirationDate": "2022/12",
         "name": "APPROVED"
      },
      "extraParameters": {
         "INSTALLMENTS_NUMBER": 1
      },
      "type": "AUTHORIZATION_AND_CAPTURE",
      "paymentMethod": "VISA",
      "paymentCountry": "PE",
      "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": true
}

Response body:

{
    "code": "SUCCESS",
    "error": null,
    "transactionResponse": {
        "orderId": 1400443595,
        "transactionId": "acd8a1c6-fb44-497f-8fa5-de6136be4562",
        "state": "APPROVED",
        "paymentNetworkResponseCode": "000",
        "paymentNetworkResponseErrorMessage": null,
        "trazabilityCode": "77821",
        "authorizationCode": "170921",
        "pendingReason": null,
        "responseCode": "APPROVED",
        "errorCode": null,
        "responseMessage": "Aprobado y completado con exito",
        "transactionDate": null,
        "transactionTime": null,
        "operationDate": 1624286793995,
        "referenceQuestionnaire": null,
        "extraParameters": {
            "BANK_REFERENCED_CODE": "CREDIT"
        },
        "additionalInfo": null
    }
}

Request body:

<request>
   <language>es</language>
   <command>SUBMIT_TRANSACTION</command>
   <merchant>
      <apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
      <apiLogin>pRRXKOl8ikMmt9u</apiLogin>
   </merchant>
   <transaction>
      <order>
         <accountId>512323</accountId>
         <referenceCode>PRODUCT_TEST_2021-06-21T16:39:10.965Z</referenceCode>
         <description>Payment test description</description>
         <language>es</language>
         <signature>af24b22ad0aa0b14dbe3c21a07d9558c</signature>
         <notifyUrl>http://www.payu.com/notify</notifyUrl>
         <additionalValues>
            <entry>
               <string>TX_VALUE</string>
               <additionalValue>
                  <value>100</value>
                  <currency>PEN</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>Av. Isabel La Católica 103-La Victoria</street1>
               <street2>5555487</street2>
               <city>Lima</city>
               <state>Lima y Callao</state>
               <country>PE</country>
               <postalCode>000000</postalCode>
               <phone>7563126</phone>
            </shippingAddress>
         </buyer>
         <shippingAddress>
            <street1>Av. Isabel La Católica 103-La Victoria</street1>
            <street2>5555487</street2>
            <city>Lima</city>
            <state>Lima y Callao</state>
            <country>PE</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>Av. Isabel La Católica 103-La Victoria</street1>
            <street2>5555487</street2>
            <city>Lima</city>
            <state>Lima y Callao</state>
            <country>PE</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_AND_CAPTURE</type>
      <paymentMethod>VISA</paymentMethod>
      <paymentCountry>PE</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 body:

<paymentResponse>
    <code>SUCCESS</code>
    <transactionResponse>
        <orderId>1400443759</orderId>
        <transactionId>d7af220a-d427-486f-b35d-c363e12430e2</transactionId>
        <state>APPROVED</state>
        <paymentNetworkResponseCode>000</paymentNetworkResponseCode>
        <trazabilityCode>77821</trazabilityCode>
        <authorizationCode>170921</authorizationCode>
        <responseCode>APPROVED</responseCode>
        <responseMessage>Aprobado y completado con exito</responseMessage>
        <operationDate>2021-06-21T10:49:30</operationDate>
        <extraParameters>
            <entry>
                <string>BANK_REFERENCED_CODE</string>
                <string>CREDIT</string>
            </entry>
        </extraParameters>
    </transactionResponse>
</paymentResponse>

Submit transaction with 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 sees a payment receipt like this.

PrintScreen

Variables for request and response

Request
Field name Format Size Description
language Alphanumeric 2 Language used in the request, this language is used to display the error messages generated. See supported languages.
command Alphanumeric Max:32 Set SUBMIT_TRANSACTION.
test (JSON)
isTest (XML)
Boolean Set true if the request is in test mode. Otherwise, set false.
merchant This object has the authentication data.
merchant > apiLogin Alphanumeric Min:12 Max:32 User or login provided by PayU. How do I get my API Login
merchant > apiKey Alphanumeric Min:6 Max:32 Password provided by PayU. How do I get my API Key
transaction This object has the transaction data.
transaction > order This object has the order data.
transaction > order > accountId Number Identifier of your account.
transaction > order > referenceCode Alphanumeric Min:1 Max:255 Represents the identifier of the order in your system.
transaction > order > description Alphanumeric Min:1 Max:255 Description of the order.
transaction > order > language Alphanumeric 2 Language used in emails sent to the buyer and the seller.
transaction > order > notifyUrl Alphanumeric Max:2048 Confirmation URL of the order.
transaction > order > partnerId Alphanumeric Max:255 Partner ID in PayU.
transaction > order > signature Alphanumeric Max:255 The signature associated to the form. For more information refer Authentication signature.
transaction > order > shippingAddress Shipping address.
transaction > order > shippingAddress > street1 Alphanumeric Max:100 Address Line 1.
transaction > order > shippingAddress > street2 Alphanumeric Max:100 Address Line 2.
transaction > order > shippingAddress > city Alphanumeric Max:50 Address city.
transaction > order > shippingAddress > state Alphanumeric Max:40 Address State.
transaction > order > shippingAddress > country Alphanumeric 2 Address country.
transaction > order > shippingAddress > postalCode Alphanumeric Max:8 Address Zip code.
transaction > order > shippingAddress > phone Alphanumeric Max:11 Phone number associated to the address.
transaction > order > buyer Buyer information.
transaction > order > buyer > merchantBuyerId Alphanumeric Max:100 Buyer ID in your system.
transaction > order > buyer > fullName Alphanumeric Max:150 Full name of the buyer.
transaction > order > buyer > emailAddress Alphanumeric Max:255 E-mail of the buyer.
transaction > order > buyer > contactPhone Alphanumeric Max:20 Phone number of the buyer.
transaction > order > buyer > dniNumber Alphanumeric Max:20 Identification number of the buyer.
transaction > order > buyer > shippingAddress Alphanumeric Shipping address of the buyer.
transaction > order > buyer > shippingAddress > street1 Alphanumeric Max:150 Buyer’s shipping address Line 1.
transaction > order > buyer > shippingAddress > city Alphanumeric Max:50 Buyer’s shipping address city.
transaction > order > buyer > shippingAddress > state Alphanumeric Max:40 Buyer’s shipping address state.
transaction > order > buyer > shippingAddress > country Alphanumeric 2 Buyer’s shipping address country in format ISO 3166 alpha-2.
transaction > order > buyer > shippingAddress > postalCode Number Max:20 Buyer’s shipping address zip code.
transaction > order > buyer > shippingAddress > phone Number Max:20 Buyer’s shipping address phone number.
transaction > order > additionalValues > 64 Amount of the order or its associated values.
transaction > order > additionalValues > TX_VALUE Alphanumeric 64 Amount of the transaction.
transaction > order > additionalValues > TX_VALUE > value Number 19, 2 Specifies the amount of the transaction, this value may have two decimal digits (Ex. 10000.00 or 10000).
transaction > order > additionalValues > TX_VALUE > currency Alphanumeric 3 ISO code of the currency. See accepted currencies.
transaction > order > additionalValues > TX_TAX Alphanumeric 64 Amount of the Value Added Tax (VAT).
transaction > order > additionalValues > TX_TAX > value Number 19, 2 Specifies the amount of the VAT.
transaction > order > additionalValues > TX_TAX > currency Alphanumeric 3 ISO code of the currency. See accepted currencies.
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.
transaction > order > additionalValues > TX_TAX_RETURN_BASE > value Number 19, 2 Specifies the base amount of the transaction.
transaction > order > additionalValues > TX_TAX_RETURN_BASE > currency Alphanumeric 3 ISO code of the currency. See accepted currencies.
transaction > order > additionalValues > TX_TAX Alphanumeric 64 Amount of the Value Added Tax (VAT).
transaction > order > additionalValues > TX_TAX > value Number 19, 2 Specifies the amount of the VAT.
transaction > order > additionalValues > TX_TAX > currency Alphanumeric 3 ISO code of the currency. See accepted currencies.
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.
transaction > order > additionalValues > TX_TAX_RETURN_BASE > value Number 19, 2 Specifies the base amount of the transaction.
transaction > order > additionalValues > TX_TAX_RETURN_BASE > currency Alphanumeric 3 ISO code of the currency. See accepted currencies.
transaction > payer Payer information.
transaction > payer > emailAddress Alphanumeric Max:255 Payer e-mail address.
transaction > payer > merchantPayerId Alphanumeric Max:100 Identifier of the payer in your system.
transaction > payer > fullName Alphanumeric Max:150 Name of the payer which must meet the name sent in the parameter > creditCard > name for credit card payments.
transaction > payer > billingAddress Billing address.
transaction > payer > billingAddress > street1 Alphanumeric Max:100 Billing Address Line 1.
transaction > payer > billingAddress > street2 Alphanumeric Max:100 Billing Address Line 2.
transaction > payer > billingAddress > city Alphanumeric Max:50 Billing address city.
transaction > payer > billingAddress > state Alphanumeric Max:40 Billing address state.
transaction > payer > billingAddress > country Alphanumeric 2 Billing address country in format ISO 3166 Alpha-2.
transaction > payer > billingAddress > postalCode Alphanumeric Max:20 Billing address zip code.
transaction > payer > billingAddress > phone Alphanumeric Max:20 Billing address phone number.
transaction > payer > birthdate Alphanumeric Max:10 Buyer’s date of birth.
transaction > payer > contactPhone Alphanumeric Max:20 Buyer’s phone number.
transaction > payer > dniNumber Alphanumeric Max:20 Identification number of the buyer.
transaction > payer > dniType Alphanumeric 2 Identification type of the buyer. See Document types.
transaction > type Alphanumeric 32 As cash payments are performed in physical offices, the only available transaction type is AUTHORIZATION_AND_CAPTURE
transaction > paymentMethod Alphanumeric 32 Select a valid Payment Method in cash. See the available Payment Methods for Peru.
transaction > paymentCountry Alphanumeric 2 Set PE for Peru.
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.
transaction > ipAddress Alphanumeric Max:39 IP address of the device where the customer performs the transaction.
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 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 Additional parameters or data associated with the response.
In JSON, the extraParameters parameter follows this structure:
"extraParameters": {
"REFERENCE": "74794"
}

In XML, the extraParameters parameter follows this structure:
<extraParameters>
<entry>
  <string>REFERENCE</string>
  <int>74794</int>
</entry>
</extraParameters>

Considerations

  • The parameter transaction.expirationDate is not mandatory. If you don’t send this parameter, its default value for is seven (7) days after the current date.
    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.
  • The parameter transactionResponse.extraParameters has the following parameters related to the transaction:
    • REFERENCE: internal payment reference generated by PayU.
    • EXPIRATION_DATE: maximum term for the payer to perform the payment.
    • BAR_CODE: barcode which lets the payer perform the payment.
    • URL_PAYMENT_RECEIPT_HTML: payment receipt in HTML format. This is where you need to redirect the payment when the payer selects cash payment.
    • URL_PAYMENT_RECEIPT_PDF: payment receipt in PDF format.

API call

The following are the bodies of the request and response of this payment method.


Request body:

{
   "language": "es",
   "command": "SUBMIT_TRANSACTION",
   "merchant": {
      "apiKey": "4Vj8eK4rloUd272L48hsrarnUA",
      "apiLogin": "pRRXKOl8ikMmt9u"
   },
   "transaction": {
      "order": {
         "accountId": "512323",
         "referenceCode": "PRODUCT_TEST_2021-06-21T16:39:10.965Z",
         "description": "Payment test description",
         "language": "es",
         "signature": "af24b22ad0aa0b14dbe3c21a07d9558c",
         "notifyUrl": "http://www.payu.com/notify",
         "additionalValues": {
            "TX_VALUE": {
               "value": 100,
               "currency": "PEN"
         }
         },
         "buyer": {
            "merchantBuyerId": "1",
            "fullName": "First name and second buyer  name",
            "emailAddress": "buyer_test@test.com",
            "contactPhone": "7563126",
            "dniNumber": "123456789",
            "shippingAddress": {
               "street1": "Av. Isabel La Católica 103-La Victoria",
               "street2": "5555487",
               "city": "Lima",
               "state": "Lima y Callao",
               "country": "PE",
               "postalCode": "000000",
               "phone": "7563126"
            }
         },
         "shippingAddress": {
            "street1": "Av. Isabel La Católica 103-La Victoria",
            "street2": "5555487",
            "city": "Lima",
            "state": "Lima y Callao",
            "country": "PE",
            "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": "Av. Isabel La Católica 103-La Victoria",
            "street2": "125544",
            "city": "Lima",
            "state": "Lima y Callao",
            "country": "PE",
            "postalCode": "000000",
            "phone": "7563126"
         }
      },
	  "type": "AUTHORIZATION_AND_CAPTURE",
      "paymentMethod": "PAGOEFECTIVO",
      "expirationDate": "2021-06-22T19:51:20.302",
      "paymentCountry": "PE",
      "ipAddress": "127.0.0.1"
   },
   "test": true
}

Response body:

{
    "code": "SUCCESS",
    "error": null,
    "transactionResponse": {
        "orderId": 857804123,
        "transactionId": "fd685f0a-f5b2-40cf-9527-dcc85febe184",
        "state": "PENDING",
        "paymentNetworkResponseCode": "Se ha Generado el CIP: 00000002592100 .",
        "paymentNetworkResponseErrorMessage": null,
        "trazabilityCode": "2592100",
        "authorizationCode": "1",
        "pendingReason": "AWAITING_NOTIFICATION",
        "responseCode": "PENDING_TRANSACTION_CONFIRMATION",
        "errorCode": null,
        "responseMessage": null,
        "transactionDate": null,
        "transactionTime": null,
        "operationDate": null,
        "referenceQuestionnaire": null,
        "extraParameters": {
            "REFERENCE": 857804123,
            "URL_PAYMENT_RECEIPT_PDF": "https://sandbox.checkout.payulatam.com/ppp-web-gateway-payu/receipt?vid=857804123Yfd685f0af5b240cYd231ed8660a7c9a",
            "EXPIRATION_DATE": 1624391480302,
            "BAR_CODE": "2592100",
            "URL_PAYMENT_RECEIPT_HTML": "https://sandbox.checkout.payulatam.com/ppp-web-gateway-payu/app?vid=857804123Yfd685f0af5b240cYd231ed8660a7c9a"
        },
        "additionalInfo": null
    }
}

Request body:

<request>
   <language>es</language>
   <command>SUBMIT_TRANSACTION</command>
   <merchant>
      <apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
      <apiLogin>pRRXKOl8ikMmt9u</apiLogin>
   </merchant>
   <transaction>
      <order>
         <accountId>512323</accountId>
         <referenceCode>PRODUCT_TEST_2021-06-21T16:39:10.965Z</referenceCode>
         <description>Payment test description</description>
         <language>es</language>
         <signature>af24b22ad0aa0b14dbe3c21a07d9558c</signature>
         <notifyUrl>http://www.payu.com/notify</notifyUrl>
         <additionalValues>
            <entry>
               <string>TX_VALUE</string>
               <additionalValue>
                  <value>100</value>
                  <currency>PEN</currency>
               </additionalValue>
            </entry>
         </additionalValues>
         <buyer>
            <contactPhone>7563126</contactPhone>
            <dniNumber>123456789</dniNumber>
            <emailAddress>buyer_test@test.com</emailAddress>
            <fullName>First name and second buyer name</fullName>
            <merchantBuyerId>1</merchantBuyerId>
            <shippingAddress>
               <street1>Av. Isabel La Católica 103-La Victoria</street1>
               <street2>5555487</street2>            
               <city>Lima</city>
               <state>Lima y Callao</state>               
               <country>PE</country>
                <postalCode>000000</postalCode>
               <phone>7563126</phone>
            </shippingAddress>
         </buyer>
         <shippingAddress>
            <street1>Av. Isabel La Católica 103-La Victoria</street1>
               <street2>5555487</street2>            
               <city>Lima</city>
               <state>Lima y Callao</state>               
               <country>PE</country>
                <postalCode>000000</postalCode>
               <phone>7563126</phone>
         </shippingAddress>
      </order>
      <payer>
         <billingAddress>
            <street1>Av. Isabel La Católica 103-La Victoria</street1>
            <street2>5555487</street2>            
            <city>Lima</city>
            <state>Lima y Callao</state>               
            <country>PE</country>
            <postalCode>000000</postalCode>
            <phone>7563126</phone>
         </billingAddress>
         <contactPhone>7563126</contactPhone>
         <dniNumber>5415668464654</dniNumber>
         <emailAddress>payer_test@test.com</emailAddress>
         <fullName>First name and second payer name</fullName>
         <merchantPayerId>1</merchantPayerId>
      </payer>
      <type>AUTHORIZATION_AND_CAPTURE</type>
      <paymentMethod>PAGOEFECTIVO</paymentMethod>
      <expirationDate>2021-06-16T16:07:11</expirationDate>
      <paymentCountry>PE</paymentCountry>
      <ipAddress>127.0.0.1</ipAddress>
   </transaction>
   <isTest>false</isTest>
</request>


Response body:

<paymentResponse>
    <code>SUCCESS</code>
    <transactionResponse>
        <orderId>857804131</orderId>
        <transactionId>185f578b-2247-4a28-85b9-128c7b90c989</transactionId>
        <state>PENDING</state>
        <paymentNetworkResponseCode>Se ha Generado el CIP: 00000002592102 .</paymentNetworkResponseCode>
        <trazabilityCode>2592102</trazabilityCode>
        <authorizationCode>1</authorizationCode>
        <pendingReason>AWAITING_NOTIFICATION</pendingReason>
        <responseCode>PENDING_TRANSACTION_CONFIRMATION</responseCode>
        <extraParameters>
            <entry>
                <string>REFERENCE</string>
                <int>857804131</int>
            </entry>
            <entry>
                <string>URL_PAYMENT_RECEIPT_PDF</string>
                <string>https://sandbox.checkout.payulatam.com/ppp-web-gateway-payu/receipt?vid=857804131Y185f578b22474a2Y11601e067841b94</string>
            </entry>
            <entry>
                <string>EXPIRATION_DATE</string>
                <date>2021-06-28T23:59:59</date>
            </entry>
            <entry>
                <string>BAR_CODE</string>
                <string>2592102</string>
            </entry>
            <entry>
                <string>URL_PAYMENT_RECEIPT_HTML</string>
                <string>https://sandbox.checkout.payulatam.com/ppp-web-gateway-payu/app?vid=857804131Y185f578b22474a2Y11601e067841b94</string>
            </entry>
        </extraParameters>
    </transactionResponse>
</paymentResponse>

Available payment methods query

This method returns a list of the payment methods available in all countries.

Variables for request and response

Request
Field name Format Size Description
language Alphanumeric 2 Language used in the request, this language is used to display the error messages generated. See supported languages.
command Alphanumeric Max:32 Set GET_PAYMENT_METHODS.
test (JSON)
isTest (XML)
Boolean Set true if the request is in test mode. Otherwise, set false.
merchant This object has the authentication data.
merchant > apiLogin Alphanumeric Min:12 Max:32 User or login provided by PayU. How do I get my API Login
merchant > apiKey Alphanumeric Min:6 Max:32 Password provided by PayU. How do I get my API Key
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 List of the payment methods.
paymentMethods > paymentMethodComplete 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 bodies of the request and response of this method. For the sake of the example, the request and response here show two payment methods.


Request body:

{
   "test": false,
   "language": "en",
   "command": "GET_PAYMENT_METHODS",
   "merchant": {
      "apiLogin": "pRRXKOl8ikMmt9u",
      "apiKey": "4Vj8eK4rloUd272L48hsrarnUA"
   }
}

Response body:

{
    "code": "SUCCESS",
    "error": null,
    "paymentMethods": [
        {
            "id": "258",
            "description": "DINERS",
            "country": "PE",
            "enabled": true,
            "reason": null
        },
        {
            "id": "1067",
            "description": "VISA",
            "country": "PE",
            "enabled": true,
            "reason": null
        }
    ]
}

Request body:

<request>
   <language>en</language>
   <command>GET_PAYMENT_METHODS</command>
   <merchant>
      <apiLogin>pRRXKOl8ikMmt9u</apiLogin>
      <apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
   </merchant>
   <isTest>false</isTest>
</request>

Response body:

<paymentMethodsResponse>
    <code>SUCCESS</code>
    <paymentMethods>
        <paymentMethodComplete>
            <id>258</id>
            <description>DINERS</description>
            <country>PE</country>
            <enabled>true</enabled>
        </paymentMethodComplete>
        <paymentMethodComplete>
            <id>1067</id>
            <description>VISA</description>
            <country>PE</country>
            <enabled>true</enabled>
        </paymentMethodComplete>
    </paymentMethods>
</paymentMethodsResponse>

Ping

The PING method lets you verify the connection to our platform.

Variables for request and response

Request
Field name Format Size Description
language Alphanumeric 2 Language used in the request, this language is used to display the error messages generated. See supported languages.
command Alphanumeric Max:32 Set PING.
test (JSON)
isTest (XML)
Boolean Set true if the request is in test mode. Otherwise, set false.
merchant This object has the authentication data.
merchant > apiLogin Alphanumeric Min:12 Max:32 User or login provided by PayU. How do I get my API Login
merchant > apiKey Alphanumeric Min:6 Max:32 Password provided by PayU. How do I get my API Key
Response
Field name Format Size Description
code Alphanumeric The response code of the transaction.
error Alphanumeric Max:2048 The error message associated if an error ocurred.
transactionResponse transactionResponse Max:2048 The response of the PING method if an error ocurred.

Api call

The following are the bodies of the request and response of this method.


Request body:

{
   "test": false,
   "language": "en",
   "command": "PING",
   "merchant": {
      "apiLogin": "pRRXKOl8ikMmt9u",
      "apiKey": "4Vj8eK4rloUd272L48hsrarnUA"
   }
}

Response body:

{
    "code": "SUCCESS",
    "error": null,
    "transactionResponse": null
}

Request body:

<request>
   <language>en</language>
   <command>PING</command>
   <merchant>
      <apiLogin>pRRXKOl8ikMmt9u</apiLogin>
      <apiKey>4Vj8eK4rloUd272L48hsrarnUA</apiKey>
   </merchant>
   <isTest>false</isTest>
</request>

Response body:

<paymentResponse>
    <code>SUCCESS</code>
</paymentResponse>
Last modified September 1, 2021: Note for expiration date of the vouchers (53fa3b4)