Login Customer

Example Request

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

//Create request data string
$data = http_build_query([
    "auth_token" => "3A0GTRFIJHYE",
    "email" => "donald@duck.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

{
  "status": true,
  "secret": "eyJpdiI6ImNkMW1RSTVDYTNwbjU5TjFcL2lmdGx3PT0iLCJ2YWx1ZSI6InVMRVc3VUZNRlcwZzlsME1zSjhyTFE9PSIsIm1hYyI6IjlhOGM1YTQyMDRkMGIxN2ZmNjk2MzkxNTZkMWZjNDljMGIxMTJmMzdkYWUxYzlhYmU3YmQ4ZmRlODdlZjBkODIifQ=="
}

Allows the user to fetch the login token of a customer for a customer portal iframe. This is useful for vendors who want to embed the customer portal into a membership area where the vendor already knows the customer’s email address and doesn’t want to require the customer to have to use the email verification login system on the portal (auto-login).

ARGUMENTS

auth_token

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


buyer_email


The email address of the customer.

USAGE:

Once you’ve received the login token in the API response, you need to modify the iframe source URL and include a new parameter called “secret”. The value of that parameter should be the token you received in the response.