Example Payloads

What do we send to the Webhook?

Check Commerce sends a number of items to the webhook both in the body and in the query string.

The Query String

We send over general information in the query string about the push notification.

Query Parameter

Description

Action

This is the action performed on the item sent. (New, Update, Cancel)

SourceType

This is the type of notification (Transaction, HostedPayment, RiskAssesment, ConsumerInfo)

SourceId

This is the source of the push notification.

ClientId

In some cases this is the Id that the merchant provided in other cases this is the SourceId.

MID

The MID that this is for.

Hash

This is the hashed payload using the shared salt. This is encoded using base64. See below for more details.

Example Query string

Without Hash

https://yourdomain.com/PushNotificationEndPoint/Receive/?Action=New&SourceType=Transaction&SourceId=123&ClientId=12345&MID=999997

With Hash

https://yourdomain.com/PushNotificationEndPoint/Receive/?Action=New&SourceType=Transaction&SourceId=123&ClientId=12345&MID=999997&Hash=AfySNb5T5tAfWbX9O7MfmbXL3kzyGh7BmB9pqQ+kW4SqSA9bcwpFgctYEpGCpflpSjl9srhQT9ns4qxbe18wRA==

The Hash

We calculate the Hash using Bouncy Castle SHA3-512. The exact implementation can be found below. The hash is not sent if a Hash Salt is not configured for the merchant.

public bool? IsValidPayload(string payload, string hash)
{
    if (hash == null)
    {
        return null;
    }
 
    byte[] calculatedHash = HashSHA3_BC_512(payload, Convert.FromBase64String(_hashSalt));
 
    return (Convert.ToBase64String(calculatedHash) == hash);
}
 
private byte[] HashSHA3_BC_512(string payload, byte[] salt)
{
    byte[] input = null;
 
    if (salt != null)
    {
        byte[] bytePayload = Encoding.UTF8.GetBytes(payload);
 
        input = new byte[salt.Length + bytePayload.Length];
        salt.CopyTo(input, 0);
        bytePayload.CopyTo(input, salt.Length);
    }
    else
    {
        input = Encoding.UTF8.GetBytes(payload);
    }
 
    Org.BouncyCastle.Crypto.Digests.Sha3Digest hashAlgorithm = new Org.BouncyCastle.Crypto.Digests.Sha3Digest(512);
 
    hashAlgorithm.BlockUpdate(input, 0, input.Length);
 
    byte[] hash = new byte[64]; // 512 / 8 = 64
    hashAlgorithm.DoFinal(hash, 0);
 
    return hash;
}

Payload Examples

Transaction Source

Parameters

Name

Type

Notes

TransactionID

String

Value of the TransactionLog.ID column.

Name

String

Consumer’s Name from Consumer Information

CustomerOrderReferenceId

String

Value of the TransactionLog.TheirReferenceNumber column.

Amount

Nullable Decimal

Transaction Amount

Status

Nullable Integer

Value of the TransactionLog.Status column.

StatusDescription

String

Friendly name representing the Status

ReferenceNo

String

Value of the TransactionLog.TheirReferenceNumber column.

ApprovalCode

String

Value of the TransactionLog.ApprovalCode column.

DateProcessed

Nullable DateTime

EffectiveEntryDate

Nullable DateTime

Value of the TransactionLog.EffectiveEntryDate column.

BankRoutingNo

String

Value of the TransactionLog.BankRoutingNumber column.

BankAccountNoMasked

String

Value of the TransactionLog.BankAccountingNumber column masked.

PhoneNumber

String

Consumer’s Phone Number

IndividualId

String

TranCode

String

Value of the TransactionLog.TranCode column.

TranType

String

Value of the TransactionLog.TranType column.

ReturnDate

Nullable DateTime

Value of the TransactionLog.ReturnDate column.

ReturnReasonCode

String

Value of the TransactionLog.ReturnReasonCode column.

ReturnReasonDescription

String

Resubmitted

String

Value of the TransactionLog.Resubmitted column.

ResubmittedReferenceNumber

String

Value of the TransactionLog.ResubmittedReferenceNumber column.

DateSettled

Nullable DateTime

Value of the TransactionLog.DateSettled column.

CheckNumber

String

Value of the TransactionLog.CheckNumber column.

AmountDisbursed

Nullable Decimal

Value of the TransactionLog.AmountDisbursed column.

Note

String

Value of the TransactionLog.Note column.

ExtendedSeverities

Array

Calculated based on the value of the Note field.

Address1

String

Consumer’s Address Line 1

Address2

String

Consumer’s Address Line 2

City

String

Consumer’s City

State

String

Consumer’s State

Zip

String

Consumer’s Zip Code

CustomerEMail

String

Consumer’s Email Address

NOCDisbursed

String

NOCInfoData

String

NOCDate

Nullable DateTime

Value of the TransactionLog.NocDate column.

NOCDescription

String

