Customers
Update customer
Update any subset of a customer. Contact and reference fields can change at any time. Identity fields (name, type, country, identification, registration details, owners) can only change while the customer has no active virtual account, otherwise the request returns 409 customer_identity_locked.
PATCH
/
api
/
v1
/
customers
/
{uuid}
Update customer
curl --request PATCH \
--url https://pay-api.pagoramp.com/api/v1/customers/{uuid} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"firstname": "John",
"lastname": "Doe",
"businessName": "Acme Ltd",
"phone": "+2348012345678",
"country": "NG",
"externalReference": "cust_1001",
"address": {
"line1": "12 Marina Road",
"line2": "<string>",
"city": "Lagos",
"state": "Lagos",
"postalCode": "100001",
"country": "NG"
},
"dateOfBirth": "1990-06-15",
"nationality": "NG",
"occupation": "<string>",
"registrationNumber": "BN123456789",
"owners": [
{
"firstname": "Jane",
"lastname": "Roe",
"ownershipPercent": 60,
"dateOfBirth": "1985-04-12",
"nationality": "CA"
}
],
"documents": [
{
"type": "incorporation",
"url": "https://files.example.com/acme-incorporation.pdf"
}
],
"metadata": {
"plan": "pro"
},
"email": "[email protected]"
}
'import requests
url = "https://pay-api.pagoramp.com/api/v1/customers/{uuid}"
payload = {
"firstname": "John",
"lastname": "Doe",
"businessName": "Acme Ltd",
"phone": "+2348012345678",
"country": "NG",
"externalReference": "cust_1001",
"address": {
"line1": "12 Marina Road",
"line2": "<string>",
"city": "Lagos",
"state": "Lagos",
"postalCode": "100001",
"country": "NG"
},
"dateOfBirth": "1990-06-15",
"nationality": "NG",
"occupation": "<string>",
"registrationNumber": "BN123456789",
"owners": [
{
"firstname": "Jane",
"lastname": "Roe",
"ownershipPercent": 60,
"dateOfBirth": "1985-04-12",
"nationality": "CA"
}
],
"documents": [
{
"type": "incorporation",
"url": "https://files.example.com/acme-incorporation.pdf"
}
],
"metadata": { "plan": "pro" },
"email": "[email protected]"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstname: 'John',
lastname: 'Doe',
businessName: 'Acme Ltd',
phone: '+2348012345678',
country: 'NG',
externalReference: 'cust_1001',
address: {
line1: '12 Marina Road',
line2: '<string>',
city: 'Lagos',
state: 'Lagos',
postalCode: '100001',
country: 'NG'
},
dateOfBirth: '1990-06-15',
nationality: 'NG',
occupation: '<string>',
registrationNumber: 'BN123456789',
owners: [
{
firstname: 'Jane',
lastname: 'Roe',
ownershipPercent: 60,
dateOfBirth: '1985-04-12',
nationality: 'CA'
}
],
documents: [
{type: 'incorporation', url: 'https://files.example.com/acme-incorporation.pdf'}
],
metadata: {plan: 'pro'},
email: '[email protected]'
})
};
fetch('https://pay-api.pagoramp.com/api/v1/customers/{uuid}', 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://pay-api.pagoramp.com/api/v1/customers/{uuid}",
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([
'firstname' => 'John',
'lastname' => 'Doe',
'businessName' => 'Acme Ltd',
'phone' => '+2348012345678',
'country' => 'NG',
'externalReference' => 'cust_1001',
'address' => [
'line1' => '12 Marina Road',
'line2' => '<string>',
'city' => 'Lagos',
'state' => 'Lagos',
'postalCode' => '100001',
'country' => 'NG'
],
'dateOfBirth' => '1990-06-15',
'nationality' => 'NG',
'occupation' => '<string>',
'registrationNumber' => 'BN123456789',
'owners' => [
[
'firstname' => 'Jane',
'lastname' => 'Roe',
'ownershipPercent' => 60,
'dateOfBirth' => '1985-04-12',
'nationality' => 'CA'
]
],
'documents' => [
[
'type' => 'incorporation',
'url' => 'https://files.example.com/acme-incorporation.pdf'
]
],
'metadata' => [
'plan' => 'pro'
],
'email' => '[email protected]'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://pay-api.pagoramp.com/api/v1/customers/{uuid}"
payload := strings.NewReader("{\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"businessName\": \"Acme Ltd\",\n \"phone\": \"+2348012345678\",\n \"country\": \"NG\",\n \"externalReference\": \"cust_1001\",\n \"address\": {\n \"line1\": \"12 Marina Road\",\n \"line2\": \"<string>\",\n \"city\": \"Lagos\",\n \"state\": \"Lagos\",\n \"postalCode\": \"100001\",\n \"country\": \"NG\"\n },\n \"dateOfBirth\": \"1990-06-15\",\n \"nationality\": \"NG\",\n \"occupation\": \"<string>\",\n \"registrationNumber\": \"BN123456789\",\n \"owners\": [\n {\n \"firstname\": \"Jane\",\n \"lastname\": \"Roe\",\n \"ownershipPercent\": 60,\n \"dateOfBirth\": \"1985-04-12\",\n \"nationality\": \"CA\"\n }\n ],\n \"documents\": [\n {\n \"type\": \"incorporation\",\n \"url\": \"https://files.example.com/acme-incorporation.pdf\"\n }\n ],\n \"metadata\": {\n \"plan\": \"pro\"\n },\n \"email\": \"[email protected]\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<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://pay-api.pagoramp.com/api/v1/customers/{uuid}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"businessName\": \"Acme Ltd\",\n \"phone\": \"+2348012345678\",\n \"country\": \"NG\",\n \"externalReference\": \"cust_1001\",\n \"address\": {\n \"line1\": \"12 Marina Road\",\n \"line2\": \"<string>\",\n \"city\": \"Lagos\",\n \"state\": \"Lagos\",\n \"postalCode\": \"100001\",\n \"country\": \"NG\"\n },\n \"dateOfBirth\": \"1990-06-15\",\n \"nationality\": \"NG\",\n \"occupation\": \"<string>\",\n \"registrationNumber\": \"BN123456789\",\n \"owners\": [\n {\n \"firstname\": \"Jane\",\n \"lastname\": \"Roe\",\n \"ownershipPercent\": 60,\n \"dateOfBirth\": \"1985-04-12\",\n \"nationality\": \"CA\"\n }\n ],\n \"documents\": [\n {\n \"type\": \"incorporation\",\n \"url\": \"https://files.example.com/acme-incorporation.pdf\"\n }\n ],\n \"metadata\": {\n \"plan\": \"pro\"\n },\n \"email\": \"[email protected]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pay-api.pagoramp.com/api/v1/customers/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"businessName\": \"Acme Ltd\",\n \"phone\": \"+2348012345678\",\n \"country\": \"NG\",\n \"externalReference\": \"cust_1001\",\n \"address\": {\n \"line1\": \"12 Marina Road\",\n \"line2\": \"<string>\",\n \"city\": \"Lagos\",\n \"state\": \"Lagos\",\n \"postalCode\": \"100001\",\n \"country\": \"NG\"\n },\n \"dateOfBirth\": \"1990-06-15\",\n \"nationality\": \"NG\",\n \"occupation\": \"<string>\",\n \"registrationNumber\": \"BN123456789\",\n \"owners\": [\n {\n \"firstname\": \"Jane\",\n \"lastname\": \"Roe\",\n \"ownershipPercent\": 60,\n \"dateOfBirth\": \"1985-04-12\",\n \"nationality\": \"CA\"\n }\n ],\n \"documents\": [\n {\n \"type\": \"incorporation\",\n \"url\": \"https://files.example.com/acme-incorporation.pdf\"\n }\n ],\n \"metadata\": {\n \"plan\": \"pro\"\n },\n \"email\": \"[email protected]\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Path Parameters
Body
application/json
Required for individuals.
Example:
"John"
Required for individuals.
Example:
"Doe"
Required for businesses.
Example:
"Acme Ltd"
Must start with + and the country code. Spaces, dashes and brackets are removed.
Example:
"+2348012345678"
Example:
"NG"
Your own id for this customer. Unique per merchant.
Example:
"cust_1001"
Individuals.
Example:
"1990-06-15"
Individuals.
Example:
"NG"
Individuals.
Businesses.
Example:
"BN123456789"
Returned unchanged. 4000 characters of JSON at most.
Example:
{ "plan": "pro" }
Available options:
individual, business Example:
Response
Update customer
curl --request PATCH \
--url https://pay-api.pagoramp.com/api/v1/customers/{uuid} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"firstname": "John",
"lastname": "Doe",
"businessName": "Acme Ltd",
"phone": "+2348012345678",
"country": "NG",
"externalReference": "cust_1001",
"address": {
"line1": "12 Marina Road",
"line2": "<string>",
"city": "Lagos",
"state": "Lagos",
"postalCode": "100001",
"country": "NG"
},
"dateOfBirth": "1990-06-15",
"nationality": "NG",
"occupation": "<string>",
"registrationNumber": "BN123456789",
"owners": [
{
"firstname": "Jane",
"lastname": "Roe",
"ownershipPercent": 60,
"dateOfBirth": "1985-04-12",
"nationality": "CA"
}
],
"documents": [
{
"type": "incorporation",
"url": "https://files.example.com/acme-incorporation.pdf"
}
],
"metadata": {
"plan": "pro"
},
"email": "[email protected]"
}
'import requests
url = "https://pay-api.pagoramp.com/api/v1/customers/{uuid}"
payload = {
"firstname": "John",
"lastname": "Doe",
"businessName": "Acme Ltd",
"phone": "+2348012345678",
"country": "NG",
"externalReference": "cust_1001",
"address": {
"line1": "12 Marina Road",
"line2": "<string>",
"city": "Lagos",
"state": "Lagos",
"postalCode": "100001",
"country": "NG"
},
"dateOfBirth": "1990-06-15",
"nationality": "NG",
"occupation": "<string>",
"registrationNumber": "BN123456789",
"owners": [
{
"firstname": "Jane",
"lastname": "Roe",
"ownershipPercent": 60,
"dateOfBirth": "1985-04-12",
"nationality": "CA"
}
],
"documents": [
{
"type": "incorporation",
"url": "https://files.example.com/acme-incorporation.pdf"
}
],
"metadata": { "plan": "pro" },
"email": "[email protected]"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstname: 'John',
lastname: 'Doe',
businessName: 'Acme Ltd',
phone: '+2348012345678',
country: 'NG',
externalReference: 'cust_1001',
address: {
line1: '12 Marina Road',
line2: '<string>',
city: 'Lagos',
state: 'Lagos',
postalCode: '100001',
country: 'NG'
},
dateOfBirth: '1990-06-15',
nationality: 'NG',
occupation: '<string>',
registrationNumber: 'BN123456789',
owners: [
{
firstname: 'Jane',
lastname: 'Roe',
ownershipPercent: 60,
dateOfBirth: '1985-04-12',
nationality: 'CA'
}
],
documents: [
{type: 'incorporation', url: 'https://files.example.com/acme-incorporation.pdf'}
],
metadata: {plan: 'pro'},
email: '[email protected]'
})
};
fetch('https://pay-api.pagoramp.com/api/v1/customers/{uuid}', 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://pay-api.pagoramp.com/api/v1/customers/{uuid}",
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([
'firstname' => 'John',
'lastname' => 'Doe',
'businessName' => 'Acme Ltd',
'phone' => '+2348012345678',
'country' => 'NG',
'externalReference' => 'cust_1001',
'address' => [
'line1' => '12 Marina Road',
'line2' => '<string>',
'city' => 'Lagos',
'state' => 'Lagos',
'postalCode' => '100001',
'country' => 'NG'
],
'dateOfBirth' => '1990-06-15',
'nationality' => 'NG',
'occupation' => '<string>',
'registrationNumber' => 'BN123456789',
'owners' => [
[
'firstname' => 'Jane',
'lastname' => 'Roe',
'ownershipPercent' => 60,
'dateOfBirth' => '1985-04-12',
'nationality' => 'CA'
]
],
'documents' => [
[
'type' => 'incorporation',
'url' => 'https://files.example.com/acme-incorporation.pdf'
]
],
'metadata' => [
'plan' => 'pro'
],
'email' => '[email protected]'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://pay-api.pagoramp.com/api/v1/customers/{uuid}"
payload := strings.NewReader("{\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"businessName\": \"Acme Ltd\",\n \"phone\": \"+2348012345678\",\n \"country\": \"NG\",\n \"externalReference\": \"cust_1001\",\n \"address\": {\n \"line1\": \"12 Marina Road\",\n \"line2\": \"<string>\",\n \"city\": \"Lagos\",\n \"state\": \"Lagos\",\n \"postalCode\": \"100001\",\n \"country\": \"NG\"\n },\n \"dateOfBirth\": \"1990-06-15\",\n \"nationality\": \"NG\",\n \"occupation\": \"<string>\",\n \"registrationNumber\": \"BN123456789\",\n \"owners\": [\n {\n \"firstname\": \"Jane\",\n \"lastname\": \"Roe\",\n \"ownershipPercent\": 60,\n \"dateOfBirth\": \"1985-04-12\",\n \"nationality\": \"CA\"\n }\n ],\n \"documents\": [\n {\n \"type\": \"incorporation\",\n \"url\": \"https://files.example.com/acme-incorporation.pdf\"\n }\n ],\n \"metadata\": {\n \"plan\": \"pro\"\n },\n \"email\": \"[email protected]\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<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://pay-api.pagoramp.com/api/v1/customers/{uuid}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"businessName\": \"Acme Ltd\",\n \"phone\": \"+2348012345678\",\n \"country\": \"NG\",\n \"externalReference\": \"cust_1001\",\n \"address\": {\n \"line1\": \"12 Marina Road\",\n \"line2\": \"<string>\",\n \"city\": \"Lagos\",\n \"state\": \"Lagos\",\n \"postalCode\": \"100001\",\n \"country\": \"NG\"\n },\n \"dateOfBirth\": \"1990-06-15\",\n \"nationality\": \"NG\",\n \"occupation\": \"<string>\",\n \"registrationNumber\": \"BN123456789\",\n \"owners\": [\n {\n \"firstname\": \"Jane\",\n \"lastname\": \"Roe\",\n \"ownershipPercent\": 60,\n \"dateOfBirth\": \"1985-04-12\",\n \"nationality\": \"CA\"\n }\n ],\n \"documents\": [\n {\n \"type\": \"incorporation\",\n \"url\": \"https://files.example.com/acme-incorporation.pdf\"\n }\n ],\n \"metadata\": {\n \"plan\": \"pro\"\n },\n \"email\": \"[email protected]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pay-api.pagoramp.com/api/v1/customers/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"businessName\": \"Acme Ltd\",\n \"phone\": \"+2348012345678\",\n \"country\": \"NG\",\n \"externalReference\": \"cust_1001\",\n \"address\": {\n \"line1\": \"12 Marina Road\",\n \"line2\": \"<string>\",\n \"city\": \"Lagos\",\n \"state\": \"Lagos\",\n \"postalCode\": \"100001\",\n \"country\": \"NG\"\n },\n \"dateOfBirth\": \"1990-06-15\",\n \"nationality\": \"NG\",\n \"occupation\": \"<string>\",\n \"registrationNumber\": \"BN123456789\",\n \"owners\": [\n {\n \"firstname\": \"Jane\",\n \"lastname\": \"Roe\",\n \"ownershipPercent\": 60,\n \"dateOfBirth\": \"1985-04-12\",\n \"nationality\": \"CA\"\n }\n ],\n \"documents\": [\n {\n \"type\": \"incorporation\",\n \"url\": \"https://files.example.com/acme-incorporation.pdf\"\n }\n ],\n \"metadata\": {\n \"plan\": \"pro\"\n },\n \"email\": \"[email protected]\"\n}"
response = http.request(request)
puts response.read_body
