Payments
Square mock API
Stateful Square replica: locations, customers, catalog, orders, payments, refunds and signed webhook subscriptions.
At a glance
- Operations
- 332
- Stateful operations
- 27
- Stateful resources
- 7
- Webhook events
- 6
- Vendor API version
- 2.0
- Verification
- Spec-verified
How it works
Use Square without calling Block, Inc.
- 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 EAAAMockSandboxAccessToken State
Resources that remember
Writes persist per caller, so a create followed by a read returns what you created.
| Resource | Operations |
|---|---|
| Locations | 2 |
| Customers | 6 |
| Catalog | 5 |
| Orders | 3 |
| Payments | 5 |
| Refunds | 2 |
| Webhook subscriptions | 4 |
Webhooks
Events your handlers can receive
- customer.created
- order.created
- payment.updated
- payment.created
- refund.created
- refund.updated
Deliveries are signed with the square scheme, so your verification code runs unchanged.
Coverage
332 operations
27 of them are stateful. The largest groups:
| Group | Operations |
|---|---|
| Other operations | 305 |
| Customers | 6 |
| Catalog | 5 |
| Payments | 5 |
| Webhook subscriptions | 4 |
| Orders | 3 |
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.
1 operations cannot be checked against the specification.
Source and limits
License, source and limits
- Generated from the Block, Inc. API description, licensed under Apache-2.0.
- Block, Inc. 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). Payment outcomes follow Square's sandbox test nonces (cnon:card-nonce-ok, -declined, -rejected-cvv).
MaxoPerf is not affiliated with, endorsed by, or sponsored by Block, Inc. Square is a trademark of its owner.