# Run test purchase

Runs a sandbox purchase of the demo shop's forecast service with one of the organization's agents and returns the payment intent id and status. Console session with agent:create or the Developer role.

`POST /v1/org/onboarding/test-purchase`

Runs a sandbox purchase of the demo shop's forecast service with one of the organization's agents and returns the payment intent id and status. Console session with agent:create or the Developer role.

## Request body

```json
{
  "agent_id": "agt_01jd2x3k4m5n6p7q8r9s0t1v2w"
}
```

## Responses

- **200**: Success.
- **400**: Invalid request: a field is missing or malformed (VALIDATION_ERROR).
- **401**: No valid session, API key or agent credential (UNAUTHENTICATED, AGENT_CREDENTIAL_INVALID).
- **404**: The resource does not exist or belongs to another organization.
- **503**: The payment rail is temporarily unavailable.

Example 200 response:

```json
{
  "intent_id": "pi_01jd2x3k4m5n6p7q8r9s0t1v2w",
  "status": "active"
}
```
