This section describes the top-level properties and the properties of subobjects that should be returned in the JSON response body of the Credit Card Payment webhook.
Top-level properties
The following table describes the top-level properties that Oracle Commerce Cloud expects in the webhook response.
Property | Description |
---|---|
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. |
transactionType | A code indicating the type of transaction. For the Credit Card Payment webhook, this must be one of the following numeric values:
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:
Must match the value from the request. |
hostTransactionTimeStamp | The timestamp of the transaction from the gateway (in milliseconds). |
paymentMethod | The payment method. For the Credit Card Payment webhook, the value must be |
orderId | The ID of the order associated with the payment. Must match the value from the request. |
amount | The amount authorized. This must match the exact amount requested. Any other amount will cause an error, as Oracle Commerce Cloud does not support partial authorizations for credit card payments. 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. |
gatewayId | The ID of the payment gateway. Must match the value from the request. |
siteId | The ID of the site on which the order was placed. 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 | The authorization decision from the payment provider as interpreted by the merchant. For the Credit Card Payment webhook, 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 Credit Card Payment webhook by a payment gateway:
{ "orderId": "o30446", "currencyCode": "USD", "transactionId": "o30446-pg30417-1458555741310", "paymentId": "pg30417", "amount": "000000122526", "transactionType": "0100", "hostTransactionTimestamp": "1447807667046", "transactionTimestamp": "2016-03-21T10:22:21+0000", "paymentMethod": "card", "gatewayId": "gatewayDemo", "siteId": "siteUS", "authorizationResponse": { "responseCode": "1000", "responseReason": "1001", "responseDescription": "1002", "authorizationCode": "s001", "hostTransactionId": "h001" }, "additionalProperties": { "sampleProperty1": "An additional property whose value will be stored." } }