🚀 CinetPay Mock Server

Mock payment server for testing CinetPay integration

Server Status: ✅ Running on port 8080

📚 API Documentation

GET /payment

Display payment checkout page

http://localhost:8080/payment?amount=10000&ref=dummyref&callbackurl=http://localhost:4200&poolprizeId=123&backendurl=http://custom-backend:8080

Required: amount, ref, callbackurl, poolprizeId. Optional: backendurl (overrides BACKEND_URL)

POST /validate

Process payment validation

{
  "amount": "10000",
  "ref": "dummyref",
  "callbackurl": "http://localhost:4200",
  "poolprizeId": "123",
  "phone": "1234567890",
  "testMode": false,
  "backendurl": "http://custom-backend:8080"
}

Redirects to: {callbackurl}/pool-prize/{poolprizeId}?reference={ref}

POST /ExecuteTransfer

Execute transfer with async notification

{
  "notifyUrl": "http://your-backend/notify",
  "clientTransactionId": "1234",
  "transactionId": "56789"
}

Returns 200 immediately, then notifies after 10-60 seconds with form-urlencoded data

GET /checkTransferStatus

Check transaction status

http://localhost:8080/checkTransferStatus?transactionId=123&poolprizeId=456

Returns transaction status with current timestamp

GET /transactions

View all logged transactions (debugging)

View Transactions →

💡 Test Mode

Enable "Test Mode" checkbox on the payment page to simulate a failed payment.

⚙️ Configuration

BACKEND_URL: http://localhost:5000

Set via environment variable BACKEND_URL (default: http://localhost:5000)