This will allow you to retrieve the information related to a particular recurring payment subscription in Kartra.
TypeParametersValues
POSTcmd*get_subscription_details
POSTsubscription_id*integer

* Required fields Here is an example:

'actions' => [
    '0' => [
        'cmd' => 'get_subscription_details',
        'subscription_id' => 993037
    ]
]

Here are the results returned by the request:

ParametersValues
subscription_detailsString (JSON encoded string containing the details of the recurring payment subscription)
 
JSON parametersValues
subscription_idinteger A unique numeric identifier for the subscription id.
subscription_product_idinteger Product id of the subscription.
subscription_price_pointinteger Product price point number of the subscription.
subscription_lead_idinteger Id for the lead linked to the subscription.
subscription_start_dateyyyy-mm-dd hh:mm:ss Subscription start date EST.
subscription_end_dateyyyy-mm-dd hh:mm:ss Subscription end date EST (0000-00-00 00:00:00 if subscription is not cancelled or terminated).
subscription_current_installmentinteger Number of the current installment.
subscription_installments_leftinteger How many installments are left / string "Until cancelled"
subscription_recurring_periodstring ("monthly", "every 2 months", "quarterly","yearly", "every 2 years", "weekly", "every 2 weeks") The type of recurring for the subscription.
subscription_statusstring ("Active", "Paused", "Cancelled", "Terminated") Subscription status.
subscription_next_payment_dateyyyy-mm-dd hh:mm:ss Subscription next payment date EST.
subscription_next_scheduled_payment_amountfloat The amount of the next scheduled payment. "N/A" if none.
subscription_affiliatestring Username of the affiliate, "N/A" if none.
subscription_jvstring Username of the jv, "N/A" if none.
  Example of the returned JSON array:
{
    "get_subscription_details":{
        "subscription_details":{
            "subscription_id":"993037",
            "subscription_product_id":"213",
            "subscription_price_point":"2",
            "subscription_lead_id":"321",
            "subscription_start_date":"2021-01-07 11:14:00",
            "subscription_end_date":"0000-00-00 00:00:00",
            "subscription_current_installment":"1",
            "subscription_installments_left":"Until cancelled",
            "subscription_recurring_period":"monthly",
            "subscription_status":"Active",
            "subscription_next_payment_date":"2021-02-07 11:14:00",
            "subscription_next_scheduled_payment_amount":"22.19",
            "subscription_affiliate":"affiliate_username",
            "subscription_jv":"N/A"
        }
    }
}
Error Cases:
Type NumberMessageCause
248Subscription doesn't exist
  • The subscription you are trying to find does not exist in our database.
An example of an error message:
{
  "status": "Error",
  "message": "Subscription doesn't exist",
  "type": 248
}