POST /v1/transactions, with method = International and the
international block.
Payment methods
Local methods
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. Use that route to build your form
instead of hardcoding this table.
Card in euro and dollar
The rule for which currency each buyer pays in (
mode), the card processor (provider) and the SDK keys come from
International card configuration. 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 inregisteredWebsiteon the methods route. - Buyer: name, email and phone with the country code (starting with
+) are required. Send them incustomerName,customerEmailandcustomerPhone, or use an existingcustomerId. - Amounts:
amountis always in reais (cents) andcurrencystaysBRL. The amount in the buyer’s currency comes in the response, ininternational.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
international.instruction fields
Card flow in euro and dollar
The flow depends on theprovider returned by card-config. With clivoglobal, follow the steps below. With
eagleglobal, see 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.Eagle global card
Whencard-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 returns the
internationalblock with the currency, local amount, exchange rate and payment instruction. - The
callbackUrlwebhook notifies status changes and includesdata.internationalwith the buyer’s country, method, currency and local amount. See Transaction webhooks. - The sale amount goes to your organization’s wallet in that currency and becomes available after the country’s
period (
releaseDayson the methods route).
Sandbox
- Local methods return a simulated instruction. To mark the sale as paid, use Simulate transaction with the complete action.
- For cards,
card-configreturnsisSandbox = truewith no SDK keys. The card payment is simulated and comes out approved.