Update a beneficiary
curl --request PATCH \
--url https://api.globalstack.io/v1/beneficiaries/{beneficiaryId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"label": "<string>",
"metadata": {},
"merchant_reference": "<string>",
"network": "<string>",
"rail": "payshap",
"provider_id": "<string>",
"account_number": "<string>",
"account_name": "<string>",
"address": "<string>"
}
'import requests
url = "https://api.globalstack.io/v1/beneficiaries/{beneficiaryId}"
payload = {
"name": "<string>",
"label": "<string>",
"metadata": {},
"merchant_reference": "<string>",
"network": "<string>",
"rail": "payshap",
"provider_id": "<string>",
"account_number": "<string>",
"account_name": "<string>",
"address": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
label: '<string>',
metadata: {},
merchant_reference: '<string>',
network: '<string>',
rail: 'payshap',
provider_id: '<string>',
account_number: '<string>',
account_name: '<string>',
address: '<string>'
})
};
fetch('https://api.globalstack.io/v1/beneficiaries/{beneficiaryId}', 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://api.globalstack.io/v1/beneficiaries/{beneficiaryId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'label' => '<string>',
'metadata' => [
],
'merchant_reference' => '<string>',
'network' => '<string>',
'rail' => 'payshap',
'provider_id' => '<string>',
'account_number' => '<string>',
'account_name' => '<string>',
'address' => '<string>'
]),
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://api.globalstack.io/v1/beneficiaries/{beneficiaryId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"metadata\": {},\n \"merchant_reference\": \"<string>\",\n \"network\": \"<string>\",\n \"rail\": \"payshap\",\n \"provider_id\": \"<string>\",\n \"account_number\": \"<string>\",\n \"account_name\": \"<string>\",\n \"address\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.globalstack.io/v1/beneficiaries/{beneficiaryId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"metadata\": {},\n \"merchant_reference\": \"<string>\",\n \"network\": \"<string>\",\n \"rail\": \"payshap\",\n \"provider_id\": \"<string>\",\n \"account_number\": \"<string>\",\n \"account_name\": \"<string>\",\n \"address\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalstack.io/v1/beneficiaries/{beneficiaryId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"metadata\": {},\n \"merchant_reference\": \"<string>\",\n \"network\": \"<string>\",\n \"rail\": \"payshap\",\n \"provider_id\": \"<string>\",\n \"account_number\": \"<string>\",\n \"account_name\": \"<string>\",\n \"address\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Beneficiary updated successfully",
"code": "ok",
"data": {
"id": "ben_01KPBAP7WTDKQKW5B3R31VPNX4",
"customer_id": "cust_01HXYZABC1234567890ABCDEFG",
"name": "Alice Bank Beneficiary",
"type": "fiat",
"currency": "NGN",
"details": {
"country_code": "NG",
"network": "bank",
"account_number": "0039415616",
"provider": {
"id": "prov_01KPBAP7WTDKQKW5B3R31VPNX4",
"name": "Access Bank",
"code": "000014"
},
"rail": "payshap",
"account_name": "ALICE JOHNSON"
},
"metadata": {},
"status": "pending",
"created_at": "2026-04-16T16:14:08.000Z",
"updated_at": "2026-04-16T16:14:08.000Z",
"label": "Alice's salary account",
"merchant_reference": "ref_01HXYZ4K5ABCDEFGHJKLMNPQRS"
},
"meta": {
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}Beneficiaries
Update a beneficiary
Update a beneficiary. Send only the fields you’re changing. Returns the beneficiary, in the same shape as create.
What you can change
| Can change | Can’t change |
|---|---|
name, label, metadata, merchant_reference | type, customer_id, currency, country_code. Create a new beneficiary instead. |
Fiat: network, rail, account_number, account_name, provider_id | |
Crypto: network, address |
Rules
metadatareplaces the whole map, with no merge.merchant_referencecan be replaced, but not cleared withnull.- Changing a fiat
networkneeds a newprovider_idtoo, except for PayShap. rail: omit it to keep the current rail, sendnullto go back to the default, or send a value to set it.- Changing
railneeds a newaccount_numbertoo, because the rail decides what that number means. Leaving PayShap also needs aprovider_id. provider_idon its own is ignored for PayShap.- The result must pass the same checks as create: a supported currency, network and rail for the
country, and an
account_namefor mobile money. - Archived beneficiaries can’t be updated.
Errors
| Status | Code | When |
|---|---|---|
| 400 | bad_request | Field validation failed, an immutable field was sent, or merchant_reference is null. |
| 400 | invalid_input | A cross-field rule is broken, e.g. a network change without provider_id, or the result fails a currency or network check. |
| 404 | not_found | No beneficiary with this id in your integration. |
| 409 | invalid_status | The beneficiary is archived. |
| 409 | duplicate_resource | merchant_reference is used by another beneficiary. |
| 500 | external_service_unavailable | The provider lookup failed. Retry. |
Examples
PATCH /v1/beneficiaries/ben_01KPBAP7WTDKQKW5B3R31VPNX4
{ "account_number": "0099887766" }
Switch from bank to mobile money:
PATCH /v1/beneficiaries/ben_01KPBAP7WTDKQKW5B3R31VPNX4
{
"network": "mobile_money",
"provider_id": "prov_01KPBBNEWPR0V1DERZZZZZZZ4M",
"account_number": "+2348012345678",
"account_name": "Alice Johnson"
}
PATCH
/
v1
/
beneficiaries
/
{beneficiaryId}
Update a beneficiary
curl --request PATCH \
--url https://api.globalstack.io/v1/beneficiaries/{beneficiaryId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"label": "<string>",
"metadata": {},
"merchant_reference": "<string>",
"network": "<string>",
"rail": "payshap",
"provider_id": "<string>",
"account_number": "<string>",
"account_name": "<string>",
"address": "<string>"
}
'import requests
url = "https://api.globalstack.io/v1/beneficiaries/{beneficiaryId}"
payload = {
"name": "<string>",
"label": "<string>",
"metadata": {},
"merchant_reference": "<string>",
"network": "<string>",
"rail": "payshap",
"provider_id": "<string>",
"account_number": "<string>",
"account_name": "<string>",
"address": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
label: '<string>',
metadata: {},
merchant_reference: '<string>',
network: '<string>',
rail: 'payshap',
provider_id: '<string>',
account_number: '<string>',
account_name: '<string>',
address: '<string>'
})
};
fetch('https://api.globalstack.io/v1/beneficiaries/{beneficiaryId}', 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://api.globalstack.io/v1/beneficiaries/{beneficiaryId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'label' => '<string>',
'metadata' => [
],
'merchant_reference' => '<string>',
'network' => '<string>',
'rail' => 'payshap',
'provider_id' => '<string>',
'account_number' => '<string>',
'account_name' => '<string>',
'address' => '<string>'
]),
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://api.globalstack.io/v1/beneficiaries/{beneficiaryId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"metadata\": {},\n \"merchant_reference\": \"<string>\",\n \"network\": \"<string>\",\n \"rail\": \"payshap\",\n \"provider_id\": \"<string>\",\n \"account_number\": \"<string>\",\n \"account_name\": \"<string>\",\n \"address\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.globalstack.io/v1/beneficiaries/{beneficiaryId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"metadata\": {},\n \"merchant_reference\": \"<string>\",\n \"network\": \"<string>\",\n \"rail\": \"payshap\",\n \"provider_id\": \"<string>\",\n \"account_number\": \"<string>\",\n \"account_name\": \"<string>\",\n \"address\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalstack.io/v1/beneficiaries/{beneficiaryId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"metadata\": {},\n \"merchant_reference\": \"<string>\",\n \"network\": \"<string>\",\n \"rail\": \"payshap\",\n \"provider_id\": \"<string>\",\n \"account_number\": \"<string>\",\n \"account_name\": \"<string>\",\n \"address\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Beneficiary updated successfully",
"code": "ok",
"data": {
"id": "ben_01KPBAP7WTDKQKW5B3R31VPNX4",
"customer_id": "cust_01HXYZABC1234567890ABCDEFG",
"name": "Alice Bank Beneficiary",
"type": "fiat",
"currency": "NGN",
"details": {
"country_code": "NG",
"network": "bank",
"account_number": "0039415616",
"provider": {
"id": "prov_01KPBAP7WTDKQKW5B3R31VPNX4",
"name": "Access Bank",
"code": "000014"
},
"rail": "payshap",
"account_name": "ALICE JOHNSON"
},
"metadata": {},
"status": "pending",
"created_at": "2026-04-16T16:14:08.000Z",
"updated_at": "2026-04-16T16:14:08.000Z",
"label": "Alice's salary account",
"merchant_reference": "ref_01HXYZ4K5ABCDEFGHJKLMNPQRS"
},
"meta": {
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}Body
application/json
UpdateBeneficiaryDto
Set to 'payshap' to pay this bank beneficiary over PayShap, or null to clear the rail and return to the corridor's default. Omit to keep the stored rail. Changing the rail always requires account_number, because the rail decides what that field means — a PayShap proxy or a bank account number. Clearing a PayShap rail also requires provider_id, since a PayShap beneficiary stores neither.
Available options:
payshap Example:
"payshap"
Response
Beneficiary updated successfully