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 Service 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:

0100 (authorization)
0110 (void)
0400 (refund)

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:

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

Must match the value from the request.

hostTransactionTimeStamp

The timestamp of the transaction from the gateway.

paymentMethod

The payment method. For the Credit Card Payment webhook, the value must be card.

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 Service 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 000000012575.

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.

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:

1000 (success)
9000 (decline)

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",

     "authorizationResponse": {
          "responseCode": "1000",
          "responseReason": "1001",
          "responseDescription": "1002",
          "authorizationCode": "s001",
          "hostTransactionId": "h001"
     },
     "additionalProperties": {
          "sampleProperty1": "An additional property whose value will be stored."
     }
}

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