Webhook — Payment Notifications
API data
API Gateway
This API is used for payment gateway operations:
- Production: https://api.sopague.com.br/gateway
- Sandbox: https://api-hmg.sopague.com.br/gateway
- Architecture: Representational State Transfer (REST)
How it works
When a payment is processed (2D Gateway, 3D Gateway, or Payment Link), our platform can (optionally) automatically send an HTTP POST notification to your configured callback URL.
Configuration
Include the urlCallBack parameter in your request:
Request with Webhook
{
...
"urlCallBack": "https://seusite.com.br/webhook/pagamento",
...
}
Notification body
The webhook sends a notification with the following fields to your configured callback URL.
- Gateway 2D/3D
- Payment Link
Webhook - Gateway
{
"Value": 100.50,
"Origin": "GATEWAY_2D",
"Date": "2025-09-11T14:30:25Z",
"Installments": 1,
"TransactionType": "CREDIT",
"ResultId": "010078826509090055210005100989250000000000",
"AuthorizationCode": "2345",
"Status": "0",
"PaymentLinkId": null
}
Webhook - Link
{
"Value": 50.00,
"Origin": "PAYMENT_LINK_2D",
"Date": "2025-09-11T14:30:25Z",
"Installments": 1,
"TransactionType": "CREDIT",
"ResultId": "010078826509090055210005100989250000000000",
"AuthorizationCode": "2345",
"Status": "0",
"PaymentLinkId": "3c228652-122e-4da6-b572-4aea64caad63"
}
HTTP headers
Webhook requests are sent with a header named Access-Key. This access key ensures the authenticity of the request.
Ask support for your Access-Key so you can configure it in your application.
Content-Type: application/json
Access-Key: callback-id-123
Your endpoint
Your endpoint must:
- Accept
POSTrequests - Return HTTP status
200(for notifications received successfully)
Payload fields
| Field | Description | Type |
|---|---|---|
| Value | Payment amount | decimal |
| Origin | Payment origin | string |
| Date | Payment date | string |
| ResultId | Result ID | string |
| Status | Transaction status | string |
| PaymentLinkId | Link ID (only for payment links) | string |
Domains
| PROPERTY | VALUES |
|---|---|
| Origin | GATEWAY_2D, GATEWAY_3D, PAYMENT_LINK_2D |
See also
Response codes
To correctly interpret transaction statuses received via webhook, see our full response-code table: