Kartra Documentation Technical Documentation for Kartra

Action: Get payment transaction details

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

Type Parameters Values
POST cmd* get_transaction_details
POST transaction_id* integer

* Required fields

Here is an example:

'actions' => [
    '0' => [
        'cmd' => 'get_transaction_details',
        'transaction_id' => 99432
    ]
]

Here are the results returned by the request:

Parameters Values
transaction_details String (JSON encoded string containing the details of the payment transaction)

 

JSON parameters:

For sale transactions Values
transaction_id integer A unique numeric identifier for the transaction id.
lead_first_name string The lead first name at the moment of purchase.
lead_last_name string The lead last name at the moment of purchase.
lead_email string The lead email at the moment of purchase.
lead_id integer A unique numeric identifier for the lead id.
lead_username string The lead username.
lead_country string The lead country at the moment of purchase.
lead_country_code_2 string The lead two letter country code at the moment of purchase.
lead_country_code_3 string The lead three letter country code at the moment of purchase.
lead_state string The lead state at the moment of purchase.
lead_phone_country_code string The lead phone country code at the moment of purchase.
lead_phone_number string The lead phone number at the moment of purchase.
lead_address string The lead address at the moment of purchase.
lead_city string The lead city at the moment of purchase.
lead_zip string The lead zip at the moment of purchase.
lead_zip string The lead zip at the moment of purchase.
product_name string The product name at the moment of purchase.
product_id integer The product id linked to the transaction.
product_price_point integer The product price point linked to the transaction.
transaction_full_amount float The final paid amount on this specific transaction.
transaction_quantity
integer The product quantity.
transaction_affiliate string Username of the affiliate, “N/A” if none.
transaction_jv string Username of the jv, “N/A” if none.
transaction_date yyyy-mm-dd hh:mm:ss Transaction date EST.
transaction_type string The transaction type. Possible values: ‘sale’
transaction_parent_id integer The id of the parent transaction (in the case of sale it is 0)
transaction_subscription_id string A unique identifier for the subscription id (PayPal transactions will return PayPal subscription id. If there is no recurring payments this will be “N/A”).
transaction_internal_subscription_id integer A unique numeric identifier for the subscription id(if there is no recurring payments this will be “N/A”).
transaction_subscription_pay_number  integer The payment number of the subscription related to the transaction, if any. If not the value will be “N/A”
transaction_discount float If any discount coupon was applied, the amount in dollars deducted from the original price. “N/A” if none.
transaction_tax float The amount of sales tax or VAT. “N/A” if none.
transaction_base_amount float The base price for the transaction (for trial this will be the base price of the initial transaction).
transaction_shipping float The shipping cost.
transaction_last_4_card_digits integer The last 4 digits of the used card (‘N/A’ if PayPal)
original_id integer In case of a payment subscription, the order ID of the first transaction within the subscription. In this case it will be the same as the transaction_id since it is a first payment.
vendor_tracking_id_1 string Vendor’s tracking ID 1 if the sale was generated from a tracking link.
vendor_tracking_id_2 string Vendor’s tracking ID 2 if the sale was generated from a tracking link.
vendor_tracking_link
string Vendor’s tracking link name.
trial integer 1 or 0, depending on whether trial is activated or not.
trial_period
integer The trial period in days.
trial_amount
float The trial amount.
rebill_circle integer Days left for the next payment. Present only for recurring subscription payments.
installments integer The number of installments for the subscription. Present only for recurring subscription payments with finite number of installments.
frequency
string The frequency of recurrence. Possible values (‘every_year’, ‘every_2_years’). Present only for recurring subscription payments with price point type recurrent.
payments_left integer Number of upcoming payments until the end of the subscription. 9999 if “cancelled by customer”. Present only for recurring subscription payments.
shipping_first_name string Lead’s shipping first name. “N/A” if none.
shipping_last_name string Lead’s shipping last name. “N/A” if none.
shipping_address string Lead’s shipping address. “N/A” if none.
shipping_city string Lead’s shipping city. “N/A” if none.
shipping_zip string Lead’s shipping zip. “N/A” if none.
shipping_country string Lead’s shipping country. “N/A” if none.
shipping_state string Lead’s shipping state. “N/A” if none.
payment_processor_type
string The payment processor type: “PayPal”, “Braintree”, “Stripe”, “Authorize.net”

 

JSON parameters:

