> For the complete documentation index, see [llms.txt](https://better-wizard.gitbook.io/lead-connector-wizard/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://better-wizard.gitbook.io/lead-connector-wizard/5.-membership/5.5-create-a-workflow-to-control-membership-tags.md).

# 5.5 Create a workflow to control membership tags

{% embed url="<https://youtu.be/190HDqbt1y0>" %}

As we described earlier, when a membership with a tag is created, actually four tags are created including payment failure, suspension & cancellation tags. Let us check how we can set a **payment failure** tag when a payment during a subscription is failed.

In our workflow, we've two triggers. One trigger is for Successful Payment and another is for Payment Failure.

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

Here a **Condition** is set for when the **Workflow Trigger** is either **Payment Success** or **Payment Failed.**&#x20;

<figure><img src="/files/1qdbkZx46FLocmruRbRV" alt=""><figcaption></figcaption></figure>

Suppose, a membership is created with a name **membership** & a tag **membership**. Hence, **membership\_payf**, **membership\_susp** & **membership\_canc** will also be created. When the payment is successful, we will add the **membership** tag & remove the three tags **membership\_payf**, **membership\_susp** & **membership\_canc.**

If the payment is failed, the **membership\_payf** tag will be added. This tag will remove access to the membership of that contact.
