Radial Integration | 2016
A PaymentAuthCancelRequest message should be sent to cancel an authorization if an order is canceled. This removes any holds or pending charges on the customer's account.
An alternate request format, PaymentSettlementRequestList, groups several events together in a single message, and is intended for clients using the Webhooks Implementation for Asynchronous Messages. If you are using the Webhooks implemention, see Payment Authorization Cancel List Event, below.
Action | URI Template | URI Example | Non-URI Request | Response |
---|---|---|---|---|
POST | /v[M.m]/stores/[StoreID]/ payments/auth/cancel/[TenderType].[format] |
/v1.0/stores/ABCXYZ/ payments/auth/cancel/VC.xml |
XML | 200 + XML response |
The request is a PaymentAuthCancelRequest message.
<?xml version="1.0" encoding="UTF-8"?>
<PaymentAuthCancelRequest requestId="123" xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
<PaymentContext>
<OrderId>12345</OrderId>
<PaymentAccountUniqueId isToken="true">4111110PASeK1111</PaymentAccountUniqueId>
</PaymentContext>
<Amount currencyCode="USD">100.00</Amount>
</PaymentAuthCancelRequest>
<?xml version="1.0" encoding="UTF-8"?>
<PaymentAuthCancelRequest requestId="123" xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
<PaymentContextBase>
<OrderId>12345</OrderId>
</PaymentContextBase>
<Amount currencyCode="USD">100.00</Amount>
</PaymentAuthCancelRequest>
Element | Required | Description | Type | Restriction |
---|---|---|---|---|
PaymentAuthCancelRequest/ @requestId |
Yes | Attribute that provides a unique ID for this request | String | Max 40 characters |
PaymentContext | Choice of PaymentContext (when a PaymentAccountUniqueId value is available) or PaymentContextBase (when a PaymentAccountUniqueId value is not available) | Sequence of OrderId, PaymentAccountUniqueId | ComplexType | |
PaymentContext/ OrderId |
Yes (when PaymentContext is present) | Order ID | String | Max 20 characters |
PaymentContext/ PaymentAccountUniqueId |
Yes (when PaymentContext is present) | Tokenized payment account number (for example, a credit card number) | String | Max 22 characters |
PaymentContext/ PaymentAccountUniqueId/ @isToken |
Yes (when PaymentContext is present) | Attribute that indicates whether the payment account number is tokenized | String | true |
PaymentContextBase | Choice of PaymentContext (when a PaymentAccountUniqueId value is available) or PaymentContextBase (when a PaymentAccountUniqueId value is not available) | Sequence of OrderId | ComplexType | |
PaymentContextBase/ OrderId |
Yes (when PaymentContextBase is present) | Order ID | String | Max 20 characters |
Amount | Yes | Amount authorized on the credit card | String |
Positive decimal, up to two decimal places (for example, 4.75) |
Amount/ @currencyCode |
Yes | Attribute that indicates the type of currency used for the order | String | 3-character ISO 4217 code (for example, USD, CAD, EUR). See
http://en.wikipedia.org/ wiki/ISO_4217. |
<?xml version="1.0" encoding="UTF-8"?>
<AckReply xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
<Received/>
</AckReply>
q.Payments.AuthCancels.Status.<RABBIT_MQ_USERNAME> |
The response is a PaymentAuthCancelReply message.
<?xml version="1.0" encoding="UTF-8"?>
<PaymentAuthCancelReply xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
<PaymentContext>
<OrderId>12345</OrderId>
<PaymentAccountUniqueId isToken="true">4111110PASeK1111</PaymentAccountUniqueId>
</PaymentContext>
<TenderType>VC</TenderType>
<ResponseCode>Success</ResponseCode>
<Amount currencyCode="USD">1.00</Amount>
<ExtendedResponseCode/>
<StoreId>ABCXYZ</StoreId>
</PaymentAuthCancelReply>
<?xml version="1.0" encoding="UTF-8"?>
<PaymentAuthCancelReply xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
<PaymentContextBase>
<OrderId>12345</OrderId>
</PaymentContextBase>
<TenderType>PY</TenderType>
<ResponseCode>Success</ResponseCode>
<Amount currencyCode="USD">100.00</Amount>
<ExtendedResponseCode/>
<StoreId>ABCXYZ</StoreId>
</PaymentAuthCancelReply>
Element | Required | Description | Type | Restriction |
---|---|---|---|---|
PaymentContext | Choice of PaymentContext or PaymentContextBase. The same element that was used in the request is returned in the reply. | |||
PaymentContext/ OrderId |
Yes (when PaymentContext is present) | Order ID | String | Max 20 characters |
PaymentContext/ PaymentAccountUniqueId |
Yes (when PaymentContext is present) | Tokenized payment account number (for example, credit card number) | String | Max 22 characters |
PaymentContext/ PaymentAccountUniqueId/ @isToken |
Yes (when PaymentContext is present) | Attribute that indicates whether the payment account number is tokenized | String | true |
PaymentContextBase | Choice of PaymentContextBase or PaymentContext. The same element that was used in the request is returned in the reply. | |||
PaymentContextBase/ |
Yes (when PaymentContextBase is present) | Order ID | String | Max 20 characters |
TenderType | Yes | Tender type identifier | String | 2 to 4 characters |
ResponseCode | Yes | Authorization cancel response code | String | Success
Fail Timeout |
Amount | Yes | Amount authorized on the credit card | String |
Positive decimal, up to two decimal places (for example, 4.75) |
Amount/ @currencyCode |
Yes | Attribute that indicates the type of currency used for the order | String | 3-character ISO 4217 code (for example, USD, CAD, EUR). See
http://en.wikipedia.org/ wiki/ISO_4217. |
ExtendedResponseCode | Yes | Additional response code details for failures | String | |
StoreId | Yes | Store identifier | String | Max 100 characters |
The xml response (mentioned below) contains a list of PaymentAuthCancelReply messages all clubbed under one parent element and is available only for clients using webhook.
This message cannot be obtained from a queue in RabbitMQ and hence the queue format is not applicable here.
In case you want to sign up for these events please contact customer service. However individual PaymentAuthCancelReply message continues to live on RabbitMQ server and can be accessed using the information provided above. |
The response is a list of PaymentAuthCancelReply messages. Instead of returning single PaymentAuthCancelReply message, a list/batch of messsages are getting returned.
<?xml version="1.0" encoding="UTF-8"?>
<PaymentAuthCancelReplyList xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
<PaymentAuthCancelReply>
<PaymentContext>
<OrderId>12345</OrderId>
<PaymentAccountUniqueId isToken="true">4111110PASeK1111</PaymentAccountUniqueId>
</PaymentContext>
<TenderType>VC</TenderType>
<ResponseCode>Success</ResponseCode>
<Amount currencyCode="USD">1.00</Amount>
<ExtendedResponseCode/>
<StoreId>ABCXYZ</StoreId>
</PaymentAuthCancelReply>
<PaymentAuthCancelReply>
<PaymentContext>
<OrderId>12890</OrderId>
<PaymentAccountUniqueId isToken="true">4222220PASeK2222</PaymentAccountUniqueId>
</PaymentContext>
<TenderType>VC</TenderType>
<ResponseCode>Success</ResponseCode>
<Amount currencyCode="USD">25.00</Amount>
<ExtendedResponseCode/>
<StoreId>ABC</StoreId>
</PaymentAuthCancelReply>
</PaymentAuthCancelReplyList>
<?xml version="1.0" encoding="UTF-8"?>
<PaymentAuthCancelReplyList xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
<PaymentAuthCancelReply>
<PaymentContextBase>
<OrderId>12345</OrderId>
</PaymentContextBase>
<TenderType>PY</TenderType>
<ResponseCode>Success</ResponseCode>
<Amount currencyCode="USD">100.00</Amount>
<ExtendedResponseCode/>
<StoreId>ABCXYZ</StoreId>
</PaymentAuthCancelReply>
<PaymentAuthCancelReply>
<PaymentContextBase>
<OrderId>906735</OrderId>
</PaymentContextBase>
<TenderType>PY</TenderType>
<ResponseCode>Success</ResponseCode>
<Amount currencyCode="USD">200.00</Amount>
<ExtendedResponseCode/>
<StoreId>ABC</StoreId>
</PaymentAuthCancelReply>
</PaymentAuthCancelReplyList>
Element | Required | Description | Type | Restriction |
---|---|---|---|---|
PaymentAuthCancelReplyList | A wrapper/parent object for all the PaymentAuthCancelReply elements | Sequence of PaymentAuthCancelReply elements | ComplexType | |
PaymentAuthCancelReply | A wrapper/parent object for all the sub-elements such as PaymentContextBase, TenderType, ResponseCode, Amount, ExtendedResponseCode, StoreId etc. | Sequence of PaymentContextBase, TenderType, ResponseCode, Amount, ExtendedResponseCode, StoreId | ComplexType | |
PaymentContext | Choice of PaymentContext or PaymentContextBase. The same element that was used in the request is returned in the reply. | |||
PaymentContext/ OrderId |
Yes (when PaymentContext is present) | Order ID | String | Max 20 characters |
PaymentContext/ PaymentAccountUniqueId |
Yes (when PaymentContext is present) | Tokenized payment account number (for example, credit card number) | String | Max 22 characters |
PaymentContext/ PaymentAccountUniqueId/ @isToken |
Yes (when PaymentContext is present) | Attribute that indicates whether the payment account number is tokenized | String | true |
PaymentContextBase | Choice of PaymentContextBase or PaymentContext. The same element that was used in the request is returned in the reply. | |||
PaymentContextBase/ |
Yes (when PaymentContextBase is present) | Order ID | String | Max 20 characters |
TenderType | Yes | Tender type identifier | String | 2 to 4 characters |
ResponseCode | Yes | Authorization cancel response code | String | Success
Fail Timeout |
Amount | Yes | Amount authorized on the credit card | String |
Positive decimal, up to two decimal places (for example, 4.75) |
Amount/ @currencyCode |
Yes | Attribute that indicates the type of currency used for the order | String | 3-character ISO 4217 code (for example, USD, CAD, EUR). See
http://en.wikipedia.org/ wiki/ISO_4217. |
ExtendedResponseCode | Yes | Additional response code details for failures | String | |
StoreId | Yes | Store identifier | String | Max 100 characters |
Copyright © 2017 Radial. All rights reserved.