This section describes the top-level properties and the properties of subobjects that should be returned in the JSON response body of the Generic Payment webhook for invoice transactions.
Top-level properties
The following table describes the top-level properties that Oracle Commerce Cloud Service expects in the webhook response.
Property | Description |
|---|---|
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. |
transactionType | The type of transaction. For an invoice payment gateway, this must be |
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. |
organizationId | The ID of the organization for the account to be invoiced. |
PONumber | The purchase order number for the account to be invoiced. |
referenceNumber | The ID of the internal payment group. Must match the value from the request. |
hostTransactionTimeStamp | The timestamp of the transaction from the gateway. |
merchantTransactionTimestamp | The timestamp of the transaction from the merchant. |
paymentMethod | The payment method. For an invoice 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 amount invoiced. The value of this property is a positive, 12-digit number that is expressed in base currency to two significant digits. 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. |
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 an invoice 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. |
hostTransactionId | The transaction reference ID from the payment gateway. |
merchantTransactionId | The transaction reference ID from the merchant. |
Sample authorization response
The following is an example of a response to a purchase order authorization request:
{
"merchantTransactionTimestamp": "1447807667046",
"currencyCode": "USD",
"transactionId": "o40426-pg40413-1466678343221",
"PONumber": "po22222",
"referenceNumber": "pg10415",
"organizationId": "or-300007",
"amount": "000000002999",
"transactionType": "AUTHORIZE",
"authorizationResponse": {
"hostTransactionId": "HOST-TRANSACTION-ID",
"responseCode": "1000",
"responseReason": "1002",
"responseDescription": "Valid PO Number",
"merchantTransactionId": "2016-06-23T10:39:03+0000"
},
"transactionTimestamp": "2016-05-02T12:14:09+0000",
"paymentMethod": "invoice",
"orderId": "o40426",
"gatewayId": "invoiceGateway"
}
