# request_purchase

Buy one paid resource by service_id or url. The gateway checks your spending rules, pays, and returns the resource. Use a new idempotency_key per purchase; reuse it to retry the same purchase. Never retry a denial.

## Input

- `service_id` (string? (exactly one of service_id, url))
- `url` (string?)
- `task_id` (string)
- `idempotency_key` (string)
- `input` (object?)
- `purpose` (string? (max 500))
- `wait_seconds` (integer? (default 20, max 60))

## Result

```json
{
  "status": "paid | submitted | awaiting_approval | free",
  "intent_id": "",
  "receipt_id": "",
  "resource": {
    "content_type": "",
    "body": "",
    "download_url": ""
  },
  "amount_base_units": "",
  "asset": "",
  "network": "",
  "merchant": {
    "name": "",
    "tier": ""
  },
  "poll_after_ms": 0
}
```

Matching REST operation: `POST /v1/payment-intents`.
