#MasterJiMm-discount-error

1 messages ยท Page 1 of 1 (latest)

carmine herald
vestal iris
#

req_wQM1CIXnpeL31P

carmine herald
#

Ah you're setting percent_off to 999.5
the discount must be between 0 to 100%

vestal iris
#

ah yes sorry i misread that

carmine herald
#

NP! ๐Ÿ™‚

vestal iris
#

also here in this checkout session req_Ddle0Ja4F6Ej4Y im applying the discount as you can see and im completing the subsctiption evt_1LZdXEJl4ZEcJa8ltGgEBdw7 but once i retrieve it later req_X8l3TlNF7cqpQw the value subscription.items.data[0].price.unit_amount is still the total amount without the discount

winter quest
#

Hi ๐Ÿ‘‹ @carmine herald had to set away so I'm taking over

vestal iris
#

okay

#

sorry the checkout session req id was incorrect i just updated that

winter quest
#

Okay looking

#

But the price data that you're looking at will be reflective of the Price record and should not show any discounts at that level

vestal iris
#

ah alr

#

also why the discount property is null

#

after retrieving the subsciption

winter quest
#

Hmmm... I see the discount for this subscription sub_1LZdXAJl4ZEcJa8lD6ArsGwa

#

di_1LZdXAJl4ZEcJa8l2OYmCE8N

vestal iris
#

ah yes sorry, i was looking another one

#

so is there any property that gives me the total amount (with the discount applied) so i can display it to the user?

winter quest
#

latest_invioce.amount_due

#

You can see the discounts applied in the latest_invoice.line_items

vestal iris
#

thanks lemme try it

#

it worked tysm!

winter quest
#

Great ๐Ÿ™‚