Skip to content

Checkout Session: Ability to disable amount field for Pay-As-You-Want product when creating checkout via API #6342

@rishi-raj-jain

Description

@rishi-raj-jain

Description
A customer requested the ability to disable/hide the amount input field for "Pay-As-You-Want" products when a checkout session is created via the API. This would let them display a checkout session with the price fixed through the API while not allowing the user to input any amount.

Current Behavior
Currently, when amount is passed in https://docs.polar.sh/api-reference/checkouts/create-session for a pay-what-you-want product, while the checkout is created with the right amount - people still have the ability to edit the price from the checkout.

Expected Behavior
A way to disable the editable checkout price field in the pay-what-you-want product.

Suggested Solutions

  • Add an option to API which allows to disable this default behavior
  • Detect that if the amount field in the API is being applied (i.e. the product is not a fixed/free), the amount should be fixed by default and not editable by user

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions