1.Introduction #

The Paykickstart API allows for a wide variety of interactions with the Paykickstart Platform using an application.

The API endpoint is located here: https://app.paykickstart.com/api

  • All API requests should use the above URL as their base url.
  • All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

With the exception of the Instant Payment Notification system which uses a different validation method, every api call must include an auth_token field, which is located in your Platform Settings, under “API Key”. This key is used to verify the vendor’s account and respective API access permissions.

Responses from the Paykickstart API are returned in JSON format, unless otherwise stipulated.

Yes No

2.Topics #

2.1.Instant Payment Notification #

2.1.1.IPN POST #

Example Response

<?php
$_POST = [
    'event'                             => 'sales',
    'mode'                              => 'live',
    'payment_processor'                 => 'stripe',
    'amount'                            => 9.99,
    'buyer_ip'                          => '196.215.215.215',
    'buyer_first_name'                  => 'Ruggero',
    'buyer_last_name'                   => 'Sandri-Boriani',
    'buyer_email'                       => 'ruggero@sandri.com',
    'vendor_first_name'                 => 'Digital',
    'vendor_last_name'                  => 'Kickstart',
    'vendor_email'                      => 'support@digitalkickstart.com',
    'billing_address_1'                 => '',
    'billing_address_2'                 => '',
    'billing_city'                      => '',
    'billing_state'                     => '',
    'billing_zip'                       => '',
    'billing_country'                   => '',
    'shipping_address_1'                => '',
    'shipping_address_2'                => '',
    'shipping_city'                     => '',
    'shipping_state'                    => '',
    'shipping_zip'                      => '',
    'shipping_country'                  => '',
    'transaction_id'                    => 'PK-TN0LNO7XWR',
    'invoice_id'                        => 'PK-PZ1WK636WR',
    'tracking_id'                       => 216,
    'transaction_time'                  => 1469014598,
    'product_id'                        => 2354,
    'product_name'                      => 'SEO Snapshot - Main',
    'campaign_id'                       => 215,
    'campaign_name'                     => 'SEO Snapshot',
    'affiliate_first_name'              => 'Bob',
    'affiliate_last_name'               => 'Jones',
    'affiliate_email'                   => 'bob@jones.com',
    'affiliate_commission_amount'       => 4.99,
    'affiliate_commission_percent'      => 50,
    'ref_affiliate_first_name'          => null,
    'ref_affiliate_last_name'           => null,
    'ref_affiliate_email'               => null,
    'ref_affiliate_commission_amount'   => null,
    'ref_affiliate_commission_percent'  => null,
    'custom_var1'                       => 123,
    'custom_var2'                       => 'email@user.com',
    'licenses'                          => ['HPLD-XSQW-KDW3-8HTD', 'AWDF-XADWR-HYTF-4T7B'],
    'verification_code'                 => 'e2288202ad23b877c3498a6db6214b5a417b75a4'
];

IPN Validation Function

<?php
function is_valid_ipn($data, $secret_key) {

    $paramStrArr = array();
    $paramStr = NULL;

    foreach($data as $key=>$value)
    {
        // Ignore if it is encrypted key
        if($key == "verification_code") continue;
        if(!$key OR !$value) continue;
        $paramStrArr[] = (string) $value;
    }

    ksort( $paramStrArr, SORT_STRING );
    $paramStr = implode("|", $paramStrArr);
    $encKey = hash_hmac( 'sha1', $paramStr, $secret_key );

    return $encKey == $data["verification_code"] ;
}

PayKickstart’s Instant Payment Notification (IPN) is a message service that automatically notifies vendors of events related to PayKickstart transactions. Vendors can use it to automate back-office and administrative functions, including automatically creating users on apps, providing customers with their login credentials via email etc.

ARGUMENTS

event

Stipulates the type of transaction event which has occurred. The event types are:

  • sales
  • refund
  • subscription-payment
  • subscription-created
  • subscription-cancelled

mode

Indicates whether the transaction was executed in “live” mode or “test” mode. The parameter’s possible value are:

  • live
  • test

payment_processor

