Collect
Get a transaction
API Documentation
- Introduction to the FedaPay API
- Customers
- Collect
- Payouts
- Events
- Balances
- Currencies
- Logs
- Webhooks
Collect
Get a transaction
GET
/
transactions
/
{id}
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 transactions */
const transaction = await Transaction.retrieve(ID, 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
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Transaction ID.
Response
200
application/json
Transaction retrieved successfully.
The response is of type object
.
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 transactions */
const transaction = await Transaction.retrieve(ID, 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
}