OXXO Payments

OXXO is a payment method used in Mexico that allows payers to purchase goods online. When the payer selects OXXO on the checkout page, the payment details are displayed on screen and can be printed. The payer can then pay the amount required for the purchase at an OXXO location. Once the payment is made, you will be notified and the goods may be released to be shipped to the payer.

OXXO is a supported browser payment method in the MasterCard Payment Gateway. This page describes integration details specific to OXXO. It's recommended that you read the integration guidelines for browser payments, before building an OXXO integration.

OXXO browser payments are only supported for transactions in MXN currency (from API v56 onwards) and in USD currency (from API v50 onwards).

Prerequisites

To offer OXXO as a payment method via the MasterCard Payment Gateway:

  • You must be registered with your browser payments service provider.
  • Your merchant profile on the gateway must be configured using the details of your account with the browser payments service provider.
  • You must have a bank account in one of the supported currencies registered against your merchant account at your browser payments service provider.

OXXO Integration

OXXO via Hosted Checkout

OXXO via Hosted Checkout will be available soon. Please contact your payment service provider for further information.

OXXO via Direct Payment

Direct Payment integration allows you to offer OXXO payment method on your own checkout page.

OXXO is supported from API version 50 onwards.

In addition to the standard fields required in a browser payment request, provide the following fields in the Initiate Browser Payment request:

Common Fields

  • sourceOfFunds.type = OXXO
  • browserPayment.operation = PAY (the Authorize operation is not supported by OXXO)
  • customer.email: The email address of the payer.
  • sourceOfFunds.provided.oxxo.bankAccountHolder: The name of the bank account holder for the payer's bank account.

For USD currency (OXXO cross border) transactions ONLY, provide the following additional fields :

  • customer.account.id: Your identifier for the payer's account with you.
  • customer.nationalId: An identifier for the payer assigned by a government authority.

For MXN currency (OXXO domestic) transactions ONLY, provide the following additional fields:

  • sourceOfFunds.provided.oxxo.dueDate: The date by which the payer has to make the payment. If you do not provide a value, the default date will be today plus 3 days.

Preferred Language

You can set the language that you prefer OXXO to use for pages displayed to the payer by providing the browserPayment.preferredLanguage field in the Initiate Browser Payment request. However, the language will be used only if OXXO supports it.

Sample Code to Initiate OXXO Payment for Domestic Transactions
{
   "apiOperation":"INITIATE_BROWSER_PAYMENT",
   "browserPayment":{
      "operation":"PAY",
      "returnUrl":"https://<return_url>"
   },
   "customer":{
      "email":"john.smith@example.com"
   },
   "order":{
      "amount":"10.00",
      "currency":"MXN"
   },
   "sourceOfFunds":{
      "type":"OXXO",
      "provided":{
         "oxxo":{
            "bankAccountHolder":"John Smith",
            "dueDate":"2021-04-01"
         }
      }
   }
}
Sample Code to Initiate OXXO Payment for Cross-Border Transactions
{
    "apiOperation":"INITIATE_BROWSER_PAYMENT",
    "browserPayment":{
      "operation":"PAY",
      "returnUrl":"https://<return_url>"
},
   "customer": {
    "email": "john.smith@example.com",
    "account": {
      "id": "1234567890"
    },
    "nationalId": "1234567890"
  },
  "order": {
    "amount": "10.00",
    "currency": "USD"
  },
  "sourceOfFunds": {
    "type": "OXXO",
    "provided": {
      "oxxo": {
        "bankAccountHolder": "John Smith"
      }
    }
  }
} 

How to Interpret the Transaction Result

The table below shows the transaction response codes for the possible scenarios you may encounter after initiating an OXXO payment.

Initiate Browser Payment Response What This Means...
response.gatewayCode=SUBMITTED
result=SUCCESS
Redirect the payer using the URL provided in the response.
Retrieve Transaction/Retrieve Order Response What This Means...
response.gatewayCode=APPROVED
result=SUCCESS
The payment is successful.
response.gatewayCode=PENDING
result=PENDING
The MasterCard Payment Gateway is waiting for a notification from the acquirer about the payment result. Try RETRIEVE_TRANSACTION again later or listen to notifications from the MasterCard Payment Gateway.
response.gatewayCode=CANCELLED
result=FAILURE
The payer has canceled the interaction for this payment. Offer the payer the option to try another payment method.
response.gatewayCode=DECLINED or ACQUIRER_SYSTEM_ERROR
result=FAILURE
The payment was declined. Offer the payer the option to try another payment method. In the case of an ACQUIRER_SYSTEM_ERROR you may want to inquire with the acquirer the reason for payment failure, or you can try RETRIEVE_TRANSACTION again.
response.gatewayCode=TIMED_OUT
result=FAILURE
Treat this as a declined payment. The MasterCard Payment Gateway will make an attempt to ensure the transaction is not successful or will revert the transaction.

Testing Your Integration

The MasterCard Payment Gateway provides a browser payments emulator that allows you to test your OXXO integration.

Copyright © 2021 MasterCard