The Stwipe API
The Stwipe API is the simplest payments API in the world, because it has one endpoint and that endpoint always succeeds. We have eliminated error handling at the protocol level. You're welcome.
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.
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.