Create a withdrawal
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
token_address: '<string>',
amount: '<string>'
})
};
fetch('https://core.prod.gnosispay.com/partner-api/v1/withdrawals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://core.prod.gnosispay.com/partner-api/v1/withdrawals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token_address": "<string>",
"amount": "<string>"
}
'import requests
url = "https://core.prod.gnosispay.com/partner-api/v1/withdrawals"
payload = {
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token_address": "<string>",
"amount": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.prod.gnosispay.com/partner-api/v1/withdrawals"
payload := strings.NewReader("{\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"token_address\": \"<string>\",\n \"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))
}HttpResponse<String> response = Unirest.post("https://core.prod.gnosispay.com/partner-api/v1/withdrawals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"token_address\": \"<string>\",\n \"amount\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.prod.gnosispay.com/partner-api/v1/withdrawals")
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 \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"token_address\": \"<string>\",\n \"amount\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"withdrawal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": 123,
"message": "<string>",
"reason": "<string>"
}Withdrawals
Create a withdrawal
Creates an instant on-chain withdrawal from an account to its owner address.
The account must be fully provisioned, the token must be supported on the
account’s chain, and no other instant withdrawal may be in progress for the
account. Call GET /accounts/{account_id}/balances first and do not exceed the
token’s max_instant_withdraw value.
Persist the returned withdrawal_id. Processing is asynchronous; use a
webhook or GET /withdrawals/{withdrawal_id} to observe the final status.
POST
/
v1
/
withdrawals
Create a withdrawal
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
token_address: '<string>',
amount: '<string>'
})
};
fetch('https://core.prod.gnosispay.com/partner-api/v1/withdrawals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://core.prod.gnosispay.com/partner-api/v1/withdrawals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token_address": "<string>",
"amount": "<string>"
}
'import requests
url = "https://core.prod.gnosispay.com/partner-api/v1/withdrawals"
payload = {
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token_address": "<string>",
"amount": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.prod.gnosispay.com/partner-api/v1/withdrawals"
payload := strings.NewReader("{\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"token_address\": \"<string>\",\n \"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))
}HttpResponse<String> response = Unirest.post("https://core.prod.gnosispay.com/partner-api/v1/withdrawals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"token_address\": \"<string>\",\n \"amount\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.prod.gnosispay.com/partner-api/v1/withdrawals")
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 \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"token_address\": \"<string>\",\n \"amount\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"withdrawal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": 123,
"message": "<string>",
"reason": "<string>"
}Body
application/json
Account, token, and amount for the withdrawal.
Response
The request has succeeded.
ID of the newly created withdrawal. Use it to track processing status.