Customers


Ressource client

Field Type Description
id UUID UUID unique interne Neopay du Client
name String Nom du client
email String E-mail du client (Requerid)
phone String Numéro de téléphone du client
city String Code de la ville du client
state String Code d'état du client
country String Code pays du client
zip_code String Code postal du client
street String Rue du client
house_number String Numéro de maison du client
currency String Devise du client (ex : EUR)
tax_number String Numéro d'identification fiscale
company_number String Numéro d'entreprise

Exemple de ressource

{
    "id": "98fa8d80-bb04-4a39-a5c0-b69ca5708664",
    "name": "John Doe",
    "email": "jhondoe@email.com",
    "phone": "+33 23 45 67 89",
    "city": "Paris",
    "state": "Île de France",
    "zip_code": "70123",
    "street": "Avenue Victor Hugo.",
    "house_number": "33",
    "currency": "EUR",
    "tax_number": "99 99 999 999 999",
    "company_number": "C9876543"
}

Lister les clients

.GET https://neopay.io/api/customers

Obtenez la collection de ressources des clients disponibles pour l'application spécifique.

Headers

{
    "Authorization": "<my-app-token>",
    "x-app-key": "<my-app-key>",
    "Content-Type": "application/json/",
    "Accept": "application/json"
}

{info.fa-hint} <my-app-token> est le jeton généré pour votre application {info.fa-hint} <my-app-key> est obtenu dans votre portail d'application en tant que Application ID

Exemple de demande

curl --location 'https://neopay.io/api/customers' \
--header 'Authorization: YOUR-TOKEN \
--header 'Content-Type: application/json' \
--header 'x-app-key: YOUR-APPLICATION-TOKEN'

Exemple de réponse

Réponse réussie


HTTP 200
{
    "customers": {
        "data": [
            {
                "id": "98fa8d80-bb04-4a39-a5c0-b69ca5708664",
                "name": "Jhon Doe",
                "email": "jhondoe@email.com",
                "phone": "+01 23 45 67 89",
                "city": "Paris",
                "state": "Île de France",
                "zip_code": "70123",
                "street": "Avenue Victor Hugo.",
                "house_number": "33",
                "currency": "EUR",
                "tax_number": "99 99 999 999 999",
                "company_number": "C9876543"
            }
        ]
    }
}

Obtenir un client

.GET https://neopay.io/api/customers/{id}

Obtenez la ressource à un client spécifique.

Query params

Param Type Description
id
required
UUID UUID obtenu soit en créant un nouveau client, soit en récupérant le List customer endpoint

Exemple de demande

curl --location 'https://neopay.io/api/customers/{id}' \
--header 'Authorization: YOUR-TOKEN \
--header 'Content-Type: application/json' \
--header 'x-app-key: YOUR-APPLICATION-TOKEN'

Exemple de réponse

Réponse réussie


HTTP 200
{
    "customer": {
        "id": "98fa8d80-bb04-4a39-a5c0-b69ca5708664",
        "name": "Jhon Doe",
        "email": "jhondoe@email.com",
        "phone": "+01 23 45 67 89",
        "city": "Paris",
        "state": "Île de France",
        "zip_code": "70123",
        "street": "Avenue Victor Hugo.",
        "house_number": "33",
        "currency": "EUR",
        "tax_number": "99 99 999 999 999",
        "company_number": "C9876543"
    }
}

Créer des clients

.POST https://neopay.io/api/customers

Créer un client pour une application spécifique

Headers

{
    "Authorization": "<my-app-token>",
    "x-app-key": "<my-app-key>",
    "Content-Type": "application/json/",
    "Accept": "application/json"
}

{info.fa-hint} <my-app-token> est le jeton généré pour votre application {info.fa-hint} <my-app-key> est obtenu dans votre portail d'application en tant que Application ID

Exemple de demande

curl --location 'https://neopay.io/api/customers' \
--header 'Authorization: YOUR-TOKEN' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-app-key: YOUR-APPLICATION-TOKEN' \
--data-raw '{
"name": "Jhon Doe",
"email": "jhondoe@email.com",
"phone": "+01 23 45 67 89",
"city": "Paris",
"state": "Île de France",
"zip_code": "70123",
"street": "Avenue Victor Hugo.",
"house_number": "33",
"currency": "EUR",
"tax_number": "99 99 999 999 999",
"company_number": "C9876543"
}'

