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;

    // Loop thru all POST vars
    foreach($data as $key=>$value)
    {
        // Ignore the encrypted key variable
        if($key == "verification_code") continue;
        //Ignore any empty variables
        if(!$key OR !$value) continue;
        //Add IPN values to validate to a new array
        $paramStrArr[] = (string) $value;
    }

    // Alphabetically sort IPN parameters by their key. This ensures
    // the params are in the same order as when Paykickstart 
    // generated the verification code, in order to prevent 
    // hash key invalidation due to POST parameter order.
    ksort( $paramStrArr, SORT_STRING );
    
    // Implode all the values into a string, delimited by "|"
    $paramStr = implode("|", $paramStrArr);
    
    // Generate the hash usingthe imploded string and secret key
    $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. Each IPN that’s fired is fired based on a specific event, so it’s possible that a single transaction can fire multiple IPNs, particularly in the case of subscriptions. Please note that these IPN events may not be fired in any particular order. The event types are:

  • sales
    IPN is fired when any transaction is successful, even in the case of subscription rebills.
  • refund
    IPN is fired any time a transaction is refunded.
  • subscription-payment
    IPN is fired when any subscription rebill is charged successfully.
  • subscription-created
    IPN is fired when a subscription has been created.
  • subscription-cancelled
    IPN is fired when a subscription has been cancelled.
  • subscription-trial-start
    IPN is fired when a trial period has started
  • subscription-trial-end
    IPN is fired when a trial period has ended
  • subscription-payment-failed
    IPN is fired when a subscription payment fails
  • subscription-updated
    IPN is fired when a subscription is reactivated from inside the ui
  • subscription-changed
    IPN is fired when an existing subscription is upgraded / downgraded

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


old_invoice_id

The original Paykickstart purchase ID of the old subscription (only included in the subscription-changed event)


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.

 


update_billing_url

* Only available in the subscription-payment-failed IPN event. Returns the URL where the customer may update their payment details for the subscription in which their payment failed.

 


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.Affiliate IPN POST #

Example Response

<?php
$_POST = [
    'amount'                            => 9.99,
    'buyer_first_name'                  => 'Ruggero',
    'buyer_last_name'                   => 'Sandri-Boriani',
    'tracking_id'                       => 216,
    'transaction_time'                  => 1469014598,
    'product_name'                      => 'SEO Snapshot - Main',
    'campaign_name'                     => 'SEO Snapshot',
    'affiliate_first_name'              => 'Bob',
    'affiliate_last_name'               => 'Jones',
    'affiliate_email'                   => 'bob@jones.com',
    'affiliate_commission_amount'       => 4.99,
];

PayKickstart’s Affiliate Instant Payment Notification (IPN) is a message service that automatically notifies affiliates of events related to PayKickstart transactions.

amount

The transaction amount

buyer_first_name
buyer_last_name

The transaction’s buyer’s details. These fields may not reflect if the vendor has chosen to disable them.

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_name

The transaction’s product details

campaign_name

The transaction’s campaign details

affiliate_first_name
affiliate_last_name
affiliate_email
affiliate_commission_amount

The transaction’s Paykickstart affiliate’s details and the amount paid to the affiliate for this transaction.

 

 

Yes No

2.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.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.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.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.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.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.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.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.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',
    'cancel_at'  => 1535702710,
    'fire_event' => 1
]);

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


fire_event

Toggle whether or not Paykickstart should fire all the subscription cancellation events. This field is not required and default is 1 (true).


cancel_at

Optional field to set a specific cancellation date (unix timestamp).

Yes No

2.4.Payments #

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

Yes No

2.4.1.New Purchase #

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).

CUSTOMER PAYMENT DATA TOKENISATION

The Paykickstart API supports accepting payment processor tokens in order to effect payment as opposed to raw card data. It is therefore a TWO-PART system. The first part involves creating tokens directly from your checkout page using javascript provided by your payment processor, and the second part involves sending those tokens to the Paykickstart API endpoint.

FIRST PART:

We have created an example page which you can access to view the javascript required for each of your processors in each of your campaigns, as well as a copy-and-paste javascript you can use on your checkout pages to simplify the process.

In order to access this, please login to your Paykickstart vendor account, then go to this URL: https://app.paykickstart.com/test-code-v2/pci. The page which loads will list all your current campaigns and their associated processor integrations:

Click “go” next to the campaign you are integrating with using the API. On the following page, you’ll find tabs at the top for your supported payment types (credit card, SEPA, ACH etc.) and an “all” option. Clicking on any of those tabs will provide you with a sample form and javascript, as well as the done for you, copy-and-paste javascript sample at the top of the page.

The done-for-you PK tokenize javascript accepts the following GET variables:

ccNum

The form field element ID which is responsible for capturing the customer’s credit card number.

ccExpireMonth

The form field element ID which is responsible for capturing the customer’s credit card’s expiry month

ccExpireYear

The form field element ID which is responsible for capturing the customer’s credit card’s expiry year

ccCSV

The form field element ID which is responsible for capturing the customer’s credit card’s CSV number

ccBtn

The form field element ID which is responsible for submitting the form with credit card details

form

The form’s DOM element ID

ccExpireYear

The form field element ID which is responsible for capturing the customer’s credit card’s expiry year

wt_account_holder_name

The form field element ID which is responsible for capturing the customer’s account holder name

sepa_email

The form field element ID which is responsible for capturing the customer’s email address for SEPA verification

iban_number

The form field element ID which is responsible for capturing the customer’s IBAN account number

sepaBtn

The form button ID which is responsible for generating the customer’s SEPA token

route_number

The form field element ID which is responsible for capturing the customer’s ACH account route number

account_number

The form field element ID which is responsible for capturing the customer’s ACH account number

achBtn

The form button ID which is responsible for capturing the customer’s credit card’s expiry year

ccExpireYear

The form field element ID which is responsible for generating the customer’s ACH token

billing_address_1

The form field element ID which is responsible for capturing the customer’s billing address line 1 (used when creating the payment profile / token, if supplied)

billing_address_2

The form field element ID which is responsible for capturing the customer’s billing address line 1 (used when creating the payment profile / token, if supplied)

billing_city

The form field element ID which is responsible for capturing the customer’s billing address city (used when creating the payment profile / token, if supplied)

billing_state

The form field element ID which is responsible for capturing the customer’s billing address state (used when creating the payment profile / token, if supplied)

billing_zip

The form field element ID which is responsible for capturing the customer’s billing address zip code (used when creating the payment profile / token, if supplied)

billing_country

The form field element ID which is responsible for capturing the customer’s billing address country (used when creating the payment profile / token, if supplied)

You may choose to NOT use that done for you PK tokenisation script if your form is a bit more complex, in which case the example javascript provided may be copied to your own form and modified as required:

You can also fill in the form field provided on the page and click “click me” to see an example output of the working javascript:

Using the generated token, you can submit an API call (see below) to process the transaction.

SECOND PART:

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",
    "stripeToken" => "tok_1DrPnbGHbWjVjDgKnht3VpQW",
    "is_recurring" => 1,
    "price" => 12,
    "recurring_freq" => 1,
    "recurring_freq_type" => "day",
    "cycles" => 3,
    "ccNum" => 1985,
    "ccExpireYear" => 2020,
    "ccExpireMonth" => 12
]);

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

In this step, the token generated from the first step is submitted along with your new purchase request data / instructions. Below are the arguments the API call accepts:

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.


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.

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

tos-read

Boolean (accepts 0 or 1 as values). Indicates that the user has accepted your terms of service. Required if Terms of Service option is enabled in the product’s settings.

ccNum

The last 4 digits of the customer’s credit card number.

ccExpireYear

The 4-digit expiry year of the customer’s credit card.

ccExpireMonth

The 2-digit expiry month of the customer’s credit card.

custom_field[‘<FIELDNAME>’]

Pass as many custom fields you like through to the purchase api. Replace <FIELDNAME> with the field name of your choice.  This field is not required.

Below outlines the token fields required in the API call depending on your payment processor:

Stripe Credit Card:

stripeToken

The token generated by Stripe JS on your checkout page when accepting Credit Card data.

Stripe SEPA:

stripeSourceId

The source generated by Stripe JS on your checkout page when accepting bank details.

sepa

The last 4 digits of the IBAN number

wt-type

This should be set to: sepa

Stripe ACH:

stripeSourceId

The source generated by Stripe JS on your checkout page when accepting bank details.

route_number

The customer’s bank’s route number

account_number

The last 4 digits of the customer’s account number number

stripeBAToken

The Stripe bank token ID returned from Stripe JS

wt-type

This should be set to: ach

Braintree Credit Card / PayPal:

pay_method_nonce

The Baintree token created by BraintreeJS when accepting Credit Card / PayPal purchases using Braintree.

Authorize.net:

dataDescriptor

Should be set to:
COMMON.ACCEPT.INAPP.PAYMENT

dataValue

The token ID returned from Authorize.net AcceptJS

Easy Pay Direct:

epdSaleToken

The sale token ID returned from Easy Pay Direct

epdCustomerToken

The customer profile token ID returned from Easy Pay Direct
Yes No

2.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",
    "stripeToken" => "tok_1DrPnbGHbWjVjDgKnht3VpQW",
    "ccNum" => "1985",
    "ExpireMonth" => 5,
    "ExpireYear" => 2022
]);

//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. Paykickstart uses frontend tokenisation technology to protect you and your customers from passing payment information insecurely, and all information supplied via this API call is directly relayed to the linked payment processor where the payment profile is updated.

ARGUMENTS

invoice_id

The unique Paykickstart purchase ID


Payment Processor Tokens*

The payment processor token is required. Please refer to the new purchase documentation on how to generate tokens and which parameters to set.


ccNum

The last 4 digits of 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


auth_token

The Paykickstart vendor’s API Key

Yes No

2.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
    }
  ],
  "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.
Yes No

2.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

2.4.5.Get Transactions (last 100) #

Example Request

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

//Create request data string
$data = http_build_query([
    'auth_token' => '3A0CKDSETE',
    'created_at' => 1529316446
   
]);

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

