Customers


Customer Resource

Field Type Description
id UUID Neopay internal unique UUID of the Customer
name String Customer Name
email String Customer Email ( Requerid )
phone String Phone number of Customer
city String City code of Customer
state String State code of Customer
country String Country code of Customer
zip_code String Zip_code of Customer
street String Street of Customer
house_number String House number of Customer
currency String Currency of customer (ex: EUR)
tax_number String Tax Number
company_number String Company Number

Resource example:

{
    "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"
}

List customers

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

Get the resource collection of Customers available for the specific application.

Headers

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

{info.fa-hint} <my-app-token> is the token generate for your Application {info.fa-hint} <my-app-key> is obtained in your Application portal as the Application ID

Request example:

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

Response example

Success Response:


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"
            }
        ]
    }
}

Get customer

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

Get the resource to a specific customer.

Query params

Param Type Description
id
required
UUID ID obtained either by creating a new customer or fetching from the List customer endpoint

Request example:

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

Response example

Success Response:


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"
    }
}

Create customers

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

Create a Customer for a specific application

Headers

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

{info.fa-hint} <my-app-token> is the token generate for your Application {info.fa-hint} <my-app-key> is obtained in your Application portal as the Application ID

Request example:

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 Customer Name
email String Customer Email ( Requerid )
phone String Phone number of Customer
city String City code of Customer
state String State code of Customer
country String Country code of Customer
zip_code String Zip_code of Customer
street String Street of Customer
house_number String House number of Customer
currency String Currency of customer (ex: EUR)
tax_number String Tax Number
company_number String Company Number

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"
    }
}

Edit customer

.PATCH https://neopay.io/api/customers/{id} Update a specific customer.

Query params

Param Type Description
id
required
UUID ID obtained either by creating a new customer or fetching from the 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 of the Customer (Required if you don't send the email )
name String Customer Name
email String Customer Email (Required if you don't send the id )
phone String Phone number of Customer
city String City code of Customer
state String State code of Customer
country String Country code of Customer
zip_code String Zip_code of Customer
street String Street of Customer
house_number String House number of Customer
currency String Currency of customer (ex: EUR)
tax_number String Tax Number
company_number String Company Number

Request example:

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"
}'

Response example

Success Response:


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"
    }
}