# Example: Create a flex control for Pix transactions Here is an example of how to create a nightly transaction limit for Pix transactions at the program level. The limit is R$1,000 nightly, between the hours of 8:00 PM and 6:00 AM. For more information about Pix, refer to [Pix instant payments (Brazil)](https://developers.pismo.io/pismo-docs/docs/pix-instant-payments). > 📘 Using flex controls > > The only way to set up flex controls at the program level is to use Control Center. This means that a control affects all the accounts within a specific program. > > To create flex controls at the account or card level, you must use the appropriate endpoint in the [Flex controls API](https://developers.pismo.io/pismo-docs/reference/post-v1-accounts-flex-controls). To apply this flex control, follow the procedure to [Create a flex control](https://developers.pismo.io/pismo-docs/docs/cc-flex-controls#create-a-flex-control) but use the following information: * On the **Select a control type** screen, select **Cumulative control**. * On the **Select processing codes** screen, add the processing codes to be included in this flex control (any processing codes associated with Pix transactions). * On the **Limits and time period** screen, do the following: * Select **Spending** as the limit type. * Select **Per day** and specify the time zone the control must use. * Set the **Reset period** to **7:00 AM**. This is the time when the limit resets and can be any hour outside of the nightly range. * Enter the spending limit amount `1,000`. Control Center displays a message like **Deny transactions for the selected processing codes after $1,000 daily, starting daily at 7:00 AM, XXX/XXXX time zone.** Use this message to confirm that this is the result you want.\ Note: You don't need to specify the currency to use because this is set individually by each program linked to the flex control. * On the **Conditions** screen, do the following: * Select the box for **Week, Month, Time of day.** * Select the box for **Time of Day** and then select the start time **8:00 PM** and end time **6:00 AM**. * Select **Add condition**. * On the **Program** screen, select the programs to which you want to apply this control. * On the **Review and apply flex control** screen, do the following: * Review and confirm each setting by selecting its check box. * Enter a name for your control (such as `Nightly_PIX_Limit`) and the **Deny code** that you want to receive whenever a transaction exceeds the limit (such as `PIX_nightly_limit_reached`). * Select **Create control and activate now** and then select **Finish**.