{  
   "transactions":[  
      {  
         "id":25324,
         "pk_id":"PK-TKE3MQN2WO",
         "purchase_id":10904,
         "buyer_ip":"188.64.175.190",
         "amount":"10.00",
         "coupon_code":null,
         "coupon_type":null,
         "coupon_rate":null,
         "shipping_charge":"0.00",
         "base_currency_conversion_id":61679,
         "processor":"stripe",
         "processor_data":"{\"id\":\"ch_1CudlTGi3a8JpZeBZ0iAnsdO\",\"object\":\"charge\",\"amount\":1000,\"amount_refunded\":0,\"application\":\"ca_6mCGmjSlaUQxHChZL3QrUPfHrKNWTw83\",\"application_fee\":null,\"balance_transaction\":\"txn_1CudlTGi3a8JpZeBkfTXGoIE\",\"captured\":true,\"created\":1533204639,\"currency\":\"usd\",\"customer\":\"cus_DLKQJl1hKZgW0c\",\"description\":\"SEO Snapshot Testing - SEO Snapshot - Main (copied) (copied)\",\"destination\":null,\"dispute\":null,\"failure_code\":null,\"failure_message\":null,\"fraud_details\":{},\"invoice\":null,\"livemode\":false,\"metadata\":{},\"on_behalf_of\":null,\"order\":null,\"outcome\":{\"network_status\":\"approved_by_network\",\"reason\":null,\"risk_level\":\"normal\",\"seller_message\":\"Payment complete.\",\"type\":\"authorized\"},\"paid\":true,\"receipt_email\":null,\"receipt_number\":null,\"refunded\":false,\"refunds\":{\"object\":\"list\",\"data\":{},\"has_more\":false,\"total_count\":0,\"url\":\"\\\/v1\\\/charges\\\/ch_1CudlTGi3a8JpZeBZ0iAnsdO\\\/refunds\"},\"review\":null,\"shipping\":null,\"source\":{\"id\":\"card_1CudlRGi3a8JpZeBU3L5qwoJ\",\"object\":\"card\",\"address_city\":null,\"address_country\":null,\"address_line1\":null,\"address_line1_check\":null,\"address_line2\":null,\"address_state\":null,\"address_zip\":null,\"address_zip_check\":null,\"brand\":\"Visa\",\"country\":\"US\",\"customer\":\"cus_DLKQJl1hKZgW0c\",\"cvc_check\":\"pass\",\"dynamic_last4\":null,\"exp_month\":1,\"exp_year\":2022,\"fingerprint\":\"fiQQPgJup0disG8o\",\"funding\":\"credit\",\"last4\":\"4242\",\"metadata\":{},\"name\":\"424242\",\"tokenization_method\":null},\"source_transfer\":null,\"statement_descriptor\":\"SEO Snapshot Testing\",\"status\":\"succeeded\",\"transfer_group\":null}",
         "refund_processor_data":null,
         "gateway_id":216,
         "paypal_txn_id":null,
         "is_refund":0,
         "is_refund_pending":0,
         "refund_pending_cleared_at":null,
         "refund_pending_check_reserved":0,
         "is_approved":1,
         "is_recovered":0,
         "is_pending":0,
         "pending_cleared_at":null,
         "pending_check_reserved":0,
         "pending_email_sent":0,
         "dispute_status":null,
         "failed_email_sent":0,
         "commission_refunded":0,
         "cc_type":"Visa",
         "cc_month":1,
         "cc_year":2022,
         "cc_last4":4242,
         "m_p_user_id":null,
         "cc_holder_name":"424242",
         "refund_end_date":"2018-09-01 10:09:10",
         "created_at":"2018-08-02 10:10:37",
         "refund_date":null,
         "updated_at":"2018-08-02 10:10:40",
         "tax_transaction_id":null,
         "tax_amount":null,
         "tax_percent":null,
         "buyer_tax_number":null,
         "buyer_tax_name":null,
         "landing_page":null
      },
      {  
         "id":25323,
         "pk_id":"PK-TMWQV9RXL4",
         "purchase_id":10903,
         "buyer_ip":"188.64.175.190",
         "amount":"10.00",
         "coupon_code":null,
         "coupon_type":null,
         "coupon_rate":null,
         "shipping_charge":"0.00",
         "base_currency_conversion_id":61679,
         "processor":"testmode",
         "processor_data":"testmode",
         "refund_processor_data":null,
         "gateway_id":null,
         "paypal_txn_id":null,
         "is_refund":0,
         "is_refund_pending":0,
         "refund_pending_cleared_at":null,
         "refund_pending_check_reserved":0,
         "is_approved":1,
         "is_recovered":0,
         "is_pending":0,
         "pending_cleared_at":null,
         "pending_check_reserved":0,
         "pending_email_sent":0,
         "dispute_status":null,
         "failed_email_sent":0,
         "commission_refunded":0,
         "cc_type":null,
         "cc_month":null,
         "cc_year":null,
         "cc_last4":"000",
         "m_p_user_id":null,
         "cc_holder_name":null,
         "refund_end_date":"2018-09-01 09:09:59",
         "created_at":"2018-08-02 09:59:39",
         "refund_date":null,
         "updated_at":"2018-08-02 09:59:39",
         "tax_transaction_id":null,
         "tax_amount":null,
         "tax_percent":null,
         "buyer_tax_number":null,
         "buyer_tax_name":null,
         "landing_page":null
      },
      [..]
}

Fetches the last 100 transactions (or 100 transactions from the created_at date) for the associated account.

ARGUMENTS

auth_token

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


created_at

The start date from when to fetch the transactions in UNIX timestamp format. This field is optional.
Yes No

2.5.Affiliates #

The following API calls deal with retrieving affiliate data and marketing materials

Yes No

2.5.1.Get All Affiliates #

Example Request

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

//Create request data string
$data = http_build_query([
    "auth_token" => "DLFJKGHW9834",
    "campaign_id" => 123,
]);

//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": 319,
    "parent_id": null,
    "role": 1,
    "first_name": "Matt",
    "last_name": "Callen",
    "username": "supermatt@gmail.com",
    "email": "supermatt@gmail.com",
    "password": "$2y$10$WfGQqIqs.UNjWpIbPptukea7BbsYv21GuJhq4HK90FsC4vFeh82RG",
    "vendor_show_quick_start": 0,
    "affiliate_show_quick_start": 0,
    "is_premium": 1,
    "is_invited_user": 0,
    "basic_purchase_id": null,
    "premium_purchase_id": null,
    "company": "iNet Innovation",
    "skype": "",
    "phone": "",
    "address_1": "550 Congressional Blvd",
    "address_2": "Suite 125",
    "city": "Carmel",
    "state": "Indiana",
    "country": "United States",
    "zip": "46032",
    "tax_form_type": "w9",
    "tax_form": "123423437204_InetInnovation_W9_2015.pdf",
    "pdf_form": null,
    "status": 1,
    "vendor_status": 1,
    "image": "https://s3.amazonaws.com/img.paykickstart.com/vendor_profile_pics/Q5RIvM3g2h4T",
    "image_auto_generated": 0,
    "token": null,
    "subdomain": "j4vrb8vx",
    "auth_token": "CdG16eYJPjiQ",
    "remember_token": "dsdnuymXPdknoRQc9USy7OQpL8eZjSCBLbl6Z1ePfWLGMlw0rUBhnSXLj9Pj",
    "paypal_email": "paypal@inet.com",
    "paypal_secret": "cktHyhhdlQhGXHNq.gJAx0zfWBc",
    "paypal_token": "ZOcrlX46.bhXaA4z.fjjsrZTNLMC2dOE1LJaOMJioamwJ8jwZBDB8A",
    "paypal_note": null,
    "ip_address": "196.215.74.50",
    "refresh_permissions": 1,
    "created_at": "2016-06-20 13:23:10",
    "updated_at": "2016-11-15 02:34:14"
  },
  {
    "id": 1,
    "parent_id": null,
    "role": 1,
    "first_name": "Mark",
    "last_name": "Thompson",
    "username": "mark@paykickstart.com",
    "email": "mark@searchcreatively.com",
    "password": "$2y$10$WfGQqIqs.UNjWpIbPptukea7BbsYv21GuJhq4HK90FsC4vFeh82RG",
    "vendor_show_quick_start": 0,
    "affiliate_show_quick_start": 0,
    "is_premium": 1,
    "is_invited_user": 0,
    "basic_purchase_id": null,
    "premium_purchase_id": null,
    "company": "Pay Kickstart",
    "skype": "",
    "phone": "",
    "address_1": "1234 Hello Dr",
    "address_2": "",
    "city": "Charlotte",
    "state": "North Carolina",
    "country": "United States",
    "zip": "27187",
    "tax_form_type": "w9",
    "tax_form": "1473450237_mark-thompson-w9.pdf",
    "pdf_form": null,
    "status": 1,
    "vendor_status": 1,
    "image": "https://s3.amazonaws.com/img.paykickstart.com/vendor_profile_pics/YiwuGUU4OlhK",
    "image_auto_generated": 0,
    "token": null,
    "subdomain": "app",
    "auth_token": "3A0CjgqBXafhE",
    "remember_token": "MRbY6Kh0ak3MHE6v5uxPQf6XHN5ufZ0jKM1UEPPjhJy7h7lDOnOo3I8mu9bC",
    "paypal_email": "mark@searchcreatively.com",
    "paypal_secret": "8RPIJfLD9VoiOZDSUORiHbn10tQ",
    "paypal_token": "PNEnKsvFhxNXn1XK.fjjsrZEDj8.Kn-QOAafKv4po6UNVPe71lwcMA",
    "paypal_note": null,
    "ip_address": "174.109.159.232",
    "refresh_permissions": 0,
    "created_at": "2015-03-30 07:37:41",
    "updated_at": "2016-11-15 08:38:46"
  },
  {
    "id": 431,
    "parent_id": null,
    "role": 3,
    "first_name": "Jasmin",
    "last_name": "Craft",
    "username": "jcraft@gmail.com",
    "email": "jcraft@gmail.com",
    "password": "$2y$10$Ba6xTd0M01hmMdrMug5n0OrZ.Am4H4aJxTFa1C8yiQqWPpDlaxPIq",
    "vendor_show_quick_start": 1,
    "affiliate_show_quick_start": 0,
    "is_premium": 0,
    "is_invited_user": 0,
    "basic_purchase_id": null,
    "premium_purchase_id": null,
    "company": null,
    "skype": "",
    "phone": "",
    "address_1": null,
    "address_2": null,
    "city": null,
    "state": "Indiana",
    "country": "United States",
    "zip": null,
    "tax_form_type": null,
    "tax_form": null,
    "pdf_form": null,
    "status": 1,
    "vendor_status": 1,
    "image": "https://s3.amazonaws.com/img.paykickstart.com/vendor_profile_pics/5s0USumyKOPL",
    "image_auto_generated": 1,
    "token": null,
    "subdomain": "app",
    "auth_token": "dCD3P7VSRkX2",
    "remember_token": "eLn4lX1aZc7dM3KqNXT7rZeokWHVPC492kH9mrYFkUd7BKa8g8qdDUxg6UXa",
    "paypal_email": null,
    "paypal_secret": null,
    "paypal_token": null,
    "paypal_note": null,
    "ip_address": "104.137.223.89",
    "refresh_permissions": 1,
    "created_at": "2016-08-25 19:29:46",
    "updated_at": "2016-09-08 19:54:01"
  }
]

