---
title: Payments - Stripe Integration
slug: nVXLIReJR6PvDwSQZTzZn
docTags: 
createdAt: 2024-07-17T13:13:54.225Z
---

## Stripe Integration Setup Guide

Amberflo offers a built-in integration with Stripe to support automated payment processing.

**When an invoice is generated in Amberflo, the total amount is sent to Stripe, which handles the payment collection.** Amberflo continuously monitors the payment lifecycle and updates the invoice status in real time based on changes in Stripe.

### Configuration Steps

To configure Stripe integration:

1. In the Amberflo UI, use the main navigation menu on the left to go to **Settings**.
2. Select **Payments**.
3. Choose whether to connect to Stripe in **test mode** or **production mode**.



![](https://files.readme.io/ff89769-stripe-1.png)

### Associating Customers Between Amberflo and Stripe

You have two options for associating customers:

- **Use the Amberflo SDK or API to create a customer.** Set the autoCreateCustomerInStripe flag to true when calling the Create Customer API. In the UI, you can also toggle the option to automatically create customers in Stripe (see image below).
- **If you already have customers in Stripe, you can link them by updating the Amberflo customer object.** Set the StripeId trait on the Amberflo customer to match the customer-id from Stripe.

**The StripeId trait&#x20;**&#x69;s used to associate the Amberflo customer with its corresponding customer in Stripe.

```json
{
	"customerName": "Monsters, Inc.",
	"enabled": true,
	"updateTime": 1648767962572,
	"traits": {
		"stripeId": "cus_LCEP3LBELibfSM",
    "paymentProviderName": "STRIPE"
	},
	"createTime": 1631836633987,
	"customerEmail": "",
	"description": "",
	"id": "54a43bba-915d-4512-a0bd-9d9debe5555",
	"customerId": "54a43bba-915d-4512-a0bd-9d9debe5555"
}
```

If you choose to automatically create the Stripe customer, you can either use the Amberflo SDK or the API [Create a customer](docId\:IWTZyA4jWLlxbgp3qaZSl) with autoCreateCustomerInStripe set to true.
In the UI, you can toggle the option to create in Stripe (image below):



![](https://files.readme.io/4c392e5-stripe-3.png)

If you already have the Customer in Stripe and you would like to set up the Amberflo customer with the payment information, **copy the created Customer ID (cus\_XXXXXX) from Stripe into the Amberflo customer tab to update the payment information.**



![](https://files.readme.io/d28d87a-Screen_Shot_2022-02-25_at_6.59.37_AM.png)



![](https://files.readme.io/e846d7d-stripe-2.png)

Set up the default payment method in Stripe. For testing, you can use dummy credit cards.

📘 ***Further Reading***

- ***For testing documentation on Stripe,&#x20;***[click here.](https://stripe.com/docs/testing)

