Confirm quote
curl --request POST \
--url https://api.onstacks.io/v1/ramp/quote/{reference} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination": {},
"idempotency_key": "<string>",
"metadata": {}
}
'import requests
url = "https://api.onstacks.io/v1/ramp/quote/{reference}"
payload = {
"destination": {},
"idempotency_key": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({destination: {}, idempotency_key: '<string>', metadata: {}})
};
fetch('https://api.onstacks.io/v1/ramp/quote/{reference}', 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.onstacks.io/v1/ramp/quote/{reference}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'destination' => [
],
'idempotency_key' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onstacks.io/v1/ramp/quote/{reference}"
payload := strings.NewReader("{\n \"destination\": {},\n \"idempotency_key\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.onstacks.io/v1/ramp/quote/{reference}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": {},\n \"idempotency_key\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onstacks.io/v1/ramp/quote/{reference}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination\": {},\n \"idempotency_key\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"reference": "<string>",
"status": "pending",
"direction": "on_ramp",
"rail": "bank",
"provider": "<string>",
"provider_reference": "<string>",
"quote_reference": "<string>",
"source": {
"amount": "1000000",
"asset": "USDC",
"network": "base"
},
"destination_amount": {
"amount": "1000000",
"asset": "USDC",
"network": "base"
},
"destination": {
"bank_account": {
"account_name": "<string>",
"account_number": "<string>",
"bank_code": "<string>",
"bank_name": "<string>",
"iban": "<string>",
"swift_code": "<string>",
"sort_code": "<string>",
"routing_number": "<string>",
"account_type": "<string>",
"beneficiary": {
"email": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"post_code": "<string>"
}
},
"mobile_money": {
"phone_number": "<string>",
"provider_code": "<string>",
"country_code": "<string>",
"account_name": "<string>",
"currency_code": "<string>"
},
"wallet": {
"address": "<string>",
"network": "base",
"memo": "<string>"
}
},
"funding_instructions": {},
"failure_reason": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"error": null,
"request_id": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}Confirm quote
Confirm a quote with the destination to create a payment. Idempotent on idempotency_key.
POST
https://api.onstacks.io
/
v1
/
ramp
/
quote
/
{reference}
Confirm quote
curl --request POST \
--url https://api.onstacks.io/v1/ramp/quote/{reference} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination": {},
"idempotency_key": "<string>",
"metadata": {}
}
'import requests
url = "https://api.onstacks.io/v1/ramp/quote/{reference}"
payload = {
"destination": {},
"idempotency_key": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({destination: {}, idempotency_key: '<string>', metadata: {}})
};
fetch('https://api.onstacks.io/v1/ramp/quote/{reference}', 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.onstacks.io/v1/ramp/quote/{reference}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'destination' => [
],
'idempotency_key' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onstacks.io/v1/ramp/quote/{reference}"
payload := strings.NewReader("{\n \"destination\": {},\n \"idempotency_key\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.onstacks.io/v1/ramp/quote/{reference}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": {},\n \"idempotency_key\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onstacks.io/v1/ramp/quote/{reference}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination\": {},\n \"idempotency_key\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"reference": "<string>",
"status": "pending",
"direction": "on_ramp",
"rail": "bank",
"provider": "<string>",
"provider_reference": "<string>",
"quote_reference": "<string>",
"source": {
"amount": "1000000",
"asset": "USDC",
"network": "base"
},
"destination_amount": {
"amount": "1000000",
"asset": "USDC",
"network": "base"
},
"destination": {
"bank_account": {
"account_name": "<string>",
"account_number": "<string>",
"bank_code": "<string>",
"bank_name": "<string>",
"iban": "<string>",
"swift_code": "<string>",
"sort_code": "<string>",
"routing_number": "<string>",
"account_type": "<string>",
"beneficiary": {
"email": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"post_code": "<string>"
}
},
"mobile_money": {
"phone_number": "<string>",
"provider_code": "<string>",
"country_code": "<string>",
"account_name": "<string>",
"currency_code": "<string>"
},
"wallet": {
"address": "<string>",
"network": "base",
"memo": "<string>"
}
},
"funding_instructions": {},
"failure_reason": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"error": null,
"request_id": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}Authorizations
Workspace API key. Send it as Authorization: Bearer <api_key>.
Path Parameters
Quote reference.
Query Parameters
Environment scope for environment-partitioned resources. Defaults to sandbox when omitted.
Available options:
sandbox, live Body
application/json