Authentication
The HimoSoft API uses HMAC-SHA256 signatures to authenticate merchant requests. Every incoming
request must present an X-HMAC-Signature
header generated from your secure key.
X-HMAC-Signature
HMAC-SHA256
# Python Example
import hmac, hashlib
timestamp = "1714764000"
body = '{"amount": "10.00"}'
secret = "himo_sk_..."
payload = timestamp + body
signature = hmac.new(
secret.encode(),
payload.encode(),
hashlib.sha256
).hexdigest()
/v1/payments/
Create a Payment
This endpoint creates a brand-new secure payment lifecycle token. The API returns a direct checkout_url for browser redirection where users
select card, mobile banking, or crypto.
{
"amount": "1500.00",
"currency": "BDT",
"order_id": "TRANS_001",
"callback_url": "https://yoursite.com/hook",
"idempotency_key": "unique_8822"
}
{
"id": "pay_9k2l1...",
"status": "pending",
"amount": "1500.00",
"checkout_url": "https://pay.devlab.himelrana.com/checkout/9k..."
}
Errors
HimoSoft uses standard HTTP status envelopes to represent authentication, processing, and transaction lifecycle errors.
{
"error": "invalid_signature",
"message": "HMAC validation failed. Check credentials."
}
Idempotency
Safely retry payment creation without executing transactions twice using secure transactional tokens.
Specify an `idempotency_key` string parameter when calling the checkout creator. If the node matches a previous key within 24 hours, it responds with the cached checkout URL.
Idempotency Retention SLA
Keys are fully unique across merchant IDs and automatically garbage collected after exactly 24 hours.
/v1/payments/{id}/
Retrieve a Payment
Returns the current transaction state from the database.
{
"id": "pay_9k2l1...",
"status": "completed",
"amount": "1500.00",
"currency": "BDT",
"created_at": "2026-05-03T19:30:00Z"
}
/v1/payments/{id}/verify/
Verify Status (DB-only)
Performs an instant database status retrieval. This endpoint serves as a highly optimized, rate-limit-free verification check specifically designed for instant merchant redirects.
{
"id": "pay_9k2l1...",
"status": "completed",
"external_id": "ch_3O2...",
"verification_time": "2026-05-04T01:40:00Z"
}
/v1/payments/{id}/recheck/
Live Recheck (Gateway query)
Forces a live, direct request from the gateway to the active provider node (Stripe, BKash, etc.) to query real-time gateway records and reconcile any offline state changes. Recommended for asynchronous webhooks and customer retry flows.
{
"id": "pay_9k2l1...",
"status": "completed",
"reconciled": true,
"external_id": "tr_bkash_9281...",
"recheck_time": "2026-05-18T10:46:00Z"
}