Build on the Rapid API

API version: v1 · Last updated: 1 Nov 2026

Authenticate with OAuth 2.0, then retrieve account statements and balances as ISO 20022 XML, routed securely through Rapid Bridge.

Available APIs

Before you start

Three things to have in place before your first API call.

1Register your application

Register with Rapid to get your client_id, client_secret and, for client credentials, account_secret. You also register your redirect_uri at the same time. The Rapid team will guide you through registration.

2Set up Rapid Bridge

Run Rapid Bridge on your server. Balance and statement calls go through it.

Set up Rapid Bridge →
3Upload your public keys

Upload your public keys to the Rapid User Portal. This is part of the Bridge setup.

Keep secrets on your backendKeep client_secret and account_secret on your backend. Never put them in a browser or mobile app.

Base URLs

Two placeholders appear in every endpoint on this page.

{{rapid_server_url}}

Rapid's authorization server, for consent and token calls.

{{rapid_bridge_url}}

Your own Rapid Bridge, for balance and statement calls. Set up Rapid Bridge →

What are you building?

1
Get user consentDetails →
GET/api/v1/oauth/authorize
You send
client_id, redirect_uri, scope, state, PKCE code_challenge
You get
An authorization code, sent to your redirect_uri
2
Exchange the code for tokensDetails →
POST/api/v1/oauth/token
You send
code, client_secret, PKCE code_verifier
You get
access_token (under 1 min) and refresh_token (1 year or more)
3
Call a resource APIDetails →
POST/api/v1/resource/statement or /balance

Sent to your Rapid Bridge

You send
Authorization: Bearer … and a JSON body whose message field holds the camt.060 XML
You get
JSON whose message field holds the camt.053 statement or camt.052 balance XML
The access token expired?POST /api/v1/oauth/token with your refresh_token to get a new access token and refresh token. Refresh details

Compare the two approaches

Both end at the same resource APIs. The difference is how you get the access token.

PropertyAuthorization codeClient credentials
Steps3: authorize, get token, call API2: get token, call API
Use caseUser-facing apps needing consentServer-to-server / M2M
User interactionRequiredNot required
Access tokenYes (under 1 min)Yes (under 1 min)
Refresh tokenYes (1 year or more)No
PKCERequired (S256 only)Not applicable
account_secretNot requiredRequired
offline scopeSupportedNot applicable

OAuth 2.0: Authorization code flow

Use this when users must approve accessYour app sends the user to a consent page, then exchanges the returned code for tokens. You need a redirect URI and PKCE. Add the offline scope if you want a refresh token.

Supported scopes

Pass scopes as a space-separated string in the scope parameter.

ScopeDescriptionFlow
statementRetrieve account statements (transaction history) for the authorized account.Authorization code, Client credentials
balanceRetrieve the current balance for the authorized account.Authorization code, Client credentials
offlineIssues a refresh token so you can get new access tokens without re-authenticating the user.Authorization code only
Separate scopes with spaces (%20 in the URL). Include offline to get a refresh token.
In the client credentials flow you don't pass scope. The token response's scope field shows what was granted.

Authorization consent endpoint

Starts the authorization process and redirects the user to a consent page.

GET{{rapid_server_url}}/api/v1/oauth/authorize
Query parameters
ParameterTypeDescription
client_idstringUnique identifier for the client application.
redirect_uristringMust exactly match the redirect_uri you registered.
response_typestringUse code for the authorization code flow.
scopestringSpace-separated permissions, for example statement balance offline.
statestringA cryptographically random string. Store it in the user’s session, and check that it matches before you use the returned code.
account_nostringAccount number whose resources are being accessed.
code_challengestringRequired. base64url(sha256(code_verifier)), without = padding.
code_challenge_methodstringRequired. Must be S256.

Create a new PKCE pair for every consent request. Keep code_verifier on your backend and send only code_challenge in the consent URL. The consent URL is shown on several lines for readability. Send it as one URL.

Response

Returns a 303 redirect to the consent page. On grant, code and state are appended to redirect_uri. On denial, error and error_description are appended.

Token generation (authorization code)

Exchanges an authorization code for an access token and refresh token.

POST{{rapid_server_url}}/api/v1/oauth/tokenapplication/x-www-form-urlencoded
Request body
ParameterTypeDescription
codetextAuthorization code from the authorization server.
grant_typetextMust be authorization_code.
redirect_uritextMust match the URI used during authorization.
client_idtextUnique identifier for the client application.
client_secrettextSecret key for the client application.
code_verifiertextThe original random string (43–128 characters) you created the code_challenge from.
Response fields
FieldDescription
access_tokenToken for authenticating API requests. Short-lived (under 1 minute).
expires_inValidity in seconds.
refresh_tokenLong-lived token (1 year or more) for obtaining new access tokens.
scopeScope of access granted.
token_typeBearer

Token calls follow the token rules: each call invalidates earlier tokens, so store the new tokens right away.

Token generation via refresh token

Gets a new access token without re-authenticating the user.

POST{{rapid_server_url}}/api/v1/oauth/tokenapplication/x-www-form-urlencoded
Request body
ParameterTypeDescription
grant_typestringMust be refresh_token.
client_idstringUnique identifier for the client application.
client_secretstringSecret key for the client application.
refresh_tokenstringRefresh token from a previous token call.

Each refresh returns a new refresh_token and invalidates the previous one. See the token rules.

Token rules (authorization code flow)
  • Access tokens last under a minute. Use your refresh token to get a new access token before each API call.
  • Each call to the token endpoint, for a code or a refresh, immediately invalidates all tokens issued before it.
  • Each refresh returns a new refresh_token and invalidates the previous one. Save the new one right away.
  • Make token calls one at a time. Two parallel calls invalidate each other’s tokens.
  • If you lose the latest refresh token, the user has to go through consent again.