Value of the TransactionLog.NocDetails column.

IsLive

String

Value of the TransactionLog.IsLive column.

datelastupdated

Nullable DateTime

Verification

String

Value of the TransactionLog.Verification column.

OriginateDate

Nullable DateTime

Value of the TransactionLog.OriginateDate column.

Refunds

Bye

Value of the TransactionLog.Refunds column.

RefundedID

String

Value of the TransactionLog.RefundedID column or Null if value is 0

SECCode

String

Gets the value of the TransactionLog.SECCode column.

Descriptor

String

Gets the value of the TransactionLog.Descriptor column

warehouseID

String

BatchUploadID

String

AuthID

String

ID of an Authlog transaction used for Check Guarantee Authorization.

MerchantNumber

String

Value of the TransactionLog.MerchantNumber column.

CustRefId

String

TheirReferenceNumber

String

Value of the TransactionLog.TheirReferenceNumber column.

ConsumerId

Nullable Guid

Consumer Information Identifier

Payload Sample

{
	"TransactionID": "123456789",
	"Name": "John Doe",
	"CustomerOrderReferenceId": "0",
	"Amount": 1.0,
	"Status": 0,
	"StatusDescription": "Processed",
	"ReferenceNo": "0",
	"ApprovalCode": null,
	"DateProcessed": "2021-12-15T14:16:42.607",
	"EffectiveEntryDate": null,
	"BankRoutingNo": "123456780",
	"BankAccountNoMasked": "xxxxxx1111",
	"PhoneNumber": null,
	"IndividualId": null,
	"TranCode": "27",
	"TranType": "n",
	"ReturnDate": null,
	"ReturnReasonCode": null,
	"ReturnReasonDescription": null,
	"Resubmitted": "0",
	"ResubmittedReferenceNumber": null,
	"DateSettled": null,
	"CheckNumber": null,
	"AmountDisbursed": null,
	"Note": "Score: 100/100|",
	"ExtendedSeverities": [],
	"Address1": "123 S. Fake Street",
	"Address2": null,
	"City": "Phoenix",
	"State": "AZ",
	"Zip": "85048",
	"CustomerEMail": null,
	"NOCDisbursed": null,
	"NOCInfoData": null,
	"NOCDate": null,
	"NOCDescription": null,
	"IsLive": "False",
	"datelastupdated": "2021-12-15T14:16:42.61",
	"Verification": "",
	"OriginateDate": null,
	"Refunds": 0,
	"RefundedID": "0",
	"SECCode": null,
	"Descriptor": null,
	"warehouseID": null,
	"BatchUploadID": null,
	"AuthID": null,
	"MerchantNumber": "999997",
	"CustRefId": null,
	"TheirReferenceNumber": "0",
	"ConsumerId": null
}

Consumer Info Source

Parameters

Name

Type

Notes

Id

Guid

Consumer Information Identifier

CoNo

String

Value of the MerchantNumber

Name

String

Consumer’s Name

Address1

String

Consumer’s Address Line 1

Address2

String

Consumer’s Address Line 2

City

String

Consumer’s City

State

String

Consumer’s State

Zip

String

Consumer’s Zip Code

DailyCountMax

Integer

Comes from the AttrValConsumerInfo table.

DailyAmountMax

Decimal

Comes from the AttrValConsumerInfo table.

MonthlyCountMax

Integer

Comes from the AttrValConsumerInfo table.

MonthlyAmountMax

Decimal

Comes from the AttrValConsumerInfo table.

HighTicketAmount

Decimal

Comes from the AttrValConsumerInfo table.

DailyCountCreditMax

Integer

Comes from the AttrValConsumerInfo table.

DailyAmountCreditMax

Decimal

Comes from the AttrValConsumerInfo table.

MonthlyCountCreditMax

Integer

Comes from the AttrValConsumerInfo table.

MonthlyAmountCreditMax

Decimal

Comes from the AttrValConsumerInfo table.

HighTicketCreditAmount

Decimal

Comes from the AttrValConsumerInfo table.

AccountName

String

Account’s Name

Mask

String

Account’s Masked Number

AvailableBalance

Nullable Decimal

Account's Available Balance

CurrentBalance

Nullable Decimal

Account’s Current Balance

BalanceLastUpdated

Nullable DateTime

Account’s last time the Balance was updated

Payload Sample

{
    "Id": "0692710e-6381-4411-8942-8fc646b2a382",
    "CoNo": "999997",
    "Name": "John Doe",
    "Address1": "123 S. Fake Street",
    "Address2": null,
    "City": "Phoenix",
    "State": "AZ",
    "Zip": "85044",
    "DailyCountMax": 0,
    "DailyAmountMax": 0.0,
    "MonthlyCountMax": 0,
    "MonthlyAmountMax": 0.0,
    "HighTicketAmount": 0.0,
    "DailyCountCreditMax": 0,
    "DailyAmountCreditMax": 0.0,
    "MonthlyCountCreditMax": 0,
    "MonthlyAmountCreditMax": 0.0,
    "HighTicketCreditAmount": 0.0,
    "AccountName": "Unknown:Checking",
    "Mask": "xxxxx7127",
    "AvailableBalance": null,
    "CurrentBalance": null,
    "BalanceLastUpdated": null
}

