| Status | Draft. |
| Version | 0.1.0, 2026-11-28 |
| Profile of | None: an OCI protocol |
| Depends on | OCI-0 Core, OCI-1 Trust Registry, OCI-2 ID Auth, OCI-PAY-1 Payment Addressing, OCI-PAY-2 Payments Switch |
| Used by | OCI-PAY-4 Switch Link |
| Reference implementation | wren-api (a payment app), ocipay-api (the switch’s provider endpoints), ocipay-bank-api (bank connect) |
1. Purpose
OCI-PAY-3 says how a payment app works with OCI-Pay. A payment app (a provider) gives people payment addresses under its own handle (asha@wren), points each address at a bank account the person connected, and asks a payments switch to move money. Wren and Finch are payment apps run by their own companies. SBI Pay is a bank’s own app.
A provider never holds money, never sees a PIN, and never talks to a bank. It talks to one switch: its home switch. Money always moves from bank to bank.
OCI-PAY-3 covers what the provider sends and what it must answer:
- the provider’s entry in the trust registry, and what a bank’s own app changes (§3, §15);
- which switch it calls and which switch may call it (§4, §6);
- bank connect, balance, payments, requests for money and reading payments (§8 to §13);
- the endpoints a provider serves for its switch (§14);
- how people sign in, and how a bank uses that sign-in to find their accounts (§7).
OCI-PAY-3 does not define address syntax or handle ownership (OCI-PAY-1), the signature on each call, idempotency, the bank-facing API, the payment state machine or settlement (OCI-PAY-2), or the calls between two switches (OCI-PAY-4). It does not define the API between a provider’s own server and its own phone or web app.
2. Terms and roles
| Term | Meaning |
|---|---|
| Provider | A payment app registered in the trust registry with kind provider. It issues addresses under its handle and keeps the directory address → connected account. |
| Bank’s own app | A provider that acts for one bank (acts_for). It issues no addresses; it works on the addresses the bank issued (§15). |
| Home switch | The one switch a provider is registered with: the switch whose country equals the provider’s country in the registry. |
| Account’s switch | The switch of the country the connected account’s bank is in. It keeps every payment, request and connect for that account. |
| Account reference | An opaque string a bank gives one provider for one account at connect. The provider knows the account only by it. |
| Offer id | A short-lived id a bank gives for one account in a connect list. The provider sends it back to pick that account. |
| PIN message | The person’s PIN, encrypted on their device to the bank’s PIN key as a compact JWE. |
| Relay | A call the home switch passes to the other country’s switch for the provider (§6). |
Participant ids in examples follow the registry: provider:wren, bank:sbi, switch:IN.
3. The registry entry
- PSP-3.1 A provider MUST be registered in the trust registry (OCI-1) with
kindprovider, anid, adisplay_name, abase_url, ajwks_url, astatusand acountry. - PSP-3.2
countryis the provider’s home: the switch it is registered with. A provider with nocountryMUST NOT be registered. A switch MUST treat a provider entry with nocountryas having no home switch, and refuse it. - PSP-3.3 A provider that is not a bank’s own app MUST carry an
address_suffix: its handle. The handle MUST belong to no other participant (OCI-PAY-1). A registry MUST NOT register a provider whose handle is already taken. - PSP-3.4 A bank’s own app MUST carry
acts_forset to the bank’s participant id and MUST NOT carry anaddress_suffix. ItscountryMUST equal the bank’scountry. §15 says what this changes. - PSP-3.5
jwks_urlMUST serve the public keys the provider signs with. The reference serves them at<base_url>/.well-known/jwks.json. - PSP-3.6
base_urlis where switches reach the provider. A provider checks thehtuof every signature against its ownbase_url(PSP-14.3), so the two MUST be the same string. - PSP-3.7 Only a provider whose
statusisactivemay call a switch or be called by one.
4. The home switch
- PSP-4.1 A provider MUST send every call to its home switch, and to no other switch.
- PSP-4.2 A provider MUST find its home switch from the registry: its own entry’s
country, then the participant ofkindswitchwith thatcountry. If either is missing it MUST NOT call any switch. - PSP-4.3 A switch MUST accept a provider at its
/v1endpoints only when the provider’scountryequals the switch’s country. It MUST refuse every other provider with403 FORBIDDEN. - PSP-4.4 Each call belongs to the account’s switch: the switch of the country of the bank that holds the account the call is about. For a call about an account in the home country, the provider calls the home switch directly. For an account in the other country, it MUST send the call as a relay (§6).
- PSP-4.5 A switch that gets a call about an account at a bank of another country MUST refuse it with
422 WRONG_SWITCH. This applies to bank connect, balance, a payment’s payer bank, and the payee account of a request for money. - PSP-4.6 A switch MUST reach a provider only through the provider’s home switch. When the provider’s home is another country, the switch sends the call over the link (OCI-PAY-4). The provider therefore only ever hears from its home switch (PSP-14.2).
5. Calling the switch
- PSP-5.1 Every call a provider makes MUST carry an OCI-Signature by the provider’s key, signed as OCI-PAY-2 §4 requires. The signature’s
issis the provider’s participant id. - PSP-5.2 A provider uses the same
/v1endpoints a bank uses (OCI-PAY-2), plus the provider-only endpoints of §8, §9 and §6. The switch tells a provider and a bank apart by the caller’skind. - PSP-5.3 A provider MUST send an
Idempotency-KeyonPOST /v1/paymentsandPOST /v1/collect-requests, as OCI-PAY-2 §5 requires. A switch refuses either without one (400 IDEMPOTENCY_KEY_REQUIRED). The key is OPTIONAL on quotes and on status changes. - PSP-5.4 A provider SHOULD choose the id of each payment and each request for money itself (a UUID in
id) and use that id as theIdempotency-Key. A repeat after a lost answer then reaches the same payment. - PSP-5.5 Bank connect and balance calls take no
Idempotency-Key. - PSP-5.6 When the switch passes on a bank’s refusal, it MUST pass on the bank’s own status and error code (for example
403 WRONG_PIN,403 PROVIDER_NOT_ALLOWED). When the bank does not answer, the switch MUST answer503 BANK_UNAVAILABLE. For a bank id that is not an active registered bank it MUST answer404 BANK_NOT_FOUND. - PSP-5.7 A provider MUST treat a
4xxanswer other than408,409and429as a definite refusal. It MUST treat a timeout, a transport error, a5xx,408,409or429as “not known yet”: the call may have taken effect.
6. Relay
The provider asks its home switch to pass a call to the other country’s switch. The other switch runs it as if the provider had called it there, and the answer comes back the same way. How the two switches do this is OCI-PAY-4.
-
PSP-6.1 A relay is
POST /v1/relayat the home switch, signed by the provider, with the body:Member Type Meaning countrytwo letters the account’s country: the switch to pass the call to methodGETorPOST, defaultPOSTthe method of the call as the provider would make it there pathstring, 4 to 200 characters the path of the call there, for example /v1/paymentsbodyobject or nullthe body the call would carry; nullfor aGET -
PSP-6.2 Only these calls may be relayed. A switch MUST refuse any other
methodandpathwith404 NOT_RELAYEDbefore anything leaves it:Method Path POST /v1/connect/accounts,/v1/connect/link,/v1/connect/unlinkPOST /v1/balancePOST /v1/lookup,/v1/quotes,/v1/paymentsPOST /v1/collect-requests,/v1/collect-requests/{id}/statusGET /v1/payments/{id} -
PSP-6.3 A provider MUST NOT relay a call whose
countryis its home country. The switch refuses it with422 NOT_RELAYED. -
PSP-6.4 Only a provider whose home is this switch may relay. A switch MUST refuse any other caller, banks included, with
403. -
PSP-6.5 When no switch is linked for
country, the home switch MUST answer404 NO_SWITCH. When the other switch does not answer, it MUST answer503 PEER_UNAVAILABLE. -
PSP-6.6 The home switch MUST return the other switch’s answer as that switch gave it: a success body unchanged, and an error with the other switch’s status and code.
-
PSP-6.7 The
Idempotency-KeyonPOST /v1/relaytravels with the call. A provider MUST put on the relay the key it would have put on the call itself (PSP-5.3). -
PSP-6.8 A relayed
GETis sent asPOST /v1/relaywithmethodGETandbodynull. The provider signs the relay POST, not the GET. -
PSP-6.9 A relay changes nothing about where the work is kept. The payment, the request for money and the bank connect are kept by the account’s switch.
POST /v1/relay Pass a call to the other country's switch · served by the switch
The home switch passes the app's call to the switch of the account's country and returns that switch's answer unchanged. Called by a payment app registered with this switch. Defined in PSP-6.1, PSP-6.2, PSP-6.3, PSP-6.4, PSP-6.5, PSP-6.6, PSP-6.7, PSP-6.8.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
country | string | yes | The account's country, two letters: the switch to pass the call to. Never the home country. (pattern ^[A-Za-z]{2}$) | PSP-6.3 |
method | "GET" | "POST" | The method of the call as the app would make it there. | PSP-6.8 | |
path | string | yes | The path of the call there, such as /v1/payments; only the paths PSP-6.2 lists. (at most 200 characters; at least 4) | PSP-6.2 |
body | object, null | The body the call would carry; null for a GET. | PSP-6.8 |
| Response | Type | Required | Meaning | Clause |
|---|
Errors
7. Sign-in and identity
People sign in to a provider at an OCI-ID: in the reference, the provider’s own OCI-ID (OCI-2). A bank uses that same sign-in to find the person’s accounts.
- PSP-7.1 A provider MUST authenticate each person by an OCI-ID access token from an issuer it accepts. In the reference it MUST check: the token is a JWS signed
ES256, its headertypisat+jwt,issis one of the provider’s accepted issuers,client_idis one of the provider’s own client ids and is inaud,subis present andexphas not passed. - PSP-7.2 OCI-ID gives each client its own
subfor the same person (AUTH-9.8). A provider that runs several apps (web, phone) SHOULD treat the same issuer and the same verified phone as one person, and record each(iss, sub)it has seen for that person. - PSP-7.3 For bank connect a provider MUST pass the signed-in person’s own current access token as
identity_token(§8). It MUST NOT pass a token of another person, a token it kept after the person’s session ended, or an ID token. - PSP-7.4 A bank MUST verify
identity_tokenbefore it lists anything: issuer, signature,typat+jwt,exp, andclient_idamong the client ids it accepts. It MUST refuse an issuer it does not accept with401. - PSP-7.5 A bank MUST find accounts only by the phone number the person’s identity vouches for. In the reference the bank asks the token’s issuer (
<iss>/userinfo, with the token) forphone_number. With no phone it MUST answer403 NO_VERIFIED_PHONE. - PSP-7.6 A bank accepts the sign-ins of its own OCI-ID, its country’s OCI-ID, and the OCI-ID of each registered payment app it chooses to trust. Which ones is the bank’s policy. Linking an account always needs that account’s PIN as well (PSP-8.9).
- PSP-7.7 A provider MUST show a refusal from a bank that does not accept the person’s sign-in as such. The reference turns the bank’s
401into403 IDENTITY_NOT_ACCEPTEDfor its own app.
8. Bank connect
Bank connect is how an address comes to point at an account. It runs provider → home switch → (link →) account’s switch → bank. The switch adds the provider’s id to each call, so the bank knows which provider asks.
8.1 List the accounts
-
PSP-8.1
POST /v1/connect/accountswith{ "bank": "<bank id>", "identity_token": "<access token>" }.identity_tokenis at most 8000 characters. -
PSP-8.2 The switch MUST pass to the bank
{ "provider": "<caller id>", "identity_token": ... }, signed by the switch. It MUST NOT keep the token. -
PSP-8.3 The bank answers:
Member Meaning bank,bank_name,countrywho answered accountsone entry per account the bank holds under the verified phone: id(an offer id),kind,masked(**** 1234),currency,holder_name,linked(whether this provider already has it)pin_keythe bank’s public PIN key, an EC P-256 JWK with algECDH-ESanduseenc -
PSP-8.4 The bank MUST NOT return a full account number. It MUST issue a new offer id per account per call, bind it to the calling provider, and let it expire. The reference keeps an offer for 10 minutes.
POST /v1/connect/accounts Find a person's accounts at a bank · served by the switch
The switch passes the person's sign-in to the bank, naming the app that asks, and returns the bank's answer. Called by a payment app, at its home switch or by relay. Defined in PSP-8.1, PSP-8.2, PSP-8.3, PSP-8.4, PSP-7.3, PSP-7.4, PSP-7.5.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
bank | string | yes | The bank's id in the trust registry, such as bank:sbi. (at most 100 characters) | PSP-8.1 |
identity_token | string | yes | The signed-in person's own current OCI-ID access token, at most 8000 characters. (at most 8000 characters) | PSP-7.3 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
bank | string | yes | The bank's id in the trust registry, such as bank:sbi. | |
bank_name | string | yes | The name of the bank that answered. | |
country | string | yes | The bank's country, an ISO 3166 two-letter code. (pattern ^[A-Z]{2}$) | |
accounts | array of object | yes | One entry per account the bank holds under the person's verified phone. | PSP-8.3 |
accounts[].id | string | yes | An offer id: new on every call, bound to the calling app, good for ten minutes. | PSP-8.4 |
accounts[].kind | string | yes | The kind of account, such as savings. | |
accounts[].masked | string | yes | The account number with all but the last four digits hidden, such as **** 1234. | PSP-8.4 |
accounts[].currency | string | yes | The account's currency, an ISO 4217 code. (pattern ^[A-Z]{3}$) | |
accounts[].holder_name | string | yes | The account holder's name. | |
accounts[].linked | boolean | yes | Whether this app already has this account connected. | |
pin_key | object | yes | The bank's public PIN key, an EC P-256 JWK. The person's device encrypts PIN messages to it. | PSP-8.3 |
pin_key.kty | "EC" | yes | Key type. | |
pin_key.crv | "P-256" | yes | Curve. | |
pin_key.x | string | yes | The key's x coordinate, base64url. | |
pin_key.y | string | yes | The key's y coordinate, base64url. | |
pin_key.kid | string | yes | The key's id; a PIN message names it. | |
pin_key.alg | "ECDH-ES" | yes | Key agreement algorithm. | |
pin_key.use | "enc" | yes | What the key is for. |
Errors
POST /switch/v1/connect/accounts Which accounts does this person hold? · served by a bank
The bank checks the token, asks its issuer for the person's verified phone, and lists the accounts under it as offer ids, never account numbers. Called by the switch of the bank's own country. Defined in PSP-8.1, PSP-8.2, PSP-8.3, PSP-8.4, PSP-7.3, PSP-7.4, PSP-7.5.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
provider | string | yes | The payment app's id in the trust registry, such as provider:wren. Filled in by the switch. (at most 100 characters) | PSP-8.2 |
identity_token | string | yes | The signed-in person's own current OCI-ID access token, at most 8000 characters. (at most 8000 characters) | PSP-7.3 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
bank | string | yes | The bank's id in the trust registry, such as bank:sbi. | |
bank_name | string | yes | The name of the bank that answered. | |
country | string | yes | The bank's country, an ISO 3166 two-letter code. (pattern ^[A-Z]{2}$) | |
accounts | array of object | yes | One entry per account the bank holds under the person's verified phone. | PSP-8.3 |
accounts[].id | string | yes | An offer id: new on every call, bound to the calling app, good for ten minutes. | PSP-8.4 |
accounts[].kind | string | yes | The kind of account, such as savings. | |
accounts[].masked | string | yes | The account number with all but the last four digits hidden, such as **** 1234. | PSP-8.4 |
accounts[].currency | string | yes | The account's currency, an ISO 4217 code. (pattern ^[A-Z]{3}$) | |
accounts[].holder_name | string | yes | The account holder's name. | |
accounts[].linked | boolean | yes | Whether this app already has this account connected. | |
pin_key | object | yes | The bank's public PIN key, an EC P-256 JWK. The person's device encrypts PIN messages to it. | PSP-8.3 |
pin_key.kty | "EC" | yes | Key type. | |
pin_key.crv | "P-256" | yes | Curve. | |
pin_key.x | string | yes | The key's x coordinate, base64url. | |
pin_key.y | string | yes | The key's y coordinate, base64url. | |
pin_key.kid | string | yes | The key's id; a PIN message names it. | |
pin_key.alg | "ECDH-ES" | yes | Key agreement algorithm. | |
pin_key.use | "enc" | yes | What the key is for. |
Errors
403 NO_VERIFIED_PHONE(PSP-7.5)
8.2 Link one account
-
PSP-8.5
POST /v1/connect/linkwith{ "bank": "<bank id>", "account_id": "<offer id>", "pin": "<PIN message>" }.pinis at most 4000 characters. -
PSP-8.6 The PIN message MUST be made on the person’s device, encrypted to the bank’s
pin_key: a compact JWE withalgECDH-ES,encA256GCMand the key’skid, over the JSON{ "pin": "<4 to 6 digits>", "nonce": "<1 to 128 characters, new each time>", "iat": <NumericDate> }. -
PSP-8.7 The provider MUST pass the PIN message unchanged. The switch MUST pass it unchanged. Neither can decrypt it.
-
PSP-8.8 The bank MUST refuse an offer id that is unknown, expired, or was given to another provider, with
404 ACCOUNT_OFFER_NOT_FOUND. -
PSP-8.9 The bank MUST decrypt the PIN message and check it before it links. It MUST refuse a message it cannot read (
400 PIN_INVALID), one whoseiatis more than 300 seconds from now (400 PIN_EXPIRED), and one whosenonceit has seen (400 PIN_REPLAYED). A wrong PIN is403 WRONG_PIN. Too many wrong PINs is423 PIN_LOCKED. -
PSP-8.10 On success the bank MUST record that this provider may use this account (the consent, §8.4), MUST end the offer, and answers:
Member Meaning bank,bank_name,countrywho answered accountthe account reference for this provider assurancehow well the bank knows the account holder (CORE-4) pin_keythe bank’s PIN key, for later PIN messages addressthe address the bank itself issued for the account ( asha@sbi)kind,masked,currency,holder_namethe account as shown to the person
POST /v1/connect/link Connect an account to the app · served by the switch
The bank checks the PIN message and returns an account reference only this app can use. Called by a payment app, at its home switch or by relay. Defined in PSP-8.5, PSP-8.6, PSP-8.7, PSP-8.8, PSP-8.9, PSP-8.10, PSP-8.13.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
bank | string | yes | The bank's id in the trust registry, such as bank:sbi. (at most 100 characters) | PSP-8.5 |
account_id | string | yes | One of the offer ids the bank answered with when asked for the person's accounts. | PSP-8.5 |
pin | string | yes | A PIN message: the person's PIN encrypted on their device to the bank's pin_key, as a compact JWE. Passed on unchanged. (at most 4000 characters) | PSP-8.6 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
bank | string | yes | The bank's id in the trust registry, such as bank:sbi. | |
bank_name | string | yes | The name of the bank that answered. | |
country | string | yes | The bank's country, an ISO 3166 two-letter code. (pattern ^[A-Z]{2}$) | |
account | string | yes | The account reference for this app. The app stores it and names the account by it alone. | PSP-8.11 |
assurance | "low" | "substantial" | "high" | yes | How well the bank knows the account holder (CORE-4). | PSP-8.10 |
pin_key | object | yes | The bank's PIN key. The app keeps it with the link for later PIN messages. | PSP-8.14 |
pin_key.kty | "EC" | yes | Key type. | |
pin_key.crv | "P-256" | yes | Curve. | |
pin_key.x | string | yes | The key's x coordinate, base64url. | |
pin_key.y | string | yes | The key's y coordinate, base64url. | |
pin_key.kid | string | yes | The key's id; a PIN message names it. | |
pin_key.alg | "ECDH-ES" | yes | Key agreement algorithm. | |
pin_key.use | "enc" | yes | What the key is for. | |
address | string, null | yes | The address the bank itself issued for the account, such as asha@sbi. A bank's own app uses it. | PSP-15.1 |
kind | string | yes | The kind of account, such as savings. | |
masked | string | yes | The account number with all but the last four digits hidden, such as **** 1234. | PSP-8.4 |
currency | string | yes | The account's currency, an ISO 4217 code. (pattern ^[A-Z]{3}$) | |
holder_name | string | yes | The account holder's name. |
Errors
POST /switch/v1/connect/link Allow a payment app on an account · served by a bank
The bank checks the PIN, records that the person allowed this app, ends the offer and returns the reference the app uses from then on. Called by the switch of the bank's own country. Defined in PSP-8.5, PSP-8.6, PSP-8.7, PSP-8.8, PSP-8.9, PSP-8.10, PSP-8.13.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
provider | string | yes | The payment app's id in the trust registry, such as provider:wren. Filled in by the switch. (at most 100 characters) | PSP-8.2 |
account_id | string | yes | One of the offer ids the bank answered with when asked for the person's accounts. | PSP-8.5 |
pin | string | yes | A PIN message: the person's PIN encrypted on their device to the bank's pin_key, as a compact JWE. Passed on unchanged. (at most 4000 characters) | PSP-8.6 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
bank | string | yes | The bank's id in the trust registry, such as bank:sbi. | |
bank_name | string | yes | The name of the bank that answered. | |
country | string | yes | The bank's country, an ISO 3166 two-letter code. (pattern ^[A-Z]{2}$) | |
account | string | yes | The account reference for this app. The app stores it and names the account by it alone. | PSP-8.11 |
assurance | "low" | "substantial" | "high" | yes | How well the bank knows the account holder (CORE-4). | PSP-8.10 |
pin_key | object | yes | The bank's PIN key. The app keeps it with the link for later PIN messages. | PSP-8.14 |
pin_key.kty | "EC" | yes | Key type. | |
pin_key.crv | "P-256" | yes | Curve. | |
pin_key.x | string | yes | The key's x coordinate, base64url. | |
pin_key.y | string | yes | The key's y coordinate, base64url. | |
pin_key.kid | string | yes | The key's id; a PIN message names it. | |
pin_key.alg | "ECDH-ES" | yes | Key agreement algorithm. | |
pin_key.use | "enc" | yes | What the key is for. | |
address | string, null | yes | The address the bank itself issued for the account, such as asha@sbi. A bank's own app uses it. | PSP-15.1 |
kind | string | yes | The kind of account, such as savings. | |
masked | string | yes | The account number with all but the last four digits hidden, such as **** 1234. | PSP-8.4 |
currency | string | yes | The account's currency, an ISO 4217 code. (pattern ^[A-Z]{3}$) | |
holder_name | string | yes | The account holder's name. |
Errors
8.3 The account reference
- PSP-8.11 The account reference is opaque. A provider MUST store it, MUST NOT try to read anything from it, and MUST use it as the only way it names the account to the switch.
- PSP-8.12 A bank MUST give a reference that works only for the provider it was given to. Every later use (balance, debit) MUST name that provider, and the bank MUST refuse a reference used by any other provider, or after it ended, with
403 PROVIDER_NOT_ALLOWED. - PSP-8.13 While a link is active, linking the same account again for the same provider MUST return the same reference. After unlink, a new link gets a new reference.
- PSP-8.14 A provider MUST keep the
pin_keywith the link, so the person’s device can encrypt later PIN messages to it.
8.4 Consent and unlink
- PSP-8.15 The consent is recorded at the bank: provider, account, reference, status, and when it ended. The bank is the authority on it. The provider’s copy is a cache.
- PSP-8.16
POST /v1/connect/unlinkwith{ "bank": "<bank id>", "account": "<reference>" }ends the link. The bank answers{ "account": "<reference>", "status": "ended", "changed": <bool> }. Unlinking an ended or unknown reference MUST succeed withchangedfalse. - PSP-8.17 When a person disconnects an account, the provider MUST unlink it at the bank first, and only then remove the addresses that pointed at it.
- PSP-8.18 A provider MUST treat
403 PROVIDER_NOT_ALLOWEDon any later call as “the bank has ended this link”, and ask the person to connect again.
POST /v1/connect/unlink Disconnect an account · served by the switch
Ends the app's permission on the account at the bank; unlinking an ended or unknown reference still succeeds. Called by a payment app, at its home switch or by relay. Defined in PSP-8.15, PSP-8.16, PSP-8.17.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
bank | string | yes | The bank's id in the trust registry, such as bank:sbi. (at most 100 characters) | PSP-8.15 |
account | string | yes | The account reference the bank gave this payment app at link. Opaque; only that app can use it. | PSP-8.11 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
account | string | yes | The account reference that was unlinked. | |
status | "ended" | yes | Always ended. | PSP-8.16 |
changed | boolean | yes | False when the reference had already ended or was unknown. | PSP-8.16 |
Errors
POST /switch/v1/connect/unlink End a payment app's permission · served by a bank
The bank ends the consent and the reference stops working. Called by the switch of the bank's own country. Defined in PSP-8.15, PSP-8.16, PSP-8.17.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
provider | string | yes | The payment app's id in the trust registry, such as provider:wren. Filled in by the switch. (at most 100 characters) | PSP-8.2 |
account | string | yes | The account reference the bank gave this payment app at link. Opaque; only that app can use it. | PSP-8.11 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
account | string | yes | The account reference that was unlinked. | |
status | "ended" | yes | Always ended. | PSP-8.16 |
changed | boolean | yes | False when the reference had already ended or was unknown. | PSP-8.16 |
9. Balance
- PSP-9.1
POST /v1/balancewith{ "bank": "<bank id>", "account": "<reference>" }. The bank answers{ "balance": <money>, "available": <money>, "kind", "masked", "currency", "holder_name" }. Money is as OCI-PAY-2 §6 writes it. - PSP-9.2 The bank MUST answer only for an active reference given to the calling provider (PSP-8.12).
- PSP-9.3 A balance read takes no PIN in this version. The link the person made with the PIN covers it.
- PSP-9.4 A provider MUST NOT store a balance as its own record. It shows what the bank said just now.
POST /v1/balance Read a balance · served by the switch
The balance of a connected account, straight from the bank; the app shows it and does not keep it. Called by a payment app, at its home switch or by relay. Defined in PSP-9.1, PSP-9.2, PSP-9.3, PSP-9.4.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
bank | string | yes | The bank's id in the trust registry, such as bank:sbi. (at most 100 characters) | PSP-9.1 |
account | string | yes | The account reference the bank gave this payment app at link. Opaque; only that app can use it. | PSP-8.11 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
balance | object | yes | Everything in the account. | PSP-9.1 |
balance.value | string | yes | A decimal string, such as "250.00". Never a float. (pattern ^-?\d+(\.\d{1,2})?$) | |
balance.currency | string | yes | ISO 4217 code, such as INR or USD. (pattern ^[A-Z]{3}$) | |
available | object | yes | What is free to spend: the balance less any holds. | PSP-9.1 |
available.value | string | yes | A decimal string, such as "250.00". Never a float. (pattern ^-?\d+(\.\d{1,2})?$) | |
available.currency | string | yes | ISO 4217 code, such as INR or USD. (pattern ^[A-Z]{3}$) | |
kind | string | yes | The kind of account, such as savings. | |
masked | string | yes | The account number with all but the last four digits hidden, such as **** 1234. | PSP-8.4 |
currency | string | yes | The account's currency, an ISO 4217 code. (pattern ^[A-Z]{3}$) | |
holder_name | string | yes | The account holder's name. |
Errors
POST /switch/v1/balance Balance of a connected account · served by a bank
Answered only for a reference that is still active for the calling app. Called by the switch of the bank's own country. Defined in PSP-9.1, PSP-9.2, PSP-9.3, PSP-9.4.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
provider | string | yes | The payment app's id in the trust registry, such as provider:wren. Filled in by the switch. (at most 100 characters) | PSP-8.2 |
account | string | yes | The account reference the bank gave this payment app at link. Opaque; only that app can use it. | PSP-8.11 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
balance | object | yes | Everything in the account. | PSP-9.1 |
balance.value | string | yes | A decimal string, such as "250.00". Never a float. (pattern ^-?\d+(\.\d{1,2})?$) | |
balance.currency | string | yes | ISO 4217 code, such as INR or USD. (pattern ^[A-Z]{3}$) | |
available | object | yes | What is free to spend: the balance less any holds. | PSP-9.1 |
available.value | string | yes | A decimal string, such as "250.00". Never a float. (pattern ^-?\d+(\.\d{1,2})?$) | |
available.currency | string | yes | ISO 4217 code, such as INR or USD. (pattern ^[A-Z]{3}$) | |
kind | string | yes | The kind of account, such as savings. | |
masked | string | yes | The account number with all but the last four digits hidden, such as **** 1234. | PSP-8.4 |
currency | string | yes | The account's currency, an ISO 4217 code. (pattern ^[A-Z]{3}$) | |
holder_name | string | yes | The account holder's name. |
Errors
403 PROVIDER_NOT_ALLOWED(PSP-8.12)
10. Addresses the provider issues
- PSP-10.1 A provider issues addresses only under its own handle (OCI-PAY-1). Each address MUST point at exactly one active connected account of the person who holds it.
- PSP-10.2 A provider MAY let a person point an address at another of their connected accounts. People who pay that address change nothing.
- PSP-10.3 One account MAY have addresses at several providers. Each provider sees only payments made through its own addresses.
- PSP-10.4 When the account behind an address is unlinked, the provider MUST stop resolving that address (PSP-14.6).
- PSP-10.5 An address MAY point at an account in either country. Its handle has no country; the account does.
11. Payments a provider starts
-
PSP-11.1
POST /v1/paymentsat the payer account’s switch, with anIdempotency-Key(PSP-5.3). A provider’s payment carries, beyond the OCI-PAY-2 payment fields (id,from_address,from_name,to_address,amount,note,quote_id,collect_request_id):Member Meaning payer{ "bank": "<bank id>", "account": "<reference>" }: the account the money leaves, as its bank knows itcredentiala new PIN message (PSP-8.6) for that account, at most 4000 characters -
PSP-11.2 A switch MUST refuse a provider’s payment without
payerorcredential(422 PAYER_REQUIRED), and a bank’s payment that carries either (422 PAYER_NOT_ALLOWED). -
PSP-11.3
payer.bankMUST be an active registered bank (422 PAYER_BANK_UNKNOWN) of the switch’s own country (422 WRONG_SWITCH). -
PSP-11.4
from_addressMUST be under the provider’s own handle, or, for a bank’s own app, under its bank’s handle and paid from that bank’s account (§15). A switch MUST refuse any other with403 ADDRESS_NOT_OWNED. -
PSP-11.5 A provider MUST use as
from_addressan address it issued for the paying account. For a bank’s own app it is the address the bank issued. -
PSP-11.6
amountMUST be in the currency of the payer account’s switch (422 CURRENCY_MISMATCH). A provider MUST NOT pay its ownfrom_address(422 SELF_PAYMENT). -
PSP-11.7 Before a payment the provider SHOULD look the payee up (
POST /v1/lookup, OCI-PAY-2) at the payer account’s switch. The answer’scross_bordersays whether a quote is needed. -
PSP-11.8 A payment to an account in another country MUST carry the
quote_idof an unexpired, unused quote the same provider obtained from the same switch (POST /v1/quoteswithfrom_address,to_address,amount).amountMUST equal the quote’ssend. A same-country payment MUST NOT carry aquote_id(422 QUOTE_NOT_ALLOWED). The quote rules are OCI-PAY-2’s. -
PSP-11.9 The switch MUST pass the
credentialto the payer’s bank only, with the reference and the provider’s id, and MUST NOT keep it. The bank holds the money before anybody is credited (OCI-PAY-2). A later retry carries no PIN, so a hold the bank never received cannot be made again: the payment fails withDEBIT_NOT_FOUND, and the person pays again with a new PIN message. -
PSP-11.10 The switch answers with the payment (OCI-PAY-2):
id,status(completed,pending,failed),failure_reason,to_nameand the rest. A failure on the PIN (WRONG_PIN,PIN_LOCKED,PIN_REPLAYED,PIN_INVALID,PIN_EXPIRED) means nothing moved. -
PSP-11.11 A provider SHOULD keep a payment it started under the switch’s payment id. After a PIN failure it SHOULD keep no payment, and ask for the PIN again with a new payment id.
-
PSP-11.12 A payment whose answer is “not known yet” (PSP-5.7) MUST be kept as
pending. The provider MUST find its outcome by reading it (§12) or by repeating the call with the sameIdempotency-Keyand body. It MUST NOT start a new payment for the same intent.
POST /v1/payments Send a payment · served by the switch
Records a payment the bank has already set the money aside for, credits the payee and answers the payment record. Called by a bank of the switch's country. Defined in SW-5.1, SW-7.7, SW-7.8, SW-7.9, SW-7.10, SW-7.11, SW-7.12, SW-7.13.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
id | string, uuid | The payment id the bank chose; the switch chooses one when absent. | SW-6.6 | |
from_address | string | yes | The payer's address; it must be one the caller speaks for. (at most 200 characters) | SW-7.7 |
from_name | string | The payer's name, as the bank holds it. | ||
to_address | string | yes | The payee's address; it must differ from from_address. (at most 200 characters) | SW-7.7 |
amount | object | yes | The principal, in the switch's currency, without the fee. | SW-7.7 |
amount.value | string | yes | A decimal string greater than zero, such as "250.00". Never a JSON number. (pattern ^\d{1,12}(\.\d{1,2})?$) | SW-6.3 |
amount.currency | "INR" | "USD" | yes | The ISO 4217 code: INR or USD. | SW-6.2 |
note | string | Free text from the payer, at most 140 characters. (at most 140 characters) | SW-6.9 | |
quote_id | string, uuid | The quote this payment uses: required for a cross-border payment, refused for a domestic one. | SW-7.9 | |
collect_request_id | string, uuid | The request for money this payment pays. | SW-7.10 | |
payer | object | For providers only (OCI-PAY-3): the account the money leaves. A bank must not send it. | SW-7.8, PSP-11.1, PSP-11.2 | |
payer.bank | string | yes | The registry id of the bank that holds the account, such as bank:sbi. | |
payer.account | string | yes | The account reference that bank gave the provider. | |
credential | string | For providers only (OCI-PAY-3): the PIN as a JWE to the bank's key. A bank must not send it. A new PIN message for this payment (PSP-8.6); payment apps only. (at most 4000 characters) | SW-7.8, PSP-11.1, PSP-8.6 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
id | string, uuid | yes | The payment id. | SW-6.6 |
status | "pending" | "completed" | "failed" | "reversed" | yes | What a bank acts on: pending while the state is received or credited. | SW-7.13 |
state | "received" | "credited" | "completed" | "failed" | "reversed" | yes | The switch's own state of the payment. | SW-9.1 |
failure_reason | string, null | yes | Why the payment failed: the refusal's code, or one the switch sets. | SW-9.3 |
direction | "domestic" | "outbound" | "inbound" | yes | Whether the payment stays in the country, leaves it, or came from the other country. | SW-7.13 |
from_address | string | yes | The payer's address. (at most 200 characters) | SW-6.8 |
to_address | string | yes | The payee's address. (at most 200 characters) | SW-6.8 |
to_name | string, null | yes | The payee's name, when the payee's side gave one. | |
amount | object | yes | The principal, in the switch's currency, without the fee. | SW-7.7 |
amount.value | string | yes | A decimal string with exactly two decimals, such as "250.00". Never a JSON number. (pattern ^\d+\.\d{2}$) | SW-6.4 |
amount.currency | "INR" | "USD" | yes | The ISO 4217 code: INR or USD. | SW-6.2 |
receive | object, null | yes | What the payee receives, in the other country's currency; set for cross-border payments only. | SW-7.13 |
fee | object, null | yes | The link fee in the switch's currency; set for cross-border payments only. | SW-7.13 |
rate | string, null | yes | The exchange rate with two decimals; set for cross-border payments only. | SW-7.13 |
note | string, null | yes | Free text from the payer, at most 140 characters. (at most 140 characters) | SW-6.9 |
collect_request_id | string, null, uuid | yes | The request for money this payment pays, if any. | SW-7.10 |
created_at | string, date-time | yes | When the switch recorded the payment. | SW-6.7 |
completed_at | string, null, date-time | yes | When the payment completed, once it has. | SW-6.7 |
Errors
403 ADDRESS_NOT_OWNED(SW-7.7)422 SELF_PAYMENT(SW-7.7)422 CURRENCY_MISMATCH(SW-7.7)422 PAYER_NOT_ALLOWED(PSP-11.2)422 QUOTE_NOT_ALLOWED(PSP-11.8)422 QUOTE_REQUIRED(SW-7.9)404 QUOTE_NOT_FOUND(SW-7.9)409 QUOTE_USED(SW-7.9)410 QUOTE_EXPIRED(SW-7.9)422 QUOTE_MISMATCH(SW-7.9)404 REQUEST_NOT_FOUND(SW-7.10)422 REQUEST_MISMATCH(SW-7.10)409 REQUEST_NOT_PAYABLE(SW-7.10)410 REQUEST_EXPIRED(SW-7.10)409 PAYMENT_ID_TAKEN(SW-7.11)422 UNKNOWN_CURRENCY(SW-6.2)422 INVALID_AMOUNT(SW-6.3)400 IDEMPOTENCY_KEY_REQUIRED(SW-5.1)400 IDEMPOTENCY_KEY_INVALID(SW-5.2)422 IDEMPOTENCY_KEY_REUSED(SW-5.4)409 REQUEST_IN_PROGRESS(SW-5.5)422 PAYER_REQUIRED(PSP-11.2)422 PAYER_BANK_UNKNOWN(PSP-11.3)422 WRONG_SWITCH(PSP-11.3)
12. Reading payments
- PSP-12.1
GET /v1/payments/{id}at the payer account’s switch, signed by the provider, returns the payment as in PSP-11.10. For an account in the other country it is relayed (PSP-6.8). - PSP-12.2 A switch MUST return a payment to a provider only when that provider started it. It MUST answer every other id with
404 PAYMENT_NOT_FOUND, the same as an id that does not exist. - PSP-12.3 A provider SHOULD read a payment it holds as
pendingbefore showing it, and record the outcome.
GET /v1/payments/{payment_id} Read a payment · served by the switch
Returns the current record of a payment the caller is a party to, without moving it forward. Called by a bank of the switch's country. Defined in SW-7.14, SW-7.15, SW-10.4.
Request: no body.
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
id | string, uuid | yes | The payment id. | SW-6.6 |
status | "pending" | "completed" | "failed" | "reversed" | yes | What a bank acts on: pending while the state is received or credited. | SW-7.13 |
state | "received" | "credited" | "completed" | "failed" | "reversed" | yes | The switch's own state of the payment. | SW-9.1 |
failure_reason | string, null | yes | Why the payment failed: the refusal's code, or one the switch sets. | SW-9.3 |
direction | "domestic" | "outbound" | "inbound" | yes | Whether the payment stays in the country, leaves it, or came from the other country. | SW-7.13 |
from_address | string | yes | The payer's address. (at most 200 characters) | SW-6.8 |
to_address | string | yes | The payee's address. (at most 200 characters) | SW-6.8 |
to_name | string, null | yes | The payee's name, when the payee's side gave one. | |
amount | object | yes | The principal, in the switch's currency, without the fee. | SW-7.7 |
amount.value | string | yes | A decimal string with exactly two decimals, such as "250.00". Never a JSON number. (pattern ^\d+\.\d{2}$) | SW-6.4 |
amount.currency | "INR" | "USD" | yes | The ISO 4217 code: INR or USD. | SW-6.2 |
receive | object, null | yes | What the payee receives, in the other country's currency; set for cross-border payments only. | SW-7.13 |
fee | object, null | yes | The link fee in the switch's currency; set for cross-border payments only. | SW-7.13 |
rate | string, null | yes | The exchange rate with two decimals; set for cross-border payments only. | SW-7.13 |
note | string, null | yes | Free text from the payer, at most 140 characters. (at most 140 characters) | SW-6.9 |
collect_request_id | string, null, uuid | yes | The request for money this payment pays, if any. | SW-7.10 |
created_at | string, date-time | yes | When the switch recorded the payment. | SW-6.7 |
completed_at | string, null, date-time | yes | When the payment completed, once it has. | SW-6.7 |
Errors
404 PAYMENT_NOT_FOUND(SW-7.14)
13. Requests for money
13.1 Asking someone for money
- PSP-13.1
POST /v1/collect-requestsat the payee account’s switch, with anIdempotency-Key(PSP-5.3), and the OCI-PAY-2 body:id,payee_address,payee_name,payee_assurance,payer_address,amount,note,expires_at. - PSP-13.2
payee_addressMUST be an address the provider may speak for (PSP-11.4), pointing at an account in the switch’s country (422 WRONG_SWITCH).amountMUST be in the payee’s currency. - PSP-13.3
payee_assuranceSHOULD be theassurancethe bank gave at link (PSP-8.10). - PSP-13.4 The request goes to whoever stands behind
payer_address: its provider, else its bank. If they refuse it, or nobody answers, the switch keeps no request and answers an error (OCI-PAY-2). - PSP-13.5 The provider hears how its request ended at
/switch/v1/collect-requests/{id}/status(PSP-14.10).
POST /v1/collect-requests Ask for money · served by the switch
Records a request for money and delivers it to the payer's side before answering; no money moves. Called by the payee's bank. Defined in SW-5.1, SW-7.16, SW-7.17, SW-7.18, SW-7.19, SW-7.20.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
id | string, uuid | The request id the bank chose; the switch chooses one when absent. | SW-7.17 | |
payee_address | string | yes | The address asking for money; it must be one the caller speaks for. (at most 200 characters) | SW-7.16 |
payee_name | string | The payee's name, passed to the payer as sent. | ||
payee_assurance | "low" | "substantial" | "high" | How strongly the payee's identity was checked, passed to the payer as sent. | ||
payer_address | string | yes | The address asked to pay; it must differ from payee_address. (at most 200 characters) | SW-7.16 |
amount | object | yes | The amount asked for, in the switch's currency. | SW-7.16 |
amount.value | string | yes | A decimal string greater than zero, such as "250.00". Never a JSON number. (pattern ^\d{1,12}(\.\d{1,2})?$) | SW-6.3 |
amount.currency | "INR" | "USD" | yes | The ISO 4217 code: INR or USD. | SW-6.2 |
note | string | Free text from the payee, at most 140 characters. (at most 140 characters) | SW-6.9 | |
expires_at | string, date-time | When the request stops being payable: in the future, at most 30 days ahead, 24 hours by default. | SW-7.17 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
id | string, uuid | yes | The request id. | SW-6.6 |
status | "pending" | yes | Always pending: the request was delivered and not yet answered. | SW-7.20 |
payee_address | string | yes | The address asking for money. (at most 200 characters) | SW-6.8 |
payer_address | string | yes | The address asked to pay. (at most 200 characters) | SW-6.8 |
amount | object | yes | The amount asked for, in the switch's currency. | SW-6.1 |
amount.value | string | yes | A decimal string with exactly two decimals, such as "250.00". Never a JSON number. (pattern ^\d+\.\d{2}$) | SW-6.4 |
amount.currency | "INR" | "USD" | yes | The ISO 4217 code: INR or USD. | SW-6.2 |
expires_at | string, date-time | yes | When the request stops being payable. | SW-7.17 |
Errors
403 ADDRESS_NOT_OWNED(SW-7.16)422 SELF_REQUEST(SW-7.16)422 CURRENCY_MISMATCH(SW-7.16)422 INVALID_EXPIRY(SW-7.17)409 REQUEST_ID_TAKEN(SW-7.17)503 DELIVERY_FAILED(SW-7.19)404 PAYER_NOT_FOUND(SW-7.19)422 REQUEST_REJECTED(SW-7.19)422 UNKNOWN_CURRENCY(SW-6.2)422 INVALID_AMOUNT(SW-6.3)400 IDEMPOTENCY_KEY_REQUIRED(SW-5.1)400 IDEMPOTENCY_KEY_INVALID(SW-5.2)422 IDEMPOTENCY_KEY_REUSED(SW-5.4)409 REQUEST_IN_PROGRESS(SW-5.5)
13.2 A request to one of the provider’s addresses
- PSP-13.6 The provider receives the request at
/switch/v1/collect-requests(PSP-14.8) and shows it to the person. - PSP-13.7 To approve, the provider pays it: a payment (§11) from the request’s
payer_addressto itspayee_address, for the request’s amount, carryingcollect_request_id. When the payee is in another country, the provider gets a quote first. - PSP-13.8 To decline, the provider sends
POST /v1/collect-requests/{id}/statuswith{ "status": "declined", "report": <bool> }at the switch of the payer account’s country.reportmarks the request as unwanted. - PSP-13.9 A switch MUST let only a party to the request change its status (OCI-PAY-2). It answers any other caller with
404 REQUEST_NOT_FOUND.
POST /v1/collect-requests/{request_id}/status Answer or withdraw a request · served by the switch
The payer's side approves or declines a request, the payee's side cancels it, and either marks it expired. Called by the payer's or the payee's bank. Defined in SW-7.21, SW-7.22, SW-7.23, SW-7.24, SW-7.25, SW-7.26.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
status | "approved" | "declined" | "cancelled" | "expired" | yes | The new status; only the switch sets paid. | SW-7.21 |
report | boolean | With declined only: the payer reports the request as unwanted. | SW-7.21 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
id | string, uuid | yes | The request id. | SW-6.6 |
status | "approved" | "declined" | "cancelled" | "expired" | yes | The status the request now has. | |
relayed | boolean | yes | Whether the other party accepted the new status; false when nothing changed. | SW-7.25 |
Errors
14. Endpoints a provider serves
A provider MUST serve these, under <base_url>/switch/v1. Every call to them carries its home switch’s OCI-Signature.
| Method and path | The switch says |
|---|---|
POST /switch/v1/resolve | who is behind this address |
POST /switch/v1/collect-requests | someone asks one of your people for money |
POST /switch/v1/collect-requests/{id}/status | how a request ended |
POST /switch/v1/payments/received | money arrived at one of your addresses |
14.1 Checking who calls
- PSP-14.1 A provider MUST refuse an unsigned call (
401 SIGNATURE_MISSING) and one whose signature does not verify against the caller’s keys from its registryjwks_url(401 SIGNATURE_INVALID). - PSP-14.2 A provider MUST accept a call only from its home switch: a participant that is
active, ofkindswitch, whosecountryequals the provider’s owncountry. A caller that is not a switch, and any other switch, MUST get403 FORBIDDEN_PARTICIPANT. An unknown or inactive caller MUST get401 UNKNOWN_PARTICIPANT. - PSP-14.3 A provider MUST check that the signature’s
htmequals the request method, and itshtuequals the provider’s ownbase_urlplus the request path. - PSP-14.4 A provider MUST refuse a signature whose
iatis more than 120 seconds from now (401 SIGNATURE_EXPIRED). It MUST check the rest of the signature as OCI-PAY-2 §4 requires. - PSP-14.5 Switches send no
Idempotency-Keyto a provider. A provider MUST make each of these calls safe to repeat by theidit carries: a repeat changes nothing and gets the same kind of answer.
14.2 Resolve
-
PSP-14.6 Body
{ "address": "<address>" }(3 to 200 characters). The provider compares addresses in lower case. For an address it issued that points at an active link, it answers:{ "address": "ravi@wren", "name": "Ravi Menon", "assurance": "substantial", "bank": "bank:hdfc", "account": "<reference>" }For any other address it MUST answer
404 ADDRESS_NOT_FOUND. -
PSP-14.7
bankandaccountare REQUIRED in a success. A switch MUST treat an answer without them, or any refusal, as404 ADDRESS_NOT_FOUND, and no answer as503 PROVIDER_UNAVAILABLE. Every switch that routes a payment to the address asks for itself, and nothing is cached. A switch may ask while the provider’s own call to it is still open, so the provider MUST be able to answer resolve at any time.
POST /switch/v1/resolve Whose address is this? · served by a provider
For an address this app issued that points at an active link: the holder's name, the bank behind it, and the reference that bank gave the app. Called by Its home switch. Defined in PSP-14.6, PSP-14.7.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
address | string | yes | A payment address this app issued, such as ravi@wren. Compared in lower case. (at most 200 characters; at least 3) | PSP-14.6 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
address | string | yes | The address, in lower case. | |
name | string | yes | The account holder's name, for payer confirmation. | |
assurance | "low" | "substantial" | "high" | yes | How well the bank knows the holder, as the bank gave it at link. | |
bank | string | yes | The bank that holds the account behind the address. | PSP-14.7 |
account | string | yes | The account reference that bank gave this app. | PSP-14.7 |
Errors
14.3 A request for money
- PSP-14.8 Body
{ "request": { "id", "payee_address", "payee_name", "payee_assurance", "payee_country", "payer_address", "amount", "note", "expires_at", "created_at" } }. The provider MUST find the person behindpayer_addressand record the request for them, once perid, and answers{ "id": "<id>", "status": "pending" }. If nobody is behindpayer_addressit MUST answer404 ADDRESS_NOT_FOUND; the switch then drops the request. - PSP-14.9 A provider MUST ignore members it does not know.
POST /switch/v1/collect-requests Deliver a request to the payer · served by a provider
A request for money addressed to one of this app's addresses; the app records it once per id and shows it to the person. Called by Its home switch. Defined in PSP-14.8, PSP-14.9, PSP-13.6, PSP-15.5.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
request | object | yes | The request, as the switch keeps it. | PSP-14.8 |
request.id | string, uuid | yes | The id of the request or payment (a UUID). The same id is used by every party; a repeat with it changes nothing. | PSP-14.5 |
request.payee_address | string | yes | The address asking for the money. | |
request.payee_name | string, null | yes | The name of whoever is asking. | |
request.payee_assurance | "low" | "substantial" | "high" | "null" | yes | How well the payee's bank knows the payee. | |
request.payee_country | string | yes | The country of the payee's account, an ISO 3166 two-letter code. (pattern ^[A-Z]{2}$) | |
request.payer_address | string | yes | The address being asked to pay: one this app issued (or its bank's, for a bank's own app). | PSP-14.8 |
request.amount | object | yes | The amount asked for, in the payee's currency. | PSP-13.2 |
request.amount.value | string | yes | A decimal string, such as "250.00". Never a float. (pattern ^-?\d+(\.\d{1,2})?$) | |
request.amount.currency | string | yes | ISO 4217 code, such as INR or USD. (pattern ^[A-Z]{3}$) | |
request.note | string, null | yes | Free text from the payee, at most 140 characters. (at most 140 characters) | |
request.expires_at | string, date-time | yes | When the request stops being payable. | |
request.created_at | string, date-time | yes | When the switch recorded the request. |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
id | string | yes | The request's id. | |
status | "pending" | yes | Always pending. | PSP-14.8 |
Errors
14.4 How a request ended
- PSP-14.10 Body
{ "status": "approved" | "declined" | "expired" | "cancelled" | "paid", "report": <bool, optional>, "side": "payer" (optional) }. The provider answers{ "id": "<id>", "status": "<status>" }. - PSP-14.11 Without
side:approved,declinedandpaidare about a request the provider sent (it is the payee);cancelledis about a request it received (it is the payer);expiredmay be about either. Withsidepayerthe status is about a request it received that was answered elsewhere (§15). A provider MUST NOT change a request alreadypaid,declinedorcancelled.
POST /switch/v1/collect-requests/{request_id}/status How a request ended · served by a provider
Tells the app a request it made or received was approved, declined, paid, cancelled or expired. Called by Its home switch. Defined in PSP-14.10, PSP-14.11, PSP-13.5, PSP-15.5.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
status | "approved" | "declined" | "expired" | "cancelled" | "paid" | yes | The request's new status. | PSP-14.11 |
report | boolean | True when the payer declined and reported the request as unwanted. | PSP-13.8 | |
side | "payer" | payer when the request was answered elsewhere, so the copy this app received is done too. | PSP-15.5 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
id | string | yes | The request's id. | |
status | "approved" | "declined" | "expired" | "cancelled" | "paid" | yes | The status as received. |
Errors
14.5 Money arrived
- PSP-14.12 Body
{ "payment": { "id", "to_address", "from_address", "from_name", "from_country", "amount", "note", "collect_request_id", "completed_at" } }. It is sent after the payee’s bank has been credited, by the switch of the payee account’s country. The money has moved whether or not the provider hears. - PSP-14.13 The provider MUST record the payment once per
idand, whencollect_request_idis set, mark its own requestpaid. If the address is gone it MUST still answer success. The reference answers{ "ok": true, "known": <bool> }. - PSP-14.14 A switch sends this call once, as best effort. A provider MUST NOT treat a missing call as a missing payment.
POST /switch/v1/payments/received Money arrived · served by a provider
Tells the app a payment reached one of its addresses; sent once, best effort, after the payee's bank was credited. Called by the switch of the payee account's country, through the app's home switch. Defined in PSP-14.12, PSP-14.13, PSP-14.14, PSP-15.4.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
payment | object | yes | The payment, as the switch describes it to the payee's app. | PSP-14.12 |
payment.id | string, uuid | yes | The id of the request or payment (a UUID). The same id is used by every party; a repeat with it changes nothing. | PSP-14.5 |
payment.to_address | string | yes | The address the money was paid to: one this app issued (or its bank's, for a bank's own app). | |
payment.from_address | string | yes | The payer's payment address. | |
payment.from_name | string, null | yes | The payer's name, as their bank or app holds it. | |
payment.from_country | string | yes | The payer's country, an ISO 3166 two-letter code. (pattern ^[A-Z]{2}$) | |
payment.amount | object | yes | The amount credited, in the payee's currency. | |
payment.amount.value | string | yes | A decimal string, such as "250.00". Never a float. (pattern ^-?\d+(\.\d{1,2})?$) | |
payment.amount.currency | string | yes | ISO 4217 code, such as INR or USD. (pattern ^[A-Z]{3}$) | |
payment.note | string, null | yes | Free text from the payer, at most 140 characters. (at most 140 characters) | |
payment.collect_request_id | string, null, uuid | yes | The request this payment answers; the app marks its own request paid. | PSP-14.13 |
payment.completed_at | string, null, date-time | yes | When the payment completed. |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
ok | boolean | yes | Always true: the app answers success even when the address is gone. | PSP-14.13 |
known | boolean | yes | False when the address no longer exists at the app. | PSP-14.13 |
Errors
15. A bank’s own app
A bank can add its own app without changing anything it already does. The app is a provider that acts for the bank (PSP-3.4). The bank keeps its handle and its addresses.
- PSP-15.1 A bank’s own app issues no addresses. Each account it connects comes with the address the bank issued (
addressat link, PSP-8.10), and it MUST use that address. It MUST refuse to create or re-point addresses. - PSP-15.2 A bank’s own app SHOULD offer only its own bank for connect.
- PSP-15.3 At the switch of its bank’s country, a bank’s own app MAY use its bank’s addresses as
from_addressand aspayee_address, but only for accounts at that bank. A switch MUST grant this only while the bank isactive, ofkindbank, in the switch’s country, and has a handle. - PSP-15.4 Addresses under the bank’s handle still resolve at the bank. Money to them still goes to the bank. A switch MUST then also tell the bank’s own app (PSP-14.12).
- PSP-15.5 A request for money to one of the bank’s addresses goes to the bank as before. A switch MUST also send a copy to the bank’s own app (PSP-14.8). Either may answer it. When one pays or declines, the switch MUST tell the other with
sidepayer, so its copy stops waiting. - PSP-15.6 A bank with no app MUST see no change at all.
16. What a provider must never do
- PSP-16.1 A provider MUST NOT hold money, keep a balance of its own, or act as the account of any payment.
- PSP-16.2 A provider MUST NOT read, decrypt, store or log a PIN or a PIN message. It MUST NOT hold any bank’s PIN private key. The reference has a development-only endpoint that encrypts a PIN on the server for test scripts; a provider MUST NOT expose such an endpoint outside a local machine.
- PSP-16.3 A provider MUST NOT call a bank. Every call to a bank goes through the switch.
- PSP-16.4 A provider MUST NOT call any switch but its home switch (PSP-4.1), and MUST NOT accept a call from any other (PSP-14.2).
- PSP-16.5 A provider MUST NOT store an account number. It knows an account only by its reference and the masked form.
- PSP-16.6 A provider MUST NOT issue or speak for addresses under a handle that is not its own, except as a bank’s own app (§15).
- PSP-16.7 A provider MUST NOT forward a person’s access token to anyone but its home switch, and only as
identity_tokenfor bank connect. Presenting the token back to the issuer that made it, to read the person’s own claims at<iss>/userinfo, is not forwarding and is allowed.
17. Worked example
Wren (provider:wren, home IN, handle wren) at https://api.wren.example. The IN switch (switch:IN) at https://switch.in.example. Signatures and idempotency headers are shown by name only.
Registry entries:
{ "id": "provider:wren", "kind": "provider", "country": "IN", "display_name": "Wren", "address_suffix": "wren",
"base_url": "https://api.wren.example", "jwks_url": "https://api.wren.example/.well-known/jwks.json", "status": "active", "acts_for": null }
{ "id": "provider:sbi", "kind": "provider", "country": "IN", "display_name": "SBI Pay", "address_suffix": null,
"base_url": "https://pay.sbi.example", "jwks_url": "https://pay.sbi.example/.well-known/jwks.json", "status": "active", "acts_for": "bank:sbi" }
17.1 Asha connects SBI
Asha signs in to Wren at Wren’s OCI-ID. Wren asks the IN switch, because SBI is in IN:
POST https://switch.in.example/v1/connect/accounts OCI-Signature (iss provider:wren)
{ "bank": "bank:sbi", "identity_token": "eyJ...asha-access-token" }
The switch passes { "provider": "provider:wren", "identity_token": "eyJ..." } to SBI. SBI checks the token, asks the issuer for Asha’s phone, and answers:
{ "bank": "bank:sbi", "bank_name": "State Bank", "country": "IN",
"accounts": [ { "id": "6f1c...offer", "kind": "savings", "masked": "**** 4321", "currency": "INR", "holder_name": "Asha Rao", "linked": false } ],
"pin_key": { "kty": "EC", "crv": "P-256", "x": "...", "y": "...", "kid": "sbi-pin-1", "alg": "ECDH-ES", "use": "enc" } }
Asha picks the account and types her PIN. Her phone encrypts { "pin": "1234", "nonce": "9b2e...", "iat": 1795000000 } to pin_key.
POST https://switch.in.example/v1/connect/link
{ "bank": "bank:sbi", "account_id": "6f1c...offer", "pin": "eyJhbGciOiJFQ0RILUVTIi..." }
SBI checks the PIN, records that Wren may use the account, and answers with "account": "Qm9...ref", "assurance": "substantial", "address": "asha@sbi" and the masked account. Wren keeps the reference and the PIN key, and Asha chooses asha@wren for it.
17.2 Asha pays ravi@wren
Wren looks the payee up at the IN switch (POST /v1/lookup {"address": "ravi@wren"}). The switch asks Wren itself:
POST https://api.wren.example/switch/v1/resolve OCI-Signature (iss switch:IN)
{ "address": "ravi@wren" }
→ { "address": "ravi@wren", "name": "Ravi Menon", "assurance": "substantial", "bank": "bank:hdfc", "account": "aGQ...ref" }
cross_border is false, so no quote. Asha’s phone makes a new PIN message.
POST https://switch.in.example/v1/payments OCI-Signature, Idempotency-Key: 0d6a6a3e-...
{ "id": "0d6a6a3e-...", "from_address": "asha@wren", "from_name": "Asha Rao", "to_address": "ravi@wren",
"amount": { "value": "120.00", "currency": "INR" }, "note": "lunch", "quote_id": null, "collect_request_id": null,
"payer": { "bank": "bank:sbi", "account": "Qm9...ref" }, "credential": "eyJhbGciOiJFQ0RILUVTIi..." }
The switch has SBI hold the money with the PIN, credits Ravi’s HDFC account by Wren’s reference, has SBI take the held money, and answers "status": "completed". Then it tells Wren that money arrived at ravi@wren:
POST https://api.wren.example/switch/v1/payments/received OCI-Signature (iss switch:IN)
{ "payment": { "id": "0d6a6a3e-...", "to_address": "ravi@wren", "from_address": "asha@wren", "from_name": "Asha Rao",
"from_country": "IN", "amount": { "value": "120.00", "currency": "INR" }, "note": "lunch", "collect_request_id": null,
"completed_at": "2026-11-28T10:00:02+00:00" } }
→ { "ok": true, "known": true }
17.3 Lena’s Chase account, from Wren, through the IN switch
Lena uses Wren. Her account is at Chase, in the US. Wren calls only the IN switch, so it relays:
POST https://switch.in.example/v1/relay OCI-Signature (iss provider:wren)
{ "country": "US", "method": "POST", "path": "/v1/connect/accounts",
"body": { "bank": "bank:chase", "identity_token": "eyJ...lena-access-token" } }
The IN switch passes it over the link to the US switch (OCI-PAY-4). The US switch checks that Wren’s home is IN, runs the call as Wren, and Chase’s answer comes back unchanged. Linking and payments go the same way. A payment from lena@wren is a relay of /v1/payments with Idempotency-Key on the relay; the payment is kept by the US switch, in USD. Reading it later:
POST https://switch.in.example/v1/relay
{ "country": "US", "method": "GET", "path": "/v1/payments/5e0c...", "body": null }
18. Security considerations
- The PIN. It is encrypted on the device to the bank’s key (PSP-8.6). The provider and the switches carry it and cannot read it. The bank refuses a replayed nonce and a stale
iat(PSP-8.9), so a captured PIN message is useful for at most 300 seconds and only once. The switch does not keep it (PSP-11.9). - The access token travels. For bank connect the person’s access token passes through the home switch, perhaps the other switch, and reaches the bank, which uses it at the issuer. Anyone on that path can use it as a bearer token until it expires. Keep tokens short-lived. Sender-constrained tokens (OCI-2 DPoP) would stop this use, and also stop the bank from calling
/userinfowith it (§21). - The token is not bound to the provider. A bank checks the token’s client id against the client ids it accepts, not against the provider the switch names. A provider could pass a token issued to another app with an accepted client id. The PIN check at link (PSP-8.9) is what stops it from linking an account it was not given.
- One home switch. A provider accepts only its home switch (PSP-14.2), so a compromised switch of another country cannot call it directly. It still reaches the provider through the link, re-signed by the home switch. The home switch is trusted with everything the provider hears.
- Account references. A reference works only for the provider it was given to (PSP-8.12), so a leaked reference is no use to anyone else. A leaked provider signing key is: rotate it (CORE-5.6).
- Replay. A signature is valid for 120 seconds and carries no
jti. State-changing calls rely on idempotency (PSP-5.3, PSP-14.5) for safety against replay. - Enumeration. Resolve says whether an address exists and the holder’s name. Only the home switch may ask (PSP-14.2), which limits who can enumerate. Nothing in the reference rate-limits it.
- Development endpoints. The reference’s PIN-encrypting endpoint (PSP-16.2) defeats the PIN model. It is off unless a local flag is set.
19. Privacy considerations
- A provider holds names, addresses, masked accounts and payment history for its own addresses only (PSP-10.3). It never holds an account number (PSP-16.5).
- A bank learns which providers a customer linked. The switch learns which provider started each payment. Neither learns the other provider’s addresses for the same account.
- Resolve returns the holder’s name to the paying side, for payer confirmation (OCI-PAY-1).
- Finding accounts by phone (PSP-7.5) means the bank learns that this phone signed in at this provider. The bank lists accounts only to the provider that asked, masked (PSP-8.4).
- Logs follow CORE-7.3: no PIN messages, no access tokens, no account references in clear text.
20. Conformance
An implementation conforms to OCI-PAY-3 0.1 as a provider when it meets every PSP clause addressed to a provider, and as a switch or bank when it meets those addressed to it. The reference tests below cite behaviour, not clause numbers yet.
| Clauses | Checked by |
|---|---|
| PSP-4.1, 4.2, 6.1, 6.7, 6.8 | wren-api/tests: the fake switch fails any direct call to a foreign switch (conftest.py); test_connecting_asks_the_switch_of_the_banks_country_and_passes_the_sign_in_on |
| PSP-4.3, 4.5, 6.2 to 6.4 | ocipay-api/tests/test_providers.py: test_a_us_app_is_refused_by_the_indian_switch, test_what_may_be_relayed, test_what_a_provider_may_and_may_not_send |
| PSP-4.6 | test_the_indian_switch_reaches_a_us_app_only_through_the_us_switch, test_a_request_for_money_reaches_a_us_app_through_its_home_switch, test_the_link_forwards_only_to_an_app_registered_here |
| PSP-7.1, 7.2 | test_a_sign_in_from_an_accepted_identity_becomes_a_user_once, test_the_same_person_through_another_client_is_the_same_user, test_other_tokens_are_refused |
| PSP-8.x | test_bank_connect_is_relayed_to_the_bank_with_the_providers_name, test_bank_connect_errors, test_an_app_connects_a_bank_in_the_other_country_through_its_home_switch, test_linking_stores_the_banks_reference_and_never_an_account_number, test_an_account_connected_by_someone_else_is_refused |
| PSP-9.x, 8.17 | test_balance_is_asked_of_the_bank_and_disconnect_frees_the_address |
| PSP-11.x | test_a_provider_payment_holds_at_the_payers_bank_credits_and_then_takes_the_money, test_a_wrong_pin_fails_the_payment_and_nobody_is_credited, test_a_debit_the_bank_never_got_cannot_be_retried_without_the_pin, test_a_provider_payment_across_the_border_debits_the_amount_and_the_fee, test_an_app_pays_from_an_account_in_the_other_country_and_the_payment_stays_there; Wren: test_a_payment_goes_to_the_switch_with_the_account_reference_and_the_pin, test_a_wrong_pin_is_asked_again_and_leaves_no_payment, test_no_answer_from_the_switch_stays_pending_and_is_asked_about_later, test_a_payment_abroad_needs_its_quote_and_carries_the_fee |
| PSP-12.2 | test_a_provider_reads_its_own_payments_and_no_one_elses |
| PSP-13.x | test_a_provider_asks_for_money_for_its_own_address, test_a_request_to_a_provider_address_is_approved_by_paying_it, test_a_provider_declines_a_request_and_the_payee_bank_is_told; Wren: test_a_request_from_someone_arrives_is_approved_by_paying_or_declined, test_asking_someone_for_money_and_hearing_how_it_ended |
| PSP-14.1 to 14.4 | Wren: test_only_a_switch_may_ask (unsigned, a bank, a foreign switch, a stranger’s key) |
| PSP-14.6, 14.7 | test_lookup_asks_the_provider_and_never_the_bank, test_an_address_the_provider_does_not_have_is_not_found, test_a_provider_that_does_not_answer_is_a_503; Wren: test_resolve_answers_a_switch_with_the_bank_and_the_reference |
| PSP-14.12, 14.13 | test_the_app_that_issued_the_payee_address_is_told_the_money_arrived; Wren: test_money_that_arrives_shows_in_history |
| PSP-15.x | ocipay-api/tests/test_bank_app.py (all eight tests, including test_a_bank_with_no_app_is_told_nothing_new); Wren: test_a_banks_own_app_uses_the_address_the_bank_issued, test_a_request_answered_at_the_bank_stops_waiting_in_its_app |
| PSP-3.x | stores/oci/scripts/oci-wiring.py · participants (registration rules). Not tested in code. |
| PSP-5.6, 5.7, 14.5, 16.x | Not checked by a test that names them. A conformance harness against a running provider is planned. |
21. Open questions
Divergences between the code, the drafts and the plans:
- Signature algorithm. The OCI-Signature in the code is
EdDSA(Ed25519), with notyp. CORE-5.1 requiresES256(orPS256) and CORE-5.2 rejects all others; CORE-5.4 requirestyp. The switch’skidis the first 16 characters of the thumbprint, not the whole one (CORE-5.3 SHOULD). OCI-PAY-2 §4 owns the signature; GAPS.md already records the first two. - Error envelope. Every reference service answers
{ "error": { "code", "message" } }. CORE-9.1 says{ "error", "error_description" }. GAPS.md records this for OCI-0. - Sign-in is not OCI-2 as written. The provider and the bank verify access tokens with keys from
<iss>/jwks.jsonand a configured issuer list, not through OCI-1 resolution (AUTH-3.1). The tokens are bearer tokens, not DPoP-bound (AUTH-7.5, AUTH-8.5). The provider forwards the token, and the bank uses it at the issuer’s/userinfoto getphone_number(and the provider getsemail); AUTH-7.6 says an OCI-2 access token grants nothing beyond identity.phone_number_verifiedis not checked; “verified” rests on the issuer. Decide whether bank connect needs an OCI-3 release of the phone, or a signed statement from the identity (plan 005 says “the identity’s signed statement of who they are”). - Which client ids a bank accepts. The bank checks
client_idagainst a fixed list (wren-web,wren-mobile,wren-app), the reference app’s ids, whatever provider calls. A second provider that is not Wren’s code needs its ids added to every bank. The token is not bound to the provider the switch names (§18). - Which identities a bank trusts is set by configuration in the store wiring (
provider_identities()), not read from the registry. Plan 005 lists this as open. - No consent receipt. Plan 005 says “the bank records the consent”. It is a row at the bank (
paybank.provider_links). The person gets no OCI-5 receipt, and there is no status or withdrawal endpoint. Should bank connect issue an OCI-5 receipt? - The bank cannot tell the provider a link ended. Plan 005 says “either side can end it”. The connector has no bank-side unlink route, and no call tells the provider. The provider learns from
PROVIDER_NOT_ALLOWED(PSP-8.18). - Reference scope. Plan 005 says the reference is “only this provider can use, for this person”. The code gives one reference per provider and account, not per person. Two people at one provider cannot both link a shared account (Wren answers
ACCOUNT_CONNECTED_ELSEWHERE). - Balance without a PIN (PSP-9.3) follows plan 005 decision 4. UPI asks for the PIN.
- PIN length and JWE. The code takes 4 to 6 digits.
oci-9-payments.yamland GAPS.md say 4 to 8. The code takesencA256GCMonly, a subset of CORE-5.8. CORE-5.8 speaks of encrypting a JWT; the PIN message is a JWE over plain JSON with noexp, and its 300-secondiatwindow is wider than CORE-6.2’s 60-second skew. - The drafts predate providers.
oci-9-payments.yamlandoci-9-payments-switch.yamlfollow plan 003: the wallet calls its own bank’s/v1/me,/v1/paymentsand so on with an OCI-ID token. They have noproviderkind, no bank connect, no relay, nopayer/credential, no debit and no/switch/v1/resolve. Plan 005 replaced that model. The bank connector still serves those wallet routes (ocipay-bank-api/app/routers/wren.py, “Endpoints for Wren”, accepting the Wren client ids); they are now the bank’s own customer channel, and PSP-16.3 forbids a provider to use them. The router’s name and the accepted client ids should be changed. - The OCI-9 proposal (now OCI-PAY-1) against the code. PAY-4.1 calls for a
role/payment_address_providertrust mark; the code uses the registry’skindproviderand no trust mark. PAY-5.1 gives resolution a purpose; the code has none. PAY-5.4 requires signed, short-lived resolution answers; resolve answers plain JSON. PAY-5.5 requires rate limits; there are none. PAY-6.1 binds an address atsubstantialonly after OCI-3 or OCI-4; the code takesassurancefrom the bank at link. PAY-6.2 (OCI-7 suspension) is not built. OCI-PAY-1 owns these; this spec follows the code. - A handle has no country, a provider does. Plan 005 decision 1 said a provider belongs to no country; plan 010 gave it a home. The handle is still global and an address may point at an account in either country (PSP-10.5).
- Calls to a provider carry no
Idempotency-Key.net.to_provideris called without one and/link/v1/to-providerdoes not forward one. Providers dedupe byid(PSP-14.5). Should the switch send one? paidcarries nopayment_id. GAPS.md says the spec requirespayment_idwithpaid; the switch sends{ "status": "paid" }only.- Money arriving is best effort.
payments/receivedis sent once with no retry (PSP-14.14), and a payee’s provider cannot read a payment it did not start (PSP-12.2: only the payer’s provider may). A provider that missed the call has no way to learn of the payment. Should the payee’s provider be allowed to read it, or the call be retried? - Unused and extra members. The request delivery carries
payee_countryandcreated_at, which Wren ignores. Wren accepts anfxmember onpayments/receivedthat the switch never sends; a payee abroad cannot see the rate. - One app per bank.
trust.agent_oftakes the first provider whoseacts_fornames the bank. The registry does not stop two. Shouldacts_forbe unique? htuandbase_url. A provider checkshtuagainst its own configuredPUBLIC_BASE_URL, not against its registrybase_url. They must agree (PSP-3.6); nothing checks that.- Quotes and the account’s country. For a quote the switch checks only that
from_addressis under the caller’s handle, not that the paying account is in its country. A wrong-switch quote is caught only when the payment is refused. - Idempotency across a relay. At the other switch a relayed call’s idempotency scope includes
/link/v1/relay, and the body is compared in sorted-key form. A call made once directly and once through a relay is not recognised as the same. OCI-PAY-4 owns this. - Failure classes. PSP-5.7 is the reference provider’s rule. OCI-PAY-2 states the switch’s (SW-10.2), and the two differ: the switch counts
408,429and other409s as refusals, the provider as unknown. One rule should hold for every participant.
Changes
| Version | Date | What changed |
|---|---|---|
| 0.1.0 | 2026-11-28 | First version, extracted from the reference implementation. Numbered OCI-PAY-3 in the payments family (first drafted as OCI-14). PSP-16.7 allows presenting the token to its own issuer’s /userinfo. Message tables for each call. |