This section describes the top-level properties and the properties of subobjects that should be returned in the response body of the Generic Payment webhook for gift card transactions.

Top-level properties

The following table describes the top-level properties that Oracle Commerce Cloud expects in the webhook response.

Property

Description

transactionType

A code indicating the type of transaction. This must be one of the following numeric values:

0100 (authorization)
0110 (void)
0400 (refund)
0600 (balance inquiry)

currencyCode

The ISO 4217 currency code. This is expected to match the value in the request.

locale

The shopper’s locale. This is expected to match the value in the request.

channel

The area of the system where the payment-processing request originated. This is expected to match the value in the request.

orderId

The ID of the order associated with the payment. This is expected to match the value in the request.

siteId

The ID of the site on which the order was placed. Must match the value from the request.

authorizationResponse, voidResponse, creditResponse, and inquireBalanceResponse properties

The following table describes the properties of the authorizationResponse, voidResponse, creditResponse, or inquireBalanceResponse object in the webhook response. Only one of these objects is included in each response (the object corresponding to the transaction type; for example, a voidResponse object for a void transaction). All of these object types require the same set of properties. The values of these properties indicate the results of the transaction.

Property

Description

responseCode

The decision from the payment provider as interpreted by the merchant. The acceptable values depend on the transaction type. For an authorization request, the code must be one of the following values:

1000 (success)
4000 (sale complete)
9000 (decline)

For a void request, the code must be one of the following values:

2000 (success)
8000 (decline)

For a credit (refund) request, the code must be one of the following values:

3000 (success)
7000 (decline)

For a balance inquiry, the code must be one of the following values:

5000 (success)
6000 (decline)

responseDescription

Information from the payment gateway about the response.

responseReason

Information about why the transaction succeeded or failed.

hostTransactionId

The transaction reference ID from the payment gateway.

merchantTransactionId

The transaction reference ID from the merchant.

paymentId

The ID of the internal payment group. Must match the value from the request.

transactionId

The unique ID of the transaction. Consists of the order ID, the payment ID, and the transaction timestamp (in milliseconds), separated by hyphens. Must match the value from the request.

transactionTimestamp

The timestamp of the transaction in Oracle Commerce Cloud, expressed as an ISO 8601 value in the following format:

yyyy-MM-dd'T'HH:mm:ssZ

Must match the value from the request.

paymentMethod

The payment method. Must match the value from the request. For a gift card, the value is physicalGiftCard.

amount

The actual amount of the transaction. This may differ from the amount in the request.

The value of this property is a positive, 12-digit number that is expressed in base currency. For example, $125.75 is represented as 000000012575.

merchantTransactionTimeStamp

The timestamp of the transaction from the merchant (in milliseconds).

hostTransactionTimeStamp

The timestamp of the transaction from the gateway (in milliseconds).

gatewayId

The ID of the payment gateway. Must match the value from the request.

additionalProperties

Key/value pairs for additional properties sent by the merchant.

Sample authorization response

The following is an example of a response to a gift card authorization request:

{
   "transactionType": "0100",
   "currencyCode": "USD",
   "locale": "en",
   "channel": "storefront",
   "siteId": "siteUS",
   "orderId": "o50415",
   "authorizationResponse":
      {
         "merchantTransactionTimestamp": "1464958982654",
         "responseCode": "1000",
         "hostTransactionId": "hID1464958982554",
         "transactionId": "o50415-pg50417-1464958982609",
         "paymentId": "pg50417",
         "responseDescription": "AuthResponseDescription",
         "merchantTransactionId": "mID1464958982654v,
         "amount": "000000002999",
         "additionalProperties": {
            "sample-addnl-property-key4": "sample-payment-property-value4",
            "sample-addnl-property-key2": "sample-payment-property-value2",
            "sample-addnl-property-key3": "sample-payment-property-value3",
            "sample-addnl-property-key1": "sample-payment-property-value1"
         },
         "hostTransactionTimestamp": "1464958982554",
         "responseReason": "AuthResponseReason",
         "transactionTimestamp": "2016-06-03T13:03:02+0000",
         "paymentMethod": "physicalGiftCard",
         "gatewayId": "demoGiftCardGateway"
      }
}

Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices