POST
/
api
/
v1
/
currency
/
get
curl --request POST \
  --url https://api.paytring.com/api/v1/currency/get \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "hash": "<string>",
  "from": "<string>",
  "to": "<string>"
}'
"{}"

This API is used to convert one currency to another.

Request Body

{
  "key": "string", // Merchant key
  "hash": "string", // Calculated hash for request validation
  "from": "string", // Base currency code
  "to": "string" // Target currency code
}

Responses

200 OK

{
  "status": true,
  "conversion_rate": "number", // Conversion rate between the currencies
  "converted_amount": "number" // Converted amount
}

400 Bad Request

{
  "status": false,
  "error": {
    "message": "string", // Error message
    "code": 400 // Error code
  }
}

Body

application/json

Response

200
application/json

200

The response is of type object.