Look up your customers
Search, page through and read the end customers on your account with the Partner API, and bind a returning customer's next sale to their existing account.
Find the people you've sold to — by name, email or phone — and use what you find to make their next sale go on the account they already have.
You'll need a key with the customers:read scope, and your account needs the Customers module.
Where customers come from
There's no call to create a customer. They're made for you when you sell: a checkout session sets up the customer's billing account if they don't have one yet.
This list mirrors the customers on your account in our billing platform, along with any you've added in the partner portal. It's refreshed every six hours, so a customer from a sale you made this morning may not be listed until the next refresh.
Search and filter
GET/v1/customers returns your customers, newest first.
curl "https://cloud.mergewifi.com/v1/customers?q=reyes&limit=25" \
-H "Authorization: Bearer $MERGEWIFI_API_KEY"{
"object": "list",
"data": [
{
"object": "customer",
"id": "8f14e45f-ceea-467a-9c5b-1d0f2a3b4c5d",
"first_name": "Dana",
"last_name": "Reyes",
"email": "dana@example.com",
"phone": "5125550142",
"status": "active",
"plan_name": "Unlimited 5G",
"monthly_rate": "49.99"
}
],
"has_more": false,
"next_cursor": null
}qmatches first name, last name, full name, email and phone. Phone numbers match on their digits, so(512) 555finds5125550142.statusis an exact match, likeactive,pausedorcancelled. Customers that came from the billing platform can carry that platform's own states.
Page through them
Customers page by number, not by cursor — unlike orders and devices.
- Ask for a page with
page(starting at 1) andlimit(1 to 100, default 25). - While
has_moreistrue, ask forpageplus one. - Ignore
next_cursorhere. It's alwaysnullfor customers.
curl "https://cloud.mergewifi.com/v1/customers?page=2&limit=100" \
-H "Authorization: Bearer $MERGEWIFI_API_KEY"Read one customer
GET/v1/customers/{id} returns one customer by id, with the same fields as the list.
curl https://cloud.mergewifi.com/v1/customers/8f14e45f-ceea-467a-9c5b-1d0f2a3b4c5d \
-H "Authorization: Bearer $MERGEWIFI_API_KEY"plan_name and monthly_rate show what they're on. A customer who isn't on your account returns 404, exactly as if they didn't exist.
Sell to a returning customer
When someone you've sold to before comes back, pass their id as customer_id when you open the checkout session. The sale then goes on their existing billing account, instead of being matched by email address.
{
"customer_id": "8f14e45f-ceea-467a-9c5b-1d0f2a3b4c5d",
"customer": { "first_name": "Dana", "last_name": "Reyes", "email": "dana@example.com" },
"shipping_address": { "line1": "100 Congress Ave", "city": "Austin", "state": "TX", "postal_code": "78701" },
"packages": [ … ]
}The full checkout, from quote to payment, is in Run your own checkout.
Related: Run your own checkout · From a new key to your first order · Going live

