The Request Payment User Input Block allows you to collect payments seamlessly within your workflow by integrating Stripe. This block supports various payment methods and allows customization for test or live environments.

Setting Up Stripe Integration

1. Connect Stripe Account

To use the Request Payment Input Block, you must first connect your Stripe account:

  1. Click Select an account > Connect new.
  2. In the popup configuration:
    • Account Name: Enter any name of your choice (does not need to match your Stripe account).
    • Test Keys:
      • Find your test keys here: Stripe Test Keys.
      • These keys are used for testing purposes during preview. You can use a test card to simulate payments.
      • Example test card: 4242 4242 4242 4242 with any future expiration date and any CVC.
      • The test keys (test mode) will be uised only when launching your workflow in preview mode. The published link will use the live keys.
    • Live Keys:
      • Find your live keys here: Stripe Live Keys.

      • These keys will be used for published workflows. Only the published link will use the live keys.

Note: If you want to use test keys in a published agent, also enter them in the live key fields.

2. Test Payments

  • Use test cards from Stripe to simulate successful or failed payments.

Input Configuration

Once your Stripe account is connected, configure the Request Payment block:

  1. Price Amount: Specify the amount to charge.
  2. Currency: Select the currency (e.g., USD, EUR).
  3. Button Label: Customize the button text (e.g., “Pay”, “Checkout”).
  4. Success Message: Set a confirmation message for successful payments.

Enabling Payment Methods

Ensure you enable the payment methods you’d like to use in your Stripe dashboard:

2. Using Dynamic Pricing

For workflows where the amount may vary:

  • Link the Price Amount field to a variable or formula.
  • Example: $[total_amount] for dynamically calculated totals.