For refund/chargeback/partial refund transactions Values
transaction_id integer A unique numeric identifier for the transaction id.
lead_first_name string The lead first name at the moment of purchase.
lead_last_name string The lead last name at the moment of purchase.
lead_email string The lead email at the moment of purchase.
lead_id integer A unique numeric identifier for the lead id.
lead_username string The lead username.
lead_country string The lead country at the moment of purchase.
lead_country_code_2 string The lead two letter country code at the moment of purchase.
lead_country_code_3 string The lead three letter country code at the moment of purchase.
lead_state string The lead state at the moment of purchase.
lead_phone_country_code string The lead phone country code at the moment of purchase.
lead_phone_number string The lead phone number at the moment of purchase.
lead_address string The lead address at the moment of purchase.
lead_city string The lead city at the moment of purchase.
lead_zip string The lead zip at the moment of purchase.
product_name string The product name at the moment of purchase.
product_id integer The product id linked to the transaction.
product_price_point integer The product price point linked to the transaction.
transaction_full_amount float The final paid amount on this specific transaction.
transaction_quantity
integer The product quantity. Not present in cancellations.
transaction_affiliate string Username of the affiliate, “N/A” if none.
transaction_jv string Username of the jv, “N/A” if none.
transaction_date yyyy-mm-dd hh:mm:ss Transaction date EST.
transaction_type string The transaction type. Possible values: ‘refund’, ‘chargeback’, ‘partial_refund’
transaction_parent_id integer The id of the parent transaction
transaction_subscription_id string A unique identifier for the subscription id (PayPal transactions will return PayPal subscription id. If there is no recurring payments this will be 0).
transaction_internal_subscription_id integer A unique numeric identifier for the subscription id(if there is no recurring payments this will be 0).
transaction_subscription_pay_number  integer The payment number of the subscription related to the transaction, if any.
transaction_discount float If any discount coupon was applied, the amount in dollars deducted from the original price. “N/A” if none.
transaction_tax float The amount of sales tax or VAT. “N/A” if none.
transaction_base_amount float The base price for the transaction (for trial this will be the base price of the initial transaction).
transaction_shipping float The shipping cost.
original_id integer In case of a payment subscription, the order ID of the first transaction within the subscription. In this case it will be the same as the transaction_id since it is a first payment.
vendor_tracking_id_1 string Vendor’s tracking ID 1 if the sale was generated from a tracking link.
vendor_tracking_id_2 string Vendor’s tracking ID 2 if the sale was generated from a tracking link.
vendor_tracking_link
string Vendor’s tracking link name.
shipping_first_name string Lead’s shipping first name. “N/A” if none.
shipping_last_name string Lead’s shipping last name. “N/A” if none.
shipping_address string Lead’s shipping address. “N/A” if none.
shipping_city string Lead’s shipping city. “N/A” if none.
shipping_zip string Lead’s shipping zip. “N/A” if none.
shipping_country string Lead’s shipping country. “N/A” if none.
shipping_state string Lead’s shipping state. “N/A” if none.
payment_processor_type
string The payment processor type: “PayPal”, “Braintree”, “Stripe”, “Authorize.net”

 

JSON parameters:

For rebill transactions Values
transaction_id integer A unique numeric identifier for the transaction id.
lead_first_name string The lead first name at the moment of purchase.
lead_last_name string The lead last name at the moment of purchase.
lead_email string The lead email at the moment of purchase.
lead_id integer A unique numeric identifier for the lead id.
lead_username string The lead username.
lead_country string The lead country at the moment of purchase.
lead_country_code_2 string The lead two letter country code at the moment of purchase.
lead_country_code_3 string The lead three letter country code at the moment of purchase.
lead_state string The lead state at the moment of purchase.
lead_phone_country_code string The lead phone country code at the moment of purchase.
lead_phone_number string The lead phone number at the moment of purchase.
lead_address string The lead address at the moment of purchase.
lead_city string The lead city at the moment of purchase.
lead_zip string The lead zip at the moment of purchase.
product_name string The product name at the moment of purchase.
product_id integer The product id linked to the transaction.
product_price_point integer The product price point linked to the transaction.
transaction_full_amount float The final paid amount on this specific transaction.
transaction_quantity
integer The product quantity. Not present in cancellations.
transaction_affiliate string Username of the affiliate, “N/A” if none.
transaction_jv string Username of the jv, “N/A” if none.
transaction_date yyyy-mm-dd hh:mm:ss Transaction date EST.
transaction_type string The transaction type. Possible values: ‘rebill’
transaction_parent_id integer The id of the parent transaction (in the case of refunds/chargebacks)
transaction_subscription_id string A unique identifier for the subscription id (PayPal transactions will return PayPal subscription id. If there is no recurring payments this will be 0).
transaction_internal_subscription_id integer A unique numeric identifier for the subscription id(if there is no recurring payments this will be 0).
transaction_subscription_pay_number  integer The payment number of the subscription related to the transaction.
transaction_discount float If any discount coupon was applied, the amount in dollars deducted from the original price. “N/A” if none.
transaction_tax float The amount of sales tax or VAT. “N/A” if none.
transaction_base_amount float The base price for the transaction (for trial this will be the base price of the initial transaction).
transaction_shipping float The shipping cost.
original_id integer In case of a payment subscription, the order ID of the first transaction within the subscription. In this case it will be the same as the transaction_id since it is a first payment.
vendor_tracking_id_1 string Vendor’s tracking ID 1 if the sale was generated from a tracking link.
vendor_tracking_id_2 string Vendor’s tracking ID 2 if the sale was generated from a tracking link.
vendor_tracking_link
string Vendor’s tracking link name.
shipping_first_name string Lead’s shipping first name. “N/A” if none.
shipping_last_name string Lead’s shipping last name. “N/A” if none.
shipping_address string Lead’s shipping address. “N/A” if none.
shipping_city string Lead’s shipping city. “N/A” if none.
shipping_zip string Lead’s shipping zip. “N/A” if none.
shipping_country string Lead’s shipping country. “N/A” if none.
shipping_state string Lead’s shipping state. “N/A” if none.
rebill_circle integer Days left for the next payment.
installments integer The number of installments for the subscription. Present only for recurring subscription payments with finite number of installments.
frequency string The frequency of recurrence. Possible values (‘every_year’, ‘every_2_years’). Present only for recurring subscription payments with price point type recurrent.
payments_left integer Number of upcoming payments until the end of the subscription. 9999 if “cancelled by customer”.
payment_processor_type
string The payment processor type: “PayPal”, “Braintree”, “Stripe”, “Authorize.net”
failed_reattempt_number
integer If this is a reattempt of a failed transaction, the retry number

 

