Overview
RSQL operators can be used to retrieve Checkout data based on specific criteria. The following table lists the available criteria and operators that can be used to filter Checkout data:
Criteria | Description | Operator Used |
---|---|---|
amount | number | ==, !=, =in=, =out=, =gt=, =ge=, =lt=, =le= |
created_at | date | ==, !=, =in=, =out=, =gt=, =ge=, =lt=, =le= |
currency_code | string | ==, !=, =in=, =out=, =regex= |
customer | string | ==, !=, =in=, =out=, =regex= |
id | string | ==, !=, =in=, =out=, =regex= |
merchant_reference | string | ==, !=, =in=, =out=, =regex= |
entity_id | string | ==, !=, =in=, =out=, =regex= |
updated_at | date | ==, !=, =in=, =out=, =gt=, =ge=, =lt=, =le= |
expiry_time | date | ==, !=, =in=, =out=, =gt=, =ge=, =lt=, =le= |
status | string | ==, !=, =in=, =out=, =regex= |
notification_methods.email.email_address | string | ==, !=, =in=, =out=, =regex= |
configurations.card.token_details.reuse_token | string | ==, !=, =in=, =out=, =regex= |
payment_method_used | string | ==, !=, =in=, =out=, =regex= |
interaction_type | string | ==, !=, =in=, =out=, =regex= |
theme_id | string | ==, !=, =in=, =out=, =regex= |
transaction_id | string | ==, !=, =in=, =out=, =regex= |
created_by | string | ==, !=, =in=, =out=, =regex= |
RSQL operators
The following table lists the RSQL operators that can be used to filter Checkout data:
Operator | Description |
---|---|
== | equal |
!= | not equal |
=lt= | less than |
=le= | less than and equal to |
=gt= | greater than |
=ge= | greater than and equal to |
=regex= | pattern matching |
=in= | multiple arguments search |
=out= | exclude |
; | Logical AND |
, | Logical OR |
Logical AND (
;
) has higher precedence than Logical OR (,
). This means that in an expression without parentheses, theAND
operations will be evaluated before theOR
operations. To change the order of evaluation, you can use parentheses()
to group expressions and override the default precedence.
For example:
criteria1;criteria2,criteria3
is evaluated as(criteria1 AND criteria2) OR criteria3
(criteria1,criteria2);criteria3
is evaluated as(criteria1 OR criteria2) AND criteria3
Example Queries
The following table provides example RSQL queries and their descriptions:
Query | Description |
---|---|
/v2/checkout?search=id==123;(amount==999,currency_code==USD);status==Authorized&order_by=ASC&order_criteria=amount&page_size=1&page_number=2 | Retrieve Checkout data where the id is 123 , amount is 999 or currency code is USD , and status is Authorized . Results are ordered by amount in ascending order, with a page size of 1 and page number 2 . |
/v2/checkout?search=id==12345,merchant_reference==1234554321;amount==3224&order_by=DESC&order_criteria=created_at&page_size=10&page_number=1 | Retrieve Checkout data where the id is 12345 or merchant reference is 1234554321 , and amount is 3224 . Results are ordered by created_at in descending order, with a page size of 10 and page number 1 . |
/v2/checkout?search=amount=in=(100,200);interaction_type!=PAYMENT_LINK&order_by=ASC&order_criteria=currency_code&page_size=1&page_number=2 | Retrieve Checkout data where the amount is either 100 or 200 , and interaction type is not PAYMENT_LINK . Results are ordered by currency code in ascending order, with a page size of 1 and page number 2 . |