Skip to main content

Dynamic Currency Payment

Process payments with automatic currency conversion from base currency to deposit currency.

Endpoint Information

Name: Dynamic Currency Payment
Method: POST
URL: {{BASE_URL}}/api/v1/payment/request

Description

If you need to convert currency to a different currency, you can add the depositCurrency field which will be converted from the base currency.

Example: If you deposit 100 USD to GBP, then 79.45 GBP will be deposited (based on current exchange rates).

Authentication

Type: Basic Auth

  • Username: App Key
  • Password: Secret Key

Request Body

Content-Type: application/json

{
"firstName": "John",
"middleName": "", // optional
"lastName": "Doe",
"reference": "Test123456", // must be 10 characters or more, special characters not allowed
"dob": "2023-07-20",
"email": "[email protected]",
"contactNumber": "+889943432",
"address": "Sweden",
"country": "Sweden",
"state": "Blekinge", // If don't have any state, use "N/A" or "country_name"
"city": "Jämshög",
"zipCode": 11115,
"currency": "USD", // ISO 4217 format - Base currency
"depositCurrency": "GBP", // optional - ISO 4217 format - Target currency for deposit
"amount": 110,
"ttl": 5, // optional (default value: 15 minutes)
"tagName": "macbook pro m2", // optional
"merchantAccountId": "100001",
"webhookUrl": "https://example.webhook" // optional
}

Key Parameter

ParameterTypeRequiredDescription
currencystringYesBase currency in ISO 4217 format (e.g., USD, EUR)
depositCurrencystringNoTarget deposit currency in ISO 4217 format. If provided, the payment will be converted from base currency to this currency

All other parameters are the same as the standard Payment Request.

Response

Success Response

{
"success": true,
"message": "Payment Request Accepted",
"data": {
"payment_url": "https://staging.paymid.com/secure-payment/2bfec39f-55dc-4f48-976b-9d37b1675007"
}
}

How It Works

  1. Customer enters payment amount in the base currency (e.g., 100 USD)
  2. The cashier automatically converts to depositCurrency (e.g., GBP)
  3. Customer sees the converted amount during checkout
  4. The transaction is processed in the deposit currency

Example Screenshot

Dynamic Currency Payment

Important Notes

Currency Conversion

The cashier will automatically handle the currency conversion based on current exchange rates when processing the payment. The final deposited amount may vary slightly based on the exchange rate at the time of transaction.

Country Availability

If your country is missing from the list, please contact the help panel to activate it.