Create Bolt Webhook
curl --request POST \
--url https://api.bolt.com/v1/webhooks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"division_id": "3X9aPQ67-YrB",
"url": "https://eva-nerv.shop.com/path/to/hook"
}
'import requests
url = "https://api.bolt.com/v1/webhooks"
payload = {
"division_id": "3X9aPQ67-YrB",
"url": "https://eva-nerv.shop.com/path/to/hook"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({division_id: '3X9aPQ67-YrB', url: 'https://eva-nerv.shop.com/path/to/hook'})
};
fetch('https://api.bolt.com/v1/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://api.bolt.com/v1/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([
'division_id' => '3X9aPQ67-YrB',
'url' => 'https://eva-nerv.shop.com/path/to/hook'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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://api.bolt.com/v1/webhooks"
payload := strings.NewReader("{\n \"division_id\": \"3X9aPQ67-YrB\",\n \"url\": \"https://eva-nerv.shop.com/path/to/hook\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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://api.bolt.com/v1/webhooks")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"division_id\": \"3X9aPQ67-YrB\",\n \"url\": \"https://eva-nerv.shop.com/path/to/hook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bolt.com/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"division_id\": \"3X9aPQ67-YrB\",\n \"url\": \"https://eva-nerv.shop.com/path/to/hook\"\n}"
response = http.request(request)
puts response.read_body{
"webhook_id": "wh_za7VbYcSQU2zRgGQXQAm-g"
}{
"errors": [
{
"code": 2001005,
"message": "The input is missing a required parameter."
}
],
"result": {
"success": false
}
}{
"errors": [
{
"code": 2001005,
"message": "The input is missing a required parameter."
}
],
"result": {
"success": false
}
}{
"errors": [
{
"code": 2001005,
"message": "The input is missing a required parameter."
}
],
"result": {
"success": false
}
}Webhooks
Create Bolt Webhook
Create a new webhook to receive notifications from Bolt about various events, such as transaction status. Webhooks must have unique configuration.
POST
/
v1
/
webhooks
Create Bolt Webhook
curl --request POST \
--url https://api.bolt.com/v1/webhooks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"division_id": "3X9aPQ67-YrB",
"url": "https://eva-nerv.shop.com/path/to/hook"
}
'import requests
url = "https://api.bolt.com/v1/webhooks"
payload = {
"division_id": "3X9aPQ67-YrB",
"url": "https://eva-nerv.shop.com/path/to/hook"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({division_id: '3X9aPQ67-YrB', url: 'https://eva-nerv.shop.com/path/to/hook'})
};
fetch('https://api.bolt.com/v1/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://api.bolt.com/v1/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([
'division_id' => '3X9aPQ67-YrB',
'url' => 'https://eva-nerv.shop.com/path/to/hook'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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://api.bolt.com/v1/webhooks"
payload := strings.NewReader("{\n \"division_id\": \"3X9aPQ67-YrB\",\n \"url\": \"https://eva-nerv.shop.com/path/to/hook\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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://api.bolt.com/v1/webhooks")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"division_id\": \"3X9aPQ67-YrB\",\n \"url\": \"https://eva-nerv.shop.com/path/to/hook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bolt.com/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"division_id\": \"3X9aPQ67-YrB\",\n \"url\": \"https://eva-nerv.shop.com/path/to/hook\"\n}"
response = http.request(request)
puts response.read_body{
"webhook_id": "wh_za7VbYcSQU2zRgGQXQAm-g"
}{
"errors": [
{
"code": 2001005,
"message": "The input is missing a required parameter."
}
],
"result": {
"success": false
}
}{
"errors": [
{
"code": 2001005,
"message": "The input is missing a required parameter."
}
],
"result": {
"success": false
}
}{
"errors": [
{
"code": 2001005,
"message": "The input is missing a required parameter."
}
],
"result": {
"success": false
}
}Authorizations
Admins and Developers can obtain their Bolt API key from the Bolt Merchant Dashboard.
Body
application/json
Webhook that receives notifications.
- Option 1
- Option 2
The unique ID associated with the specific merchant division.
Example:
"3X9aPQ67-YrB"
The full URL to receive webhook notifications.
Example:
"https://eva-nerv.shop.com/path/to/hook"
Subscribe to a group of events.
all: subscribe to all existing and future event types
Available options:
all, null Response
Success
A unique webhook ID. Reference this value to modify or delete the webhook subscription. operations as well.
Example:
"wh_za7VbYcSQU2zRgGQXQAm-g"
⌘I