Indicates the payment gateway used to create the transaction. Supported payment gateways include:

  • stripe
  • paypaladaptive
  • braintree
  • authnet

amount

The transaction amount

buyer_ip
buyer_first_name
buyer_last_name
buyer_email

The transaction’s buyer’s details

vendor_first_name
vendor_last_name
vendor_email

The transaction’s Paykickstart vendor’s details

billing_address_1
billing_address_2
billing_city
billing_state
billing_zip
billing_country

The transaction’s buyer’s billing details

shipping_address_1
shipping_address_2
shipping_city
shipping_state
shipping_zip
shipping_country

The transaction’s buyer’s shipping details

transaction_id

The unique Paykickstart transaction ID


invoice_id

The unique Paykickstart purchase ID


tracking_id

The transaction’s Paykickstart affiliate’s tracking link id


transaction_time

The time when the transaction was generated, in UNIX timestamp format.


product_id
product_name

The transaction’s product details

campaign_id
campaign_name

The transaction’s campaign details

affiliate_first_name
affiliate_last_name
affiliate_email
affiliate_commission_amount
affiliate_commission_percent

The transaction’s Paykickstart affiliate’s details and the amount paid to the affiliate for this transaction. Both the commission value and percentage amounts are indicated.

 


ref_affiliate_first_name
ref_affiliate_last_name
ref_affiliate_email
ref_affiliate_commission_amount
ref_affiliate_commission_percent

The transaction’s Paykickstart 2nd tier affiliate’s details and the amount paid to that affiliate for this transaction. Both the commission value and percentage amounts are indicated.

 


custom_{field}

Field names prefixed with “custom_” in the IPN POST are custom fields which you may set in the checkout page URL. For example, if your Paykickstart checkout page URL is https://app.paykickstart.com/checkout/123, you can add additional information to the URL in the form of GET variables like this:

https://app.paykickstart.com/checkout/123?var1=123&var2=email@user.com

Continuing with the example above, we’d pass these custom variables back to you in the IPN POST, like this:

custom_var1 = 123
custom_var2 = ’email@user.com’


licenses

Returns any licenses linked to the transaction, either as an array if more than 1 license, or a string if only 1 license.

 


verification_code

This is a hashed security key that can be used to validate that the IPN POST received is in fact valid / verified. You should generate a hash using the function provided (see IPN Validation Function on the left) and compare it against the hash within the POST. If they match, the IPN is verified. The secret key variable required by the IPN validation function is located in your campaign settings (see screenshot below).

pk_ipn_secret_key

 

 

Yes No

2.1.2.Licensing #

PayKickstart’s licensing system is a service which creates and manages licenses on a per-product basis for vendors who activate the service.

The service is activated by enabling “Licensing” in the Product Details section when editing a product. The “License Usage” field indicates the number of licenses which will be issued each time the product is purchased.

The issued licenses are given to the customer on Paykickstart’s default “thank you” page and on Paykickstart’s Order Lookup page. They are also indicated in the IPN service. The link to Paykickstart’s Order Lookup page is included by default to the buyer’s sales receipt email.

Yes No

2.1.2.1.Get License Data #

Example Request

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

//Create request data string
$data = http_build_query([
    'auth_token' => '3A0GTRFIJHYE',
    'license_key' => 'D3WS-UCTG-IDFZ-ASHU'
]);

//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

{
  "success": 0,
  "message": "",
  "data": {
    "license_key": "D3WS-UCTG-IDFZ-ASHU",
    "purchase_id": "PK-P0DHYTR0WZ",
    "product_id": 1234,
    "status": 1,
    "guid": null
  }
}

This GET request returns license information for a specific license key

ARGUMENTS

license_key

The customer’s license key


auth_token

The Paykickstart vendor’s API Key

 

Yes No

2.1.2.2.Get License Status #

Example Request

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

//Create request data string
$data = http_build_query([
    'auth_token' => '3A0GTRFIJHYE',
    'license_key' => 'D3WS-UCTG-IDFZ-ASHU'
]);

//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

{
  "success": 1,
  "message": "",
  "data": {
    "valid": 1,
    "active": 1
  }
}

