AutumnA
Autumn5mo ago
3 replies
jidefr

Hey folks ! Im struggling to make top up

Hey folks ! Im struggling to make top up work correctly.

I want to have base products, and add on top up to purchase credits packs.

I also set up a credits system.

How do i make the user purchase a top up that adds X credits when purchased ?

If i do this, it adds 1 credit only after checkout, even though quantity is 100.

const result = await checkout({
productId: "credits-top-up",
options: [
{
feature_id: "ludiz-credits",
quantity: Number(quantity),
},
],
successUrl: ${window.location.origin}/billing?success=true,
dialog: CheckoutDialog,
});

Thanks for your help !
Was this page helpful?