NodeJs
const { FedaPay, Customer } = require('fedapay');
FedaPay.setApiKey('YOUR_SECRETE_API_KEY');
FedaPay.setEnvironment('sandbox');
const customer = await Customer.update(ID, {
firstname: 'Jane',
lastname: 'Doe',
email: 'jane@doe.com',
phone_number: {
number: '91010101',
country: 'BJ'
}
});\FedaPay\FedaPay::setApiKey('YOUR_SECRETE_API_KEY');
\FedaPay\FedaPay::setEnvironment('sandbox');
$response = \FedaPay\Customer::update(ID, [
'firstname' => 'Jane',
'lastname' => 'Doe',
'email' => 'jane@doe.com',
'phone_number' => [
'number' => '91010101',
'country' => 'BJ'
]
]);require 'fedapay';
FedaPay.api_key = 'YOUR_SECRETE_API_KEY';
FedaPay.environment = 'sandbox';
customer = FedaPay::Customer.update(ID, {
firstname: 'Jane',
lastname: 'Doe',
email: 'jane@doe.com',
phone_number: {
country: 'BJ',
number: '91010101'
}
});curl --request PUT \
--url https://sandbox-api.fedapay.com/v1/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstname": "<string>",
"lastname": "<string>",
"email": "jsmith@example.com",
"phone_number": {
"number": 123,
"country": "<string>"
}
}
'import requests
url = "https://sandbox-api.fedapay.com/v1/customers/{id}"
payload = {
"firstname": "<string>",
"lastname": "<string>",
"email": "jsmith@example.com",
"phone_number": {
"number": 123,
"country": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.fedapay.com/v1/customers/{id}"
payload := strings.NewReader("{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_number\": {\n \"number\": 123,\n \"country\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sandbox-api.fedapay.com/v1/customers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_number\": {\n \"number\": 123,\n \"country\": \"<string>\"\n }\n}")
.asString();{
"id": 123,
"firstname": "<string>",
"lastname": "<string>",
"full_name": "<string>",
"email": "jsmith@example.com",
"account_id": 123,
"phone_number_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}customers
Update a customer
Update the details of an existing customer using their ID.
PUT
/
customers
/
{id}
NodeJs
const { FedaPay, Customer } = require('fedapay');
FedaPay.setApiKey('YOUR_SECRETE_API_KEY');
FedaPay.setEnvironment('sandbox');
const customer = await Customer.update(ID, {
firstname: 'Jane',
lastname: 'Doe',
email: 'jane@doe.com',
phone_number: {
number: '91010101',
country: 'BJ'
}
});\FedaPay\FedaPay::setApiKey('YOUR_SECRETE_API_KEY');
\FedaPay\FedaPay::setEnvironment('sandbox');
$response = \FedaPay\Customer::update(ID, [
'firstname' => 'Jane',
'lastname' => 'Doe',
'email' => 'jane@doe.com',
'phone_number' => [
'number' => '91010101',
'country' => 'BJ'
]
]);require 'fedapay';
FedaPay.api_key = 'YOUR_SECRETE_API_KEY';
FedaPay.environment = 'sandbox';
customer = FedaPay::Customer.update(ID, {
firstname: 'Jane',
lastname: 'Doe',
email: 'jane@doe.com',
phone_number: {
country: 'BJ',
number: '91010101'
}
});curl --request PUT \
--url https://sandbox-api.fedapay.com/v1/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstname": "<string>",
"lastname": "<string>",
"email": "jsmith@example.com",
"phone_number": {
"number": 123,
"country": "<string>"
}
}
'import requests
url = "https://sandbox-api.fedapay.com/v1/customers/{id}"
payload = {
"firstname": "<string>",
"lastname": "<string>",
"email": "jsmith@example.com",
"phone_number": {
"number": 123,
"country": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.fedapay.com/v1/customers/{id}"
payload := strings.NewReader("{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_number\": {\n \"number\": 123,\n \"country\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sandbox-api.fedapay.com/v1/customers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_number\": {\n \"number\": 123,\n \"country\": \"<string>\"\n }\n}")
.asString();{
"id": 123,
"firstname": "<string>",
"lastname": "<string>",
"full_name": "<string>",
"email": "jsmith@example.com",
"account_id": 123,
"phone_number_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}Autorisations
Corps
application/json
Réponse
Customer updated successfully.

