NodeJs
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');
/* Show customers */
const customer = await Customer.all( params = {}, headers = {} );\FedaPay\Fedapay::setApiKey(MY_API_KEY);
/**
* @var \FedaPay\FedaPayObject
*/
$response = \FedaPay\Customer::all();
$customers = $response->customers;
$meta = $response->meta;require 'fedapay';
# configure FedaPay library
FedaPay.api_key = '' # Your secret api key
FedaPay.environment = '' # sandbox or live
customers = FedaPay::Customer.list;curl --request GET \
--url https://sandbox-api.fedapay.com/v1/customers/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.fedapay.com/v1/customers/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.fedapay.com/v1/customers/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.fedapay.com/v1/customers/search")
.header("Authorization", "Bearer <token>")
.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"
}
]Search your customers
GET
/
customers
/
search
NodeJs
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');
/* Show customers */
const customer = await Customer.all( params = {}, headers = {} );\FedaPay\Fedapay::setApiKey(MY_API_KEY);
/**
* @var \FedaPay\FedaPayObject
*/
$response = \FedaPay\Customer::all();
$customers = $response->customers;
$meta = $response->meta;require 'fedapay';
# configure FedaPay library
FedaPay.api_key = '' # Your secret api key
FedaPay.environment = '' # sandbox or live
customers = FedaPay::Customer.list;curl --request GET \
--url https://sandbox-api.fedapay.com/v1/customers/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.fedapay.com/v1/customers/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.fedapay.com/v1/customers/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.fedapay.com/v1/customers/search")
.header("Authorization", "Bearer <token>")
.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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Réponse
List of customers.
Customer ID.
Customer's first name.
Customer's last name.
Customer's full name.
Customer's email address.
ID of the customer's account.
ID of the customer's phone number.
Date and time of customer creation.
Date and time of last customer update.
Date and time of customer deletion (if applicable).

