Start gift card transactions with createSpecialTransactionRequest - iOS

Method

Call createSpecialTransactionRequest  on the selected ADYDevice. This creates an ADYSpecialTransactionRequest object.

Parameters

Parameters

Type

Required

Description

reference

String

(tick)

A merchant-supplied reference for the transaction

amount

NSNumber

(tick)

The amount of the transaction.

currency

String

(tick)

The currency of the transaction.

transactionType

String

(tick)

  • payment - Make a payment with the balance.

  • load - Load a balance to a card.

  • redeem - Redeem the value of a card.

  • balanceInquiry - Check the balance of a card.

options

Dictionary

(error)

Options is an NSDictionary with key value pairs. This information is passed directly to the PED, which interprets it.

Activate, load, or refund a balance to a card by creating a special tender and passing the following values as the loadType in special options:
  • activate - Activates a gift card.
  • load - Loads a balance to a gift card.
  • merchandise_return - Load a refund balance back on to a gift card. This uses the same functionally as a load but is separated for accounting purposes.

The activate and load values can be piped to chain the tasks by passing "activate|load".

Perform a cash back or deactivate a card by creating a special tender and passing a redemptionType as a special option. 
  • cashback - Cash out the value of a gift card. For SVS, you must create a zero-value transaction to cash out the entire balance of a card. You can not cash out a specific amount.
  • deactivate - Deactivates a gift card.  (Deactivate is not available for SVS).

  • gratuity - Used to provide a tip from a gift card. (For SVS cards only).

The cashback and deactivate values can be piped to chain the tasks by passing  "cashback|deactivate".

paymentMethodType

String

(tick)

Values:

  • svs for an SVS gift card.

  • givex for a Givex gift card.

merchantReference

String

(tick)

The unique merchant reference for the transaction.

handleReceipt

Boolean

(tick)

Specifies that the POS handles and prints receipts. If omitted, it is required that the PED prints the receipt. If there is no printer unit, the transaction will fail.

additionalData

NSMutableDictionary

(error)

Contains key/value pairs that can be used by the merchant to return specific additional data, in particular in the final transaction result.

Callbacks

Implement the ADYTransactionProcessorDelegate, specifically the methods:

  • (void)transactionComplete:(ADYTransactionData*)transaction

  • (void)transactionRequiresPrintedReceipt:(ADYPrintReceiptRequest*)printReceiptRequest

Check transaction progress

Use the ADYTransactionProcessorDelegate to stay informed about the transaction's progress and completion. The error param is set if the transaction cannot be started.

- (BOOL)startWithDelegate:(id<ADYTransactionProcessorDelegate>)delegate error:(NSError **)error; 


Cancel a gift card transaction

Use the requestCancel method to cancel a gift card transaction.