# Actions

### charge payment

Call this action to charge a card using the token generated from the Payment request button.

![Charge payment action](https://4058764824-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LKsUC5-RtIwsN11E9Ag%2F-LKtdJOBqFAXNZS0kLer%2F-LKteQLlbysqauX3ZleK%2Fimage.png?alt=media\&token=fced5e78-da61-402f-b54d-fb7625386fcf)

Note that the Amount should be the subunit of the currency. Example for a usd currency the amount is in cents. So for a $20 charge, it should be 2000 (i.e. 20 x 100). \
If your input value is not in cent use the multiplication function ( \* ) to multiply it by 100 as shown in the image above.&#x20;

### complete payment

{% hint style="danger" %}
This action **MUST** always be called after the payment charge when you use this plugin. Without  calling this action the payment dialog will not close.
{% endhint %}

![complete payment action](https://4058764824-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LKsUC5-RtIwsN11E9Ag%2F-LKtdJOBqFAXNZS0kLer%2F-LKtgPWLDXYSwZ7D6BWj%2Fimage.png?alt=media\&token=194ed66e-ed0c-49bd-9888-7020801f99bf)

You can choose a status (success, fail) for this action. Select the success when the payment charge was successful.&#x20;

Select the fail if the payment charge failed. This will show a message to the user in the payment dialog that the payment wasn't successful so they could try again.
