> ## Documentation Index
> Fetch the complete documentation index at: https://docs.safefypay.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# International sales

> Get paid by buyers outside Brazil in local currency or by card in euro and dollar

With international sales, buyers outside Brazil pay in their own currency, with a local payment method or by card in
euro (EUR) or dollar (USD). You create the charge in reais and Safefy converts it at the current exchange rate.

The sale uses the same route as other transactions, `POST /v1/transactions`, with `method = International` and the
`international` block.

## Payment methods

### Local methods

| Country | Currency | `paymentMethod` | How the buyer pays | Document (`customerDocument`) |
| - | - | - | - | - |
| Mexico | MXN | `spei` | Transfer to the given CLABE | RFC (required) and birth date |
| Mexico | MXN | `oxxo` | Voucher paid at an OXXO store | Optional |
| Argentina | ARS | `ars_transfer` | Transfer to the given CVU | CUIT/CUIL (required) |
| Colombia | COP | `breb` | Link to finish in Bre-B | CC/NIT (required) |
| Colombia | COP | `nequi` | Link to finish in Nequi | CC/NIT (required) |
| Peru | PEN | `yape` | QR Code or approval in the app | DNI (required) |
| Peru | PEN | `plin` | QR Code or approval in the app | DNI (required) |
| Philippines | PHP | `gcash` | Link to finish in GCash | Not required |
| Philippines | PHP | `maya` | Link to finish in Maya | Not required |
| India | INR | `upi` | QR Code or approval in the app | Not required |
| Chile | CLP | `clp_transfer` | Link to finish the transfer | RUT (required) |
| Colombia | COP | `cop_transfer` | Transfer to the given account | CC (required) |
| Ecuador | USD | `ec_transfer` | Transfer to the given account | CI (required) |
| Ecuador | USD | `ec_cash` | Cash payment at an agent network | CI (required) |
| Venezuela | VES | `ves_transfer` | Transfer to the given account | CI (required) |
| Venezuela | VES | `pagomovil` | Pago Móvil with the given data | CI (required) |
| Portugal | EUR | `mbway` | Approval in the MB WAY app (+351 mobile) | Not required |

Each country is served by an international processor, and the available methods depend on it, so not every method in
the table shows up for every organization.

