Passa al contenuto
Crea account
o
Accedi
Il logo della documentazione Stripe
/
Chiedi all'IA
Crea un account
Accedi
Inizia
Pagamenti
Ricavi
Per piattaforme e marketplace
Gestione del denaro
Risorse per sviluppatori
Panoramica
Informazioni sui pagamenti con Stripe
Eseguire l'upgrade dell'integrazione
Analisi dei dati sui pagamenti
Pagamenti online
PanoramicaTrovare il caso d'uso più adattoManaged Payments
Utilizzare Payment Links
Creare una pagina di pagamento
Creare un'integrazione iniziale
Creare un'integrazione in-app
Metodi di pagamento
Aggiungere modalità di pagamento
    Panoramica
    Opzioni di integrazione delle modalità di pagamento
    Gestire i metodi di pagamento predefiniti nella Dashboard
    Tipi di metodi di pagamento
    Carte
    Pagare con il saldo Stripe
    Criptovaluta
    Addebiti bancari
    Reindirizzamenti bancari
    Trasferimenti bancari
    Bonifici (Sources)
    Acquista ora, paga dopo
    Pagamenti in tempo reale
    Voucher
      Boleto
      Konbini
      Multibanco
      OXXO
        Accettare un pagamento
    Wallet
    Abilitare metodi di pagamento locali per Paese
    Metodi di pagamento personalizzati
Gestire i metodi di pagamento
Pagare più velocemente con Link
Interfacce di pagamento
Payment Links
Checkout
Elements per il Web
Pagamenti in-app
Scenari di pagamento
Gestire più valute
Flussi di pagamento personalizzati
Acquisizione flessibile
Orchestrazione
Pagamenti di persona
Terminal
Oltre i pagamenti
Costituire un'azienda
Criptovaluta
Financial Connections
Climate
Informazioni sulle frodi
Protezione contro le frodi di Radar
Gestisci le contestazioni
Verificare l'identità
Pagina inizialePagamentiAdd payment methodsVouchersOXXO

Accept an OXXO payment

Learn how to accept OXXO, a common payment method in Mexico.

Attenzione

Stripe automatically presents your customers payment method options by evaluating their currency, payment method restrictions, and other parameters. We recommend that you configure your payment methods from the Stripe Dashboard using the instructions in Accept a payment.

If you want to continue manually configure the payment methods you present to your customers with Checkout, use this guide. Otherwise, update your integration to configure payment methods in the Dashboard.

OXXO is a single use payment method where customers are required to take additional steps to complete their payment. Customers pay by providing an OXXO voucher with a generated number and cash payment at an OXXO convenience store.

Determine compatibility

Supported business locations: MX

Supported currencies: mxn

Presentment currencies: mxn

Payment mode: Yes

Setup mode: No

Subscription mode: No

A Checkout Session must satisfy all of the following conditions to support OXXO payments:

  • Prices for all line items must be in the same currency. If you have line items in different currencies, create separate Checkout Sessions for each currency.
  • You can only use one-time line items (recurring subscription plans are not supported).

Accept a payment

Nota

Build an integration to accept a payment with Checkout before using this guide.

Use this guide to learn how to enable OXXO—it shows the differences between accepting a card payment and using OXXO.

Enable OXXO as a payment method

