Skip to main content
This guide will walk you through making your first test payment using Tonder’s Direct API in the sandbox environment.

Prerequisites

Before you begin, make sure you have the following:
  1. Sign in at the Tonder Dashboard with your credentials.
  2. Retrieve your API Key and Secret from the developer section of the dashboard.

Step 1: Set Up Your Environment

You’ll use the sandbox environment for all testing. This allows you to validate your integration end-to-end without processing real money. Use the following base URL for all your test requests:

Required Headers

Every request to the Tonder API must include the following headers: Here’s an example of how to include these headers in your request:

Step 2: Implement the HMAC Signature

To secure your API requests, Tonder uses HMAC-SHA256 signatures to verify that requests are authentic and haven’t been tampered with. For every request that includes a body (like POST or PUT requests), you must generate a unique signature by creating a hash of the request payload using your secret key. This signature proves that the request comes from you and that the data hasn’t been modified in transit.
This example shows how to create an HMAC-SHA256 signature for a payment request and generate the authentication header needed for API calls. The code follows three key steps: serialize the JSON payload with sorted keys for consistency, calculate the HMAC-SHA256 digest using your secret key, and encode the resulting signature in Base64 format.
HMAC validation is configurable for your business. The Direct API Process Transaction endpoint uses HMAC authentication by default. The specific fields used to generate the signature can also be configured. This example assumes the entire request body is used.

Step 3: Make Your First Payment

Now you’re ready to make your first payment. Send a POST request to the Process Transaction endpoint with a request body including the required parameters below: The following example demonstrates a complete payment request using test card data:
If your request is successful, you’ll receive a 201 Created status code and a transaction object in the response body.
The response contains key information for managing your payment: Use the transaction_id to check payment status later, set up webhooks to receive real-time updates, or view transaction details in your dashboard.

Next Steps