A REST API is an API that follows REST (Representational State Transfer), the architectural style Roy Fielding defined in his 2000 doctoral dissertation at UC Irvine: five required constraints (client-server, stateless, cache, uniform interface, layered system) plus one optional one, code-on-demand. Over HTTP, that means every resource has a URI, operations use the standard HTTP methods, and each request carries everything the server needs to process it, with no reliance on session context stored on the server.

For Indonesian banks, insurers and multifinance companies, REST isn't a design choice any more. Bank Indonesia's PADG No. 23/15/PADG/2021 (issued 16 August 2021), Article 5(2), names the SNAP Developer Site as the place where the national open-API payment standard's technical specifications are published. The Security page on that site, run by the payment-system association ASPI, states it in Indonesian: "Tipe arsitektur yang digunakan adalah Representational State Transfer (REST) API" (the architecture type used is REST API). What's left for the buying committee to decide is the contract: seven clauses that should be in writing before any partner, channel or SNAP counterparty is allowed to call the API.

Two corrections before the contract. REST doesn't require JSON; SNAP chose JSON in UTF-8. And REST is neither a protocol nor an API. It's a set of constraints, and constraints don't answer the question an auditor asks: if this transfer is sent twice, who absorbs the difference?

This piece is written for the CTO and the integration architect, with the CISO reading over their shoulder. It also suits a regional engineering team in Singapore or Kuala Lumpur building a service that will call, or be called by, an OJK-supervised entity in Jakarta.

Seven REST API contract clauses for financial institutions

Each clause below is a decision the committee owns, not an implementation detail to leave to the vendor. The sources are texts we retrieved from their publishers on 27 November 2026: the IETF, ASPI as SNAP's operator, Bank Indonesia and OJK. The Indonesian regulations are published in Indonesian only; where we quote them, the original comes first and our rendering follows.

1. Idempotency: idempotent methods don't protect a POST transfer

RFC 9110 (HTTP Semantics, June 2022) §9.2.2 defines PUT, DELETE and the safe methods (GET, HEAD) as idempotent. POST and PATCH aren't. The same RFC says a client "SHOULD NOT automatically retry" a request with a non-idempotent method unless it has some means of knowing the request semantics are in fact idempotent. A credit transfer is a POST. So idempotency here is a property of the operation, and only a key can guarantee it.

Two keys matter. draft-ietf-httpapi-idempotency-key-header-09 defines the Idempotency-Key header. It's still an Internet-Draft of the IETF httpapi working group: version -09 is dated 21 November 2026 and expires 25 May 2027. It isn't an RFC, and a contract that calls it "the IETF standard" is wrong. SNAP uses X-EXTERNAL-ID, a mandatory String (36) header that ASPI's text says must be "unique in the same day".

SituationIETF draft -09SNAP (ASPI)
Key not sent400400-xx-02 Invalid Mandatory Field
Key reused, different payload422404-xx-18 Inconsistent Request
Key reused on the same dayNot addressed separately409-xx-00 Conflict
Original request still processing409202-xx-00 Request In Progress
Transaction already succeededReturn the first response409-xx-01 Duplicate partnerReferenceNo
Key lifetimeSet and published by the resource"the same day"

Nobody writes down two things in that table. First, the same status code means different things: 409 in the IETF draft means "wait, still processing"; in SNAP it means "this key is already used". A client written to one convention will misread the other. Second, "the same day" is undefined. SNAP's X-TIMESTAMP is "Client's current local time" in yyyy-MM-ddTHH:mm:ssTZD format, and the text we read doesn't say whose time zone decides when the day turns over. A retry sent at 23:59:58 WIB (UTC+7) that arrives at 00:00:03 can be accepted as a new transaction. It gets worse across a border: a partner in Singapore stamps +08:00, so its day ends an hour before the Jakarta bank's. Write the time zone into the contract, and write that the receiver must check partnerReferenceNo across days.

How X-EXTERNAL-ID formats differ between providers, and how to read the two 409 codes as a pair, is covered in our piece on host-to-host versus API integration with Indonesian banks.

2. Request signatures and timestamps

A bearer token proves who is calling. It doesn't prove the message wasn't altered. For that the message has to be signed, and SNAP describes its X-SIGNATURE header as "Non-Repudiation & Integrity checking".

  • B2B access-token requests (Service Code 73) must carry X-TIMESTAMP, X-CLIENT-KEY and an X-SIGNATURE computed with SHA256withRSA over client_ID + "|" + X-TIMESTAMP. The token is valid for 900 seconds.
  • Transaction requests have two signature types. Type 1, the default, is HMAC_SHA512 with the client secret over the HTTP method, the endpoint, the access token, a SHA-256 hash of the minified body, and the timestamp. Type 2 is an asymmetric signature with no token.

One finding for integration teams: the type 2 formula on ASPI's page is printed as SHA256withRSA (clientSecret, stringToSign). RSA signs with a private key, not a client secret, so we read that as a typo. That's our inference, not ASPI's statement. Ask the counterparty to state in writing which key they verify against.

Outside SNAP, the general standard is RFC 9421 (HTTP Message Signatures, February 2024). The SNAP text we read doesn't reference it. The SNAP signature evidence an auditor asks for is in our article on SNAP BI open API compliance under PADG 23/15/2021. One thing we didn't find on that Security page is the maximum X-TIMESTAMP skew the receiver should accept. Put the figure in seconds in the contract. Without one, a replayed old request has no written reason to be rejected.

3. Versioning

SNAP standardises the path /[domain]/[version]/[service-group]/[product-type], with versions in the form v[major-version].[minor-version]. The contract should list which changes bump the major number: removing a field, changing a field's type or length, changing what a response code means. To signal that a version is being retired, RFC 8594 (May 2019, Informational) defines the Sunset header. Deprecation windows and the API owner catalogue are covered in our piece on what an API is to a bank, and how to inventory and own it; how contract changes ship with approval evidence is in CI/CD release approvals under OJK rules.

4. An error model the reconciliation team can use

SNAP doesn't use the RFC 9457 format (Problem Details for HTTP APIs, July 2023). It uses a seven-character responseCode, made of HTTP status + service code + case code, and a responseMessage of up to 150 characters. ASPI's example is 2007300: HTTP 200, service 73 (B2B access token), case 00. That's enough for a machine. What's missing is an action table: what the caller must do for each code.

SNAP response codeWording in ASPI's textCaller's action
202-xx-00Transaction still on processQuery status; don't resend
409-xx-01Transaction has previously been processedRecord success; don't resend
404-xx-18Inconsistent RequestDebit: failed. Credit: succeeded
500-xx-01Please retry the process againRetry; the key rule must be written
504-xx-00timeout from the issuerOutcome unknown; query status first
403-xx-03Suspected FraudStop; escalate to fraud

The 404-xx-18 row is the one teams miss. ASPI's text says the code "can be considered as failed in transfer debit, but it should be considered as success in transfer credit". One code, two accounting treatments, depending on which way the money moves. A reconciliation job that treats every 4xx as a failure will reverse credit transfers that actually landed.

The 500-xx-01 row shows two clauses colliding. SNAP asks for a retry, but a retry with the same X-EXTERNAL-ID on the same day gets 409-xx-00, while a retry with a new ID risks booking the transaction twice if the first request was in fact processed. No developer page we read covers the worst case: the response is lost on the network after the debit has already happened. The contract has to pick one path and write it down. Ours: query status by partnerReferenceNo first, then retry.

5. Rate limits

RFC 6585 (April 2012) §4 defines 429 Too Many Requests, and the response "MAY include a Retry-After header". SNAP has two separate codes: 429-xx-00 "Maximum transaction limit exceeded", in the System category, and 403-xx-04 "Activity Count Limit Exceeded", in the Business category, a cap on transaction frequency. The first protects the server; the second is a fraud control. The SNAP text we read sets no limit figure at all. So the figures belong in the contract, per partner: requests per second, what happens in a burst, and whether Retry-After is sent. OWASP API Security Top 10 2023, API4 lists rate limiting as a prevention for unrestricted resource consumption. That's industry guidance, not regulation.

6. Transport and authorisation: mTLS and OAuth 2.0 client credentials

SNAP requires TLS 1.3. The TLS 1.2 fallback, limited to four GCM cipher suites, applied only "sampai dengan tanggal 30 Juni 2026" (until 30 June 2026), so as of today that window is closed. Authorisation is "OAuth 2.0 sesuai RFC6749" with "Bearer token sesuai RFC6750" (per RFC 6749 and RFC 6750). The B2B grant is client_credentials, which RFC 6749 §4.4 reserves for a client requesting access to protected resources under its own control. SNAP also lists IP whitelisting, a firewall and a web application firewall.

