> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.sqril.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sqril.io/_mcp/server.

# Webhook Notification - Transaction Success

POST https://stg-api.sqril.io/webhooks/transactions/success
Content-Type: application/json

Example webhook notification sent by SQRIL when a transaction is finalized as success.

**When it is sent:**
- After provider webhook processing marks the transaction successful.
- Sent to all active webhook configs whose event filter matches `transaction.success`.

**Payload notes:**
- Required fields: `tx_id`, `status` (`SUCCESS`).
- Optional fields: `amount`, `fee`, `percentage_fee`, `fixed_fee`, `sender`, `recipient`.
- Fee fields are taken from transaction data and formatted for API/webhook output.
- Sender/recipient objects are included only when those details are available on transaction `qr_data`.

**Headers:**
- `Content-Type: application/json`
- `User-Agent: SQRIL-Webhook/<APP_VERSION>`
- `X-SQRIL-Signature` only when a webhook secret is configured.

Reference: https://docs.sqril.io/sqril-saa-s-api/account-webhook-notifications/webhook-notification-transaction-success

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /webhooks/transactions/success:
    post:
      operationId: webhook-notification-transaction-success
      summary: Webhook Notification - Transaction Success
      description: >-
        Example webhook notification sent by SQRIL when a transaction is
        finalized as success.


        **When it is sent:**

        - After provider webhook processing marks the transaction successful.

        - Sent to all active webhook configs whose event filter matches
        `transaction.success`.


        **Payload notes:**

        - Required fields: `tx_id`, `status` (`SUCCESS`).

        - Optional fields: `amount`, `fee`, `percentage_fee`, `fixed_fee`,
        `sender`, `recipient`.

        - Fee fields are taken from transaction data and formatted for
        API/webhook output.

        - Sender/recipient objects are included only when those details are
        available on transaction `qr_data`.


        **Headers:**

        - `Content-Type: application/json`

        - `User-Agent: SQRIL-Webhook/<APP_VERSION>`

        - `X-SQRIL-Signature` only when a webhook secret is configured.
      tags:
        - subpackage_accountWebhookNotifications
      parameters:
        - name: Authorization
          in: header
          description: 'Basic Auth: base64(client_id:client_secret)'
          required: true
          schema:
            type: string
        - name: X-SQRIL-Signature
          in: header
          description: HMAC-SHA256 when webhook secret configured
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Account Webhook Notifications_Webhook
                  Notification - Transaction Success_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tx_id:
                  type: string
                status:
                  $ref: >-
                    #/components/schemas/WebhooksTransactionsSuccessPostRequestBodyContentApplicationJsonSchemaStatus
                amount:
                  type: number
                  format: double
                fee:
                  type: number
                  format: double
                percentage_fee:
                  type: number
                  format: double
                fixed_fee:
                  type: number
                  format: double
                sender:
                  type: object
                  additionalProperties:
                    description: Any type
                recipient:
                  type: object
                  additionalProperties:
                    description: Any type
              required:
                - tx_id
                - status
servers:
  - url: https://stg-api.sqril.io
    description: https://stg-api.sqril.io
components:
  schemas:
    WebhooksTransactionsSuccessPostRequestBodyContentApplicationJsonSchemaStatus:
      type: string
      enum:
        - SUCCESS
      title: >-
        WebhooksTransactionsSuccessPostRequestBodyContentApplicationJsonSchemaStatus
    Account Webhook Notifications_Webhook Notification - Transaction Success_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: >-
        Account Webhook Notifications_Webhook Notification - Transaction
        Success_Response_200
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: 'Basic Auth: base64(client_id:client_secret)'

```

## Examples



**Request**

```json
{
  "tx_id": "string",
  "status": "SUCCESS"
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://stg-api.sqril.io/webhooks/transactions/success"

payload = {
    "tx_id": "string",
    "status": "SUCCESS"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://stg-api.sqril.io/webhooks/transactions/success';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"tx_id":"string","status":"SUCCESS"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://stg-api.sqril.io/webhooks/transactions/success"

	payload := strings.NewReader("{\n  \"tx_id\": \"string\",\n  \"status\": \"SUCCESS\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/webhooks/transactions/success")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"tx_id\": \"string\",\n  \"status\": \"SUCCESS\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/webhooks/transactions/success")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"tx_id\": \"string\",\n  \"status\": \"SUCCESS\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/webhooks/transactions/success', [
  'body' => '{
  "tx_id": "string",
  "status": "SUCCESS"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/webhooks/transactions/success");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tx_id\": \"string\",\n  \"status\": \"SUCCESS\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "tx_id": "string",
  "status": "SUCCESS"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/webhooks/transactions/success")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```