Get a list of transactions for an account.


Parameter



Description



Required


idTransaction ID
YES


Example


curl https://api.transmitsms.com/get-transaction.json \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d transaction_id=356253

JSON Response



XML Response



{

    id: 2423,

   description: "Message Send",

   amount: -0.173,

   balance_standing: 4.114,

   created: "2010-01-21 02:25:54",

   message_id: 28391,

   message_status: "Sent",

   message_cost: 0.173,

   message_revenue: 0.081

}



<?xmlversion="1.0"encoding="UTF-8"?>

<response>

  <id>2423</id>

  <description>Message Send</description>

  <amount>-0.173</amount>

  <balance_standing>4.114</balance_standing>

  <created>2010-01-21 02:25:54</created>

  <message_id>28391</message_id>

  <message_status>Sent</message_status>

  <message_cost>0.173</message_cost>

  <message_revenue>0.081</message_revenue>

</response>



PHP Example


<?php

 include'../../APIClient2.php';

 $api=new transmitsmsAPI("API_KEY",'API_SECRET');

 

 $result=$api->getTransaction(58238);

 

 if($result->error->code=='SUCCESS')

 {

     echo"{$result->description} at {$result->created} - {$result->amount}<br>";

 }

 else

 {

     echo"Error: {$result->error->description}";

 }