Authorize, capture, refund and dispute synthetic payments. Isolated educational simulation; no real payment or reservation is made.
Base URL: https://funapi.dev/api/payments/v1 · 7 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.
State transitions and recovery
GET /payments/v1/payments — List synthetic payments · Responds with 200 400 401 404 409 422 Link to this endpointPOST /payments/v1/payments — Authorize a synthetic payment; retry with the same idempotency key (requires Bearer auth) · Responds with 201 400 401 404 409 422 Link to this endpointGET /payments/v1/payments/{id} — Read a payment · Responds with 200 400 401 404 409 422 Link to this endpointPOST /payments/v1/payments/{id}/capture — capture a synthetic payment (requires Bearer auth) · Responds with 200 400 401 404 409 422 Link to this endpointPOST /payments/v1/payments/{id}/refund — refund a synthetic payment (requires Bearer auth) · Responds with 200 400 401 404 409 422 Link to this endpointPOST /payments/v1/payments/{id}/dispute — dispute a synthetic payment (requires Bearer auth) · Responds with 200 400 401 404 409 422 Link to this endpointGET /payments/v1/events — Read deterministic webhook envelopes; reverse order or duplicate an event · Responds with 200 400 401 404 409 422 Link to this endpointA synthetic payment processor: authorize an amount in minor units, capture it once, then refund or dispute it. The event log exposes duplicate and reversed delivery envelopes so a consumer can practise deduplication without charging a card or contacting an external payment provider.
GET https://funapi.dev/api/payments/v1/payments — List synthetic payments. No token, no signup:
curl -i https://funapi.dev/api/payments/v1/payments
Response: 200 OK
{
"data": []
}
Last updated