Loading...
To void a loan return, program the POS to send a PUT request to the relevant endpoint.
| Scenario | Merchant uses the POS to: |
|---|---|
| Customer returns an item to the merchant, and the merchant returns the loan amount to TUA. Then the customer decides that they want to keep the item. | Void the loan return. |
If we have processed the return, we cannot void it. The customer must reapply for the loan.
The endpoint you use depends on whether you identify the loan return using the loanreturn_id or the reference_id.
Using a loanreturn_id
| Environment | HTTP Method | URL |
|---|---|---|
| Test | PUT | https://api.pit.paygateway.com/transactions/loanreturns/{loanreturn_id}/voids |
| Production | PUT | https://api.paygateway.com/transactions/loanreturns/{loanreturn_id}/voids |
Using a reference_id
object.
| Object | Field | Type | Description |
|---|---|---|---|
| N/A | loanreturn_id | String | Unique identifier that our gateway generated for the loan return. Note: This is the loanreturn_id that you can include in the endpoint URL for follow-on transactions. |
| N/A | status | String | Indicates the status of the loan return. The value is voided. |
| N/A | processor_response | String | Response from the processor that describes the status of the loan return. |
| N/A | reference_id | String | Unique identifier that the merchant created for the loan return. Note: This is the reference_id that you can include in the endpoint URL for follow-on transactions. |
| payment | amount | String | Total amount of the loan return that is voided. |
| currency_code | String | ISO currency code for the loan return. For a list of possible values, see the currency code enumeration. | |
| invoice_number | String | Alphanumeric invoice number or order number that the merchant created and assigned to the loan return. | |
| type | String | Type of payment for the loan return.The value is loan. | |
| transaction | country_code | String | Code that represents the country where the loan return originated. For a list of possible values, see the country code enumeration. |
| language | String | Language for the text that is displayed on your payment page and the merchant's receipts. For a list of possible values, see the language enumeration. | |
| links | loanreturn_id | Object | Object that includes HATEOAS links for follow-on transactions using the loanreturn_id. For a list of fields, see the loanreturn_id object. |
loanreturn_id object
| Field | Type | Description |
|---|---|---|
| href | String | Endpoint URL for follow-on transactions using the loanreturn_id. |
| relation | String | Relationship between the endpoint you sent the original request to and the endpoint for the follow-on transaction. The value is one of the following:• return - The transaction uses the returns endpoint.• self - The transaction uses the same type of endpoint as the original request.• void - The transaction uses the void endpoint. |
| method | String | HTTP method for sending the request. The value is one of the following:• GET• PATCH• POST• PUT |
| description | String | Text that describes how to use the endpoint URL our gateway provided in the href field. For example, Use this endpoint to retrieve a previous loan return transaction using a loanreturn_id. |
reference_id object
| Field | Type | Description |
|---|---|---|
| href | String | Endpoint URL for follow-on transactions using the reference_id. |
| relation | String | Relationship between the endpoint you sent the original request to and the endpoint for the follow-on transaction. The value is one of the following:• return - The transaction uses the returns endpoint.• self - The transaction uses the same type of endpoint as the original request.• void - The transaction uses the void endpoint. |
| method | String | HTTP method for sending the request. The value is one of the following:• GET• PATCH• POST• PUT |
| description | String | Text that describes how to use the endpoint URL our gateway provided in the href field. For example, Use this endpoint to retrieve a previous loan return transaction using a reference_id. |
| reference_id | Object | Object that includes HATEOAS links for follow-on transactions using the reference_id. For a list of fields, see the reference_id object. |