Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
Get started with Connect
Integration fundamentals
Example integrations
Onboard accounts
Configure account Dashboards
Accept payments
Pay out to accounts
Manage your Connect platform
    Understand your Connect business
    Dashboard account management
    Remediation links
    Risk management with Connect
    Platform pricing tools
      Pricing schemes
      Pricing groups
      Complex conditions
      Testing
      Card product codes
Tax forms for your Connect platform
Work with connected account types
HomePlatforms and marketplacesManage your Connect platformPlatform pricing tools

Complex pricing rule conditions

Create pricing rule conditions based on complex data sources.

Copy page

Most pricing rules are based on simple logical conditions, such as segmenting pricing by payment method. You can also write rule conditions based on complex variables, such as your custom metadata values. This guide explains the additional steps required for these cases.

Payment Metadata

As a platform, you can add custom metadata to payments and reference it in your pricing rules. First, add a metadata key-value pair to your PaymentIntent or Charge. Then, create pricing rules referencing this metadata value.

Pricing rule conditions based on payment metadata observe the following behavior:

  • Pricing rule conditions can evaluate metadata defined in both PaymentIntents and Charges.
  • A rule condition can only evaluate one key-value pair from the metadata parameter.
  • If you include multiple metadata key-value conditions, the pricing tool only evaluates the first key-value condition.
  • The pricing tool only evaluates metadata that’s available before payment is captured. Make sure you apply any updates before this point for accurate fee calculation.
  • Use the API to update metadata in the PaymentIntent or Charge. The pricing tool can’t evaluate updates made through the Dashboard.

See also

Complete list of supported pricing rule conditions

Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc