Endpoints
Learn how to automatize your reconciliation tasks by integrating the endpoints of our Reconciliation API
Login Endpoint
Once your account is ready to use the Merchants API, the first step will be authenticating yourself. This authentication process necessitates the submission of a POST request to the login endpoint. mentioned below. This request should include the accessKey (email) and secretKey (password) in JSON format to validate and establish the user's credentials.
Login to API user
POST
https://merchants-api-stg.directa24.com/v1/auth/login
Staging POST https://merchants-api-stg.directa24.com/v1/auth/login
Production POST https://merchants-api.directa24.com/v1/auth/login
Request Body
Name | Type | Description |
---|---|---|
accessKey* | string | Configured API User email address |
secretKey* | string | Configured API User's password |
Make sure you add in the header of the request the following value: Content-Type: application/json
Switch Context Endpoint
In some cases where a reconciliation user needs to fetch reports from more than one MIDs that the user belongs to, The Switch context endpoint allows you to switch effortlessly between MIDS irrespective of number of MIDS the user account belongs.
Switch Between MIDs
POST
https://merchants-api-stg.directa24.com/v1/auth/[MID]/switchContext
Staging POST https://merchants-api-stg.directa24.com/v1/auth/[MID]/switchContext
Production POST https://merchants-api.directa24.com/v1/auth/[MID]/switchContext
Headers
Name | Type | Description |
---|---|---|
Content-Type | String |
|
Cookie | String | BEARER |
Replace the [MID] in the urls above with your merchant MID
Note: You can not switch to an account that the user does not belong as a user.
If switched from MID A to MID B, note that all responses from other endpoints will fetch reports from MID B.
BEARER_TOKEN cookie
Upon successful authentication, the response will include a header field named Set-Cookie. This particular field will carry a cookie labeled as BEARER_TOKEN that has to be sent back to the server in all the following requests to stay logged in.
Example of a cookie in the header with the BEARER_TOKEN value:
See this page to learn more about cookies.
TRANSACTIONS ENDPOINT
Described below the endpoints for each kind of transactions.
To send requests, ensure you include the BEARER_TOKEN obtained from the Login Endpoint in the Authentication header field of the requests. You can use it in the following ways:
As part of the header:
Or as a cookie:
There are certain parameter you can send in the GET request. These parameters come in pairs of names and values known as name-value pairs. They're added to the URL following a “?” sign, and multiple parameters can be utilized, separated by an “&” sign. The name and value are always separated using an “=” sign.
The syntax is as follows (examples):
Staging https://merchants-api-stg.directa24.com/v1/cashouts?page=0&from=1577836800&to=1580515200
Production https://merchants-api.directa24.com/v1/cashouts?page=0&from=1577836800&to=1580515200
The "from" and "to" values follow the unixTimeStamp format, allowing a maximum difference of up to 60 days between them. The "from" value cannot exceed the "to" value.
A basic response has the following format:
The data field, is an array that will contain multiple JSON objects, one for each transaction. Each with its own details.
The response from these endpoints can display a maximum of 50 records per page. In case there are more than 50 records, you will have to request for the next page using the page parameter in the GET request. Always start with page=0.
The rows field, indicates how many transactions the request returned.
The maxRows field shows the maximum transactions a request can retrieve. In case the "rows" is equal to "maxRows", you should do another request specifying the page plus one. Repeat this until the rows value is lesser than the maxRows one.
Deposits Endpoint
Retrieve deposit details
GET
https://merchants-api-stg.directa24.com/v1/deposits
This endpoint allows you to retrieve the details of all your Deposits in a given time.
Staging: GET https://merchants-api-stg.directa24.com/v1/deposits
Production: GET https://merchants-api.directa24.com/v1/deposits
Query Parameters
Name | Type | Description |
---|---|---|
from | integer | Transaction creation date interval in UnixTimeStamp format. |
to | integer | Transaction creation date interval in UnixTimeStamp format - max difference with "from" value 60 days. |
page | integer | The page number. Each page contains as many transactions as indicated in the maxRows value. |
country | String (max length: 2) | Country´s code. Click here to see the list of countries. |
paymentMethod | String (max length: 2) | Payment Method code. See Payment Methods for its codes. |
status | String | Transaction´s status. Values: PENDING APPROVED COMPLETED CANCELLED DECLINED |
clientDocument | String | The customer´s document. |
Headers
Name | Type | Description |
---|---|---|
Content-Type | String |
|
Cookie | String |
|
Authorization | String |
|
The parameter "Status" may have either of the following status
PENDING
, APPROVED
, COMPLETED
, CANCELLED
, DECLINED
Cashouts Endpoint
Retrieve Cashout details
GET
GET https://merchants-api-stg.directa24.com/v1/cashouts
This endpoint allows you to retrieve the details of all your Cashouts in a given time.
Staging: GET https://merchants-api-stg.directa24.com/v1/cashouts
Production: GET https://merchants-api.directa24.com/v1/cashouts
Query Parameters
Name | Type | Description |
---|---|---|
from | integer | Transaction creation date interval in UnixTimeStamp format. |
to | integer | Transaction creation date interval in UnixTimeStamp format - max difference with "from" value 60 days. |
page | integer | The page number. Each page contains as many transactions as indicated in the maxRows value. |
country | String (max length: 2) | Country´s code. Click here to see the list of countries. |
Status | String | Transaction status. Values: ON_HOLD PENDING DELIVERED COMPLETED REJECTED CANCELLED DECLINED |
clientDocument | String | The customer´s document. |
Headers
Name | Type | Description |
---|---|---|
Content-Type | String |
|
Cookie | String |
|
Authorization | String |
|
The parameter "Status" may have either of the following status
ON_HOLD
, PENDING
, DELIVERED
, COMPLETED
, REJECTED
, CANCELLED
, DECLINED
Credit and Debit Notes Endpoint
This specific endpoint allow users to access comprehensive details pertaining to all Credit and Debit Notes within a specified time frame.
Retrieve credit/Debit note details
GET
https://merchants-api-stg.directa24.com/v1/notes
This specific endpoint empowers users to access comprehensive details pertaining to all Credit and Debit Notes within a specified time frame.
Staging GET https://merchants-api-stg.directa24.com/v1/notes
Production GET https://merchants-api.directa24.com/v1/notes
Query Parameters
Name | Type | Description |
---|---|---|
from | integer | Transaction creation date interval in UnixTimeStamp format. |
to | integer | Transaction creation date interval in UnixTimeStamp format - max difference with "from" value 60 days. |
page | integer | The page number. Each page contains as many transactions as indicated in the maxRows value. |
type | string | Credit/debit note types; GENERIC_CREDIT_NOTE, SERVICE_FEE_CREDIT_NOTE, CHARGEBACK_COVERED_CREDIT_NOTE, GENERIC_DEBIT_NOTE REFUND, REFUND_PROCESSING_FEE, CASHOUT_TRANSACTION, CASHOUT_PROCESSING_FEE, CHARGEBACK, CHARGEBACK_PROCESSING_FEE, SERVICE_FEE_DEBIT_NOTE |
Refunds Endpoint
This endpoint allows you to retrieve the details of all your Refunds in a given time.
Refund endpoint parameters
GET
https://merchants-api-stg.directa24.com/v1/refund
Staging: GET https://merchants-api-stg.directa24.com/v1/refund
Production: GET https://merchants-api.directa24.com/v1/refund
Query Parameters
Name | Type | Description |
---|---|---|
from | integer | Transaction creation date interval in UnixTimeStamp format. |
to | integer | Transaction creation date interval in UnixTimeStamp format - max difference with "from" value 60 days. |
page | integer | The page number. Each page contains as many transactions as indicated in the maxRows value. |
country | String (max length: 2) | Country code. Click here to see the list of countries. |
paymentMethod | String (max length: 2) | Payment Method code. See Payment Methods for its codes. |
status | string | Transaction status |
Transaction Status Values
PENDING
, COMPLETED
, CANCELLED
, WAITING_DETAILS
Chargebacks Endpoint
This endpoint allows you to retrieve the details of all your Chargebacks in a given time.
Chargeback
GET
https://merchants-api-stg.directa24.com/v1/chargeback
Staging GET https://merchants-api-stg.directa24.com/v1/chargeback
Production GET https://merchants-api.directa24.com/v1/chargeback
Query Parameters
Name | Type | Description |
---|---|---|
from | integer | Transaction creation date interval in UnixTimeStamp format. |
to | integer | Transaction creation date interval in UnixTimeStamp format - max difference with "from" value 60 days. |
page | integer | The page number. Each page contains as many transactions as indicated in the maxRows value. |
country | String (max length: 2) | Country code. Click here to see the list of countries. |
status | string | Transaction status Values: PENDING, COMPLETED, CANCELLED, FAILED |
Settlements Endpoint
This endpoint allows you to retrieve the details of all your Settlements in a given time.
Settlement Endpoint
GET
https://merchants-api-stg.directa24.com/v1/settlements
Staging: GET https://merchants-api-stg.directa24.com/v1/settlements
Production: GET https://merchants-api.directa24.com/v1/settlements
Query Parameters
Name | Type | Description |
---|---|---|
from | integer | Transaction creation date interval in UnixTimeStamp format. |
to | integer | Transaction creation date interval in UnixTimeStamp format - max difference with "from" value 60 days. |
page | integer | The page number. Each page contains as many transactions as indicated in the maxRows value. |
Status | string | Transaction status Values: PENDING, COMPLETED, CANCELLED, FAILED |
Balance Report Endpoint
This endpoint allows you to retrieve the details of your daily Balance Report in a given time.
Balance Report Endpoint
GET
https://merchants-api-stg.directa24.com/v1/balance/report
Staging GET https://merchants-api-stg.directa24.com/v1/balance/report
Production GET https://merchants-api.directa24.com/v1/balance/report
Query Parameters
Name | Type | Description |
---|---|---|
from | integer | Transaction creation date interval in UnixTimeStamp format. |
to | integer | Transaction creation date interval in UnixTimeStamp format - max difference with "from" value 60 days. |
page | integer | The page number. Each page contains as many transactions as indicated in the maxRows value. |
Total Available Balance Endpoint
This endpoint allows you to retrieve the details of your Total Available Balance.
Staging: GET
https://merchants-api-stg.directa24.com/v1/balance
Production: GET
https://merchants-api.directa24.com/v1/balance
Logout Endpoint
DELETE
https://merchants-api-stg.directa24.com/v1/auth/session/destroy
The token expires after 15 minutes of its last usage. In case of wanting to terminate the session earlier, you will have to use the mentioned endpoint with the DELETE method. This will take the BEARER_TOKEN in the header of the request and invalidate it for future usages.
Staging: DELETE https://merchants-api-stg.directa24.com/v1/auth/session/destroy
Production: DELETE https://merchants-api.directa24.com/v1/auth/session/destroy
Headers
Name | Type | Description |
---|---|---|
Cookie | String |
|
Once the token is invalidated, you will need to authenticate again before sending a new request.
Last updated