Download OpenAPI specification:Download
[Base URL: https://app.coinsnap.io] To authenticate requests to this API, you need to include an Authorization header with the value "X-Api-Key {YOUR_AUTH_KEY}". To obtain your authentication token, go to your dashboard.
Triggered when a new invoice is created. This webhook provides details about the newly created invoice.
X-Coinsnap-Sig required | string Example: sha256=abc123def456ghi789 HMAC signature of the body using the webhook's secret |
Payload containing data about the invoice
invoiceId | string The ID of the invoice. |
metadata | object Data provided upon creating invoice |
additionalStatus | string Enum: "None" "Underpaid" "Overpaid" |
type | string |
{- "invoiceId": "string",
- "metadata": { },
- "additionalStatus": "None",
- "type": "New"
}
Triggered when an invoice expires. This webhook notifies your application that an invoice was not paid within the 15 min interval. Check the additionalStatus
property inside the metadata to see if it contains Underpaid
, indicating that there was a partial payment.
X-Coinsnap-Sig required | string Example: sha256=abc123def456ghi789 HMAC signature of the body using the webhook's secret |
Payload containing data about the invoice
invoiceId | string The ID of the invoice. |
metadata | object Data provided upon creating invoice |
additionalStatus | string Enum: "None" "Underpaid" "Overpaid" |
type | string |
isUnderpaid | boolean Indicates if the invoice was underpaid. |
{- "invoiceId": "string",
- "metadata": { },
- "additionalStatus": "None",
- "type": "Expired",
- "isUnderpaid": true
}
Triggered when an invoice is in processing status. This means that a payment has been received but doesn't have enough confirmations yet. This status only applies to Bitcoin payments. In the case of Lightning payments, the status is switched to Settled
immediately.
X-Coinsnap-Sig required | string Example: sha256=abc123def456ghi789 HMAC signature of the body using the webhook's secret |
Payload containing data about the invoice
invoiceId | string The ID of the invoice. |
metadata | object Data provided upon creating invoice |
additionalStatus | string Enum: "None" "Underpaid" "Overpaid" |
type | string |
{- "invoiceId": "string",
- "metadata": { },
- "additionalStatus": "None",
- "type": "Processing"
}
Triggered when an invoice is settled. This means that the payment has been fully received and confirmed. The invoice is now considered paid in full.
X-Coinsnap-Sig required | string Example: sha256=abc123def456ghi789 HMAC signature of the body using the webhook's secret |
Payload containing data about the invoice
invoiceId | string The ID of the invoice. |
metadata | object Data provided upon creating invoice |
additionalStatus | string Enum: "None" "Underpaid" "Overpaid" |
type | string |
{- "invoiceId": "string",
- "metadata": { },
- "additionalStatus": "None",
- "type": "Settled"
}
storeId required | string Store ID |
x-api-key required | string API Key for authentication |
url | string <url> |
events | Array of strings Items Enum: "New" "Expired" "Processing" "Settled" |
secret | string |
{- "events": [
- "New"
], - "secret": "topsecretstring"
}
{- "id": "string",
- "secret": "string",
- "url": "string",
- "events": [
- [
- "New",
- "Expired",
- "Processing",
- "Settled"
]
]
}
storeId required | string Store ID |
webhookId required | string Webhook ID |
x-api-key required | string API Key for authentication |
url | string <url> |
events | Array of strings Items Enum: "New" "Expired" "Processing" "Settled" |
enabled | boolean |
{- "url": "string",
- "events": [
- "New"
], - "enabled": true
}
{- "id": "string",
- "enabled": true,
- "url": "string",
- "secret": "string",
- "events": [
- [
- "New",
- "Expired",
- "Processing",
- "Settled"
]
]
}
storeId required | string Store ID |
webhookId required | string Webhook ID |
x-api-key required | string API Key for authentication |
{- "id": "string",
- "enabled": true,
- "url": "string",
- "secret": "string",
- "events": [
- [
- "New",
- "Expired",
- "Processing",
- "Settled"
]
]
}
webhookId required | string ID of the webhook to which the payload belongs |
payloadId required | string ID of the payload to be redelivered |
x-api-key required | string API Key for authentication |
{- "message": "Webhook resent successfully"
}
storeId required | string Store ID |
x-api-key required | string API Key for authentication |
amount | number The amount of the invoice. |
currency | string Enum: "EUR" "USD" "SATS" "BTC" "CAD" "JPY" "GBP" "CHF" The currency of the invoice (if unspecified, the currency will be EUR)' |
enabledPaymentMethods | Array of strings Default: ["BTC","Lightning"] Specify which payment methods are available for this invoice. |
buyerEmail | string |
redirectUrl | string Url where customer will be sent after payment |
redirectAutomatically | boolean Redirect to the redirectUrl automatically |
orderId | string 123 |
metadata | object Any key-value pair. Example: {buyerName: name, buyerCountry: country} |
referralCode | string Referral code which you receive after registering extension. |
{- "amount": 0,
- "currency": "EUR",
- "enabledPaymentMethods": "BTC",
- "buyerEmail": "string",
- "redirectUrl": "string",
- "redirectAutomatically": true,
- "orderId": "string",
- "metadata": { },
- "referralCode": "string"
}
{- "id": 1,
- "storeId": "gdadada23rewr",
- "status": "New",
- "amount": 100,
- "orderId": 123,
- "buyerEmail": "user@coinsnap.io",
- "currency": "EUR",
- "enabledPaymentMethods": [
- "BTC",
- "Lightning"
], - "metadata": {
- "customerName": "John",
- "orderNumber": 123
}, - "lightningInvoice": "lnbc1u1pwtjxpp5t7pp5wcv6uz06dlt4w5hj3gct7xl34fkgylyxxc4dtyfsdfu3qe9xcsdqsdvlg6urfdcsx6t9ggsxqzjccqp2706k86a7uz6ejqf2xqm4mzkr7aqel0t3srttrn3pg3qxu2zzlzmgnvv9uh4anumwus4tmntqxzffwvgzqmmzdtsr3xrxpff4rle0pczrh2ep88s84uunwwue",
- "onchainAddress": "1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX",
- "qrCodes": {
- "lightningQR": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAvgAAAL4CAYAAAAOIoPjAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3dO5LsMJIEwK21vv+Va7URXwoYbCSi3OVufkAAFUYh+Pl+v9//AQAAKvxv+gIAAID/HgEfAACKCPgAAFBEwAcAgCICPgAAFBHwAQCgiIAPAABF/qY/+Hw+/x/XETN9BuD0/tuPP7k9f25/xmH787nt9vPfPr8m6es/nV+vr5/b0td/+vxev/7T40/a5//t+ZO+vtPjv24aH2/wAQCgiIAPAABFBHwAACgi4AMAQBEBHwAAigj4AABQRMAHAIAiYw",
- "bitcoinQR": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAE4CAYAAADPf+9qAAAABmJLR0QA/wD/AP+g"
}, - "redirectAutomatically": true,
- "createdAt": "1684940348"
}
storeId required | string Store ID |
invoiceId required | string Invoice ID |
x-api-key required | string API Key for authentication |
{- "id": 1,
- "storeId": "gdadada23rewr",
- "status": "New",
- "amount": 100,
- "orderId": 123,
- "buyerEmail": "user@coinsnap.io",
- "currency": "EUR",
- "enabledPaymentMethods": [
- "BTC",
- "Lightning"
], - "paymentMethod": "Bitcoin/Lightning",
- "metadata": {
- "customerName": "John",
- "orderNumber": 123
}, - "lightningInvoice": "lnbc1u1pwtjxpp5t7pp5wcv6uz06dlt4w5hj3gct7xl34fkgylyxxc4dtyfsdfu3qe9xcsdqsdvlg6urfdcsx6t9ggsxqzjccqp2706k86a7uz6ejqf2xqm4mzkr7aqel0t3srttrn3pg3qxu2zzlzmgnvv9uh4anumwus4tmntqxzffwvgzqmmzdtsr3xrxpff4rle0pczrh2ep88s84uunwwue",
- "onchainAddress": "1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX",
- "qrCodes": {
- "lightningQR": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAvgAAAL4CAYAAAAOIoPjAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3dO5LsMJIEwK21vv+Va7URXwoYbCSi3OVufkAAFUYh+Pl+v9//AQAAKvxv+gIAAID/HgEfAACKCPgAAFBEwAcAgCICPgAAFBHwAQCgiIAPAABF/qY/+Hw+/x/XETN9BuD0/tuPP7k9f25/xmH787nt9vPfPr8m6es/nV+vr5/b0td/+vxev/7T40/a5//t+ZO+vtPjv24aH2/wAQCgiIAPAABFBHwAACgi4AMAQBEBHwAAigj4AABQRMAHAIAiYw",
- "bitcoinQR": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAE4CAYAAADPf+9qAAAABmJLR0QA/wD/AP+g"
}, - "redirectAutomatically": true,
- "createdAt": 1684940348
}
cn-token required | string Token for authentication |
Payment request details
amount required | number <float> The amount of the payment request. |
title required | string The title of the payment request. |
currency | string Enum: "USD" "EUR" "CAD" "JPY" "GBP" "CHF" "BTC" "SATS" The currency of the payment request. |
description | string The description of the payment request. |
expiryDate | string <date> The expiry date of the payment request in ISO 8601 format. If not provided, defaults to 30 days from the current date. |
{- "amount": 100.5,
- "title": "Payment for Order #123",
- "currency": "USD",
- "description": "This is a detailed description of the payment request.",
- "expiryDate": "2024-12-31"
}
{- "message": "Payment request successfully created"
}
id required | string The ID of the payment request to retrieve. |
{- "id": "string",
- "amount": 0.1,
- "title": "string",
- "currency": "string",
- "description": "string",
- "expiryDate": "2019-08-24",
- "storeId": "string",
- "status": "Expired"
}
id required | string The ID of the payment request to update. |
Updated payment request details
amount required | number <float> The amount of the payment request. |
title required | string The title of the payment request. |
currency | string Enum: "USD" "EUR" "CAD" "JPY" "GBP" "CHF" "BTC" "SATS" The currency of the payment request. |
description | string The description of the payment request. |
expiryDate | string <date> The expiry date of the payment request. |
{- "amount": 150.75,
- "title": "Updated Payment for Order #456",
- "currency": "EUR",
- "description": "Updated description for the payment request.",
- "expiryDate": "2024-12-31"
}
{- "message": "Payment request successfully updated"
}
storeId required | string Store ID |
x-api-key required | string API Key for authentication |
[- {
- "id": 1,
- "hash": "924331c106c0e6e3487ecf8222fa5ec9a3b8eec46c256ae7a2e56b3431f6a7a4",
- "status": "Settled",
- "type": "transfer",
- "paymentMethod": "Bitcoin/Lightning",
- "payoutMethod": "Lightning/DFX",
- "amount": 100,
- "invoiceId": "sandajn3442sdanfsa",
- "comment": "string",
- "createdAt": 1684938890
}
]
storeId required | string Store ID |
transactionId required | string Transaction ID |
x-api-key required | string API Key for authentication |
[- {
- "id": 1,
- "hash": "924331c106c0e6e3487ecf8222fa5ec9a3b8eec46c256ae7a2e56b3431f6a7a4",
- "status": "Settled",
- "type": "transfer",
- "paymentMethod": "Bitcoin/Lightning",
- "payoutMethod": "Lightning/DFX",
- "amount": 100,
- "invoiceId": "sandajn3442sdanfsa",
- "comment": "string",
- "createdAt": 1684938890
}
]
storeId required | string Store ID |
x-api-key required | string API Key for authentication |
{- "storeId": "a213sad34as",
- "name": "Test",
- "walletMinSendable": 100,
- "walletMaxSendable": 10000,
- "apiKey": "dadasjdjafadasdas"
}