Setup

To enable notifications, please reach out to ChargeAfter support with the following info:

  • A dedicated URL that can receive the notification. (ChargeAfter will use this URL to POST the notification.)
  • Authorization header that will be attached to the HTTP POST call.

application.created

This event notification is sent when an application session has started.

It is an alternative to the onApplicationCreated callback in the ChargeAfter SDK.

This notification is especially useful with applications that were created using the omni-link API in which the merchant only has the linkID after the link creation. Using this notification, the merchant can track any application created with a particular link.

Payload

{
  "eventType": "application.created",
  "applicationId": "string",
  "linkId": "string",
  "createdAt": "string"
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • applicationId (type: string)
    Unique identifier used to identify the application. The application ID may be used later to retrieve application information.
  • linkId (type: string)
    Unique identifier used to identify the link used to start the application. This optional field is returned only if a link was used to create the application.
  • createdAt (type: ISO 8601-formatted string)

application.apply-confirmed

This event notification is sent when the consumer has confirmed their Apply request at the end of the application process.

This notification enables merchants to know when an application has completed successfully and to use the returned token to create a charge if applicable.

Payload

{
  "eventType": "application.apply-confirmed",
  "applicationId": "string",
  "token": "string",
  "createdAt": "string"
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • applicationId (type: string)
    Unique identifier used to identify the application. The application ID may be used later to retrieve application information.
  • token (type: string)
    The account token that can be used to create a charge.
  • createdAt (type: ISO 8601-formatted string)

application.checkout-confirmed

This event notification is sent when the consumer has confirmed their Checkout request at the end of the application process.

This notification enables merchants to know when an application has completed successfully and to use the returned token to create a charge if applicable.

Payload

{
  "eventType": "application.checkout-confirmed",
  "applicationId": "string",
  "token": "string",
  "createdAt": "string"
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • applicationId (type: string)
    Unique identifier used to identify the application. The application ID may be used later to retrieve application information.
  • token (type: string)
    The confirmation token that can be used to create a charge.
  • createdAt (type: ISO 8601-formatted string)

application.declined

This event notification is sent when the application is declined.

Payload

{
  "eventType": "application.declined",
  "applicationId": "string",
  "consumerId": "string"
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • applicationId (type: string)
    Unique identifier used to identify the application. The application ID may be used later to retrieve application information.
  • consumerId (type: string)
    Unique identifier of the consumer.

account.approved

This event notification is sent when the lender approves the account.

Payload

{
  "eventType": "account.approved",
  "applicationId": "string",
  "lenderId": "string",
  "consumerId": "string"
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • applicationId (type: string)
    Unique identifier used to identify the application. The application ID may be used later to retrieve application information.
  • lenderId (type: string)
    Unique identifier of the lender.
  • consumerId (type: string)
    Unique identifier of the consumer.

account.declined

This event notification is sent when the lender declines the account.

Payload

{
  "eventType": "account.declined",
  "applicationId": "string",
  "lenderId": "string",
  "consumerId": "string"
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • applicationId (type: string)
    Unique identifier used to identify the application. The application ID may be used later to retrieve application information.
  • lenderId (type: string)
    Unique identifier of the lender.
  • consumerId (type: string)
    Unique identifier of the consumer.

account.pending

This event notification is sent when the lender starts the review of the account.

Payload

{
  "eventType": "account.pending",
  "applicationId": "string",
  "lenderId": "string",
  "consumerId": "string"
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • applicationId (type: string)
    Unique identifier used to identify the application. The application ID may be used later to retrieve application information.
  • lenderId (type: string)
    Unique identifier of the lender.
  • consumerId (type: string)
    Unique identifier of the consumer.

account.prequalified

This event notification is sent when the lender prequalifies the account.

Payload

{
  "eventType": "account.prequalified",
  "applicationId": "string",
  "lenderId": "string",
  "consumerId": "string"
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • applicationId (type: string)
    Unique identifier used to identify the application. The application ID may be used later to retrieve application information.
  • lenderId (type: string)
    Unique identifier of the lender.
  • consumerId (type: string)
    Unique identifier of the consumer.

links.checkout-data-update

This webhook is sent with updated information on a checkout after the consumer updates the cart.

For example, if the merchant sends the following payload to ChargeAfter:

{
    "linkId": "string",
    "applicationId": "string",
    "correlationId": "string",
    "tags": {
        "key1": "value1",
        "key2": "value2"
    },
    "totalAmount": 123.45,
    "totalTaxAmount": 0.0,
    "shippingAmount": 0.0,
    "consumer": {
        "merchantConsumerId": "string",
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "mobilePhoneNumber": "string",
        "billingAddress": {
            "state": "string",  // (ISO 3166-2:US codes)
            "city": "string",
            "line1": "string",
            "line2": "string",
            "zipCode": "string"
        },
        "shippingAddress": {
            "state": "string",  // (ISO 3166-2:US codes)
            "city": "string",
            "line1": "string",
            "line2": "string",
            "zipCode": "string"
        }
    },
    "discounts": [
        {
            "name": "string",
            "amount": 0.0
        }
    ]
} 

Then ChargeAfter returns the following payload via webhook:

Payload

{
  "eventType": "links.checkout-data-update",  
  "totalAmount": 123.45,
  "totalTaxAmount": 0.0,
  "shippingAmount": 0.0
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • totalAmount (type: double)
    The updated total amount including tax and shipping.
  • totalTaxAmount (type: double)
    The updated tax amount.
  • shippingAmount (type: double)
    The updated shipping amount.

postsale.refund

This webhook is sent at the creation of a refund transaction.

Payload

{   
"eventType": "postsale.refund",  
"amount": "string",   
"chargeId": "string",  
"lenderTransactionId": "string",
"merchantOrderId": "string",
"state": "string"
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • amount (type: string)
    The amount of the refund.
  • chargeId (type: string)
    Unique identifier of the charge.
  • lenderTransactionId (type: string)
    The lender's unique identifier of the transaction.
  • merchantOrderId (type: string)
    The merchant's identifier of the order.
  • state (type: string)
    The state of the refund transaction. Possible values:
    • pending: The refund transaction was created.
    • accepted: The lender acknowledged receiving the request to perform the refund.
    • completed: The refund was funded by the lender.
    • failure: The refund transaction failed.

postsale.refund-update

This webhook is sent at the update of the state of a refund.

Payload

{
"eventType": "postsale.refund-update",
"chargeId": "string", 
"lenderTransactionId": "string",
"merchantOrderId": "string",
"state": "string"
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • amount (type: string)
    The amount of the refund.
  • chargeId (type: string)
    Unique identifier of the charge.
  • lenderTransactionId (type: string)
    The lender's unique identifier of the transaction.
  • merchantOrderId (type: string)
    The merchant's identifier of the order.
  • state (type: string)
    The state of the refund transaction. Possible values:
    • pending: The refund transaction was created.
    • accepted: The lender acknowledged receiving the request to perform the refund.
    • completed: The refund was funded by the lender.
    • failure: The refund transaction failed.

postsale.settle

This webhook is sent at the creation of a settle transaction.

Payload

{   
"eventType": "postsale.settle",
"amount": "string",   
"chargeId": "string",  
"lenderTransactionId": "string",
"merchantOrderId": "string",
"state": "string"
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • amount (type: string)
    The amount of the settle.
  • chargeId (type: string)
    Unique identifier of the charge.
  • lenderTransactionId (type: string)
    The lender's unique identifier of the transaction.
  • merchantOrderId (type: string)
    The merchant's identifier of the order.
  • state (type: string)
    The state of the settle transaction. Possible values:
    • pending: The settle transaction was created.
    • accepted: The lender acknowledged receiving the request to perform the settle.
    • completed: The settle was funded by the lender.
    • failure: The settle transaction failed.

postsale.settle-update

This webhook is sent at the update of the state of a settle.

Payload

{
"eventType": "postsale.settle-update",
"chargeId": "string", 
"lenderTransactionId": "string",
"merchantOrderId": "string",
"state": "string"
}

Field descriptions

  • eventType (type: string)
    The name of the webhook.
  • amount (type: string)
    The amount of the settle.
  • chargeId (type: string)
    Unique identifier of the charge.
  • lenderTransactionId (type: string)
    The lender's unique identifier of the transaction.
  • merchantOrderId (type: string)
    The merchant's identifier of the order.
  • state (type: string)
    The state of the settle transaction. Possible values:
    • pending: The settle transaction was created.
    • accepted: The lender acknowledged receiving the request to perform the settle.
    • completed: The settle was funded by the lender.
    • failure: The settle transaction failed.