curl --request GET \
--url https://{your-subdomain}.neetocal.com/api/external/v1/packages/{package_id}/purchases/{purchase_id} \
--header 'X-Api-Key: <x-api-key>'const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://{your-subdomain}.neetocal.com/api/external/v1/packages/{package_id}/purchases/{purchase_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetocal.com/api/external/v1/packages/{package_id}/purchases/{purchase_id}"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"purchase": {
"id": "1b217cc5-69b5-4fb1-a13c-c22f9c14e7f9",
"name": "John Doe",
"email": "john@example.com",
"purchase_code": "PUR-123456",
"duration_remaining": 3600,
"status": "confirmed",
"notes": "Customer requested priority support",
"package_id": "aff17ff8-1bf8-4e77-a3c5-2f86104f9a20",
"duration": 7200,
"created_at": "2023-12-01T10:00:00Z",
"updated_at": "2023-12-01T10:30:00Z",
"payment": {
"amount": "120.0",
"currency": "inr",
"status": "successful",
"payment_at": "2023-12-01T10:30:00Z"
}
}
}Get package purchase
Get a purchase for a package, including payment details.
curl --request GET \
--url https://{your-subdomain}.neetocal.com/api/external/v1/packages/{package_id}/purchases/{purchase_id} \
--header 'X-Api-Key: <x-api-key>'const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://{your-subdomain}.neetocal.com/api/external/v1/packages/{package_id}/purchases/{purchase_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetocal.com/api/external/v1/packages/{package_id}/purchases/{purchase_id}"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"purchase": {
"id": "1b217cc5-69b5-4fb1-a13c-c22f9c14e7f9",
"name": "John Doe",
"email": "john@example.com",
"purchase_code": "PUR-123456",
"duration_remaining": 3600,
"status": "confirmed",
"notes": "Customer requested priority support",
"package_id": "aff17ff8-1bf8-4e77-a3c5-2f86104f9a20",
"duration": 7200,
"created_at": "2023-12-01T10:00:00Z",
"updated_at": "2023-12-01T10:30:00Z",
"payment": {
"amount": "120.0",
"currency": "inr",
"status": "successful",
"payment_at": "2023-12-01T10:30:00Z"
}
}
}{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Path Parameters
Id of the package. You can get package_id by listing all packages using our List packages API. Here you will see id for each package.
Id of the purchase to retrieve. You can get purchase_id by listing purchases for a package using our List package purchases API. Here you will see id for each purchase.
Response
OK - Request succeeded
Detailed purchase information including payment details.
Hide child attributes
Hide child attributes
Unique identifier for the purchase.
"1b217cc5-69b5-4fb1-a13c-c22f9c14e7f9"
Name of the person who made the purchase.
"John Doe"
Email address of the person who made the purchase.
"john@example.com"
Unique code associated with the purchase.
"PUR-123456"
Remaining duration in seconds for the purchased package.
3600
Current status of the purchase.
"confirmed"
Additional notes or comments about the purchase.
"Customer requested priority support"
ID of the package that was purchased.
"aff17ff8-1bf8-4e77-a3c5-2f86104f9a20"
Total duration in seconds of the purchased package.
7200
Timestamp when the purchase was created.
"2023-12-01T10:00:00Z"
Timestamp when the purchase was last updated.
"2023-12-01T10:30:00Z"
Payment information associated with the purchase.
Hide child attributes
Hide child attributes
The payment amount as a string to preserve decimal precision.
"120.0"
The currency code for the payment amount (e.g., "inr", "usd").
"inr"
Current status of the payment.
"successful"
Timestamp when the payment was processed.
"2023-12-01T10:30:00Z"