JSON parameters:

For failed transactions Values
transaction_id integer A unique numeric identifier for the transaction id.
lead_first_name string The lead first name at the moment of purchase.
lead_last_name string The lead last name at the moment of purchase.
lead_email string The lead email at the moment of purchase.
lead_id integer A unique numeric identifier for the lead id.
lead_username string The lead username.
lead_country string The lead country at the moment of purchase.
lead_country_code_2 string The lead two letter country code at the moment of purchase.
lead_country_code_3 string The lead three letter country code at the moment of purchase.
lead_state string The lead state at the moment of purchase.
lead_phone_country_code string The lead phone country code at the moment of purchase.
lead_phone_number string The lead phone number at the moment of purchase.
lead_address string The lead address at the moment of purchase.
lead_city string The lead city at the moment of purchase.
lead_zip string The lead zip at the moment of purchase.
product_name string The product name at the moment of purchase.
product_id integer The product id linked to the transaction.
product_price_point integer The product price point linked to the transaction.
transaction_full_amount float The final paid amount on this specific transaction.
transaction_quantity
integer The product quantity.
transaction_affiliate string Username of the affiliate, “N/A” if none.
transaction_jv string Username of the jv, “N/A” if none.
transaction_date yyyy-mm-dd hh:mm:ss Transaction date EST.
transaction_type string The transaction type. Possible values: ‘failed’
transaction_parent_id integer The id of the parent transaction (in the case of refunds/chargebacks)
transaction_subscription_id string A unique identifier for the subscription id (PayPal transactions will return PayPal subscription id. If there is no recurring payments this will be 0).
transaction_internal_subscription_id integer A unique numeric identifier for the subscription id(if there is no recurring payments this will be 0).
transaction_subscription_pay_number  integer The payment number of the subscription related to the transaction.
transaction_discount float If any discount coupon was applied, the amount in dollars deducted from the original price. “N/A” if none.
transaction_tax float The amount of sales tax or VAT. “N/A” if none.
transaction_base_amount float The base price for the transaction (for trial this will be the base price of the initial transaction).
transaction_shipping float The shipping cost.
original_id integer In case of a payment subscription, the order ID of the first transaction within the subscription. In this case it will be the same as the transaction_id since it is a first payment.
vendor_tracking_id_1 string Vendor’s tracking ID 1 if the sale was generated from a tracking link.
vendor_tracking_id_2 string Vendor’s tracking ID 2 if the sale was generated from a tracking link.
vendor_tracking_link
string Vendor’s tracking link name.
shipping_first_name string Lead’s shipping first name. “N/A” if none.
shipping_last_name string Lead’s shipping last name. “N/A” if none.
shipping_address string Lead’s shipping address. “N/A” if none.
shipping_city string Lead’s shipping city. “N/A” if none.
shipping_zip string Lead’s shipping zip. “N/A” if none.
shipping_country string Lead’s shipping country. “N/A” if none.
shipping_state string Lead’s shipping state. “N/A” if none.
payment_processor_type
string The payment processor type: “PayPal”, “Braintree”, “Stripe”, “Authorize.net”
failed_reattempt_number
integer If this is a reattempt of a failed transaction, the retry number

 

