v2: Start Payment

EF
Last updated 2 months ago

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

post
Start Payment

https://app.collecta.com.ng
/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
Form Data Parameters
Amount
required
number
Amount billed to user
MerchantId
required
string
Your unique Collecta Merchant ID
Hash
required
string
SHA256 of Amount in two decimal places + MerchantId + SecretKey
TransType
optional
string
Short description of the transaction. E.g. Goods Purchase
PayerNumber
optional
string
Identification Number for the user making payment
OtherNames
optional
string
User's othernames
ref
required
string
Your unique transaction reference
Validity
required
string
Duration in seconds before this transaction should expire
PhoneNumber
required
string
User's phone number
SurName
required
string
User's Surname
FirstName
required
string
User's firstname
EmailAddress
required
string
User's email address
200: OK
If call is successful, Collecta will load the payment form
‚Äč

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

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

Always ensure to call the Collecta 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.