Radial Integration | 2016
The StoredValueRedeemVoid API call rolls back any stored value redemption that was executed as part of the checkout flow. This call is typically triggered when the webstore cannot complete the transaction for any reason.
If multiple gift cards or a combination of gift cards and credit cards are used for payment of an order, and any of the gift card redemptions or credit card authorizations fails, StoredValueRedeemVoid is called to void the redemption of the redeemed gift cards.
Like all other storedvalue api calls, StoredValueRedeemVoid 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.
Action | URI Template | URI Example | Non-URI Request | Response |
---|---|---|---|---|
POST | /v1.0/stores/[StoreId]/payments/ storedvalue/redeemvoid/[tenderCode].[format] |
/v1.0/stores/QUIK/payments/ storedvalue/redeemvoid/GS.xml |
XML | 200 + XML Response containing response status of voiding the redemption of Giftcard. |
The request is a StoredValueRedeemVoidRequest message.
<?xml version="1.0" encoding="UTF-8"?>
<StoredValueRedeemVoidRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
requestId="12345">
<PaymentContext>
<OrderId>123456</OrderId>
<PaymentAccountUniqueId isToken="true">411111ap49cw1111</PaymentAccountUniqueId>
</PaymentContext>
<Pin>1234</Pin>
<Amount currencyCode="USD">50.00</Amount>
</StoredValueRedeemVoidRequest>
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 previously redeemed from the gift card, to be voided. | 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 | Upto 40 Characters. |
<?xml version="1.0" encoding="UTF-8"?>
<StoredValueRedeemVoidRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
requestId="12345">
<PaymentContext>
<OrderId>123456</OrderId>
<PaymentAccountUniqueId isToken="true">411111ap49cw1111</PaymentAccountUniqueId>
</PaymentContext>
<Pin>1234</Pin>
<Amount currencyCode="USD">50.00</Amount>
</StoredValueRedeemVoidRequest>
The response is a StoredValueRedeemVoidReply message.
<?xml version="1.0" encoding="UTF-8"?>
<StoredValueRedeemVoidReply xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
<PaymentContext>
<OrderId>OrderId0</OrderId>
<PaymentAccountUniqueId isToken="true">411111ap49cw1111</PaymentAccountUniqueId>
</PaymentContext>
<ResponseCode>Success</ResponseCode>
</StoredValueRedeemVoidReply>
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 |
Copyright © 2017 Radial. All rights reserved.