Skip to main content
POST
/
charge
curl -X POST https://payx.company/api/v1/charge \
  -H "x-api-key: sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1.0,
    "phoneNumber": "0551234987",
    "network": "MTN"
  }'
{
  "message": "Transaction initiated",
  "transactionId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "PENDING"
}

Documentation Index

Fetch the complete documentation index at: https://docs.payx.company/llms.txt

Use this file to discover all available pages before exploring further.

Body Parameters

amount
number
required
The amount to collect in GHS.
phoneNumber
string
required
The customer’s 10-digit mobile money number (e.g., 0551234987).
network
string
required
The network provider. Options: MTN, TELECEL, AIRTELTIGO.
currency
string
default:"GHS"
The currency code. Currently only GHS is supported.
payerMessage
string
A message displayed to the customer on their phone.
payeeNote
string
A private note for your records.

Response

message
string
A summary of the initiation status.
transactionId
string
The unique ID for this transaction. Use this for status checks.
status
string
The current status. Usually PENDING.
curl -X POST https://payx.company/api/v1/charge \
  -H "x-api-key: sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1.0,
    "phoneNumber": "0551234987",
    "network": "MTN"
  }'
{
  "message": "Transaction initiated",
  "transactionId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "PENDING"
}