Skip to main content
GET
/
transactions
/
{transaction_id}
/
captures
/
{capture_id}
C#
using Gr4vy;
using Gr4vy.Models.Components;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

var res = await sdk.Transactions.Captures.GetAsync(
    transactionId: "7099948d-7286-47e4-aad8-b68f7eb44591",
    captureId: "b1e2c3d4-5678-1234-9abc-1234567890ab"
);

// handle response
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "merchant_account_id": "<string>",
  "transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "currency": "<string>",
  "amount": 123,
  "final": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "type": "capture",
  "xid": "capture_xYqd43gySMtori",
  "captured_at": "2013-07-16T19:23:00.000+00:00",
  "external_identifier": "capture-12345",
  "error_code": "service_error",
  "iso_response_code": "00",
  "raw_response_code": "E104",
  "raw_response_description": "Internal error",
  "transaction_external_identifier": "transaction-12345",
  "cart_items": [
    {
      "name": "<string>",
      "quantity": 123,
      "unit_amount": 49999999,
      "discount_amount": 0,
      "tax_amount": 0,
      "external_identifier": "goprohd",
      "sku": "GPHD1078",
      "upc": "012345678905",
      "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",
      "tax_exempt": false,
      "unit_of_measure": "feet",
      "commodity_code": "43211503",
      "description": "A brief description of an interesting item.",
      "duty_amount": 1299,
      "shipping_amount": 1299
    }
  ]
}
This endpoint requires the transactions.read scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-gr4vy-merchant-account-id
string | null

The ID of the merchant account to use for this request.

Example:

"default"

Path Parameters

transaction_id
string<uuid>
required

The unique identifier of the transaction.

Example:

"7099948d-7286-47e4-aad8-b68f7eb44591"

capture_id
string<uuid>
required

The unique identifier of the capture.

Example:

"b1e2c3d4-5678-1234-9abc-1234567890ab"

Response

Successful Response

id
string<uuid>
required

The unique identifier for the capture.

Example:

"b1e2c3d4-5678-1234-9abc-1234567890ab"

merchant_account_id
string
required

The merchant account this capture belongs to.

Example:

"default"

transaction_id
string<uuid>
required

The ID of the transaction associated with this capture.

Example:

"7099948d-7286-47e4-aad8-b68f7eb44591"

currency
string
required

The ISO 4217 currency code for this capture.

Example:

"USD"

amount
integer
required

The capture amount in the smallest currency unit.

Example:

1299

status
enum<string>
required

The status of the capture.

Available options:
succeeded,
pending,
declined,
failed
Example:

"succeeded"

final
boolean
required

Whether this is marked as the final capture for the associated transaction.

Example:

true

created_at
string<date-time>
required

The date and time this capture was created.

Example:

"2013-07-16T19:23:00.000+00:00"

updated_at
string<date-time>
required

The date and time this capture was last updated.

Example:

"2013-07-16T19:23:00.000+00:00"

type
string
default:capture

Always capture.

Allowed value: "capture"
Example:

"capture"

xid
string | null

The payment service's unique ID for the capture.

Example:

"capture_xYqd43gySMtori"

captured_at
string<date-time> | null

The date and time the capture was completed.

Example:

"2013-07-16T19:23:00.000+00:00"

external_identifier
string | null

An external identifier that can be used to match the capture against your own records.

Example:

"capture-12345"

error_code
string | null

The standardized error code set by Gr4vy.

Example:

"service_error"

iso_response_code
string | null

The ISO response code.

Example:

"00"

raw_response_code
string | null

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.

Example:

"E104"

raw_response_description
string | null

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.

Example:

"Internal error"

transaction_external_identifier
string | null

The external identifier of the associated transaction.

Example:

"transaction-12345"

cart_items
CartItem · object[] | null

An array of cart items that represents the line items of this capture.