> For the complete documentation index, see [llms.txt](https://docs.alternativepayments.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.alternativepayments.io/api-reference/customers.md).

# Customers

## List customers

> Get a paginated list of customers with optional filtering

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"OAuth2ClientCredentials":["customers:read"]}],"components":{"securitySchemes":{"OAuth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{"checkout:read":"Read checkout data","checkout:write":"Create checkout tokens","customers:read":"Read customers and payment methods","customers:write":"Create and update customers and payment methods","invoices:read":"Read invoices","invoices:write":"Create and update invoices","payments:read":"Read payments and payment requests","payments:write":"Create payments and payment requests","payouts:read":"Read payouts","refunds:read":"Read refunds","refunds:write":"Create refunds","tags:read":"Read customer tags","tags:write":"Create, update and delete customer tags, and add or remove them on customers","webhooks:read":"Read webhook subscriptions and events","webhooks:write":"Manage webhook subscriptions"}}}}},"schemas":{"PaginatedResponse-CustomerReply":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CustomerReply"},"type":"array"},"end_cursor":{"type":"string"},"has_next_page":{"type":"boolean"},"has_previous_page":{"type":"boolean"},"start_cursor":{"type":"string"}},"type":"object"},"CustomerReply":{"properties":{"city":{"type":"string"},"country":{"type":"string"},"created_at":{"type":"string"},"customer_integration_id":{"type":"string"},"default_payment_method_id":{"type":"string"},"ein":{"type":"string"},"email":{"type":"string"},"external_id":{"type":"string"},"id":{"type":"string"},"legal_name":{"type":"string"},"name":{"type":"string"},"postal_code":{"type":"string"},"state":{"type":"string"},"street_address":{"type":"string"},"sub_premise":{"type":"string"},"tag_ids":{"description":"IDs of the tags applied to the customer; empty when it has none. null only on PATCH, archive or\nrestore when the change succeeded but the tags couldn't be reloaded; GET the customer to read them.","items":{"type":"string"},"type":"array"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"}}},"paths":{"/customers":{"get":{"description":"Get a paginated list of customers with optional filtering","operationId":"listCustomers","parameters":[{"schema":{"type":"integer","default":100},"description":"Number of items to return","in":"query","name":"limit"},{"schema":{"type":"string"},"description":"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.","in":"query","name":"after"},{"schema":{"type":"string"},"description":"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.","in":"query","name":"before"},{"schema":{"type":"string"},"description":"Filter by creation date start (RFC3339 format)","in":"query","name":"created_at_start"},{"schema":{"type":"string"},"description":"Filter by creation date end (RFC3339 format)","in":"query","name":"created_at_end"},{"schema":{"type":"string"},"description":"Filter by customer name","in":"query","name":"company_name"},{"schema":{"type":"string"},"description":"Comma-separated tag IDs (repeated tag_ids keys are also accepted), at most 100 distinct; returns customers that have any of these tags","in":"query","name":"tag_ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse-CustomerReply"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"List customers","tags":["Customers"]}}}}
```

## Create a customer

> Create a new customer with the provided information. Sending tag\_ids also requires the tags:write scope. Optional tag\_ids are applied in the same transaction as the customer: if any tag cannot be applied, no customer is created. The reply's tag\_ids are the tags applied at creation; system tags such as No Payment Method are added asynchronously right after, so a later GET may show more tags.

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"OAuth2ClientCredentials":["customers:write"]}],"components":{"securitySchemes":{"OAuth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{"checkout:read":"Read checkout data","checkout:write":"Create checkout tokens","customers:read":"Read customers and payment methods","customers:write":"Create and update customers and payment methods","invoices:read":"Read invoices","invoices:write":"Create and update invoices","payments:read":"Read payments and payment requests","payments:write":"Create payments and payment requests","payouts:read":"Read payouts","refunds:read":"Read refunds","refunds:write":"Create refunds","tags:read":"Read customer tags","tags:write":"Create, update and delete customer tags, and add or remove them on customers","webhooks:read":"Read webhook subscriptions and events","webhooks:write":"Manage webhook subscriptions"}}}}},"schemas":{"CustomerReply":{"properties":{"city":{"type":"string"},"country":{"type":"string"},"created_at":{"type":"string"},"customer_integration_id":{"type":"string"},"default_payment_method_id":{"type":"string"},"ein":{"type":"string"},"email":{"type":"string"},"external_id":{"type":"string"},"id":{"type":"string"},"legal_name":{"type":"string"},"name":{"type":"string"},"postal_code":{"type":"string"},"state":{"type":"string"},"street_address":{"type":"string"},"sub_premise":{"type":"string"},"tag_ids":{"description":"IDs of the tags applied to the customer; empty when it has none. null only on PATCH, archive or\nrestore when the change succeeded but the tags couldn't be reloaded; GET the customer to read them.","items":{"type":"string"},"type":"array"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"},"CreateCustomerInput":{"description":"Customer information","properties":{"city":{"type":"string"},"country":{"type":"string"},"ein":{"type":"string"},"email":{"type":"string"},"external_id":{"type":"string"},"legal_name":{"type":"string"},"name":{"type":"string"},"postal_code":{"type":"string"},"state":{"type":"string"},"street_address":{"type":"string"},"sub_premise":{"type":"string"},"tag_ids":{"description":"IDs of existing custom tags (see GET /tags) to apply to the new customer. Duplicates are ignored; at most 100 distinct IDs.","items":{"type":"string"},"type":"array"}},"required":["email","name"],"type":"object"}}},"paths":{"/customers":{"post":{"description":"Create a new customer with the provided information. Sending tag_ids also requires the tags:write scope. Optional tag_ids are applied in the same transaction as the customer: if any tag cannot be applied, no customer is created. The reply's tag_ids are the tags applied at creation; system tags such as No Payment Method are added asynchronously right after, so a later GET may show more tags.","operationId":"createCustomer","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerReply"}}}},"400":{"description":"Invalid request body, a `tag_ids` entry is not a valid UUID, or more than 100 distinct `tag_ids`. No customer is created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"403":{"description":"`tag_ids` was sent but the key does not have the `tags:write` scope. No customer is created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"422":{"description":"`TAG_NOT_FOUND` (tag does not exist or belongs to another partner) or `SYSTEM_TAG_NOT_MUTABLE` (system tags cannot be applied manually). No customer is created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Create a customer","tags":["Customers"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerInput"}}},"description":"Customer information","required":true}}}}}
```

## Get a customer

> Get customer details by ID

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"OAuth2ClientCredentials":["customers:read"]}],"components":{"securitySchemes":{"OAuth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{"checkout:read":"Read checkout data","checkout:write":"Create checkout tokens","customers:read":"Read customers and payment methods","customers:write":"Create and update customers and payment methods","invoices:read":"Read invoices","invoices:write":"Create and update invoices","payments:read":"Read payments and payment requests","payments:write":"Create payments and payment requests","payouts:read":"Read payouts","refunds:read":"Read refunds","refunds:write":"Create refunds","tags:read":"Read customer tags","tags:write":"Create, update and delete customer tags, and add or remove them on customers","webhooks:read":"Read webhook subscriptions and events","webhooks:write":"Manage webhook subscriptions"}}}}},"schemas":{"CustomerReply":{"properties":{"city":{"type":"string"},"country":{"type":"string"},"created_at":{"type":"string"},"customer_integration_id":{"type":"string"},"default_payment_method_id":{"type":"string"},"ein":{"type":"string"},"email":{"type":"string"},"external_id":{"type":"string"},"id":{"type":"string"},"legal_name":{"type":"string"},"name":{"type":"string"},"postal_code":{"type":"string"},"state":{"type":"string"},"street_address":{"type":"string"},"sub_premise":{"type":"string"},"tag_ids":{"description":"IDs of the tags applied to the customer; empty when it has none. null only on PATCH, archive or\nrestore when the change succeeded but the tags couldn't be reloaded; GET the customer to read them.","items":{"type":"string"},"type":"array"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"}}},"paths":{"/customers/{id}":{"get":{"description":"Get customer details by ID","operationId":"getCustomer","parameters":[{"schema":{"type":"string"},"description":"Customer ID","in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerReply"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Get a customer","tags":["Customers"]}}}}
```

## Archive a customer

> Archive a customer

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"OAuth2ClientCredentials":["customers:write"]}],"components":{"securitySchemes":{"OAuth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{"checkout:read":"Read checkout data","checkout:write":"Create checkout tokens","customers:read":"Read customers and payment methods","customers:write":"Create and update customers and payment methods","invoices:read":"Read invoices","invoices:write":"Create and update invoices","payments:read":"Read payments and payment requests","payments:write":"Create payments and payment requests","payouts:read":"Read payouts","refunds:read":"Read refunds","refunds:write":"Create refunds","tags:read":"Read customer tags","tags:write":"Create, update and delete customer tags, and add or remove them on customers","webhooks:read":"Read webhook subscriptions and events","webhooks:write":"Manage webhook subscriptions"}}}}},"schemas":{"CustomerReply":{"properties":{"city":{"type":"string"},"country":{"type":"string"},"created_at":{"type":"string"},"customer_integration_id":{"type":"string"},"default_payment_method_id":{"type":"string"},"ein":{"type":"string"},"email":{"type":"string"},"external_id":{"type":"string"},"id":{"type":"string"},"legal_name":{"type":"string"},"name":{"type":"string"},"postal_code":{"type":"string"},"state":{"type":"string"},"street_address":{"type":"string"},"sub_premise":{"type":"string"},"tag_ids":{"description":"IDs of the tags applied to the customer; empty when it has none. null only on PATCH, archive or\nrestore when the change succeeded but the tags couldn't be reloaded; GET the customer to read them.","items":{"type":"string"},"type":"array"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"}}},"paths":{"/customers/{id}":{"delete":{"description":"Archive a customer","operationId":"archiveCustomer","parameters":[{"schema":{"type":"string"},"description":"Customer ID","in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerReply"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Archive a customer","tags":["Customers"]}}}}
```

## Patch customer

> Patch customer information (company, legal name, EIN, street address, sub-premise, city, state, postal code, country)

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"OAuth2ClientCredentials":["customers:write"]}],"components":{"securitySchemes":{"OAuth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{"checkout:read":"Read checkout data","checkout:write":"Create checkout tokens","customers:read":"Read customers and payment methods","customers:write":"Create and update customers and payment methods","invoices:read":"Read invoices","invoices:write":"Create and update invoices","payments:read":"Read payments and payment requests","payments:write":"Create payments and payment requests","payouts:read":"Read payouts","refunds:read":"Read refunds","refunds:write":"Create refunds","tags:read":"Read customer tags","tags:write":"Create, update and delete customer tags, and add or remove them on customers","webhooks:read":"Read webhook subscriptions and events","webhooks:write":"Manage webhook subscriptions"}}}}},"schemas":{"CustomerReply":{"properties":{"city":{"type":"string"},"country":{"type":"string"},"created_at":{"type":"string"},"customer_integration_id":{"type":"string"},"default_payment_method_id":{"type":"string"},"ein":{"type":"string"},"email":{"type":"string"},"external_id":{"type":"string"},"id":{"type":"string"},"legal_name":{"type":"string"},"name":{"type":"string"},"postal_code":{"type":"string"},"state":{"type":"string"},"street_address":{"type":"string"},"sub_premise":{"type":"string"},"tag_ids":{"description":"IDs of the tags applied to the customer; empty when it has none. null only on PATCH, archive or\nrestore when the change succeeded but the tags couldn't be reloaded; GET the customer to read them.","items":{"type":"string"},"type":"array"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"},"PatchCustomerRequest":{"description":"Request body for patching customer information","properties":{"city":{"type":"string"},"country":{"type":"string"},"ein":{"type":"string"},"legal_name":{"type":"string"},"name":{"type":"string"},"postal_code":{"type":"string"},"state":{"type":"string"},"street_address":{"type":"string"},"sub_premise":{"type":"string"}},"type":"object"}}},"paths":{"/customers/{id}":{"patch":{"description":"Patch customer information (company, legal name, EIN, street address, sub-premise, city, state, postal code, country)","operationId":"updateCustomer","parameters":[{"schema":{"type":"string"},"description":"Customer ID","in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerReply"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Patch customer","tags":["Customers"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchCustomerRequest"}}},"description":"Customer patch information","required":true}}}}}
```

## List payment methods

> Get payment methods associated with a customer

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"OAuth2ClientCredentials":["customers:read"]}],"components":{"securitySchemes":{"OAuth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{"checkout:read":"Read checkout data","checkout:write":"Create checkout tokens","customers:read":"Read customers and payment methods","customers:write":"Create and update customers and payment methods","invoices:read":"Read invoices","invoices:write":"Create and update invoices","payments:read":"Read payments and payment requests","payments:write":"Create payments and payment requests","payouts:read":"Read payouts","refunds:read":"Read refunds","refunds:write":"Create refunds","tags:read":"Read customer tags","tags:write":"Create, update and delete customer tags, and add or remove them on customers","webhooks:read":"Read webhook subscriptions and events","webhooks:write":"Manage webhook subscriptions"}}}}},"schemas":{"GetPaymentMethodsReply":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PaymentMethod"},"type":"array"}},"type":"object"},"PaymentMethod":{"properties":{"brand":{"type":"string"},"created_at":{"type":"string"},"default":{"type":"boolean"},"exp_month":{"type":"string"},"exp_year":{"type":"string"},"id":{"type":"string"},"last4":{"type":"string"},"type":{"$ref":"#/components/schemas/MethodType"}},"type":"object"},"MethodType":{"enum":["card","ach"],"type":"string"}}},"paths":{"/customers/{id}/payment-methods":{"get":{"description":"Get payment methods associated with a customer","operationId":"listPaymentMethods","parameters":[{"schema":{"type":"string"},"description":"Customer ID","in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentMethodsReply"}}}}},"summary":"List payment methods","tags":["Customers"]}}}}
```

## Get payment method by ID

> Get a specific payment method associated with a customer by payment method ID

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"OAuth2ClientCredentials":["customers:read"]}],"components":{"securitySchemes":{"OAuth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{"checkout:read":"Read checkout data","checkout:write":"Create checkout tokens","customers:read":"Read customers and payment methods","customers:write":"Create and update customers and payment methods","invoices:read":"Read invoices","invoices:write":"Create and update invoices","payments:read":"Read payments and payment requests","payments:write":"Create payments and payment requests","payouts:read":"Read payouts","refunds:read":"Read refunds","refunds:write":"Create refunds","tags:read":"Read customer tags","tags:write":"Create, update and delete customer tags, and add or remove them on customers","webhooks:read":"Read webhook subscriptions and events","webhooks:write":"Manage webhook subscriptions"}}}}},"schemas":{"PaymentMethod":{"properties":{"brand":{"type":"string"},"created_at":{"type":"string"},"default":{"type":"boolean"},"exp_month":{"type":"string"},"exp_year":{"type":"string"},"id":{"type":"string"},"last4":{"type":"string"},"type":{"$ref":"#/components/schemas/MethodType"}},"type":"object"},"MethodType":{"enum":["card","ach"],"type":"string"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"}}},"paths":{"/customers/{id}/payment-methods/{method_id}":{"get":{"description":"Get a specific payment method associated with a customer by payment method ID","operationId":"getPaymentMethod","parameters":[{"schema":{"type":"string"},"description":"Customer ID","in":"path","name":"id","required":true},{"schema":{"type":"string"},"description":"Payment Method ID","in":"path","name":"method_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethod"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Get payment method by ID","tags":["Customers"]}}}}
```

## Restore a customer

> Restore a customer

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"OAuth2ClientCredentials":["customers:write"]}],"components":{"securitySchemes":{"OAuth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{"checkout:read":"Read checkout data","checkout:write":"Create checkout tokens","customers:read":"Read customers and payment methods","customers:write":"Create and update customers and payment methods","invoices:read":"Read invoices","invoices:write":"Create and update invoices","payments:read":"Read payments and payment requests","payments:write":"Create payments and payment requests","payouts:read":"Read payouts","refunds:read":"Read refunds","refunds:write":"Create refunds","tags:read":"Read customer tags","tags:write":"Create, update and delete customer tags, and add or remove them on customers","webhooks:read":"Read webhook subscriptions and events","webhooks:write":"Manage webhook subscriptions"}}}}},"schemas":{"CustomerReply":{"properties":{"city":{"type":"string"},"country":{"type":"string"},"created_at":{"type":"string"},"customer_integration_id":{"type":"string"},"default_payment_method_id":{"type":"string"},"ein":{"type":"string"},"email":{"type":"string"},"external_id":{"type":"string"},"id":{"type":"string"},"legal_name":{"type":"string"},"name":{"type":"string"},"postal_code":{"type":"string"},"state":{"type":"string"},"street_address":{"type":"string"},"sub_premise":{"type":"string"},"tag_ids":{"description":"IDs of the tags applied to the customer; empty when it has none. null only on PATCH, archive or\nrestore when the change succeeded but the tags couldn't be reloaded; GET the customer to read them.","items":{"type":"string"},"type":"array"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"}}},"paths":{"/customers/{id}/restore":{"post":{"description":"Restore a customer","operationId":"restoreCustomer","parameters":[{"schema":{"type":"string"},"description":"Customer ID","in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerReply"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Restore a customer","tags":["Customers"]}}}}
```

## List customer users

> Get a paginated list of users from a customer

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"OAuth2ClientCredentials":["customers:read"]}],"components":{"securitySchemes":{"OAuth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{"checkout:read":"Read checkout data","checkout:write":"Create checkout tokens","customers:read":"Read customers and payment methods","customers:write":"Create and update customers and payment methods","invoices:read":"Read invoices","invoices:write":"Create and update invoices","payments:read":"Read payments and payment requests","payments:write":"Create payments and payment requests","payouts:read":"Read payouts","refunds:read":"Read refunds","refunds:write":"Create refunds","tags:read":"Read customer tags","tags:write":"Create, update and delete customer tags, and add or remove them on customers","webhooks:read":"Read webhook subscriptions and events","webhooks:write":"Manage webhook subscriptions"}}}}},"schemas":{"PaginatedResponse-CustomerUser":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CustomerUser"},"type":"array"},"end_cursor":{"type":"string"},"has_next_page":{"type":"boolean"},"has_previous_page":{"type":"boolean"},"start_cursor":{"type":"string"}},"type":"object"},"CustomerUser":{"properties":{"created_at":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"string"},"job_title":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"}},"type":"object"}}},"paths":{"/customers/{id}/users":{"get":{"description":"Get a paginated list of users from a customer","operationId":"listCustomerUsers","parameters":[{"schema":{"type":"integer","default":100},"description":"Number of items to return","in":"query","name":"limit"},{"schema":{"type":"string"},"description":"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.","in":"query","name":"after"},{"schema":{"type":"string"},"description":"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.","in":"query","name":"before"},{"schema":{"type":"string"},"description":"Customer ID","in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse-CustomerUser"}}}}},"summary":"List customer users","tags":["Customers"]}}}}
```

## Create a customer user

> Create a new customer user with the provided information

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"OAuth2ClientCredentials":["customers:write"]}],"components":{"securitySchemes":{"OAuth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{"checkout:read":"Read checkout data","checkout:write":"Create checkout tokens","customers:read":"Read customers and payment methods","customers:write":"Create and update customers and payment methods","invoices:read":"Read invoices","invoices:write":"Create and update invoices","payments:read":"Read payments and payment requests","payments:write":"Create payments and payment requests","payouts:read":"Read payouts","refunds:read":"Read refunds","refunds:write":"Create refunds","tags:read":"Read customer tags","tags:write":"Create, update and delete customer tags, and add or remove them on customers","webhooks:read":"Read webhook subscriptions and events","webhooks:write":"Manage webhook subscriptions"}}}}},"schemas":{"CustomerUser":{"properties":{"created_at":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"string"},"job_title":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"},"CreateCustomerUserInput":{"properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"}},"type":"object"}}},"paths":{"/customers/{id}/users":{"post":{"description":"Create a new customer user with the provided information","operationId":"createCustomerUser","parameters":[{"schema":{"type":"string"},"description":"Customer ID","in":"path","name":"id","required":true}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUser"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Create a customer user","tags":["Customers"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerUserInput"}}},"description":"Customer user information","required":true}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.alternativepayments.io/api-reference/customers.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
