Loading...
To return a loan sale, program the POS to send a POST request to the relevant endpoint.
| Scenario | Merchant uses the POS to: |
|---|---|
| Customer wants to return an item and they used a loan to pay for the item. | Return the cost of the item to TUA. |
The endpoint you use depends on whether you identify the loan sale using the loansale_id or the reference_id.
Using a loansale_id
| Environment | HTTP Method | URL |
|---|---|---|
| Test | POST | https://api.pit.paygateway.com/transactions/loansales/{loansale_id}/loanreturns |
| Production | POST | https://api.paygateway.com/transactions/loansales/{loansale_id}/loanreturns |
Using a reference_id
| Object | Parameter | Type | Size | Required? | Description |
|---|---|---|---|---|---|
| payment | amount | String | 1-9 | Required | Total amount of the loan return. |
| invoice_number | String | 1-25 | Optional | Alphanumeric invoice number or order number that the merchant creates and assigns to the loan sale. |
| 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 | 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. |
| N/A | status | String | Indicates the status of the loan return. The value is one of the following:• approved• declined• voided |
| N/A | processor_response | String | Response from the processor that describes the status of the loan return. |
| payment | amount | String | Total amount of the loan return. |
| 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. | |
| 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. |
| 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. |
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. |