Purchase API

Network Purchase

This is a call to initiate a Network/WIG purchase. This call has nothing to do with codes.

URL STRUCTURE /purchase/network/{network}
METHOD POST

Parameters

ParameterTypeDescription
{code}StringThe destination network. (eg. mtn, vodacom)
amountBigDecimalThis is optional. If it is left blank the code will have a variable amount.
ReferenceStringThis is a mandatory merchant reference. Use this to link code to a transaction in the merchant system.
msisdnStringThe destination of the PIN push.

Sample Requests

{
amount: 10.5, reference: t0004, msisdn: 278312345678
}

Returns – HTTP 200

ParameterTypeDescription
transactionReferenceLongThis is the transaction reference.
referenceStringThis is the echo of the merchant reference.

Sample Requests

{
transactionReference:  222, reference: test
}

Errors

Http ResponseDescription
432Invalid amount
433Invalid network
434Validation error.
512General system error.

Network Code Purchase

This is a call to initiate a Network/WIG purchase. This call specifies a Code that wishes to be purchased.

URL STRUCTURE /purchase/network/{network}/code
METHOD POST

Parameters

ParameterTypeDescription
{code}StringThe code that is being deleted.
{network}StringThe destination network. (eg. mtn, vodacom)
msisdnStringThe destination of the PIN push.

Returns – HTTP 200

ParameterTypeDescription
transactionReferenceLongThis is the transaction reference.
referenceStringThis is the echo of the merchant reference.

Sample Requests

{
transactionReference:  222, reference: test
}

Errors

Http ResponseDescription
439The code is not valid code.
433Invalid network.
434Client suspended.
443Code locked.
512General System Error.