Content-Type: application/jose. Your api_key header is unchanged.
Enablement, base URLs, and key exchange are coordinated with Leap integration. Do not assume Request4R is active in production until your tenant is explicitly configured.
When to use it
- You need payload confidentiality at the application layer (in addition to HTTPS).
- Your backend can produce and consume compact JWE (e.g. with the
joselibrary).
Concepts
Key exchange
Request4R uses two separate RSA key pairs—one owned by RaaS (Leap) and one owned by the partner. Payload encryption always follows the same rule:Encrypt with the recipient’s public key. Decrypt with your own private key.This is standard asymmetric encryption for confidentiality. It is not digital signing (you do not encrypt with a private key and decrypt with a public key).
What each party holds
During onboarding, Leap provides your tenant the RaaS public key for encrypting requests. You generate a partner key pair, keep the private key on your backend, and send Leap only the public key so RaaS can encrypt responses to you.
Run all JWE operations on your server. Partner private keys must not ship to browsers, mobile apps, or client-side SDKs.
Authentication
Sendapi_key on every request, identical to the standard Partner API (Authentication). Request4R wraps the body only; it does not replace tenant authentication.
Building a request
- Build the same JSON body documented in OpenAPI for the underlying route.
- Encrypt the UTF-8 JSON string to compact JWE using the RaaS SPKI and headers
alg: RSA-OAEP-256,enc: A256GCM. - HTTP: use the same method (
POST,PUT,PATCH, …). Put the single-line JWE in the body. Use a text-friendlyContent-Type(e.g.text/plain) unless Leap specifies otherwise for your environment.
Reading a response
- If
Content-Type: application/jose, RaaS encrypted the JSON with your partner public key (the SPKI you registered). Decrypt the body with your matching partner private key, then parse UTF-8 plaintext as JSON (same response shapes as the standard endpoint). - With sandbox-only
X-Skip-Encryption(see below), responses may remainapplication/json.
Sandbox and testing
If this header is present (any value):- Send
Content-Type: application/jsonand a normal JSON body. - Responses may stay JSON instead of JWE.
Errors
Invalid or undecryptable bodies typically return400 with a stable code such as ERROR_INVALID_JWE_PAYLOAD and a short reason—not stack traces.
Example (Node.js + jose)
Run crypto only on your backend. Do not ship partner private keys to browsers or mobile apps.
Checklist for integrators
1
Confirm enablement
Verify with Leap that Request4R is on for your tenant and environment (sandbox vs production).
2
Keys
Generate a partner RSA key pair. Give Leap your partner public (SPKI). Store RaaS public (encrypt requests) and partner private (decrypt responses) on your backend only. Rotate only with Leap guidance.
3
Route mapping
Map each call from
/v1/... to /v1/partners/request4r/... with the same method and decrypted JSON schema.4
Operations
Use
reference_id for reconciliation when your product requires it.Related
- Authentication
- Testing & sandbox
- Partner OpenAPI — schemas are unchanged once payloads are decrypted.