using Gr4vy;
using Gr4vy.Models.Components;
using Gr4vy.Models.Requests;
var sdk = new Gr4vySDK(
id: "mattilda",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
ListTransactionsRequest req = new ListTransactionsRequest() {};
ListTransactionsResponse? res = await sdk.Transactions.ListAsync(req);
while(res != null)
{
// handle items
res = await res.Next!();
}{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reconciliation_id": "<string>",
"merchant_account_id": "<string>",
"currency": "<string>",
"amount": 123,
"status": "processing",
"authorized_amount": 123,
"captured_amount": 123,
"refunded_amount": 123,
"intent": "authorize",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "transaction",
"country": "US",
"external_identifier": "transaction-12345",
"payment_method": {
"method": "card",
"type": "payment-method",
"approval_url": "https://gr4vy.app/redirect/12345",
"country": "US",
"currency": "MXN",
"details": {
"bin": "<string>",
"card_type": "credit",
"card_issuer_name": "<string>"
},
"expiration_date": "12/30",
"fingerprint": "20eb353620155d2b5fc864cc46a73ea77cb92c725238650839da1813fa987a17",
"label": "1234",
"last_replaced_at": "2013-07-16T19:23:00.000+00:00",
"mode": "card",
"scheme": "visa",
"id": "852b951c-d7ea-4c98-b09e-4a1c9e97c077",
"approval_target": "any",
"external_identifier": "card-12345",
"payment_account_reference": "V0010014629724763377327521982"
},
"method": "card",
"instrument_type": "pan",
"error_code": "missing_redirect_url",
"payment_service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_service_definition_id": "<string>",
"method": "card",
"display_name": "<string>",
"type": "payment-service"
},
"pending_review": false,
"buyer": {
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"display_name": "John Doe",
"external_identifier": "buyer-12345",
"billing_details": {
"first_name": "John",
"last_name": "Doe",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
},
"tax_id": {
"value": "<string>",
"kind": "co.itin"
}
},
"account_number": "<string>"
},
"raw_response_code": "E104",
"raw_response_description": "Missing redirect URL",
"shipping_details": {
"first_name": "John",
"last_name": "Doe",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
},
"id": "bf8c36ad-02d9-4904-b0f9-a230b149e341",
"buyer_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"type": "shipping-details"
},
"checkout_session_id": "4137b1cf-39ac-42a8-bad6-1c680d5dab6b"
}
],
"limit": 20,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": "Xkjss7asS"
}Returns a paginated list of transactions for the merchant account, sorted by most recently updated. You can filter, sort, and search transactions using query parameters.
using Gr4vy;
using Gr4vy.Models.Components;
using Gr4vy.Models.Requests;
var sdk = new Gr4vySDK(
id: "mattilda",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
ListTransactionsRequest req = new ListTransactionsRequest() {};
ListTransactionsResponse? res = await sdk.Transactions.ListAsync(req);
while(res != null)
{
// handle items
res = await res.Next!();
}{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reconciliation_id": "<string>",
"merchant_account_id": "<string>",
"currency": "<string>",
"amount": 123,
"status": "processing",
"authorized_amount": 123,
"captured_amount": 123,
"refunded_amount": 123,
"intent": "authorize",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "transaction",
"country": "US",
"external_identifier": "transaction-12345",
"payment_method": {
"method": "card",
"type": "payment-method",
"approval_url": "https://gr4vy.app/redirect/12345",
"country": "US",
"currency": "MXN",
"details": {
"bin": "<string>",
"card_type": "credit",
"card_issuer_name": "<string>"
},
"expiration_date": "12/30",
"fingerprint": "20eb353620155d2b5fc864cc46a73ea77cb92c725238650839da1813fa987a17",
"label": "1234",
"last_replaced_at": "2013-07-16T19:23:00.000+00:00",
"mode": "card",
"scheme": "visa",
"id": "852b951c-d7ea-4c98-b09e-4a1c9e97c077",
"approval_target": "any",
"external_identifier": "card-12345",
"payment_account_reference": "V0010014629724763377327521982"
},
"method": "card",
"instrument_type": "pan",
"error_code": "missing_redirect_url",
"payment_service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_service_definition_id": "<string>",
"method": "card",
"display_name": "<string>",
"type": "payment-service"
},
"pending_review": false,
"buyer": {
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"display_name": "John Doe",
"external_identifier": "buyer-12345",
"billing_details": {
"first_name": "John",
"last_name": "Doe",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
},
"tax_id": {
"value": "<string>",
"kind": "co.itin"
}
},
"account_number": "<string>"
},
"raw_response_code": "E104",
"raw_response_description": "Missing redirect URL",
"shipping_details": {
"first_name": "John",
"last_name": "Doe",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
},
"id": "bf8c36ad-02d9-4904-b0f9-a230b149e341",
"buyer_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"type": "shipping-details"
},
"checkout_session_id": "4137b1cf-39ac-42a8-bad6-1c680d5dab6b"
}
],
"limit": 20,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": "Xkjss7asS"
}transactions.read scope.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the merchant account to use for this request.
"default"
A pointer to the page of results to return.
"ZXhhbXBsZTE"
The maximum number of items that are at returned.
1 <= x <= 10020
Filters the results to only transactions created before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. 2022-01-01T12:00:00+08:00 must be encoded as 2022-01-01T12%3A00%3A00%2B08%3A00.
"2022-01-01T12:00:00+08:00"
Filters the results to only transactions created after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. 2022-01-01T12:00:00+08:00 must be encoded as 2022-01-01T12%3A00%3A00%2B08%3A00.
"2022-01-01T12:00:00+08:00"
Filters the results to only transactions updated before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. 2022-01-01T12:00:00+08:00 must be encoded as 2022-01-01T12%3A00%3A00%2B08%3A00.
"2022-01-01T12:00:00+08:00"
Filters the results to only transactions updated after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. 2022-01-01T12:00:00+08:00 must be encoded as 2022-01-01T12%3A00%3A00%2B08%3A00.
"2022-01-01T12:00:00+08:00"
Filters for transactions that have one of the following fields match exactly with the provided search value.
"transaction-12345"
Filters the results to only the items for which the buyer has an external_identifier that exactly matches this value.
"buyer-12345"
Filters the results to only the items for which the buyer has an id that matches this value.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
Filters the results to only the items for which the buyer has an email_address that matches this value.
"john@example.com"
Filters the results to only get the items for which some of the buyer data contains exactly the provided buyer_search values.
["John", "London"]Filters the results to only the transactions that were originated from the given ip_address.
"8.214.133.47"
Filters the results to only the transactions that have a status that matches with any of the provided status values.
processing, authorization_succeeded, authorization_declined, authorization_failed, authorization_voided, authorization_void_pending, capture_succeeded, capture_pending, buyer_approval_pending "authorization_succeeded"
Filters for the transaction that has a matching id value.
"7099948d-7286-47e4-aad8-b68f7eb44591"
Filters for transactions that have a matching payment_service_transaction_id value. The payment_service_transaction_id is the identifier of the transaction given by the payment service.
"tx-12345"
Filters the results to only the items for which the external_identifier matches this value.
"transaction-12345"
Filters for transactions where their metadata values contain all of the provided metadata keys. The value sent for metadata must be formatted as a JSON string, and all keys and values must be strings. This value should also be URL encoded.
[
{
"first_key": "first_value",
"second_key": "second_value"
}
]Filters for transactions that have an amount that is equal to the provided amount_eq value.
x >= 01299
Filters for transactions that have an amount that is less than or equal to the amount_lte value.
x >= 01299
Filters for transactions that have an amount that is greater than or equal to the amount_gte value.
x >= 01299
Filters for transactions that have matching currency values. The currency values provided must be formatted as 3-letter ISO currency code.
^[A-Z]{3}$["MXN"]Filters for transactions that have matching country values.
["US"]Filters for transactions that were processed by the provided payment_service_id values.
["fffd152a-9532-4087-9a4f-de58754210f0"]Filters for transactions that have a payment method with an ID that matches exactly with the provided value.
"ef9496d8-53a5-4aad-8ca2-00eb68334389"
Filters for transactions that have a payment method with a label that matches exactly with the provided value.
"1234"
Filters for transactions that have a payment method with a scheme that matches with the provided value.
["visa"]Filters for transactions that have a payment method with a country that matches with the provided value.
["US"]Filters for transactions that have a payment method with a fingerprint that matches exactly with the provided value
"a50b85c200ee0795d6fd33a5c66f37a4564f554355c5b46a756aac485dd168a4"
Filters for transactions that have matching method values.
card, oxxo, spei, pse, tapi, tapifintechs "card"
Filters for transactions where the error_code matches one for the provided values.
["insufficient_funds"]Filters for transactions with refunds.
true
Filters for transactions with a pending manual anti-fraud review.
true
Filters for transactions where the checkout_session_id matches the provided value.
"4137b1cf-39ac-42a8-bad6-1c680d5dab6b"
Filters for transactions where the reconciliation_id matches the provided value.
"7jZXl4gBUNl0CnaLEnfXbt"
Filter for transactions that have a card with a BIN that matches exactly with the provided value.
"411111"
Filters the results to only the transactions that have a payment source that matches with any of the provided values.
The way payment method information made it to this transaction.
ecommerce, moto, recurring, installment, card_on_file "recurring"
Filters for transactions where the is_subsequent_payment matches the provided value.
true
Filters for transactions where the merchant_initiated matches the provided value.
true
Filters for transactions that attempted 3DS authentication or not.
true
Successful Response
A list of items returned for this request.
Show child attributes
The number of items for this page.
1 <= x <= 10020
The cursor pointing at the next page of items.
1 - 1000"ZXhhbXBsZTE"
The cursor pointing at the previous page of items.
1 - 1000"Xkjss7asS"
Was this page helpful?