Saltar al contenido principal
You can price a payment in US dollars. The card is always charged in Mexican pesos: Compago converts the dollar price at the exchange rate of the moment the customer pays, and the payment records the dollars, the rate and the pesos.

How the rate is built

The pesos are the dollar amount times the exchange rate, rounded half up to the centavo. A tip in dollars is converted with the sale: the total is converted once and the tip is what it adds over the sale, so sale and tip always add up to the centavo.
Your customer sees the price in dollars, the final exchange rate with its date and the total in pesos. They never see the FIX or your markup.

Where you can price in dollars

A dollar price is paid by card only. SPEI is never offered on it: a one-time payment in USD must include CARD in paymentMethods, and paymentMethodOptions.bankTransfer is refused.

When the rate is taken

  • Checkout (payment links and one-time payments): the page quotes the rate when it opens, and the customer is charged exactly the pesos it showed, even if Banxico publishes a newer FIX while they pay. Only a page left open more than 30 minutes after a newer FIX shows the new total and asks the customer to confirm it. Nothing is charged in between.
  • Saved cards: the current rate when you call charge.
  • Subscriptions: each charge converts at that day’s rate, so the pesos can change from one month to the next.
  • Terminal and payment intents: the rate on screen when the cashier taps Cobrar, or when the intent reaches the terminal. That rate is charged even if a newer FIX is published while the card is read.
If Compago has had no rate for 72 hours, dollar prices cannot be charged and answer 409 with EXCHANGE_RATE_UNAVAILABLE. Peso prices are never affected.

Charge a saved card in dollars

These examples call the production host. While you build, replace https://api-harmony.compago.com with https://demo-api-harmony.compago.com and use a key from the Demo dashboard. See Environments.
The response is in pesos, with the conversion beside it:
A hold (holdFunds: true) must be in MXN: a USD hold answers 400 with HOLD_CURRENCY_NOT_SUPPORTED.

Reading a dollar payment

Every payment keeps amount, tipAmount and currency in the pesos the card was charged, so totals, payouts, refunds and reports add up as before. A payment priced in dollars also carries conversion:
conversion is null on a peso payment. A refund returns pesos: the amount charged to the card, never a reconversion at a later rate.

Errors