Get Subscription list

Du er her:
Anslået læsetid: 1 min

If you need a list of your subscriptions, it is really easy with our API function ‘subscription_list’. To get started please look at the code example here.

TIP You can open the file with notepad, if you do not have an editor for viewing source code.

When you run the code by uploading it to your server and navigating to it, You will see the following input form:

subscriptions_list_form.PNG

Please look at the table below if you’re unsure how to fill this in:

The request parameters are written in italic.

Name Description
Merchant token (token) You can get this token by logging into our admin portal at admin.yourpay.io and look under integration settings.

After submit you get an array in the JSON response with the following information:

Name Description
short_id The ccrg associated with the subscription.
customer_name The name of the consumer.
original_orderid The orderid set when the subscription was created.
period_days Number of days between each subscription.
period_dayinmonth The day in the month that it should bill on. So if the next billing is on the 15th. The value will be 15.
period_price The amount to rebill. The amount is displayed in the subunit of the selected currency.
period_currency The ISO-4217 code of the currency. For a full list look here.
period_start Unix timestamp of when the rebilling start.
times_happend Amount of times billed. Will be ‘-1’ if it have not billed yet.