PUT
/
customers
/
{id}
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'
  }
});
{
  "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"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
integer
required

Customer ID.

Body

application/json
firstname
string
required

Customer's first name.

lastname
string
required

Customer's last name.

email
string

Customer's email address.

phone_number
object

Customer's phone number.

Response

200
application/json
Customer updated successfully.
id
integer

Customer ID.

firstname
string

Customer's first name.

lastname
string

Customer's last name.

full_name
string

Customer's full name.

email
string

Customer's email address.

account_id
integer

ID of the customer's account.

phone_number_id
integer

ID of the customer's phone number.

created_at
string

Date and time of customer creation.

updated_at
string

Date and time of last customer update.

deleted_at
string

Date and time of customer deletion (if applicable).