- METHOD TYPECash Payment
- PAYMENTS
- PAYOUTS
- REFUNDS
- RECURRING
Introduction
OXXO is a convenient cash-based payment method in Mexico, where customers receive unique serial code vouchers to make purchases once payment is received at a participating location. Additionally, OXXO provides financial services such as bill payments, money transfers, and prepaid cards for added convenience.
Supported Countries
- Mexico
Supported Currencies
- MXN
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
: “MXN“paymentOption.alternativePaymentMethod
class containing:paymentMethod
: “apmgw_Oxxo“personal_id
– depending on provider
deviceDetails
class containing:ipAddress
billingAddress
class containing:firstName
,lastName
,country
,email
–country
must be MXuserDetails
class containing:firstName
,lastName
,country
,email
–country
must be MX
Example /payment
Request
{ "sessionToken": "<sessionToken from /getSessionToken>", "merchantId": "<your merchantId>", "merchantSiteId": "<your merchantSiteId>", "clientRequestId": "<unique request ID in merchant system>", "amount": "200", "currency": "MXN", "userTokenId": "<unique customer identifier in merchant system>", "clientUniqueId": "<unique transaction ID in merchant system>", "paymentOption": { "alternativePaymentMethod": { "paymentMethod": "apmgw_Oxxo", "personal_id": "1250050958020743198" } }, "deviceDetails": { "ipAddress": "<customer's IP address>" }, "billingAddress": { "firstName": "John", "lastName": "Smith", "email": "[email protected]", "country": "MX" }, "userDetails": { "firstName": "John", "lastName": "Smith", "email": "[email protected]", "country": "MX" }, "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
{ "internalRequestId": 1106691688, "status": "SUCCESS", "errCode": 0, "reason": "", "merchantId": "979047831696752006", "merchantSiteId": "217268", "version": "1.0", "clientRequestId": "20240611170702", "sessionToken": "ac2ea00f-d098-4360-88a5-977f9e23d048", "clientUniqueId": "20180327175242", "orderId": "456439768", "userTokenId": "TestToken1122", "paymentOption": { "redirectUrl": "https://cdn-int.safecharge.com/safecharge_resources/v1/payment-details-22193.html?purchaseDate=2024-06-11T14%3A07%3A04.379Z&transactionStatus=pending&buyerEmail=test%40nuvei.com&description=approved&methodName=oxxo&language=EN&buyerName=Test+TEst&paymentAmount=150.0&transactionId=OX-6855&mode=barcode&buyerPhone=23552535506&returnUrl=https%3A%2F%2Ftest.safecharge.com%2FAPMNotificationGateway%2FApmConnector%2FF4C5EEB6327698072DA0B9801B756766&barcode=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAN0AAAABAQAAAAByQ5bjAAAAJklEQVR42mP4mWy45MzMyUZpPvdO7EzJuXOj2yit5%2BTsdKl0kR8A4UcO%2BMNaRG0AAAAASUVORK5CYII%3D&paymentNumber=18000000000068551306202400150003", "userPaymentOptionId": "116309918", "card": {} }, "transactionStatus": "REDIRECT" }
After the transaction is processed, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to urlDetails.notificationUrl
, which Nuvei recommends including in the /payment
request.
Example Payment Page Request
After the transaction is processed, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to notify_url
, which Nuvei recommends including in the request.
- 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
: “MXN“paymentOption.alternativePaymentMethod
class containing:paymentMethod
: “apmgw_Oxxo“personal_id
– depending on provider
deviceDetails
class containing:ipAddress
billingAddress
class containing:firstName
,lastName
,country
,email
–country
must be MXuserDetails
class containing:firstName
,lastName
,country
,email
–country
must be MX
Example
/payment
Request{ "sessionToken": "<sessionToken from /getSessionToken>", "merchantId": "<your merchantId>", "merchantSiteId": "<your merchantSiteId>", "clientRequestId": "<unique request ID in merchant system>", "amount": "200", "currency": "MXN", "userTokenId": "<unique customer identifier in merchant system>", "clientUniqueId": "<unique transaction ID in merchant system>", "paymentOption": { "alternativePaymentMethod": { "paymentMethod": "apmgw_Oxxo", "personal_id": "1250050958020743198" } }, "deviceDetails": { "ipAddress": "<customer's IP address>" }, "billingAddress": { "firstName": "John", "lastName": "Smith", "email": "[email protected]", "country": "MX" }, "userDetails": { "firstName": "John", "lastName": "Smith", "email": "[email protected]", "country": "MX" }, "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{ "internalRequestId": 1106691688, "status": "SUCCESS", "errCode": 0, "reason": "", "merchantId": "979047831696752006", "merchantSiteId": "217268", "version": "1.0", "clientRequestId": "20240611170702", "sessionToken": "ac2ea00f-d098-4360-88a5-977f9e23d048", "clientUniqueId": "20180327175242", "orderId": "456439768", "userTokenId": "TestToken1122", "paymentOption": { "redirectUrl": "https://cdn-int.safecharge.com/safecharge_resources/v1/payment-details-22193.html?purchaseDate=2024-06-11T14%3A07%3A04.379Z&transactionStatus=pending&buyerEmail=test%40nuvei.com&description=approved&methodName=oxxo&language=EN&buyerName=Test+TEst&paymentAmount=150.0&transactionId=OX-6855&mode=barcode&buyerPhone=23552535506&returnUrl=https%3A%2F%2Ftest.safecharge.com%2FAPMNotificationGateway%2FApmConnector%2FF4C5EEB6327698072DA0B9801B756766&barcode=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAN0AAAABAQAAAAByQ5bjAAAAJklEQVR42mP4mWy45MzMyUZpPvdO7EzJuXOj2yit5%2BTsdKl0kR8A4UcO%2BMNaRG0AAAAASUVORK5CYII%3D&paymentNumber=18000000000068551306202400150003", "userPaymentOptionId": "116309918", "card": {} }, "transactionStatus": "REDIRECT" }
After the transaction is processed, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to
urlDetails.notificationUrl
, which Nuvei recommends including in the/payment
request. - Payment Page
-
Example Payment Page Request
After the transaction is processed, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to
notify_url
, which Nuvei recommends including in the 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=456439768&userid=TestToken1122&merchant_unique_id=20180327175242&customData=&productId=&first_name=Test&last_name=TEst&email=test%40nuvei.com¤cy=MXN&pmDisplayName=1250050958020743198&clientUniqueId=20180327175242&customField1=&customField2=&customField3=&customField4=&customField5=&customField6=&customField7=&customField8=&customField9=&customField10=&customField11=&customField12=&customField13=&customField14=&customField15=&invoice_id=&address1=Addressq&address2=&country=Mexico&state=&city=City&zip=80410100&phone1=23552535506&phone2=&phone3=&client_ip=127.0.0.1&nameOnCard=&cardNumber=&bin=&noCVV=&acquirerId=&acquirerBank=Paymentez-PI&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=217268&merchant_status=&action=&requestVersion=&message=APPROVED&merchantLocale=&unknownParameters=&payment_method=apmgw_Oxxo&ID=&merchant_id=979047831696752006&responseTimeStamp=2024-06-11.14%3A20%3A10&buyButtonProductId=&webMasterId=&appliedPromotions=&uniqueCC=&transactionType=Sale&externalEmail=&cardCompany=&eci=&user_token_id=TestToken1122&userPaymentOptionId=116309918&TransactionID=7110000000000172709&ExternalaccountID=1250050958020743198&externalTransactionId=OX-6855&APMReferenceID=F4C5EEB6327698072DA0B9801B756766&orderTransactionId=1299708258&totalAmount=150.00&dynamicDescriptor=Plamen&item_name_1=NA&item_number_1=&item_amount_1=150.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=&cryptogram=&maskedNetworkTokenNumber=&upoRegistrationDate=20240611&type=DEPOSIT&clientRequestId=20240611170702&relatedTransactionId=&sessionId=7826d1e81c96f461729688154f0b&responsechecksum=747ecdbad2c91b6107fe590639a91e4cce7bcfe1bb64afe7ff3393c3d65e484c&advanceResponseChecksum=abf4df46b4de9af5435f8008aed98f45e78dbe78db17822e6b146befcc976e39',
Example Payment DMN with Status
=PENDING
...'ppp_status=PENDING&Status=PENDING&ExErrCode=0&ErrCode=0&errApmCode=0&errApmDescription=&errScCode=0&errScDescription=&Reason=&ReasonCode=0&PPP_TransactionID=456439768&userid=TestToken1122&merchant_unique_id=20180327175242&customData=&productId=&first_name=Test&last_name=TEst&email=test%40nuvei.com¤cy=MXN&pmDisplayName=1250050958020743198&clientUniqueId=20180327175242&customField1=&customField2=&customField3=&customField4=&customField5=&customField6=&customField7=&customField8=&customField9=&customField10=&customField11=&customField12=&customField13=&customField14=&customField15=&invoice_id=&address1=Addressq&address2=&country=Mexico&state=&city=City&zip=80410100&phone1=23552535506&phone2=&phone3=&client_ip=127.0.0.1&nameOnCard=&cardNumber=&bin=&noCVV=&acquirerId=&acquirerBank=Paymentez-PI&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=217268&merchant_status=&action=&requestVersion=&message=PENDING&merchantLocale=&unknownParameters=&payment_method=apmgw_Oxxo&ID=&merchant_id=979047831696752006&responseTimeStamp=2024-06-11.14%3A07%3A06&buyButtonProductId=&webMasterId=&appliedPromotions=&uniqueCC=&transactionType=Sale&externalEmail=&cardCompany=&eci=&user_token_id=TestToken1122&userPaymentOptionId=116309918&TransactionID=7110000000000172709&ExternalaccountID=1250050958020743198&externalTransactionId=OX-6855&APMReferenceID=F4C5EEB6327698072DA0B9801B756766&orderTransactionId=1299708258&totalAmount=150.00&dynamicDescriptor=Plamen&item_name_1=NA&item_number_1=&item_amount_1=150.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=&cryptogram=&maskedNetworkTokenNumber=&upoRegistrationDate=20240611&type=DEPOSIT&clientRequestId=20240611170702&relatedTransactionId=&sessionId=7826d1e81c96f461729688154f0b&responsechecksum=b2e045a9c05965b49ac54985b5a98409e045be7528c5b8f26dd9b3229b8e737b&advanceResponseChecksum=a7905d7825bec5dec06344b1caed89c6797a4cb94b2fb2ddff9047b76894fb49',
User Experience
Payment
- The user is redirected to a page containing information for the user to make the payment at an OXXO store.
The user experience varies according to provider. For example:
- The user makes the payment at an OXXO store.
Testing
Testing deposits requires a valid Mexico phone number. It must contain at least 10 digits – the area code/lada plus the eight-digit phone number, and preferably the country code (52).
Transactions in the sandbox environment are automatically approved.