curl --request POST \
--url https://staging.api.payluk.ng/v1/escrow/vault/winner/{paymentToken} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"winnerId": "665f1b2c9a1e4d0012ab3c40"
}
'import requests
url = "https://staging.api.payluk.ng/v1/escrow/vault/winner/{paymentToken}"
payload = { "winnerId": "665f1b2c9a1e4d0012ab3c40" }
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({winnerId: '665f1b2c9a1e4d0012ab3c40'})
};
fetch('https://staging.api.payluk.ng/v1/escrow/vault/winner/{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/winner/{paymentToken}",
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([
'winnerId' => '665f1b2c9a1e4d0012ab3c40'
]),
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://staging.api.payluk.ng/v1/escrow/vault/winner/{paymentToken}"
payload := strings.NewReader("{\n \"winnerId\": \"665f1b2c9a1e4d0012ab3c40\"\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://staging.api.payluk.ng/v1/escrow/vault/winner/{paymentToken}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"winnerId\": \"665f1b2c9a1e4d0012ab3c40\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.payluk.ng/v1/escrow/vault/winner/{paymentToken}")
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 \"winnerId\": \"665f1b2c9a1e4d0012ab3c40\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Vault winner declared successfully",
"data": {
"id": "665f1b2c9a1e4d0012ab3c50",
"amount": 1000000,
"fee": 25000,
"paymentToken": "PY_7CD34E0F5162",
"state": "CLOSED",
"status": "COMPLETED",
"completedAt": "1784990000",
"settlementType": "VAULT",
"participants": [
{
"customerId": "665f1b2c9a1e4d0012ab3c40",
"amount": 600000,
"status": "RELEASED",
"stakedAt": "1784900000",
"settledAt": "1784990000"
},
{
"customerId": "665f1b2c9a1e4d0012ab3c41",
"amount": 400000,
"status": "RELEASED",
"stakedAt": "1784900000",
"settledAt": "1784990000"
}
],
"winnerId": "665f1b2c9a1e4d0012ab3c40"
}
}Declare vault winner
The merchant names the winning participant. Every stake is released from the participants’ escrow balances and the whole pot minus the platform fee is credited to the winner’s main balance. The escrow closes as COMPLETED. There is no dispute flow; the merchant is expected to have verified the outcome before calling this. Merchant-only: do not send the customer-id header.
curl --request POST \
--url https://staging.api.payluk.ng/v1/escrow/vault/winner/{paymentToken} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"winnerId": "665f1b2c9a1e4d0012ab3c40"
}
'import requests
url = "https://staging.api.payluk.ng/v1/escrow/vault/winner/{paymentToken}"
payload = { "winnerId": "665f1b2c9a1e4d0012ab3c40" }
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({winnerId: '665f1b2c9a1e4d0012ab3c40'})
};
fetch('https://staging.api.payluk.ng/v1/escrow/vault/winner/{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/winner/{paymentToken}",
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([
'winnerId' => '665f1b2c9a1e4d0012ab3c40'
]),
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://staging.api.payluk.ng/v1/escrow/vault/winner/{paymentToken}"
payload := strings.NewReader("{\n \"winnerId\": \"665f1b2c9a1e4d0012ab3c40\"\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://staging.api.payluk.ng/v1/escrow/vault/winner/{paymentToken}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"winnerId\": \"665f1b2c9a1e4d0012ab3c40\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.payluk.ng/v1/escrow/vault/winner/{paymentToken}")
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 \"winnerId\": \"665f1b2c9a1e4d0012ab3c40\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Vault winner declared successfully",
"data": {
"id": "665f1b2c9a1e4d0012ab3c50",
"amount": 1000000,
"fee": 25000,
"paymentToken": "PY_7CD34E0F5162",
"state": "CLOSED",
"status": "COMPLETED",
"completedAt": "1784990000",
"settlementType": "VAULT",
"participants": [
{
"customerId": "665f1b2c9a1e4d0012ab3c40",
"amount": 600000,
"status": "RELEASED",
"stakedAt": "1784900000",
"settledAt": "1784990000"
},
{
"customerId": "665f1b2c9a1e4d0012ab3c41",
"amount": 400000,
"status": "RELEASED",
"stakedAt": "1784900000",
"settledAt": "1784990000"
}
],
"winnerId": "665f1b2c9a1e4d0012ab3c40"
}
}Authorizations
Your secret key as a Bearer token. The key prefix selects the environment: sk_test_... (staging) or sk_live_... (production); a key on the wrong host is refused with 403 Unauthorized Access. Each key is limited to 10 requests per minute (429 beyond that) and, on production, to the IP addresses on your dashboard allowlist when one is configured.
Path Parameters
The escrow's payment token (e.g. PY_8AB12C9D3045).
Body
The winning participant's customerId.
"665f1b2c9a1e4d0012ab3c40"