Payments History

Use the following endpoint to retrieve detailed information about payments, including amounts, transactions, conversions, and notifications.

Parameter Descriptions:

ParameterDescription

PaymentId

Unique identifier of the payment

TerminalId

Identifier of the terminal

MerchantId

Identifier of the merchant

TrackingId

Tracking identifier

Page

Page number for pagination (default is 0)

PageSize

Number of items per page (default is 10)

From

Start date for filtering

To

End date for filtering

SortBy

Field to sort by

SortDirection

Direction of sorting (asc or desc)

Example API call using Node.js:

const axios = require('axios');

async function getPaymentHistory() {
    try {
        const response = await axios.get('https://api.example.com/Payments/info/history', {
            params: {
                PaymentId: '12345',
                TerminalId: '67890',
                Page: 1,
                PageSize: 20
                // Add more query parameters as needed
            },
            headers: {
                'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
            }
        });
        console.log(response.data);
    } catch (error) {
        console.error('Error fetching payment history:', error);
    }
}

getPaymentHistory();

Example API call using JAVA:

import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

import java.io.IOException;

public class ApiClient {
    private static final String BASE_URL = "https://api.example.com/Payments/info/history";
  public static void main(String[] args) {
    OkHttpClient client = new OkHttpClient();
    HttpUrl.Builder urlBuilder = HttpUrl.parse(BASE_URL).newBuilder();
    urlBuilder.addQueryParameter("PaymentId", "12345");
    urlBuilder.addQueryParameter("TerminalId", "67890");
    urlBuilder.addQueryParameter("Page", "1");
    urlBuilder.addQueryParameter("PageSize", "20");
    // Add more query parameters as needed

    String url = urlBuilder.build().toString();
    Request request = new Request.Builder()
            .url(url)
            .header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
            .build();

    try (Response response = client.newCall(request).execute()) {
        if (!response.isSuccessful()) {
            throw new IOException("Unexpected code " + response);
        }

        System.out.println(response.body().string());
    } catch (IOException e) {
        e.printStackTrace();
    }
}
}

Last updated