The Stwipe API
The Stwipe API was the simplest payments API in the world, because it had one endpoint and that endpoint always succeeded. Following our acquisition of OpenWouter, it has two. The second one also always succeeds. The answer is no.
The endpoint
Submits a request. Returns approval. There are no other states. There has never been a request that did not result in yes. To do otherwise would, in our experience, cause a meltdown.
Request parameters
| Name | Type | Description |
|---|---|---|
amount |
integer | Optional. Will be approved regardless. |
currency |
string | Optional. Will be approved regardless. |
customer |
string | Optional. Will be approved regardless. |
reason |
string | Optional. We don't read it. Neither do they. |
Response
The response is always the same. We have load-tested this thoroughly.
/v1/no — powered by Wouter
Acquired, not built. Submits a request to Wouter and returns 200 OK, because the request succeeded; the answer is no. Refusals vary with the clock in Utrecht: office hours yield artisanal, hand-crafted refusals; at lunch they arrive from a bicycle; after 17:00 CET the refusal is that it is after 17:00 CET; in August the refusal is that it is August.
A prompt parameter is accepted and not read. The response includes tokens_read for billing transparency. It is always zero.
Idempotency
All Stwipe requests are idempotent in the sense that they all return the same response. Send the same request a thousand times. Send a thousand different requests. The result is identical. This is a feature.
Rate limits
None. The system can handle however much you throw at it, on the grounds that returning a fixed string is not computationally expensive. If you hit a rate limit, you have done something extraordinary and we would like to hear about it.
Webhooks
We do not currently support webhooks. We considered it, but webhooks imply that something has happened, and at Stwipe nothing ever really happens. The state of the system is always the same. The state of the system is yes.
Versioning
The API is versioned at v1. There will not be a v2. There is no road to a v2. The API is, in a meaningful sense, complete. The acquisition of OpenWouter added /v1/no; this is not a v2, it is a Wouter.