hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

refactor: add billing and shipping details to payment method data

Open Narayanbhat166 opened this issue 2 years ago • 3 comments

Feature Description

linking #347 for reference. Since the billing and shipping address used for payment should be stored in basillisk as per the discussion we had. This is to avoid

  • Any PII information to be stored in db which will be used for payments.
  • Avoid changes to payments if the address table undergoes any major changes ( like encryption ).

Possible Implementation

  • [ ] Have a struct under payment_method_data.pay_later that will have all billing and shipping related data required for payments. All paylater payments will have the mandatory details of address taken from here.
  • [ ] Save pay_later data in basillisk.
  • [ ] Add payment_method_issuer and payment_experience in payment_attempt. This will be used to decide which issuer the payment has to go through and what should be the experience ( either sdk flow or redirection flow ).

Have you spent some time to check if this feature request has been raised before?

  • [X] I checked and didn't find similar issue

Have you read the Contributing Guidelines?

Are you willing to submit a PR?

None

Narayanbhat166 avatar Jan 22 '23 07:01 Narayanbhat166

Let me know your thoughts on this change @bernard-eugine.

Narayanbhat166 avatar Feb 01 '23 07:02 Narayanbhat166

Let me know your thoughts on this change @bernard-eugine.

This works! Let's go ahead.

bernard-eugine avatar Feb 01 '23 09:02 bernard-eugine

One doubt that is bugging me is, the shipping address will be available with the merchant and should be sent by merchant during creating the payment, and billing address or details can be sent in the payment_method. This is why stripe has billing details in the payment method and shipping address outside payment method. Currently our implementation is also the same, should we have shipping address to in the payment method? This would mean either the merchant or client ( as in customer ) has to send both the address fields

Narayanbhat166 avatar Feb 01 '23 10:02 Narayanbhat166

Closing this issue as these changes are included the billing_address refactoring.

Narayanbhat166 avatar Apr 22 '24 06:04 Narayanbhat166