Resources

Both paths end here. Call these APIs with the access token you got from either path, and send the headers below. Bodies are JSON. The message field holds the ISO 20022 XML as a string.

Required headers
HeaderTypeDescription
AuthorizationstringBearer <access_token>. The Bridge forwards it to Rapid.
X-Source-SlugstringYour application slug. It must match the slug you set up with init app. How to set it up →
X-Destination-SlugstringThe bank’s slug. It must match the slug you set up with init bank. How to set it up →
X-Key-VersionstringYour key version, created by init app. Where to find it →
Content-Typestringapplication/json

Request fields

Paths are relative to Document/AcctRptgReq/. Every field listed is required for the endpoints that use it.

FieldXML pathBalanceStatementDescription
MsgIdGrpHdr/MsgId✓✓Unique sender-assigned message ID
CreDtTmGrpHdr/CreDtTm✓✓UTC creation timestamp (ISO 8601)
ReqdMsgNmIdRptgReq/ReqdMsgNmIdcamt.052.001.12camt.053.001.12Must be the value shown for the endpoint
AcctIdRptgReq/Acct/Id/Othr/Id✓✓Target account number
SchmeNmRptgReq/Acct/Id/Othr/SchmeNm/CdBBANBBANMust be BBAN
AcctOwnrRptgReq/AcctOwnr/Pty/Nm✓✓Account owner name
FrDtRptgReq/RptgPrd/FrToDt/FrDt✓Period start date, YYYY-MM-DD
ToDtRptgReq/RptgPrd/FrToDt/ToDt✓Period end date, YYYY-MM-DD
TpRptgReq/RptgPrd/Tp✓Use CHNG for new or changed entries only
LimitSplmtryData/Envlp/PaginationData/Limit✓Max results per page
PageSplmtryData/Envlp/PaginationData/Page✓Page number, starting at 1

Account statement request

Generates account statements for a date range. Request: camt.060.001.07. Response: camt.053.001.12.

POST{{rapid_bridge_url}}/api/v1/resource/statementapplication/json
Request body

The body is JSON with one field, message. Its value is the ISO 20022 XML as a single string, with every " inside the XML escaped as \".

{"message": "<camt.060 XML as a string>"}

See Request fields for where each value goes in the XML.

Response

The response is JSON in the same shape. message holds the response XML.

Response fields
Show all response fields
FieldDescription
MsgId, CreDtTmBank-assigned message ID and creation timestamp (GrpHdr).
PgNb, LastPgIndCurrent page number; true if this is the last page.
Stmt/IdUnique statement identifier.
FrDtTm, ToDtTmStatement period start and end.
AcctAccount number (Id/Othr/Id), currency (Ccy, e.g. NPR) and owner name (Ownr/Nm).
BalType OPBD (opening booked) or ITBD (interim booked), amount, CdtDbtInd and date.
Ntry/NtryRefUnique transaction reference.
Ntry/AmtTransaction amount (5-decimal precision), with CRDT or DBIT.
Sts/CdBOOK means fully posted to the ledger.
BookgDt, ValDtPosting date/time and effective date for interest calculation.
AcctSvcrRefBank internal transaction ID.
AvlbtyDate funds become available and the amount tracked for availability.
TxDtls/Refs/TxIdSub-transaction identifier.
SplmtryDataCategory (PlcAndNm, e.g. “Particular 1”) and description (Envlp/Item).
AddtlNtryInfHuman-readable transaction description.
  • Bal with OPBD is the opening booked balance and ITBD is the interim booked balance.
  • In each Ntry, CdtDbtInd is CRDT for a credit and DBIT for a debit.
  • Paging: request Page = 2, 3, … until GrpHdr/MsgPgntn/LastPgInd is true. Use a new MsgId for each request.
Response timestamps carry a time zone, for example 2026-10-27T12:52:38.863565447+05:45. Some date-only values carry one too, for example 2026-01-01Z or 2026-01-01+05:45. Use a parser that accepts both.

Account balance request

Retrieves the current balance. Request: camt.060.001.07. Response: camt.052.001.12.

POST{{rapid_bridge_url}}/api/v1/resource/balanceapplication/json

Uses the same required headers as the statement API.

Request body

The body is JSON with one field, message. Its value is the ISO 20022 XML as a single string, with every " inside the XML escaped as \".

{"message": "<camt.060 XML as a string>"}

See Request fields for where each value goes in the XML.

Response

The response is JSON in the same shape. message holds the response XML.

Response fields
FieldDescription
MsgId, CreDtTmBank-assigned message ID and creation timestamp.
Rpt/IdUnique report identifier.
Rpt/AcctAccount number, currency (e.g. NPR) and owner name.
Bal/TpITAV (interim available) or ITBD (interim booked). The response has both.
Bal/Amt, CdtDbtIndCurrent balance; CRDT positive, DBIT overdrawn.
Bal/Dt/DtTmBalance date and timestamp.

The response has two balances: ITAV (interim available) and ITBD (interim booked). Find each balance by its Cd value, not by its position.

Response timestamps carry a time zone, for example 2026-10-27T12:52:38.863565447+05:45. Some date-only values carry one too, for example 2026-01-01Z or 2026-01-01+05:45. Use a parser that accepts both.
Explore the new era of Smarter Banking API solution

Whether you're a Bank or App platform, our API banking solution is designed to meet your needs. Start today by scheduling a demo.

Request Demo