Skip to main content

Creating FIAT payment

XAMAX provides the ability to perform end-to-end payments via payment links or via payment forms. To use these solutions, no additional integration into merchant systems is required. All solutions are implemented on the XAMAX side.

  • when using the link, XAMAX generates payment details for the country (or currency) of the buyer and provides the merchant with a link or QR code for payment. The merchant can send a link to the buyer for payment
  • when using the payment form, the buyer will be redirected to the XAMAX payment form to make a payment

For both methods, XAMAX keeps track of when the buyer makes the payment and notifies the merchant of this. The notification can be received via the callback URL or the payment status can be tracked in the merchant's personal account.

Creating FIAT payment link

Payment links provides a way to easily integrate e-commerce purchases to your online or offline business

Merchant can accept payments through any channel or device. All you need to do is send the Payment link to the customer, and it will take them to a XAMAX's payment form for them to complete the payment. Merchant can send Payment link by email or in text message or can show QR code for payment on any screen!

tip

Links can only be used to accept one-time payments, and expire after 24 hours by default.

Available payment methods

MethodAPI code of methods
Credit/Dedit Cardcredit_card
QR codeqr_code
Virtual Accountvirtual_account
Virtual Bank Accountvirtual_bank_account
Online Bankingonline_banking
UPIupi
E-wallets *name_ewallet
PayIDpay_id
* - OVO, TrueMoney, MOMO, ZALO, GCASH, GRABPAY, PAYMAYA

Available currencies

RegionAPI code of countryCurrencyAPI code of currency
WorldCOL, USA and etcUS dollarUSD
WorldFRA, POL and etcEUROEUR
ArgentineARGArgentine PesoARS
AustraliaAUSAustralian DollarAUD
BrazilBRABrazilian realBRL
IndiaINDIndian RupeeINR
IndonesiaIDNIndonesian RupiahIDR
KenyaKENKenyan ShillingKES
MalaysiaMYSMalaysian RinggitMYR
MexicoMEXMexican PesoMXN
New ZealandNZDNew Zealand DollarNZD
NigeriaNGANigerian NairaNGN
PhilippinePHLPhilippine pesoPHP
ThailandTHAThai BahtTHB
VietnamVNMVietnamese DongVND

Every day we are expanding the number of currencies offered.
Actual list of currencies can check with Your account manager

Creating payment through personal area

The merchant can create an account for payment through a personal account:

  1. In the Fiat Gateway section, click on New transaction

img

  1. In the new New transaction window, you must fill in the required fields:
  • country
  • payment currency (filled in automatically)
  • payment method, several payment methods may be available for each country
  • amount of payment
  • e-commerce order number
  • payment description

img

  1. XAMAX saves the data and creates a payment link, the merchant needs to check the data, copy the link and send it to the buyer

img

  1. If the user follows the payment link, he will be taken to the XAMAX payment form. The buyer needs to fill in the payment or personal data and complete the payment

img

  1. After creating a payment link, the transaction appears in the list of transactions in the Pending status. Merchant can track all created transactions and their status

img

  1. Merchant can view detailed information on each transaction

img

Creating payment through API

The merchant can create an payment through a XAMAX API:

POST https://api.xamax.io/fiat/v1/transaction HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"transaction_id": "1",
"payment_method": "credit_card",
"amount": 700,
"country": "THA",
"currency": "USD",
"description": "Payment name",
"success_redirect_url": "https://example.com",
"fail_redirect_url": "https://example.com",
"type_of_calculation": "forward_with_fee"
}
ParameterMandatoryTypeDescriptionExample
transaction_idYesstringTransaction unique reference identifier1
payment_methodYesstringPayment method for specified country. You can use this methodscredit_card
amountYesnumberAmount for transaction100
countryYesstringCountry code in ISO 3166-1 Alpha-3 formatTHA
currencyYesstringCurrency code in ISO 4217 Alpha-3 formatUSD
descriptionYesstringDestination, merchnt's information about payment or purpose of transactionPurchase#123
success_redirect_urlYesstringURL address, where the customer to be redirected after success processinghttps://xamax.io/callback
fail_redirect_urlYesstringURL address, where the customer to be redirected after falied processinghttps://xamax.io/callback
type_of_calculationYesenumType of fee calculation. Available values are forward_without_fee, forward_with_feeforward_without_fee
transaction_typeNoenumType of response. Available values are link, custom_formlink

