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
token
integer
required

Transaction token

Example:

1

phone_number
object

Phone number details

Response

200
application/json
Transaction sent successfully.
reference
string

Payment intent reference.

Example:

"pi_xdc_123456"

amount
integer

Payout amount.

Example:

1000

status
string

Intent status (e.g., 'pending', 'scheduled', 'sent', 'failed').

Example:

"pending"

currency_id
integer

Currency ID associated with the payout.

Example:

840

mode
string

Payout mode.

Example:

"automatic"

last_error_code
string

Last error code encountered during the payout.

Example:

"NO_ERROR"

created_at
string

Date and time of payout creation.

Example:

"2024-10-23T14:00:00Z"

updated_at
string

Date and time of last payout update.

Example:

"2024-10-23T14:00:00Z"

approved_at
string

Date and time the payout was sent.

Example:

"2024-10-23T14:31:00Z"

canceled_at
string

Date and time the payout failed.

Example:

"2024-10-23T14:32:00Z"

deleted_at
string

Date and time of payout deletion.

Example:

"2024-10-23T14:33:00Z"

payment_method_id
integer

Payment method ID used for the payout.

Example:

1

transaction_key
string

Unique key associated with the payout.

Example:

"TRANSACTION-XYZ"

account_id
integer

Account ID associated with the payout.

Example:

5