Find a Secret 

Finds a secret in the secret store by name and scope.

Parameters

  • namestringRequired

    A name for the secret that’s unique within the scope.

  • scopeobjectRequired

    Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

Returns

Returns a secret object.

GET /v1/apps/secrets/find
curl -G https://api.stripe.com/v1/apps/secrets/find \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d name=my-api-key \
-d "scope[type]"=account
Response
{
"id": "appsecret_5110hHS1707T6fjBnah1LkdIwHu7ix",
"object": "apps.secret",
"created": 1680209063,
"expires_at": null,
"livemode": false,
"name": "my-api-key",
"scope": {
"type": "account"
}
}

Set a Secret 

Create or replace a secret in the secret store.

Parameters

  • namestringRequired

    A name for the secret that’s unique within the scope.

  • payloadstringRequired

    The plaintext secret value to be stored.

  • scopeobjectRequired

    Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

  • expires_attimestamp

    The Unix timestamp for the expiry time of the secret, after which the secret deletes.

Returns

Returns a secret object.

POST /v1/apps/secrets
curl https://api.stripe.com/v1/apps/secrets \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d name=my-api-key \
-d payload=secret_key_xxxxxx \
-d "scope[type]"=account
Response
{
"id": "appsecret_5110hHS1707T6fjBnah1LkdIwHu7ix",
"object": "apps.secret",
"created": 1680209063,
"expires_at": null,
"livemode": false,
"name": "my-api-key",
"scope": {
"type": "account"
}
}

Reserves 

Reserves allow Connect platforms who own liability for negative balances to hold a portion of a connected account’s funds to cover refunds and disputes and reduce loss exposure. The Reserves feature is part of the Radar for Platforms product which is currently in private preview. See this page to request early access.

Reserve Holds Preview

ReserveHolds are used to place a temporary ReserveHold on a merchant’s funds.

Reserve Plans Preview

ReservePlans are used to automatically place holds on a merchant’s funds until the plan expires. It takes a portion of each incoming Charge (including those resulting from a Transfer from a platform account).