Skip to content

feat(pay): one time payments #112

Description

@tedbrine

currently we only support subscriptions, would be good to look into one time purchases since it should be quite small

eg, ecom store

<Button
  onClick={async () => {
    const { paymentUrl } = await paykitClient.buy({
      productId: "xyz",
      successUrl: "/receipt",
      cancelUrl: "/basket",
    });
    if (paymentUrl) {
      window.location.href = paymentUrl;
    }
  }}
>
  Buy Product
</Button>

then we ideally have a custom on event which fires when we confirm a one time product is bought

could also extend metered usage by being able to top up a balance by paying

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions