Cancel vault escrow
curl --request POST \
--url https://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken} \
--header 'Authorization: Bearer <token>'import requests
url = "https://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken}', 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://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Vault escrow cancelled successfully",
"data": {
"id": "665f1b2c9a1e4d0012ab3c50",
"amount": 1000000,
"fee": 25000,
"paymentToken": "PY_7CD34E0F5162",
"state": "CLOSED",
"status": "REFUNDED",
"completedAt": "1784990000",
"settlementType": "VAULT",
"participants": [
{
"customerId": "665f1b2c9a1e4d0012ab3c40",
"amount": 600000,
"status": "REFUNDED",
"stakedAt": "1784900000",
"settledAt": "1784990000"
},
{
"customerId": "665f1b2c9a1e4d0012ab3c41",
"amount": 400000,
"status": "REFUNDED",
"stakedAt": "1784900000",
"settledAt": "1784990000"
}
],
"winnerId": null
}
}5. Stake & resolve: Vault Escrow
Cancel vault escrow
Cancels an open vault. Each participant gets their stake back to their main balance minus their pro-rata share of the platform fee; the fee is collected whether the vault completes or is cancelled. The escrow closes as REFUNDED. Merchant-only: do not send the customer-id header.
POST
/
v1
/
escrow
/
vault
/
cancel
/
{paymentToken}
Cancel vault escrow
curl --request POST \
--url https://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken} \
--header 'Authorization: Bearer <token>'import requests
url = "https://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken}', 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://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.payluk.ng/v1/escrow/vault/cancel/{paymentToken}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Vault escrow cancelled successfully",
"data": {
"id": "665f1b2c9a1e4d0012ab3c50",
"amount": 1000000,
"fee": 25000,
"paymentToken": "PY_7CD34E0F5162",
"state": "CLOSED",
"status": "REFUNDED",
"completedAt": "1784990000",
"settlementType": "VAULT",
"participants": [
{
"customerId": "665f1b2c9a1e4d0012ab3c40",
"amount": 600000,
"status": "REFUNDED",
"stakedAt": "1784900000",
"settledAt": "1784990000"
},
{
"customerId": "665f1b2c9a1e4d0012ab3c41",
"amount": 400000,
"status": "REFUNDED",
"stakedAt": "1784900000",
"settledAt": "1784990000"
}
],
"winnerId": null
}
}Authorizations
Your secret key as a Bearer token. The key prefix selects the environment: sk_test_... (test) or sk_live_... (live).
Path Parameters
The escrow's payment token (e.g. PY_8AB12C9D3045).
⌘I