List rails
curl --request GET \
--url https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"rails": [
{
"rampType": "on-ramp",
"type": "crypto",
"network": "bitcoin",
"method": "crypto-transaction",
"asset": "BTC",
"decimals": 8,
"features": [
"withdraw"
]
},
{
"rampType": "on-ramp",
"type": "card",
"network": "visa",
"method": "debit-card",
"asset": "USD",
"decimals": 2,
"features": [
"deposit"
]
},
{
"rampType": "on-ramp",
"type": "apm",
"network": "paypal",
"method": "paypal",
"asset": "USD",
"decimals": 2,
"features": [
"deposit"
]
}
]
}Assets
List rails
List rails supported by on-ramp and off-ramp orders.
GET
/
on-off-ramp
/
rails
List rails
curl --request GET \
--url https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enterprise.sandbox.uphold.com/on-off-ramp/rails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"rails": [
{
"rampType": "on-ramp",
"type": "crypto",
"network": "bitcoin",
"method": "crypto-transaction",
"asset": "BTC",
"decimals": 8,
"features": [
"withdraw"
]
},
{
"rampType": "on-ramp",
"type": "card",
"network": "visa",
"method": "debit-card",
"asset": "USD",
"decimals": 2,
"features": [
"deposit"
]
},
{
"rampType": "on-ramp",
"type": "apm",
"network": "paypal",
"method": "paypal",
"asset": "USD",
"decimals": 2,
"features": [
"deposit"
]
}
]
}
List rails returns the rails supported by each ramp type (
It needs no specific scope. If the subject calling the endpoint is a user, the response will be contextualized accordingly.
Each ramp type only lists rails with a method it supports, so filtering by any other method (e.g.
on-ramp and off-ramp), or by the given rampType only, using the same filters (type, network, method and asset) as List rails in the Core API.
Each rail has the same schema as in the Core API, plus its rampType.
The features field indicates whether a rail can be used as the order origin (deposit) or destination (withdraw):
| Ramp type | deposit (origin) | withdraw (destination) |
|---|---|---|
on-ramp | credit-card, debit-card, apple-pay, google-pay, paypal | crypto-transaction |
off-ramp | crypto-transaction | debit-card |
credit-card for off-ramp) returns no rails for that ramp type.
A listed rail that your organization or the user can’t use for that ramp type is returned with empty features.
Why not use the Core API rails
List rails in the Core API returns the rails for Core transactions, which move funds into and out of the accounts of a user. Itsfeatures don’t tell you what an order can do, because:
- The rails of each ramp type are enabled separately. Your organization’s rails for on-ramp and off-ramp orders are configured independently of its Core API rails, and of each other. A rail can be available for orders but not for Core transactions, or the other way around.
- An order uses each rail in one direction only. For example, a Core crypto rail can have both
depositandwithdraw, but an on-ramp order only withdraws to it, and an off-ramp order only deposits from it. Off-ramp orders only pay out to debit cards. - Rails that orders don’t support are left out. Methods no ramp type uses, such as
bank-transfer, are never returned.
Query Parameters
Was this page helpful?