Payment-amount-selection

Customer amount selection, generally for payments.

When the amount to be paid or paid out is variable, such as donations, loan payments or topping up an account, this action gives the users the ability to choose an appropriate amount. The unioned action will then react appropriately to the amount being shared.

No products are required to use this action.

This action pairs well with the following actions.

State

The chosen amount will be defined in the state.

Union (required)

The unioned action should be the expected recipient for the amount being chosen.

Macro level details for how union attribute behaves can be found within the Union documentation.

Features (required)

NameTypeDescriptionRules
descriptionstringDeprecated, use markdown or instructions instead.
Examples: "Deprecated, don't use.".
MaxLength: 65536
MinLength: 10
Pattern: ^(?!\s*$).+
suggestionsarraySuggestions for payment amounts.
Examples: [{ "amount":100, "label":"current balance" },{ "amount":200, "label":"statement balance" }].
See suggestions
customAmountbooleanFlag indicating whether a custom amount option should be displayed.
Examples: true.
noAmountbooleanWhen set to true, the user will be allowed to select a 'no amount' option. Resulting an amount in 0 being broadcast.
Examples: false.
placeholderstringWhen custom amount enabled, placeholder should visible in custom amount input field.
Examples: "Custom amounts should be greater than your minimum balance.".
MaxLength: 65536
MinLength: 10
Pattern: ^(?!\s*$).+
helpTextstringWhen custom amount enabled, Show a help text for custom amount input field.
Examples: "Enter the amount you wish to donate in USD. Minimum donation is $10.".
MaxLength: 65536
MinLength: 10
Pattern: ^(?!\s*$).+
resolvedTextstringA confirmation or success message that confirms the completion of the process.
Examples: "Thank you for your donation of $50! Your support makes a difference.".
MaxLength: 65536
MinLength: 10
Pattern: ^(?!\s*$).+
recommendedLabelstringTitle under the recommended amount.
Examples: "Suggested Gift".
MaxLength: 65536
MinLength: 10
Pattern: ^(?!\s*$).+
recommendedobjectCauses the amount to be selected within the web experience, when the link is clicked. And, when paired with other actions such as payment or payout, this amount is available to be paid over messaging with an authorization code.
Examples: { "amount":100 }.
See recommended
minimumobjectThe minimum amount in cents required to resolve the business process.
Examples: { "amount":100 }.
See minimum
maximumobjectThe maximum amount in cents allowed to make a payment.
Examples: { "amount":100 }.
See maximum

suggestions

NameTypeDescriptionRules
amountnumber(required) Amount must be in cents.
Examples: 100, 200.
labelstringTitle under the suggestion amount.
Examples: "current balance", "statement balance".
MinLength: 3

recommended

NameTypeDescriptionRules
amountnumber(required) Amount must be in cents.
Examples: 100, 200.

minimum

NameTypeDescriptionRules
amountnumber(required) Amount must be in cents.
Examples: 100, 200.

maximum

NameTypeDescriptionRules
amountnumber(required) Amount must be in cents.
Examples: 100, 200.

Context (required)

NameTypeDescriptionRules
modestringDeprecated. Mode will be removed around 2 weeks from 8-12-2024.Possible values: amount.
recommendedobjectDeprecated, recommended should be used within features.
Examples: { "amount":100 }.
See recommended
calculationModestringIs set as RUNNING_TOTALS, will cause the payment-amount-selection to pay attention to the transaction events from the unioned payment. Charge will decrease, and reversal will increase all suggestions options amount.
Examples: "RUNNING_TOTALS".
Possible values: NONE, RUNNING_TOTALS.

recommended

NameTypeDescriptionRules
amountnumber(required) Amount must be in cents.
Examples: 100, 200.

Example

Below is an example payload for adding an action to a business process or blueprint.

{
    "type": "payment-amount-selection",
    "union": 1,
    "context": {
        "recommended": {
            "amount": 100
        },
        "calculationMode": "RUNNING_TOTALS"
    },
    "features": {
        "description": "Deprecated, don't use.",
        "suggestions": [
            {
                "amount": 100,
                "label": "current balance"
            },
            {
                "amount": 200,
                "label": "statement balance"
            }
        ],
        "customAmount": true,
        "noAmount": false,
        "placeholder": "Custom amounts should be greater than your minimum balance.",
        "helpText": "Enter the amount you wish to donate in USD. Minimum donation is $10.",
        "resolvedText": "Thank you for your donation of $50! Your support makes a difference.",
        "recommendedLabel": "Suggested Gift",
        "recommended": {
            "amount": 100
        },
        "minimum": {
            "amount": 100
        },
        "maximum": {
            "amount": 100
        }
    }
}