developer:giftcards

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
developer:giftcards [2015/07/06 16:12]
tem [Partial Approval]
developer:giftcards [2015/07/06 16:19] (current)
tem
Line 27: Line 27:
 Private branded giftcards are typically ordered from the gift card processor at the time the merchant signs up.  Please contact your merchant service provider for assistance in ordering cards. Private branded giftcards are typically ordered from the gift card processor at the time the merchant signs up.  Please contact your merchant service provider for assistance in ordering cards.
  
-==== Gift Card Functions ​====+===== Gift Card Commands =====
  
 Giftcards support the expected sale and refund functions much like credit cards. ​ In addition, ​ they also include additional activities such as card activation that the developer may want to account for.  ​ Giftcards support the expected sale and refund functions much like credit cards. ​ In addition, ​ they also include additional activities such as card activation that the developer may want to account for.  ​
Line 41: Line 41:
  
  
-==== Partial Approval ====+===== Partial Approval ​=====
  
 USAePay supports partial approvals for gift cards. ​ This allows a developer to indicate that they want to authorize as much of the requested amount as they can.   For example, ​  if the sale is for $50 but the customers card only has $45 left on it, the transaction would normally decline. ​  With partial approvals enabled, ​  the transaction would approve with a "​P"​ response and include the authorized amount of "​45.00"​. ​ USAePay supports partial approvals for gift cards. ​ This allows a developer to indicate that they want to authorize as much of the requested amount as they can.   For example, ​  if the sale is for $50 but the customers card only has $45 left on it, the transaction would normally decline. ​  With partial approvals enabled, ​  the transaction would approve with a "​P"​ response and include the authorized amount of "​45.00"​. ​
Line 47: Line 47:
 Developers using the [[developer:​transactionapi]] can enable partial approvals by setting the UMallowPartialAuth field to "​true"​. ​ You will also need to modify your code to accept a "​UMresult" ​ value of "​P"​. ​ This indicates that only a portion of the "​UMamount"​ you specified was available and processed. ​  The actual amount that was processed is returned in the "​UMauthAmount"​ response field.  ​ Developers using the [[developer:​transactionapi]] can enable partial approvals by setting the UMallowPartialAuth field to "​true"​. ​ You will also need to modify your code to accept a "​UMresult" ​ value of "​P"​. ​ This indicates that only a portion of the "​UMamount"​ you specified was available and processed. ​  The actual amount that was processed is returned in the "​UMauthAmount"​ response field.  ​
  
-==== Remaining Balance ====+===== Remaining Balance ​=====
  
 Gift card transactions will automatically return the remain card balance in the "​UMremainingBalance"​ response field. ​  This is the amount of funds left on the card after the transaction processed. ​  For example, ​  if you process a $10 sale against a card with a $50 balance, ​ the "​UMremainingBalance" ​ will contain $40. Gift card transactions will automatically return the remain card balance in the "​UMremainingBalance"​ response field. ​  This is the amount of funds left on the card after the transaction processed. ​  For example, ​  if you process a $10 sale against a card with a $50 balance, ​ the "​UMremainingBalance" ​ will contain $40.
 +
 +===== Transaction API Examples =====
 +
 +Gift Card Activation
 +<​code>​
 +UMkey=EXAMPLEPUTYOURKEYHERE&​UMcommand=giftcard:​activate&​UMcard=78986298658376922&​UMamount=100.00
 +</​code>​
 +
 +Process Sale
 +<​code>​
 +UMkey=EXAMPLEPUTYOURKEYHERE&​UMcommand=giftcard:​sale&​UMcard=78986298658376922&​UMamount=10.00
 +</​code>​
 +
 +Add Funds to Card
 +<​code>​
 +UMkey=EXAMPLEPUTYOURKEYHERE&​UMcommand=giftcard:​addvalue&​UMcard=78986298658376922&​UMamount=20.00
 +</​code>​
 + 
 +Refund a Sale
 +<​code>​
 +UMkey=EXAMPLEPUTYOURKEYHERE&​UMcommand=giftcard:​refund&​UMrefNum=123456780
 +</​code>​
 +
 +Transfer Remaining Balance to Another Card
 +<​code>​
 +UMkey=EXAMPLEPUTYOURKEYHERE&​UMcommand=giftcard:​transfer&​UMcard=78986298658376922,​789862962059728373
 +</​code>​
  
  
developer/giftcards.txt ยท Last modified: 2015/07/06 16:19 by tem

Page Tools