This GET request returns license status information for a specific license key

ARGUMENTS

license_key

The customer’s license key


auth_token

The Paykickstart vendor’s API Key

Yes No

2.1.2.3.Activate License #

Example Request

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

//Create request data string
$data = http_build_query([
    'auth_token' => '3A0GTRFIJHYE',
    'license_key' => 'D3WS-UCTG-IDFZ-ASHU',
    'guid' => '46B4560CC-128A-6EDA-439F-80623S7A'
]);

//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

{
  "success": 1,
  "message": "",
  "data": {
    "license_key": "A4FE-UPYH-EN5Z-PW5E",
    "status": 1,
    "guid": "46B4560CC-128A-6EDA-439F-80623S7A"
  }
}

This POST request activates the license for a specific license key / GUID combination

ARGUMENTS

license_key

The customer’s license key


guid

The GUID is usually a 128-bit integer number used to identify unique resources, but for the purpose of activating a license on Paykickstart it can be any unique hash or “identifier” to identify where the license has been activated, such as a unique hardware identifier, or a unique URL. This prevents the license from being activated in multiple environments at once (1 license per use).


auth_token

The Paykickstart vendor’s API Key

Yes No

2.1.2.4.Clear License ("De-Register") #

Example Request

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

//Create request data string
$data = http_build_query([
    'auth_token' => '3A0GTRFIJHYE',
    'license_key' => 'D3WS-UCTG-IDFZ-ASHU',
]);

//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

{
  "success": 1,
  "message": "License successfully cleared.",
  "data": []
}

This POST request “clears” / de-registers the license from its specified GUID, allowing it to be activated again for a new (or the same) GUID

ARGUMENTS

license_key

The customer’s license key


auth_token

The Paykickstart vendor’s API Key

Yes No

2.1.2.5.Enable License #

Example Request

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

//Create request data string
$data = http_build_query([
    'auth_token' => '3A0GTRFIJHYE',
    'license_key' => 'D3WS-UCTG-IDFZ-ASHU'
]);

//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

{
  "success": 1,
  "message": "License successfully enabled.",
  "data": []
}

This POST request enables the license for being activated and verified

ARGUMENTS

license_key

The customer’s license key


auth_token

The Paykickstart vendor’s API Key

Yes No

2.1.2.6.Disable License #

Example Request

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

//Create request data string
$data = http_build_query([
    'auth_token' => '3A0GTRFIJHYE',
    'license_key' => 'D3WS-UCTG-IDFZ-ASHU'
]);

//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

{
  "success": 1,
  "message": "License successfully disabled.",
  "data": []
}

This POST request disables the license from being activated or verified

ARGUMENTS

license_key

The customer’s license key


auth_token

The Paykickstart vendor’s API Key

Yes No

2.1.2.3.Subscriptions #

The subscriptions methods allow you to update a subscription’s status and set the next charge date, or to cancel the subscription.

Yes No

2.1.2.3.1.Cancel Subscription #

Example Request

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

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

//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

{
  "success": 1,
  "message": "Subscription was cancelled"
}

This POST request cancels an active subscription

ARGUMENTS

invoice_id

The unique Paykickstart purchase ID


auth_token

The Paykickstart vendor’s API Key

Yes No

2.1.2.3.4.Payments #

The following API calls offer checkout and payment-related API functions.

Yes No

2.1.2.3.4.1.New Purchase #

Example Request

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

//Create request data string
$data = http_build_query([
    "auth_token" => "DLFJKGHW9834",
    "product" => 80,
    "plan" => 137,
    "first_name" => "Jack",
    "last_name" => "Sparrow",
    "email" => "jack@sparrow.com",
    "ccNum" => "4111111111111111",
    "ccExpireYear" => 2018,
    "ccExpireMonth" => 12,
    "ccCSV" => 123,
    "is_recurring" => 1,
    "amount" => 12,
    "recurring_freq" => 1,
    "recurring_freq_type" => "day",
    "cycles" => 3
]);

//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

{
  "data": {
    "event": "sales",
    "mode": "live",
    "payment_processor": "stripe",
    "amount": "9.00",
    "buyer_ip": "127.0.0.1",
    "buyer_first_name": "Micky",
    "buyer_last_name": "Mouse",
    "buyer_email": "mickeymouse@gmail.com",
    "vendor_first_name": "Digital",
    "vendor_last_name": "Kickstart",
    "vendor_email": "test@vendor.com",
    "transaction_id": "PK-TORW2N8NE5",
    "invoice_id": "PK-PN7E5R9NW5",
    "tracking_id": "",
    "transaction_time": 1485940001,
    "product_id": 2425,
    "product_name": "TEst product",
    "campgaign_id": 258,
    "campaign_name": "Test Demo Campaign",
    "affiliate_first_name": "Jack",
    "affiliate_last_name": "Sparrow",
    "affiliate_email": "",
    "affiliate_commission_amount": "",
    "affiliate_commission_percent": "",
    "ref_affiliate_first_name": "",
    "ref_affiliate_last_name": "",
    "ref_affiliate_email": "",
    "ref_affiliate_commission_amount": "",
    "ref_affiliate_commission_percent": "",
    "licenses": "",
    "verification_code": "d0822d01a254c2f394265dae22de8aecdaed08e5"
  },
  "url": null,
  "type": 1,
  "plan": 2425
}

PayKickstart’s New Purchase API call is a highly flexible system designed to allow you as the vendor complete flexibility in terms of creating and managing new purchases. Using the API, you’re able to override your products’ default price settings, or even create a new charge without needing a client’s credit card information (reference transaction).

ARGUMENTS

auth_token

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


product

The campaign’s id. This field is required.

plan

The product’s id. This field is required.

affiliate_id

The paykickstart affiliate id for the affiliate which should be credited (and/or receive commission) for the purchase. The commission settings from the campaign / product / affiliate overrides will be used to calculate the commission owed.


first_name

The buyer’s first name. This field is required.


last_name

The buyer’s last name. This field is required.


email

The buyer’s email address. This field is required.


ccNum

The buyer’s credit card number. This field is not required, provided that either the pay_method_nonce field or the ref_purchase field is set.


ccExpireYear

The buyer’s credit card expiry year. This field is not required, provided that either the pay_method_nonce field or the ref_purchase field is set.


ccExpireMonth

The buyer’s credit card expiry month. This field is not required, provided that either the pay_method_nonce field or the ref_purchase field is set.


ccCSV

The buyer’s credit card CSV number. This field is not required, provided that either the pay_method_nonce field or the ref_purchase field is set.


cc_holder_name

The name as it appears on the buyer’s credit card. This field is not required, provided that either the pay_method_nonce field or the ref_purchase field is set.


pay_method_nonce

If you’re using Braintree or Braintree Paypal, you can pass the pay_method_nonce to us and we’ll process the transaction using it. This field is not required, provided that either the credit card fields or the ref_purchase field is set.

ref_purchase

Instead of providing the buyer’s credit card information or a pay_method_nonce to create the purchase, you can pass the invoice_id you receive via the IPN post as the ref_purchase. This will cause the system to use the payment profile already stored in Paykickstart and associated to that original purchase to create the new purchase. This field is not required, provided that either the credit card fields or the pay_method_nonce field is set.

test_mode

Create this purchase using Paykickstart’s native “test mode” ability. This field is not required.

price

Override the product’s price amount for this purchase. If this field is not set, the price from the product’s settings is used.

split_selected

Override to charge the product as a “split pay”. This field is not required unless you are setting total_installments and price_per_installment.

total_installments

The number of split pay installments to be set. This field is only required when split_selected is set

price_per_installment

The price per split pay installment. This field is required when split_pay_selected is set, and must also be LESS that the product’s main price.

is_recurring

Enable a subscription-based product purchase. This field is not required unless you are setting up the purchase to be a subscription (see fields below)

recurring_freq

The number of recurring_freq_type E.g. recurring_frequency of 2 and a recurring_freq_type of months, means the subscription will charge every 2 months. This field is required when is_recurring is set.

recurring_freq_type

