Kartra Documentation Technical Documentation for Kartra

Action: Get recurring payment subscription details

This will allow you to retrieve the information related to a particular recurring payment subscription in Kartra.

Type Parameters Values
POST cmd* get_subscription_details
POST subscription_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:

Parameters Values
subscription_details String (JSON encoded string containing the details of the recurring payment subscription)

 

JSON parameters Values
subscription_id integer A unique numeric identifier for the subscription id.
subscription_product_id integer Product id of the subscription.
subscription_price_point integer Product price point number of the subscription.
subscription_lead_id integer Id for the lead linked to the subscription.
subscription_start_date yyyy-mm-dd hh:mm:ss Subscription start date EST.
subscription_end_date yyyy-mm-dd hh:mm:ss Subscription end date EST (0000-00-00 00:00:00 if subscription is not cancelled or terminated).
subscription_current_installment integer Number of the current installment.
subscription_installments_left integer How many installments are left / string “Until cancelled”
subscription_recurring_period string (“monthly”, “every 2 months”, “quarterly”,”yearly”, “every 2 years”, “weekly”, “every 2 weeks”) The type of recurring for the subscription.
subscription_status string (“Active”, “Paused”, “Cancelled”, “Terminated”) Subscription status.
subscription_next_payment_date yyyy-mm-dd hh:mm:ss Subscription next payment date EST.
subscription_next_scheduled_payment_amount float The amount of the next scheduled payment. “N/A” if none.
subscription_affiliate string Username of the affiliate, “N/A” if none.
subscription_jv string 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 Number Message Cause
248 Subscription 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
}
Was this article helpful?
YesNo

© 2024 Kartra All Rights Reserved