---
title: Affirm incoming webhook setup guide
description: This article describes how to use the Affirm data source to create a webhook in your Affirm account and send actionable events to Tealium.
url: https://docs.tealium.com/server-side/data-sources/webhooks/setup-guides/affirm/
---## Prerequisites

* [Affirm account](https://docs.affirm.com/affirm-developers/docs/dashboard)
* Tealium EventStream or Tealium AudienceStream

## How it works

Affirm offers a [Webhook API](https://docs.affirm.com/affirm-developers/docs/development-webhooks) that sends outgoing requests to an endpoint that you specify. These requests inform Tealium EventStream and AudienceStream about customer activity from your Affirm account.

* When you add the Affirm data source in your Tealium account a unique endpoint is generated.
* This endpoint is used to configure a webhook in your Affirm account.
* Once configured, you can create subscriptions based on topics and receive related push notifications to automate use cases, stay informed, and increase productivity.

## Affirm data source

The Affirm data source generates a unique URL to use in your Affirm webhook configuration. The generated URL is in the format of:

```
https://collect.tealiumiq.com/integration/event/ACCOUNT/PROFILE/DATA_SOURCE_KEY
```

Add the Affirm data source before proceeding, then provide the generated endpoint to your Affirm Client Success Manager.

Related: [How to Add a Data Source]()

## Affirm setup

Once you have your data source endpoint, use the following steps to go to your Affirm account and create the webhook.

1. Log in to your Affirm account.
1. Create a webhook.
1. Enable and save the webhook.

## Events and attributes

All incoming Affirm event attributes are automatically prefixed with `affirm_`. For example, Affirm will send the `smtp_id` attribute to Tealium and it will be converted to `affirm_smtp_id` (all lowercase).

For a full list of webhook events and attributes generated by Affirm, see the [Affirm Webhook Documentation](https://docs.affirm.com/affirm-developers/docs/development-webhooks).

|**Event Attribute**| **Type**| **Example**|
|---| ---| ---|
|`affirm_approved_amount`| Number| 50000\.0|
|`affirm_checkout_token`| String| "5I97HK0EREM38YHK3"|
|`affirm_created`| Date| 2019-02-27T22:50:52.601851|
|`affirm_decision`| String| "approved", "not\_approved"|
|`affirm_email_address`| String| "Jeff.Testerson@affirm.com"|
|`affirm_event`| String| "opened", "prequal\_decision", "approved", "not\_approved", "more\_information\_needed", "confirmed"|
|`affirm_event_timestamp`| Date| 2020-02-27T22:51:57.941799|
|`affirm_expiration`| Date| 2020-02-27T22:42:08.092894|
|`affirm_first_name`| String| "Jeff"|
|`affirm_last_name`| String| "Testerson"|
|`affirm_order_id`| String| "17.0"|
|`affirm_term_apr`| Array of Numbers| [19.55, 19.89, 20.12]|
|`affirm_term_created`| Array of Dates| [2019-02-27T22:42:08.092894, 2019-02-27T22:42:08.092894, 2019-02-27T22:42:08.092894]|
|`affirm_term_id`| Array of Strings| ["DX394TR2O0T6F3JM", "D3QF1AOBN0SL6XXT", "Z7XKQEWUW0FQOMJ2"]|
|`affirm_term_installment_amount`| Array of Numbers| [172127.0, 88236.0, 46348.0]|
|`affirm_term_installment_count`| Array of Numbers| [3.0, 6.0, 12.0]|
|`affirm_term_interest_amount`| Array of Numbers| [16381.0, 29415.0, 56176.0]|
|`affirm_term_prequal_amount`| Array of Numbers| [500000.0, 500000.0, 500000.0]|
|`affirm_total`| Number| 5000|
|`affirm_webhook_session_id`| String| fal"A1b2C3"|

## Vendor documentation

You must be logged into Affirm to view the following documentation, otherwise you will be redirected to the Affirm documentation main page.

* [Affirm Prequal Status Visibility Webhook Documentation](https://docs.affirm.com/Partners/Marketing_Messaging_Integration/Prequal_Status_Visibility_(Detailed))
* [Affirm Status Visibility Webhook Documentation](https://docs.affirm.com/Integrate_Affirm/Status_Visibility_(Detailed))