The recurring period for the recurring payment. Valid values are:

  • day
  • month
  • year

This field is required when is_recurring is set.


cycles

The number of payments for your subscription. Set as null for an infinite subscription. This field is required when is_recurring is set.

has_trial

Enable trial period for the purchase. Please note this is only currently possible for recurring subscription products. This field is not required unless you which to create a trial period for your product.

trial_amount

The initial amount to charge for the trial. Amount may be set to 0 for free trial. This field is not required unless you have has_trial enabled.

trial_days

The number of days before the subscription transactions begin. For example, if you want to set a 14 day free trial, make sure the product is set to recurring in its settings or via the API, then set trial_amount to 0 and trial_days to 14. This field is not required unless you have has_trial enabled.

trial_days

The number of days before the subscription transactions begin. For example, if you want to set a 14 day free trial, make sure the product is set to recurring in its settings or via the API, then set trial_amount to 0 and trial_days to 14. This field is not required unless you have has_trial enabled.

capture_billing_address

Option to toggle whether or not you want to capture the buyer’s billing address. This field is not required.

    • billing_address_1
    • billing_address_2
    • billing_city
    • billing_state
    • billing_zip
    • billing_country
Billing address detail fields. All fields are required when capture_billing_address is set

capture_shipping_address

Option to toggle whether or not you want to capture the buyer’s shipping address. This field is not required.

      • shipping_address_1
      • shipping_address_2
      • shipping_city
      • shipping_state
      • shipping_zip
      • shipping_country
Shipping address detail fields. All fields are required when capture_shipping_address is set
Yes No

2.1.2.3.4.2.Update Credit Card #

Example Request

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

//Create request data string
$data = http_build_query([
    "invoice_id" => "PK-PMNW0V5NLP",
    "auth_token" => "52YjafEGX4P8",
    "updateCcPw" => "9E780SDF",
    "ccNum" => "4222222222222",
    "ExpireMonth" => 5,
    "ExpireYear" => 2017,
    "csv" => "879"
]);

//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

{
  "success": 1,
  "message": "Card updated"
}

This POST request updates a customer’s credit card information for a specified purchase. Please note that we DO NOT store your customer’s credit card details in Paykickstart. All information supplied via this API call is directly relayed to the linked payment gateway for the relevant purchase, and the payment method is updated directly on that payment gateway.

ARGUMENTS

invoice_id

The unique Paykickstart purchase ID


updateCcPw

The unique security token sent to the customer when his payment was declined, which allows him to update the payment details for the declined transaction. Usually this token is attached to the credit card update page URL indicated in the customer’s failed transaction notification email as a GET variable.


ccNum

The customer’s new credit card number

ExpireMonth

The customer’s new credit card expiry month

ExpireYear

The customer’s new credit card expiry year

csv

The customer’s new credit card security code





auth_token

The Paykickstart vendor’s API Key

Yes No

2.1.2.3.4.3.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
    }
  ]
}

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.
Yes No

2.1.2.3.4.4.Get Transaction #

Example Request

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

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

//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": 11320,
  "pk_id": "PK-TZ1WKO79ER",
  "purchase_id": 6363,
  "buyer_ip": "93.189.43.18",
  "amount": 12.1,
  "base_currency_conversion_id": 1791,
  "processor": "authnet",
  "processor_data": "{\"transaction\":{\"responseCode \":\"1\",\"rawResponseCode\":null,\"authCode\":\"3VPHMX\",\"avsResultCode\":\"Y\",\"cvvResultCode\":\"P\",\"cavvResultCode\":\"2\",\"transactionId\":\"60020781439\",\"refTransID\":\"\",\"transHash\":\"ECA6CC5198FE40EBC6DE60401351D365\",\"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_1490537286\",\"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-26 14:03:08",
  "created_at": "2017-03-26 14:08:06",
  "updated_at": "2017-03-26 14:08:07",
  "tax_transaction_id": null,
  "tax_amount": null,
  "tax_percent": null
}

Returns the transaction details.

ARGUMENTS

auth_token

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


id

The transaction’s id. This field is required.
Yes No