Response example

{
"type": "link",
"ex_rate": 84.6,
"value": {
"link": "https://api.xamax.io/fiat/ui/page-w?id=eyJ0cmFuc2FjdGlvbl9pZCI6IjE3NyIsIm1lcmN"
}
}
tip

After the payment processing is completed, XAMAX sends a notification to the merchant if the callback URL is set in the settings. You can set the callback URL in payment settings of your personal account

Creating card payment through API (merchant's own card payment form)

In case, if the merchant has a own form (only for card (FIAT to FIAT) payment), can be used next flow
(Available check with Your account manager)

1. Create transaction with method POST /fiat/v1/transaction

POST https://api.xamax.io/fiat/v1/transaction HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"transaction_id": "1",
"payment_method": "credit_card",
"amount": 700,
"country": "THA",
"currency": "USD",
"description": "Payment name",
"success_redirect_url": "https://example.com",
"fail_redirect_url": "https://example.com",
"type_of_calculation": "forward_with_fee",
"transaction_type": "custom_form"
}
ParameterMandatoryTypeDescriptionExample
transaction_idYesstringTransaction unique reference identifier123
payment_methodYesstringPayment method for specified country. You can use this methodscredit_card
amountYesnumberAmount for transaction124.50
countryYesstringCountry code in ISO 3166-1 Alpha-3 formatVNM
currencyYesstringCurrency code in ISO 4217 Alpha-3 formatUSD
descriptionNostringDescription, merchant's information about payment or purpose of transactionPurchase#123
success_redirect_urlNostringURL address, where the customer to be redirected after success processinghttps://xamax.io/callback
fail_redirect_urlNostringURL address, where the customer to be redirected after falied processinghttps://xamax.io/callback
type_of_calculationNoenumType of fee calculation. Available values are forward_without_fee, forward_with_feeforward_with_fee
transaction_typeNoenumType of response. Available values are link, custom_formcustom_form

2. Receive response by method POST /fiat/v1/transaction

{
"transaction_id": 123131333,
"amount_charged": 100,
"currency": "USD",
"type": "custom_form",
"ex_rate": 1
}
ParameterTypeDescriptionExample
transaction_idstringUnique transaction identifier of the merchant (platform)123
amount_chargedstringAmount, which should to show the payer on merchant's form124.50
currencystringCurrency of paymentUSD
typestringType of transactioncustom_form
ex_ratestringExchange rate from local currency to USD1

3. Send request with method POST /fiat/v1/transaction/submit

POST https://api.xamax.io/fiat/v1/transaction/submit HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"transaction_id": "1",
"card_number": "4917484589897107",
"card_expiry_month": "09",
"card_expiry_year": "29",
"card_cvv": "123",
"first_name": "Joe",
"last_name": "Doe",
"country": "USA",
"state": "Florida",
"city": "Miami",
"postcode": "291923",
"address": "Some Fake Address 123",
"phone": "998900858585",
"email": "some@example.com"
}
ParameterMandatoryTypeDescriptionExample
transaction_idYesstringTransaction unique reference identifier, which was used at POST /fiat/v1/transaction100
card_numberYesstringCredit/Debit card number42424242424242
card_expiry_monthYesstringCredit/Debit card expiry month11
card_expiry_yearYesstringCredit/Debit card expiry year2027
card_cvvYesstringCredit/Debit card CVV or CVC. It is 3 or 4 digit number at the back of the card123
first_nameYesstringUser's first name appears on his/her Credit/Debit CardJames
last_nameYesstringUser's last name appears on his/her Credit/Debit CardToni
countryYesstringUser 2 Character country codeUS
stateYesstringUser state or provinceCalifornia
cityYesstringUser cityLos Angeles
postcodeYesstringUser resident postcode654213
addressYesstringUser resident address4013 Loving Acres Road
phoneYesstringUser active mobile number7767545432
emailYesstringUser's active email address. This essential information ensures seamless communication and enables access to personalized features and updatesinfo@xamax.io

