Refunds
A refund request begins when you want to return funds to the payer for a previously executed transaction. The refund process can begin provided that your account has sufficient funds to cover the full amount of the refund and the refund fee. These funds will be deducted from the account at the moment the refund request is submitted.
Full refund processing
To process a full refund, send a POST request to the endpoint:
https://api.tpay.com/transactions/{transactionId}/refunds
Replace {transactionId}
with the ID of the transaction you want to refund:
https://api.tpay.com/transactions/ta_jrkNGj5L29pnlbqw/refunds
Check the details in the API Reference documentation: POST /transactions/{transactionId}/refunds
The request body should be empty:
Example
The transaction for which a full refund is processed will change its status to refund
.
Partial refund processing
To process a partial refund, send a POST
request to the endpoint:
https://api.tpay.com/transactions/{transactionId}/refunds
Replace {transactionId}
with the ID of the transaction you want to refund:
https://api.tpay.com/transactions/ta_jrkNGj5L29pnlbqw/refunds
Check the details in the API Reference documentation: POST /transactions/{transactionId}/refunds
In the request, specify the following parameters:
amount | The refund amount (in PLN). |
The basic request body should look like this:
Example:
A transaction for which a partial refund has been processed will not change its status. Even if the sum of the partial refunds reaches 100% of the transaction amount, the transaction status will not be changed to refund
.
Retrieving refunds for a transaction
To retrieve refunds for a transaction, send a GET
request to the endpoint:
https://api.tpay.com/transactions/{transactionId}/refunds
Replace {transactionId}
with the ID of the transaction for which you want to get the list of refunds.
https://api.tpay.com/transactions/ta_jrkNGj5L29pnlbqw/refunds
Check the details in the API Reference documentation: GET /transactions/{transactionId}/refunds
In the request, you can specify the following parameters (queryParam) to filter the refunds:
from | Date and time in the yyyy-mm-dd hh:mm:ss format. |
to | Date and time in the yyyy-mm-dd hh:mm:ss format. |
page | Page number. |
limit | Results per page. |
Example:
After sending the request, you will receive a GET /transactions/{transactionId}/refunds schema in response.
Retrieving the list of refunds
To retrieve the list of recent refunds, send a GET
request to the endpoint:
https://api.tpay.com/refunds
Check the details in the API Reference documentation: GET /refunds
In the request, you can specify the following parameters (queryParam) to filter the refunds:
payerEmail | Payer's email. |
transactionTitle | Transaction title. |
context | Refund type (transactional, card). |
token | Payment token (Possible only when context: card). |
from | Date and time in the yyyy-mm-dd hh:mm:ss format. |
to | Date and time in the yyyy-mm-dd hh:mm:ss format. |
page | Page number. |
limit | Results per page. |
After sending the request, you will receive a GET /refunds schema in response.
Example:
Retrieving information about a single refund
To retrieve information about a single refund, send a GET
request to the endpoint:
https://api.tpay.com/refunds/{refundId}
Replace {refundId}
with the refund ID:
https://api.tpay.com/refunds/ta_jrkNGj5L29pnlbqw
Check the details in the API Reference documentation: GET /refunds/{refundId}
Example:
After sending the request, you will receive a GET /refunds/{refundId} schema in response.
Refund statuses
Status | Description |
---|---|
New | The funds have been ordered for a refund by the Merchant. |
Pending | The refund is pending. |
Cancel | The refund has been canceled. |
Hold | The refund has been held by the Customer Service representative, according to the Merchant's email or phone instructions. |
Done | The refund has been completed and the funds have been transferred to the payer's bank account. |
Processed | The refund has been successfully processed, awaiting bank confirmation |
BLIK_pending | The refund is awaiting processing. |
BLIK_processed | The refund has been successfully processed, and the funds are in the payer's bank account. |
BLIK_incorrect | The refund has been successfully processed, and the funds are in the payer's bank account. |