Create webhook
curl --request POST \
--url https://platform.spritz.finance/v1/integrator/webhooks \
--header 'Content-Type: application/json' \
--header 'X-Integrator-Key: <api-key>' \
--header 'X-Signature: <api-key>' \
--header 'X-Timestamp: <api-key>' \
--data '
{
"url": "https://api.example.com/webhooks",
"events": []
}
'import requests
url = "https://platform.spritz.finance/v1/integrator/webhooks"
payload = {
"url": "https://api.example.com/webhooks",
"events": []
}
headers = {
"X-Signature": "<api-key>",
"X-Integrator-Key": "<api-key>",
"X-Timestamp": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Signature': '<api-key>',
'X-Integrator-Key': '<api-key>',
'X-Timestamp': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://api.example.com/webhooks', events: []})
};
fetch('https://platform.spritz.finance/v1/integrator/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.spritz.finance/v1/integrator/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://api.example.com/webhooks',
'events' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Integrator-Key: <api-key>",
"X-Signature: <api-key>",
"X-Timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.spritz.finance/v1/integrator/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://api.example.com/webhooks\",\n \"events\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("X-Integrator-Key", "<api-key>")
req.Header.Add("X-Timestamp", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.spritz.finance/v1/integrator/webhooks")
.header("X-Signature", "<api-key>")
.header("X-Integrator-Key", "<api-key>")
.header("X-Timestamp", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://api.example.com/webhooks\",\n \"events\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.spritz.finance/v1/integrator/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Signature"] = '<api-key>'
request["X-Integrator-Key"] = '<api-key>'
request["X-Timestamp"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://api.example.com/webhooks\",\n \"events\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "6ae897f0fdfe33df51718330",
"events": [
"account.created"
],
"url": "https://api.example.com/webhooks",
"failureCount": 0,
"disabled": false
}{
"title": "Unauthorized",
"status": 401,
"type": "urn:problem-type:auth:unauthorized",
"detail": "Bearer token required",
"instance": "<string>",
"realm": "API",
"scope": "read:users"
}{
"title": "<string>",
"status": 404,
"resourceType": "user",
"resourceId": "<string>",
"type": "about:blank",
"detail": "<string>",
"instance": "<string>"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true
}Integrator
Create webhook
Creates a new webhook for the integrator.
POST
/
v1
/
integrator
/
webhooks
Create webhook
curl --request POST \
--url https://platform.spritz.finance/v1/integrator/webhooks \
--header 'Content-Type: application/json' \
--header 'X-Integrator-Key: <api-key>' \
--header 'X-Signature: <api-key>' \
--header 'X-Timestamp: <api-key>' \
--data '
{
"url": "https://api.example.com/webhooks",
"events": []
}
'import requests
url = "https://platform.spritz.finance/v1/integrator/webhooks"
payload = {
"url": "https://api.example.com/webhooks",
"events": []
}
headers = {
"X-Signature": "<api-key>",
"X-Integrator-Key": "<api-key>",
"X-Timestamp": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Signature': '<api-key>',
'X-Integrator-Key': '<api-key>',
'X-Timestamp': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://api.example.com/webhooks', events: []})
};
fetch('https://platform.spritz.finance/v1/integrator/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.spritz.finance/v1/integrator/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://api.example.com/webhooks',
'events' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Integrator-Key: <api-key>",
"X-Signature: <api-key>",
"X-Timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.spritz.finance/v1/integrator/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://api.example.com/webhooks\",\n \"events\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("X-Integrator-Key", "<api-key>")
req.Header.Add("X-Timestamp", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.spritz.finance/v1/integrator/webhooks")
.header("X-Signature", "<api-key>")
.header("X-Integrator-Key", "<api-key>")
.header("X-Timestamp", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://api.example.com/webhooks\",\n \"events\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.spritz.finance/v1/integrator/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Signature"] = '<api-key>'
request["X-Integrator-Key"] = '<api-key>'
request["X-Timestamp"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://api.example.com/webhooks\",\n \"events\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "6ae897f0fdfe33df51718330",
"events": [
"account.created"
],
"url": "https://api.example.com/webhooks",
"failureCount": 0,
"disabled": false
}{
"title": "Unauthorized",
"status": 401,
"type": "urn:problem-type:auth:unauthorized",
"detail": "Bearer token required",
"instance": "<string>",
"realm": "API",
"scope": "read:users"
}{
"title": "<string>",
"status": 404,
"resourceType": "user",
"resourceId": "<string>",
"type": "about:blank",
"detail": "<string>",
"instance": "<string>"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true
}Authorizations
HMAC signature authentication for backend integrators.
Required Headers:
- X-Integrator-Key: Integrator API key (format: ik_...)
- X-Signature: HMAC signature (format: sha256={hex})
- X-Timestamp: Unix timestamp in milliseconds
- Authorization: Bearer {user-api-key}
Signature Algorithm: HMAC-SHA256
Signature Format: {timestamp}.{METHOD}.{path}.{bodyHash}
- timestamp: Unix timestamp in milliseconds
- METHOD: HTTP method in UPPERCASE (GET, POST, etc.)
- path: Request path (e.g., /v1/transactions)
- bodyHash: SHA256 hex digest of request body (empty string if no body)
Timestamp Tolerance: ±5 minutes (300 seconds)
Example: For POST /v1/transactions with body {"amount":100} and timestamp 1234567890000: Payload: 1234567890000.POST./v1/transactions.{sha256(body)} Signature: sha256=abc123...
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
List of event types to subscribe to. Defaults to empty array.
Available options:
account.created, account.updated, account.deleted, payment.created, payment.updated, payment.completed, payment.refunded, verification.status.updated, capabilities.updated, onramp.created, onramp.updated, onramp.completed, achDebitReturn.created, achDebitReturn.updated, achDebit.authorized, achDebit.deliveryProgress, achDebit.delivered, achDebit.refunded, achDebit.returned, offramp.confirmed, offramp.inFlight, offramp.completed, offramp.failed, offramp.refunded, offramp.reversed, onrampCredit.depositDetected, onrampCredit.completed, onrampCredit.failed, onrampCredit.reversed, onrampCredit.refunded, * Response
Response for status 200
List of event types this webhook is subscribed to
Available options:
account.created, account.updated, account.deleted, payment.created, payment.updated, payment.completed, payment.refunded, verification.status.updated, capabilities.updated, onramp.created, onramp.updated, onramp.completed, achDebitReturn.created, achDebitReturn.updated, achDebit.authorized, achDebit.deliveryProgress, achDebit.delivered, achDebit.refunded, achDebit.returned, offramp.confirmed, offramp.inFlight, offramp.completed, offramp.failed, offramp.refunded, offramp.reversed, onrampCredit.depositDetected, onrampCredit.completed, onrampCredit.failed, onrampCredit.reversed, onrampCredit.refunded, *