Customers

List customers

get

Get a paginated list of customers with optional filtering

Authorizations
Query parameters
limitintegerOptional

Number of items to return

afterstringOptional

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.

beforestringOptional

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.

created_at_startstringOptional

Filter by creation date start (RFC3339 format)

created_at_endstringOptional

Filter by creation date end (RFC3339 format)

company_namestringOptional

Filter by customer name

Responses
200

OK

application/json
get
GET /customers HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
200

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 customer

post

Create a new customer with the provided information

Authorizations
Body

Customer information

emailstringOptional
external_idstringOptional
namestringOptional
Responses
201

Created

application/json
post
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 a customer

get

Get customer details by ID

Authorizations
Path parameters
idstringRequired

Customer ID

Responses
200

OK

application/json
get
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

delete

Archive a customer

Authorizations
Path parameters
idstringRequired

Customer ID

Responses
200

OK

application/json
delete
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"
}

List payment methods

get

Get payment methods associated with a customer

Authorizations
Path parameters
idstringRequired

Customer ID

Responses
200

OK

application/json
get
GET /customers/{id}/payment-methods HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "data": [
    {
      "brand": "visa",
      "created_at": "text",
      "default": true,
      "exp_month": "01",
      "exp_year": "2025",
      "id": "text",
      "last4": "text",
      "type": "card"
    }
  ]
}

List customer users

get

Get a paginated list of users from a customer

Authorizations
Path parameters
idstringRequired

Customer ID

Query parameters
limitintegerOptional

Number of items to return

afterstringOptional

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.

beforestringOptional

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.

Responses
200

OK

application/json
get
GET /customers/{id}/users HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
200

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 customer user

post

Create a new customer user with the provided information

Authorizations
Path parameters
idstringRequired

Customer ID

Body
emailstringOptional
first_namestringOptional
last_namestringOptional
Responses
201

Created

application/json
post
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?