Initialize Payment

Once user is ready to make payment on your website or app, follow the instructions here to redirect user with payment payload to A1Pay for payment processing.

post
Start Payment

https://a1pay.net/pay/pay
Submit an HTML form to this endpoint. Method should be POST and the action should be set to the URL above
Request
Response
Request
Form Data Parameters
TransType
optional
string
Short description of the type of transaction e.g School Fees
PayerNumber
optional
string
Identification number for the user making payment
OtherNames
optional
string
User's othernames or middlename
ref
required
string
Your unique transaction reference.
Validity
required
number
Duration in seconds before this payment should expire
PhoneNumber
required
string
User's Phone number
SurName
required
string
User's Surname or Lastname
FirstName
required
string
User's firstname
EmailAddress
required
string
User's email address
Amount
required
number
How much the user is expected to pay for the goods or service
MerchantId
required
string
Your Merchant ID provided to you at registration
hash
required
string
SHA256 of Amount in two decimal places + MerchantId + SecretKey
Response
200: OK
If call is successful, A1Pay will load the payment form

Ensure that you have your CallbackURL and ReturnURL ready to receive responses from A1Pay. Once a transaction is successful, A1Pay will redirect the user to your ReturnURL with URL parameter Ref which is the A1Pay transaction reference along with URL parameter Response which will be 00 if the transaction is successful.

Another URL parameter MerchantRef will also be passed to your ReturnURL. This will hold your unique transaction reference, and you can query A1Pay with this parameter. See more on this here.

A1Pay will also send a post request to your CallbackURL with the transaction status

Always ensure to call the A1Pay Query secure endpoint to confirm the transaction status received by the ReturnURL, this is the recommended practice to prevent malicious users from circumventing your system.