- Request structure and mandatory fields
- Authentication handling
- Core payment flows (create, capture, refund, void, query)
- Basic success and failure scenarios
id value is always returned for successful payment creation and all follow-up requests (capture, refund, void or query) must reference this same id.
API environments
The following details should be used for testing your integration in sandbox:| Environment | Base URL | Notes |
|---|---|---|
| Sandbox | https://sandbox-api.paymend.com | Use for testing only. Transactions are simulated. |
Authentication
All API requests require a Bearer token in theAuthorization header:
👉 To get your API token, just reach out to your Paymend sales representative.
- Tokens are issued specifically for sandbox use.
- Requests without valid authentication will return 401 Unauthorized.
- Ensure you are using sandbox credentials when targeting the sandbox environment.
How the simulator works
The sandbox returns simplified, deterministic responses:- A single payment
idis used for all responses. Any request referencing a different paymentidwill fail with a HTTP error. - The simulator does not persist payment state. Dependent requests (capture, refund, void, query) always return a fixed success response regardless of payment history.
- Partial captures and refunds are not supported in the simulator. Any specified amount values (eg.
captureAmount,refundAmount) are ignored. - Mandatory fields defined by the API are enforced.
- Basic validation (eg. on field types) is performed.
Test cards
When creating payments in the sandbox, specific test card numbers determine simulated outcomes. The table below shows which card number and brand values can be passed in thepaymentMethod object during payment creation to receive different status and failure object values in the response.
card.number | card.brand | status | failure.failureCode |
|---|---|---|---|
| 4444444444440000 | VISA | AUTHORIZED / CAPTURED* | |
| 5555555555550000 | MASTERCARD | AUTHORIZED / CAPTURED* | |
| 4444444444440051 | VISA | FAILED | INSUFFICIENT_FUNDS |
| 5555555555550051 | MASTERCARD | FAILED | INSUFFICIENT_FUNDS |
AUTHORIZED or CAPTURED will depend on the value passed in the captureNow field.
Request examples
Click the links in the Endpoints section in the sidebar to see example requests for payment creation, capture, refund and void requests, as well as queries.Next Steps
Once your integration is working smoothly in sandbox:- Request production credentials from Paymend.
- Update your base URL to the production endpoint.
- Perform live transaction testing as needed.

