# Batch Payments

### Overview

In each space on Dework you have the ability to pay bounty rewards in batches. This allows you to queue up multiple tasks for payments, rewards, contests, compensation etc. and pay them all at once for that space.

{% hint style="warning" %}
**Important**: Currently, you can only make batch payments using a Gnosis Safe; it's not possible with a MetaMask/Phantom/Hiro Wallet.
{% endhint %}

### Benefits

{% hint style="success" %}

* Don't pay each transaction separately; saves time
* If using a network like Ethereum, save on the cost of transaction fees
* You can pay multiple approved submissions for a contest all together or in batches
* Set a schedule for payments and reduce the headache of organising Gnosis safe signers
  {% endhint %}

### Setup

{% hint style="warning" %}
**Important**: These steps must be done by a signer of the Gnosis Safe, and their MetaMask must be connected to the right acc. and network
{% endhint %}

**Step 1**: Queue up the tasks you want to payout within a space

![Get your queue ready](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2F2r3FxEYE9kQQIcmUFbpe%2FPayment-Batch-01.jpg?alt=media\&token=e53a2438-2fa5-49cc-8e58-4eb36dab84d6)

**Step 2**: Click  `Batch Pay`  at the top of the column and you will see a prompt to setup your Gnosis payment method if you haven't already, otherwise skip to **Step 6** if you only see the  `Batch Pay`  button at the top and no other  `Pay`  buttons on the completed tasks.

![You need a valid payment method to complete the batch payments](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2FfeFmEgX0xudamzSutaKZ%2FPayment-Batch-02.jpg?alt=media\&token=b18590c0-8c24-4db9-8231-3f1657c1afdf)

**Step 3**: Select the network you want to pay on ex. `Polygon Mainnet`

{% hint style="warning" %}
**Important**: Ensure that you're selecting the same network as the token that was set for the task bounties you queued up
{% endhint %}

![These are the supported chains for Gnosis Safe batch payments](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2FmEYbl3RTjCpmJCchWtGr%2FPayment-Batch-05.jpg?alt=media\&token=e45dcd03-475b-49e8-aab4-cbd1c012bb33)

**Step 4**: Enter the Gnosis Safe (aka Contract) address and click  `Connect`

![Enter the contract address of your Gnosis safe](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2FP8HHkuUPI6nDkDsZFjco%2FPayment-Batch-06.jpg?alt=media\&token=2d73c9e3-95cc-4e69-a5ae-b4ac3c05c2d4)

**Step 5**: It will show a success message if you are a valid signer, connected to the right MetaMask acc. and the right network. You **must** click  `Add Payment Method` to confirm the connected safe.

![Once connected you will see the confirmation](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2Ff9iKlPRR7c8SOqkc5w8a%2FPayment-Batch-07.jpg?alt=media\&token=e6c46df1-d2c2-4f5c-b481-a6793ec07f68)

**Step 6**: You'll now see a  `Batch Pay`  button at the top of the  `Done`  column with a counter for the number of tasks that will be batched in the payment&#x20;

{% hint style="warning" %}
This should be done by a current signer of a Gnosis Safe attached as a payment method to ensure they can create and sign the transaction
{% endhint %}

![The Pay Now button will trigger the batch payment](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2FxLLF8VLBwfOm6zy8yO9w%2FPayment-Batch-09.jpg?alt=media\&token=7a02d12c-4f12-4cb3-9ca3-cf0512f675e0)

**Step 7**: Once you click  `Batch Pay`  you will see a pop-up with details for the batch payment

* **Checkbox**: Select or deselect tasks that you want to include in the batch
* **Profile**: Name and pic of the person being paid
* **Task**: Name of the task they're being paid for
* **Payment**: Reward amount they will be paid
* **Total**: A sum of tokens to be paid to all selected batch pay contributors

{% hint style="info" %}
If you have more than one Gnosis Safe connected as a payment method, you can use the dropdown to select the correct one
{% endhint %}

![Customise your batch as you prefer](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2F6uLGO9VdMsz9dKiouytW%2FPayment-Batch-10.jpg?alt=media\&token=800d778c-c855-4934-86fb-cb95c6a3be05)

**Step 8**: Click  `Create Transaction`  to trigger the batch to be sent to your Gnosis safe queue

![Then click Create Transaction](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2FiD1TpRY5KqH6th0QkiYb%2FPayment-Batch-11.jpg?alt=media\&token=08bfba74-df66-47f4-866c-a3d98c4b844a)

**Step 9**: The final step on Dework is to sign the transaction to queue it up on your Gnosis Safe

![Sign the signature request to queue up the batch transaction](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2F3FIddF9nb0gzmIoVmbcL%2FPayment-Batch-12.jpg?alt=media\&token=664cb5ba-ce0c-4aeb-bb4c-4062d51d1ed5)

**Step 10**: Then in your Gnosis Safe queue you will see a new  `MultiSend`  transaction in the queue. Follow your standard signing process and then  `Execute`  the batch transaction for the bounty rewards

{% hint style="success" %}
**Tip**: If you have multiple batches queued up in Gnosis you can use the  `Execute Batch`  button at the top-right to trigger multiple queued Dework batches from diff. spaces, at the same time
{% endhint %}

![Complete remaining signatures then click Execute on the multisend txn to trigger the batch payment](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2Ff4RYCAocZChdsd3JmVrF%2FPayment-Batch-13.jpg?alt=media\&token=f9320b48-276e-4da2-8db6-7315c623580e)

**Step 11**: When you return to Dework you will see the tasks are now under the  `Processing Payment`  section of Dework

![The tasks included in the batch will be ](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2FgWRB93jV4ciY1IcmHTs9%2FPayment-Batch-14.jpg?alt=media\&token=e3933c95-f572-4e09-b101-bff9f6eb64a3)

{% hint style="success" %}
Once the transaction is completed on-chain, you will see the  `Reward`  section on the task pop-up will show  `Completed`. You can also click on  `View on explorer`  to see the transaction on-chain.\
\
**Note**: If there are no pending transactions, you won't see the  `Needs Payment`, `Processing Payment`, or  `Paid`  sections, since all transactions would be paid.
{% endhint %}

![Click View on explorer to see your batch transaction on-chain](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2FgDz08udbdAnElAgNQZ46%2FPayment-Batch-16.jpg?alt=media\&token=59a50130-925b-499e-8123-14c2539694ae)

### Resolve failed Gnosis Safe Batch Payment

If the transaction on Gnosis Safe failed for any reason, you can remove the connection between the task batch payment on Dework and the failed transaction by clicking  `Clear Transaction`  at the top right of the task pop-up under  `Reward Payment`. Then you can trigger the batch payment again from Dework as done on **Step 6**.

![](https://1687189122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmz45Sf20wOeXiwishs9R%2Fuploads%2FSZpnIEdXRxA8djmrXn7s%2FPayment-Batch-15.jpg?alt=media\&token=fa1ec985-471a-40e6-9e20-f02c3a71f5fe)
