django_program.registration.services.stripe_invoicing¶
Stripe Invoicing integration for purchase orders.
Creates, sends, and syncs Stripe Invoices for corporate POs. Uses the
per-conference StripeClient pattern so each conference’s Stripe account
handles its own invoices. Supports card and ACH payments via Stripe’s
hosted invoice page.
Functions
|
Create and send a Stripe Invoice for a purchase order. |
|
Process an |
|
Fetch the Stripe invoice and sync payment status to the PO. |
- django_program.registration.services.stripe_invoicing.create_stripe_invoice(purchase_order)[source]¶
Create and send a Stripe Invoice for a purchase order.
Builds a Stripe Invoice with line items matching the PO, finalizes it, and stores the invoice ID and hosted URL on the PO record.
- Parameters:
purchase_order (
PurchaseOrder) – The purchase order to invoice.- Return type:
- Returns:
The Stripe-hosted invoice URL where the customer can pay.
- Raises:
ValueError – If the conference has no Stripe key, or if the PO already has a Stripe invoice attached.
stripe.StripeError – On any Stripe API failure.
- django_program.registration.services.stripe_invoicing.sync_stripe_invoice_status(purchase_order)[source]¶
Fetch the Stripe invoice and sync payment status to the PO.
If Stripe reports the invoice as fully paid, records a payment via
record_payment()with methodstripe. Handles partial payments whenamount_paid < amount_due.- Parameters:
purchase_order (
PurchaseOrder) – The PO with astripe_invoice_idto sync.- Raises:
ValueError – If the PO has no Stripe invoice ID.
stripe.StripeError – On any Stripe API failure.
- Return type: