Customers
Get a paginated list of customers with optional filtering
Number of items to return
Specifies the cursor after which to start returning results. For the first page, this should be left empty. For subsequent pages, use the value of the end_cursor field from the previous response.
Specifies the cursor before which to return results. Use this to paginate backwards. For example, to load the previous page, provide the value of the start_cursor field from the last response.
Filter by creation date start (RFC3339 format)
Filter by creation date end (RFC3339 format)
Filter by customer name
OK
GET /customers HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
OK
{
"data": [
{
"created_at": "text",
"default_payment_method_id": "text",
"email": "text",
"external_id": "text",
"id": "text",
"name": "text"
}
],
"end_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH",
"has_next_page": true,
"has_previous_page": false,
"start_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
}
Create a new customer with the provided information
Customer information
Created
Bad Request
Unprocessable Entity
POST /customers HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"email": "text",
"external_id": "text",
"name": "text"
}
{
"created_at": "text",
"default_payment_method_id": "text",
"email": "text",
"external_id": "text",
"id": "text",
"name": "text"
}
Get customer details by ID
Customer ID
OK
Not Found
GET /customers/{id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
{
"created_at": "text",
"default_payment_method_id": "text",
"email": "text",
"external_id": "text",
"id": "text",
"name": "text"
}
Archive a customer
Customer ID
OK
Bad Request
Not Found
Internal Server Error
DELETE /customers/{id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
{
"created_at": "text",
"default_payment_method_id": "text",
"email": "text",
"external_id": "text",
"id": "text",
"name": "text"
}
Get payment methods associated with a customer
Customer ID
OK
GET /customers/{id}/payment-methods HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
OK
{
"data": [
{
"brand": "visa",
"created_at": "text",
"default": true,
"exp_month": "01",
"exp_year": "2025",
"id": "text",
"last4": "text",
"type": "card"
}
]
}
Get a paginated list of users from a customer
Customer ID
Number of items to return
Specifies the cursor after which to start returning results. For the first page, this should be left empty. For subsequent pages, use the value of the end_cursor field from the previous response.
Specifies the cursor before which to return results. Use this to paginate backwards. For example, to load the previous page, provide the value of the start_cursor field from the last response.
OK
GET /customers/{id}/users HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
OK
{
"data": [
{
"created_at": "text",
"email": "text",
"first_name": "text",
"id": "text",
"job_title": "text",
"last_name": "text",
"phone": "text"
}
],
"end_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH",
"has_next_page": true,
"has_previous_page": false,
"start_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
}
Create a new customer user with the provided information
Customer ID
Created
Bad Request
Unprocessable Entity
POST /customers/{id}/users HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 55
{
"email": "text",
"first_name": "text",
"last_name": "text"
}
{
"created_at": "text",
"email": "text",
"first_name": "text",
"id": "text",
"job_title": "text",
"last_name": "text",
"phone": "text"
}
Was this helpful?