2. Refund (List)
The batch refund service receives your payments sent as a list with a single API call and returns the result to you in a single callback notification.The batch refund service receives your payments se
Refund (List) Service
POST
{{Base Adres}}/api/paywall/payment/bulk/batch/refund
Refund requests must be sent after the day the payments occur. For payments to be reversed on the same day, the cancellation service should be used instead of the refund service.
The parameters that must be sent to the service are as follows:
apikeypublic
string
Yes
The Public Key you obtained from the merchant panel.
apiclientpublic
string
Yes
The Public Client you obtained from the merchant panel.
Refund Details:
Date
DateTime
Yes
The date on which the batch payment you want to refund was made.
MerchantUniqueCode
string
Yes
The tracking number you provided at the time of the batch payment.
The sample JSON and example codes to be sent to the service are as follows:
{
"Payments": [
{
"MerchantUniqueCode": "PWL-010101010101",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010102",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010103",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010104",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010105",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010106",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010107",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010108",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010109",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010110",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010111",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010112",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010113",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010114",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010115",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010116",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010117",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010118",
"Date": "2025-01-01"
},
{
"MerchantUniqueCode": "PWL-010101010119",
"Date": "2025-01-01"
},
],
"CallbackUrl": "https://yourwebsite.com/paywall/callback"
}
Parameters Returned from the Service
ErrorCode
int
Error code. Returns '0' if the operation is successful.
Result
bool
Returns true if the operation is successful, and false if it fails.
Message
string
Contains information or an error message related to the operation.
Body > Result
bool
Indicates whether the operation was successfully received. If true, it means Paywall has successfully received the request and placed it into the queue mechanism. Results will be delivered via callback notifications.
Body > TotalPaymentCount
int
Total transactions
Example JSON Returned from the Service
{
"ErrorCodeType": 1,
"ErrorMessage": null,
"ErrorCode": 0,
"Result": true,
"Message": "Batch refund created and enqueued",
"Body": {
"Result": true,
"PaymentResults": [
{
"MerchantUniqueCode": "4049957f-520e-410b-8f6c-fedc9dac9a76",
"Status": 1,
"Message": "Added to bulk refund process",
"BulkPaymentId": 2684,
"ErrorMessage": null,
"BulkPaymentJobId": 0
},
{
"MerchantUniqueCode": "9d6d1cbf-4828-4654-87a8-9a1e763ad6a3",
"Status": 1,
"Message": "Added to bulk refund process",
"BulkPaymentId": 2684,
"ErrorMessage": null,
"BulkPaymentJobId": 0
},
{
"MerchantUniqueCode": "562a87ac-3320-421d-9920-90c4d30dec44",
"Status": 1,
"Message": "Added to bulk refund process",
"BulkPaymentId": 2684,
"ErrorMessage": null,
"BulkPaymentJobId": 0
}
]
}
}
Last updated