Sentra
Payments

Get exchange rate

Get exchange rate for a payment

POST
/payments/{userId}/rate
X-API-KEY<token>

API key for authentication (prefix: sk_dev_ for development, sk_live_ for production)

In: header

Path Parameters

userIdstring

User ID

Formatuuid
source
destination
developerVariableFee?number

Optional developer variable fee

Range0 <= value

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.sentra.xyz/api/v1/payments/497f6eca-6276-4993-bfeb-53cbbbba6f08/rate" \  -H "Content-Type: application/json" \  -d '{    "source": {      "currency": "USDC",      "amount": 100,      "rail": "ETHEREUM"    },    "destination": {      "currency": "USD",      "rail": "ACH",      "countryCode": "US"    },    "developerVariableFee": 0.5  }'
{
  "source": {
    "currency": "USDC",
    "amount": 100,
    "rail": "ETHEREUM"
  },
  "destination": {
    "currency": "USD",
    "amount": 98.5,
    "rail": "ACH",
    "countryCode": "US"
  },
  "exchangeRate": 1,
  "sentraFee": {
    "fixed": 1,
    "variable": 0.5
  },
  "developerFee": {
    "fixed": 0,
    "variable": 0.5
  },
  "totalFee": 1.5
}
{
  "message": "Validation failed",
  "statusCode": 400,
  "details": {
    "field": "email",
    "message": "Invalid email format"
  }
}
{
  "message": "Unauthorized",
  "statusCode": 401
}
{
  "message": "Resource not found",
  "statusCode": 404
}
{
  "message": "Internal server error",
  "statusCode": 500
}