Request Body example

{
    "name": "Jhon Doe",
    "email": "jhondoe@email.com",
    "phone": "+01 23 45 67 89",
    "city": "Paris",
    "state": "Île de France",
    "zip_code": "70123",
    "street": "Avenue Victor Hugo.",
    "house_number": "33",
    "currency": "EUR",
    "tax_number": "99 99 999 999 999",
    "company_number": "C9876543"
}
Field Type Description
name String Nom du client
email String E-mail du client (Requerid)
phone String Numéro de téléphone du client
city String Code de la ville du client
state String Code d'état du client
country String Code pays du client
zip_code String Code postal du client
street String Rue du client
house_number String Numéro de maison du client
currency String Devise du client (ex : EUR)
tax_number String Numéro d'identification fiscale
company_number String Numéro d'entreprise

Response example

Success Response:


HTTP 200
{
    "message": "Customer saved successfully!",
    "customer": {
        "id": "98fa8d80-bb04-4a39-a5c0-b69ca5708664",
        "name": "Jhon Doe",
        "email": "jhondoe@email.com",
        "phone": "+01 23 45 67 89",
        "city": "Paris",
        "state": "Île de France",
        "zip_code": "70123",
        "street": "Avenue Victor Hugo.",
        "house_number": "33",
        "currency": "EUR",
        "tax_number": "99 99 999 999 999",
        "company_number": "C9876543"
    }
}

Modifier le client

.PATCH https://neopay.io/api/customers/{id}

Mettre à jour un client spécifique.

Query params

Param Type Description
id
required
UUID UUID obtenu soit en créant un nouveau client, soit en récupérant le List customer endpoint

Request Body example

{
    "name": "Jhon Doe Updated",
    "email": "jhondoeupdate@email.com",
    "phone": "+01 23 45 67 89",
    "city": "Paris",
    "state": "Île de France",
    "zip_code": "70123",
    "street": "Avenue Victor Hugo.",
    "house_number": "33",
    "currency": "EUR",
    "tax_number": "99 99 999 999 999",
    "company_number": "C9876543"
}
Field Type Description
id UUID UUID du Client (Requis si vous n'envoyez pas l'e-mail)
name String Nom du client
email String E-mail du client (obligatoire si vous n'envoyez pas l'identifiant)
phone String Numéro de téléphone du client
city String Code de la ville du client
state String Code d'état du client
country String Code pays du client
zip_code String Code postal du client
street String Rue du client
house_number String Numéro de maison du client
currency String Devise du client (ex : EUR)
tax_number String Numéro d'identification fiscale
company_number String Numéro d'entreprise

Exemple de demande

curl --location 'https://neopay.io/api/customers' \
--header 'Authorization: YOUR-TOKEN' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-app-key: YOUR-APPLICATION-TOKEN' \
--data-raw '{
    "name": "Jhon Doe Updated",
    "email": "jhondoeupdate@email.com",
    "phone": "+01 23 45 67 89",
    "city": "Paris",
    "state": "Île de France",
    "zip_code": "70123",
    "street": "Avenue Victor Hugo.",
    "house_number": "33",
    "currency": "EUR",
    "tax_number": "99 99 999 999 999",
    "company_number": "C9876543"
}'

Exemple de réponse

Réponse réussie


HTTP 200
{
    "message": "Customer updated successfully!",
    "customer": {
        "id": "98fa8d80-bb04-4a39-a5c0-b69ca5708664",
        "name": "Jhon Doe Updated",
        "email": "jhondoeupdate@email.com",
        "phone": "+01 23 45 67 89",
        "city": "Paris",
        "state": "Île de France",
        "zip_code": "70123",
        "street": "Avenue Victor Hugo.",
        "house_number": "33",
        "currency": "EUR",
        "tax_number": "99 99 999 999 999",
        "company_number": "C9876543"
    }
}