Update Customer details
curl --request PUT \
--url https://api.creptapay.com/v1/customer/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890"
}
'import requests
url = "https://api.creptapay.com/v1/customer/{id}"
payload = {
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'john.doe@example.com',
first_name: 'John',
last_name: 'Doe',
phone: '+1234567890'
})
};
fetch('https://api.creptapay.com/v1/customer/{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://api.creptapay.com/v1/customer/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'john.doe@example.com',
'first_name' => 'John',
'last_name' => 'Doe',
'phone' => '+1234567890'
]),
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://api.creptapay.com/v1/customer/{id}"
payload := strings.NewReader("{\n \"email\": \"john.doe@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+1234567890\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.creptapay.com/v1/customer/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"john.doe@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creptapay.com/v1/customer/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"john.doe@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Successfully updated customer",
"data": {
"id": "60d0fe4f5311236168a109c9",
"first_name": "Chidera",
"last_name": "Okonkwo",
"company_name": "Okonkwo Stores",
"email": "chidera@example.com",
"phone": "+2348012345678",
"business": "60d0fe4f5311236168a109c8",
"environment": "production",
"createdAt": "2026-07-24T14:08:52.000Z",
"updatedAt": "2026-07-24T14:08:52.000Z"
}
}{
"message": "A grace period can't be longer than 30 days",
"data": null
}{
"message": "Invalid API key",
"data": null
}{
"message": "Plan not found",
"data": null
}Customers
Update Customer
Edit details of an existing customer by ID. Requires secret key starting with sk_.
PUT
/
customer
/
{id}
Update Customer details
curl --request PUT \
--url https://api.creptapay.com/v1/customer/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890"
}
'import requests
url = "https://api.creptapay.com/v1/customer/{id}"
payload = {
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'john.doe@example.com',
first_name: 'John',
last_name: 'Doe',
phone: '+1234567890'
})
};
fetch('https://api.creptapay.com/v1/customer/{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://api.creptapay.com/v1/customer/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'john.doe@example.com',
'first_name' => 'John',
'last_name' => 'Doe',
'phone' => '+1234567890'
]),
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://api.creptapay.com/v1/customer/{id}"
payload := strings.NewReader("{\n \"email\": \"john.doe@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+1234567890\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.creptapay.com/v1/customer/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"john.doe@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creptapay.com/v1/customer/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"john.doe@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Successfully updated customer",
"data": {
"id": "60d0fe4f5311236168a109c9",
"first_name": "Chidera",
"last_name": "Okonkwo",
"company_name": "Okonkwo Stores",
"email": "chidera@example.com",
"phone": "+2348012345678",
"business": "60d0fe4f5311236168a109c8",
"environment": "production",
"createdAt": "2026-07-24T14:08:52.000Z",
"updatedAt": "2026-07-24T14:08:52.000Z"
}
}{
"message": "A grace period can't be longer than 30 days",
"data": null
}{
"message": "Invalid API key",
"data": null
}{
"message": "Plan not found",
"data": null
}Update specific details of an existing customer profile.
Request authentication
This endpoint requires a Secret Key (sk_...) passed in either the x-api-key header or as a Bearer token in the Authorization header.
Path parameters
string
required
The unique ID of the customer to update.
Request parameters
string
The new email address for the customer profile.
string
The new first name for the customer profile.
string
The new last name for the customer profile.
string
The new phone number for the customer profile.