Search and filter payments
Beta
Last updated: September 4, 2024
The Payment Search API enables you to search and filter through your payments to retrieve data that matches your query.
To search through your payments, you build out a query using a combination of:
- search fields to specify the fields to use to filter the results
- search syntax to specify the logic behind when a value will result in a match
Search field | Data type | Description |
---|---|---|
| number | The payment amount. |
| string | The card issuer's six-digit or eight-digit Bank Identification Number (BIN). |
| token | The three-letter ISO 4217 currency code. |
| string | The customer's email address. |
| string | The payment's unique identifier, with the prefix |
| string | The card issuer. |
| token | The card issuer's country, as a two-letter ISO 3166 alpha-2 country code. |
| string | The last four digits of the card used for the payment. |
| – | A set of key-value pairs attached to the payment. |
| string | The customer's name. |
| string | The Acquirer Reference Number (ARN), which you can use to query the issuing bank. |
| string | The payment method used for the payment. You can provide the following values:
|
| string | The payment type, as one of the following:
|
| string | The reference to identify the payment with. |
| string | The card scheme, as one of the following values:
|
| token | The most recent status of the payment, as one of the following values:
|
Search syntax | Description | Usage |
---|---|---|
| Equal to. |
|
| Equal to one or more of the encapsulated values. |
|
| Greater than. Used for numeric or datetime search fields. |
|
| Greater than or equal to. Used for numeric or datetime search fields. |
|
| Less than. Used for numeric or datetime search fields. |
|
| Less than or equal to. Used for numeric or datetime search fields. |
|
| Escape character. |
|
| Where results match both clauses. |
|
| Where results match one of the clauses. |
|
| Where results do not match the clause. |
|
| Groups clauses. |
|
post
https://api.checkout.com/payments/search
By default, the Search API searches through payments from the previous 30 days. Alternatively, you can use the from
and to
fields to specify a date range to search through.
To specify the maximum number of results to retrieve from the search, use the limit
field.
Wrap text values in your search query
in single quotes. For example, "status:'refunded'"
.
1{2"query": "id:'pay_mbabizu24mvu3mela5njyhpit4'",3"limit": 20,4"from": "2023-08-24T14:15:22Z",5"to": "2023-08-24T14:15:22Z"6}
1{2"data": [3{4"id": "pay_mbabizu24mvu3mela5njyhpit4",5"requested_on": "2023-08-24T14:15:22Z",6"source": {7"type": "card",8"expiry_month": "04",9"expiry_year": "2024",10"name": "Jia Tsang",11"scheme": "Visa",12"local_schemes": "cartes bancaire",13"last4": "3131",14"fingerprint": "B16D9C2EF0C861A8825C9BD59CCE9171D84EBC45E89CC792B5D1D2D0DDE3DAB7",15"bin": "313131",16"card_type": "credit",17"card_wallet_type": "googlepay",18"issuer": "GE CAPITAL FINANCIAL, INC",19"issuer_country": "US",20"avs_check": "G"21},22"amount": 10000,23"amount_requested": 10000,24"currency": "GBP",25"payment_type": "regular",26"processing_channel_id": "pc_vxt6yftthv4e5flqak6w2i7rim",27"reference": "ORD-5023-4E89",28"status": "captured",29"balances": {30"total_authorized": 200,31"total_captured": 150,32"total_refunded": 5033},34"3ds": {35"eci": "02",36"version": "2.1.0"37},38"risk": {39"flagged": false,40"score": "22"41},42"customer": {43"email": "[email protected]",44"name": "Jia Tsang"45},46"billing_descriptor": {47"name": "Purchase",48"city": "London"49},50"metadata": {}51}52]53}