Risk Assessment Source

Parameters

Name

Type

Notes

MerchantNumber

Nullable Long

Same as MID, this is the merchant identifier

LinkedPaymentMethodId

Guid

Id

Guid

ConsumerRefId

String

ConsumerDetails

Array (Customer Info)

See the Customer Info Source Parameters above.

Payload Sample

{
	"MerchantNumber": 999997,
	"LinkedPaymentMethodId": "dd8sr3d2-536a-ec11-9882-4c348806a4ba",
	"Id": "bbedfdca-2fc3-4fce-844c-bc077bbd6e33",
	"ConsumerRefId": "440-11sdf5",
	"ConsumerDetails": [
		{
			"Id": "bbe32dca-2fc3-4fce-844c-bc077bbd6e33",
			"CoNo": "999997",
			"Name": null,
			"Address1": null,
			"Address2": null,
			"City": null,
			"State": null,
			"Zip": null,
			"DailyCountMax": 15,
			"DailyAmountMax": 500.0,
			"MonthlyCountMax": 25,
			"MonthlyAmountMax": 1000.0,
			"HighTicketAmount": 500.0,
			"DailyCountCreditMax": 15,
			"DailyAmountCreditMax": 500.0,
			"MonthlyCountCreditMax": 25,
			"MonthlyAmountCreditMax": 1000.0,
			"HighTicketCreditAmount": 500.0,
			"AccountName": "Unknown: Checking",
			"Mask": "1234",
			"AvailableBalance": null,
			"CurrentBalance": null,
			"BalanceLastUpdated": null
		}
	]
}

Hosted Payment Source

Parameters

Name

Type

Notes

MID

Nullable Long

Merchant Identifier

ConsumerDetail

Array (Customer Info)

See the Customer Info Source Parameters above.

Transaction

Object

See Transaction Source Parameters above.

Payload Sample

{
    "MID": 999997,
    "ConsumerDetail": [
        {
            "Id": "bbe3feca-2fc3-4fce-844c-bc077bbd6e33",
            "CoNo": "999997",
            "Name": "John Doe",
            "Address1": "123 S. Fake Street",
            "Address2": null,
            "City": "Phoenix",
            "State": "AZ",
            "Zip": "85225",
            "DailyCountMax": 0,
            "DailyAmountMax": 0.0,
            "MonthlyCountMax": 0,
            "MonthlyAmountMax": 0.0,
            "HighTicketAmount": 0.0,
            "DailyCountCreditMax": 0,
            "DailyAmountCreditMax": 0.0,
            "MonthlyCountCreditMax": 0,
            "MonthlyAmountCreditMax": 0.0,
            "HighTicketCreditAmount": 0.0,
            "AccountName": "Unknown: Checking",
            "Mask": "1234",
            "AvailableBalance": null,
            "CurrentBalance": null,
            "BalanceLastUpdated": null
        }
    ],
    "Transaction": {
        "TransactionID": "0",
        "Name": "John Doe",
        "CustomerOrderReferenceId": "440-11dfgs5",
        "Amount": 2000.0,
        "Status": 7,
        "StatusDescription": "Declined",
        "ReferenceNo": null,
        "ApprovalCode": null,
        "DateProcessed": null,
        "EffectiveEntryDate": null,
        "BankRoutingNo": null,
        "BankAccountNoMasked": null,
        "PhoneNumber": null,
        "IndividualId": null,
        "TranCode": null,
        "TranType": null,
        "ReturnDate": null,
        "ReturnReasonCode": null,
        "ReturnReasonDescription": null,
        "Resubmitted": null,
        "ResubmittedReferenceNumber": null,
        "DateSettled": null,
        "CheckNumber": null,
        "AmountDisbursed": null,
        "Note": "",
        "ExtendedSeverities": null,
        "Address1": null,
        "Address2": null,
        "City": null,
        "State": null,
        "Zip": null,
        "CustomerEMail": null,
        "NOCDisbursed": null,
        "NOCInfoData": null,
        "NOCDate": null,
        "NOCDescription": null,
        "IsLive": null,
        "datelastupdated": null,
        "Verification": null,
        "OriginateDate": null,
        "Refunds": 0,
        "RefundedID": null,
        "SECCode": null,
        "Descriptor": null,
        "warehouseID": null,
        "BatchUploadID": null,
        "AuthID": null,
        "MerchantNumber": null,
        "CustRefId": null,
        "TheirReferenceNumber": "440-11dfgs5",
        "ConsumerId": "bbe3feca-2fc3-4fce-844c-bc077bbd6e33"
    }
}