how can get the feedback api for the RecurringApplicationCharge

已解决
Yeeshoppy
远足者
14 1 0

I am using the recurringapplicationcharge, and the charge is deducted every 30 days. When the time is 30 days and the charge is automatically deducted, how do I get the notice of whether the deduction is successful, hook?

Is that it?

subscription_ billing_ attempts/challenged,

subscription_ billing_ attempts/failure,

subscription_ billing_ attempts/success

Why does this topic not exist when I add this hook

2 个已接受解答

已接受的解答
Yeeshoppy
远足者
14 1 0
解决方案

Array
(
[json] => Array
(
[webhook] => Array
(
[topic] => subscription_billing_attempts/success
[address] => https://******/v1/hook/billingsu
)

)

)
Array
(
[code] => 422
[msg] => Client error: `POST https://*****.myshopify.com/admin/api/2021-10/webhooks.json` resulted in a `422 Unprocessable Entity` response:
{"errors":{"topic":["Invalid topic specified: subscription_billing_attempts\/success. Does it exist? Is there a missing (truncated...)

[data] => Array
(
)

)

 

why?

在原帖中查看解决方案

Tim_Mak
探索者
89 10 12
解决方案

Check if your app has permissions for billing

在原帖中查看解决方案

5 条回复5
Tim_Mak
探索者
89 10 12

I don't really understand your issue.

You can create a webhook to be notified when there was a successful or failed billing:

https://shopify.dev/api/admin-rest/2021-10/resources/webhook

BillingAttempt
subscription_billing_attempts/challenged, subscription_billing_attempts/failure, subscription_billing_attempts/success

 

Yeeshoppy
远足者
14 1 0
解决方案

Array
(
[json] => Array
(
[webhook] => Array
(
[topic] => subscription_billing_attempts/success
[address] => https://******/v1/hook/billingsu
)

)

)
Array
(
[code] => 422
[msg] => Client error: `POST https://*****.myshopify.com/admin/api/2021-10/webhooks.json` resulted in a `422 Unprocessable Entity` response:
{"errors":{"topic":["Invalid topic specified: subscription_billing_attempts\/success. Does it exist? Is there a missing (truncated...)

[data] => Array
(
)

)

 

why?

在原帖中查看解决方案

Tim_Mak
探索者
89 10 12
解决方案

Check if your app has permissions for billing

在原帖中查看解决方案

Yeeshoppy
远足者
14 1 0

yes. we have found the problem. now we are contact the team

thanks for your help

Yeeshoppy
远足者
14 1 0

thanks for your reply we will study your comminents 

thanks again for your help