Requests a token purchase for a specified meter.

Requests that the provider issue a token against the meter for a given monetary value. In the case that the meter and/or utility supports the issue of free tokens under a basic service support tariff scheme, then any free tokens due will also be returned. If the requested amount is 0 and a free token is due to the meter, then only this free token will be returned. A portion of the request amount may be used by the provider to offset outstanding debt or service charges owed by the customer, in which case the value of the token returned may be less than the request amount (see interface documentation for further details).

Request
Security:
path Parameters
purchaseId
required
string

The randomly generated UUID of this request.

Request Body schema: application/json

A token purchase request.

required
object (Meter)

Data associated with a prepaid utility meter

required
object (LedgerAmount)

An amount object only containing value and currency, and optionally an indicator of DEBIT/CREDIT

utilityType
string

Type of utility purchase being requested (e.g. electricity, water, gas).

msisdn
string(^\+?[1-9]\d{1,14})|(^[0][0-9]{9})

Mobile phone number of the customer to which the outcome of a transaction can be communicated. This should conform to the ITU E.164 numbering plan (https://www.itu.int/rec/T-REC-E.164/en), but a 10-digit number beginning with zero is also acceptable.

Array of objects (Tender)

An array of tenders used to pay for the transaction. This is used if payment is tendered at the point of sale. A Tender differs from a PaymentMethod in that the former represents a payment that has already been collected at the point of sale, whereas the latter represents a payment that still needs to be collected from a third party.

id
required
string

The randomly generated UUID identifying this transaction, as defined for a variant 4 UUID in RFC 4122

time
required
string <date-time>

The date and time of the message as recorded by the sender. The format shall be as defined for date-time in RFC 3339 section 5.6. It is recommended that the optional time-secfrac be included up to millisecond precision

required
object (Originator)

The Originator object encapsulates data relating to the originator of the transaction

required
object (Institution)

Originating, acquiring, processing, or receiving institution details

object (Institution)

Originating, acquiring, processing, or receiving institution details

object (Institution)

Originating, acquiring, processing, or receiving institution details

required
Array of objects (ThirdPartyIdentifier)

An array of identifiers which each identify the transaction within each entity's system.

object (SlipData)

Data that may be printed on the customer slip for information purposes

basketRef
string

Used to group multiple transactions which would otherwise be considered independent.

tranType
string

Data relating to the type of transaction taking place (i.e. cash withdrawal, goods and services etc.).

Enum: "GOODS_AND_SERVICES" "CASH_WITHDRAWAL" "DEBIT_ADJUSTMENT" "GOODS_AND_SERVICES_WITH_CASH_BACK" "NON_CASH" "RETURNS" "DEPOSIT" "CREDIT_ADJUSTMENT" "GENERAL_CREDIT" "AVAILABLE_FUNDS_INQUIRY" "BALANCE_INQUIRY" "GENERAL_INQUIRY" "CARD_VERIFICATION_INQUIRY" "CARDHOLDER_ACCOUNTS_TRANSFER" "GENERAL_TRANSFER" "PAYMENT_FROM_ACCOUNT" "GENERAL_PAYMENT" "PAYMENT_TO_ACCOUNT" "PAYMENT_FROM_ACCOUNT_TO_ACCOUNT" "PLACE_HOLD_ON_CARD" "GENERAL_ADMIN" "CHANGE_PIN" "CARD_HOLDER_INQUIRY" "POINTS_INQUIRY"
srcAccType
string

This specifies the type of source account being used in the transaction (i.e. cheque, savings).

Enum: "DEFAULT" "SAVINGS" "CHEQUE" "CREDIT" "UNIVERSAL" "ELECTRONIC_PURSE" "GIFT_CARD" "STORED_VALUE"
destAccType
string

This specifies the type of destination account being used in the transaction (i.e. cheque, savings).

Enum: "DEFAULT" "SAVINGS" "CHEQUE" "CREDIT" "UNIVERSAL" "ELECTRONIC_PURSE" "GIFT_CARD" "STORED_VALUE"
stan
string

The System Trace Audit Number can be used to locate transactions across different systems.

rrn
string

This is a reference set by the original source of the transaction.

Array of objects (PaymentMethod)

An array of payment methods to be used as payment for the transaction. This is used if payment is not tendered at the point of sale, but is effected through one or more calls to third party payment providers as part of the request. A PaymentMethod differs from a Tender in that the former represents payment that still needs to be collected from a third party, whereas the latter represents payment that has already been collected at the point of sale.

Responses
201

Created

400

Bad request

500

Internal Server Error

501

Not implemented

503

Service Unavailable

504

Gateway Timeout

post/tokenPurchases/{purchaseId}
Request samples
application/json
{
  • "meter": {
    },
  • "purchaseAmount": {
    },
  • "utilityType": "string",
  • "msisdn": "string",
  • "tenders": [
    ],
  • "id": "string",
  • "time": "2019-08-24T14:15:22Z",
  • "originator": {
    },
  • "client": {
    },
  • "settlementEntity": {
    },
  • "receiver": {
    },
  • "thirdPartyIdentifiers": [
    ],
  • "slipData": {
    },
  • "basketRef": "string",
  • "tranType": "GOODS_AND_SERVICES",
  • "srcAccType": "DEFAULT",
  • "destAccType": "DEFAULT",
  • "stan": "string",
  • "rrn": "string",
  • "paymentMethods": [
    ]
}
Response samples
application/json
{
  • "purchaseTotal": {
    },
  • "taxTotal": {
    },
  • "amounts": {
    },
  • "meter": {
    },
  • "customer": {
    },
  • "utility": {
    },
  • "utilityType": "string",
  • "tokens": [
    ],
  • "debtRecoveryCharges": [
    ],
  • "serviceCharges": [
    ],
  • "vatInvoiceNumber": "string",
  • "id": "string",
  • "time": "2019-08-24T14:15:22Z",
  • "originator": {
    },
  • "client": {
    },
  • "settlementEntity": {
    },
  • "receiver": {
    },
  • "thirdPartyIdentifiers": [
    ],
  • "slipData": {
    },
  • "basketRef": "string",
  • "tranType": "GOODS_AND_SERVICES",
  • "srcAccType": "DEFAULT",
  • "destAccType": "DEFAULT",
  • "stan": "string",
  • "rrn": "string"
}
Copyright © Electrum Payments (Pty) Ltd. 2019-2022. All right reserved.