Returns all the affiliate’s details for a specified campaign.

ARGUMENTS

auth_token

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


campaign_id

The affiliate’s campaign’s id. This field is required.
Yes No

2.5.2.Get Affiliate #

Example Request

<?php

//Set up API path and method
$base_url = "https://app.paykickstart.com/api/";
$route = "affiliate";
$url = $base_url . $route;
$post = false;

//Create request data string
$data = http_build_query([
    'auth_token' => '3A0CKD9XafhE',
    'campaign_id' => 146,
    'affiliate' => 'affiliate@email.com'
]);

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

{
  "affiliate": {
    "id": 1430,
    "parent_id": null,
    "role": 2,
    "first_name": "Paul",
    "last_name": "English",
    "username": "paulenglish@gmail.com",
    "email": "paulenglish@gmail.com",
    "vendor_show_quick_start": 1,
    "affiliate_show_quick_start": 0,
    "is_premium": 1,
    "is_invited_user": 0,
    "basic_purchase_id": 7445,
    "premium_purchase_id": 7446,
    "company": "",
    "skype": "",
    "phone": "",
    "address_1": "",
    "address_2": "",
    "city": "",
    "state": "North Island",
    "country": "New Zealand",
    "zip": "",
    "tax_form_type": null,
    "tax_form": null,
    "pdf_form": null,
    "status": 1,
    "vendor_status": 1,
    "image": "https://s3.amazonaws.com/img.paykickstart.com/vendor_profile_pics/Qoy96K16AH43",
    "image_auto_generated": 0,
    "token": null,
    "subdomain": "yk3xpk3x",
    "auth_token": "8M0VEULQIj2b",
    "paypal_email": "mobilesiteapplications@gmail.com",
    "paypal_secret": "ZXOt3apj3C14RRwOo0G48kQxKDU",
    "paypal_token": "JhazpY6OIlhYEHmd.fjjsraT9kOPc.BdVNyYnIFg7YVN3AJQnFYMyQ",
    "paypal_note": null,
    "ip_address": "219.88.236.189",
    "refresh_permissions": 0,
    "created_at": "2016-10-11 11:24:33",
    "updated_at": "2016-11-23 12:13:03"
  },
  "links": [
    "http://paykstrt.local/2107/1430"
  ]
}

