Skip to Content
KingsPay Docs

Native API vs SNAP

Understand the two API surfaces KingsPay exposes, how they differ, and which one to integrate against.

KingsPay exposes two separate API surfaces. They reach the same underlying platform: the same accounts, balances, and money movement. But they are different products from an integration standpoint, with different credentials, different request shapes, and different error models.

Native APISNAP API
What it isOur own API, designed around how we think payments should be integrated.Our implementation of Standar Nasional Open API Pembayaran, the open API standard set by Bank Indonesia and ASPI (Asosiasi Sistem Pembayaran Indonesia).
Who it's forMost integrations. Anyone who just wants to accept and send money.Integrations required to speak SNAP by regulation, by a partner, or by an existing internal standard.
ShapeDefined by us; we can evolve it.Defined by ASPI; we cannot change it.
CredentialsAs many API keys as you need, each independently scoped and revocable.One integration per account: a single client ID, client secret, and RSA keypair.
Where to startGetting StartedSNAP API

Which one should I use?

Use the Native API unless something forces you onto SNAP. It is less work to integrate, has fewer moving parts in authentication, and gives you features the standard has no vocabulary for.

Reach for SNAP when:

  • You are a regulated entity with a mandate to consume SNAP-compliant APIs.
  • You already have a SNAP client implementation built for another provider and want to reuse it.
  • A partner or internal platform standard requires the SNAP contract.

Being on one surface does not lock you out of the other. Both operate on the same account and the same balances. See Can I use both? below.

Authentication

This is the largest difference, and the one that determines most of your implementation effort.

Native API: scoped API keys

A single secret API key, created in the Dashboard, sent as a bearer token on every request:

curl -X POST "https://api.kingsplatform.net/api/api/v1/payments/charges" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

That's the whole scheme. You can create as many keys as you need, each with its own permissions and optional IP restrictions, so your checkout integration, your payout service, and a read-only reconciliation job can each hold a separate credential that is scoped to what it actually does and revocable on its own. See Authentication.

SNAP: three credentials and two steps

SNAP requires a client ID, a client secret, and an RSA keypair, used in two different steps:

  1. Get a token. Sign clientId|timestamp with your RSA private key and call POST /v1.0/access-token/b2b. You get back a bearer token valid for 900 seconds.
  2. Sign the request. On a symmetric endpoint, compute an HMAC-SHA512 signature over a stringToSign built from the HTTP method, path, access token, a SHA-256 hash of the exact request body bytes, and a timestamp, keyed with your client secret. Send it as X-SIGNATURE alongside the bearer token. Asymmetric endpoints are signed with your RSA private key instead and take no token.

On symmetric endpoints the two work together: the token proves we recently authorized you and that the authorization hasn't expired, while the signature proves you hold the client secret and binds the method, path, token, body, and timestamp together, so a stolen token alone is not enough to forge a request.

Practical consequences:

  • There is one SNAP integration per account, so every system that calls SNAP shares the same client ID, client secret, and RSA keypair. You cannot scope one caller more narrowly than another, and rotating the credentials affects all of them at once.
  • You must implement both profiles, and pick per endpoint according to its spec.
  • You must manage token lifecycle (fetch, cache, refresh before the 900s expiry).
  • You must hash the exact bytes you send. Whitespace, key order, escaping, and numeric formatting all change the hash. Serialize once, hash those bytes, send those bytes.
  • Private keys and client secrets must stay server-side. No browser, no mobile app.

See SNAP Authentication.

Request and response shape

Native API

Resource-oriented, snake_case, with HTTP status codes carrying the outcome:

{
  "status": "error",
  "error": {
    "type": "conflict_error",
    "code": "request_in_progress",
    "message": "A request with this idempotency key is already in progress.",
    "field": null
  }
}

Paths are ours (/api/v1/payments/charges), field names are ours, and you get conveniences like client_reference_id echoed back on every response and event so reconciliation against your own order IDs is trivial.

SNAP

camelCase, with ASPI-mandated paths (/v1.0/transfer-va/create-va) and ASPI-mandated field names (partnerReferenceNo, merchantId). Outcomes are carried in the body as a responseCode / responseMessage pair rather than by HTTP status alone.

Because the standard fixes the contract, two things follow. The same concept has a different name on each surface. Your own order reference is client_reference_id natively and partnerReferenceNo under SNAP, so don't expect field names to carry across. And where our native responses include convenience data, SNAP has no field to put it in; you may need an extra lookup or your own bookkeeping to get the equivalent.

The upside is portability: a SNAP client written against another provider is mostly reusable against us. See Response Codes.

Receiving updates

Both surfaces push asynchronous updates to you, but the delivery contract is different.

Native API: events

You register a webhook destination and receive a uniform event envelope:

{
  "event_type": "payment_charge.succeeded",
  "account_id": "0199c215-92ee-73f0-988a-9f243a90046a",
  "date_occurred": "2026-03-08T12:34:21.5212076Z",
  "data": { }
}

Authenticity is verified from two headers: mataqa-timestamp and mataqa-signature, an HMAC-SHA256 over {timestamp}.{raw_body} computed with your webhook secret. One secret, one formula, every event type. See Event Structure.

SNAP: notifications

SNAP notifications are themselves SNAP requests, signed with a SNAP signature profile. Two consequences:

  • The credentials reverse direction. For us to call your notification endpoint, you issue us a client ID and client secret, and we sign with those. The credentials you use to call us are not the credentials we use to call you.
  • The signature profile is per endpoint, not per integration. SNAP defines two B2B profiles: symmetric (bearer token + HMAC-SHA512) and asymmetric (RSA-SHA256, no token). Which one applies is dictated by the endpoint you are calling. Obtaining an access token is always asymmetric, for example, while service requests are typically symmetric. Both sides implement both, and neither falls back between them: a signature that fails is a failed request, not a prompt to retry with the other profile.

See Receiving Notifications and SNAP Authentication.

Can I use both?

Yes. The two surfaces sit on the same account, so balances, transactions, and reporting are shared regardless of which API created a given payment. The Dashboard shows everything in one place.

What does not carry across:

  • Credentials. API keys do not work on SNAP endpoints, and SNAP credentials do not work on native endpoints.
  • Update delivery. Native events and SNAP notifications are configured separately and delivered separately.
  • Identifiers. A charge created via the Native API is not addressable by SNAP identifiers, and vice versa. Reconcile on your own reference ID.

Running both is a reasonable choice if you have a SNAP-mandated partner integration but want the Native API for everything else. It is not a reason to run both by default. Pick one per integration.

Next steps

On this page