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

Parameter

Type

Description

{code}

String

The destination network. (eg. mtn, vodacom)

amount

BigDecimal

This is optional. If it is left blank the code will have a variable amount.

Reference

String

This is a mandatory merchant reference. Use this to link code to a transaction in the merchant system.

msisdn

String

The destination of the PIN push.

Sample Requests

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

Returns – HTTP 200

Parameter

Type

Description

transactionReference

Long

This is the transaction reference.

reference

String

This is the echo of the merchant reference.

Sample Requests

{
transactionReference:  222, reference: test
}

Errors

Http Response

Description

432

Invalid amount

433

Invalid network

434

Validation error.

512

General 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

Parameter

Type

Description

{code}

String

The code that is being deleted.

{network}

String

The destination network. (eg. mtn, vodacom)

msisdn

String

The destination of the PIN push.

Returns – HTTP 200

Parameter

Type

Description

transactionReference

Long

This is the transaction reference.

reference

String

This is the echo of the merchant reference.

Sample Requests

{
transactionReference:  222, reference: test
}

Errors

Http Response

Description

439

The code is not valid code.

433

Invalid network.

434

Client suspended.

443

Code locked.

512

General System Error.