# Rapyd API Checkout Page with Promo/Discount

**URL:** https://community.rapyd.net/t/rapyd-api-checkout-page-with-promo-discount/58508
**Category:** 🙋🏽‍♀️🙋🏽‍♂️ Ask Questions
**Created:** [March 15, 2023, 6:58am UTC](https://community.rapyd.net/t/rapyd-api-checkout-page-with-promo-discount/58508 "2023-03-15T06:58:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jaeioung](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jaeioung](https://community.rapyd.net/u/jaeioung)
#### Post date: [March 15, 2023, 6:58am UTC](https://community.rapyd.net/t/rapyd-api-checkout-page-with-promo-discount/58508/1 "2023-03-15T06:58:03Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![drew.harris](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/drew.harris/32/1259_2.png) [@drew.harris](https://community.rapyd.net/u/drew.harris)
#### Post date: [March 15, 2023, 2:03pm UTC](https://community.rapyd.net/t/rapyd-api-checkout-page-with-promo-discount/58508/2 "2023-03-15T14:03:29Z")

</div>

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](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](https://docs.rapyd.net/build-with-rapyd/reference-link/create-coupon), which returns a coupon ID.
2. Add the coupon ID to the `coupon` field of the subscription with [Create Subscription](https://docs.rapyd.net/build-with-rapyd/reference-link/create-subscription) or [Update Subscription](https://docs.rapyd.net/build-with-rapyd/reference-link/update-subscription).

For more information, see [Discount Object](https://docs.rapyd.net/build-with-rapyd/reference-link/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?

---

<div class="post-metadata">

### Author: ![jaeioung](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jaeioung](https://community.rapyd.net/u/jaeioung)
#### Post date: [March 16, 2023, 3:42am UTC](https://community.rapyd.net/t/rapyd-api-checkout-page-with-promo-discount/58508/3 "2023-03-16T03:42:01Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/rapyd/original/3X/d/3/d31253f484051f6a63ffafca45edcb28c8d499e6.png)

---

<div class="post-metadata">

### Author: ![drew.harris](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/drew.harris/32/1259_2.png) [@drew.harris](https://community.rapyd.net/u/drew.harris)
#### Post date: [March 16, 2023, 12:58pm UTC](https://community.rapyd.net/t/rapyd-api-checkout-page-with-promo-discount/58508/4 "2023-03-16T12:58:55Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![drew.harris](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/drew.harris/32/1259_2.png) [@drew.harris](https://community.rapyd.net/u/drew.harris)
#### Post date: [March 28, 2023, 5:59pm UTC](https://community.rapyd.net/t/rapyd-api-checkout-page-with-promo-discount/58508/5 "2023-03-28T17:59:52Z")

</div>

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

---

<div class="post-metadata">

### Author: ![drew.harris](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/drew.harris/32/1259_2.png) [@drew.harris](https://community.rapyd.net/u/drew.harris)
#### Post date: [April 4, 2023, 3:30pm UTC](https://community.rapyd.net/t/rapyd-api-checkout-page-with-promo-discount/58508/6 "2023-04-04T15:30:32Z")

</div>


