- METHOD TYPEReal-Time Bank Transfer
- PAYMENTS
- PAYOUTS
- REFUNDS
- RECURRING
Introduction
WebPay is an online payment service in Chile. WebPay allows merchants to integrate payment with debit and credit cards in their shopping carts easily and securely.
Supported Countries
- Chile
Supported Currencies
- CLP
- USD
Payment (Deposit) Flow
Press tab to open…
Follow these steps to perform a payment using Nuvei REST API integration:
1. Generate a sessionToken
Press here for details.
2. Send a /payment
Request
Perform the payment by sending a /payment
request with its mandatory parameters, including:
userTokenId
amount
currency
paymentOption.alternativePaymentMethod
class containing:paymentMethod
: “apmgw_Webpay“webpay_personal_id
deviceDetails
class containing:ipAddress
userDetails
class containing:firstName
,lastName
,country
,email
,address
,city
,zip
Example /payment
Request
{ "sessionToken":"<sessionToken from /getSessionToken>", "merchantId":"<your merchantId>", "merchantSiteId":"<your merchantSiteId>", "clientRequestId":"<unique request ID in merchant system>", "amount":"100", "currency":"CLP", "userTokenId":"<unique customer identifier in merchant system>", "clientUniqueId":"<unique transaction ID in merchant system>", "paymentOption":{ "alternativePaymentMethod":{ "paymentMethod":"apmgw_Webpay", "webpay_personal_id" : "<Webpay Personal ID>" } }, "deviceDetails":{ "ipAddress":"<customer's IP address>" }, "userDetails":{ "firstName": "John", "lastName": "Smith", "address": "22 Main Street", "phone": "6175551414", "zip": "02460", "city": "Boston", "country": "CL", "email":"[email protected]" }, "timeStamp":"<YYYYMMDDHHmmss>", "checksum":"<calculated checksum>" }
The response generates and returns a redirect URL (redirectUrl
) to redirect the customer to the payment page, as well as a UPO (userPaymentOptionId
) for use in future transactions.
Example /payment
Response
{ "orderId":"38858551", "userTokenId":"Test", "paymentOption":{ "redirectUrl":"https://webpay3gint.transbank.cl/webpayserver/initTransaction?token_ws=01ab2564f98e7a088b933a03abfa3f3d2bfb33bc83f287a41f78d2eb8fbfd25a", "userPaymentOptionId":"2152832581", "card":{} }, "transactionStatus":"REDIRECT", "sessionToken":"3c245ff8-933e-47c2-b3b6-d6af70d32147", "clientUniqueId":"unique1", "internalRequestId":25344991, "status":"SUCCESS", "errCode":0, "reason":"", "merchantId":"4972436454212160565", "merchantSiteId":"3111", "version":"1.0", "clientRequestId":"20230319131243" }
Follow these steps to perform a payment using Nuvei Web SDK integration.
1. Initiate a Session
Before you can submit payment using the client-side Nuvei Web SDK, you need to send the /openOrder
API call.
2. Initialize the Web SDK
Instantiate the Web SDK with the sessionToken
received from the server call to /openOrder
.
3. Create an APM Payment
Send a createPayment()
request with its mandatory parameters including:
paymentOption.alternativePaymentMethod
class containing:paymentMethod: "apmgw_Webpay"
account_id
deviceDetails
class containing:ipAddress
billingAddress
class containing:firstName
,lastName
,country
,email
,address
,city
,zip
userDetails
class containing:firstName
,lastName
,country
,email
,address
,city
,zip
Example createPayment()
Request
sfc.createPayment({ sessionToken: "<sessiontoken>", paymentOption: { alternativePaymentMethod: { paymentMethod: "apmgw_Webpay", account_id: "<Webpay account>" } }, deviceDetails: { ipAddress: "<customer's IP address>" }, billingAddress: { firstName: "John", lastName: "Smith", country: "CL", address: "22 Main Street", phone: "6175551414", zip: "02460", city: "Boston", email: "[email protected]", }, userDetails: { firstName: "John", lastName: "Smith", country: "CL", address: "22 Main Street", phone: "6175551414", zip: "02460", city: "Boston", email: "[email protected]" } }, function (res) { console.log(res) })
- REST API
-
Follow these steps to perform a payment using Nuvei REST API integration:
1. Generate a
sessionToken
Press here for details.
2. Send a
/payment
RequestPerform the payment by sending a
/payment
request with its mandatory parameters, including:userTokenId
amount
currency
paymentOption.alternativePaymentMethod
class containing:paymentMethod
: “apmgw_Webpay“webpay_personal_id
deviceDetails
class containing:ipAddress
userDetails
class containing:firstName
,lastName
,country
,email
,address
,city
,zip
Example
/payment
Request{ "sessionToken":"<sessionToken from /getSessionToken>", "merchantId":"<your merchantId>", "merchantSiteId":"<your merchantSiteId>", "clientRequestId":"<unique request ID in merchant system>", "amount":"100", "currency":"CLP", "userTokenId":"<unique customer identifier in merchant system>", "clientUniqueId":"<unique transaction ID in merchant system>", "paymentOption":{ "alternativePaymentMethod":{ "paymentMethod":"apmgw_Webpay", "webpay_personal_id" : "<Webpay Personal ID>" } }, "deviceDetails":{ "ipAddress":"<customer's IP address>" }, "userDetails":{ "firstName": "John", "lastName": "Smith", "address": "22 Main Street", "phone": "6175551414", "zip": "02460", "city": "Boston", "country": "CL", "email":"[email protected]" }, "timeStamp":"<YYYYMMDDHHmmss>", "checksum":"<calculated checksum>" }
The response generates and returns a redirect URL (
redirectUrl
) to redirect the customer to the payment page, as well as a UPO (userPaymentOptionId
) for use in future transactions.Example
/payment
Response{ "orderId":"38858551", "userTokenId":"Test", "paymentOption":{ "redirectUrl":"https://webpay3gint.transbank.cl/webpayserver/initTransaction?token_ws=01ab2564f98e7a088b933a03abfa3f3d2bfb33bc83f287a41f78d2eb8fbfd25a", "userPaymentOptionId":"2152832581", "card":{} }, "transactionStatus":"REDIRECT", "sessionToken":"3c245ff8-933e-47c2-b3b6-d6af70d32147", "clientUniqueId":"unique1", "internalRequestId":25344991, "status":"SUCCESS", "errCode":0, "reason":"", "merchantId":"4972436454212160565", "merchantSiteId":"3111", "version":"1.0", "clientRequestId":"20230319131243" }
- Web SDK
-
Follow these steps to perform a payment using Nuvei Web SDK integration.
1. Initiate a Session
Before you can submit payment using the client-side Nuvei Web SDK, you need to send the
/openOrder
API call.2. Initialize the Web SDK
Instantiate the Web SDK with the
sessionToken
received from the server call to/openOrder
.3. Create an APM Payment
Send a
createPayment()
request with its mandatory parameters including:paymentOption.alternativePaymentMethod
class containing:paymentMethod: "apmgw_Webpay"
account_id
deviceDetails
class containing:ipAddress
billingAddress
class containing:firstName
,lastName
,country
,email
,address
,city
,zip
userDetails
class containing:firstName
,lastName
,country
,email
,address
,city
,zip
Example
createPayment()
Requestsfc.createPayment({ sessionToken: "<sessiontoken>", paymentOption: { alternativePaymentMethod: { paymentMethod: "apmgw_Webpay", account_id: "<Webpay account>" } }, deviceDetails: { ipAddress: "<customer's IP address>" }, billingAddress: { firstName: "John", lastName: "Smith", country: "CL", address: "22 Main Street", phone: "6175551414", zip: "02460", city: "Boston", email: "[email protected]", }, userDetails: { firstName: "John", lastName: "Smith", country: "CL", address: "22 Main Street", phone: "6175551414", zip: "02460", city: "Boston", email: "[email protected]" } }, function (res) { console.log(res) })
After the transaction is processed, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to the URL provided in urlDetails.notificationUrl
, which Nuvei recommends including in the /payment
request.
Example Payment DMN with status
=APPROVED
...'ppp_status=OK&Status=APPROVED&ExErrCode=0&ErrCode=0&errApmCode=0&errApmDescription=&errScCode=0&errScDescription=&Reason=&ReasonCode=0&PPP_TransactionID=38858551&userid=Test&merchant_unique_id=unique1&customData=&productId=&first_name=John&last_name=Smith&email=john.smith%40email.com¤cy=CLP&clientUniqueId=unique1&customField1=&customField2=&customField3=&customField4=&customField5=&customField6=&customField7=&customField8=&customField9=&customField10=&customField11=&customField12=&customField13=&customField14=&customField15=&invoice_id=&address1=22+Main+Street&address2=&country=Chile&state=&city=Boston&zip=02460&phone1=6175551414&phone2=&phone3=&client_ip=127.0.0.1&nameOnCard=&cardNumber=&bin=&noCVV=&acquirerId=&acquirerBank=Paymentez+Direct&expMonth=&expYear=&Token=&tokenId=&AuthCode=&AvsCode=&Cvv2Reply=&shippingCountry=&shippingState=&shippingCity=&shippingAddress=&shippingZip=&shippingFirstName=&shippingLastName=&shippingPhone=&shippingCell=&shippingMail=&total_discount=0.00&total_handling=0.00&total_shipping=0.00&total_tax=0.00&buyButtonProductBundleId=&merchant_site_id=3111&merchant_status=&action=&requestVersion=&message=APPROVED&merchantLocale=&unknownParameters=&payment_method=apmgw_Webpay&ID=&merchant_id=4972436454212160565&responseTimeStamp=2023-03-19.11%3A15%3A33&buyButtonProductId=&webMasterId=&appliedPromotions=&uniqueCC=&transactionType=Sale&externalEmail=&cardCompany=&eci=&user_token_id=Test&userPaymentOptionId=2152832581&TransactionID=2110000000008893286&externalTransactionId=TBWP-743&APMReferenceID=743FA8B6DF6D4DBFB50B177EC2AF66A0&orderTransactionId=19475471&totalAmount=2500.00&dynamicDescriptor=QA+Test+site&item_name_1=NA&item_number_1=&item_amount_1=2500.00&item_quantity_1=1&item_discount_1=0.00&item_handling_1=0.00&item_shipping_1=0.00&feeAmount=&amountWithoutFee=&houseNumber=&customCurrency=&externalToken_blockedCard=&externalToken_cardAcquirerId=&externalToken_cardAcquirerName=&externalToken_cardBin=&externalToken_cardBrandId=&externalToken_cardBrandName=&externalToken_cardExpiration=&externalToken_cardLength=&externalToken_cardMask=&externalToken_cardName=&externalToken_cardTypeId=&externalToken_cardTypeName=&externalToken_clubName=&externalToken_creditCompanyId=&externalToken_creditCompanyName=&externalToken_extendedCardType=&externalToken_Indication=&externalToken_tokenValue=&externalToken_tokenProvider=&ECIRaw=&upoRegistrationDate=20230306&type=DEPOSIT&clientRequestId=20230319131243&relatedTransactionId=&apmPayerInfo=nullnull&sessionId=99257fdcbdab6cbde66fa9cd7686&responsechecksum=ea29a6977fc8e8bb29697b0c90d4950b&advanceResponseChecksum=f9d59ea288967b67742be0bef043aa1e',
User Experience
- The user is redirected to the WebPay payment page, where they can select a payment method: card (credit, debit, or prepaid) or E-wallet.
- Card Flow: The user enters a card number, RUT number, and presses Continue.
The user is redirected to their bank for login and completing the deposit.
E-wallet Flow: The user scans the QR code with their E-wallet and completes the deposit from the E-wallet app.
- The user is redirected to the Nuvei payment page and receives a notification about payment status: “Success” or “Decline”.