POST
/
transactions
const { FedaPay, Transaction } = require('fedapay');
FedaPay.setApiKey('YOUR_SECRET_API_KEY');
FedaPay.setEnvironment('sandbox');
const transaction = await Transaction.create({
  description: 'Payment for order #1234',
  amount: 1000,
  currency: { iso: 'XOF' },
  callback_url: 'https://example.com/callback',
  mode: 'mtn_open',
  customer: { id: 1 }
});
{
  "id": 123,
  "reference": "<string>",
  "amount": 123,
  "description": "<string>",
  "callback_url": "<string>",
  "status": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Response

201
application/json
Transaction created successfully.

The response is of type object.