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

  • Unique key used to safely retry the same store or delete request. Reuse a key only when retrying an identical request.

Body·

required
application/json

Parameters for creating or replacing a secret.

  • Name used to identify the secret. Names are handled exactly as supplied and are limited to 255 bytes.

  • Value to store. It may be an empty string and must not exceed 64 KiB when encoded as UTF-8.

  • Optional future expiration time. When replacing a secret, omit this field or set it to null to remove its expiration.

  • Account scope. Omit this field, use null, or omit type to use the current account.

    Properties: 1

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/secrets
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"
}