4. Await response

XAMAX can return at response redirect_url, if required 3Ds

{
"response_type": "3ds_redirect",
"redirect_url": "https://api.xamax.io/fiat/ui/waiting/eyJ0cmFuc2FjdGlvbl9pZCI6IjUwN2RhOGIzLWQyNWEtNDRlMS1hZjliLTIxM2ZjYTI3MGFjOSJ9",
"message": "You need to confirm your payment"
}

4. Success payment

Afer success payment from payer side, XAMAX will send callback by the transaction to merchant callback_url

Getting list of transactions

GET https://api.xamax.io/fiat/v1/transactions HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}

Request contains query parameters

ParameterTypeDescriptionDefault valueExample
order_direction *stringDirection of sorting. Available values : asc, descascasc
orderstringOrder by fieldstatus
page *stringPage number1
per_page *stringNumber of transactions on one page2020
statusstringFilter by status. Available values : transaction_status_pending, transaction_status_confirmed, transaction_status_failed, transaction_status_waitingtransaction_status_waiting
payment_methodstringFilter by payment methods. Available values : virtual_account, qr_scan, online_bank_transfer, credit_card, wire, paymay_ewallet, grabpay_ewallet, gcash_ewallet, ewallet, online_banking, mobile_money, upi, upi2, we_chat_pay, ali_pay, cup, p2p, cash, cards, agent, momo_ewallet, zalo_ewallet, virtual_bank_account, qr_code, truemoney_ewallet, upi_ewallet, ovo_ewallet, go_pay_ewallet, promptpaygo_pay_ewallet
sincestringFilter from creating transaction's date
tillstringFilter to creating transaction's date
* - Required parameter

Response example

{
"transactions": [
{
"id": 1,
"merchant_id": 12,
"amount": 700,
"amount_charged": 720,
"transaction_id": 123,
"currency": "NGN",
"status": "transaction_status_pending",
"description": "Deposit payin",
"additional_currency": "USD",
"rate_merchant_final": 675,
"created_at": "2023-06-02T07:07:51.000000Z",
"payment_method": "cards"
}
]
}

Getting detailed information of transaction

GET https://api.xamax.io/fiat/v1/transaction?transaction_id={ID} HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}

Request contains query parameters

ParameterTypeDescriptionDefault valueExample
transaction_id *stringTransaction's Identifier100
* - Required parameter

Response example

{
"transaction_id": 1,
"created_at": "2023-05-30T14:23:55.000000Z",
"updated_at": "2023-05-30T14:23:55.000000Z",
"amount_delivred": 700,
"currency": "NGN",
"country": "NGA",
"descriptions": "Deposit",
"payment_method": "cards",
"status": "transaction_status_pending",
"type_of_fee_calculate": "forward_without_fee",
"link": "https://api.xamax.io/fiat/ui/page-a?id=eyJtZXJjaGFudF9pZCI6IjEiLCJhbW91bnQiOjczNi44NCwiY291bnRyeSI6IlRIIiwicHJvZHVjdCI6IjEiLCJjdXJyZW5jeSI6IlRIQiIsInRyYW5zYWN0aW9uX2lkIjoiMSIsInBheW1lbnRfbWV0aG9kIjoicXJfY29kZSJ9",
"merchant_fee_fix": 230.3,
"merchant_fee_percent": 2,
"additional_currency": "USD",
"rate": 756
}