Chargify 取消订阅:如何设置取消消息
Chargify Cancel Subscription: How to set cancellation message
The doc表示发送请求时可以使用cancellation_message
parameter/field。我已经尝试了 URL 参数和 JSON 正文中的一个字段,但是其中 none 在响应中设置了 cancellation_message
除了 null
.
curl -H "authorization":"Basic somelongkeybase64=" -X DELETE https://myapp.chargify.com/subscriptions/17356012.json?cancellation_message=Application%20deleted
curl -H "authorization":"Basic somelongkeybase64=" -H Content-Type:application/json -d '{"cancellation_message":"Application deleted"}' -X DELETE https://myapp.chargify.com/subscriptions/17356169.json
我是不是漏掉了什么?
已从 Chargify 支持团队获得答复。
cancellation_message
应该包装在请求正文中的 subscription
中:
{
'subscription': {
'cancellation_message': 'Canceling the subscription via the API'
}
}
所以工作 curl
请求如下所示:
curl -H "authorization":"Basic somelongkeybase64=" -H Content-Type:application/json -d '{"subscription":{"cancellation_message":"Application deleted"}}' -X DELETE https://myapp.chargify.com/subscriptions/17356169.json
希望它也能帮助到别人。
The doc表示发送请求时可以使用cancellation_message
parameter/field。我已经尝试了 URL 参数和 JSON 正文中的一个字段,但是其中 none 在响应中设置了 cancellation_message
除了 null
.
curl -H "authorization":"Basic somelongkeybase64=" -X DELETE https://myapp.chargify.com/subscriptions/17356012.json?cancellation_message=Application%20deleted
curl -H "authorization":"Basic somelongkeybase64=" -H Content-Type:application/json -d '{"cancellation_message":"Application deleted"}' -X DELETE https://myapp.chargify.com/subscriptions/17356169.json
我是不是漏掉了什么?
已从 Chargify 支持团队获得答复。
cancellation_message
应该包装在请求正文中的 subscription
中:
{
'subscription': {
'cancellation_message': 'Canceling the subscription via the API'
}
}
所以工作 curl
请求如下所示:
curl -H "authorization":"Basic somelongkeybase64=" -H Content-Type:application/json -d '{"subscription":{"cancellation_message":"Application deleted"}}' -X DELETE https://myapp.chargify.com/subscriptions/17356169.json
希望它也能帮助到别人。