> For the complete documentation index, see [llms.txt](https://re-source.gitbook.io/payments/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://re-source.gitbook.io/payments/components/create-invoice.md).

# Stripe - Create Invoice

Stripe - Create Invoice component allows to create and email/pay Stripe **Invoice**.

<figure><img src="/files/bSR0bLuEIvjJdtZHJBym" alt=""><figcaption></figcaption></figure>

The Invoice creation process has the following steps:

1. Provide a Stripe Customer (can be automatically prepopulated if one of the Customer search attribute is configured). There is an ability to create a new Stripe Customer.

   <figure><img src="/files/p4x83zBK92151MVDdRz0" alt=""><figcaption></figcaption></figure>

2. Select the Payment Collection method
   1. Email invoice to the customer to pay manually - A Draft Invoice will be generated, which can either be manually Emailed to the Customer or [automatically sent](https://docs.stripe.com/invoicing/send-email) if this option is enabled in the [Stripe Billing](https://dashboard.stripe.com/settings/billing/automatic) settings.
   2. Automatically charge a Customer's Payment Method - A Draft Invoice will be created, which will [automatically Charge](https://docs.stripe.com/invoicing/automatic-charging) the default Payment Method attached to the Customer or you can also choose another one below from the Customer's Payment Methods.

3. Upon a successfull creation the link to an Invoice in Stripe Dashboard is provided to copy or open in a new browser tab. There is a button appears to Finalize the Draft Invoice and Email/Pay.

   <figure><img src="/files/FUMLus235EtKv2wKDHjo" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/UjoSzhGKCb4tmsRECvbE" alt=""><figcaption></figcaption></figure>

Please see the list of the attributes to configure the component:

| Attribute                 | Description                                                                                            |
| ------------------------- | ------------------------------------------------------------------------------------------------------ |
| Customer Id Field         | The API name of the field that contains Stripe Customer Id to search a Stripe Customer                 |
| Customer Email Field      | The API name of the field that contains the customer email to search a Stripe Customer                 |
| Customer Record Id Field  | The API name of the field to find Customers in Stripe by rs\_pay\_recordId to search a Stripe Customer |
| Default Amount Field      | The API name of the default Amount field                                                               |
| Default Description Field | The API name of the default Description field                                                          |
| Target Stripe Id Field    | The API name of the field to store Stripe Invoice Id                                                   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://re-source.gitbook.io/payments/components/create-invoice.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
