# Retrieve a pay request

This endpoint is for fetching Pay Requests.

Endpoint: GET /pay-terminal/requests/{payRequestId}
Version: 0.9
Security: JWT

## Header parameters:

  - `Authorization` (string, required)

## Path parameters:

  - `payRequestId` (string, required)

## Response 200 fields (application/json):

  - `id` (string)
    The ID of the Pay Request generated by Tyro.

  - `mid` (string)
    The merchant ID of the terminal as specified by the Tyro Account.

  - `tid` (string)
    The terminal ID of the Tyro Terminal.

  - `origin` (object)
    Contains information from the partner that created the Pay Request.

  - `origin.orderId` (string)
    An identifier that has been generated by the origin. This can be used for reconciliation of orders in the app partner’s system.

  - `origin.transactionId` (string)
    A UUIDv4 provided by the partner to be used for preventing duplicate transactions, for us in reinitialisation of the terminal on an already attempted pending transaction.

  - `origin.name` (string)
    Name or reference for this transaction used by the partner that created the Pay Request.

  - `status` (string)
    The current status of this Pay Request managed by Tyro.
    Enum: "AWAITING_INITIALISATION", "PENDING", "SUCCESS", "FAILED"

  - `transactionProgress` (object)
    Additional information about the status of the transaction.

  - `transactionProgress.id` (string)
    The id of the transaction progress message. This can be used to determine further detail of what occurred during processing such as "COMPLETE", "PENDING", "REJECTED", "DEAD"

  - `transactionProgress.description` (string)
    The free text description of the transaction progress message.

  - `total` (object)
    The total amount (in smallest currency unit)

  - `total.goodsAndServicesAmount` (integer, required)
    This is the goods and services amount in smallest currency unit. e.g 12520 (in cents) is $125.20. It can be used in combination with cashoutAmount. It cannot be used in combination with refundAmount.
    Example: 12520

  - `total.cashoutAmount` (integer, required)
    This is the requested cashout amount in smallest currency unit. e.g 5000 (in cents) is $50.00. It can be used in combination with goodsAndServicesAmount. It cannot be used in combination with refundAmount.
    Example: 5000

  - `total.refundAmount` (integer, required)
    This is the refund amount in smallest currency unit. e.g 12520 (in cents) is $125.20. It cannot be used in combination with goodsAndServicesAmount or cashoutAmount.
    Example: 12520

  - `total.currency` (string, required)
    This is always AUD
    Enum: "AUD"

  - `pendingDecision` (object)
    The pending decision to be displayed on the POS. Values for this may be related to printing a receipt, or asking for a signature.

  - `pendingDecision.decisionId` (string)
    The ID of the pending decision.

  - `pendingDecision.question` (string)
    The question to be displayed on the POS.

  - `pendingDecision.options` (array)

  - `terminalProgress` (object)
    The progress message displayed on the terminal.

  - `terminalProgress.id` (string)
    The id of the terminal progress message. You can use this to filter what messages you would wish to display on the POS, or to customize messages.

  - `terminalProgress.description` (string)
    The free text description of the terminal progress message.

  - `transactionOutcome` (object)
    The outcome of the transaction after it has been processed by the terminal.

  - `transactionOutcome.transactionResult` (string)
    The outcome of the transaction after it has been processed by the terminal. "Approved", "Declined", "Terminated", "Cancelled"

  - `transactionOutcome.approvalCode` (string)
    The response code from the terminal. This is a numeric string that represents the outcome of the transaction.

  - `transactionOutcome.transactionReference` (string)
    The transaction reference number from the terminal. This is a unique identifier for the transaction.

  - `transactionOutcome.authorisationNumber` (string)
    The authorisation number from the acquirer. This is a unique identifier for the transaction.

  - `transactionOutcome.cardType` (string)
    The card type used in the transaction.

  - `transactionOutcome.elidedPan` (string)
    The PAN with all but the last 4 digits replaced with 'X'.

  - `transactionOutcome.retrievalReferenceNumber` (string)
    The retrieval reference number. This is a unique identifier for the transaction.

  - `transactionOutcome.surchargeAmount` (number)
    The surcharge amount in the smallest currency unit.

  - `transactionOutcome.tipAmount` (number)
    The tip amount in the smallest currency unit.

  - `transactionOutcome.totalAmount` (number)
    The total amount including any surcharge or tip in the smallest currency unit.

  - `receipts` (object)
    This object contains printable receipts for the customer and merchant.

  - `receipts.customer` (string)
    This will be a printable receipt for the customer

  - `receipts.merchant` (string)
    This will be a printable receipt for the merchant

  - `receipts.signature` (string)
    This will be a printable receipt for the merchant if signature is required


## Response 404 fields
