🔐 Checksum Authentication Guide
To ensure data integrity and authenticity, Facilero uses a checksum mechanism based on HMAC-SHA256 with your merchantSecret.
✅ When to Use the Checksum
| Direction | Location | Fields Used for Checksum | |||
|---|---|---|---|---|---|
| Request → API | Body field | accountId | amount | currency | requestId` |
| Callback → You | Header (X-Checksum) | accountId | amount | currency | transactionId` |
How to Generate the Checksum
➤ In Requests (from Merchant to Facilero)
Use the following fields in this exact order as strings:
accountId | amount | currency | requestId
➤ In Callbacks (from Facilero to Merchant)
Use the following fields in this exact order as strings:
accountId | amount | currency | transactionId
In both cases:
- Use
|(pipe) as a delimiter - Sign with
HMAC-SHA256using yourmerchantSecret - Base64-encode the result
Example: Request
Data:
accountId: merchant_001
amount: 10.55
currency: USD
requestId: req-789123
Checksum string:
merchant_001|10.55|USD|req-789123
Send in body:
{
"accountId": "merchant_001",
"amount": "10.55",
"currency": "USD",
"requestId": "req-789123",
"checksum": "<Base64EncodedChecksum>"
}Example: Callback
Data:
accountId: merchant_001
amount: 10.0
currency: USD
transactionId: tx-456789
Checksum string:
merchant_001|10.0|USD|tx-456789
Sent as header:
X-Checksum: <Base64EncodedChecksum>
❗ Validation Rules
- Requests without a valid
checksum→ ❌ Rejected with400 BadRequest - Callbacks with invalid
X-Checksum→ ❌ Should be ignored by your system
Important – Amount Type and Checksum ValidationThe
amountfield uses different numeric representations depending on the message direction:
- Requests:
amountis sent as a string (e.g."200.00")- Callbacks:
amountis returned as a numeric value (e.g.200.0)Facilero processes amounts using native numeric types. As a result, decimal formatting (such as trailing zeros) is not preserved in callbacks.
Example:
- Request:
"200.00"- Callback:
200.0When validating or generating a callback checksum, always use the exact
amountvalue received in the callback payload.Do not reuse or reformat the original request amount, as this may cause checksum mismatches.

