POST
/
transactions
/
{transaction_id}
/
sync
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.SyncAsync(transactionId: "2ee546e0-3b11-478e-afec-fdb362611e22");

// handle response
{
  "type": "transaction",
  "id": "7099948d-7286-47e4-aad8-b68f7eb44591",
  "reconciliation_id": "default",
  "merchant_account_id": "default",
  "currency": "EUR",
  "amount": 1299,
  "status": "authorization_succeeded",
  "authorized_amount": 1299,
  "captured_amount": 1299,
  "refunded_amount": 1299,
  "country": "US",
  "external_identifier": "transaction-12345",
  "intent": "capture",
  "payment_method": {
    "type": "payment-method",
    "approval_url": "https://gr4vy.app/redirect/12345",
    "country": "US",
    "currency": "USD",
    "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",
    "method": "card",
    "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": {
    "type": "payment-service",
    "id": "824ff064-7f4b-430b-9801-59aff90d013e",
    "payment_service_definition_id": "stripe-card",
    "method": "card",
    "display_name": "Stripe USA"
  },
  "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": "12345678931",
        "kind": "us.ein"
      }
    },
    "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",
  "created_at": "2013-07-16T19:23:00.000+00:00",
  "updated_at": "2013-07-16T19:23:00.000+00:00",
  "auth_response_code": "00",
  "avs_response_code": "match",
  "cvv_response_code": "match",
  "anti_fraud_decision": "accept",
  "payment_source": "ecommerce",
  "merchant_initiated": true,
  "is_subsequent_payment": false,
  "cart_items": [
    {
      "name": "GoPro HD",
      "quantity": 2,
      "unit_amount": 1299,
      "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": "3q2+78r+ur7erb7vyv66vv8=",
      "eci": "05",
      "version": "2.1.0",
      "directory_response": "C",
      "scheme": "visa",
      "authentication_response": "Y",
      "cavv_algorithm": "A",
      "xid": "12345"
    },
    "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": {
    "payment_service_authorization_id": "auth-12345",
    "payment_service_capture_id": "capture-12345"
  },
  "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",
  "intent_outcome": "succeeded",
  "multi_tender": true,
  "merchant_advice_code": "02",
  "installment_count": 3
}

This endpoint requires the transactions.read scope. Please note that we will only update the transaction if it represents a valid transition from the current status to the new status.

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.

Examples:

"default"

Path Parameters

transaction_id
string
required

Response

200
application/json

Successful Response

A full transaction resource.