Skip to main content

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)

ParameterTypeDescription
clientReferenceCodestringReference code defined by the customer
referenceCodestringNetahsilat transaction reference
transactionIdstringTransaction ID in the database
NonIntegratedbooleanTransferred or not transferred status
StartDatestring($date-time)Payment start date
EndDatestring($date-time)Payment end date
userCodestringCode of the user who performed the transaction
vendorErpCodestringERP 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:

    {  
"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
}
]
}

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