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":100},{"amount":200}]. | 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. | |
| recommendedLabel | string | Title under the recommended tip amount. Examples: "Suggested Gift". | MaxLength: 65536 MinLength: 10 Pattern: ^(?!\s*$).+ |
| recommended | object | This will be used as the default tip. Examples: {"amount":300}. | See recommended |
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. |
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. |
Context
| Name | Type | Description | Rules |
|---|---|---|---|
| recommended | object | Deprecated, recommended should be used within features. Examples: {"amount":100}. | 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": 100
}
},
"features": {
"suggestions": [
{
"amount": 1000
},
{
"amount": 2000
}
],
"recommended": {
"amount": 100
},
"customAmount": false,
"noAmount": false,
"recommendedLabel": "Gift"
}
}
