> 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="https://660943784-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz05QvQmZlyr3X728HXAZ%2Fuploads%2F2uwS79UxdzvtCXoz6laY%2Fimage.png?alt=media&amp;token=90ef4f60-c9e7-499f-b93a-be8171691fe8" 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="https://660943784-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz05QvQmZlyr3X728HXAZ%2Fuploads%2FQ26FHwPuSG3l2RblmzQf%2Fimage.png?alt=media&amp;token=68bed79c-93a0-473b-b22e-cb1b20f6e840" 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.
