This section describes the top-level properties and the properties of subobjects sent in the JSON request body of the Credit Card Payment webhook.
Top-level properties
The following table describes the top-level properties that Oracle Commerce Cloud Service sends in the webhook request.
Property | Description |
---|---|
paymentId | The ID of the internal payment group. |
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:
|
transactionTimestamp | The timestamp of the transaction, expressed as an ISO 8601 value in the following format:
|
channel | The area of the system where the payment-processing request originated. Valid values are:
|
paymentMethod | The payment method. For the Credit Card Payment webhook, the value must be |
orderId | The ID of the order associated with the payment. |
amount | The amount to be authorized, as 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. |
locale | The shopper’s locale, taken from the order. If no locale is set, the default locale from the storefront is used. |
gatewayId | The ID of the payment gateway. |
cardDetails properties
The following table describes the properties of the cardDetails
object in a credit card payment request. The values of these properties are used to authorize the payment.
Property | Description |
---|---|
expirationMonth | A two-digit number indicating the month the credit card expires (for example, 07 for July). |
expirationYear | A four-digit number indicating the year the credit card expires (for example, 2019). |
cvv | The three-digit or four-digit security code verifying the credit card. |
number | The credit card number. |
type | The credit card type. Valid values are:
|
holderName | The complete name of the holder of the credit card. |
billingAddress properties
The following table describes the properties of the billingAddress
object in the request. The billing address is the address of the customer to whom the order is charged.
Property | Description |
---|---|
lastName | The last name of the customer. |
postalCode | The postal code in the address (for example, the zip code in the United States). |
phoneNumber | The phone number associated with the address. |
The email address associated with the address. | |
state | The state in the address. |
address1 | The first line of the address. Typically the street and number. |
address2 | The second line of the address. Included as an empty string in the JSON data if no value exists in the order. |
firstName | The first name of the customer. |
city | The city in the address. |
country | The country in the address. |
shippingAddress properties
The following table describes the properties of the shippingAddress
object in the request. The shipping address is the address of the person (not necessarily a customer) receiving the order.
Property | Description |
---|---|
lastName | The last name of the order recipient. |
postalCode | The postal code in the address (for example, the zip code in the United States). |
phoneNumber | The phone number associated with the address. |
The email address associate with the address. | |
state | The state in the address. |
address1 | The first line of the address. Typically the street and number. |
address2 | The second line of the address. Included as an empty string in the JSON data if no value exists in the order. |
firstName | The first name of the order recipient. |
city | The city in the address. |
country | The country in the address. |
profile properties
The following table describes the properties of the profile
object in the request. These values are associated with the customer purchasing the order.
Property | Description |
---|---|
id | The ID of the customer profile. |
phoneNumber | The phone number from the customer profile. |
The email address from the customer profile. |
Sample authorization request
The following is an example of an authorization request sent by the Credit Card Payment webhook to a payment gateway:
{ "transactionId": "o30446-pg30417-1458555741310", "currencyCode": "USD", "paymentId": "pg30417", "locale": "en", "gatewaySettings": { "paymentMethodTypes": "card", "filteredFields": ["paymentMethodTypes"] }, "cardDetails": { "expirationMonth": "02", "expirationYear": "2018", "cvv": "234", "number": "4111111111111111", "type": "visa", "holderName": "Test Shopper" }, "amount": ""000000122526",", "transactionType": "0100", "transactionTimestamp": "2016-03-21T10:22:21+0000", "billingAddress": { "lastName": "Shopper", "postalCode": "01242", "phoneNumber": "617-555-1977", "email": "tshopper@example.com", "state": "MA", "address1": "1 Main Street", "address2": "", "firstName": "Test", "city": "Cambridge", "country": "US" }, "channel": "storefront", "shippingAddress": { "lastName": "Shopper", "postalCode": "01242", "phoneNumber": "617-555-1977", "email": "tshopper@example.com", "state": "MA", "address1": "1 Main Street", "address2": "", "firstName": "Test", "city": "Cambridge", "country": "US" }, "orderId": "o30446", "paymentMethod": "card", "gatewayId": "gatewayDemo", "profile": { "id": "110454", "phoneNumber": "617-555-1977", "email": "tshopper@example.com" } }