List rails
const url = 'https://api.sulpayments.ch/v1/rails';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.sulpayments.ch/v1/rails \ --header 'Authorization: Bearer <token>'Returns the authenticated merchant's active rails: the asset pair, the
reference to pay into (inbound_reference), where the funds land and the
merchant's fee terms. Chained rails resolve to the final destination; the
intermediate legs are internal routing and are not exposed. Commercial
internals (spread, institutional price) are never part of this payload.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The merchant's active rails
object
One rail as the owning merchant sees it: the asset pair, the reference to
pay into, where the funds land, and the merchant's own fee terms. The
spread lives inside the conversion rate by design and is NEVER a field
here — same masking contract as [MerchantSettlement].
object
Where the funds ultimately land. For chained rails this is the FINAL leg's external destination — the intermediate hops are internal routing the merchant does not see.
The account/wallet the merchant pays into for this rail (a vIBAN for fiat, a wallet address for crypto).
Example
{ "rails": [ { "fee_fixed": "0.5", "fee_percentage": "0.01" } ]}Missing or invalid API key
The error envelope every 4xx/5xx response uses. The error.code is
machine-stable across locales; error.message is localized via the
request's Accept-Language (en by default). error.fields is present only
for per-field validation failures.
object
The body of an [ErrorEnvelope].
object
Machine-stable error code (stable across locales).
Per-field validation errors, present only for validation_failed.
One field-level validation failure inside [ApiError::fields].
object
The machine-stable reason code for this field.
The request field the error applies to (e.g. webhook_url).
Human-readable message, localized by Accept-Language.
Example
{ "error": { "code": "invalid_credentials", "fields": [ { "code": "invalid_credentials" } ], "message": "One or more fields are invalid." }}