Loading...
To view the details of a credit sale, send a GET request to the relevant endpoint.
| Scenario | Merchant uses the POS to: |
|---|---|
| A merchant wants to view the details of a previous sale. | Search for the previous sale using the creditsale_id or the 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/creditsales/000008639902?generate\_receipt=true.
The endpoint you use depends on whether you identify the original transaction using the creditsale_id or the reference_id.
| Environment | URL |
|---|---|
| Test | https://api.pit.paygateway.com/transactions/creditsales/{creditsale_id} |
| Production | https://api.paygateway.com/transactions/creditsales/{creditsale_id} |
| Object | Field | Type | Description |
|---|---|---|---|
| N/A | creditsale_id | String | Unique identifier that our gateway generated for the sale. Note: This is the creditsale_id that you can include in the endpoint URL for follow-on transactions. |
| N/A | status | String | Indicates the status of the sale. For a list of possible values, see the Transaction status enumeration. |
| N/A | approval_code | String | Approval code for the sale from the processor. |
| N/A | avs_response | String | Response code from an address verification service (AVS) lookup. For a list of possible values, see the AVS response enumeration. |
| N/A | avs_response_description | String | Text that describes the response code that the processor returned in the avs_response field. |
| N/A | cardsecurity_response | String | 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 enumeration. |
| N/A | reference_id | String | Unique identifier that the merchant created for the sale. Note: You can include the 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 sale. We mask all digits except the first six and last four. |
| expiry_month | String | Month that the card expires in MM format. | |
| expiry_year | String | Year that the card expires in YY format. | |
| token | String | Unique reference for the customer's payment details stored in our vault. | |
| type | String | Name of the card brand that issued the credit card. For a list of possible values, see the Card type enumeration. | |
| payment | amount | String | Total dollar amount of the sale. |
| fees | Object | Object that contains details about the fees for the sale. For a list of fields, see the fees object. | |
| gratuity_amount | String | Dollar amount that was tip in the original transaction. | |
fees object
| Field | Type | Size | Description |
|---|---|---|---|
| customer_fee_amount | String | Variable | Dollar amount of the fee that the customer paid. |
| surcharge_amount | Numeric | Variable | For US credit transactions, this is the surcharge amount applied to the amount submitted in the transaction request if surcharge fees have been configured for the merchant in the gateway. It is a dollar amount the merchant charged the cardholder as a surcharge for paying using a credit card. |
purchase_order object
| Field | Type | Description |
|---|---|---|
| po_number | String | Purchase order number for the sale if the customer uses a corporate purchase card. Required for Level 2 transactions. This is an alphanumeric value that the merchant created, for example, 2343445. |
| tax_amount | String | Total tax amount for the sale. |
text object
| Field | Type | Description |
|---|---|---|
| customer_receipt | String | Text for the customer's receipt. Our gateway creates this text using the details of the sale. |
| merchant_receipt | String | Text for the merchant's receipt. Our gateway creates this text using the details of the sale. |
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 |
creditsale_id object
| Field | Type | Description |
|---|---|---|
| href | String | Endpoint URL for the follow-on transaction using the creditsale_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 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 endpoint 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. |
| invoice_number |
| String |
| Invoice number for the sale. |
| type | String | Type of payment for the sale. For a list of possible values, see the Payment type enumeration. |
| purchase_order | Object | Object that includes customer information and tax amounts. For a list of fields, see the purchase_order object. |
| 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 the merchant copy of the receipt. For a list of fields, see the text object. |
| 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 | creditsale_id | Object | Object that includes HATEOAS links for follow-on transactions using the creditsale_id. For a list of fields, see the creditsale_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. |