Last updated

Voucher redemption

Voucher redemptions involve the use of provisioned vouchers as tender (payment) for a specific service.

Operations and Messages

The table below lists the transactions that make up digital voucher redemptions and the API calls you will need to implement.

TransactionOperationAPI Call
Voucher lookuplookupVoucher
Redeem voucherredeemVoucher
Confirm voucher redemptionconfirmRedeem
Reverse voucher redemptionreverseRedeem
Important

Stellr does not support advice messages (reversals or confirmations), therefore if implemented Electrum will consume any advice messages sent to the Electrum Switch.

Message Flows

The sections below describe successful voucher redemption transactions and error scenarios.

Successful Voucher Redemption: Dual Messaging

  1. The originating system performs a successful voucher lookup transaction.
  2. The originating system sends a POST call to the /redemptions endpoint of the API (redeemVoucher operation).
  3. The API responds with a RedemptionResponse message payload.
  4. The originating system sends a BasicAdvice confirmation message via POST call to the redemptions/confirmations endpoint of the API (confirmRedeem operation).
  5. Electrum responds immediately with a BasicAdvice message payload.
  6. If the service provider supports dual messaging, Electrum sends a confirmation message to the service provider via a store-and-forward queue until a response is returned.

alt text

Successful Voucher Redemption: Single Messaging

  1. The originating system performs a successful voucher lookup transaction.
  2. The originating system sends a POST call to the /redemptions endpoint of the API (redeemVoucher operation).
  3. The API responds with a RedemptionResponse message payload.
  4. The consumer receives their voucher and the transaction is complete.

alt text

Error or Timeout at Originating System

  1. After a successful voucher lookup transaction, the originating system sends a POST call to the /redemptions endpoint of the API (redeemVoucher operation).
  2. An error occurs at the originating system, or a timeout occurs when the originating system does not receive a reponse.
  3. The originating system sends a BasicReversal message (reverseRedeem operation).
  4. Electrum responds immediately with a BasicReversal response message.
  5. 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.

alt text

Error Upstream

  1. After a successful voucher lookup transaction, the originating system sends a POST call to the /redemptions endpoint of the API (redeemVoucher operation).
  2. An error occurs at the service provider.
  3. Electrum sends an ErrorDetail message to the originating system and the consumer is informed of the error.
  4. The consumer can decide whether to abort the transaction or attempt it again.

alt text

Timeout Upstream

  1. After a successful voucher lookup transaction, the originating system sends a POST call to the /redemptions endpoint of the API (redeemVoucher operation).
  2. An timeout error occurs when Electrum does not receive a response from the service provider.
  3. Electrum returns an ErrorDetail message to the originating system.
  4. The originating system sends a BasicReversal message (reverseRedeem operation) and Electrum immediately returns a BasicReversal response.
  5. 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.

alt text

Important

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