Skip to content

fix(stripe): remove unknown column payment_plan in field list#236

Open
Tarunkumar0601 wants to merge 1 commit into
frappe:developfrom
aerele:fix/stripe-subscription-creation
Open

fix(stripe): remove unknown column payment_plan in field list#236
Tarunkumar0601 wants to merge 1 commit into
frappe:developfrom
aerele:fix/stripe-subscription-creation

Conversation

@Tarunkumar0601

Copy link
Copy Markdown

Fix the Stripe Checkout failure caused by the deprecated payment_plan field reference in the Stripe checkout flow.

Update the implementation to use the current subscription_plans child table structure, ensuring subscription details are retrieved correctly during checkout and maintaining compatibility with the latest ERPNext Payments data model.

Ref: #90

Backport Needed: V15 & V16

@Tarunkumar0601 Tarunkumar0601 marked this pull request as ready for review June 29, 2026 13:43
@mergify

mergify Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@greptile-apps

greptile-apps Bot commented Jun 29, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Reviews (3): Last reviewed commit: "fix(stripe): remove unknown column payme..." | Re-trigger Greptile

Comment thread payments/templates/pages/stripe_checkout.py
Comment thread payments/templates/pages/stripe_checkout.py Outdated
@Tarunkumar0601 Tarunkumar0601 force-pushed the fix/stripe-subscription-creation branch from 90eb56e to 764318f Compare July 1, 2026 11:37
Comment thread payments/templates/pages/stripe_checkout.py Outdated

@Sudharsanan11 Sudharsanan11 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using db.get_value in for loop and don't use get_doc to fetch single child value.

cadences = {
(billing_interval, cint(billing_interval_count) or 1)
for billing_interval, billing_interval_count in (
frappe.db.get_value(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use get_all instead of db.get_value

# Read plans from the same source the payment flow charges against
# (Payment Request.subscription_plans) so the displayed recurrence
# can't diverge from what is actually billed.
reference = frappe.get_doc(context.reference_doctype, context.reference_docname)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use get_all instead of get_doc

@Tarunkumar0601 Tarunkumar0601 force-pushed the fix/stripe-subscription-creation branch from 764318f to 1ffddc1 Compare July 8, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants