POST
/
make_payment
Make Payment
curl --request POST \
  --url https://{api_host}/make_payment \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "service_id": 123,
  "customer_number": "<string>",
  "reference": "<string>",
  "transaction_id": "<string>",
  "trans_type": "<string>",
  "amount": 123,
  "nw": "<string>",
  "nickname": "<string>",
  "payment_option": "<string>",
  "currency_code": "<string>",
  "currency_val": "<string>",
  "callback_url": "<string>",
  "request_time": "2023-11-07T05:31:56Z"
}'
{
  "response_message": "<string>",
  "response_code": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
service_id
integer

Your unique service identifier. You'll receive this when you register your service with us.

customer_number
string

The phone number of the customer making the payment. Format: International number without '+' (e.g., '233XXXXXXXXX').

reference
string

Your internal reference for this payment.

transaction_id
string

A unique identifier for this transaction. Ensure this is unique for each request to avoid duplicate transactions. Use this to track the transaction in your system.

trans_type
string

The type of transaction. Use 'CTM' for customer-to-merchant payments (customer payments), 'MTC' for merchant-to-customer transfers (merchant payments).

amount
number

The amount to be transacted. Use a decimal point for fractional amounts (e.g., 10.50).

nw
string

The network provider for mobile money transactions. Use 'MTN' for MTN Mobile Money, 'TEL' for Telecel Cash and 'AIR' for AirtelTigo Cash etc.

nickname
string

You can use your service name or the purpose of the transaction as the nickname as this will be shown on the payers phone when they receive the payment request.

payment_option
string

The payment method. Use 'MOM' for mobile money, 'CRD' for card payments.

currency_code
string

The currency code for the transaction. For example, use 'GHS' for Ghanaian Cedi, 'USD' for US Dollars.

currency_val
string

The currency value. This is typically the amount in the currency specified in the currency_code unless you're dealing with a specific exchange rate scenario.

callback_url
string

Your URL where we'll send transaction status updates. Ensure this endpoint is set up to receive POST requests.

request_time
string<date-time>

The timestamp of your request. Use the format YYYY-MM-DD HH:MM (e.g., '2024-06-28 12:46').

Response

200 - application/json

Payment initiated successfully. Check the response for details on the transaction status.

response_message
string

A human-readable message describing the result of the payment initiation.

response_code
string

A code indicating the status of the payment initiation. Refer to our response code documentation for details.