Paymill: Given a subscription, what is the curl
command to list the transactions associated with that subscription?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Currently, you cannot list the transactions of a specific subscription, but you can list the transactions of a client by adding "?client=CLIENT_ID" to the "List transactions" endpoint. Like this:
curl https://api.paymill.de/v2/transactions?client=client_1b6b8b4003603f1f3cbd \
-u 319ffd1f1d10766e59350568170e8c70:
If you run this command, you'll get 2 transactions. If you remove the "client" query string part, you'll get 3 transactions.
Note that the description for all subscription transactions starts with "Subscription#" and contains the subscription ID in it (sub_ef984bab97c253a0a372). So, you can filter the ones matching one (or all) of these conditions.