Skip to content

feat(pay): one time payments #112

@t3duk

Description

@t3duk

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions