Searches payments, customers and links the way the dashboard's search does. Each result is the object itself, as its own endpoint returns it, so tell them apart by kind. A restricted key searches only what it can read.
An exact ID, code, email, hash or address ranks first, then a word that starts with the query, then a match anywhere. Ties put links first, then customers, then payments, newest first within each.
Query
qstring RequiredUp to 100 characters. Payments match on their ID, checkout ID, reference, metadata values, transaction hash, sender address, description, customer name and email, and amount. Customers match on their ID, email and name, and links on their ID, code, name, description and price.kindstringpayment,customer,linkor several, comma separated. Defaults to every kind the key can read.includestringcustomeradds each payment's customer, as on list payments.limitintegerPage size, from 1 to 100. Defaults to 25.cursorstringThenext_cursorfrom the previous page. See pagination.
Errors
- 400
invalid_requestqis missing or too long,kindorincludehas a value it can't take, or thecursorbelongs to another list. - 403
permission_deniedkindnames something a restricted key can't read,include=customerwas sent without read access to customers, or the key can read none of the three.
Any request can also fail on its key or its body. See errors.
Request
curl "https://api.402pay.co/api/v1/search?q=harper&limit=1" \ -H "Authorization: Bearer $PAY402_SECRET_KEY"Response200 OK
{ "data": [ { "id": "cst_gWFWcc7Ga0Pv7LSC", "kind": "customer", "name": "Harper Wilson", "email": "harper.wilson@example.com", "blocked": false, "note": "", "stats": { "payments_count": 2, "incomplete_count": 2, "volume": { "amount": "228.10", "currency": "USD" }, "average": { "amount": "114.05", "currency": "USD" }, "last_payment_at": "2026-09-26T21:22:47.082Z", "preferred_rail": "crypto" }, "created_at": "2026-09-26T21:01:16.809Z", "updated_at": "2026-09-26T21:01:16.809Z" } ], "has_more": true, "next_cursor": "cst_gWFWcc7Ga0Pv7LSC"}