Consuming or connecting your web apps to the OSOFTPAY services is very simple. The basic way is by using REST to make an HTTP POST to send payment details and an HTTP GET to retrieve payment status. We also make use of SHA12 cryptography to hash request details.
Note: The fields below are not all the fields available. These are the required/mandatory fields to POST payment to OSOFTPAY
Field | Field Description | Data Type |
---|---|---|
TransactionType | This is a mandatory field that distinguishes your transaction on the OSOFTPAY. The default value is "2" | numeric |
MerchantNumber | This is a mandatory field that is provided by OSOFTPAY. It is used to identify the merchant placing the POST request. Note that the demonstration MerchantNumber can be obtained when you login to https://developer.osoftpay.net and create a Test Merchant | string |
SiteRedirectURL | This is a mandatory field that you need to provide OSOFTPAY in your POST request to receive notification of your transaction. | url |
TransactionReference | This is a mandatory field that you need to provide OSOFTPAY in your POST request as a unique transaction number. Note that this is what you use to request for or query any transaction from the OSOFTPAY through HTTP GET Request. | string |
CustomerName | This is a mandatory field that you need to provide OSOFTPAY in your POST request as the Name of the Customer. | string |
CustomerId | This is a mandatory field that you need to provide OSOFTPAY in your POST request as an email address. Note that customers receives email notification on payments on this address. Therefore, make sure this is an email address. | string(email) |
PaymentItemName | This is a mandatory field that you need to provide OSOFTPAY in your POST request as the name of the Item you are processing payment for. | string |
Amount | This is a mandatory field that you need to provide OSOFTPAY in your POST request as the cost of the item. Please note that a fee of 1.5%+100 is attracted on each payment as commission. Therefore include the commission on your Item cost to get actual value of the Item cost. | money |
Hash | This is a mandatory field that you need to provide OSOFTPAY in your POST request. This is done using SHA12 cryptography combining MerchantNumber+TransactionReference+TransactionType+Amount+SiteRedirectURL | string |
Note: The fields provided in the form above are required for a successful POST Payment on the OSOFTPAY platform. You can customize the form to receive values as inputs depending on your development platform but make sure the name property is same as used on the sample form.
In order to experience a succesful test, you need to create a merchant on the developers portal, copy the merchant number and the test service name, then use it to perform your test. For example, the default PaymentItemName to use is "TestServiceName1". That is, on the Sample form above, the value of PaymentItemName is value="TestServiceName1".
Getting payment status requires that you Hash your request in the request client header and also specify the media type as "application/json".
Here is a typical ASP.NET C# sample using HttpClient:
To configure split on the OSOFTPAY platform is quite easy. Locate Merchant Setting,
Test card Type to be used is Verve
Test Type | Card Number | Card Expiry | Card CCV2 | Card PIN |
---|---|---|---|---|
Successful Transactions | 6280511000000095 | Dec 2026 | 123 | 0000 |
Insufficient Fund | 5061030000000000027 | Sept 2019 | 123 | 1234 |
Incorrect PIN | 5061030000000000035 | Sept 2019 | 123 | 0000 |
C# Sample Code Click to Download
PHP Sample Code Click to Download
UAT Form Click to Download
Every developer needs to complete this checklisted tasks before golive
For integration support, Send concerns to