cURL
curl --request POST \
--url https://sandbox.onconsul.com/v1/withdrawals/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination_bank_account_id": "<string>",
"receiver_amount": "<string>",
"sender_amount": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destination_bank_account_id: '<string>',
receiver_amount: '<string>',
sender_amount: '<string>'
})
};
fetch('https://sandbox.onconsul.com/v1/withdrawals/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.onconsul.com/v1/withdrawals/quote"
payload := strings.NewReader("{\n \"destination_bank_account_id\": \"<string>\",\n \"receiver_amount\": \"<string>\",\n \"sender_amount\": \"<string>\"\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))
}import requests
url = "https://sandbox.onconsul.com/v1/withdrawals/quote"
payload = {
"destination_bank_account_id": "<string>",
"receiver_amount": "<string>",
"sender_amount": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"created_at": "2023-11-07T05:31:56Z",
"destination": {
"amount": "<string>",
"min_amount": "<string>"
},
"id": "<string>",
"market_rate": "<string>",
"source": {
"amount": "<string>",
"account_id": "<string>"
},
"time_estimate_seconds": 123,
"expires_at": "2023-11-07T05:31:56Z",
"fee": {
"flat_fee": "<string>",
"percentage_fee": "<string>"
},
"is_ach_debit": true
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Withdrawals
Create a Withdrawal Quote
POST
/
withdrawals
/
quote
cURL
curl --request POST \
--url https://sandbox.onconsul.com/v1/withdrawals/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination_bank_account_id": "<string>",
"receiver_amount": "<string>",
"sender_amount": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destination_bank_account_id: '<string>',
receiver_amount: '<string>',
sender_amount: '<string>'
})
};
fetch('https://sandbox.onconsul.com/v1/withdrawals/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.onconsul.com/v1/withdrawals/quote"
payload := strings.NewReader("{\n \"destination_bank_account_id\": \"<string>\",\n \"receiver_amount\": \"<string>\",\n \"sender_amount\": \"<string>\"\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))
}import requests
url = "https://sandbox.onconsul.com/v1/withdrawals/quote"
payload = {
"destination_bank_account_id": "<string>",
"receiver_amount": "<string>",
"sender_amount": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"created_at": "2023-11-07T05:31:56Z",
"destination": {
"amount": "<string>",
"min_amount": "<string>"
},
"id": "<string>",
"market_rate": "<string>",
"source": {
"amount": "<string>",
"account_id": "<string>"
},
"time_estimate_seconds": 123,
"expires_at": "2023-11-07T05:31:56Z",
"fee": {
"flat_fee": "<string>",
"percentage_fee": "<string>"
},
"is_ach_debit": true
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Request a quote to convert USDC into fiat currency.
The destination currency and payment rail are determined
by the linked bank account.
The response includes the exchange rate, fees, and
estimated settlement time.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I

