Skip to main content
Some endpoints require a request signature for authentication, sent as the X-Signature header. There are two different signature schemes, used in two different situations. Both use HMAC-SHA512, but the string being signed is different — read the section relevant to the endpoint you’re calling.
This page covers signatures you generate for outbound requests to the SingaPay API. To validate signatures SingaPay sends you on inbound webhook callbacks, see Security and Signature Validation.

1. Access Token Signature

Used only when calling POST /api/v1.1/access-token/b2b to obtain a Bearer token.

Formula

YYYYMMDD is the current server date (UTC+7 / Asia/Jakarta), e.g. 20260727. The signature is only valid for that calendar day.

Required headers

Request body

Examples

Use the returned access_token as Authorization: Bearer <access_token> on subsequent requests.

2. Request Signature

Used for money-out endpoints that require per-request signing, e.g.:
  • POST /api/v2.0/disbursement/transfer
  • POST /api/v2.0/ewallet/trigger-topup
  • Account Transfer endpoints
1

Normalize the request body

Sort all object keys recursively and alphabetically.
2

Hash the normalized body

Hash the normalized JSON with SHA-256 to get hashed_body (hex digest).
3

Build the string to sign

4

Sign it

Where:
  • METHOD — HTTP method in uppercase, e.g. POST.
  • ENDPOINT — the request path including query string, e.g. /api/v2.0/disbursement/transfer. Do not include the domain.
  • ACCESS_TOKEN — the Bearer token obtained from the access-token endpoint (without the Bearer prefix).
  • TIMESTAMP — current Unix timestamp in seconds (not milliseconds), sent as a string.

Required headers

Regenerate the signature for every request — the timestamp and body are always part of the signed string, so a signature cannot be reused across requests or replayed after it expires.

Examples


Common mistakes

  • Never log or expose your client_secret in client-side code, logs, or version control.
  • Always use HTTPS.
  • Generate the signature immediately before sending the request — don’t reuse an old signature/timestamp pair.