简体   繁体   English

如何获得Shopify经常性费用触发的事件?

[英]How to get event triggered for Shopify recurring charges?

I did the API calls for the recurring charges for the app I created in the shopify with required parameters and got redirected to the given return_url after the user's response and the response details were saved into the database along with the charge_id . 我对API进行了API调用,以我在shopify中创建的应用程序的经常性费用作为必需参数,并在用户的响应和响应详细信息与charge_id一起保存到数据库后重定向到给定的return_url

What I required is in the upcoming months if the user's debit/credit card doesn't have enough balance to pay for the recurring charge or the payment failed, how can I know that the subscription is failed in the next month? 我需要的是在接下来的几个月中,如果用户的借记卡/信用卡余额不足以支付经常性费用或付款失败,我怎么知道下个月的订阅失败? I just want to update it in the database to pause my service untill the payment gets success. 我只想在数据库中更新它以暂停我的服务,直到付款成功。

Is there any webhooks or event triggered in such a case or does it call the same API that I have given as return_url during the initial recurring charge? 在这种情况下是否触发了任何Webhooks或事件,或者它调用了我在初始定期费用中作为return_url给出的相同API? Can anyone help me? 谁能帮我?

You do not deal with billing directly like that. 您不会像这样直接处理帐单。 Shopify deals with collecting the money. Shopify负责收款。 If the merchant's credit card fails, they are locked out of using their Shopify store anyway, so you do not have to shut down their use of your App. 如果商家的信用卡出现故障,则他们无论如何都无法使用Shopify商店,因此您不必关闭其对App的使用。 If you try and make API calls you'll get a 400 series error about frozen account, and thus even if they could get into your App, they could do nothing. 如果您尝试进行API调用,则会遇到有关冻结帐户的400系列错误,因此即使他们可以进入您的应用程序,他们也无能为力。

So you do not really have to write any code for any of this. 因此,您实际上不必为此编写任何代码。 Instead, maybe try focus on writing actual App code and get past the payment part. 相反,也许尝试着重于编写实际的应用程序代码并超越付款部分。 Having complex payment logic will only hold you back. 具有复杂的付款逻辑只会让您退缩。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM