The “Get Transaction by ID” API allows to retrieve information for a specific transaction using its unique identifier. Use this endpoint to fetch details for a single transaction based on the provided transaction ID.
GET https://services.leadconnectorhq.com/payments/transactions/{transactionId}
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación .
Version
string
default: "2021-07-28"
required
Versión de la API.
Path parameters
transactionId
string
default: "61dd0feac077f72010f78804"
required
ID of the transaction that needs to be returned
Query parameters
locationId
string
default: "3SwdhCu3svxI8AKsPJt6"
LocationId is the id of the account.
altId
string
default: "3SwdhCu3svxI8AKsPJt6"
required
AltId is the unique identifier e.g: account id.
altType
string
default: "account"
required
AltType is the type of identifier.
Respuestas
200 - Successful response
_id
string
default: "61dd0feac077f72010f78804"
required
The unique identifier for the transaction.
altType
string
default: "account"
required
AltType is the type of identifier.
altId
string
default: "3SwdhCu3svxI8AKsPJt6"
required
AltId is the unique identifier eg: account id.
contactId
string
default: "XPLSw2SVagl12LMDeTmQ"
Contact id corresponding to the transaction.
Contact details of the transaction.
Currency in which transaction was made.
status
object
default: "succeeded"
Transaction status.
Transaction is in live / test mode.
createdAt
string
default: "2023-11-20T10:23:36.515Z"
required
The creation timestamp of the transaction.
updatedAt
string
default: "2024-01-23T09:57:04.846Z"
required
The last update timestamp of the transaction.
Entity type of transaction (eg: order).
entityId
string
default: "61dd0fe9c077f73e67f78803"
Entity id for the transaction. e.g: order id
Entity source details for the transaction.
chargeId
string
default: "in_1KGcXDCScnf89tZohCsmImwE"
Charge id for transaction.
Charge snapshot of transaction.
invoiceId
string
default: "in_1KGcXDCScnf89tZohCsmImwE"
Invoice id for the transaction.
subscriptionId
string
default: "sub_1KGcXDCScnf89tZoVkoEMCEL"
Subscription id for transaction.
Payment provider details of the transaction.
ipAddress
string
default: "107.178.194.224"
Ip address from where transaction was initiated.
Meta details of the transaction.
Transaction amount refunded.
receiptId
string
default: "6492fbea489bc07892c6defb"
Receipt id for transaction.
Is transaction qbo synced.
Qbo details of the transaction.
traceId
string
default: "d3b16a92-a8ed-4e6b-8467-844750f78ed5"
Trace id of the transaction.
mergedFromContactId
string
default: "XPLSw2SVagl12LMDeTmQ"
ID of the contact that was merged from.
User ID who created the transaction.
{
"_id" : "61dd0feac077f72010f78804" ,
"altType" : "account" ,
"altId" : "3SwdhCu3svxI8AKsPJt6" ,
"contactId" : "XPLSw2SVagl12LMDeTmQ" ,
"contactSnapshot" : "{ last_name: \" Mcclain \" , type: \" lead \" , first_name_lower_case: \" rogan \" , email: \" anish+11@leadwaycrm.com \" , last_name_lower_case: \" mcclain \" , location_id: \" o6241QsiRwUIJHyjuhos \" , company_name: \" Jordan and Cox Trading \" }" ,
"currency" : "USD" ,
"amount" : "100" ,
"status" : "succeeded" ,
"liveMode" : "false" ,
"createdAt" : "2023-11-20T10:23:36.515Z" ,
"updatedAt" : "2024-01-23T09:57:04.846Z" ,
"entityType" : "order" ,
"entityId" : "61dd0fe9c077f73e67f78803" ,
"entitySource" : "{ type: \" funnel \" , id: \" BDBMEghdIUaqMPEsK349 \" , subType: \" two_step_order_form \" , name: \" new funnel \" }" ,
"chargeId" : "in_1KGcXDCScnf89tZohCsmImwE" ,
"chargeSnapshot" : "{ id: \" in_1KGcXDCScnf89tZohCsmImwE \" , object: \" invoice \" , account_country: \" US \" , account_name: \" GHL-Testing \" }" ,
"invoiceId" : "in_1KGcXDCScnf89tZohCsmImwE" ,
"subscriptionId" : "sub_1KGcXDCScnf89tZoVkoEMCEL" ,
"paymentProvider" : "{ type: \" stripe \" , connectedAccount: { _id: \" 612ca676b484b241fef9d962 \" , accountId: \" acct_1Ihw53CScnf89tZo \" } }" ,
"ipAddress" : "107.178.194.224" ,
"meta" : "{ stepId: \" af7c731e-e36f-4152-bd1a-3f69a31d6d6d \" , pageId: \" A8ltotc2jZxurJba4e3Y \" , pageUrl: \" /v2/preview/A8ltotc2jZxurJba4e3Y \" }" ,
"markAsTest" : "false" ,
"isParent" : "false" ,
"amountRefunded" : "10" ,
"receiptId" : "6492fbea489bc07892c6defb" ,
"qboSynced" : "false" ,
"qboResponse" : "{ domain: \" QBO \" , sparse: false, Id: \" 180 \" , SyncToken: \" 0 \" , TotalAmt: 25 }" ,
"traceId" : "d3b16a92-a8ed-4e6b-8467-844750f78ed5" ,
"mergedFromContactId" : "XPLSw2SVagl12LMDeTmQ" ,
"createdBy" : "user123"
}
400 - Transaction not found
422 - Unprocessable Entity
Ejemplo
curl -X GET 'https://services.leadconnectorhq.com/payments/transactions/YOUR_transactionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
const response = await fetch ( 'https://services.leadconnectorhq.com/payments/transactions/YOUR_transactionId' , {
method: 'GET' ,
headers: {
Authorization: `Bearer ${ process . env . LEADWAY_TOKEN } ` ,
Version: '2021-07-28' ,
},
});
const data = await response . json ();
import os, requests
response = requests.request(
'GET' ,
'https://services.leadconnectorhq.com/payments/transactions/YOUR_transactionId' ,
headers = {
'Authorization' : f "Bearer { os.environ[ 'LEADWAY_TOKEN' ] } " ,
'Version' : '2021-07-28' ,
},
)
data = response.json()
<? php
$ch = curl_init ( 'https://services.leadconnectorhq.com/payments/transactions/YOUR_transactionId' );
curl_setopt_array ( $ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_CUSTOMREQUEST => 'GET' ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv ( 'LEADWAY_TOKEN' ),
'Version: 2021-07-28' ,
],
]);
$data = json_decode ( curl_exec ( $ch ), true );