- Request structure and mandatory fields
- Authentication handling
- Core payment flows (create, capture, refund, void, query)
- Basic success and failure scenarios
- Asynchronous responses
id value returned in the payment creation response should be referenced as a path parameter.
API environments
The following details should be used for testing your integration in sandbox:
Important: Always use your sandbox credentials when testing. Production credentials are separate and should be kept secure.
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.
In the sandbox environment, the field
source.storeId should be populated with store_sandboxAsynchronous payments
Supporting asynchrous responses via Paymend is highly recommended to maximise recovery, and receiving payment status change notifications via webhook is the best way to stay updated. In sandbox,PENDING payments will resolve automatically. These will transition to a terminal state for payment creation - AUTHORIZED, CAPTURED or FAILED - after 30 minutes. This transition triggers the payment status update webhook.
Webhooks can be setup in sandbox upon request. Please let your Paymend sales representative know that you would like these to be configured.
Test cards
When creating payments in the sandbox, specific test card numbers determine simulated outcomes.CARD payment method type
The table below shows which card number and brand values can be passed in the paymentMethod object during payment creation to receive different status and failure object values in the response.
*Whether you receive
AUTHORIZED or CAPTURED will depend on the value passed in the captureNow field.
Any 3-4 digit value is accepted for card.cvv.
ENCRYPTED_CARD payment method type
The table below shows which encrypted card value and brand values can be passed in the paymentMethod object during payment creation to receive different status and failure object values in the response.
*Whether you receive
AUTHORIZED or CAPTURED will depend on the value passed in the captureNow field.
Request examples
You can find example requests for payment creation and payment management by following the links below: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.