Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support recurring payment for bank redirect stripe #1231

Closed

Conversation

hrithikesh026
Copy link
Contributor

@hrithikesh026 hrithikesh026 commented May 22, 2023

Type of Change

  • New feature

Description

  • Added support for recurring payments through bank redirect in stripe.
  • Stripe internally converts some bank redirect method data to sepa direct debit data and attaches the generated sepa direct debit to the customer for future usage.
  • Stripe converts Bancontact, Sofort and Ideal bank redirects to sepa direct debit to attach to the customer. Other bank redirect types are not supported for recurring payments.
  • The payment_method_id of generated sepa direct debit is not return in payment response of stripe. The payment_method_id returned in payment response belongs to bank redirect method used to create the initial payment. This cannot be used to make recurring payments.
  • We must use the generated sepa direct debit method_id to make recurring payments. To get this, we need to do a PSync call in payment redirect flow after the user completes required actions in stripe's window.
  • generated sepa direct debit method_id is present inside latest_charge field of stripes Payment get response. Thats why we need to expand latest_charge
  • After this we update the mandate table with the new valid payment_method_id in connector_mandate_ids column. (existing implementation)

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

This PR would allow creating and making recurring payments using bank redirect payment method(Sofort, Ideal and Bancontact) through stripe.

The changes in this PR are continuation of #1119

How did you test it?

Manual.
Setup Mandate
Screenshot 2023-06-12 at 7 39 54 PM

Make recurring mandate payment using generated mandate_id
Screenshot 2023-06-12 at 7 40 31 PM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

hrithikesh026 and others added 30 commits May 9, 2023 14:06
…/github.com/juspay/hyperswitch into recurring_payment_support_bank_debit_stripe

merged main to recurring_payment_support_bank_debit_stripe at pr
…t_stripe

changes in both branches were require
@hrithikesh026 hrithikesh026 removed the R-waiting-on-L1 Review: Waiting on L1 reviewer label Jun 6, 2023
@jagan-jaya jagan-jaya added S-needs-conflict-resolution Status: This PR needs conflicts to be resolved by the author S-waiting-on-author Status: This PR is incomplete or needs to address review comments labels Jun 27, 2023
@hrithikesh026 hrithikesh026 added the S-blocked Status: Blocked on something else or other implementation work label Jun 27, 2023
@SanchithHegde SanchithHegde deleted the support_recurring_payment_for_bank_redirect_stripe branch July 1, 2023 09:56
@SanchithHegde SanchithHegde removed S-blocked Status: Blocked on something else or other implementation work S-waiting-on-author Status: This PR is incomplete or needs to address review comments S-waiting-on-review Status: This PR has been implemented and needs to be reviewed S-needs-conflict-resolution Status: This PR needs conflicts to be resolved by the author labels Jul 1, 2023
@bernard-eugine bernard-eugine removed this from the June 2023 Release milestone Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration A-core Area: Core flows C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants