Let your customers tip.
Presents a simple tipping experience for the amounts you define, and optionally, for custom amounts.
Related Actions
This action pairs well with the following actions:
State
The amount that was tipped.
Union (required)
Should be unioned to a payment action that will have the tip applied to it.
Macro level details for how union attribute behaves can be found within the Union documentation.
Features (required)
Name | Type | Description | Rules |
---|---|---|---|
suggestions | array | An array of the proposed amounts that should be tipped. Examples: [{"amount":50},{"amount":100}]. | See suggestions |
customAmount | boolean | Enables the customer to define a custom tip amount in adition to the pre-defined amounts. Examples: false. | |
noAmount | boolean | Enables the customer to choose zero tip. Examples: false. |
suggestions
Name | Type | Description | Rules |
---|---|---|---|
amount | number | Tip amount in cents. Examples: 10. | |
percentage | number | The selected percentage will be applied to calculate the tip based on the actual payment amount. Examples: 0.1. |
Context
Name | Type | Description | Rules |
---|---|---|---|
recommended | object | This will be used as the default tip. Examples: {"amount":50}. | See recommended |
recommended
Name | Type | Description | Rules |
---|---|---|---|
amount | number | Tip amount in cents. Examples: 10. | |
percentage | number | The selected percentage will be applied to calculate the tip based on the actual payment amount. Examples: 0.1. |
Example
Below is an example payload for adding an Tip action to a business process or blueprint.
{
"type": "tip",
"union": 1,
"context": {
"recommended": {
"amount": 10
}
},
"features": {
"suggestions": [
{
"amount": 5
},
{
"amount": 10
}
]
}
}