Appearance
Find (International)
Get the current status of an international transaction.
Endpoint: POST /transaction/find
Request
bash
curl -X POST https://api.paynet.one/transaction/find \
-H "Content-Type: application/json" \
-d '{
"auth": {
"id": 123,
"key": 1706360400002,
"hash": "c3d4e5f6a1b2..."
},
"external_transaction_id": "intl-12345"
}'php
<?php
$url = 'https://api.paynet.one/transaction/find';
$key = time() * 1000;
$data = [
'auth' => [
'id' => 123,
'key' => $key,
'hash' => md5(123 . $token . $key)
],
'external_transaction_id' => 'intl-12345'
];
$response = apiRequest('/transaction/find', $data);
if ($response['transaction']['state'] == 1) {
echo "Success! " . $response['transaction']['amount'] . " " .
$response['transaction']['amount_currency'] . " sent.\n";
}javascript
const key = Date.now();
const hash = md5(`123${token}${key}`);
const response = await fetch('https://api.paynet.one/transaction/find', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
auth: { id: 123, key, hash },
external_transaction_id: 'intl-12345'
})
});
const data = await response.json();
if (data.transaction.state === 1) {
console.log(`Success! ${data.transaction.amount} ${data.transaction.amount_currency} sent.`);
}python
import requests
import hashlib
import time
url = 'https://api.paynet.one/transaction/find'
key = int(time.time() * 1000)
hash_value = hashlib.md5(f"123{token}{key}".encode()).hexdigest()
response = requests.post(url, json={
'auth': {
'id': 123,
'key': key,
'hash': hash_value
},
'external_transaction_id': 'intl-12345'
})
data = response.json()
if data['transaction']['state'] == 1:
print(f"Success! {data['transaction']['amount']} {data['transaction']['amount_currency']} sent.")Response
json
{
"transaction": {
"id": "abc-123-def-456",
"external_transaction_id": "intl-12345",
"state": 1,
"time": "2024-01-27 12:00:05",
"service": {
"id": "intl",
"name": "Int-l Top-up"
},
"account": "+923001234567",
"amount": 500,
"amount_currency": "PKR",
"price": 24.75,
"price_currency": "AED"
},
"receipt": {
"header": "Ufone Pakistan",
"subheader": "Mobile Top-up",
"info": "Merchant: PAYNET",
"instruction": "",
"footer": "Customer Service: 800 1234"
}
}Transaction States
| State | Final | Description |
|---|---|---|
-1 | No | Reserved |
0 | No | Pending |
1 | Yes | Success |
2 | Yes | Failed |
3 | Yes | Cancelled |
4 | Yes | Replaced |
6 | No | Paused |
Polling Strategy
International transactions may take longer to complete.
- Use longer polling intervals (start at 30s, increase to 60s)
- Log all responses for support troubleshooting