What isn't in the SNAP text: mutual TLS. We searched the Security page for mutual, mTLS, client certificate and X.509 and found none of them. So mTLS is the committee's decision, not a SNAP obligation. If you choose it, RFC 8705 (February 2020) binds the access token to the client certificate, so a leaked token can't be used from another machine. An API key on its own, with no signature and no certificate binding, only proves that someone holds the string.

7. An audit log that can reconstruct who called what

The audit-trail obligation over all IT activity, Article 54(2) of POJK No. 11/POJK.03/2022 (issued 6 July 2022) for commercial banks, is covered in the CI/CD article above. For APIs, the more specific text is POJK No. 4/POJK.05/2021 (issued 9 March 2021), which covers non-bank financial institutions (LJKNB), insurers and multifinance companies among them. Article 29(2) lists the principles "tidak dapat diingkari" (non-repudiation, letter e) and "pemeliharaan jejak audit" (maintaining an audit trail, letter h). The elucidation of letter h reads:

LJKNB memastikan ketersediaan dan pemeliharaan log transaksi sesuai dengan kebijakan retensi data dan ketentuan peraturan perundang-undangan, agar terdapat jejak audit yang jelas untuk membantu pembuktian, penyelesaian perselisihan, dan pendeteksian usaha penyusupan pada Sistem Elektronik.

In our rendering: the institution keeps transaction logs available and maintained in line with its data-retention policy and the law, so that there is a clear audit trail to support proof, dispute resolution and the detection of intrusion attempts on its electronic systems.

SNAP supplies the retention figure. The BCP table on its Security page reads "Retensi data & log : 10 tahun" (data and log retention: 10 years), alongside transaction-log backups and periodic audits by an independent auditor. Ten years of API logs is a storage cost that has to be in the budget from day one, not discovered in the second year.

Per call, the log should hold at least X-PARTNER-ID or the client key, CHANNEL-ID, X-EXTERNAL-ID, partnerReferenceNo, X-TIMESTAMP, the signature-verification result, and the responseCode returned. Access tokens and client secrets must never be logged. With those fields, a "we sent it, you say you never got it" dispute can be settled from both sides' logs.

REST API contract checklist for banks and non-bank institutions

This table condenses the seven clauses, with the evidence it's reasonable to ask a vendor or counterparty for before signing. POJK 11/POJK.03/2022 Article 30(4)(c) requires a bank to set data-security requirements "dalam perjanjian kerja sama" (in the cooperation agreement) with its IT service providers, and the elucidation names APIs as part of that scope. This table is what goes in that clause.

ClauseWhat breaks without itEvidence to request
IdempotencyA transfer booked twice after a retryKey lifetime, day-boundary time zone, a retry test
Signatures and timestampsA message altered or replayed with no traceAlgorithm, the key verified, maximum clock skew
VersioningA field change breaks partners without noticeBreaking-change definition, deprecation window
Error modelReconciliation reverses a transaction that succeededResponse-code table with actions
Rate limitsOne partner's burst takes down other channelsPer-partner figures, 429 behaviour, Retry-After
Transport and authorisationA leaked token used from another machineTLS version, OAuth 2.0 grant, mTLS decision
Audit logA dispute that can't be provedField list, 10-year retention, a sample log

What we've seen on financial-services projects

We built the investment platform for CGS International, with OCR-based KYC on a web form plus video-call verification, linking databases from banks, CGS-CIMB, KSEI (Indonesia's central securities depository) and DUKCAPIL (the civil registry used for identity checks). For MSIG, the online policy-sales platform links directly to core financial systems for policy sales and premium collection, with automated e-policy generation. In integrations like those, the hard question isn't "REST or not". It's what happens when one party stops answering, and clauses 1 and 4 above are the written answer.

What this means for the CTO and the CISO

A CTO who signs an API contract without these seven clauses is handing booking decisions to whoever writes the retry code. A CISO has three questions to ask today: how many seconds of timestamp skew are accepted, which key verifies the transaction signature, and whether mTLS is required for partners outside SNAP. If the answers aren't written down, the contract isn't finished. Our team builds integrations like these as part of cloud-native application development for banks, insurers and multifinance companies.