JSON parameters:

For cancellation transactions Values
transaction_id integer A unique numeric identifier for the transaction id.
lead_first_name string The lead first name at the moment of purchase.
lead_last_name string The lead last name at the moment of purchase.
lead_email string The lead email at the moment of purchase.
lead_id integer A unique numeric identifier for the lead id.
lead_username string The lead username.
lead_country string The lead country at the moment of purchase.
lead_country_code_2 string The lead two letter country code at the moment of purchase.
lead_country_code_3 string The lead three letter country code at the moment of purchase.
lead_state string The lead state at the moment of purchase.
lead_phone_country_code string The lead phone country code at the moment of purchase.
lead_phone_number string The lead phone number at the moment of purchase.
lead_address string The lead address at the moment of purchase.
lead_city string The lead city at the moment of purchase.
lead_zip string The lead zip at the moment of purchase.
lead_ip string The lead ip at the moment of purchase.
product_name string The product name at the moment of purchase.
product_id integer The product id linked to the transaction.
product_price_point integer The product price point linked to the transaction.
transaction_date yyyy-mm-dd hh:mm:ss Transaction date EST.
transaction_type string The transaction type. Possible values: ‘cancellation’
transaction_parent_id integer The id of the parent transaction (in the case of refunds/chargebacks)
transaction_subscription_id string A unique identifier for the subscription id (PayPal transactions will return PayPal subscription id. If there is no recurring payments this will be 0).
transaction_internal_subscription_id integer A unique numeric identifier for the subscription id(if there is no recurring payments this will be 0).
transaction_last_4_card_digits integer The last 4 digits of the used card (‘N/A’ if PayPal)
original_id integer In case of a payment subscription, the order ID of the first transaction within the subscription. In this case it will be the same as the transaction_id since it is a first payment.
vendor_tracking_id_1 string Vendor’s tracking ID 1 if the sale was generated from a tracking link.
vendor_tracking_id_2 string Vendor’s tracking ID 2 if the sale was generated from a tracking link.
vendor_tracking_link
string Vendor’s tracking link name.
payment_processor_type
string The payment processor type: “PayPal”, “Braintree”, “Stripe”, “Authorize.net”

 

Example of the returned JSON array:

{
    "get_transaction_details":{
        "transaction_details":{
            "transaction_id":"99432",
            "lead_first_name":"Joe",
            "lead_last_name":"Smith",
            "lead_email":"joe.smith@domain.com",
            "lead_id":"4174086",
            "lead_username":"emailtest5e9476c0",
            "product_name":"Product kartra",
            "product_id":"5425",
            "product_price_point":"2",
            "transaction_full_amount":"4.00",
            "transaction_quantity":"1",
            "transaction_affiliate":"N/A",
            "transaction_jv":"N/A",
            "transaction_date":"2020-12-23 06:22:03",
            "transaction_type":"sale",
            "transaction_parent_id":"0",
            "transaction_subscription_id":"1670",
            "transaction_internal_subscription_id":"13670",
            "transaction_subscription_pay_number":"1",
            "transaction_last_4_card_digits":"1234",
            "original_id":"48111",
            "lead_country":"United States",
            "lead_country_code_2":"US",
            "lead_country_code_3":"USA",
            "lead_state":"New York",
            "lead_phone_country_code":"1",
            "lead_phone_number":"555-43556",
            "lead_address":"1st street",
            "lead_city":"New York",
            "lead_zip":"430022",
            "lead_ip":"127.0.0.1",
            "transaction_discount":"N/A",
            "transaction_tax":"N/A",
            "vendor_tracking_id_1":"N/A",
            "vendor_tracking_id_2":"N/A",
            "trial":"0",
            "trial_period":"N/A",
            "trial_amount":"N/A"
            "rebill_circle":"66",
            "installments":21,
            "payments_left":21,
            "shipping_first_name":"N/A",
            "shipping_last_name":"N/A",
            "shipping_address":"N/A",
            "shipping_city":"N/A",
            "shipping_zip":"N/A",
            "shipping_country":"N/A",
            "shipping_state":"N/A",
            "transaction_shipping":"0.00",
            "transaction_base_amount":"4.00",
            "vendor_tracking_link":"",
            "payment_processor_type":"Stripe"
        }
    }
}

Error Cases:

Type Number Message Cause
247 Transaction doesn’t exist
  • The transaction you are trying to find does not exist in our database.

An example of an error message:

{
  "status": "Error",
  "message": "Transaction doesn't exist",
  "type": "247"
}
Was this article helpful?
YesNo

© 2024 Kartra All Rights Reserved