> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chargeblast.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Chargeblast Embedded Guide

There are multiple ways to programmatically integrate Chargeblast. This guide is intended for resellers, SaaS tools, payment aggregators, and other merchant of merchant businesses. If you are a merchant yourself, please see our [webhooks](https://docs.chargeblast.com/reference/webhooks), which should be sufficient for most use cases.

If you are using only payment processors that are supported via our [integration directory](https://www.chargeblast.com/integrations), you can integrate directly via our integrations page and use our **workflow builder** to set up **refund rules**—including branching for **Ethoca / CDRN (issuer) alerts** and, where supported (for example Stripe), **EFW** (**early fraud warning**) rules for auto-refunding or filtering low-ASP transactions. See [Stripe integration](https://docs.chargeblast.com/reference/stripe-integration) for more on EFW rules.

The integration path depends on whether you'd like to use our matching algorithm, or handle alert to transaction matching yourself.

### Step 1. Handling of the alerts

#### Client-side matching

* Implement [webhook](https://docs.chargeblast.com/reference/webhooks) to receive alert
* Perform alert to transaction matching internally, refunding cardholder if desired and then update the alert via the [/update/alert](https://docs.chargeblast.com/reference/alerts-update) endpoint

#### Chargeblast matching

* Implement `/orders/upload`endpoint to push order data to Chargeblast
  * Optionally, [if using PSPs we support](https://www.chargeblast.com/integrations), integrate account via our integrations directory.
* Expose [your-domain.com/chargeblast/refund](https://docs.chargeblast.com/reference/refund-endpoint) endpoint to Chargeblast to implement refunds & subscription cancellations

### Step 2. Passing down costs to merchant

* Poll `/alerts` endpoint (or receive alerts via webhook) and associate each alert with a merchant in our system.
* Bill your merchant accordingly


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.