Returns the affiliate’s details and links.

ARGUMENTS

auth_token

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


campaign_id

The affiliate’s campaign’s id. This field is required.

affiliate

The affiliate’s email address or ID. This field is required.
Yes No

2.5.3.Get Promo Material #

Example Request

<?php
//Set up API path and method
$base_url = "https://dev.paykickstart.com/api/";
$route = "promo-material";
$url = $base_url . $route;
$post = false;

//Create request data string
$data = http_build_query([
    "auth_token" => "DLFJKGHW9834",
    "campaign_id" => 123,
]);

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

{
  "banner": [
    {
      "id": 95,
      "product_id": 246,
      "campaign_title": "Banner #1 - 300x250",
      "notes": "Launch Banner",
      "material_type": "banner",
      "banner_url": "https://s3.amazonaws.com/docs.paykickstart.com/banner-images/1473449008_banner-300x250-a.jpg",
      "banner_size": "",
      "email_text": "",
      "created_at": "-0001-11-30 00:00:00",
      "updated_at": "2016-09-21 22:42:58"
    },
    {
      "id": 102,
      "product_id": 246,
      "campaign_title": "Banner #2 - 300x250",
      "notes": "Launch Banner",
      "material_type": "banner",
      "banner_url": "https://s3.amazonaws.com/docs.paykickstart.com/banner-images/1474487017_banner-300x250-b.jpg",
      "banner_size": "",
      "email_text": "",
      "created_at": "-0001-11-30 00:00:00",
      "updated_at": "-0001-11-30 00:00:00"
    },
    {
      "id": 103,
      "product_id": 246,
      "campaign_title": "Banner #3 - 100x72",
      "notes": "Launch Banner",
      "material_type": "banner",
      "banner_url": "https://s3.amazonaws.com/docs.paykickstart.com/banner-images/1474487045_banner-100x72-a.jpg",
      "banner_size": "",
      "email_text": "",
      "created_at": "-0001-11-30 00:00:00",
      "updated_at": "-0001-11-30 00:00:00"
    }
  ],
  "email": [
    {
      "id": 115,
      "product_id": 246,
      "campaign_title": "Pre-Launch Webinar",
      "notes": "Send Jan 11th-12th",
      "material_type": "email",
      "banner_url": "",
      "banner_size": "",
      "email_text": "{\"subject\":\"[Register] 92% of top Clickbank products use this... (trick EXPOSED)\n[Live Event] Simple \"trick\" EXPOSED...3-5x sales page booster!\n[1/13] Top-Selling product FORMULA exposed! (register now)\",\"body\":\"<p>This Tuesday, the 13th at 11:00AM EST there is<br />\na can&#39;t miss, one-time event that is being held by<br />\ntwo marketers who both run 8-figure publishing<br />\ncompanies.</p>\n\n<p>Register for the live event:<br />\n{{$tracking_link}}</p>\n\n<p>During this live training, they are going to be<br />\nrevealing:</p>\n\n<p>- the 1 &quot;trick&quot; that top-selling products on<br />\nClickbank, JV Zoo, and WarriorPlus are using<br />\nto generate thousands of buyers and 6-7 figure<br />\npaydays.</p>\n\n<p>- how to increase sales page conversion rates<br />\nby 3-5x in ONE DAY.</p>\n\n<p>- how to replicate the same type of videos that<br />\nare used by 95% of the top selling vendors on<br />\nClickbank - each that generate thousands per day<br />\nin revenue.</p>\n\n<p>- a live demo at the new EasyVSL software that<br />\nmakes creating high-converting video sales letters<br />\npoint-and-click easy WITHOUT having to hire or pay<br />\nfor professionals.</p>\n\n<p>This will be a one-time only event.</p>\n\n<p>Click here to reserve your FREE spot.<br />\n{{$tracking_link}}</p>\n\n<p>Looking forward to the training event!</p>\n\n<p>To your success,<br />\nNAME</p>\n\"}",
      "created_at": "-0001-11-30 00:00:00",
      "updated_at": "-0001-11-30 00:00:00"
    },
    {
      "id": 117,
      "product_id": 246,
      "campaign_title": "Launch Swipe #2",
      "notes": "Send Jan 13th",
      "material_type": "email",
      "banner_url": "",
      "banner_size": "",
      "email_text": "{\"subject\":\"[NEW] Create better, faster, easier, & automated videos\nEasy video creation...unlike anything you've seen!\nAre your sales videos TANKING...? (here is why)\nWant better results from your sales videos? (then watch this)\",\"body\":\"<p>If you are a lot like me...</p>\n\n<p>...you don&#39;t want to have to pay hundreds or thousands<br />\non a professional to create high-converting videos.</p>\n\n<p>...you don&#39;t want to spend all day messing around with<br />\ncomplicated software.</p>\n\n<p>...you don&#39;t want to waste time and energy creating<br />\nvideos that don&#39;t generate leads and sales.</p>\n\n<p>Well - good news (click here)!</p>\n\n<p>{{$tracking_link}}</p>\n\n<p>Mark Thompson and Matt Callen - two of the best in the<br />\nbiz for creating amazing software for marketers (you will<br />\nactually use) - have created a SIMPLE, yet effective<br />\nsoftware for creating sales videos fast &amp; easy.</p>\n\n<p>...oh yeah - and most importantly, actually CONVERT!</p>\n\n<p>Its called EasyVSL and it JUST went live!<br />\nHere is what EasyVSL can do...</p>\n\n<p>- Creates Easy and Powerful Sales Videos<br />\n- Easy presentation style videos, faster then using<br />\nPowerpoint and way better quality!<br />\n- Point &amp; Click Easy - Learning Curve is in Minutes<br />\n- Over 25+ Professional Slide Themes/Backgrounds<br />\n- Powerpoint-Easy Text &amp; Graphics Editing<br />\n- Over 30+ Fonts<br />\n- Eye-Popping Slide Animation Options<br />\n- Easy 1-Click Audio/Slide Sync<br />\n- Upload-Ready, HD Quality Export in MP4 Format<br />\n- Direct Upload to YouTube Account<br />\n- Manage all VSLs in one Interface<br />\n- Save Hours, Even Days Creating High-Converting VSLs!</p>\n\n<p>The best part is EasyVSL is Adobe Air based, which<br />\nmeans is runs smoothly on both Mac and PC.</p>\n\n<p>Watch a live demo of EasyVSL, plus see all of the features<br />\nabove in action.</p>\n\n<p>{{$tracking_link}}</p>\n\n<p>This is currently available at an extremely low price.<br />\nHowever this price will not be available for long.</p>\n\n<p>For a short time you can get a LIFETIME copy of<br />\nEasyVSL, creating an unlimited number of videos<br />\nat a ONE-TIME investment.</p>\n\n<p>NOW is the time to grab your copy - before the price<br />\nsky-rockets!</p>\n\n<p>{{$tracking_link}}</p>\n\n<p>To your success,<br />\nNAME</p>\n\"}",
      "created_at": "-0001-11-30 00:00:00",
      "updated_at": "-0001-11-30 00:00:00"
    }
  ],
  "contests": [
    {
      "id": 32,
      "product_id": 246,
      "user_id": 137,
      "type": 0,
      "name": "Main Launch Contest (Jan 13-20th)",
      "affiliates_count": 20,
      "show_affiliates_count": 1,
      "start_date": "2016-01-13 08:00:00",
      "end_date": "2016-01-20 08:00:00",
      "notes": "$50,000 Prize Contest",
      "created_at": "2016-09-21 22:54:21",
      "updated_at": "2016-09-21 22:54:21"
    },
    {
      "id": 33,
      "product_id": 246,
      "user_id": 137,
      "type": 0,
      "name": "Weekend Contest (Jan 16-17th)",
      "affiliates_count": 20,
      "show_affiliates_count": 1,
      "start_date": "2016-01-16 08:00:00",
      "end_date": "2016-01-17 08:00:00",
      "notes": "$5,000 Weekend Contest",
      "created_at": "2016-09-21 22:55:30",
      "updated_at": "2016-09-21 22:55:30"
    }
  ]
}

