About Saving Prices

Stripe payment gateway operates amounts in cents. Convert cents to a decimal price as follows:

1
2
3
from decimal import Decimal
amount_in_cents = 1499
payment.amount = Decimal(amount_in_cents) / 100

Tips and Tricks Programming Django 5.x Django 4.2 Django 3.2 Python 3 Stripe