v1: Collection API

EF
Last updated 3 months ago

Collecta helps you to receive money easily with simple integrations. This documentation is obsolete, it still works but we advise that you use the V2 documentation

post
Initialize Payment

https://www.collecta.com.ng/pay
/?i=Handle
Add the form data parameters as hidden fields within a form whose action is set to the endpoint above.
Request
Response
Path Parameters
i
required
string
Handle of your collection account as setup on Collecta
Form Data Parameters
PhoneNumber
required
string
Phone number of the user making payment
Email
required
string
Email of the user making payment
PayerName
required
string
Name of the user making payment
Hash
required
string
The secure Hash value for this transaction which is your URL + TransactionId + Amount + SecretKey hashed with SHA512
TransactionId
required
string
The reference ID for this transaction on your system
Amount
required
string
Amount in Naira
URL
required
string
Your payment collection Handle. Has to be the same as the i parameter in the endpoint URL
ReturnURL
required
string
URL of the path in your application that Collecta will send payment response to
200: OK
Collecta payment page loads successfully

After transaction is complete at Collecta. Collecta will redirect the user to your ReturnURL passed above with your TransactionId. You will then need to query Collecta securely to get the transaction status.

post
Query Transaction Status

https://www.collecta.com.ng
/confirm
Call this endpoint to query Collecta for transaction status
Request
Response
Path Parameters
Hash
required
string
The secure Hash for this transaction which is your URL + TransactionId + Amount + SecretKey Hashed with SHA512
TransactionId
required
string
The unique transaction ID for this transaction on your system
URL
required
string
Your collection account handle as configured in your Collecta dashboard
200: OK
status: success / error
data: {
Id: 0, ResponseCode: '', TransactionId: '', Status: '', Message: ''
}

You will know that your transaction is successful when status = success and data.Status = 1