Understanding more about custom payment processing specifically for subscription #51
-
Hello everyone, I am having this scenario that I need to handle both (one off purchase and subscription). However the hosted checkout are not viable for me mainly because of certain local payment gateway (eg FPX, Atome) here in Malaysia are not available natively in Swell. I've successfully implemented a custom checkout for one off payments with all of the desired local payment gateways. However, when it comes to subscription products, how exactly is the best way to handle it? I understand that all of the local payments mentioned above are best suited for one off payments. When it comes to subscription orders, do i need to use specific gateway (eg Stripe) to handle the payment? Referencing the doc, it seems like I can freely implement any gateway as per my liking, but how do I ensure the recurring charges accordingly? Attach my current store for better references. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Beautiful site! 🙌 You can handle subscription and order payments for any gateway that isn't natively supported, using a "Manual payment method" (Settings > Payments) along with a webhook. If you have the "Charge automatically" setting enabled (Settings > Orders/Subscriptions), then the system will automatically create a payment when the order OR subscription is to be charged, which can then fire a webhook event If you didn't want to enable "Charge automatically", you can do something similar by listening to webhook events |
Beta Was this translation helpful? Give feedback.
Beautiful site! 🙌
You can handle subscription and order payments for any gateway that isn't natively supported, using a "Manual payment method" (Settings > Payments) along with a webhook.
If you have the "Charge automatically" setting enabled (Settings > Orders/Subscriptions), then the system will automatically create a payment when the order OR subscription is to be charged, which can then fire a webhook event
payment.created
for you to ping your own payment gateway. The webhook handler should update the payment record with details about success or failure of the transaction.If you didn't want to enable "Charge automatically", you can do something similar by listening to webhook events
o…