GET
/
transactions
/
search
const { FedaPay, Transaction } = require('fedapay');
/* Replace YOUR_SECRETE_API_KEY with your real API key */
FedaPay.setApiKey("YOUR_SECRETE_API_KEY");
/* Specify whether you want to run your query in test mode or live mode */
FedaPay.setEnvironment('sandbox'); //or setEnvironment('live');
/* Show customers */
const transaction = await Transaction.all(params = {}, headers = {});
[
  {
    "id": 123,
    "reference": "<string>",
    "amount": 123,
    "description": "<string>",
    "callback_url": "<string>",
    "status": "<string>",
    "customer_id": 123,
    "currency_id": 123,
    "mode": "<string>",
    "metadata": {},
    "commission": 123,
    "fees": 123,
    "fixed_commission": 123,
    "amount_transferred": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "approved_at": "2023-11-07T05:31:56Z",
    "canceled_at": "2023-11-07T05:31:56Z",
    "declined_at": "2023-11-07T05:31:56Z",
    "refunded_at": "2023-11-07T05:31:56Z",
    "transferred_at": "2023-11-07T05:31:56Z",
    "deleted_at": "2023-11-07T05:31:56Z",
    "last_error_code": "<string>",
    "custom_metadata": {},
    "amount_debited": 123,
    "receipt_url": "<string>",
    "payment_method_id": 123,
    "sub_accounts_commissions": [
      "<any>"
    ],
    "transaction_key": "<string>",
    "merchant_reference": "<string>",
    "account_id": 123,
    "balance_id": 123
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

200 - application/json
List of transactions.
id
integer

Transaction ID.

reference
string

Transaction reference.

amount
integer

Transaction amount.

description
string

Transaction description.

callback_url
string

Transaction callback URL.

status
string

Transaction status (e.g., 'pending', 'approved', 'canceled').

customer_id
integer

Customer ID associated with the transaction.

currency_id
integer

Currency ID associated with the transaction.

mode
string

Transaction mode.

metadata
object

Additional metadata related to the transaction.

commission
integer

Transaction commission.

fees
integer

Transaction fees.

fixed_commission
integer

Fixed commission applied to the transaction.

amount_transferred
integer

Amount transferred to the beneficiary.

created_at
string

Date and time of transaction creation.

updated_at
string

Date and time of last transaction update.

approved_at
string

Date and time of transaction approval.

canceled_at
string

Date and time of transaction cancellation.

declined_at
string

Date and time of transaction decline.

refunded_at
string

Date and time of transaction refund.

transferred_at
string

Date and time of transaction transfer.

deleted_at
string

Date and time of transaction deletion.

last_error_code
string

Last error code encountered during the transaction.

custom_metadata
object

Custom metadata associated with the transaction.

amount_debited
integer

Amount debited from the payer.

receipt_url
string

URL to the transaction receipt.

payment_method_id
integer

Payment method ID used for the transaction.

sub_accounts_commissions
any[]

Commissions applied to sub-accounts.

transaction_key
string

Unique key associated with the transaction.

merchant_reference
string

Merchant reference provided for the transaction.

account_id
integer

Account ID associated with the transaction.

balance_id
integer

Balance ID associated with the transaction.