Integrations

Transactions

List transactions and retrieve the details or latest status of a payment.

Overview

Collection and disbursement responses return a payment_id. Store this identifier and use it to retrieve the payment or request its latest transaction status.

Retrieve transaction information

Payment identifiers

The response from a collection or disbursement request includes payment_id. Store it with your own external_id so you can reconcile the payment later.

Use the TricsoftPay payment_id, not external_id, when requesting payment details or status.

List transactions

Use GET {{base_url}}/payments to retrieve transactions. Results are paginated and can be filtered by status.

Query parameters

ParameterTypeDescription
page integer The page to return. Defaults to 1.
page_size integer The number of transactions per page. Defaults to 25.
status string Optional. Use pending, successful, or failed.
List request
const { data } = await paymentGateway.get("{{base_url}}/payments", {
  params: { page: 1, page_size: 25, status: "successful" },
});

Get payment details

Use GET {{base_url}}/payments/{payment_id} to retrieve one payment. Replace {payment_id} with the identifier returned when the payment was created.

Details request
const paymentId = "payment_id_from_creation_response";
const { data } = await paymentGateway.get(`{{base_url}}/payments/${paymentId}`);

Check transaction status

Use POST {{base_url}}/payments/status with payment_id to retrieve the latest state of a payment.

Request fields

FieldTypeDescription
payment_id string The TricsoftPay payment identifier returned by the collection or disbursement request.
Status request
const paymentId = "payment_id_from_creation_response";
const { data } = await paymentGateway.post("{{base_url}}/payments/status", {
  payment_id: paymentId,
});