/api/v1/service-credits/:id/request write:service_credit Claims a PENDING credit within the 30-day request window from report_available_at. Only requested credits are applied to your invoice — an unclaimed credit expires unused, so poll GET /service-credits and claim promptly. Requested credits appear as a negative line item (line_type "service_credit") on the next invoice covering a period after the credit’s period_end. Checks run in order — status first, then amount: a credit that is already REQUESTED, APPLIED or EXPIRED returns 409 regardless of its amount; the 400 for a zero credit only occurs on a credit that is still PENDING.
POST /api/v1/service-credits/0/request write These inputs are shared across all docs pages, so an id entered here carries over.
Not run yet. Press Run to make a live call against https://service.rip.fun (through this demo's server-side proxy; the API key never reaches the browser).
curl -X POST 'https://service.rip.fun/api/v1/service-credits/0/request' \ -H 'X-API-Key: rip_…'
data)| Field | Description |
|---|---|
service_credit | Same row shape as List service credits, now with status "REQUESTED" and client_requested_at stamped |
| Status | Code | When |
|---|---|---|
| 400 | invalid request | id not a positive integer, or credit_cents ≤ 0 (nothing due) |
| 404 | not found | credit not part of your account |
| 409 | not requestable | credit is not PENDING, or the request window has elapsed (the latter flips the status to EXPIRED as a side effect) |
See Errors for the response envelope and the full code list.