Radial Integration | 2016

Payments, Tax & Fraud > Payments Processing > Gift Card Processing > Gift Card Cashout

Gift Card Cashout

Overview

The StoredValueCashOut API call exhausts the credit balance on a stored value and, in some tenders, deactivates the card in the process. Order Management System determines the amount to cash by getting current balance on the card.

The cashout call is typically triggered when the customer decides to exhaust either a part of balance or total balance on the giftcard. Like all other storedvalue API calls, this is a synchronous call, where the client is waiting for the response.

In case of timeout, the webstore or Order Management System retries the transaction at a later time.

URI Summary

Action URI Template URI Example Non-URI Request Response
POST /v1.0/stores/[StoreId]/payments/
storedvalue/cashout/[tenderCode].[format]
/v1.0/stores/QUIK/payments/
storedvalue/cashout/GS.xml
XML 200 + XML Response containing response status of voiding of gift card.

Request Format

The request is a StoredValueCashOutRequest message.

<?xml version="1.0" encoding="UTF-8"?>
<StoredValueCashOutRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
        requestId="12345">
  <PaymentContext>
    <OrderId>123456</OrderId>
    <PaymentAccountUniqueId isToken="false">8111111111111112</PaymentAccountUniqueId>
  </PaymentContext>
  <Pin>1234</Pin>
  <Amount currencyCode="USD">999.99</Amount>
</StoredValueCashOutRequest>

Request Elements

Element Required Description Type Restriction
PaymentContext Yes The PaymentContext uniquely identifies a Payment Transaction for an order. ComplexType Contains OrderId and either PaymentAccountUniqueId or EncryptedPaymentAccountUniqueId
OrderId Yes A unique identifier for the order. The client is responsible for ensuring uniqueness of OrderId values across all transactions the client initiates with this service. String 20 Characters
PaymentAccountUniqueId Yes Account ID for the gift card. This can be either a raw payment account numbe (PAN) or a token representing a PAN. The attribute isToken indicates if the PAN is tokenized. String Max 22 characters
EncryptedPaymentAccountUniqueId Yes Client encrypted PAN. Clients using Client Side Encryption use this element for the gift card PAN encrypted by JavaScript in the client's browser. For webstores that are not PCI compliant, this client encryption process ensures that a webstore never sees the raw PAN. String Max 1000 characters
Pin No PIN for the gift card. String 1 to 8 Characters. Either Pin or EncryptedPin are present.
EncryptedPin No Encrypted PIN for the gift card. String Up to 1000 Characters. Either Pin or EncryptedPin are present.
Amount Yes Currency amount being cashed out on the gift card. Positive decimal, up to 2 decimal places Example: 4.75
currencyCode Yes The currency used for the transaction. Currency code Currency codes are defined by ISO 4217:2008. Examples: USD, CAD, EURSee http://en.wikipedia.org/wiki/ISO_4217
requestId Yes RequestId globally identifies a request message and is used to protect against duplicate request processing String Up to 40 Characters.

Request Examples

StoredValueCashOutRequest - With Raw PAN

<?xml version="1.0" encoding="UTF-8"?>
<StoredValueCashOutRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
        requestId="12345">
  <PaymentContext>
    <OrderId>123456</OrderId>
    <PaymentAccountUniqueId isToken="false">8111111111111112</PaymentAccountUniqueId>
  </PaymentContext>
  <Pin>1234</Pin>
  <Amount currencyCode="USD">999.99</Amount>
</StoredValueCashOutRequest>

Response Format

The response is a StoredValueCashOutReply message.

<?xml version="1.0" encoding="UTF-8"?>
<StoredValueCashOutReply xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
  <PaymentContext>
    <OrderId>123456</OrderId>
    <PaymentAccountUniqueId isToken="true">8111110xNpAW1112</PaymentAccountUniqueId>
  </PaymentContext>
  <ResponseCode>Success</ResponseCode>
  <AmountOut currencyCode="USD">999.99</AmountOut>
</StoredValueCashOutReply>

Response Elements

Element Required Description Type Restriction
PaymentContext Yes The PaymentContext uniquely identifies a payment transaction for an order. ComplexType Contains OrderId and either PaymentAccountUniqueId or EncryptedPaymentAccountUniqueId
OrderId Yes A unique identifier for the order. The client is responsible for ensuring uniqueness of OrderId values across all transactions the client initiates with this service. String 20 Characters
PaymentAccountUniqueId Yes Account ID for the gift card. This can be either a raw payment account numbe (PAN) or a token representing a PAN. The attribute isToken indicates if the PAN is tokenized. String Max 22 characters
EncryptedPaymentAccountUniqueId Yes Client encrypted PAN. Clients using Client Side Encryption use this element for the gift card PAN encrypted by JavaScript in the client's browser. For webstores that are not PCI compliant, this client encryption process ensures that a webstore never sees the raw PAN. String Max 1000 characters
ResponseCode Yes Response Code returned from Payment Service. String Success, Failure, Timeout
AmountOut Yes Currency amount cashed out on the gift card. Positive decimal, up to 2 decimal places Example: 4.75
currencyCode Yes The currency used for the transaction. Currency code Currency codes are defined by ISO 4217:2008. Examples: USD, CAD, EURSee http://en.wikipedia.org/wiki/ISO_4217

 

Copyright © 2017 Radial. All rights reserved.