Payments
GoCardless mock API
GoCardless direct debit: customers, bank accounts, mandates, payments with derive-on-read status, subscriptions, refunds, payouts and signed webhooks.
At a glance
- Operations
- 138
- Stateful operations
- 30
- Stateful resources
- 7
- Webhook events
- 7
- Vendor API version
- 2015-07-06
- Verification
- Spec-verified
How it works
Use GoCardless without calling GoCardless Ltd
- Install the mock from the library into a workspace. It runs as a virtual service.
- Point your client's base URL at the virtual service instead of the vendor.
- Authenticate the way you already do. The mock accepts the same credential shape:
Authorization: Bearer sandbox_ExampleToken0123456789 State
Resources that remember
Writes persist per caller, so a create followed by a read returns what you created.
| Resource | Operations |
|---|---|
| Customers | 5 |
| Customer Bank Accounts | 4 |
| Mandates | 5 |
| Payments | 5 |
| Subscriptions | 6 |
| Refunds | 3 |
| Payouts | 2 |
Webhooks
Events your handlers can receive
- mandates.cancelled
- mandates.created
- mandates.active
- payments.cancelled
- payments.created
- payments.submitted
- payments.confirmed
Deliveries are signed with the hmac scheme, so your verification code runs unchanged.
Coverage
138 operations
30 of them are stateful. The largest groups:
| Group | Operations |
|---|---|
| Other operations | 108 |
| Subscriptions | 6 |
| Customers | 5 |
| Mandates | 5 |
| Payments | 5 |
| Customer Bank Accounts | 4 |
Verification
Spec-verified
Generated operations are checked against the vendor OpenAPI description, which proves shape and routing. Stateful operations and scenario suites prove behaviour. Responses are not yet compared with a live vendor sandbox.
3 operations cannot be checked against the specification.
Source and limits
License, source and limits
- Generated from the GoCardless Ltd API description, licensed under none published (no info.license in the vendor-hosted schema).
- GoCardless Ltd API documentation
- Source specification
Each collection holds up to 1 MiB of objects per access token; writes beyond that are dropped (x-maxoperf-vs-state: capacity). Mandate and payment status progress on read (submitted after 0.5 s, active/confirmed after 1.5 s); the cancel rule uses the time-derived status (no prior read needed); list status filters and the retry rule use the last stored status (a single GET writes the derived status back, so a freshly created payment is listed as pending_submission until it is read); paid_out, charged_back and bank-side failures are not simulated and delayed webhooks are not suppressed when a payment is cancelled early. The created_at[gt] list filter is not applied. The refund over-limit check (422 refund_amount_too_high) is enforced for every payment against amount minus amount_refunded; a refund for an unknown payment answers 404; the payment status is not checked, so a refund on a pending, cancelled or failed payment is accepted (GoCardless only refunds confirmed or paid-out payments). Unknown mandate and customer links on create are accepted. Webhooks are emitted one event per delivery and signed like GoCardless (Webhook-Signature, HMAC-SHA256 hex of the raw body). Event logs are generated, not stateful.
MaxoPerf is not affiliated with, endorsed by, or sponsored by GoCardless Ltd. GoCardless is a trademark of its owner.