ERP Returned Transactions
Description
Used to query refunded payment records. It displays only refunded transactions.
- URL:
/api/erp/getReversals - Method:
GET - Header: Do not forget the AccessToken!
- Filters: You can use clientReferenceCode, referenceCode, transactionId, NonIntegrated, StartDate, EndDate, userCode, vendorErpCode filters. Pagination is also available.
- Important Note: If the vposTransactionDetails.erpTransactionCode field is populated, it means the transaction has been successfully transferred to the ERP. Additionally, date range filters (startDate, endDate) can also be used.
Query Parameters (Filtering)
| Parameter | Type | Description |
|---|---|---|
| clientReferenceCode | string | Reference code defined by the customer |
| referenceCode | string | Netahsilat transaction reference |
| transactionId | string | Transaction ID in the database |
| NonIntegrated | boolean | Transferred or not transferred status |
| StartDate | string($date-time) | Payment start date |
| EndDate | string($date-time) | Payment end date |
| userCode | string | Code of the user who performed the transaction |
| vendorErpCode | string | ERP code of the POS provider |
Filtering can be performed using one or more of these fields in combination.
Response Structure
The response structure contains all details for each refund or cancellation transaction.
Note: It is the same as the existing NTHAPI ERP GetReversals response format; in addition, the following ERP fields are also available:
- Sample Response
- Sample cURL
{
"data": [
{
"proccessAmount": 52.00,
"proccessNetAmount": 52.00,
"reversalDate": "2025-09-11T14:46:20.3185782",
"reversalDesrcription": "test refund",
"reversalId": "a9b08499-167a-4cb2-9d4a-3258c21eb82c",
"reversalType": 50,
"vPosERPCode": null,
"erpCode": null,
"currencyId": null,
"payment": {
"clientReferenceNumber": null,
"referenceNumber": "NTH15P0000000093",
"tenantId": "2e64d939-d56f-4c78-a76f-84d0d445067b",
"tenantPosId": "a17b5b02-388e-f011-98fc-005056b0d2e5",
"commRate": 0.0000,
"currencyType": "TRY",
"transactionDate": "2025-09-11T14:44:57.8644676",
"transactionDetailId": "a9b08499-167a-4cb2-9d4a-3258c21eb82c",
"installment": 1,
"lastAmount": 0.00,
"lastNetAmount": 0.00,
"id": "66715591-0cb5-4eb7-9342-78c17d52898c",
"vposCommRate": 0.0000,
"bankPaymentDays": null,
"paymentSetErpCode": "Kobi",
"vPosERPCode": "",
"impersonated": true,
"paidTenantId": null,
"rePayPlanCode": null,
"agent": {
"agentId": "1f9c9e65-1bf3-48fc-887a-42c325d21cd2",
"name": "0210 Deneme 0210 Deneme",
"email": "[email protected]",
"agentCode": "NT53240185",
"erpCode": "",
"workplaceCode": null,
"departmentCode": null,
"speCode": null,
"authCode": null,
"projectCode": null,
"salesmanCode": null,
"busTranCode": null,
"branchCode": null,
"businessCode": null,
"isCompany": false,
"isCustomer": true,
"taxNumber": null,
"customerRepresentativeIds": [],
"dynamicFields": []
},
"currencyId": "8e6cc739-83e0-4af5-accf-a55476e758c6",
"paymentAccountTransactions": [],
"paymentGeneral": {
"plusInstallment": 0,
"deferral": 0,
"commApplyType": "Dışında",
"provisionNumber": "NTH15P0000000093",
"paymentSetName": null,
"paymentItemGroupName": null,
"paymentItemName": null,
"paymentItemErpCode": null,
"paymentItemCode": null,
"paymentItemStartDate": null,
"paymentItemEndDate": null,
"paymentItemAmount": null,
"dynamicFields": []
},
"paymentContact": {
"taxNumber": "00000000000",
"fullName": "John Doe",
"description": "test refund",
"phoneNumber": "5000000000",
"email": "[email protected]"
},
"paymentSet": {
"id": "2762130d-d34d-4ddf-b8c0-ca9c49b8c5e5",
"name": "Ödeme Seti Test",
"erpCode": "55555",
"transactionType": "Provizyon",
"commApplyType": "Dışında"
},
"creditCard": {
"cardHolderName": "John Doe",
"cardNumber": "415565******6111",
"cardType": "Visa",
"cardBank": "QNB Finansbank",
"cardClass": "Classic"
},
"erpTransactionCode": null,
"erpTransactionCodeUpdateDate": null,
"errorMessage": null,
"errorCode": null,
"transactionStatusId": 0
},
"erpTransactionCode": null,
"erpTransactionCodeUpdateDate": null
}
]
}
curl --location 'https://prodtest_gw.finrota.com/erp/reversals?page=1&pageSize=10' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJlcnB2MS5hcGkiLCJjYXR2MS5hcGkiLCJ2ZW5kb3J2MS5hcGkiXSwiYWN0b3J0Ijoic2VydmljZSIsInJvbGUiOiJzZXJ2aWNlIiwiVW5pcXVlIjoiMmNjMWFkZDUtYTZmZi00ZjMxLWE0YzYtYzdlMzYwNzdhODNlIiwiVGVuYW50SWQiOiIyZTY0ZDkzOS1kNTZmLTRjNzgtYTc2Zi04NGQwZDQ0NTA2N2IiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL2V4cGlyYXRpb24iOiI2Mzg5NDI5OTk0Mjg2MDU3ODkiLCJuYmYiOjE3NTg1MzAzNDIsImV4cCI6MTc1ODcwMzE0MiwiaWF0IjoxNzU4NTMwMzQyLCJpc3MiOiJzc28uYXBpIiwiYXVkIjoiZWNvenVtLnNzbyJ9.9oo4RgktUmuN6MZ3W4h9jOdZXHlEHC_e0KPOCFy2Jag'
Note
- This service returns only refunded transactions.
- Since the Amount field represents the refund amount, it usually appears as negative.
- When refund information is processed in the ERP, the vposTransactionDetails.erpTransactionCode field is populated.
- "reversalType": 50 means Cancellation
- "reversalType": 60 means Refund