Skip to main content

MoyaPay API

The MoyaPay API lets your platform collect money (payin) and send money (payout) through the major mobile money operators, with a single integration.

Base URL​

https://services.moya-pay.com/service/api/v1

All requests use HTTPS and JSON (Content-Type: application/json).

What you need​

MoyaPay provides the following when your account is opened:

ItemPurpose
An API email and passwordGet an access token (/login)
Your merchant reference (refercence_cl)Identifies your account in every request
Your business code (business_code)Identifies the business a transaction belongs to
Your callback URLReceives the final result of transactions
A signing secretVerify that callbacks really come from MoyaPay
The payment methods enabled on your accountSee Payment methods

Quick start​

1. Get a token (valid for 5 hours):

curl -X POST https://services.moya-pay.com/service/api/v1/login \
-H "Content-Type: application/json" \
-d '{"email": "api@your-company.com", "password": "your-password"}'

2. Initiate a payment with that token:

curl -X POST https://services.moya-pay.com/service/api/v1/payin \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"refercence_cl": "CL-123456",
"business_code": "MYP-000000-ABCDEF",
"country_code": "CI",
"payment_method": "WAVE_CI",
"merchant_transaction_id": "ORDER-2026-000123",
"amount": 1000,
"currency": "XOF",
"telephone": "0505000000",
"successUrl": "https://shop.example.com/payment/success",
"failedUrl": "https://shop.example.com/payment/failed",
"notifyUrl": "https://shop.example.com/api/moyapay/notify"
}'

3. Follow the result: MoyaPay calls your callback when the transaction completes, and you can query its status at any time.

Key principles​

  • Transactions are asynchronous. The response to /payin or /payout confirms the request was accepted (status PENDING), not that money has moved. The final result (SUCCESS or FAILED) comes later.
  • merchant_transaction_id is your identifier. It must be unique: it is the key used to query the status and to prevent duplicates. Uniqueness is enforced across the whole platform, so choose distinctive identifiers (your company prefix, a UUID...).
  • Legacy field names. Some names keep their original spelling, for example refercence_cl. Send them exactly as shown.
  • Read the response body. Check the success field, not only the HTTP status. See Errors.

Postman collection​

A ready-to-use Postman collection is available: moyapay-api.postman_collection.json.

To use it:

  1. In Postman, click Import and select the downloaded file.
  2. Create an environment, select it, and add the variable url with the value https://services.moya-pay.com.
  3. In the AccesToken request (TOKEN folder), enter your email and password, then send it: the token is stored automatically in the environment's token variable and used by the other requests.
  4. In PAYIN, PAYOUT and PAYMENT STATUS, replace the example values (refercence_cl, business_code, merchant_transaction_id, telephone...) with your own.