This section describes the top-level properties and the properties of subobjects sent in the JSON request body of the Custom Currency webhook for loyalty point transactions.
Top-level properties
The following table describes the top-level properties that Oracle Commerce Cloud sends in the webhook request.
Property | Description |
---|---|
transactionType | A code indicating the type of transaction. This must be one of the following numeric values:
|
channel | The area of the system where the payment-processing request originated. Valid values are:
|
orderId | The ID of the order associated with the transaction. |
currencyCode | The custom currency code used for the loyalty program. See Create a custom currency for loyalty points for information about this value. |
locale | The shopper’s locale, taken from the order. If no locale is set, the default locale from the storefront is used. |
customProperties | Additional key/value pairs to be sent to the payment provider. |
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. |
transactionTimestamp | The timestamp of the transaction, expressed as an ISO 8601 value in the following format:
|
paymentMethod | The payment method. For loyalty points, the value is |
amount | For authorize, void, and refund transactions, the number of loyalty points, expressed as a positive 12-digit number. |
siteId | The ID of the site on which the order is placed. |
gatewayId | The ID of the payment gateway. |
gatewaySettings | Key/value pairs of properties that configure the payment gateway. |
profile properties
The following table describes the properties of the profile
object included in the request. These values are associated with the shopper purchasing the order.
Property | Description |
---|---|
id | The Commerce Cloud ID of the shopper profile. |
phoneNumber | The phone number from the shopper profile. |
The email address from the shopper profile. |
loyaltyDetails properties
The following table describes the properties of the loyaltyDetails
objects sent in an authorization request or balance inquiry. These values are retrieved from the shopper’s profile.
Property | Description |
---|---|
programName | The name of the loyalty program. |
programId | The ID for the loyal program. |
membershipId | The shopper’s membership ID in the loyalty program. |
status | The shopper’s status in the loyalty program. Valid values are: RequestForEnrollment |
referenceInfos properties
The following table describes the properties of the referenceInfos
objects sent in a void request or refund request. The values of these properties are taken from the original authorization transaction so the merchant can map the void or refund to it.
Property | Description |
---|---|
amount | The number of loyalty points used in the original transaction, expressed as a positive 12-digit number. |
currencyCode | The custom currency code used for the loyalty program. |
locale | The shopper’s locale from the original transaction. |
merchantTransactionId | The transaction reference ID from the merchant. |
hostTransactionId | The transaction reference ID from the payment gateway. |
billingAddress properties
The following table describes the properties of the billingAddress
object in an authorization request. The billing address is the address of the shopper to whom the order is charged.
Property | Description |
---|---|
lastName | The last name of the shopper. |
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 shopper. |
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 an authorization or balance inquiry request. The shipping address is the address of the person (not necessarily the shopper) 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. |
Sample balance inquiry request
The following is an example of a loyalty point balance inquiry request:
{ "loyaltyDetails": [ { "programName": "programForFlyer", "membershipId": "member0002", "programId": "prg10002", "status": "Enrolled" }, { "programName": "programForYoungster", "membershipId": "member0001", "programId": "prg10001", "status": "Enrolled" } ], "orderId": "o30417", "profile": { "phoneNumber": "1234512345", "id": "110072", "email": "john@example.com" }, "channel": "storefront", "locale": "en", "transactionId": "o30417-pg30418-1504691722253", "transactionTimestamp": "2017-09-06T09:55:22+0000", "transactionType": "0600", "customProperties": { "cust-prop2": "cust-prop2", "cust-prop1": "cust-prop1" }, "paymentId": "pg30418", "gatewaySettings": { "paymentMethodTypes": "loyaltyPoints" }, "paymentMethod": "loyaltyPoints", "shippingAddress": { "lastName": "Niel", "country": "US", "firstName": "John", "phoneNumber": "1234512345", "address2": null, "city": "Cambridge", "address1": "1 Main St", "postalCode": "02142", "state": "MA", "email": "john@example.com" }, "siteId": "siteUS", "currencyCode": "PTS", "gatewayId": "demoLoyaltyPointsPaymentGateway" }
Sample authorization request
The following is an example of a loyalty point authorization request:
{ "loyaltyDetails": [ { "programName": "programForYoungster", "membershipId": "member0001", "programId": "prg10001", "status": "Enrolled" }, { "programName": "programForFlyer", "membershipId": "member0002", "programId": "prg10002", "status": "Enrolled" } ], "amount": "000000000200", "orderId": "o30417", "profile": { "phoneNumber": "1234512345", "id": "110072", "email": "john@example.com" }, "channel": "storefront", "locale": "en", "transactionId": "o30417-pg30415-1504691268818", "transactionTimestamp": "2017-09-06T09:47:48+0000", "transactionType": "0100", "customProperties": { "cust-prop2": "cust-prop2", "cust-prop1": "cust-prop1" }, "paymentId": "pg30415", "gatewaySettings": { "paymentMethodTypes": "loyaltyPoints" }, "paymentMethod": "loyaltyPoints", "shippingAddress": { "lastName": "Niel", "country": "US", "firstName": "John", "phoneNumber": "1234512345", "address2": null, "city": "Cambridge", "address1": "1 Main St", "postalCode": "02142", "state": "MA", "email": "john@example.com" }, "siteId": "siteUS", "billingAddress": { "country": "US", "lastName": "John", "firstName": "Niel", "phoneNumber": "9000054321", "city": "San Francisco", "address1": "1 Elm St", "postalCode": "91333", "state": "CA", "email": "john.niel@gmail.com" }, "currencyCode": "PTS", "gatewayId": "demoLoyaltyPointsPaymentGateway" }