curl --request PATCH \
--url https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id} \
--header 'Accept: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-PARTNER-ID: <api-key>' \
--data '
{
"name": "John Doe",
"status": "active",
"invite_members": [
"john@example.com",
"jane@example.com"
]
}
'import requests
url = "https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id}"
payload = {
"name": "John Doe",
"status": "active",
"invite_members": ["john@example.com", "jane@example.com"]
}
headers = {
"Authorization": "Bearer <token>",
"X-PARTNER-ID": "<api-key>",
"Accept": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-PARTNER-ID': '<api-key>',
Accept: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'John Doe',
status: 'active',
invite_members: ['john@example.com', 'jane@example.com']
})
};
fetch('https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id}', 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://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id}",
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' => 'John Doe',
'status' => 'active',
'invite_members' => [
'john@example.com',
'jane@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Accept: <api-key>",
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-PARTNER-ID: <api-key>"
],
]);
$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://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id}"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"status\": \"active\",\n \"invite_members\": [\n \"john@example.com\",\n \"jane@example.com\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-PARTNER-ID", "<api-key>")
req.Header.Add("Accept", "<api-key>")
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://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id}")
.header("Authorization", "Bearer <token>")
.header("X-PARTNER-ID", "<api-key>")
.header("Accept", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"status\": \"active\",\n \"invite_members\": [\n \"john@example.com\",\n \"jane@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-PARTNER-ID"] = '<api-key>'
request["Accept"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"status\": \"active\",\n \"invite_members\": [\n \"john@example.com\",\n \"jane@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"data": {
"id": "01K946KF851RK7FX075GJHBVKF",
"name": "John Doe",
"status": "active",
"account_number": "000000000123",
"account_type": "owned",
"kyb_status": "kyb_in_review",
"legal_name": "PT Asia Kreatif Studio",
"business_type": "company",
"brand_name": "Asia Kreatif",
"kyb_onboarding_url": "https://sandbox-payment-b2b.singapay.id/kyb/0b0e5ad5957a7c2de066c2cde97e91089b605aae9afeba3398ff871cd1e99d54",
"invite_members": [
"john@example.com"
]
}
}{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized merchant, please sign in"
}
}{
"status": 403,
"success": false,
"error": {
"code": 403,
"message": "Access denied."
}
}{
"status": 404,
"success": false,
"error": {
"code": 404,
"message": "Account not found."
}
}{
"status": 422,
"success": false,
"error": {
"code": 422,
"message": "Validation error.",
"errors": {
"field": [
"error message"
]
}
},
"data": {
"errors": {
"field": [
"error message"
]
}
}
}Update
Update an account. All fields are optional, but at least one of name, status, invite_members must be provided. Optionally, provide invite_members (array of emails) to replace the account’s team member list entirely — omitting the field leaves the current members unchanged. Note: a managed sub account cannot be set to active until its BOSS KYB verification is approved — attempting to do so returns 403.
curl --request PATCH \
--url https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id} \
--header 'Accept: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-PARTNER-ID: <api-key>' \
--data '
{
"name": "John Doe",
"status": "active",
"invite_members": [
"john@example.com",
"jane@example.com"
]
}
'import requests
url = "https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id}"
payload = {
"name": "John Doe",
"status": "active",
"invite_members": ["john@example.com", "jane@example.com"]
}
headers = {
"Authorization": "Bearer <token>",
"X-PARTNER-ID": "<api-key>",
"Accept": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-PARTNER-ID': '<api-key>',
Accept: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'John Doe',
status: 'active',
invite_members: ['john@example.com', 'jane@example.com']
})
};
fetch('https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id}', 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://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id}",
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' => 'John Doe',
'status' => 'active',
'invite_members' => [
'john@example.com',
'jane@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Accept: <api-key>",
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-PARTNER-ID: <api-key>"
],
]);
$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://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id}"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"status\": \"active\",\n \"invite_members\": [\n \"john@example.com\",\n \"jane@example.com\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-PARTNER-ID", "<api-key>")
req.Header.Add("Accept", "<api-key>")
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://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id}")
.header("Authorization", "Bearer <token>")
.header("X-PARTNER-ID", "<api-key>")
.header("Accept", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"status\": \"active\",\n \"invite_members\": [\n \"john@example.com\",\n \"jane@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts/update/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-PARTNER-ID"] = '<api-key>'
request["Accept"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"status\": \"active\",\n \"invite_members\": [\n \"john@example.com\",\n \"jane@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"data": {
"id": "01K946KF851RK7FX075GJHBVKF",
"name": "John Doe",
"status": "active",
"account_number": "000000000123",
"account_type": "owned",
"kyb_status": "kyb_in_review",
"legal_name": "PT Asia Kreatif Studio",
"business_type": "company",
"brand_name": "Asia Kreatif",
"kyb_onboarding_url": "https://sandbox-payment-b2b.singapay.id/kyb/0b0e5ad5957a7c2de066c2cde97e91089b605aae9afeba3398ff871cd1e99d54",
"invite_members": [
"john@example.com"
]
}
}{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized merchant, please sign in"
}
}{
"status": 403,
"success": false,
"error": {
"code": 403,
"message": "Access denied."
}
}{
"status": 404,
"success": false,
"error": {
"code": 404,
"message": "Account not found."
}
}{
"status": 422,
"success": false,
"error": {
"code": 422,
"message": "Validation error.",
"errors": {
"field": [
"error message"
]
}
},
"data": {
"errors": {
"field": [
"error message"
]
}
}
}Authorizations
JWT issued by POST /api/v1.1/access-token/b2b. Send Authorization: Bearer <token>.
Merchant API key (Credential.api_key). Required on every request.
Response format. Send application/json on every merchant API request.
Path Parameters
Account ULID
Body
Optional. New account name. Omit to leave the current name unchanged.
3 - 100"John Doe"
Optional. Target account status. Omit to leave the current status unchanged.
active, inactive "active"
Optional. Array of team member email addresses to grant access to this account. This replaces the entire member list — any existing members not included will lose access. Omit the field to leave current members unchanged. All emails must belong to registered members of the merchant.
50["john@example.com", "jane@example.com"]
