# Process an Invoice

## How do I Process an Invoice?&#x20;

In **Maica**, you can only process payment for an [Invoice](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/invoice) using the **Stripe Payment Integration**. Please see below for more detailed information on the steps involved in processing an [Invoice](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/invoice) using Stripe.&#x20;

{% hint style="info" %}
In order to process invoices using the Stripe Payment Integration, you first must have Stripe configured. To learn more about how to configure Stripe in your Maica instance, click [here](https://app.gitbook.com/s/9selzjEx6KX7RYEawAVr/integrations/stripe-integration).&#x20;
{% endhint %}

## Stripe Payment Integration&#x20;

The Stripe Payment Integration in Maica allows you to process [Invoices](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/invoice) directly through **Maica** using Stripe. In Maica, there are two options for processing an Invoice, these include:&#x20;

1. [Charge the default payment method associated with the Client](#id-1.-charge-the-default-payment-method-associated-with-the-client)
2. [Generate the hosted Invoice link](#id-2.-generate-the-hosted-invoice-link)

{% hint style="info" %}
The first choice is handy if your Participant has disclosed a Payment Method and consented to be charged with your organisation, while the second option is useful if they have not.
{% endhint %}

Please see below for more detailed information on each step in order to process an [Invoice](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/invoice).&#x20;

### Charge the default payment method associated with the Client

#### 1. Set up Payment Methods

Firstly, you must begin by setting up Payment Methods for each required [Participant(s)](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/participant). The integration allows you to establish a new Payment Method directly from your Participant record. You can begin adding Payment Methods by selecting your Participant record, then clicking the `Stripe Payment Methods` button, as shown below.&#x20;

<figure><img src="https://2670482622-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhehRshYIRk6XUlay9L3b%2Fuploads%2FKJXA6UaRVmoCiwqhSr6K%2Fadd%20payment%20methods.png?alt=media&#x26;token=54dc63e1-977a-4d90-807a-e02ea4ab73a9" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can add multiple payment methods for each Participant(s). If there are multiple payment methods, you can toggle the default.
{% endhint %}

After clicking the `Stripe Payment Methods` button, and before you can add in any Payment Methods, **Maica** will first prompt you to provide a Stripe Customer ID for the selected [Participant(s)](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/participant). If you have one, please enter it in the `Stripe Customer ID` input in the `Participant Record`, as shown below.&#x20;

<figure><img src="https://2670482622-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhehRshYIRk6XUlay9L3b%2Fuploads%2Fi6EX4TLhtPeDPRnpWZIV%2Fstripe%20customer%20id.png?alt=media&#x26;token=aa576d96-46ac-4e49-9528-56f70e34272f" alt="" width="536"><figcaption></figcaption></figure>

Alternatively, click the `Create a New Stripe Customer` button, and **Maica** will automatically sync with Stripe, create a `Stripe Customer ID` using the related payment method, and populate this field for you.&#x20;

Once a `Stripe Customer ID` has been provided, you will be able to add Payment Methods. The supported Payment Methods are `Credit Card` and/or `Direct Debit`.

After Payment Methods have been added, Maica will display the following on the Participant(s) record.

<figure><img src="https://2670482622-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhehRshYIRk6XUlay9L3b%2Fuploads%2FEhxoxXVK1t4qFVNRVQaS%2FPayment%20Information.png?alt=media&#x26;token=729ac457-3b7a-4e7a-b6bc-f9e853152ca0" alt="" width="555"><figcaption></figcaption></figure>

#### 2. Toggle Default Payment Method

In order to Toggle the Default Payment Method for your [Participant(s)](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/participant), simply reselect the `Stripe Payment Methods` button after a Payment Method has been added. This allows you to choose between any associated Payment Methods, or, a new Payment Method, as shown below.&#x20;

<figure><img src="https://2670482622-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhehRshYIRk6XUlay9L3b%2Fuploads%2FXBfeuAbnGojEu7Fswj7B%2Fdefault%20payment%20method.png?alt=media&#x26;token=0be31836-bb88-45e4-86e4-480c05b46032" alt="" width="563"><figcaption></figcaption></figure>

Simply select which Payment Method you would like to be Default and close the pop-up. Your default Payment Method will be displayed in the `Payment Information` section of the Participant record, as per the screen above.&#x20;

#### 3.  Process an Invoice

Once a Payment Method has been added and the [Participant](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/participant) has a `Stripe Customer ID`, the Payment Method is ready to be charged and hence associated [Invoices](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/invoice) are ready to be processed.&#x20;

{% hint style="info" %}
Invoices can be processed manually or using Maica automation. This article illustrates an Invoice being processed manually. To learn more about Invoice automation, click [here](https://knowledge.maica.com.au/maica-knowledge-base/integrations/stripe-integration-overview).
{% endhint %}

To begin processing an [Invoice](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/invoice), first navigate to the required [Invoice](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/invoice) then click the `Process Invoice` button in the top right corner of your interface, as shown below.&#x20;

<figure><img src="https://2670482622-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhehRshYIRk6XUlay9L3b%2Fuploads%2FoWUR8iwETOMjrVvvdt6I%2Fprocess%20invoice.png?alt=media&#x26;token=f877d2da-21ad-4c81-a573-51abe35c453e" alt=""><figcaption></figcaption></figure>

Once you click the `Process Invoice` button, **Maica** will display a custom UI pop-up, simply select `Charge the default payment method associated with the Client`. This will charge the [Default Payment Method ](#id-2.-toggle-default-payment-method)set on the Participant record. This is useful when the payment is coming directly from the [Participant](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/participant). &#x20;

***

Once done, **Maica** will take you to a confirmation page where you can confirm your payment. Once confirmed, the [Invoice](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/invoice) will automatically update and populate the `Stripe Payment Information` with a `Stripe Invoice ID`, `Stripe Invoice Link` and `Stripe Dashboard Link`, as shown below.&#x20;

<figure><img src="https://2670482622-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhehRshYIRk6XUlay9L3b%2Fuploads%2FbphKtoj739yRvIVxELts%2FScreenshot%202024-08-13%20at%201.33.58%20pm.png?alt=media&#x26;token=2efceeb5-1393-4718-a2b3-6ca84f94bf99" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Your Processed Invoice can be accessed directly from **Maica** by clicking on the `Stripe Dashboard Link` or `Stripe Invoice Link`.
{% endhint %}

### 2. Generate the hosted Invoice link

If your Participant has not disclosed a Payment Method with your Organisation or they would rather process an Invoice themselves directly, you can send them a Stripe Hosted Invoice Link for any Invoice they are associated with. This option will provide the URL for the Stripe hosted invoice page, which allows the Invoice Recipient to view and pay the Invoice directly.

{% hint style="info" %}
Please note, in order to send an Invoice link, you must still have the [Stripe Integration Configured](https://app.gitbook.com/s/9selzjEx6KX7RYEawAVr/integrations/stripe-integration).
{% endhint %}

{% hint style="info" %}
If your Participant has set up a Payment Method (as above), you can still Process an Invoice through a hosted link if you desire.&#x20;
{% endhint %}

You do this by selecting the `Process Invoice` Quick Action located on the associated Invoice, and selecting `Generate the hosted Invoice link`.

Once the link has been issued and the Invoice has been processed, a `Stripe Customer ID` will be populated for the Participant so you can identify them in both Stripe and **Maica**. Additionally, once processed, the [Invoice](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/invoice) will automatically update and populate the `Stripe Payment Information` with a `Stripe Invoice ID`, `Stripe Invoice Link` and `Stripe Dashboard Link`.&#x20;

{% hint style="info" %}
Your Processed Invoice can be accessed directly from **Maica** by clicking on the `Stripe Dashboard Link` or `Stripe Invoice Link`.
{% endhint %}

## What happens next?&#x20;

After your [Invoice](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/invoice) has been Processed, **Maica** will generate a payment record. This is the payment that has been used to process the associated [Invoice](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/invoice). This record sits within your Invoice record under `Payments`, as shown below.

<figure><img src="https://2670482622-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhehRshYIRk6XUlay9L3b%2Fuploads%2F8SvxTbjv2rVzk8qztcju%2Fpayment%20record.png?alt=media&#x26;token=df96d041-8cf5-4603-88fd-828444895432" alt="" width="563"><figcaption></figcaption></figure>

The Payment Record holds all the information from the [Invoice](https://knowledge.maica.com.au/maica-knowledge-base/getting-started/maica-key-concepts/invoice) including `Type`, `Source`, `Date`, `Amount` , `Invoice Number` and more.&#x20;
