Initialize Transfer

Initialize a new mobile money transfer transaction between users.

Endpoint

POST /api/transferts/initialise

Request Body

amountrequirednumber
The transfer amount
namerequiredstring
Recipient's name
phonerequiredstring
Recipient's phone number
service_mobile_coderequiredstring
Mobile service code for the recipient

Example Request

POST /api/transferts/initialise
X-API-Key: sk_test_your_api_key_here
Content-Type: application/json
{
  "amount": 2000,
  "name": "John Doe",
  "phone": "+2250102030405",
  "service_mobile_code": "ORANGE_CI"
}

Response

Success Response Example

{
  "id": "transfer_123",
  "reference": "TRANS_123456789",
  "amount": 2000,
  "name": "John Doe",
  "phone": "+2250102030405",
  "service_mobile_code": "ORANGE_CI",
  "status": "INIT",
  "createdAt": "2024-01-15T11:00:00Z",
  "updatedAt": "2024-01-15T11:00:00Z"
}

Error Responses

400 Error Example

{
  "statusCode": 400,
  "message": [
    "phone must be a valid phone number",
    "amount must be a positive number",
    "service_mobile_code must be a valid service code"
  ],
  "error": "Bad Request"
}

401 Error Example

{
  "statusCode": 401,
  "message": "Invalid or missing API key",
  "error": "Unauthorized"
}

422 Error Example

{
  "statusCode": 422,
  "message": "Insufficient balance for transfer",
  "error": "Unprocessable Entity"
}