> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://docs.downpay.app/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Using Shopify Flow with Downpay

Downpay officially integrates with [Shopify Flow](https://apps.shopify.com/flow) to provide ways to automate workflows and actions such as partial payment collection, authorization, and other triggers. 

Shopify Flow is generally available to all Shopify merchants, regardless of their plan.

| You can [preview workflows](https://help.shopify.com/en/manual/shopify-flow/manage/test-workflow) in Shopify Flow, but actions that connect to third-party services such as Downpay only show configuration previews and don't return a response. For example, collecting payment is not something Shopify can simulate, but you can check the logic up to that point and see what data is passed from step to step.
---
---

###### On this page:

[Downpay Triggers](#1-downpay-triggers)
* [Payment collection failure](#2-payment-collection-failure)
* [Payment collection success](#2-payment-collection-success)
* [Payment authorization failure](#2-payment-authorization-failure)
* [Payment authorization success](#2-payment-authorization-success)
* [Payment due in](#2-payment-due-in)
* [Downpay order created](#2-downpay-order-created)

[Downpay Actions](#1-downpay-actions)
* [Collect remaining payment](#2-collect-remaining-payment)
* [Authorize remaining payment](#2-authorize-remaining-payment)
* [Void authorization](#2-void-authorization)
* [Update due date](#2-update-order-due-date)
* [Add product to purchase option](#2-add-product-to-purchase-option)
* [Add variant to purchase option](#2-add-variant-to-purchase-option)
* [Remove product from purchase option](#2-remove-product-from-purchase-option)
* [Remove variant from purchase option](#2-remove-variant-from-purchase-option)
* [Send payment method update email](#2-send-payment-method-update-email)

[Downpay prebuilt Flow templates](#1-downpay-prebuilt-flow-templates)
* [Customer notifications](#2-customer-notifications)
* [Order management](#2-order-management)
* [Payment collection](#2-payment-collection)
* [Payment authorization](#2-payment-authorization)
* [Additional templates](#2-additional-templates)
---
---

# Downpay triggers

Downpay's triggers can be found in Shopify Flow when creating a new workflow under the **Triggers** menu.

## Payment collection failure

The **payment collection failure** trigger can be used when collecting remaining payment and wanting to take action if payment fails. This trigger also contains a field that states the [reason for the failure](https://docs.stripe.com/declines/codes) which can be used as a condition to have different actions based on the state.

## Payment collection success

The **payment collection success** trigger can be used when collecting remaining payment and wanting to take action on payment collection success. 

|| If you only want to use this trigger when collecting balance payments, use a conditional block to check if Order.displayFinancialStatus is equal to paid

## Payment authorization failure

The **payment authorization failure** trigger can be used to take action if payment authorization fails. This trigger also contains a field that states the [reason for the failure](https://docs.stripe.com/declines/codes) which can be used as a condition to have different actions based on the state.

## Payment authorization success

The **payment authorization success** trigger can be used to take action on payment authorization success.

## Payment due in

Each order placed through Downpay has an associated due date for the remaining balance. Downpay comes with triggers for when orders are due. There are triggers for 24 hours, 48 hours, and 7 days before payments are due.  These triggers, in addition to the default **Payment Schedule is Due** trigger, can be used to collect the remaining payment, or take another action depending on your use cases. For example, you could place a hold on a customer's card 48 hours before the order is due, and then fulfill the order knowing that payment is secured.

|| This trigger begins firing the day after an order is created. This means that for an order created on May 1, the trigger will only fire if the due date is May 3 or later.

### Payment Due - Daily Ticker

The Payment Due – Daily Ticker trigger gives you more flexibility if you want to use a custom time period beyond the default “Payment due in 24/48 hours or 7 days” triggers.

This trigger runs once a day for every Downpay order, starting from the order creation date until 30 days after the order due date.

|| This trigger begins firing the day after an order is created. This means that for an order created on May 1, the trigger will only fire if the due date is May 3 or later.

To use it:

Add the Payment Due – Daily Ticker as your trigger.

Add a condition with the variable `daysUntilDueDate`.

Set the number of days before the due date when you want the workflow to run.

From there, you can take any action you need, such as sending an invoice or notifying your team.

## Downpay order created

The **Downpay order created** trigger starts Flows when an order is created that contains items using a Downpay purchase option.
---
---

[Jump to top](#6-on-this-page)

# Downpay actions

|| Note: Downpay flow actions affecting orders only act on Downpay-enabled orders.

## Collect remaining payment

This action will collect the remaining balance to the card on file on a Downpay processed order.

## Authorize remaining payment

This action will authorize the remaining balance to the card on file on a Downpay processed order. 

Authorization, also known as pre-authorization or a credit card hold, is an approval from the credit card issuer that confirms that the cardholder has sufficient funds to cover the cost of a transaction. The length of the authorization varies based on the payment provider and Shopify Plan. Learn more about [authorization on Shopify](https://help.shopify.com/en/manual/payments/payment-authorization#credit-card-authorization-period). 

| When selling products that are shipping before they are fully paid, we always recommend authorizing the remaining balance in order to avoid issues with payment capture due to insufficient funds, expired, or cancelled cards.

||| Additional amount field is available for Shopify Plus plan only. Leave at 0 to authorize full remaining balance on all other Shopify plans.

## Void authorization

This action voids an authorization on a Downpay order, ahead of it's expiry date.

## Update order due date

This action changes the due date of an open Downpay order with a deferred balance remaining.

|| If a balance due date passes, you are not prevented from [__collecting payment at a later date__](https://docs.downpay.app/en/article/frequently-asked-questions-1xa7oo6/#2-can-i-still-collect-payment-if-i-dont-authorize-and-charge-it-by-an-orders-due-date) from the card on file.

## Add product to purchase option

This action adds a product to a purchase option.

## Add variant to purchase option

This action adds a variant to a purchase option. The Variant ID can be added as a variable through Liquid code that outputs the ID, as well as by using the Flow variable picker.

## Remove product from purchase option

This action removes a product from a purchase option.

## Remove variant from purchase option

This action removes a variant from a purchase option. The Variant ID can be added as a variable through Liquid code that outputs the ID, as well as by using the Flow variable picker.

## Send payment method update email

This action sends an email to the customer of a Downpay order prompting them to update their payment method and links to the form in Shopify to do so.
---
---

[Jump to top](#6-on-this-page)

# Downpay prebuilt Flow templates

Common Downpay workflows are available to install from the Shopify Flow template library. You can then modify them to suit your needs. Additional flows are also available to download in the [Additional templates](#2-additional-templates) section.

This list contains some of the top workflows in the library. More are available in the library as well.
## Customer notifications

||| As of February 1, 2024, Gmail and Yahoo will require you to authenticate your domain and have a DMARC record in order to send emails to customers from a branded email address. If you take no action, then your sender email will be rewritten to store+123@shopifyemail.com to meet the minimum requirements so that you can continue sending emails to your customers without interruption. The string of numbers (123) in the default email store+123@shopifyemail.com will be unique to your store. [Learn more](https://help.shopify.com/en/manual/intro-to-shopify/initial-setup/setup-your-email)

### Send balance invoice and notify team when payment collection fails

| Install this prebuilt Shopify Flow template [here](https://shopify.com/admin/apps/flow/editor/templates/019e408f-2f16-72ff-91a5-093f2c8f83a5).

Use the action **Send invoice** under Shopify to customize an invoice and let customers know payment has failed and that they should pay their remaining balance to avoid delays.

Recipient email address variable: {{order.customer.email}}
Sender email address variable: {{shop.email}}
Order number: {{order.name}}

Use the action **Send internal email** under Shopify Flow to send an email to a staff member if payment collection fails.

### Send balance invoice when balance authorization fails

| Install this prebuilt Shopify Flow template [here](https://shopify.com/admin/apps/flow/editor/templates/019e4090-df07-7037-b431-2a873b464a3e).

Use the action **Send invoice** under Shopify to customize an invoice and let customers know authorization has failed and that they should pay their remaining balance to avoid delays.

### Send payment reminder 24 hours before due date

| Install this prebuilt Shopify Flow template [here](https://shopify.com/admin/apps/flow/editor/templates/019e4094-c555-76b5-8b9f-38d074a84b0c)

If you want to remind customers to pay their order, or that you will be automatically collecting payment soon, use this flow. There are several trigger options in Downpay including `Payment due in 1, 2, or 7 days`. The template uses 1 day.

|| This workflow will not work with the Shopify action `Send payment reminder`. We recommend using `Send order invoice` and adding a custom message. The Order invoice template can be customized in your Shopify notifications - customer notifications settings.

|| The template includes some sample Subject/Custom message examples. Feel free to choose wording that suits your use case depending on whether you will automatically collect payment, or if you will send an invoice on the due date.
---
---

[Jump to top](#6-on-this-page)

## Order management

### Release fulfillment hold when order is fully paid

| Install this prebuilt Shopify Flow template [here](https://shopify.com/admin/apps/flow/editor/templates/019e4091-577c-784f-bfbf-3b1730611c7d)

When using deposit plans with Downpay with the **Days after checkout** due date type, orders will have an on hold status. A workflow can be created to check for fully paid status and automatically release the fulfillment holds in order to display **Unfulfilled** as an order's status.

### Release fulfillment hold when order is created

| Install this prebuilt Shopify Flow template [here](https://shopify.com/admin/apps/flow/editor/templates/019e4090-5e33-73f7-aafa-5f6f7bbfde2b)

When using deposit plans with Downpay with the **On fulfillment** or **Days after checkout** balance due date type, orders will have an on hold status. If you are shipping products out before full payment is received, you can release the hold on fulfillments automatically with this flow. This is a useful workflow for using Downpay for try before you buy.

---
---

[Jump to top](#6-on-this-page)

## Payment collection

### Collect outstanding balance payment when pre-order payment due date is reached

| Install this prebuilt Shopify Flow template [here](https://shopify.com/admin/apps/flow/editor/templates/019e189c-a656-7976-b47c-51e3291db18c)

This workflow uses the Downpay trigger `Payment is due today` which is the date listed on the order payment details card. 

### Send balance invoice when Downpay pre-order payment is due

| Install this prebuilt Shopify Flow template [here](https://shopify.com/admin/apps/flow/editor/templates/019e4092-1ff8-7230-b461-b44b735852af)

This workflow will send the customer an invoice to pay their balance.

### Send payment reminder 1 day before attempting payment collection

| Install this prebuilt Shopify Flow template [here](https://shopify.com/admin/apps/flow/editor/templates/019e4c41-2b5b-772f-a436-c6d0b3be7f5b)

This Flow adds `Wait 1 day` and `Collect remaining payment` actions to [Send payment reminder 24 hours before due date](#3-send-payment-reminder-24-hours-before-due-date).

It will:

* Send a reminder to customers that you will be collecting payment automatically from their card on file in 1 day
* Wait 1 day
* Attempt a charge on the credit card on file for the order

---
---

[Jump to top](#6-on-this-page)

## Payment authorization

### Authorize outstanding balance payment when Downpay order is created

| Download this prebuilt Shopify Flow template [here](https://shopify.com/admin/apps/flow/editor/templates/019e408e-d39c-7850-8cfc-ad71941447e9)

This workflow will authorize the remaining balance when an order is created. This may be useful for brand who ship products before collecting full payment, for example as a trial.

||| Additional amount field is available for Shopify Plus plan only. Leave at 0 to authorize full remaining balance on all other Shopify plans,


---
---

[Jump to top](#6-on-this-page)


## Additional templates

These templates are available for download from this page. You can then upload them into Shopify Flow and modify.

### Collect payment on fulfillment

| Download this prebuilt Shopify Flow template [here](https://hypehound-public.s3.amazonaws.com/Shopify+Flow+Workflows/Collect+payment+when+order+is+fulfilled.flow)

This workflow uses the `Order fulfill` trigger and the `Collect payment` Downpay action.

### Collect payment once tag has been added to an order

| Download this prebuilt Shopify Flow template [here](https://hypehound-public.s3.us-east-1.amazonaws.com/Shopify+Flow+Workflows/Collect+remaining+payment+if+tag+exists+on+order.flow)

This workflow will collect payment once a tag has been added to an order.

For example, using Proofer app for sending your customers a proof before buying will append a tag to the existing order.

In this particular scenario, Flow is checking for a tag named "proof\_accepted" which indicates that the customer has accepted the proof.
After that, it will attempt to collect the remaining balance.

One thing to note is that it is using the Wait block which will wait 1 day before collecting the payment since we do not know when exactly the customer will accept the proof.
If the customer does not accept it within 24 hours, an email will be sent indicating that the proof has not been accepted yet.

You can put different email title and body and adapt a real email address to which you want to receive the email to.

### Send an email to internal teams if payment collection fails

| Download this prebuilt Shopify Flow template [here](https://hypehound-public.s3.amazonaws.com/Shopify+Flow+Workflows/Send+staff+email+if+payment+collection+fails.flow)

Use the action **Send internal email** under Shopify Flow to send an email to a staff member if payment collection fails.

### Send an email to internal teams when order is fully paid

| Download this prebuilt Shopify Flow template [here](https://hypehound-public.s3.amazonaws.com/Shopify+Flow+Workflows/Send+staff+email+when+order+is+fully+paid.flow).

When using deposits as a layaway payment option for customers, an email can be sent to an internal team when the final payment has been made to begin fulfillment.

### Send payment reminder with invoice 7 days before due date, then 1 day before due date, then collect payment on due date

| Download this prebuilt Shopify Flow template [here](https://hypehound-public.s3.us-east-1.amazonaws.com/Shopify+Flow+Workflows/Send+reminder+7+days+before+due+date%2C+1+day+before%2C+and+collect+payment+on+due+date.flow)

### Update due date based on event date

| Download this prebuilt Shopify Flow template [here](https://hypehound-public.s3.us-east-1.amazonaws.com/Update+due+date+based+on+event+date.flow)

Sometimes you may want to update the due date on an order based on some other data, such as a tag or a metafield set on the order by some other process - for example a shipping app. The following example flow looks at the tags on an order— in this case specifically for one that starts with "Due Date:" (for example, "Due Date: 2025-06-14"). The event date tag is set on the order at Order creation. This flow calculates a new date that’s 21 days earlier, and then sets it as the new due date. This is helpful if you want to trigger something like production, fulfillment prep, or a reminder three weeks before the order is due. If the due date tag isn’t there or isn’t formatted correctly, the system will return an error message so you know what’s missing.

This code can be updated up to your requirements and needs.

### Update due date for a large number of orders

| Download this prebuilt Shopify Flow template [here](https://hypehound-public.s3.us-east-1.amazonaws.com/Update+due+date+for+partially+paid+orders.flow)

If you wish to update your "due at" property for a large number of orders with Flow, you can use this template.

This code can be updated up to your requirements and needs.

### Void authorization

| Download this prebuilt Shopify Flow template [here](https://hypehound-public.s3.amazonaws.com/Shopify+Flow+Workflows/Downpay+Void+authorization+for+orders+tagged+with+void.flow)

This workflow voids authorization on orders tagged with `void`.

*  This workflow runs once a day and looks at the last 100 orders.
* The `trigger schedule` can be adjusted to suit the timing that works for you.
* The  `Get order data` query can be adjusted for a different tag name or you can use it for specific orders with the query name:ordernumber (ex: name:1104)

---
---

[Jump to top](#6-on-this-page)

|| Need help building a workflow? Contact us and we'd be happy to help!
