Voucher provision for POS
Operations and Messages
The table below lists the transactions that make up digital voucher provisions and the API calls you will need to implement.
| Transaction Leg | Operation | API Calls |
|---|---|---|
| Provision voucher | provisionVoucher |
|
| Confirm voucher | confirmVoucher |
|
| Retry voucher provision | retryProvisionVoucher |
|
| Reverse voucher | reverseVoucher |
|
Stellr does not support advice messages (reversals or confirmations), therefore if implemented Electrum will consume any advice messages sent to the Electrum Switch.
Netcare and Stellr do not support retries, therefore Electrum will respond with a hard decline when a retry is sent to the Electrum Switch.
Message Flows
The voucher provision phase of a digital voucher purchase initiates the transaction and returns a digital voucher from the service provider. In the case of dual messaging systems this is followed by a confirmation phase in which the transaction is confirmed.
The sections below describe successful voucher provision transactions and error scenarios.
Successful Voucher Provision: Dual Messaging
- The originating system sends a
POSTcall to the/vouchersAPI endpoint (provisionVoucheroperation). - The API responds with a
ProvisionResponsemessage payload containing the details of the voucher. - The originating system sends a
TenderAdviceconfirmation message to the/vouchers/confirmationsendpoint of the API (confirmVoucher.) Electrum immediately sends aTenderAdviceresponse back to the originating system. The confirmation message is sent to the service provider via a store-and-forward queue. The message is repeated until Electrum receives a response.

Successful Voucher Provision: Single Messaging
- The originating system sends a
POSTcall to the/vouchersAPI endpoint (provisionVoucheroperation). - The API responds with a
ProvisionResponsemessage payload containing the details of the voucher. - The transaction is complete.

Error or Timeout at Originating System
- The originating system sends a
POSTcall to the/vouchersAPI endpoint (provisionVoucheroperation). - A timeout (no response received) or other error is encountered at the originating system.
- The originating system retries the
ProvisionRequest(retryProvisionVoucheroperation) up to three times (or more, depending on the originating system's business rules). - The originating system receives a successful
ProvisionResponsecontaining the details of the voucher within three retries or fewer. - The transaction is concluded as follows according to one of the following scenarios.
- In the case of a single messaging system, the transaction is complete.
- In the case of a dual messaging system, the originating system sends a
TenderAdviceconfirmation message (confirmVoucheroperation), and Electrum immediately sends aTenderAdviceresponse. Electrum sends a confirmation message to the service provider via a store-and-forward queue until a response is received.

Error or Timeout at Originating System: Retries Fail
- The originating system sends a
POSTcall to the/vouchersAPI endpoint (provisionVoucheroperation). - A timeout (no response received) or other error is encountered at the originating system.
- The originating system retries the
ProvisionRequest(retryProvisionVoucheroperation) up to three times (or more, depending on the originating system's business rules). - The originating system receives a timeout response after three retries. No voucher details are received.
- The originating system sends a
BasicReversalmessage to Electrum (reverseVoucheroperation) and immediately receives a response. - Electrum sends a reversal message to the service provider – if the provider supports reversal messaging – via a store-and-forward queue until a response is received.

Error Upstream: Transaction Failed
- The originating system sends a
POSTcall to the/vouchersAPI endpoint (provisionVoucheroperation). - An error is encountered at Electrum or the service provider.
- Electrum responds to the originating system with an HTTP status of
400or404and anErrorDetailmessage payload. - If the error is a hard decline, then no further messaging is required from the originating system.

If the error message indicates that the transaction outcome is unknown, then the provision request may be retried, as described below.
Error Upstream: Unknown Transaction Outcome
- The originating system sends a
POSTcall to the/vouchersAPI endpoint (provisionVoucheroperation). - An error occurs at Electrum or the service provider.
- Electrum responds to the originating system with an HTTP status of
500,503, or504, and anErrorDetailmessage payload. - The error is due to a timeout or the
ErrorDetailmessage contains an errorType ofUPSTREAM_UNAVAILABLEorVOUCHER_STATUS_UNKNOWN. - The originating system retries the
ProvisionRequest(retryProvisionVoucheroperation) up to three times (or more, depending on the originating system's business rules). - The originating system receives a successful
ProvisionResponsecontaining the details of the voucher within three retries or fewer. - The transaction is concluded according to one of the following scenarios.
- In the case of a single messaging system, the transaction is complete.
- In the case of a dual messaging system, the originating system sends a
TenderAdviceconfirmation message (confirmVoucheroperation), and Electrum immediately sends aTenderAdviceresponse. Electrum sends a confirmation message to the service provider via a store-and-forward queue until a response is returned.

Error Upstream: Retries Fail
- The originating system sends a
POSTcall to the/vouchersAPI endpoint (provisionVoucheroperation). - An error occurs at Electrum or the service provider.
- Electrum responds to the originating system with an HTTP status of
500,503, or504, and anErrorDetailmessage payload. - The error is due to a timeout or the
ErrorDetailmessage contains an errorType ofUPSTREAM_UNAVAILABLEorVOUCHER_STATUS_UNKNOWN. - The originating system retries the
ProvisionRequest(retryProvisionVoucheroperation) up to three times (or more, depending on the originating system's business rules). - The originating system either receives an
ErrorDetail(hard decline) at any point, or does not receive a successful voucher response within the three retries. - The originating system sends a
BasicReversalmessage to Electrum (reverseVoucheroperation) and immediately receives a response. - Electrum sends a reversal message to the service provider – if the provider supports reversal messaging – via a store-and-forward queue until a response is returned.

You should not attempt transaction lookups until after the initial processing period concludes (after Electrum has received and processed the transaction outcome).