using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "mattilda",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
var res = await sdk.Transactions.GetAsync(transactionId: "7099948d-7286-47e4-aad8-b68f7eb44591");
// handle response{
"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",
"payment_source": "ecommerce",
"merchant_initiated": true,
"is_subsequent_payment": true,
"intent_outcome": "pending",
"multi_tender": true,
"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",
"auth_response_code": "00",
"avs_response_code": "match",
"cvv_response_code": "match",
"anti_fraud_decision": "accept",
"cart_items": [
{
"name": "<string>",
"quantity": 123,
"unit_amount": 49999999,
"discount_amount": 0,
"tax_amount": 0,
"external_identifier": "goprohd",
"sku": "GPHD1078",
"product_url": "https://example.com/catalog/go-pro-hd",
"image_url": "https://example.com/images/go-pro-hd.jpg",
"categories": [
"camera",
"travel",
"gear"
],
"product_type": "physical",
"seller_country": "US"
}
],
"scheme_transaction_id": "123456789012345",
"three_d_secure": {
"version": "2.2.0",
"status": "complete",
"method": "challenge",
"response_data": {
"cavv": "<string>",
"eci": "<string>",
"version": "<string>",
"directory_response": "<string>",
"authentication_response": "<string>",
"cavv_algorithm": "<string>",
"xid": "<string>",
"scheme": "visa"
},
"error_data": {
"code": "305",
"description": "Invalid ThreeDSCompInd",
"detail": "The threeDSCompInd must be 'Y' when successful",
"component": "C"
}
},
"payment_service_transaction_id": "tx-12345",
"additional_identifiers": {},
"metadata": {
"cohort": "cohort-12345",
"order": "order-12345"
},
"authorized_at": "2013-07-16T19:23:00.000+00:00",
"captured_at": "2013-07-16T19:23:00.000+00:00",
"voided_at": "2013-07-16T19:23:00.000+00:00",
"approval_expires_at": "2013-07-16T19:23:00.000+00:00",
"buyer_approval_timedout_at": "2013-07-16T19:23:00.000+00:00",
"merchant_advice_code": "02",
"installment_count": 3
}Retrieve the details of a transaction by its unique identifier.
using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "mattilda",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
var res = await sdk.Transactions.GetAsync(transactionId: "7099948d-7286-47e4-aad8-b68f7eb44591");
// handle response{
"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",
"payment_source": "ecommerce",
"merchant_initiated": true,
"is_subsequent_payment": true,
"intent_outcome": "pending",
"multi_tender": true,
"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",
"auth_response_code": "00",
"avs_response_code": "match",
"cvv_response_code": "match",
"anti_fraud_decision": "accept",
"cart_items": [
{
"name": "<string>",
"quantity": 123,
"unit_amount": 49999999,
"discount_amount": 0,
"tax_amount": 0,
"external_identifier": "goprohd",
"sku": "GPHD1078",
"product_url": "https://example.com/catalog/go-pro-hd",
"image_url": "https://example.com/images/go-pro-hd.jpg",
"categories": [
"camera",
"travel",
"gear"
],
"product_type": "physical",
"seller_country": "US"
}
],
"scheme_transaction_id": "123456789012345",
"three_d_secure": {
"version": "2.2.0",
"status": "complete",
"method": "challenge",
"response_data": {
"cavv": "<string>",
"eci": "<string>",
"version": "<string>",
"directory_response": "<string>",
"authentication_response": "<string>",
"cavv_algorithm": "<string>",
"xid": "<string>",
"scheme": "visa"
},
"error_data": {
"code": "305",
"description": "Invalid ThreeDSCompInd",
"detail": "The threeDSCompInd must be 'Y' when successful",
"component": "C"
}
},
"payment_service_transaction_id": "tx-12345",
"additional_identifiers": {},
"metadata": {
"cohort": "cohort-12345",
"order": "order-12345"
},
"authorized_at": "2013-07-16T19:23:00.000+00:00",
"captured_at": "2013-07-16T19:23:00.000+00:00",
"voided_at": "2013-07-16T19:23:00.000+00:00",
"approval_expires_at": "2013-07-16T19:23:00.000+00:00",
"buyer_approval_timedout_at": "2013-07-16T19:23:00.000+00:00",
"merchant_advice_code": "02",
"installment_count": 3
}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"
The ID of the transaction
"7099948d-7286-47e4-aad8-b68f7eb44591"
Successful Response
A full transaction resource.
The ID for the transaction.
"7099948d-7286-47e4-aad8-b68f7eb44591"
The base62 encoded transaction ID. This represents a shorter version of this transaction's id which is sent to payment services, anti-fraud services, and other connectors. You can use this ID to reconcile a payment service's transaction against our system. This ID is sent instead of the transaction ID because not all services support 36 digit identifiers.
"default"
The ID of the merchant account this transaction belongs to.
"default"
The currency code for this transaction.
^[A-Z]{3}$"EUR"
"GBP"
"MXN"
The total amount for this transaction across all funding sources including gift cards.
1299
The status of the transaction for the payment_method. The status may change over time as asynchronous processing events occur.
processing, authorization_succeeded, authorization_declined, authorization_failed, authorization_voided, authorization_void_pending, capture_succeeded, capture_pending, buyer_approval_pending "authorization_succeeded"
The amount for this transaction that has been authorized for the payment_method. This can be less than the amount if gift cards were used.
1299
The total amount captured for this transaction, in the smallest currency unit (for example, cents or pence). This can be the full value of the authorized_amount or less.
1299
The total amount refunded for this transaction, in the smallest currency unit (for example, cents or pence). This can be the full value of the captured_amount or less.
1299
The original intent used when the transaction was created.
authorize, capture "capture"
The date and time when the transaction was created, in ISO 8601 format.
"2013-07-16T19:23:00.000+00:00"
The date and time when the transaction was last updated, in ISO 8601 format.
"2013-07-16T19:23:00.000+00:00"
The source of the transaction.
ecommerce, moto, recurring, installment, card_on_file "ecommerce"
Indicates whether the transaction was initiated by the merchant or the customer.
true
Indicates whether the transaction represents a subsequent payment or an initial one.
false
The outcome of the original intent of a transaction. This allows you to understand if the intent of the transaction (e.g. capture or authorize) has been achieved when dealing with multiple payment instruments.
pending, succeeded, failed "succeeded"
The outcome of the original intent of a transaction. This allows you to understand if the intent of the transaction (e.g. capture or authorize) has been achieved when dealing with multiple payment instruments.
true
Always transaction.
"transaction""transaction"
The 2-letter ISO 3166-1 alpha-2 country code for the transaction. Used to filter payment services for processing.
^[A-Z]{2}$"US"
An external identifier that can be used to match the transaction against your own records.
1 - 200"transaction-12345"
The payment method used for this transaction.
Show child attributes
The method used for the transaction.
card, oxxo, spei, pse, tapi, tapifintechs "card"
The name of the instrument used to process the transaction.
pan, card_token, redirect, redirect_token, googlepay, applepay, network_token "pan"
The standardized error code set by Gr4vy.
"missing_redirect_url"
The payment service used for this transaction.
Show child attributes
Whether a manual anti fraud review is pending with an anti fraud service.
false
The buyer used for this transaction.
Show child attributes
This is the response code received from the payment service. This can be set to any value and is not standardized across different payment services.
"E104"
This is the response description received from the payment service. This can be set to any value and is not standardized across different payment services.
"Missing redirect URL"
The shipping details associated with the transaction.
Show child attributes
The identifier for the checkout session this transaction is associated with.
"4137b1cf-39ac-42a8-bad6-1c680d5dab6b"
This is the response description received from the processor.
"00"
The response code received from the payment service for the Address Verification Check (AVS). This code is mapped to a standardized Gr4vy AVS response code.
match, no_match, partial_match_address, partial_match_postcode, unavailable "match"
The response code received from the payment service for the Card Verification Value (CVV). This code is mapped to a standardized Gr4vy CVV response code.
match, no_match, unavailable, not_provided "match"
The mapped decision received from the anti-fraud service. In case of a review decision this field is not updated once the review is resolved.
accept, error, exception, reject, review, skipped "accept"
An array of cart items that represents the line items of a transaction.
Show child attributes
An identifier for the transaction used by the scheme itself, when available.
"123456789012345"
The 3-D Secure data that was sent to the payment service for the transaction.
Show child attributes
The payment service's unique ID for the transaction.
"tx-12345"
A list of additional identifiers that we may keep track of to manage this transaction. This may include the authorization ID, capture ID, and processor ID, as well as an undefined list of additional identifiers.
Show child attributes
{
"payment_service_authorization_id": "auth-12345",
"payment_service_capture_id": "capture-12345"
}Additional information about the transaction stored as key-value pairs.
Show child attributes
{
"cohort": "cohort-12345",
"order": "order-12345"
}The date this transaction was authorized at.
"2013-07-16T19:23:00.000+00:00"
The date this transaction was captured at.
"2013-07-16T19:23:00.000+00:00"
The date this transaction was voided at.
"2013-07-16T19:23:00.000+00:00"
The date this transaction's approval URL will expire at.
"2013-07-16T19:23:00.000+00:00"
The date this transaction's approval timed out at.
"2013-07-16T19:23:00.000+00:00"
An optional merchant advice code which provides insight into the type of transaction or reason why the payment failed.
"02"
The number of installments for this transaction, if applicable.
3
Was this page helpful?