API reference
Payment methods
Public discovery of a merchant's accepted wallet/token combinations.
List a merchant's active payment methods (wallets + accepted tokens/chains)
GET /payment_methods
Public — no credentials
Public, buyer-facing discovery of a merchant's payment methods. Provide EXACTLY ONE of account_id (returns all the merchant's active wallets) or address (returns just that one wallet). An unknown account/address yields an empty list. Only active wallets and active token holdings are exposed.
Query parameters
-
account_id string
Merchant account UUID — returns all its active wallets.
-
address string
A merchant wallet address — returns just that wallet.
Responses
-
200
The merchant's active wallets, each with its active token holdings nested under
tokens.
curl "https://api.rail0.xyz/payment_methods?account_id=a1b2c3d4-0000-4e5f-8a9b-0c1d2e3f4a5b"const res = await fetch("https://api.rail0.xyz/payment_methods?account_id=a1b2c3d4-0000-4e5f-8a9b-0c1d2e3f4a5b");
if (!res.ok) { const { code, detail } = await res.json(); throw new Error(`${res.status} ${code}: ${detail}`);}const data = await res.json();require "json"require "net/http"
uri = URI("https://api.rail0.xyz/payment_methods?account_id=a1b2c3d4-0000-4e5f-8a9b-0c1d2e3f4a5b")req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }raise "#{res.code}: #{res.body}" unless res.is_a?(Net::HTTPSuccess)data = JSON.parse(res.body)package main
import ( "fmt" "io" "net/http")
func main() { url := "https://api.rail0.xyz/payment_methods?account_id=a1b2c3d4-0000-4e5f-8a9b-0c1d2e3f4a5b" req, err := http.NewRequest(http.MethodGet, url, nil) if err != nil { panic(err) }
res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close()
data, err := io.ReadAll(res.Body) if err != nil { panic(err) } fmt.Println(res.Status, string(data))}Response 200
[ { "id": "5f0c2b1e-8d4a-4f6e-9a7b-2c3d4e5f6a7b", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "label": "Main checkout wallet", "active": false, "deactivated_by": "owner", "tokens": [ { "token_id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f", "token": { "chain_id": 84532, "symbol": "USDC", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "decimals": 6, "active": false }, "active": false, "default": false } ] }]