curl --request POST \
--url https://v2.prod.halliday.xyz/payments/withdraw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payment_id": "<string>",
"token_amounts": [
{
"token": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "<string>"
}
],
"recipient_address": "<string>",
"withdraw_account": "SPW"
}
'import requests
url = "https://v2.prod.halliday.xyz/payments/withdraw"
payload = {
"payment_id": "<string>",
"token_amounts": [
{
"token": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "<string>"
}
],
"recipient_address": "<string>",
"withdraw_account": "SPW"
}
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({
payment_id: '<string>',
token_amounts: [
{
token: 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amount: '<string>'
}
],
recipient_address: '<string>',
withdraw_account: 'SPW'
})
};
fetch('https://v2.prod.halliday.xyz/payments/withdraw', 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://v2.prod.halliday.xyz/payments/withdraw",
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([
'payment_id' => '<string>',
'token_amounts' => [
[
'token' => 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'amount' => '<string>'
]
],
'recipient_address' => '<string>',
'withdraw_account' => 'SPW'
]),
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://v2.prod.halliday.xyz/payments/withdraw"
payload := strings.NewReader("{\n \"payment_id\": \"<string>\",\n \"token_amounts\": [\n {\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"<string>\"\n }\n ],\n \"recipient_address\": \"<string>\",\n \"withdraw_account\": \"SPW\"\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://v2.prod.halliday.xyz/payments/withdraw")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payment_id\": \"<string>\",\n \"token_amounts\": [\n {\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"<string>\"\n }\n ],\n \"recipient_address\": \"<string>\",\n \"withdraw_account\": \"SPW\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.prod.halliday.xyz/payments/withdraw")
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 \"payment_id\": \"<string>\",\n \"token_amounts\": [\n {\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"<string>\"\n }\n ],\n \"recipient_address\": \"<string>\",\n \"withdraw_account\": \"SPW\"\n}"
response = http.request(request)
puts response.read_body{
"payment_id": "<string>",
"withdraw_authorization": "<string>",
"state_token": "<string>"
}{
"errors": [
{
"kind": "other",
"message": "Missing field 'token_amounts'."
}
]
}{
"errors": [
{
"kind": "other",
"message": "Invalid or missing API key"
}
]
}{
"errors": [
{
"kind": "other",
"message": "You are not authorized to withdraw funds from this payment"
}
]
}{
"errors": [
{
"kind": "other",
"message": "Payment 'pay_def456' not found"
}
]
}Return funds to owner or retry payment
Request a withdrawal to return funds back to the owner or to a requoted processing address. This endpoint should be used when a payment cannot be completed and funds need to be returned.
curl --request POST \
--url https://v2.prod.halliday.xyz/payments/withdraw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payment_id": "<string>",
"token_amounts": [
{
"token": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "<string>"
}
],
"recipient_address": "<string>",
"withdraw_account": "SPW"
}
'import requests
url = "https://v2.prod.halliday.xyz/payments/withdraw"
payload = {
"payment_id": "<string>",
"token_amounts": [
{
"token": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "<string>"
}
],
"recipient_address": "<string>",
"withdraw_account": "SPW"
}
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({
payment_id: '<string>',
token_amounts: [
{
token: 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amount: '<string>'
}
],
recipient_address: '<string>',
withdraw_account: 'SPW'
})
};
fetch('https://v2.prod.halliday.xyz/payments/withdraw', 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://v2.prod.halliday.xyz/payments/withdraw",
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([
'payment_id' => '<string>',
'token_amounts' => [
[
'token' => 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'amount' => '<string>'
]
],
'recipient_address' => '<string>',
'withdraw_account' => 'SPW'
]),
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://v2.prod.halliday.xyz/payments/withdraw"
payload := strings.NewReader("{\n \"payment_id\": \"<string>\",\n \"token_amounts\": [\n {\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"<string>\"\n }\n ],\n \"recipient_address\": \"<string>\",\n \"withdraw_account\": \"SPW\"\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://v2.prod.halliday.xyz/payments/withdraw")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payment_id\": \"<string>\",\n \"token_amounts\": [\n {\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"<string>\"\n }\n ],\n \"recipient_address\": \"<string>\",\n \"withdraw_account\": \"SPW\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.prod.halliday.xyz/payments/withdraw")
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 \"payment_id\": \"<string>\",\n \"token_amounts\": [\n {\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"<string>\"\n }\n ],\n \"recipient_address\": \"<string>\",\n \"withdraw_account\": \"SPW\"\n}"
response = http.request(request)
puts response.read_body{
"payment_id": "<string>",
"withdraw_authorization": "<string>",
"state_token": "<string>"
}{
"errors": [
{
"kind": "other",
"message": "Missing field 'token_amounts'."
}
]
}{
"errors": [
{
"kind": "other",
"message": "Invalid or missing API key"
}
]
}{
"errors": [
{
"kind": "other",
"message": "You are not authorized to withdraw funds from this payment"
}
]
}{
"errors": [
{
"kind": "other",
"message": "Payment 'pay_def456' not found"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
ID of the payment to withdraw
List of token amounts to withdraw back to the owner or to a requoted processing address
Show child attributes
Show child attributes
On-chain address to withdraw the funds to. The assets will go to the address on the same chain the assets are on.
Type of account to withdraw from.
INTENT, SPW Response
Withdrawal initiated successfully
Signature type required for the withdrawal authorization.
EIP712, EIP191 ID of the withdrawal transaction
Authorization data to sign. For EIP712, this is a JSON string to parse and pass to signTypedData. For EIP191, pass this string directly to signMessage.
Opaque state token to pass back when confirming the withdrawal.

