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 Service expects in the webhook response.
Property | Description |
---|---|
transactionType | A code indicating the type of transaction. This must be one of the following numeric values:
|
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. |
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:
For a void request, the code must be one of the following values:
For a credit (refund) request, the code must be one of the following values:
For a balance inquiry, the code must be one of the following values:
|
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 Service, expressed as an ISO 8601 value in the following format:
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 |
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 |
merchantTransactionTimeStamp | The timestamp of the transaction from the merchant. |
hostTransactionTimeStamp | The timestamp of the transaction from the gateway. |
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", "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" } }