This section describes the top-level properties and the properties of subobjects that should be returned in the JSON response body for cash transactions.
Top-level properties
The following table describes the top-level properties that Oracle Commerce Cloud expects in the webhook response.
Property | Description |
|---|---|
referenceNumber | 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. |
transactionType | For a cash payment gateway, this must be one of the following strings:
|
transactionTimestamp | The timestamp of the transaction in Oracle Commerce Cloud, expressed as an ISO 8601 value in the following format:
Must match the value from the request. |
hostTimeStamp | The timestamp of the transaction in the gateway (in milliseconds). |
merchantTransactionTimestamp | The timestamp of the transaction from the merchant (in milliseconds). |
paymentMethod | For a cash payment gateway, the value must be |
orderId | The ID of the order associated with the payment. Must match the value from the request. |
amount | The actual amount collected from the shopper. 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 |
currencyCode | The ISO 4217 currency code. 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. |
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. |
authorizationResponse properties
The following table describes the properties of the authorizationResponse object in the response. The values of these properties indicate whether the transaction was authorized successfully.
Property | Description |
|---|---|
responseCode | For a cash payment gateway, this must be one of the following values:
|
responseDescription | Information from the payment gateway about the response. |
responseReason | Information about why the authorization succeeded or failed. |
authorizationCode | The authorization code from the payment provider. |
hostTransactionId | The transaction reference ID from the payment gateway. |
merchantTransactionId | The transaction reference ID from the merchant. |
token | The payment token used by the payment provider. |
Sample authorization response
The following is an example of an authorization response sent to the Generic Payment webhook by a cash payment gateway:
{
"orderId": "o30446",
"currencyCode": "USD",
"transactionId": "o30446-pg30417-1458555741310",
"referenceNumber": "pg30417",
"amount": "000000122526",
"transactionType": "CASH REQUEST",
"hostTimestamp": "1447807667046",
"transactionTimestamp": "2016-03-21T10:22:21+0000",
"merchantTransactionTimestamp": "1447807667046"
"paymentMethod": "cash",
"siteId": "siteUS",
"gatewayId": "gatewayDemo",
"authorizationResponse": {
"responseCode": "1000",
"responseReason": "1001",
"responseDescription": "1002",
"authorizationCode": "s001",
"hostTransactionId": "h001"
},
"additionalProperties": {
"sampleProperty1": "An additional property whose value will be stored."
}
}