Returns all the marketing material for a specified campaign.

ARGUMENTS

auth_token

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


campaign_id

The affiliate’s campaign’s id. This field is required.
Yes No

2.6.Coupons #

This section describes all the available coupon API calls

Yes No

2.6.1.Create Coupon #

Example Request

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

//Create request data string
$data = http_build_query([
    'auth_token' => '3A0CKDSETE',
    'coupon_name' => 'My Coupon Name',
    'coupon_code' => 'discountcode',
    'coupon_rate' => '25',
    'coupon_type' => 'amount',
    'coupon_is_recurring' => 0,
    'coupon_start_date' => '06/20/2017 11:00 PM',
    'coupon_end_date' => '06/30/2017 11:00 AM',
    'coupon_max_redemption' => null,
    'plan_ids' => [
        2382, 2391
    ],
    'product_id' => 223
]);

//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": true,
    "coupon_id": 27,
    "message": "Coupon was created successfully"
}

Creates a new coupon.

ARGUMENTS

auth_token

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


coupon_name

The display name for your coupon.

coupon_code

The Unique coupon code for your coupon.


coupon_rate

The value of your coupon.


coupon_type

The type of value – accepted arguments are: “amount” and “percentage”


coupon_is_recurring

Determines if the coupon should be applied to first charge, recurring or all (excludes split pay). Accepted arguments are:

  • 0: first charge
  • 1: rebills
  • 2: all

coupon_start_date

The start date of when the coupon is active


coupon_end_date

The end date of when the coupon is active


coupon_max_redemption

The maximum number of times a coupon may be redeemed


plan_ids

An array of plan ids which the coupon should be applied to


coupon_product_id

The campaign id which the coupon should be applied to

Yes No

2.7.Leads #

2.7.1.Confirm Lead #

Example Request

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

//Create request data string
$data = http_build_query([
    "auth_token" => "3A0GTRFIJHYE",
    "lead_id" => "PK-L123456789",
    "lead_campaign_id" => 15
]);

//Execute cURL request
$ch = curl_init();
curl_setopt($ch, CURLOPT_POSTFIELDS, $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": true,
    "message": "Lead is confirmed"
}

Allows the user to confirm an unconfirmed lead.

ARGUMENTS

auth_token

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


lead_id

The lead’s id. This field is required.

lead_campaign_id

The Lead Campaign’s id. This field is required.
Yes No