Accept crypto payments through hosted checkout or direct payment flows.
Use the v1 API to retrieve supported currencies, estimate payable amounts, create payment sessions, monitor payment status, and receive signed webhook updates for reliable fulfillment.
{
"amount": 150,
"currency": "BTC",
"email": "customer@example.com",
"name": "Ada Lovelace",
"is_fixed_rate": false,
"is_fee_paid_by_user": false,
"order_id": "order_1001",
"order_description": "Premium subscription payment",
"success_url": "https://merchant.example/payments/success",
"cancel_url": "https://merchant.example/payments/cancel"
}
Authentication
Authenticate server-side v1 requests with the active API key from your merchant dashboard.
Headers
| X-API-Key | Active merchant API key. |
|---|---|
| Accept | application/json |
| Content-Type | application/json for POST requests. |
dk_ public key only for browser drop-in checkout.Required Headers
{
"headers": {
"X-API-Key": "sk_your_api_key_here",
"Accept": "application/json",
"Content-Type": "application/json"
}
}
Retrieve balances
Return the latest balances available to the merchant account linked to the API key.
Request
| Auth | Required |
|---|---|
| Body | None |
| Use case | Display available, pending, and settled balances inside your dashboard. |
Response
{
"success": true,
"message": "Balances retrieved successfully.",
"data": {
"sub_partner_id": "111394288",
"balances": [
{
"currency": "USDDTRC20",
"amount": 0.7,
"pending_amount": 0,
"usd_amount": 0.7,
"pending_usd_amount": 0,
"updated_at": "2026-06-11T18:23:12-04:00"
},
{
"currency": "USDTBSC",
"amount": 1.000134184735,
"pending_amount": 0,
"usd_amount": 1.000134184735,
"pending_usd_amount": 0,
"updated_at": "2026-06-11T18:23:12-04:00"
}
]
}
}
List currencies
Return enabled assets with network, precision, and validation details for checkout screens.
Request
| Auth | Required |
|---|---|
| Body | None |
| Use case | Populate checkout currency selectors and validate customer selections. |
Response
{
"success": true,
"message": "Currencies retrieved successfully.",
"data": [
{
"code_id": 1,
"code": "BTC",
"name": "Bitcoin",
"network": "BTC",
"icon_url": "/assets/images/coins/btc.svg",
"logo_file": "btc.svg",
"wallet_regex": "^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$",
"priority": 1,
"extra_id_exists": false,
"extra_id_regex": null,
"track": 1,
"cg_id": "bitcoin",
"is_maxlimit": false,
"smart_contract": null,
"network_precision": 8,
"usd_rate": 64000.12,
"enabled": true,
"created_at": "2026-06-04T18:23:12-04:00",
"updated_at": "2026-06-11T18:23:12-04:00"
},
{
"code_id": 2,
"code": "ETH",
"name": "Ethereum",
"network": "ETH",
"icon_url": "/assets/images/coins/eth.svg",
"logo_file": "eth.svg",
"wallet_regex": "^0x[a-fA-F0-9]{40}$",
"priority": 2,
"extra_id_exists": false,
"extra_id_regex": null,
"track": 1,
"cg_id": "ethereum",
"is_maxlimit": false,
"smart_contract": null,
"network_precision": 18,
"usd_rate": 3200.44,
"enabled": true,
"created_at": "2026-06-04T18:23:12-04:00",
"updated_at": "2026-06-11T18:23:12-04:00"
}
]
}
Check minimum amount
Check the smallest supported amount before showing a payment option to a customer.
Query Parameters
| currency_from | btc or another source asset. |
|---|---|
| currency_to | btc or another destination asset. |
| fiat_equivalent | Optional fiat equivalent, defaults to USD. |
| is_fixed_rate | Optional boolean. |
| is_fee_paid_by_user | Optional boolean. |
{
"currency_from": "btc",
"currency_to": "btc",
"fiat_equivalent": "USD",
"is_fixed_rate": false,
"is_fee_paid_by_user": false
}
Response
{
"success": true,
"message": "Minimum amount retrieved successfully.",
"data": {
"currency_from": "btc",
"currency_to": "btc",
"fiat_equivalent": "USD",
"is_fixed_rate": false,
"is_fee_paid_by_user": false,
"min_amount": 0.00034,
"fiat_equivalent_amount": 21.78,
"raw": {
"min_amount": 0.00034,
"fiat_equivalent": 21.78
}
}
}
Estimate payment amount
Estimate the crypto amount due for a USD charge before creating a payment.
Query Parameters
| amount | USD amount to convert. |
|---|---|
| currency | Destination asset ticker, for example BTC. |
{
"amount": 150,
"currency": "BTC"
}
Response
{
"success": true,
"message": "Estimate retrieved successfully.",
"data": {
"amount": 150,
"currency_from": "usd",
"currency_to": "btc",
"estimated_amount": 0.00231,
"rate": 1.54e-5,
"fee": null,
"raw": {
"currency_from": "usd",
"amount_from": 150,
"currency_to": "btc",
"estimated_amount": 0.00231
}
}
}
Create hosted payment link
Create a secure Dekaplet-hosted checkout page for customers who should complete payment off-site.
Body Parameters
| amount | Required charge amount in USD. |
|---|---|
| currency | Required payment asset ticker. |
| Required customer email address. | |
| name | Optional customer name. |
| order_id | Optional merchant reference. |
| success_url | Optional HTTPS URL for completed checkout redirects. |
| cancel_url | Optional HTTPS URL for cancelled checkout redirects. |
{
"amount": 150,
"currency": "BTC",
"email": "customer@example.com",
"name": "Ada Lovelace",
"is_fixed_rate": false,
"is_fee_paid_by_user": false,
"order_id": "order_1001",
"order_description": "Premium subscription payment",
"success_url": "https://merchant.example/payments/success",
"cancel_url": "https://merchant.example/payments/cancel"
}
Response
{
"success": true,
"message": "Payment link created successfully.",
"data": {
"payment": {
"payment_id": "5169465938",
"purchase_id": "4512369874",
"invoice_id": "4315278456",
"payment_status": "waiting",
"type": "crypto2crypto",
"product": "sub-partner-payment",
"hosted_payment_url": "https://dekaplet.com/api/payment?linkId=123",
"payer_name": "Ada Lovelace",
"payer_email": "customer@example.com",
"success_url": "https://merchant.example/payments/success",
"cancel_url": "https://merchant.example/payments/cancel"
},
"customer": {
"name": "Ada Lovelace",
"email": "customer@example.com"
},
"pricing": {
"price_amount": 150,
"price_currency": "USD",
"pay_amount": 0.00231,
"pay_currency": "BTC",
"amount_received": 0,
"is_fixed_rate": false,
"is_fee_paid_by_user": false
},
"blockchain": {
"pay_address": "bc1qexampleaddress1234567890",
"network": "BTC",
"smart_contract": null,
"burning_percent": null,
"network_precision": 8
},
"timing": {
"created_at": "2026-06-11T18:23:12-04:00",
"updated_at": "2026-06-11T18:23:12-04:00",
"expiration_estimate_date": "2026-06-11T19:23:12-04:00",
"valid_until": "2026-06-11T19:23:12-04:00",
"time_limit": 3600
},
"additional_info": {
"order_id": null,
"order_description": null,
"payin_extra_id": null,
"customer_name": "Ada Lovelace",
"customer_email": "customer@example.com",
"ipn_callback_url": "https://dekaplet.com/api/merchant/payments/status",
"success_url": "https://merchant.example/payments/success",
"cancel_url": "https://merchant.example/payments/cancel",
"origin_ip": "203.0.113.25"
}
}
}
Create direct payment
Create a payment for an embedded checkout where your app displays the address, amount, network, and QR payload.
Body Parameters
| amount | Required charge amount in USD. |
|---|---|
| currency | Required payment asset ticker. |
| Required customer email address. | |
| success_url | Optional HTTPS URL for completed checkout redirects. |
| cancel_url | Optional HTTPS URL for cancelled checkout redirects. |
{
"amount": 150,
"currency": "BTC",
"email": "customer@example.com",
"name": "Ada Lovelace",
"order_id": "order_1001",
"order_description": "Premium subscription payment",
"success_url": "https://merchant.example/payments/success",
"cancel_url": "https://merchant.example/payments/cancel"
}
Response
{
"success": true,
"message": "Payment created successfully.",
"data": {
"payment": {
"payment_id": "5169465938",
"invoice_id": "4315278456",
"purchase_id": "4512369874",
"payment_status": "waiting",
"hosted_payment_url": "https://dekaplet.com/api/payment?iid=4315278456&paymentId=5169465938",
"status_url": "https://dekaplet.com/api/v1/payments/5169465938",
"success_url": "https://merchant.example/payments/success",
"cancel_url": "https://merchant.example/payments/cancel",
"created_at": "2026-06-11T18:23:12-04:00",
"expires_at": "2026-06-11T18:43:12-04:00",
"valid_until": "2026-06-11T19:23:12-04:00",
"confirmed_at": null
},
"customer": {
"name": "Ada Lovelace",
"email": "customer@example.com"
},
"pricing": {
"price_amount": 150,
"price_currency": "USD",
"pay_amount": 0.00231,
"pay_currency": "BTC",
"actually_paid": null,
"is_fixed_rate": false,
"is_fee_paid_by_user": false
},
"blockchain": {
"pay_address": "bc1qexampleaddress1234567890",
"pay_amount": 0.00231,
"pay_currency": "BTC",
"network": "BTC",
"extra_id": null,
"smart_contract": null,
"network_precision": 8
},
"qr": {
"payload": "bitcoin:bc1qexampleaddress1234567890?amount=0.00231",
"amount_payload": "bc1qexampleaddress1234567890?amount=0.00231",
"payment_uri": "bitcoin:bc1qexampleaddress1234567890?amount=0.00231",
"code_url": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPi4uLjwvc3ZnPg==",
"amount_code_url": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPi4uLjwvc3ZnPg=="
},
"merchant_reference": {
"order_id": "order_1001",
"order_description": "Premium subscription payment"
},
"integration_recommendations": [
"Display the exact pay_amount, pay_currency, pay_address, network, and expires_at values without rounding.",
"Render qr.code_url or qr.amount_code_url for wallet scanning, and also show the plain address for manual copy.",
"Use GET /api/v1/payments/{payment_id} or signed webhooks to confirm payment before fulfillment.",
"Do not treat browser redirects or customer screenshots as proof of payment.",
"Expire your on-site checkout UI when expires_at has passed and create a new payment if the customer retries."
]
}
}
Javascript drop-in checkout
Open a native Dekaplet crypto checkout popup with a browser-safe public key.
Browser Key
| publicKey | Your dk_ drop-in public key. This key can only create drop-in sessions. |
|---|---|
| amount | Required charge amount in USD unless another display currency is configured. |
| cryptoCurrency | Optional asset ticker. If omitted, the customer selects an asset in the popup. |
| customer.email | Required customer email address. |
| reference | Optional merchant order reference. |
/api/dropin/v1 routes and does not expose your server API key or call /api/v1/payments directly from the browser.Example
<script src="https://dekaplet.com/dropin/v1/dekaplet.js"></script>
<button id="pay-with-dekaplet">Pay with Crypto</button>
<script>
document.getElementById('pay-with-dekaplet').onclick = function () {
DekapletCheckout.open({
publicKey: 'dk_your_public_key_here',
amount: 150,
currency: 'USD',
reference: 'ORDER_1001',
customer: {
name: 'Ada Lovelace',
email: 'customer@example.com'
},
onSuccess: function (payment) {
console.log('Payment received', payment);
}
});
};
</script>
Check payment status
Retrieve the latest status for a direct payment or hosted payment-link transaction.
Path Parameters
| payment_id | The payment ID returned when the payment was created. |
|---|
Response
{
"success": true,
"message": "Payment status retrieved successfully.",
"data": {
"payment_id": "5169465938",
"invoice_id": "4315278456",
"payment_status": "finished",
"price_amount": 150,
"price_currency": "USD",
"pay_amount": 0.00231,
"pay_currency": "BTC",
"actually_paid": 0.00231,
"confirmed_at": "2026-06-11T18:23:12-04:00"
}
}
Payment webhooks
Receive signed payment status updates at the webhook URL configured in your merchant dashboard.
Headers
| X-Dekaplet-Event | payment.updated |
|---|---|
| X-Dekaplet-Delivery | Unique delivery ID for idempotency. |
| X-Dekaplet-Timestamp | Unix timestamp used in signature verification. |
| X-Dekaplet-Signature | sha256=... HMAC signature. |
| Webhook secret | Not configured |
const crypto = require('crypto');
const signedPayload = `${timestamp}.${rawBody}`;
const expected = 'sha256=' + crypto
.createHmac('sha256', webhookSecret)
.update(signedPayload)
.digest('hex');
if (!crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))) {
throw new Error('Invalid webhook signature');
}
Payload
{
"id": "3d58cb81-b6ec-4203-a4df-d09c67b2c1d8",
"event": "payment.updated",
"created_at": "2026-06-11T18:23:12-04:00",
"source": "dekaplet",
"merchant": {
"user_id": null
},
"payment": {
"payment_id": "5169465938",
"invoice_id": "4315278456",
"purchase_id": "4512369874",
"payment_status": "finished",
"price_amount": 150,
"price_currency": "USD",
"pay_amount": 0.00231,
"pay_currency": "BTC",
"actually_paid": 0.00231,
"pay_address": "bc1qexampleaddress1234567890",
"network": "BTC",
"confirmed_at": "2026-06-11T18:23:12-04:00",
"customer": {
"name": "Ada Lovelace",
"email": "customer@example.com"
}
}
}
Errors and status codes
Handle validation, authentication, missing-resource, and processing failures consistently.
Status Codes
| 400 | Invalid request or unsupported operation. |
|---|---|
| 401 | Missing, inactive, or invalid API key. |
| 404 | Payment or resource was not found for the authenticated merchant. |
| 422 | Validation failed. |
| 500 | Unexpected processing failure. Retry safely after checking whether the payment was created. |
Validation Error
{
"success": false,
"message": "Validation failed.",
"errors": {
"currency": [
"The selected currency is invalid."
]
}
}