Getnet DocsGetnet Docs

Get by Idempotent Key

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

Retrieving Transaction Data Using Idempotency Keys

This endpoint allows querying transaction components linked to a specific payment using an idempotency key. The idempotency mechanism ensures that repeated requests with the same key will always return the same response, preventing the creation of duplicate transactions.

Notes:
- Using an idempotency key ensures that repeated queries always return the same transaction details without triggering duplicate operations.
- This endpoint is particularly useful for retrieving transaction statuses or confirming previously executed payment operations.

Path Parameters

idempotency_keystringrequired

Idempotent key for the transaction.

If an identical request is submitted multiple times, the key ensures that the response is always related to the same payment (instead of creating multiple identical payments).

payment_idstringrequired

Payment ID to be used in the query

Response

OK

rel"AUTHORIZATION" | "CANCEL" | "CAPTURE" | "PURCHASE"

Relationship of item to payment.

idempotency_keystring<(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.

registered_atstring<date-time>

Registration date and time.

itemsobject[]
Show items properties
registered_atstring<date-time>

Registration date and time.

type"request" | "response" | "result"

Record type.

contentobject

Registry contents.

Show content properties
idempotency_keystring<(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.

seller_idstring<uuid>

ECommerce identification code

request_idstring<uuid>

Request identifier. Unique for each request.

payment_idstring<uuid>

Payment identifier

order_idstring

Purchase identification code used by e-commerce (code or order number).

amountinteger

Purchase value in cents. It must be an integer.

currencystring

Currency identification (See code in this section).

status"AUTHORIZED" | "APPROVED" | "DENIED" | "ERROR"

Authorization Status

payment_method"CREDIT_AUTHORIZATION"

Payment method

received_atstring

Transaction date

transaction_idstring

Transaction identifier generated by the eCommerce platform

original_transaction_idstring

Original transaction identifier

authorized_atstring

Transaction authorization date

reason_codestring

Return code from the sender or the getnet capture system.

reason_messagestring

Return message from the sender or the getnet capture system.

acquirerstring

Acquirer.

soft_descriptorstring

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.

brand"MASTERCARD" | "VISA" | "AMEX" | "ELO" | "HIPERCARD"

Bcard walker. Automatically populated by the API if not informed. Mandatory field for using Anti-Fraud

authorization_codestring

Authorization Code generated by the Issuer when the transaction is carried out successfully

acquirer_transaction_idstring

NSU of the GetNet transaction (Acquirer)

ecistring

Code indicating whether the transaction was processed with Bearer Authentication. 00, 01 and 02 for Mastercard and 05, 06 and 07 for Visa and other brands

total_installment_amountnumber

For installment transactions, this contains the total amount to be paid (amount plus interest, taxes, fees, etc.).

first_installment_amountnumber

For installment transactions, this contains the value of the first installment to be paid.

other_installment_amountnumber

For installment transactions, this contains the value of the remaining installments to be paid.

Not Found

messagestring

Error message

namestring

Module or service that returned the error

status_codenumber

HTTP Status Code

detailsobject[]

Error details

Show details properties
statusstring

Status

error_codestring

Error code

payment_idstring<uuid>

Payment identifier

descriptionstring

Short description of the error

description_detailstring

Detailed description of the error

Internal Server Error

messagestring

Error message

namestring

Module or service that returned the error

status_codenumber

HTTP Status Code

detailsobject[]

Error details

Show details properties
statusstring

Status

error_codestring

Error code

descriptionstring

Short description of the error

description_detailstring

Detailed description of the error

Request
curl -X GET "https://api.pre.globalgetnet.com/dpm/hub-payment-info/v1/payments/info/<payment_id>/<idempotency_key>"
Response
{
  "rel": "AUTHORIZATION",
  "idempotency_key": "63c7f8ee-51a6-470d-bb76-ef762b62bfb7",
  "registered_at": "2011-10-05T14:48:00.000Z",
  "items": [
    {
      "registered_at": "2011-10-05T14:48:00.000Z",
      "type": "request",
      "content": {
        "idempotency_key": "63c7f8ee-51a6-470d-bb76-ef762b62bfb7",
        "seller_id": "9406df6c-3100-49ba-b4df-d81c1ad8a62b",
        "request_id": "daac03dc-73db-453f-9bea-b1391669d5d3",
        "payment_id": "2c341d28-491b-4cf8-aec7-eeb60136b7a5",
        "order_id": "ORDER-10187383",
        "amount": 8900,
        "currency": "BRL",
        "status": "APPROVED",
        "payment_method": "CREDIT_AUTHORIZATION",
        "received_at": "2020-06-30T18:32:51.222Z",
        "transaction_id": "3729756321501820",
        "original_transaction_id": "-1",
        "authorized_at": "2020-06-30T18:32:51.815Z",
        "reason_code": "00",
        "reason_message": "TRANSACTION EXECUTED SUCCESSFULLY",
        "acquirer": "GETNET",
        "soft_descriptor": "MEUECOMM*ORDER10187383",
        "brand": "VISA",
        "authorization_code": "017060",
        "acquirer_transaction_id": "000152147981",
        "eci": "07",
        "total_installment_amount": 8900,
        "first_installment_amount": 1485,
        "other_installment_amount": 1483
      }
    }
  ]
}