H2H Provider Integration
Host-to-Host callback endpoints for payment providers integrating with VeltoraPay as a source.
Overview
H2H (Host-to-Host) integration is used when VeltoraPay connects to external payment providers (like KolayHavale, FanatikPay, etc.) as a source. The provider sends callbacks to VeltoraPay when deposit or withdraw transactions are processed.
https://api.veltorapay.com/api/source-callbacks/{sourceSubName}{sourceSubName} is the unique identifier assigned to your source integration.
Provider Types
| Type | ID | Description | Callback Style |
|---|---|---|---|
| VeltoraPay | 1 | VeltoraPay sub-instance (cascading) | JSON with VeltoraPay standard format |
| FanatikPay | 3 | FanatikPay H2H provider | JSON with SHA256 hash |
| KolayHavale | 5 | KolayHavale / FinansPanel | JSON with SHA512 hash |
| Generic | 99 | JSON-config driven (no-code) | Configurable per provider |
VeltoraPay Callback Format
Used when connecting VeltoraPay instances in a cascade topology.
Deposit Callback
POST/api/source-callbacks/{sourceSubName}/deposit
Request Body{
"event": "deposit.status_changed",
"token": "c3d4e5f6-7890-abcd-ef12-345678901234",
"clientToken": "TXN-001",
"status": "matched",
"amount": 1000.00,
"senderName": "Ahmet Yilmaz",
"iban": "TR12 0001 0012 3456 7890 1234 56",
"accountHolder": "VeltoraPay A.S.",
"bank": "Ziraat Bankasi",
"source": "Source-1",
"matchedAt": "2026-03-31T10:05:30Z",
"timestamp": "2026-03-31T10:05:30Z"
}
Status Values
| Status | Action |
|---|---|
| matched | Deposit matched → set to Matched |
| rejected | Deposit rejected → set to Rejected |
| timeout | Deposit timed out → set to Timeout |
Withdraw Callback
POST/api/source-callbacks/{sourceSubName}/withdraw
Request Body{
"event": "withdraw.status_changed",
"token": "a1b2c3d4-5678-...",
"clientToken": "WD-001",
"status": "succeeded",
"externalStatus": "Succeeded",
"amount": 500.00,
"recipientName": "Mehmet Demir",
"recipientIban": "TR76 0006 2000 1234 5678 9012 34",
"recipientBank": "Garanti BBVA",
"source": "Pool",
"timestamp": "2026-03-31T11:02:30Z"
}
Status Values
| Status | Action |
|---|---|
| succeeded | Withdraw completed → set to Succeeded |
| failed | Withdraw failed → set to Failed |
| inprogress | Withdraw being processed → set to InProgress |
| timeout | Withdraw timed out → set to Timeout |
FanatikPay Callback
POST/api/source-callbacks/{sourceSubName}/fanatikpay
Handles both deposit and withdrawal callbacks via the type field.
{
"reference_code": "FP-REF-123456",
"site_transaction_id": "TXN-001",
"site_user_id": "user-12345",
"type": "deposit",
"status": "approved",
"amount": 500.00,
"net_amount": 490.00,
"commission": 10.00,
"hash": "a1b2c3d4e5f6...SHA256_HASH",
"created_at": "2026-03-31T10:00:00Z",
"approved_at": "2026-03-31T10:05:30Z",
"reject_reason": null
}
Fields
| Field | Type | Description |
|---|---|---|
| reference_code | string | FanatikPay's unique reference |
| site_transaction_id | string | Your transaction ID (maps to clientToken) |
| site_user_id | string | Your user ID |
| type | string | deposit or withdrawal |
| status | string | approved or rejected |
| amount | decimal | Transaction amount (may differ from original) |
| net_amount | decimal | Amount after commission |
| commission | decimal | Provider commission |
| hash | string | SHA256 signature for verification |
| reject_reason | string? | Reason for rejection (if rejected) |
Hash Calculation
hash = SHA256(site_transaction_id + api_secret + site_user_id)
// Example:
input = "TXN-001" + "your-api-secret" + "user-12345"
hash = SHA256("TXN-001your-api-secretuser-12345")
= "a1b2c3d4e5f6..."
KolayHavale Callback
POST/api/source-callbacks/{sourceSubName}/kolayhavale
Single endpoint for both deposits and withdrawals. VeltoraPay determines the type by matching the transactionhash against existing records.
{
"transactionhash": "KH-TXN-HASH-123456",
"username": "Ahmet Yilmaz",
"userid": "user-12345",
"status": "1",
"amount": "500.00",
"encryptedhash": "a1b2c3d4e5f6...SHA512_HASH"
}
Fields
| Field | Type | Description |
|---|---|---|
| transactionhash | string | Unique transaction hash (maps to externalToken) |
| username | string | Customer name |
| userid | string | Customer user ID |
| status | string | Transaction status code |
| amount | string | Transaction amount |
| encryptedhash | string | SHA512 signature for verification |
Hash Calculation
The hash formula differs between deposits and withdrawals:
Deposit Hashencryptedhash = SHA512(transactionhash + "_" + username + "_" + userid + "_" + amount + "_" + status)
// Example:
input = "KH-TXN-HASH-123456_Ahmet Yilmaz_user-12345_500.00_1"
hash = SHA512(input)
Withdraw Hash
encryptedhash = SHA512(transactionhash + "_" + username + "_" + userid + "_" + status)
// Note: amount is NOT included in withdraw hash
input = "KH-TXN-HASH-123456_Ahmet Yilmaz_user-12345_1"
hash = SHA512(input)
ExternalToken == transactionhash. If not found, it searches WithdrawRequests. This determines the hash formula used for verification.
Generic Provider
POST/api/source-callbacks/{sourceSubName}/generic
A no-code/low-code callback endpoint driven entirely by the ProviderDefinition.CallbackConfig JSON configuration. This allows integrating new providers without code changes.
- Signature verification method and fields
- Reference code extraction path
- Status mapping (success/failed values)
- Request/response field mapping
Hash Verification Summary
| Provider | Algorithm | Formula |
|---|---|---|
| FanatikPay | SHA256 | SHA256(site_transaction_id + api_secret + site_user_id) |
| KolayHavale Deposit | SHA512 | SHA512(transactionhash_username_userid_amount_status) |
| KolayHavale Withdraw | SHA512 | SHA512(transactionhash_username_userid_status) |
| VeltoraPay | — | IP whitelist + token verification (no hash) |
Status Mapping
Deposit Status Mapping
| Provider Value | VeltoraPay Status |
|---|---|
matched / approved / 1 | Matched |
rejected / cancelled / 0 | Rejected |
timeout / expired | Timeout |
Withdraw Status Mapping
| Provider Value | VeltoraPay Status |
|---|---|
succeeded / approved / completed | Succeeded |
failed / rejected | Failed |
inprogress / processing | InProgress |
timeout / expired | Timeout |
Security
- Hash Verification: All callbacks with hash fields are verified before processing. Invalid hashes are rejected with
403 Forbidden. - IP Whitelisting: Source callbacks can be restricted to specific provider IPs via the source configuration.
- Idempotency: Duplicate callbacks for already-finalized transactions are safely ignored and return
200 OK. - Token Matching: Callbacks are matched against existing transaction records by
externalTokenorclientToken. Unmatched callbacks are logged and rejected. - HTTPS Only: All callback URLs must use HTTPS in production.
200 OK with { "success": true } on successful processing. Any non-200 response from VeltoraPay means the callback was not processed — retry is recommended.