Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
Customer created successfully.
The response is of type object
.
const { FedaPay, Customer } = require('fedapay');
/* Replace YOUR_SECRETE_API_KEY with your real API key */
FedaPay.setApiKey("YOUR_SECRETE_API_KEY");
/* Specify whether you want to run your query in test or live mode */
FedaPay.setEnvironment('sandbox'); //or setEnvironment('live');
/* Create customer */
const customer = await Customer.create({
firstname: 'John',
lastname: 'Doe',
email: 'john@doe.com',
phone_number: {
number: '90090909',
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"
}
const { FedaPay, Customer } = require('fedapay');
/* Replace YOUR_SECRETE_API_KEY with your real API key */
FedaPay.setApiKey("YOUR_SECRETE_API_KEY");
/* Specify whether you want to run your query in test or live mode */
FedaPay.setEnvironment('sandbox'); //or setEnvironment('live');
/* Create customer */
const customer = await Customer.create({
firstname: 'John',
lastname: 'Doe',
email: 'john@doe.com',
phone_number: {
number: '90090909',
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"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Customer created successfully.
The response is of type object
.