> ## Documentation Index
> Fetch the complete documentation index at: https://developers.paychoice.com.au/llms.txt
> Use this file to discover all available pages before exploring further.

# Customers

> Create, retrieve, list, edit and archive customer records.

A customer is the person or business you bill. Every subscription, invoice and stored payment method hangs off one.

| Action | Request |
| - | - |
| Create | `POST /customer` |
| Retrieve | `GET /customer/{customer}` |
| List | `GET /customer?page[number]=1&page[items]=5` |
| Edit | `PATCH /customer/{customer}` — unspecified fields are unchanged |
| Archive | `DELETE /customer/{customer}` |
| Wallet | `GET /customer/{customer}/wallet` — the customer plus every stored card and bank account |

## Create

```bash theme={null}
curl https://api-sandbox.paychoice.com.au/api/v4/customer \
  -u "$PAYCHOICE_USERNAME:$PAYCHOICE_PASSWORD" \
  -H "Accept: application/json" \
  -d business_name="PayFitness & Co" \
  -d account_number=123456789 \
  -d first_name=John -d last_name=Doe \
  -d email=j.doe@example.com -d mobile=0412345678 \
  -d "address[line1]=21 Swanston Street" -d "address[suburb]=Box Hill" \
  -d "address[state]=VIC" -d "address[postcode]=3000" -d "address[country]=AU"
```

**business\_name** `string`

The business name, or the customer's name if not a business.

**account\_number** `string`

Your identifier for the customer.

**first\_name** `string` *required*

Customer's first name.

**last\_name** `string` *required*

Customer's last name.

**email** `string` *required*

Customer's email address.

**mobile** `string`

Mobile number.

**phone** `string`

Phone number.

**address\[line1]** `string`

Also `address[line2]`, `address[suburb]`, `address[state]`, `address[postcode]`, `address[country]`.

**merchant\_guid** `uuid`

Required for agency credentials.

```json theme={null}
{
  "status": "Success",
  "code": 201,
  "messages": [ { "message_text": "Data created", "message_type": "success" } ],
  "customer": {
    "id": "8c34513b-61e0-4f8a-b007-af4fe9479bf4",
    "customer_id": 10332,
    "business_name": "PayFitness & Co",
    "account_number": "123456789",
    "first_name": "John",
    "last_name": "Doe",
    "email": "j.doe@example.com",
    "phone": null,
    "mobile": "0412345678",
    "crn": "55069000061021",
    "address": { "line1": "21 Swanston Street", "line2": "", "suburb": "Box Hill", "state": "VIC", "postcode": "3000", "country": "AU" },
    "merchant": { "guid": "315564b9-b863-4016-8c53-02c9d8cc80b7", "name": "Example Gym Pty Ltd" },
    "status": "active",
    "link": { "href": "/api/v4/customer/8c34513b-61e0-4f8a-b007-af4fe9479bf4", "rel": "self" }
  },
  "object_type": "customer",
  "link": { "href": "/api/v4/customer", "rel": "self" }
}
```

**id** `uuid`

The customer ID. Use it in every `{customer}` URL.

**customer\_id** `integer`

Numeric reference, as shown on cards, bank accounts and invoices.

**crn** `string | null`

BPay customer reference number, assigned by PayChoice.

**address** `object`

`line1`, `line2` (always `""`), `suburb`, `state` (code), `postcode`, `country` (code).

**status** `string`

`active` or `inactive`.

## Wallet

`GET /customer/{customer}/wallet` returns the customer with `cards[]` and `banks[]` — handy for showing a customer their stored methods. Its shape differs from the customer object: `id` and `account_number` are the numeric reference, `address` uses `street` and full state/country names, and the bank entries reuse card field names (`card_name` is the account name, `card_type` the account number, and the BSB key is `"bsb "` with a trailing space).

## Archive

`DELETE` returns the envelope with `"customer": {}` and `message_text` "Data Deleted".


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.