The list that applies to your organization, with limits, exchange rate and required fields for each method, comes from
[International sale methods](https://docs.safefypay.com.br/en/api-reference/transactions/international-methods.md). Use that route to build your form
instead of hardcoding this table.

### Card in euro and dollar

| `paymentMethod` | Currency | Who can pay |
| - | - | - |
| `card_eur` | EUR | Buyers outside Brazil, according to your account's rule |
| `card_usd` | USD | Buyers outside Brazil, according to your account's rule |

The rule for which currency each buyer pays in (`mode`), the card processor (`provider`) and the SDK keys come from
[International card configuration](https://docs.safefypay.com.br/en/api-reference/transactions/international-card-config.md). The card number is typed
in the browser, into the Clivo SDK fields (`provider = clivoglobal`) or Eagle's secure form (`provider = eagleglobal`),
and never goes through your server or Safefy.

## Before you start

* **Enablement:** in Production, international sales are enabled automatically for active organizations with an
  approved business registration (KYB). In Sandbox, they are already enabled for testing. If the methods route returns
  an empty country list, international sales are not enabled for your organization.
* **Registered website:** `international.checkoutUrl` (the page on your site where the buyer pays) is required. In
  Production, it must belong to the website registered in the KYB, on the same domain or a subdomain. The registered
  website comes in `registeredWebsite` on the methods route.
* **Buyer:** name, email and phone with the country code (starting with `+`) are required. Send them in
  `customerName`, `customerEmail` and `customerPhone`, or use an existing `customerId`.
* **Amounts:** `amount` is always in reais (cents) and `currency` stays `BRL`. The amount in the buyer's currency comes
  in the response, in `international.localAmount` (currency x 100, CLP included).
* **Split:** not accepted in international sales.

## Local method flow

**1. Get the methods**

Call `GET /v1/transactions/international/methods` and show the buyer the methods for their country, with the fields
each one requires (`documentRequired`, `birthDateRequired`, `phoneRule`).

**2. Create the transaction**

Send `POST /v1/transactions` with `method = International`, `international.country` and
`international.paymentMethod`.

**3. Show the payment instruction**

The response includes `international.instruction`. Show the buyer the code, QR Code or link, according to `kind`.

**4. Wait for the confirmation**

When the buyer pays, the transaction moves to `Completed` and Safefy calls your `callbackUrl`.

### Example: SPEI in Mexico

```bash theme={null}
curl -X POST https://api-payment.safefypay.com.br/v1/transactions \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "International",
    "amount": 15000,
    "currency": "BRL",
    "description": "Photography course",
    "externalId": "order-1234",
    "callbackUrl": "https://yoursite.com/webhooks/safefy",
    "customerName": "María López",
    "customerEmail": "maria@example.com",
    "customerPhone": "+5215512345678",
    "international": {
      "country": "MX",
      "paymentMethod": "spei",
      "customerDocument": "LOMM900101ABC",
      "customerBirthDate": "1990-01-01",
      "checkoutUrl": "https://yoursite.com/checkout/course",
      "productName": "Photography course"
    }
  }'
```

Response (abridged):

```json theme={null}
{
  "data": {
    "id": "0193f6a2-7c1e-7a3b-9f10-2c4d5e6f7a8b",
    "method": "International",
    "status": "Pending",
    "amount": 15000,
    "currency": "BRL",
    "international": {
      "country": "MX",
      "paymentMethod": "spei",
      "currency": "MXN",
      "localAmount": 49350,
      "exchangeRate": 3.29,
      "exchangeRateSource": "clivo",
      "exchangeRateCapturedAt": "2026-11-02T14:05:00Z",
      "conversionFee": 450,
      "instruction": {
        "kind": "BankTransferCode",
        "code": "646180157000000004",
        "bankName": "STP",
        "beneficiary": "Safefy Pay",
        "reference": "1234567",
        "expiresAt": "2026-11-03T14:05:00Z"
      }
    }
  }
}
```

### `international.instruction` fields

| Field | Description |
| - | - |
| `kind` | `BankTransferCode` (CLABE or CVU), `Voucher` (OXXO), `Redirect` (link) or `QrCodeOrApp` (QR Code or approval in the app) |
| `code` | CLABE, CVU, voucher reference or QR Code content |
| `qrCodeUrl` | QR Code image, when available |
| `redirectUrl` | Link for the buyer to finish the payment |
| `bankName` | Destination bank (transfer) |
| `beneficiary` | Beneficiary (transfer) |
| `reference` | Transfer reference |
| `expiresAt` | Instruction expiration |

## Card flow in euro and dollar

The flow depends on the `provider` returned by `card-config`. With `clivoglobal`, follow the steps below. With
`eagleglobal`, see [Eagle global card](#eagle-global-card) right after.

**1. Get the configuration**

Call `GET /v1/transactions/international/card-config`. Use `currencies` and `mode` to pick the buyer's currency, and
`publishableKey` and `merchantId` to start the Clivo SDK.

**2. Tokenize the card in the browser**

Build the card fields with the Clivo SDK and tokenize the card. You get a `paymentMethodId` (`pm_...`).

**3. Create the card payment**

Call `POST /v1/transactions/international/card-payments` with the `paymentMethodId`, currency, country and the amount
in reais. If `requiresAction` is `true`, finish 3DS in the SDK with the `clientSecret`.

**4. Create the transaction**

Send `POST /v1/transactions` with `method = International`, `international.paymentMethod = card_eur` or `card_usd`
and `international.cardPaymentId` with the `paymentId` from the previous step. Safefy checks with Clivo that the
payment was approved, in the right currency and amount, and the transaction is created already paid.

```json theme={null}
{
  "method": "International",
  "amount": 15000,
  "currency": "BRL",
  "customerName": "Marie Curie",
  "customerEmail": "marie@example.com",
  "customerPhone": "+33612345678",
  "international": {
    "country": "FR",
    "paymentMethod": "card_eur",
    "cardPaymentId": "pi_3QabcXYZ",
    "checkoutUrl": "https://yoursite.com/checkout/course"
  }
}
```

> [!WARNING]
>
> Each card payment can be used in a single transaction. If the buyer gives up or the amount changes, create a new card
> payment.

### Eagle global card

When `card-config` returns `provider = eagleglobal`, the buyer types the card (or uses Apple Pay and Google Pay) in
Eagle's secure form, opened in an iframe on your page.

**1. Create the card session**

Call `POST /v1/transactions/international/card-payments` with the currency, country, amount in reais and
`paymentMethodId = "eagle"`. The response includes `paymentId`, `sessionId`, `elementToken`, `sessionSecret` and
`compatDate`.

**2. Open Eagle's form**

Load `https://checkout.eaglepagamentos.com.br/embed/global-card` in an `<iframe allow="payment">`. When the iframe
sends `eagle-embed:ready`, reply with `eagle-embed:init` and the session fields, unchanged. Always check
`event.origin`. Eagle must allow your page's domain; without it, the form does not open.

**3. Create the transaction**

When the iframe sends `eagle-embed:paid`, create the transaction with `international.cardPaymentId = paymentId`. The
transaction starts `Pending` and moves to `Completed` when Eagle confirms the payment. You get this change on the
`callbackUrl`. If the iframe sends `eagle-embed:error`, show `event.data.message` to the buyer.

## Querying and getting the confirmation

* [Get transaction](https://docs.safefypay.com.br/en/api-reference/transactions/get.md) returns the `international` block with the currency, local
  amount, exchange rate and payment instruction.
* The `callbackUrl` webhook notifies status changes and includes `data.international` with the buyer's country,
  method, currency and local amount. See [Transaction webhooks](https://docs.safefypay.com.br/en/api-reference/transactions/webhooks.md#international-sales).
* The sale amount goes to your organization's wallet in that currency and becomes available after the country's
  period (`releaseDays` on the methods route).

## Sandbox

* Local methods return a simulated instruction. To mark the sale as paid, use
  [Simulate transaction](https://docs.safefypay.com.br/en/api-reference/transactions/simulate.md) with the complete action.
* For cards, `card-config` returns `isSandbox = true` with no SDK keys. The card payment is simulated and comes out
  approved.

## Most common errors

| `code` | When it happens |
| - | - |
| `unsupported_payment_method` | The method does not exist for the given country |
| `payment_method_disabled` | International sales or the card currency are not enabled for the account or for the buyer's country |
| `amount_below_minimum` | Amount below the country or method minimum, or lower than the fees |
| `international_checkout_url_required` | `international.checkoutUrl` was not sent |
| `international_checkout_url_not_registered_site` | `checkoutUrl` outside the website registered in the KYB, or organization without a website in the KYB |
| `international_card_payment_required` | Card sale without `international.cardPaymentId` |
| `international_card_currency_mismatch` | The card payment was made in another currency |
| `international_card_amount_mismatch` | The amount paid by card is lower than the converted price |
| `international_card_payment_used` | The card payment was already used in another transaction (HTTP 409) |
| `split_method_not_supported` | `splits` sent in an international sale |
| `exchange_rate_unavailable` | Exchange rate unavailable right now (HTTP 503). Try again shortly |
| `no_acquirer_configured` | The organization does not have the international acquirer configured yet. Contact support |
| `duplicate_external_id` | A transaction with the same `externalId` already exists (HTTP 409) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.