Get Purchase

Example Request

<?php
//Set up API path and method
$base_url = "https://app.paykickstart.com/api/";
$route = "purchase/get";
$url = $base_url . $route;
$post = false;

//Create request data string
$data = http_build_query([
    'auth_token' => '3A0GTRFIJHYE',
    'id' => 'PK-PZ1WKO79ER'
]);

//Execute cURL request
$ch = curl_init();
if ($post) {
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
} else {
    $url = $url . "?" . $data;
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$output = curl_exec($ch);
curl_close($ch);

//Output Response
echo json_decode($output);

Example Response

{
  "id": 6363,
  "pk_id": "PK-P5RLOOPDL7",
  "buyer_id": 4426,
  "customer": "1811054900",
  "product_id": 265,
  "product_name": "Test Demo Campaign",
  "plan_id": 2440,
  "plan_name": "Nogaprdo",
  "buyer_name": "test jack",
  "buyer_email": "test@jack.com",
  "buyer_country": "",
  "buyer_gender": "",
  "amount": 10,
  "trial_amount": null,
  "split_pay_recurring_frequency": null,
  "split_pay_recurring_frequency_type": null,
  "split_pay_amount": null,
  "split_pay_cycles": null,
  "trial_days": null,
  "split_pay": 0,
  "delayed_chain_payment": 0,
  "is_recurring": 1,
  "recurring_frequency": 1,
  "recurring_frequency_type": "day",
  "recurring_cycles": 10,
  "refund_period": 0,
  "coupon_id": null,
  "coupon_code": null,
  "coupon_type": null,
  "coupon_rate": null,
  "coupon_is_recurring": 0,
  "coupon_redeemed": 0,
  "original_amount": null,
  "vendor_id": 137,
  "vendor_first_name": "Digital",
  "vendor_last_name": "Kickstart",
  "vendor_email": "administrators@digitalkickstart.com",
  "gateway_id": 145,
  "affiliate_id": null,
  "affiliate_id_level_2": null,
  "commission_level_1": 50,
  "commission_level_2": 0,
  "funnel_id": 236,
  "funnel_plan_id": 626,
  "tracking_link_id": null,
  "visit_id": null,
  "tax_service_id": 1,
  "is_purchased": 1,
  "is_executed": 1,
  "execute_in_queue": 0,
  "custom_params": null,
  "browser": "Chrome",
  "platform": "OS X",
  "device": "Macintosh",
  "billing_address_1": null,
  "billing_address_2": null,
  "billing_city": null,
  "billing_state": null,
  "billing_zip": null,
  "billing_country": null,
  "shipping_address_1": null,
  "shipping_address_2": null,
  "shipping_city": null,
  "shipping_state": null,
  "shipping_zip": null,
  "shipping_country": null,
  "created_at": "2017-03-22 14:07:22",
  "updated_at": "2017-03-31 14:08:05",
  "update_cc_pw": null,
  "request_type": "embed",
  "parent_id": null,
  "base_currency": "USD",
  "transactions": [
    {
      "id": 11175,
      "pk_id": "PK-T8OL140QL4",
      "purchase_id": 6363,
      "buyer_ip": "93.189.43.18",
      "amount": 12.1,
      "base_currency_conversion_id": 1258,
      "processor": "authnet",
      "processor_data": "{\"transaction\":{\"responseCode \":\"1\",\"rawResponseCode\":null,\"authCode\":\"IDCQZ8\",\"avsResultCode\":\"Y\",\"cvvResultCode\":\"P\",\"cavvResultCode\":\"2\",\"transactionId\":\"60020593016\",\"refTransID\":\"\",\"transHash\":\"37C8EB74F1BFADB91F0559833BF040A1\",\"testRequest\":\"0\",\"accountNumber\":\"XXXX1111\",\"accountType\":\"Visa\",\"messages\":{\"0\":{\"code\":\"1\",\"description\":\"This transaction has been approved.\"}},\"errors\":null,\"splitTenderPayments\":null,\"shipTo\":null,\"userFields\":null,\"secureAcceptance\":null},\"profile_response\":null,\"ref_id\":\"ref_1490191643\",\"messages\":{\"result_code\":\"Ok\",\"message\":{\"0\":{\"code\":\"I00001\",\"description\":\"Successful.\"}}}}",
      "gateway_id": 145,
      "paypal_txn_id": null,
      "is_refund": 0,
      "is_approved": 1,
      "dispute_status": null,
      "failed_email_sent": 0,
      "commission_refunded": 0,
      "cc_type": null,
      "cc_month": null,
      "cc_year": null,
      "cc_last4": null,
      "m_p_user_id": null,
      "cc_holder_name": null,
      "refund_end_date": "2017-03-22 14:03:07",
      "created_at": "2017-03-22 14:07:23",
      "updated_at": "2017-03-22 14:07:24",
      "tax_transaction_id": null,
      "tax_amount": null,
      "tax_percent": null
    },
    {
      "id": 11243,
      "pk_id": "PK-TV3EV97ZLX",
      "purchase_id": 6363,
      "buyer_ip": "93.189.43.18",
      "amount": 12.1,
      "base_currency_conversion_id": 1378,
      "processor": "authnet",
      "processor_data": "{\"transaction\":{\"responseCode \":\"1\",\"rawResponseCode\":null,\"authCode\":\"NTGAWJ\",\"avsResultCode\":\"Y\",\"cvvResultCode\":\"P\",\"cavvResultCode\":\"2\",\"transactionId\":\"60020650883\",\"refTransID\":\"\",\"transHash\":\"7BADB6EFBF1ACC33CA8BB983F3627BE1\",\"testRequest\":\"0\",\"accountNumber\":\"XXXX1111\",\"accountType\":\"Visa\",\"messages\":{\"0\":{\"code\":\"1\",\"description\":\"This transaction has been approved.\"}},\"errors\":null,\"splitTenderPayments\":null,\"shipTo\":null,\"userFields\":null,\"secureAcceptance\":null},\"profile_response\":null,\"ref_id\":\"ref_1490278084\",\"messages\":{\"result_code\":\"Ok\",\"message\":{\"0\":{\"code\":\"I00001\",\"description\":\"Successful.\"}}}}",
      "gateway_id": 145,
      "paypal_txn_id": null,
      "is_refund": 0,
      "is_approved": 1,
      "dispute_status": null,
      "failed_email_sent": 1,
      "commission_refunded": 0,
      "cc_type": null,
      "cc_month": null,
      "cc_year": null,
      "cc_last4": null,
      "m_p_user_id": null,
      "cc_holder_name": null,
      "refund_end_date": "2017-03-23 14:03:08",
      "created_at": "2017-03-23 14:08:04",
      "updated_at": "2017-03-23 14:08:05",
      "tax_transaction_id": null,
      "tax_amount": null,
      "tax_percent": null
    }
  ],
  "subscriptions": [
        {
            "id": 574,
            "purchase_id": 6363,
            "subscription_uuid": null,
            "count": 10,
            "split_count": null,
            "status": 0,
            "failed_attempts": 0,
            "trial_expire_notified": 0,
            "trial_ends": null,
            "next_date": "2017-04-01 14:07:24",
            "cancel_note": null,
            "cancelled_by": null,
            "cancel_at": "2017-03-31 14:08:05",
            "in_queue": 0,
            "attempted_at": "2017-03-31 14:08:05",
            "created_at": "2017-03-22 14:07:24",
            "updated_at": "2017-03-31 14:08:05"
        }
    ]
}

Returns the purchase details.

ARGUMENTS

auth_token

The Paykickstart vendor’s API Key. This field is required.


id

The purchase’s id. This field is required.