Store a secret
Creates or replaces a named secret for the current account and environment. Use this endpoint when your server needs to store a value for a Paypercut integration.
The response contains metadata only. A matching name replaces the existing value. An account can have up to 100 unexpired secrets.
Headers
- Type: stringIdempotency
- Key max length:255Unique key used to safely retry the same store or delete request. Reuse a key only when retrying an identical request.
Body·
Parameters for creating or replacing a secret.
- Type: stringnamemin length:1max length:255required
Name used to identify the secret. Names are handled exactly as supplied and are limited to 255 bytes.
- Type: stringpayloadrequired
Value to store. It may be an empty string and must not exceed 64 KiB when encoded as UTF-8.
- Type: string | nullFormat: date-timeexpires
_at Optional future expiration time. When replacing a secret, omit this field or set it to
nullto remove its expiration. - Type: nullablescopeProperties: 1
Account scope. Omit this field, use
null, or omittypeto use the current account.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://api.paypercut.io/v1/secrets \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "fulfillment-api-token",
"payload": "REPLACE_WITH_SECRET_VALUE",
"expires_at": null,
"scope": {
"type": "account"
}
}'
{
"id": "secret_01J7H7D4SK8W1Q9K0Y3M6P2T4V",
"object": "secret",
"created": "2026-11-13T07:04:16.895Z",
"updated": "2026-11-13T07:04:16.895Z",
"name": "string",
"livemode": true,
"expires_at": "2026-11-13T07:04:16.895Z",
"scope": {
"type": "account"
},
"payload": "string"
}
