- Home
- All APIs
- WPG guide
- Integrate in Latin America
- Hosted Integration
Hosted Integration
Accept payments in Latin America through the
LatAm-specific fields
CPF/CPNJ field
CPF is the equivalent of a Brazilian tax registration number. The CPF field does not have to be provided, but to reduce the risk of fraud we strongly advise that you do use it.
Within the Hosted Payment Pages, you can collect this field alongside a shopper's payment details. Once this information is collected, it will be passed along to Worldpay with the rest of the order.
Instalments
If you allow shoppers to pay in
You can also select how many instalments the shopper is able to choose from. You can choose from 2 to 12. For example:
- 2 - 12 - This displays all values between 2 and 12
- 3, 6, 9-12 - This displays 3, 6, and all values between 9 and 12
If you'd like this functionality, contact corporatesupport@worldpay.com.
Capturing CPF/CPNJ and Instalments on your website
You can capture the CPF/CPNJ and the Instalments field on your website before redirecting the shopper to the Hosted Payment Pages. If you do this, then the CPF/CPNJ and Instalment fields will display on the payment page, but will not be editable by the shopper.
Example submission
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//RBS WorldPay//DTD RBS WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService version="1.4" merchantCode="YOUR_MERCHANT_CODE">
<submit>
<order orderCode="ORDER_CODE" installationId="1010709">
<description>jsredirect test order</description>
<amount value="1000" currencyCode="BRL" exponent="2"/>
<orderContent>
<![CDATA[
]]>
</orderContent>
<paymentMethodMask>
<include code="ALL"/>
</paymentMethodMask>
<shippingAddress>
<address>
<firstName>John</firstName>
<lastName>Doe</lastName>
<address1>Units 270 - 289</address1>
<address2>The Science Park</address2>
<address3>Milton Road</address3>
<postalCode>CB4 0WE</postalCode>
<city>Cambridge</city>
<state>Cambridgeshire</state>
<countryCode>GB</countryCode>
</address>
</shippingAddress>
<billingAddress>
<address>
<firstName>John</firstName>
<lastName>Doe</lastName>
<address1>Units 270 - 289</address1>
<address2>The Science Park</address2>
<address3>Milton Road</address3>
<postalCode>CB4 0WE</postalCode>
<city>Cambridge</city>
<state>Cambridgeshire</state>
<countryCode>GB</countryCode>
</address>
</billingAddress>
<thirdPartyData>
<instalments>3</instalments><!--The instalment value you captured before redirecting the shopper-->
<cpf>22.667.502/0001-03</cpf><!--The CPF number you captured before redirecting the shopper-->
</thirdPartyData>
</order>
</submit>
</paymentService>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE paymentService PUBLIC "-//RBS WorldPay//DTD RBS WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd"> <paymentService version="1.4" merchantCode="YOUR_MERCHANT_CODE"> <submit> <order orderCode="ORDER_CODE" installationId="1010709"> <description>jsredirect test order</description> <amount value="1000" currencyCode="BRL" exponent="2"/> <orderContent> <![CDATA[ ]]> </orderContent> <paymentMethodMask> <include code="ALL"/> </paymentMethodMask> <shippingAddress> <address> <firstName>John</firstName> <lastName>Doe</lastName> <address1>Units 270 - 289</address1> <address2>The Science Park</address2> <address3>Milton Road</address3> <postalCode>CB4 0WE</postalCode> <city>Cambridge</city> <state>Cambridgeshire</state> <countryCode>GB</countryCode> </address> </shippingAddress> <billingAddress> <address> <firstName>John</firstName> <lastName>Doe</lastName> <address1>Units 270 - 289</address1> <address2>The Science Park</address2> <address3>Milton Road</address3> <postalCode>CB4 0WE</postalCode> <city>Cambridge</city> <state>Cambridgeshire</state> <countryCode>GB</countryCode> </address> </billingAddress> <thirdPartyData> <instalments>3</instalments><!--The instalment value you captured before redirecting the shopper--> <cpf>22.667.502/0001-03</cpf><!--The CPF number you captured before redirecting the shopper--> </thirdPartyData> </order> </submit> </paymentService>
Response
The response you receive is the same as described in
Languages
You can display the Hosted page in Portuguese, Brazilian Portuguese, Spanish and English. However, if you don't specify a language before the shopper lands on the payment page, the content will be displayed in English.
For more information, see
LatAm Hosted Payment Pages example
The below example shows what a shopper in Brazil will see on the Hosted Payment Pages. Note that the shopper is able to enter their CPF/CNPJ number and also decide on how many instalments they wish to pay in.
Note: If you captured the CPF/CNPJ and/or Instalments field before redirecting the shopper to the Payment Page, these fields will be displayed as "read-only".
Order notifications
To receive<instalments>
element within the notification.
<?xml version="1.0"?> <!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService version="1.4" merchantCode="YOUR_MERCHANT_CODE">
<notify>
<orderStatusEvent orderCode="ORDER_CODE">
<payment>
<paymentMethod>VISA-SSL</paymentMethod>
<amount value="200000" currencyCode="BRL" exponent="2" debitCreditIndicator="credit"/>
<lastEvent>AUTHORISED</lastEvent>
<balance accountType="IN_PROCESS_AUTHORISED">
<amount value="200000" currencyCode="BRL" exponent="2" debitCreditIndicator="credit"/>
</balance>
<cardNumber>4444********1111</cardNumber>
<riskScore value="0"/>
<instalments>6</instalments><!--For instalments you need to accept this in your notifications-->
</payment>
</orderStatusEvent>
</notify>
</paymentService>
<?xml version="1.0"?> <!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd"> <paymentService version="1.4" merchantCode="YOUR_MERCHANT_CODE"> <notify> <orderStatusEvent orderCode="ORDER_CODE"> <payment> <paymentMethod>VISA-SSL</paymentMethod> <amount value="200000" currencyCode="BRL" exponent="2" debitCreditIndicator="credit"/> <lastEvent>AUTHORISED</lastEvent> <balance accountType="IN_PROCESS_AUTHORISED"> <amount value="200000" currencyCode="BRL" exponent="2" debitCreditIndicator="credit"/> </balance> <cardNumber>4444********1111</cardNumber> <riskScore value="0"/> <instalments>6</instalments><!--For instalments you need to accept this in your notifications--> </payment> </orderStatusEvent> </notify> </paymentService>