When creating a new Checkout Session, you need to:

  1. Add oxxo to the list of payment_method_types
  2. Make sure all your line_items use the mxn currency.
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
Stripe::Checkout::Session.create({ mode: 'payment', payment_method_types: ['card'], payment_method_types: ['card', 'oxxo'], # The parameter is optional. The default value of expires_after_days is 3. payment_method_options: { oxxo: { expires_after_days: 2 } }, line_items: [{ price_data: { # To accept `oxxo`, all line items must have currency: mxn currency: 'mxn', product_data: { name: 'T-shirt', }, unit_amount: 2000, }, quantity: 1, }], success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', })

Additional payment method options

You can specify an optional expires_after_days parameter in the payment method options for your Session that sets the number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO voucher will expire on Wednesday at 23:59 America/Mexico_City (UTC-6) time. The expires_after_days parameter can be set from 1 to 7 days. The default is 3 days.

Redirect to Stripe hosted voucher page

After submitting the Checkout form successfully, the customer is redirected to the hosted_voucher_url. The customer can find the barcode or print the OXXO voucher from the hosted voucher page. You can locate the hosted_voucher_url in payment_intent.next_action.oxxo_display_details.

Stripe allows customization of customer-facing UIs on the Branding Settings page. The following brand settings can be applied to the voucher:

  • Icon—your brand image and public business name
  • Accent color—used as the color of Print button
  • Brand color—used as the background color

Fulfill your orders

Because OXXO is a delayed notification payment method, you need to use a method such as webhooks to monitor the payment status and handle order fulfillment. Learn more about setting up webhooks and fulfilling orders.

The following events are sent when the payment status changes:

Event NameDescriptionNext steps

checkout.session.completed

The customer has successfully submitted the Checkout form. Stripe has generated the OXXO voucher.

You can choose to email the hosted_voucher_url to your customer in case they lose the OXXO voucher.

Wait for the customer to pay the OXXO voucher.

checkout.session.async_payment_succeededThe customer has successfully paid the OXXO. The PaymentIntent transitions to succeeded.Fulfill the goods or services that the customer purchased.
checkout.session.async_payment_failedThe OXXO voucher has expired, or the payment has failed for some other reason. The PaymentIntent returns to a status of requires_payment_method.Contact the customer through email and request that they place a new order.

Test your integration

When testing your Checkout integration, select OXXO as the payment method and click the Pay button.

EmailDescription

{any_prefix}@{any_domain}

Simulates an OXXO voucher which a customer pays after 3 minutes and the payment_intent.succeeded webhook arrives after about 3 minutes. In production, this webhook arrives after 1 business day.

Example: fulano@test.com

{any_prefix}succeed_immediately@{any_domain}

Simulates an OXXO voucher which a customer pays immediately and the payment_intent.succeeded webhook arrives within several seconds. In production, this webhook arrives after 1 business day.

Example: succeed_immediately@test.com

{any_prefix}expire_immediately@{any_domain}

Simulates an OXXO voucher which expires before a customer pays and the payment_intent.payment_failed webhook arrives within several seconds.

The expires_after field in next_action.oxxo_display_details is set to the current time regardless of what the expires_after_days parameter in payment method options is set to.

Example: expire_immediately@test.com

{any_prefix}expire_with_delay@{any_domain}

Simulates an OXXO voucher which expires before a customer pays and the payment_intent.payment_failed webhook arrives after about 3 minutes.

The expires_after field in next_action.oxxo_display_details is set to 3 minutes in the future regardless of what the expires_after_days parameter in payment method options is set to.

Example: expire_with_delay@test.com

{any_prefix}fill_never@{any_domain}

Simulates an OXXO voucher which expires before a customer pays and the payment_intent.payment_failed webhook arrives after 1 business day and 2 calendar days. In production, this webhook arrives at the same time as in testmode.

Example: fill_never@test.com

FacoltativoSend payment instruction emails

You can enable OXXO payment instruction emails on the Email Settings page in the Dashboard. Once enabled, Stripe sends payment instruction emails upon PaymentIntent confirmation. The emails contain the OXXO number and a link to the Stripe hosted voucher page.

Nota

In testing environments, instruction emails are only sent to email addresses linked to the Stripe account.

Vedi anche

  • Checkout fulfillment
  • Customizing Checkout
Questa pagina è stata utile?
SìNo
  • Hai bisogno di aiuto? Contatta l'assistenza clienti.
  • Partecipa al nostro programma di accesso anticipato.
  • Dai un'occhiata al nostro registro delle modifiche.
  • Domande? Contattaci.
  • LLM? Leggi llms.txt.
  • Realizzato da Markdoc