You are currently exploring an interactive sandbox preview. Explore all features or exit to live mode to configure your real production gateways.
Automated MFS & Bank Reconciliation and Outbound SMS Gateway
Complete server-to-server integration guide for Payment Checkout, HMAC Webhooks, and SMS Relay.
https://api.ark8.spaceAuthenticate all server-to-server API requests by sending your Merchant API Key in the x-api-key HTTP header. Never expose your API key or Webhook Secret in client-side/browser code.
Create a hosted MFS checkout session, redirect your customer to the returned payment URL, and confirm completion via Webhook or session status.
POST https://api.ark8.space/api/gateway/v1/checkout/create
Headers:
Content-Type: application/json
x-api-key: ark8_gw_your_api_key
Body:
{
"orderId": "ORD-10928",
"amount": 1250.00,
"currency": "BDT",
"customerName": "Demo Customer",
"customerPhone": "01712345678",
"customerEmail": "customer@example.com",
"successUrl": "https://yourapp.com/payment/success",
"cancelUrl": "https://yourapp.com/payment/cancel",
"webhookUrl": "https://yourapp.com/api/webhooks/ark8-gateway"
}
Response (200 OK):
{
"sessionId": "sess_...",
"paymentUrl": "https://api.ark8.space/pay/sess_...",
"expiresAt": "2026-11-27T12:00:00Z"
}GET https://api.ark8.space/api/gateway/v1/checkout/{sessionId}
POST https://api.ark8.space/api/gateway/v1/checkout/{sessionId}/verify
Headers:
Content-Type: application/json
Body (for /verify):
{
"provider": "bkash",
"trxId": "BKA9X23M12",
"senderNumber": "01712345678"
}When a payment succeeds, Ark8 Gateway sends a signed POST request to your configured webhookUrl. Verify the x-ark8-signature header using HMAC-SHA256 (lowercase hex) over the raw JSON body before activating orders or subscriptions. Failed deliveries retry at 30s, 2m, 10m, and 30m.
Headers sent by Ark8 Gateway:
x-ark8-signature: <lowercase_hmac_sha256_hex>
x-ark8-timestamp: <unix_epoch_seconds>
Payload:
{
"event": "payment.completed",
"sessionId": "sess_...",
"orderId": "ORD-10928",
"amount": 1250.00,
"currency": "BDT",
"provider": "bkash",
"trxId": "BKA9X23M12",
"senderNumber": "01712345678",
"completedAt": "2026-11-27T11:30:00.0000000Z"
}import crypto from 'crypto';
export function verifyArk8Webhook(rawBody: string, signatureHeader: string, secret: string): boolean {
const expected = crypto
.createHmac('sha256', secret)
.update(rawBody, 'utf8')
.digest('hex')
.toLowerCase();
const a = Buffer.from(expected, 'utf8');
const b = Buffer.from((signatureHeader || '').trim().toLowerCase(), 'utf8');
return a.length === b.length && crypto.timingSafeEqual(a, b);
}Send transactional OTP or notification SMS through your paired Android modem devices and inspect delivery logs or stats.
POST https://api.ark8.space/api/gateway/v1/sms/send
Headers:
Content-Type: application/json
x-api-key: ark8_gw_your_api_key
Body:
{
"recipient": "+8801712345678",
"message": "Your verification OTP is 482910",
"priority": 1,
"simSlot": 0
}
Logs & Stats:
GET https://api.ark8.space/api/gateway/v1/sms/logs (x-api-key)
GET https://api.ark8.space/api/gateway/v1/sms/stats (x-api-key)