# Get Transaction

**GET** `/dpm/hub-payment-info/v1/payments/info/{payment_id}`

Base URL: `https://api.pre.globalgetnet.com`

__Retrieve transaction details using a unique transaction ID__<br><br>The Transaction Query endpoint allows you to retrieve details of a specific transaction using its unique identifier. This is useful for verifying transaction statuses, fetching payment details, and tracking processed transactions.

## Authorization

- PROD (oauth2)
- PRE (oauth2)
- SBX (oauth2)

## Path parameters

- `payment_id` (string, required)
  Payment identifier.

## Responses

### 200

OK

- `payment_id` (string<uuid>)
  Payment identifier
- `order_id` (string)
  Purchase identification code used by e-commerce (code or order number).
- `status` ("AUTHORIZED" | "APPROVED" | "CAPTURED" | "CANCELED" | "REFUNDED" | "DENIED" | "ERROR" | "PENDING" | "REGISTERED" | "PAID")
  Payment Info Status
- `payment` (object)
  - `payment_method` ("CREDIT" | "DEBIT" | "CREDIT_AUTHORIZATION" | "CREDIT_PRE_AUTHORIZATION" | "INSTANT_TRANSFER" | "INSTANT_TRANSFER_PREAUTH", required)
    Payment method type for the transaction:
    - `CREDIT`: Credit card payment (single-step, immediate capture)
    - `DEBIT`: Debit card payment
    - `CREDIT_AUTHORIZATION`: Credit card authorization (two-step, capture later)
    - `CREDIT_PRE_AUTHORIZATION`: Credit card pre-authorization
    - `INSTANT_TRANSFER`: Instant payment (single-step, immediate capture)
    - `INSTANT_TRANSFER_PREAUTH`: Instant payment pre-authorization (two-step, capture within 30 days)
  - `save_card_data` (boolean)
    Determine whether the card should be saved for future purchases. Only for customers using the GetNet vault.
  - `transaction_type` ("FULL" | "INSTALL_NO_INTEREST" | "INSTALL_WITH_INTEREST", required)
    Transaction type. Payment in cash or in installments to the retailer or in installments to the issuer.
  - `number_installments` (number, required)
    Number of installments.
  - `soft_descriptor` (string)
    Text displayed on the buyer's card invoice. The field is optional. When you leave it empty, Getnet uses the trade name registered for the establishment. Getnet keeps letters, digits, spaces, and the asterisk. Accented characters are converted to their unaccented equivalent, so AÇÃO becomes ACAO. Every other character is removed.  Values longer than 22 characters are truncated rather than rejected.
  - `dynamic_mcc` (string)
    Merchant Category Code used to signal the transaction with an MCC different from the one registered for the merchant. Send digits only. Getnet left-pads values shorter than four digits with zeros, so "799" is processed as "0799". If you send an invalid MCC, Getnet uses the registered one.<br><br> <b>The card schemes require this field for Payment Facilitators and SDWO.</b>
  - `card` (object, required)
    Card data set.
    - `number` (string, required)
      Card number masked.
    - `brand` ("MASTERCARD" | "VISA" | "AMEX" | "ELO" | "HIPERCARD", required)
      Bcard walker. Automatically populated by the API if not informed.
      Mandatory field for using Anti-Fraud
    - `expiration_month` (string, required)
      Card expiration month.
    - `expiration_year` (string, required)
      Card expiration year.
    - `cardholder_name` (string)
      Bearer's name printed on the card.
      Mandatory field for using Anti-Fraud.
- `records` (object[])
  - `rel` ("AUTHORIZATION" | "CANCEL" | "CAPTURE" | "PURCHASE")
    Relationship of item to payment.
  - `registered_at` (string<date-time>)
    Registration date and time.
  - `idempotency_key` (string<(a-Z | 0-9 | .-_)>)
    Idempotency key, used to control requests, must be unique per request, because if it is repeated, it will always be returned the same data.
  - `country` (any)
    Country
  - `tenant` (any)
    Tenant
  - `href` (string<uri>)
    URI to query a component related to the item.

Example:

```json
{
  "payment_id": "2c341d28-491b-4cf8-aec7-eeb60136b7a5",
  "order_id": "ORDER-10187383",
  "status": "APPROVED",
  "payment": {
    "payment_method": "CREDIT",
    "save_card_data": false,
    "transaction_type": "FULL",
    "number_installments": 1,
    "soft_descriptor": "MEUECOMM*ORDER10187383",
    "dynamic_mcc": "1799",
    "card": {
      "number": "5155901222260000",
      "brand": "VISA",
      "expiration_month": "09",
      "expiration_year": "30",
      "cardholder_name": "Roland Deschain"
    }
  },
  "records": [
    {
      "rel": "AUTHORIZATION",
      "registered_at": "2011-10-05T14:48:00.000Z",
      "idempotency_key": "63c7f8ee-51a6-470d-bb76-ef762b62bfb7",
      "country": null,
      "tenant": null,
      "href": "string"
    }
  ]
}
```

### 404

Not Found

- `message` (string)
  Error message
- `name` (string)
  Module or service that returned the error
- `status_code` (number)
  HTTP Status Code
- `details` (object[])
  Error details
  - `status` (string)
    Status
  - `error_code` (string)
    Error code
  - `payment_id` (string<uuid>)
    Payment identifier
  - `description` (string)
    Short description of the error
  - `description_detail` (string)
    Detailed description of the error

Example:

```json
{
  "message": "Not Found",
  "name": "GatewayTokenizationServiceError",
  "status_code": 404,
  "details": [
    {
      "status": "DENIED",
      "error_code": "TOKENIZATION-404",
      "payment_id": "2c341d28-491b-4cf8-aec7-eeb60136b7a5",
      "description": "Not Found",
      "description_detail": "Not found number_token, verify or renew your number_token or seller_id."
    }
  ]
}
```

### 500

Internal Server Error

- `message` (string)
  Error message
- `name` (string)
  Module or service that returned the error
- `status_code` (number)
  HTTP Status Code
- `details` (object[])
  Error details
  - `status` (string)
    Status
  - `error_code` (string)
    Error code
  - `description` (string)
    Short description of the error
  - `description_detail` (string)
    Detailed description of the error

Example:

```json
{
  "message": "Internal Server Error",
  "name": "GatewayRouterHTTPServicesError",
  "status_code": 500,
  "details": [
    {
      "status": "ERROR",
      "error_code": "GENERIC-500",
      "description": "Internal Server Error",
      "description_detail": "The server encountered an unexpected error"
    }
  ]
}
```