POST
/
transactions
/
{mode}
const transaction = await Transaction.create(...);
const token = transaction.generateToken().token;
const mode = 'METHODE_PAIEMENT'; // Exemple : 'mtn', 'moov', 'mtn_ci', 'moov_tg'
const phoneNumber = { // Ce paramètre n'est pas obligatoire
  number: '64000001',
  country: 'bj'
};
await transaction.sendNowWithToken(mode, token, phoneNumber);
[
  {
    "reference": "pi_xdc_123456",
    "amount": 1000,
    "status": "pending",
    "currency_id": 840,
    "mode": "automatic",
    "last_error_code": "NO_ERROR",
    "created_at": "2024-10-23T14:00:00Z",
    "updated_at": "2024-10-23T14:00:00Z",
    "approved_at": "2024-10-23T14:31:00Z",
    "canceled_at": "2024-10-23T14:32:00Z",
    "deleted_at": "2024-10-23T14:33:00Z",
    "payment_method_id": 1,
    "transaction_key": "TRANSACTION-XYZ",
    "account_id": 5
  }
]

Authorizations

Authorization
string
header
required

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

Path Parameters

mode
string
required

Transaction ID.

Body

application/json

Response

200
application/json
Transaction sent successfully.

The response is of type object[].