Create Withdrawal
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({tokenAddress: '<string>', amount: '<string>'})
};
fetch('https://gp-auth-module.prod.gnosispay.com/user/withdrawal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://gp-auth-module.prod.gnosispay.com/user/withdrawal \
--header 'Content-Type: application/json' \
--data '
{
"tokenAddress": "<string>",
"amount": "<string>"
}
'import requests
url = "https://gp-auth-module.prod.gnosispay.com/user/withdrawal"
payload = {
"tokenAddress": "<string>",
"amount": "<string>"
}
headers = {"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://gp-auth-module.prod.gnosispay.com/user/withdrawal"
payload := strings.NewReader("{\n \"tokenAddress\": \"<string>\",\n \"amount\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://gp-auth-module.prod.gnosispay.com/user/withdrawal")
.header("Content-Type", "application/json")
.body("{\n \"tokenAddress\": \"<string>\",\n \"amount\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gp-auth-module.prod.gnosispay.com/user/withdrawal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"tokenAddress\": \"<string>\",\n \"amount\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"withdrawalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"success": false,
"error": {
"name": "ValidationError",
"message": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}User
Create Withdrawal
Create a withdrawal request for the authenticated user. Requires an existing account.
POST
/
user
/
withdrawal
Create Withdrawal
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({tokenAddress: '<string>', amount: '<string>'})
};
fetch('https://gp-auth-module.prod.gnosispay.com/user/withdrawal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://gp-auth-module.prod.gnosispay.com/user/withdrawal \
--header 'Content-Type: application/json' \
--data '
{
"tokenAddress": "<string>",
"amount": "<string>"
}
'import requests
url = "https://gp-auth-module.prod.gnosispay.com/user/withdrawal"
payload = {
"tokenAddress": "<string>",
"amount": "<string>"
}
headers = {"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://gp-auth-module.prod.gnosispay.com/user/withdrawal"
payload := strings.NewReader("{\n \"tokenAddress\": \"<string>\",\n \"amount\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://gp-auth-module.prod.gnosispay.com/user/withdrawal")
.header("Content-Type", "application/json")
.body("{\n \"tokenAddress\": \"<string>\",\n \"amount\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gp-auth-module.prod.gnosispay.com/user/withdrawal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"tokenAddress\": \"<string>\",\n \"amount\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"withdrawalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"success": false,
"error": {
"name": "ValidationError",
"message": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}⌘I