> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyspend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Stripe client secret

Retrieves a Stripe client secret for payment processing using a payment intent ID

` GET /stripe/clientSecret `

Get Stripe client secret

Retrieves a Stripe client secret for payment processing using a payment intent ID

## Servers

- ` https://mainnet.anyspend.com ` — Production server

## Parameters

### ` paymentIntentId ` (query, required)

Stripe payment intent ID to retrieve client secret for

- ` value `: type ` string `

Example:

```json
"pi_3RlHbVJnoDg53PsP1349cXlR"
```

## Responses

### ` 200 ` — Client secret retrieved successfully

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` success `, ` message `, ` data `, ` statusCode `

  - ` success `: type ` boolean `

    - example: ` true `

  - ` message `: type ` string `

    - example: ` "Client secret retrieved" `

  - ` data `: type ` string ` — Stripe client secret for the payment intent

    - example: ` "pi_3RlHbVJnoDg53PsP1349cXlR_secret_084W7pxxba11lTUHWbmeZlXi0" `

  - ` statusCode `: type ` number `

    - example: ` 200 `

### ` 400 ` — Bad request - PaymentIntentId is required or invalid

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` success `, ` message `, ` statusCode `

  - ` success `: type ` boolean `

    - example: ` false `

  - ` message `: type ` string `

    - example: ` "PaymentIntentId is required" `

  - ` statusCode `: type ` number `

    - example: ` 400 `

## Request examples

### cURL

```curl
curl -X GET 'https://mainnet.anyspend.com/stripe/clientSecret?paymentIntentId=pi_3RlHbVJnoDg53PsP1349cXlR'
```

### JavaScript

```javascript
const response = await fetch('https://mainnet.anyspend.com/stripe/clientSecret?paymentIntentId=pi_3RlHbVJnoDg53PsP1349cXlR', {
  method: 'GET'
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

response = requests.get('https://mainnet.anyspend.com/stripe/clientSecret?paymentIntentId=pi_3RlHbVJnoDg53PsP1349cXlR')
print(response.json())
```