Getnet DocsGetnet Docs

Subscribe to a webhook event

POST/dpm/webhooks/v1/subscriptions

Subscribe to receive webhooks. Select the event, authentication type and url to subscribe to an event.

Header Parameters

x-seller-idstringrequired

Seller identifier (UUID). An empty or absent value results in an authentication error.

Body application/json

seller_idstring

Seller identification, returned in responses. Send the seller identifier via the x-seller-id header instead.

callback_urlstring<uri>required

URL to callback when the event is triggered

event"APPROVED_TRANSACTIONS" | "REJECTED_TRANSACTIONS" | "REFUNDED_TRANSACTIONS" | "CANCELLED_TRANSACTIONS" | "CAPTURED_TRANSACTIONS" | "CARD_UPDATE" | "CARD_UPDATED_TRANSACTIONS" | "PENDING_TRANSACTIONS" | "PIX_UPDATED_TRANSACTIONS" | "BOLETO_UPDATED_TRANSACTIONS" | "BOLETO_PAID_TRANSACTIONS" | "PROCESSING_TRANSACTIONS" | "FAILED_TRANSACTIONS" | "EXPIRED_TRANSACTIONS" | "AUTHORIZED_TRANSACTIONS" | "PIX_APPROVED_TRANSACTIONS" | "PIX_CANCELED_TRANSACTIONS" | "BOLETO_REGISTERED_TRANSACTIONS" | "CHARGEBACK_NEEDS_RESPONSE" | "REVERSED_TRANSACTIONS"required

Webhook event

authentication_type"user_credentials" | "oauth"required

Authentication type

authentication_dataobject
Show authentication_data properties
userstringrequired

Basic authentication user

passwordstringrequired

Basic authentication password

subscription_idstring<uuid>

Subscription identifier. Assigned by the server — do not send in requests.

Response

Subscription created

statusstring
messagestring
dataobject
Show data properties
seller_idstring

Seller identification, returned in responses. Send the seller identifier via the x-seller-id header instead.

callback_urlstring<uri>

URL to callback when the event is triggered

event"APPROVED_TRANSACTIONS" | "REJECTED_TRANSACTIONS" | "REFUNDED_TRANSACTIONS" | "CANCELLED_TRANSACTIONS" | "CAPTURED_TRANSACTIONS" | "CARD_UPDATE" | "CARD_UPDATED_TRANSACTIONS" | "PENDING_TRANSACTIONS" | "PIX_UPDATED_TRANSACTIONS" | "BOLETO_UPDATED_TRANSACTIONS" | "BOLETO_PAID_TRANSACTIONS" | "PROCESSING_TRANSACTIONS" | "FAILED_TRANSACTIONS" | "EXPIRED_TRANSACTIONS" | "AUTHORIZED_TRANSACTIONS" | "PIX_APPROVED_TRANSACTIONS" | "PIX_CANCELED_TRANSACTIONS" | "BOLETO_REGISTERED_TRANSACTIONS" | "CHARGEBACK_NEEDS_RESPONSE" | "REVERSED_TRANSACTIONS"

Webhook event

authentication_type"user_credentials" | "oauth"

Authentication type

authentication_dataobject
Show authentication_data properties
userstring

Basic authentication user

passwordstring

Basic authentication password

subscription_idstring<uuid>

Subscription identifier. Assigned by the server — do not send in requests.

Bad request

codestring

Unique alphanumeric human readable error code

messagestring

Brief summary of the reported issue

detailsobject[]

Array of errors. The object type varies depending on the error context.

Unprocessable entity

codestring

Unique alphanumeric human readable error code

messagestring

Brief summary of the reported issue

detailsobject[]

Array of errors. The object type varies depending on the error context.

Internal server error

messagestring

Brief summary of the reported issue

detailsobject[]

Array of errors. The object type varies depending on the error context.

Request
curl -X POST "https://api.pre.globalgetnet.com/dpm/webhooks/v1/subscriptions" \
  -H "Content-Type: application/json" \
  -H "x-seller-id: <x-seller-id>" \
  -d '{
  "seller_id": "06f256c8-1bbf-42bf-93b4-ce2041bfb87e",
  "callback_url": "https://myserver.com/send/callback/here",
  "event": "APPROVED_TRANSACTIONS",
  "authentication_type": "user_credentials",
  "authentication_data": {
    "user": "1cb9c739-8452-4436-816b-a833960b7680",
    "password": "78ce12f6-665b-4354-8eaf-f0384413aaa8"
  },
  "subscription_id": "c2829224-45c1-4024-ac2c-4be8c42ff993"
}'
Response
{
  "status": "success",
  "message": "Operation completed successfully",
  "data": {
    "seller_id": "06f256c8-1bbf-42bf-93b4-ce2041bfb87e",
    "callback_url": "https://myserver.com/send/callback/here",
    "event": "APPROVED_TRANSACTIONS",
    "authentication_type": "user_credentials",
    "authentication_data": {
      "user": "1cb9c739-8452-4436-816b-a833960b7680",
      "password": "78ce12f6-665b-4354-8eaf-f0384413aaa8"
    },
    "subscription_id": "c2829224-45c1-4024-ac2c-4be8c42ff993"
  }
}