Rapyd API Checkout Page with Promo/Discount

Hi! I have a checkout page and have looked at the docs but is there any way to add cart item/payment fees for a promo code/discount that would automatically reduce the amount total?

Thanks for any help!

Hey @jaeioung, thanks for your question! Here is a link to a doc about adding a coupon to a subscription. Is this what you are looking for?

https://docs.rapyd.net/build-with-rapyd/reference/subscription-hosted-page#subscription-object-hosted-page

Excerpt from the doc below:
discount|object|Contains information about the coupon that applies to the subscription. Response only.

Adding a discount is a 2-step process:

  1. Create Coupon, which returns a coupon ID.
  2. Add the coupon ID to the coupon field of the subscription with Create Subscription or Update Subscription.

For more information, see Discount Object.

Please let us know if this is what you are looking for or if it is something different. Can you share an example screenshot of what you are looking for if this doc is not valid for your solution?

1 Like

Hey Drew,

Rather than using the coupon with subscriptions, is it possible to use it in the checkout page for one time payments? As an example, in the screenshot there is a halfoff discount used.

1 Like

I have asked some of our devs, so we will see what they return with.

But I believe you need to calculate the price discount on your side and pass the discounted value in the amount parameter for hosted checkout.

1 Like

hey @jaeioung were you able to reach a solution for this?