Loading...
To view the details of a credit refund, send a GET request to the relevant endpoint.
| Scenario | Merchant uses the POS to: |
|---|---|
| Merchant wants to view the details of a refund. | Search for the refund using the creditreturn_id or reference_id. |
To generate a receipt, include the generate_receipt parameter in the URL and set the value to true. For example, https://api.paygateway.com/transactions/sales/000008639902?generate\_receipt=true.
The endpoint you use depends on whether you identify the original transaction using the creditreturn_id or the reference_id.
| Environment | URL |
|---|---|
| Test | https://api.pit.paygateway.com/transactions/creditreturns/{creditreturn_id} |
| Production | https://api.paygateway.com/transactions/creditreturns/{creditreturn_id} |
| Object | Field | Type | Description |
|---|---|---|---|
| N/A | creditreturn_id | String | Unique identifier that our gateway generated for the transaction. Note: This is the creditreturn_id that you can include in the endpoint URL for follow-on transactions. |
| N/A | status | String | Indicates the status of the request. For a list of possible values, see the Request status enumeration. |
| N/A | approval_code | String | Approval code for the refund from the processor. |
| N/A | reference_id | String | Unique identifier that the merchant created for the sale. Note: You can include reference_id in the endpoint URL for follow-on transactions. |
| card | masked_card_number | String | Masked card number of the card that the customer used for the transaction. We mask all digits except the first six and the last four. |
| expiry_month | String | Month that the card expires in MM format. | |
| expiry_year | String | Year that the card expires in YY format. | |
| type | String | Name of the card brand that issued the card. For a list of possible values, see the Card type enumeration. | |
| payment | amount | String | Total dollar amount for the transaction. |
| invoice_number | String | Alphanumeric invoice number or order number that the merchant creates and assigns to the transaction. | |
| type | String | Type of payment for the transaction. For a list of possible values, see the Payment type enumeration. | |
| transaction | batch_amount | String | Total dollar amount of the batch. |
| batch_number | String | Unique identifier of the batch. | |
| entry_type | String | Indicates how the user entered the card details. The value is one of the following: • Contact• Contactless• Manual• Swipe | |
| receipt | id | String | Unique alphanumeric value that our gateway assigns to the receipt. |
| text | Object | Object that contains text for the customer copy and merchant copy of the receipt. For a list of fields, see the object. |
text object
| Field | Type | Description |
|---|---|---|
| customer_receipt | String | Text for the customer’s receipt. Our gateway creates this text using the details of the transaction. |
| merchant_receipt | String | Text for the merchant’s receipt. Our gateway creates this text using the details of the transaction. |
attributes object
| Field | Type | Description |
|---|---|---|
| authorization_agreement | String | Text that describes the merchant's authorization agreement, for example, I agree to pay the total amount according to the card issuer agreement. |
| call_issuer | String | Text that displays if the merchant needs to call the issuing bank, for example, CALL ISSUER. |
| copy_label_customer | String | Text that identifies the receipt as the customer's copy. |
| copy_label_merchant | String | Text that identifies the receipt as the merchant's copy. |
| duplicate_label | String | Text that identifies the receipt as a duplicate copy. |
| merchant_address | String | Address of the merchant's store. |
| merchant_footer | String | Text that appears on the footer of the receipt. |
| merchant_header | String | Text that appears on the header of the receipt. |
| merchant_name | String | Name of the merchant's store. |
| merchant_phone | String | Phone number of the merchant's store. |
| merchant_policy | String | Text that describes the merchant's policies, for example, a return policy. |
| verbiage | String | Additional text that the merchant can include on the receipt, for example, Approved - Thank You. |
labeled_attributes object
We return a label field and a value field for each object. For example, for amount, we return the following:
"amount":
{
"label": "Total Amount",
"value": "$99.45 USD"
}
| Object | Description |
|---|---|
| amount | Total dollar amount of the transaction. |
| approval_code | Approval code for the transaction from the processor. |
| authorization_response_code | Response code for an authorization. |
| avs_response_code | Response code that indicates the result of an AVS check. |
| batch_number | Unique identifier of the batch. |
| card_balance | Remaining balance of a prepaid card. |
| card_type | Type of card the customer used for the transaction. |
| cardsecurity_response_code | Indicates if the card security code (CSC) that the customer entered matches the CSC of the card. For a list of possible values, see the Card security response enumerations. |
| clerk_id | Clerk ID that the merchant wants to display on the receipt. This is an alphanumeric value that the merchant assigns to a clerk, for example, Al090-John Doe. |
| entry_legend | Indicates how the payment terminal read the card details. The value is one of the following: • CHIP READ• MAGSTRIPE• MANUAL |
| entry_method | Indicates how the customer or merchant entered the card details. The value is one of the following: • Contact• Contactless• Manual• Swipe |
| gratuity_amount | Dollar amount that was tip in the original transaction. |
| masked_card_number | Masked card number of the card that the customer used for the transaction. We mask all digits except the first six and the last four. |
| merchant_id | Unique identifier for the merchant. |
| original_auth_code | The authorization code of the original sale. |
| payment_type | Type of payment for the sale. For a list of possible values, see the payment type enumeration. |
| number | Number of the receipt. |
| reference_id | Unique identifier that the merchant created for the sale. Note: You can include the reference_id in the endpoint URL for follow-on transactions. |
| subtotal_amount | Dollar amount for the subtotal of the sale. We return either a value or a blank line. |
| total_amount | Total dollar amount of the sale. We return either a value or a blank line. |
| transaction_datetime |
creditreturn_id object
| Field | Type | Description |
|---|---|---|
| href | String | Endpoint URL for the follow-on transaction using the creditreturn_id. |
| relation | String | Relationship between the endpoint you sent the original request to and the resource for the follow-on transaction. The value is one of the following: • return - The transaction uses a returns endpoint.• self - The transaction uses the same type of endpoint as the original request.• void - The transaction uses a voids endpoint. |
| method | String | HTTP method for sending the transaction. The value is one of the following: • GET• PATCH• POST• PUT |
| description | String | Text that describes the follow-on transaction, for example, get a sale transaction using sale id. |
reference_id object
| Field | Type | Description |
|---|---|---|
| href | String | Endpoint URL for the follow-on transaction using the reference_id. |
| relation | String | Relationship between the endpoint you sent the original request to and the resource for the follow-on transaction. The value is one of the following: • return - The transaction uses a returns endpoint.• self - The transaction uses the same type of endpoint as the original request.• void - The transaction uses a voids endpoint. |
| method | String | HTTP method for sending the transaction. The value is one of the following: • GET• PATCH• POST• PUT |
| description | String | Text that describes the follow-on transaction, for example, get a sale transaction using sale id. |
| attributes | Object | Object that contains details of text that the receipt can include. For a list of fields, see the attributes object. |
| labeled_attributes | Object | Object that contains details of the sale. For a list of fields, see the labeled_attributes object. |
| links | creditreturn_id | Object | Object that includes HATEOAS links for follow-on transactions using the creditreturn_id. For a list of fields, see the creditreturn_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. |
Date and time of the transaction that the processor returns in YYYY-MM-DDThh:mm:ssZ format, for example, 2019-12-15T13:00:00Z. |
| transaction_id | Unique ID our gateway assigned to the original transaction. |
| transaction_type | Type of transaction you ran. |
| validation_code | Validation code from the issuing bank. |
| application_cryptogram | Application cryptogram (AC) for an EMV transaction. |
| application_identifier | Application identifier (AID) for an EMV transaction. |
| application_label | Application label for an EMV transaction. |
| application_preferred_name | Name of the application in the cardholder’s local language. |
| application_transaction_counter | Application transaction counter (ATC) for an EMV transaction. |