Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
feat(docs): openapi spec for locker v2 (#10071)
Sarthak Sonid73555507147
diff --git a/api-reference/docs.json b/api-reference/docs.jsonindex e0b490378e..30a42c7db1 100644--- a/api-reference/docs.json+++ b/api-reference/docs.json@@ -18,7 +18,9 @@"groups": [{"group": "Get Started",- "pages": ["introduction"]+ "pages": [+ "introduction"+ ]},{"group": "Essentials",@@ -160,7 +162,9 @@},{"group": "Platform Account",- "pages": ["v1/platform/platform--create"]+ "pages": [+ "v1/platform/platform--create"+ ]},{"group": "API Key",@@ -206,7 +210,9 @@},{"group": "Poll",- "pages": ["v1/poll/poll--retrieve-poll-status"]+ "pages": [+ "v1/poll/poll--retrieve-poll-status"+ ]},{"group": "Blocklist",@@ -239,11 +245,16 @@},{"group": "Relay",- "pages": ["v1/relay/relay", "v1/relay/relay--retrieve"]+ "pages": [+ "v1/relay/relay",+ "v1/relay/relay--retrieve"+ ]},{"group": "Schemas",- "pages": ["v1/schemas/outgoing--webhook"]+ "pages": [+ "v1/schemas/outgoing--webhook"+ ]},{"group": "Subscriptions",@@ -270,7 +281,9 @@"groups": [{"group": "Get Started [BETA]",- "pages": ["introduction"]+ "pages": [+ "introduction"+ ]},{"group": "Essentials [BETA]",@@ -297,7 +310,6 @@"v2/payments/payments--list","v2/payments/payments--gift-card-balance-check","v2/payments/payments--apply-pm-data"-]},{@@ -418,15 +430,21 @@"pages": [{"group": "Proxy",- "pages": ["v2/proxy/proxy"]+ "pages": [+ "v2/proxy/proxy"+ ]},{"group": "Tokenization",- "pages": ["v2/tokenization/tokenization--create"]+ "pages": [+ "v2/tokenization/tokenization--create"+ ]},{"group": "Revenue Recovery",- "pages": ["v2/revenue-recovery/revenue-recovery--retrieve"]+ "pages": [+ "v2/revenue-recovery/revenue-recovery--retrieve"+ ]}]}@@ -439,14 +457,18 @@"groups": [{"group": "Hyperswitch Card Vault",- "pages": ["locker-api-reference/overview"]+ "pages": [+ "locker-api-reference/overview"+ ]},{"group": "API Reference","pages": [{"group": "Locker - Health",- "pages": ["locker-api-reference/locker-health/get-health"]+ "pages": [+ "locker-api-reference/locker-health/get-health"+ ]},{"group": "Locker - Key Custodian",@@ -464,6 +486,15 @@"locker-api-reference/cards/retrieve-data-from-locker","locker-api-reference/cards/get-or-insert-the-card-fingerprint"]+ },+ {+ "group": "Locker - General Purpose Storage",+ "pages": [+ "locker-api-reference/locker-general-purpose-storage/add-data-in-locker",+ "locker-api-reference/locker-general-purpose-storage/retrieve-data-from-locker",+ "locker-api-reference/locker-general-purpose-storage/delete-data-from-locker",+ "locker-api-reference/locker-general-purpose-storage/get-or-insert-the-card-fingerprint"+ ]}]}@@ -474,7 +505,9 @@"groups": [{"group": "Hyperswitch Intelligent Router",- "pages": ["intelligent-router-api-reference/overview"]+ "pages": [+ "intelligent-router-api-reference/overview"+ ]},{"group": "API Reference",@@ -566,6 +599,11 @@}},"contextual": {- "options": ["copy", "claude", "chatgpt", "view"]+ "options": [+ "copy",+ "claude",+ "chatgpt",+ "view"+ ]}-}+}\ No newline at end of filediff --git a/api-reference/locker-api-reference/locker-general-purpose-storage/add-data-in-locker.mdx b/api-reference/locker-api-reference/locker-general-purpose-storage/add-data-in-locker.mdxnew file mode 100644index 0000000000..b3b3505d13--- /dev/null+++ b/api-reference/locker-api-reference/locker-general-purpose-storage/add-data-in-locker.mdx@@ -0,0 +1,3 @@+---+openapi: locker-v2 post /api/v2/vault/add+---diff --git a/api-reference/locker-api-reference/locker-general-purpose-storage/delete-data-from-locker.mdx b/api-reference/locker-api-reference/locker-general-purpose-storage/delete-data-from-locker.mdxnew file mode 100644index 0000000000..d6f3850654--- /dev/null+++ b/api-reference/locker-api-reference/locker-general-purpose-storage/delete-data-from-locker.mdx@@ -0,0 +1,3 @@+---+openapi: locker-v2 post /api/v2/vault/delete+---diff --git a/api-reference/locker-api-reference/locker-general-purpose-storage/get-or-insert-the-card-fingerprint.mdx b/api-reference/locker-api-reference/locker-general-purpose-storage/get-or-insert-the-card-fingerprint.mdxnew file mode 100644index 0000000000..8fed150484--- /dev/null+++ b/api-reference/locker-api-reference/locker-general-purpose-storage/get-or-insert-the-card-fingerprint.mdx@@ -0,0 +1,3 @@+---+openapi: locker-v2 post /api/v2/vault/fingerprint+---diff --git a/api-reference/locker-api-reference/locker-general-purpose-storage/retrieve-data-from-locker.mdx b/api-reference/locker-api-reference/locker-general-purpose-storage/retrieve-data-from-locker.mdxnew file mode 100644index 0000000000..740ac018b8--- /dev/null+++ b/api-reference/locker-api-reference/locker-general-purpose-storage/retrieve-data-from-locker.mdx@@ -0,0 +1,3 @@+---+openapi: locker-v2 post /api/v2/vault/retrieve+---diff --git a/api-reference/locker-v2.yml b/api-reference/locker-v2.ymlnew file mode 100644index 0000000000..0cba44d8ec--- /dev/null+++ b/api-reference/locker-v2.yml@@ -0,0 +1,335 @@+openapi: "3.0.2"+info:+ title: Tartarus - OpenAPI 3.0+ description: |-+ This the the open API 3.0 specification for the card locker.+ This is used by the [hyperswitch](https://github.com/juspay/hyperswitch) for storing card information securely.+ version: "1.0"+tags:+ - name: Key Custodian+ description: API used to initialize the locker after deployment.+ - name: Data+ description: CRUD APIs to for working with data to be stored in the locker+paths:+ /api/v2/vault/add:+ post:+ tags:+ - Data+ summary: Add Data in Locker+ description: Add sensitive data in the locker+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: string+ requestBody:+ description: The request body might be JWE + JWS encrypted when using middleware+ content:+ application/json:+ schema:+ oneOf:+ - $ref: "#/components/schemas/StoreDataRequest"+ - $ref: "#/components/schemas/JWEReq"+ required: true+ responses:+ "200":+ description: Store Data Response+ content:+ application/json:+ schema:+ oneOf:+ - $ref: "#/components/schemas/StoreDataResponse"+ - $ref: "#/components/schemas/JWERes"+ /api/v2/vault/retrieve:+ post:+ tags:+ - Data+ summary: Retrieve Data from Locker+ description: Retrieve sensitive data from the locker+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: string+ requestBody:+ description: The request body might be JWE + JWS encrypted when using middleware+ content:+ application/json:+ schema:+ oneOf:+ - $ref: "#/components/schemas/RetrieveDataRequest"+ - $ref: "#/components/schemas/JWEReq"+ required: true+ responses:+ "200":+ description: Retrieve Data Response+ content:+ application/json:+ schema:+ oneOf:+ - $ref: "#/components/schemas/RetrieveDataResponse"+ - $ref: "#/components/schemas/JWERes"+ /api/v2/vault/delete:+ post:+ tags:+ - Data+ summary: Delete Data from Locker+ description: Delete sensitive data from the locker+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: string+ requestBody:+ description: The request body might be JWE + JWS encrypted when using middleware+ content:+ application/json:+ schema:+ oneOf:+ - $ref: "#/components/schemas/DeleteDataRequest"+ - $ref: "#/components/schemas/JWEReq"+ required: true+ responses:+ "200":+ description: Delete Data Response+ content:+ application/json:+ schema:+ oneOf:+ - $ref: "#/components/schemas/DeleteDataResponse"+ - $ref: "#/components/schemas/JWERes"+ /custodian/key1:+ post:+ tags:+ - Key Custodian+ summary: Provide Key 1+ description: Provide the first key to unlock the locker+ operationId: setKey1+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: string+ requestBody:+ description: Provide key 1 to unlock the locker+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/Key"+ required: true+ responses:+ "200":+ description: Key 1 provided+ content:+ text/plain:+ schema:+ $ref: "#/components/schemas/Key1Set"+ /custodian/key2:+ post:+ tags:+ - Key Custodian+ summary: Provide Key 2+ description: Provide the first key to unlock the locker+ operationId: setKey2+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: string+ requestBody:+ description: Provide key 2 to unlock the locker+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/Key"+ required: true+ responses:+ "200":+ description: Key 2 provided+ content:+ text/plain:+ schema:+ $ref: "#/components/schemas/Key2Set"+ /custodian/decrypt:+ post:+ tags:+ - Key Custodian+ summary: Unlock the locker+ description: Unlock the locker with the key1 and key2 provided+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: string+ responses:+ "200":+ description: Successfully Unlocked+ content:+ text/plain:+ schema:+ $ref: "#/components/schemas/Decrypt200"+ /health:+ get:+ summary: Get Health+ description: To check whether the application is up+ responses:+ "200":+ description: Health is good+ content:+ text/plain:+ schema:+ $ref: "#/components/schemas/Health"+ /api/v2/vault/fingerprint:+ post:+ tags:+ - Data+ summary: Get or insert the data fingerprint+ description: Get or insert the data fingerprint+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: string+ requestBody:+ description: Provide data number and hash key+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/FingerprintReq"+ required: true+ responses:+ "200":+ description: Fingerprint Response+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/FingerprintRes"+components:+ schemas:+ Key:+ type: object+ properties:+ key:+ type: string+ example: 801bb63c1bd51820acbc8ac20c674675+ required:+ - key+ DeleteDataRequest:+ type: object+ properties:+ entity_id:+ type: string+ description: Unique identifier for the entity+ vault_id:+ type: string+ description: Unique identifier for the vault+ DeleteDataResponse:+ type: object+ properties:+ entity_id:+ type: string+ description: Unique identifier for the entity+ vault_id:+ type: string+ description: Unique identifier for the vault+ RetrieveDataRequest:+ type: object+ properties:+ entity_id:+ type: string+ description: Unique identifier for the entity+ vault_id:+ type: string+ description: Unique identifier for the vault+ RetrieveDataResponse:+ type: object+ properties:+ data:+ $ref: "#/components/schemas/Secret"+ StoreDataRequest:+ type: object+ properties:+ entity_id:+ type: string+ description: Unique identifier for the entity+ vault_id:+ type: string+ description: Unique identifier for the vault+ data:+ $ref: "#/components/schemas/Secret"+ ttl:+ $ref: "#/components/schemas/Ttl"+ StoreDataResponse:+ type: object+ properties:+ entity_id:+ type: string+ description: Unique identifier for the entity+ vault_id:+ type: string+ description: Unique identifier for the vault+ JWEReq:+ title: JWEReq+ type: object+ properties:+ header:+ type: string+ iv:+ type: string+ encrypted_payload:+ type: string+ tag:+ type: string+ encrypted_key:+ type: string+ JWERes:+ title: JWERes+ type: object+ description: JWE encrypted response equivalent+ properties:+ header:+ type: string+ iv:+ type: string+ encrypted_payload:+ type: string+ tag:+ type: string+ encrypted_key:+ type: string+ Secret:+ type: object+ Ttl:+ type: integer+ description: Time-to-live in seconds+ Key1Set:+ type: string+ description: Response after setting key1+ example: Received Key1+ Key2Set:+ type: string+ description: Response after setting key2+ example: Received Key2+ Decrypt200:+ type: string+ description: Response if the locker key custodian decryption was successful+ example: Decryption successful+ Health:+ type: string+ description: Response when the health is good+ example: health is good+ FingerprintReq:+ type: object+ properties:+ data:+ type: string+ example: 4242424242424242+ key:+ type: string+ example: Hash1+ FingerprintRes:+ type: object+ description: Response received if the fingerprint insertion or retrieval was successful+ properties:+ fingerprint_id:+ type: stringdiff --git a/api-reference/rust_locker_open_api_spec.yml b/api-reference/rust_locker_open_api_spec.ymlindex 17a19fec44..4c4ac5dda4 100644--- a/api-reference/rust_locker_open_api_spec.yml+++ b/api-reference/rust_locker_open_api_spec.yml@@ -20,6 +20,11 @@ paths:summary: Provide Key 1description: Provide the first key to unlock the lockeroperationId: setKey1+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: stringrequestBody:description: Provide key 1 to unlock the lockercontent:@@ -41,6 +46,11 @@ paths:summary: Provide Key 2description: Provide the second key to unlock the lockeroperationId: setKey2+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: stringrequestBody:description: Provide key 2 to unlock the lockercontent:@@ -61,6 +71,11 @@ paths:- Key Custodiansummary: Unlock the lockerdescription: Unlock the locker with the key1 and key2 provided+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: stringresponses:"200":description: Successfully Unlocked@@ -86,6 +101,11 @@ paths:- Datasummary: Add Data in Lockerdescription: Add sensitive data in the locker+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: stringrequestBody:description: The request body might be JWE + JWS encrypted when using middlewarecontent:@@ -111,6 +131,11 @@ paths:- Datasummary: Delete Data from Lockerdescription: Delete sensitive data from the locker+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: stringrequestBody:description: The request body might be JWE + JWS encrypted when using middlewarecontent:@@ -136,6 +161,11 @@ paths:- Datasummary: Retrieve Data from Lockerdescription: Retrieve sensitive data from the locker+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: stringrequestBody:description: The request body might be JWE + JWS encrypted when using middlewarecontent:@@ -157,12 +187,16 @@ paths:/data/fingerprint:post:tags:- - Cards- Data- summary: Get or insert the card fingerprint- description: Get or insert the card fingerprint+ summary: Get or insert the data fingerprint+ description: Get or insert the data fingerprint+ parameters:+ - in: header+ name: x-tenant-id+ schema:+ type: stringrequestBody:- description: Provide card number and hash key+ description: Provide data number and hash keycontent:application/json:schema:@@ -232,9 +266,10 @@ components:FingerprintReq:type: objectproperties:- card:- $ref: "#/components/schemas/FingerprintCardData"- hash_key:+ data:+ type: string+ example: 4242424242424242+ key:type: stringexample: Hash1JWEReq:@@ -347,14 +382,8 @@ components:type: objectdescription: Response received if the fingerprint insertion or retrieval was successfulproperties:- status:+ fingerprint_id:type: string- enum: [Ok]- payload:- type: object- properties:- fingerprint:- type: stringJWERes:title: JWERestype: object@@ -369,4 +398,4 @@ components:tag:type: stringencrypted_key:- type: string\ No newline at end of file+ type: string