Add Data in Locker
POST /data/add
Description: Store card data in the locker. The request body might be JWE + JWS encrypted when using middleware.
Example (cURL)
curl --request POST \
--url https://api.example.com/data/add \
--header 'Content-Type: application/json' \
--data '
{
"merchant_id": "m0100",
"merchant_customer_id": "HsCustomer1",
"requester_card_reference": "3ffdf1e5-7f38-4f26-936f-c66a6f4296fa",
"card": {
"card_number": "<string>",
"name_on_card": "<string>",
"card_exp_month": "<string>",
"card_exp_year": "<string>",
"card_brand": "<string>",
"card_isin": "<string>",
"nick_name": "<string>"
},
"enc_card_data": "qwe4tyusdfg"
}
'Headers
x-tenant-id (string)
Body (application/json)
The request body might be JWE + JWS encrypted when using middleware.
Accepted body schema examples:
StoreDataReq
JWEReq
Body fields:
merchant_id — string Example: "m0100"
merchant_customer_id — string Example: "HsCustomer1"
requester_card_reference — string Example: "3ffdf1e5-7f38-4f26-936f-c66a6f4296fa"
card — object Card attributes:
card_number — string
name_on_card — string
card_exp_month — string
card_exp_year — string
card_brand — string
card_isin — string
nick_name — string
enc_card_data — string Example: "qwe4tyusdfg"
Response (200 — application/json)
Response schema examples:
StoreDataRes
JWERes
Successful response example:
Fields:
status — enum Available options:
Okpayload — object Contains child attributes (e.g., card_reference)
Related links
Documentation: https://api-reference.hyperswitch.io/introduction
Locker API Reference: https://api-reference.hyperswitch.io/locker-api-reference/overview
Suggest edits: https://github.com/juspay/hyperswitch/edit/main/api-reference/locker-api-reference/cards/add-data-in-locker.mdx
Raise issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/locker-api-reference/cards/add-data-in-locker
Unlock the locker: https://api-reference.hyperswitch.io/locker-api-reference/key-custodian/unlock-the-locker
Delete Data from Locker: https://api-reference.hyperswitch.io/locker-api-reference/cards/delete-data-from-locker