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.