> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.payroc.com/llms.txt.
> For full documentation content, see https://docs.payroc.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.payroc.com/_mcp/server.

# Retrieve payment

GET https://api.payroc.com/v1/bank-transfer-payments/{paymentId}

Use this method to retrieve information about a bank transfer payment.  

To retrieve a payment, you need its paymentId. Our gateway returned the paymentId in the response of the [Create Payment](https://docs.payroc.com/api/schema/bank-transfer-payments/payments/create) method.  

Note: If you don’t have the paymentId, use our [List Payments](https://docs.payroc.com/api/schema/bank-transfer-payments/payments/list) method to search for the payment.  

Our gateway returns the following information about the payment:  

-	Order details, including the transaction amount and when it was processed.  
-	Bank account details, including the customer’s name and account number.  
-	Customer’s details, including the customer’s phone number.  
-	Transaction details, including any refunds or re-presentments.  

If the merchant saved the customer’s bank account details, our gateway returns a secureTokenID, which you can use to perform follow-on actions.


Reference: https://docs.payroc.com/api/schema/bank-transfer-payments/payments/retrieve

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Payroc API
  version: 1.0.0
paths:
  /bank-transfer-payments/{paymentId}:
    get:
      operationId: retrieve
      summary: Retrieve payment
      description: "Use this method to retrieve information about a bank transfer payment.  \n\nTo retrieve a payment, you need its paymentId. Our gateway returned the paymentId in the response of the [Create Payment](https://docs.payroc.com/api/schema/bank-transfer-payments/payments/create) method.  \n\nNote: If you don’t have the paymentId, use our [List Payments](https://docs.payroc.com/api/schema/bank-transfer-payments/payments/list) method to search for the payment.  \n\nOur gateway returns the following information about the payment:  \n\n-\tOrder details, including the transaction amount and when it was processed.  \n-\tBank account details, including the customer’s name and account number.  \n-\tCustomer’s details, including the customer’s phone number.  \n-\tTransaction details, including any refunds or re-presentments.  \n\nIf the merchant saved the customer’s bank account details, our gateway returns a secureTokenID, which you can use to perform follow-on actions.\n"
      tags:
        - >-
          subpackage_bankTransferPayments.subpackage_bankTransferPayments/payments
      parameters:
        - name: paymentId
          in: path
          description: Unique identifier that our gateway assigned to the payment.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful request. Returns the specific payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bankTransferPayment'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: Identity could not be verified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Do not have permissions to perform this action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/406'
        '500':
          description: An error has occured
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
servers:
  - url: https://api.payroc.com/v1
    description: Production
  - url: https://api.uat.payroc.com/v1
    description: UAT
components:
  schemas:
    '400':
      type: object
      properties:
        type:
          type: string
          description: URI reference identifying the problem type
        title:
          type: string
          description: Short description of the issue.
        status:
          type: integer
          description: Http status code
        detail:
          type: string
          description: Explanation of the problem
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorsItems'
      required:
        - type
        - title
        - status
        - detail
      title: '400'
    '401':
      type: object
      properties:
        type:
          type: string
          description: URI reference identifying the problem type
        title:
          type: string
          description: Short description of the issue.
        status:
          type: integer
          description: Http status code
        detail:
          type: string
          description: Explanation of the problem
      required:
        - type
        - title
        - status
        - detail
      title: '401'
    '403':
      type: object
      properties:
        type:
          type: string
          description: URI reference identifying the problem type
        title:
          type: string
          description: Short description of the issue.
        status:
          type: integer
          description: Http status code
        detail:
          type: string
          description: Explanation of the problem
        instance:
          type: string
          description: Resource path the action was attempted on
        resource:
          type: string
          description: Resource the action was attempted on
      required:
        - type
        - title
        - status
        - detail
      title: '403'
    '404':
      type: object
      properties:
        type:
          type: string
          description: URI reference identifying the problem type
        title:
          type: string
          description: Short description of the issue.
        status:
          type: integer
          description: Http status code
        detail:
          type: string
          description: Explanation of the problem
        resource:
          type: string
          description: Resource that was not found
      required:
        - type
        - title
        - status
        - detail
      title: '404'
    '406':
      type: object
      properties:
        type:
          type: string
          description: URI reference identifying the problem type
        title:
          type: string
          description: Short description of the issue.
        status:
          type: integer
          description: Http status code
        detail:
          type: string
          description: Explanation of the problem
      required:
        - type
        - title
        - status
        - detail
      title: '406'
    '500':
      type: object
      properties:
        type:
          type: string
          description: URI reference identifying the problem type
        title:
          type: string
          description: Short description of the issue.
        status:
          type: integer
          description: Http status code
        detail:
          type: string
          description: Explanation of the problem
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorsItems'
      required:
        - type
        - title
        - status
        - detail
      title: '500'
    currency:
      type: string
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BOV
        - BRL
        - BSD
        - BTN
        - BWP
        - BYR
        - BZD
        - CAD
        - CDF
        - CHE
        - CHF
        - CHW
        - CLF
        - CLP
        - CNY
        - COP
        - COU
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - IRR
        - ISK
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LTL
        - LVL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRO
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MXV
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLL
        - SOS
        - SRD
        - SSP
        - STD
        - STN
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - USN
        - USS
        - UYI
        - UYU
        - UZS
        - VEF
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
        - ZWL
      description: >-
        Currency of the transaction. The value for the currency follows the [ISO
        4217](https://www.iso.org/iso-4217-currency-codes.html) standard.
      title: currency
    retrievedTax:
      type: object
      properties:
        name:
          type: string
          description: Name of the tax.
        rate:
          type: number
          format: double
          description: Tax percentage for the transaction.
        amount:
          type: integer
          format: int64
          description: >-
            Amount of tax that was applied to the transaction. The value is in
            the currency's lowest denomination, for example, cents.
      required:
        - name
        - rate
      title: retrievedTax
    TipType:
      type: string
      enum:
        - percentage
        - fixedAmount
      description: >
        Indicates if the tip is a fixed amount or a percentage.  

        **Note:** Our gateway applies the percentage tip to the total amount of
        the transaction after tax.
      title: TipType
    TipMode:
      type: string
      enum:
        - prompted
        - adjusted
      description: >
        Indicates how the tip was added to the transaction.

        - `prompted` – The customer was prompted to add a tip during payment.

        - `adjusted` – The customer added a tip on the receipt for the merchant
        to adjust post-transaction.
      title: TipMode
    tip:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/TipType'
          description: >
            Indicates if the tip is a fixed amount or a percentage.  

            **Note:** Our gateway applies the percentage tip to the total amount
            of the transaction after tax.
        mode:
          $ref: '#/components/schemas/TipMode'
          description: >
            Indicates how the tip was added to the transaction.

            - `prompted` – The customer was prompted to add a tip during
            payment.

            - `adjusted` – The customer added a tip on the receipt for the
            merchant to adjust post-transaction.
        amount:
          type: integer
          format: int64
          description: >
            If the value for type is `fixedAmount`, this value is the tip amount
            in the currency's lowest denomination, for example,
            cents.            
        percentage:
          type: number
          format: double
          description: >-
            If the value for type is `percentage`, this value is the tip as a
            percentage.
      required:
        - type
      description: Object that contains information about the tip.
      title: tip
    bankTransferBreakdown:
      type: object
      properties:
        taxes:
          type: array
          items:
            $ref: '#/components/schemas/retrievedTax'
          description: Array of tax objects.
        subtotal:
          type: integer
          format: int64
          description: >-
            Total amount of the transaction before tax and tip. The value is in
            the currency's lowest denomination, for example, cents.
        tip:
          $ref: '#/components/schemas/tip'
          description: Object that contains tip information for the transaction.
      required:
        - subtotal
      description: Object that contains information about the transaction.
      title: bankTransferBreakdown
    bankTransferPaymentOrder:
      type: object
      properties:
        orderId:
          type: string
          description: A unique identifier assigned by the merchant.
        dateTime:
          type: string
          format: date-time
          description: >-
            The processing date and time of the transaction represented as per
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
        description:
          type: string
          description: A brief description of the transaction.
        amount:
          type: integer
          format: int64
          description: >-
            The total amount in the currency's lowest denomination. For example,
            cents.
        currency:
          $ref: '#/components/schemas/currency'
        breakdown:
          $ref: '#/components/schemas/bankTransferBreakdown'
      required:
        - orderId
        - amount
        - currency
      description: Object that contains information about the transaction.
      title: bankTransferPaymentOrder
    BankTransferCustomerNotificationLanguage:
      type: string
      enum:
        - en
        - fr
      description: >-
        Customer's preferred notification language. This code follows the [ISO
        639-1](https://www.iso.org/iso-639-language-code) standard.
      title: BankTransferCustomerNotificationLanguage
    contactMethod:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - email
              description: 'Discriminator value: email'
            value:
              type: string
              description: Email address.
          required:
            - type
            - value
          description: email variant
        - type: object
          properties:
            type:
              type: string
              enum:
                - phone
              description: 'Discriminator value: phone'
            value:
              type: string
              description: Phone number.
          required:
            - type
            - value
          description: phone variant
        - type: object
          properties:
            type:
              type: string
              enum:
                - mobile
              description: 'Discriminator value: mobile'
            value:
              type: string
              description: Mobile number.
          required:
            - type
            - value
          description: mobile variant
        - type: object
          properties:
            type:
              type: string
              enum:
                - fax
              description: 'Discriminator value: fax'
            value:
              type: string
              description: Fax number.
          required:
            - type
            - value
          description: fax variant
      discriminator:
        propertyName: type
      title: contactMethod
    bankTransferCustomer:
      type: object
      properties:
        notificationLanguage:
          $ref: '#/components/schemas/BankTransferCustomerNotificationLanguage'
          description: >-
            Customer's preferred notification language. This code follows the
            [ISO 639-1](https://www.iso.org/iso-639-language-code) standard.
        contactMethods:
          type: array
          items:
            $ref: '#/components/schemas/contactMethod'
          description: "Array of polymorphic objects, which contain contact information.  \n\nThe value of the type parameter determines which variant you should use:  \n-\t`email` - Email address \n-\t`phone` - Phone number\n-\t`mobile` - Mobile number\n-\t`fax` - Fax number\n"
      description: Object that contains information about the customer.
      title: bankTransferCustomer
    BankTransferRefundBankAccountDiscriminatorMappingAchSecCode:
      type: string
      enum:
        - web
        - tel
        - ccd
        - ppd
      description: |
        Indicates the type of authorization for the transaction.  

        **Note:** The field is mandatory for ACH secure token.  

        - `web` – Online transaction.  
        - `tel` – Telephone transaction.  
        - `ccd` – Corporate credit card or debit card transaction.  
        - `ppd` – Pre-arranged transaction.
      title: BankTransferRefundBankAccountDiscriminatorMappingAchSecCode
    SecureTokenSummaryStatus:
      type: string
      enum:
        - notValidated
        - cvvValidated
        - validationFailed
        - issueNumberValidated
        - cardNumberValidated
        - bankAccountValidated
      description: >
        Status of the customer's bank account. The processor performs a security
        check on the customer's bank account and returns the status of the
        account.  

        **Note:** Depending on the merchant's account settings, this feature may
        be unavailable.
      title: SecureTokenSummaryStatus
    link:
      type: object
      properties:
        rel:
          type: string
          description: >-
            Indicates the relationship between the current resource and the
            target resource.
        method:
          type: string
          description: HTTP method that you need to use with the target resource.
        href:
          type: string
          description: URL of the target resource.
      required:
        - rel
        - method
        - href
      description: Object that contains HATEOAS links for the resource.
      title: link
    secureTokenSummary:
      type: object
      properties:
        secureTokenId:
          type: string
          description: Unique identifier that the merchant assigned to the secure token.
        customerName:
          type: string
          description: Customer's name.
        token:
          type: string
          description: >
            Token that the merchant can use in future transactions to represent
            the customer's payment details. The token:  

            - Begins with the six-digit identification number **296753**.  

            - Contains up to 12 digits.  

            - Contains a single check digit that we calculate using the Luhn
            algorithm.  
        status:
          $ref: '#/components/schemas/SecureTokenSummaryStatus'
          description: >
            Status of the customer's bank account. The processor performs a
            security check on the customer's bank account and returns the status
            of the account.  

            **Note:** Depending on the merchant's account settings, this feature
            may be unavailable.
        link:
          $ref: '#/components/schemas/link'
      required:
        - secureTokenId
        - customerName
        - token
        - status
      description: Object that contains information about the secure token.
      title: secureTokenSummary
    BankTransferPaymentBankAccount:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - ach
              description: 'Discriminator value: ach'
            secCode:
              $ref: >-
                #/components/schemas/BankTransferRefundBankAccountDiscriminatorMappingAchSecCode
              description: |
                Indicates the type of authorization for the transaction.  

                **Note:** The field is mandatory for ACH secure token.  

                - `web` – Online transaction.  
                - `tel` – Telephone transaction.  
                - `ccd` – Corporate credit card or debit card transaction.  
                - `ppd` – Pre-arranged transaction.
            nameOnAccount:
              type: string
              description: Customer's name.
            accountNumber:
              type: string
              description: >-
                Customer's bank account number. We mask all digits except the
                last four digits.
            routingNumber:
              type: string
              description: >
                Routing number of the customer’s account.


                **Note:** In responses, our gateway shows only the last four
                digits of the account's routing number, for example, *****4162. 
            secureToken:
              $ref: '#/components/schemas/secureTokenSummary'
          required:
            - type
            - nameOnAccount
            - accountNumber
            - routingNumber
          description: Object that contains the customer's account details.
        - type: object
          properties:
            type:
              type: string
              enum:
                - pad
              description: 'Discriminator value: pad'
            nameOnAccount:
              type: string
              description: Customer's name.
            accountNumber:
              type: string
              description: >-
                Customer's bank account number. We mask all digits except the
                last four digits.
            transitNumber:
              type: string
              description: Five-digit code that represents the customer's banking branch.
            institutionNumber:
              type: string
              description: Three-digit code that represents the customer's bank.
            secureToken:
              $ref: '#/components/schemas/secureTokenSummary'
          required:
            - type
            - nameOnAccount
            - accountNumber
            - transitNumber
            - institutionNumber
          description: Object that contains the customer's account details.
      discriminator:
        propertyName: type
      description: "Polymorphic object that contains bank account information.\n\nThe value of the type field determines which variant you should use:\n-\t`ach` - Automated Clearing House (ACH) details\n-\t`pad` - Pre-authorized debit (PAD) details\n"
      title: BankTransferPaymentBankAccount
    RefundSummaryStatus:
      type: string
      enum:
        - ready
        - pending
        - declined
        - complete
        - referral
        - pickup
        - reversal
        - returned
        - admin
        - expired
        - accepted
      description: Current status of the refund.
      title: RefundSummaryStatus
    RefundSummaryResponseCode:
      type: string
      enum:
        - A
        - D
        - E
        - P
        - R
        - C
      description: >
        Response from the processor.  

        - `A` - The processor approved the transaction.  

        - `D` - The processor declined the transaction.  

        - `E` - The processor received the transaction but will process the
        transaction later.  

        - `P` - The processor authorized a portion of the original amount of the
        transaction.  

        - `R` - The issuer declined the transaction and indicated that the
        customer should contact their bank.  

        - `C` - The issuer declined the transaction and indicated that the
        merchant should keep the card as it was reported lost or stolen.
      title: RefundSummaryResponseCode
    refundSummary:
      type: object
      properties:
        refundId:
          type: string
          description: Unique identifier of the refund.
        dateTime:
          type: string
          format: date-time
          description: Date and time that the refund was processed.
        currency:
          $ref: '#/components/schemas/currency'
        amount:
          type: integer
          format: int64
          description: >-
            Amount of the refund. This value is in the currency’s lowest
            denomination, for example, cents.
        status:
          $ref: '#/components/schemas/RefundSummaryStatus'
          description: Current status of the refund.
        responseCode:
          $ref: '#/components/schemas/RefundSummaryResponseCode'
          description: >
            Response from the processor.  

            - `A` - The processor approved the transaction.  

            - `D` - The processor declined the transaction.  

            - `E` - The processor received the transaction but will process the
            transaction later.  

            - `P` - The processor authorized a portion of the original amount of
            the transaction.  

            - `R` - The issuer declined the transaction and indicated that the
            customer should contact their bank.  

            - `C` - The issuer declined the transaction and indicated that the
            merchant should keep the card as it was reported lost or stolen.
        responseMessage:
          type: string
          description: Description of the response from the processor.
        link:
          $ref: '#/components/schemas/link'
      required:
        - refundId
        - dateTime
        - currency
        - amount
        - status
        - responseCode
        - responseMessage
      description: Object that contains information about a refund.
      title: refundSummary
    bankTransferReturnSummary:
      type: object
      properties:
        paymentId:
          type: string
          description: Unique identifier that our gateway assigned to the payment.
        date:
          type: string
          format: date
          description: The date that the check was returned.
        returnCode:
          type: string
          description: The NACHA return code.
        returnReason:
          type: string
          description: The reason why the check was returned.
        represented:
          type: boolean
          description: Indicates whether the return has been re-presented.
        link:
          $ref: '#/components/schemas/link'
      required:
        - paymentId
        - date
        - returnCode
        - returnReason
        - represented
      description: Object that contains information about a return.
      title: bankTransferReturnSummary
    PaymentSummaryStatus:
      type: string
      enum:
        - ready
        - pending
        - declined
        - complete
        - referral
        - pickup
        - reversal
        - returned
        - admin
        - expired
        - accepted
      description: Current status of the payment.
      title: PaymentSummaryStatus
    PaymentSummaryResponseCode:
      type: string
      enum:
        - A
        - D
        - E
        - P
        - R
        - C
      description: >
        Response from the processor.  

        - `A` - The processor approved the transaction.  

        - `D` - The processor declined the transaction.  

        - `E` - The processor received the transaction but will process the
        transaction later.  

        - `P` - The processor authorized a portion of the original amount of the
        transaction.  

        - `R` - The issuer declined the transaction and indicated that the
        customer should contact their bank.  

        - `C` - The issuer declined the transaction and indicated that the
        merchant should keep the card as it was reported lost or stolen.
      title: PaymentSummaryResponseCode
    paymentSummary:
      type: object
      properties:
        paymentId:
          type: string
          description: Unique identifier of the payment.
        dateTime:
          type: string
          format: date-time
          description: Date and time that the payment was processed.
        currency:
          $ref: '#/components/schemas/currency'
        amount:
          type: integer
          format: int64
          description: >-
            Amount of the payment. This value is in the currency’s lowest
            denomination, for example, cents.
        status:
          $ref: '#/components/schemas/PaymentSummaryStatus'
          description: Current status of the payment.
        responseCode:
          $ref: '#/components/schemas/PaymentSummaryResponseCode'
          description: >
            Response from the processor.  

            - `A` - The processor approved the transaction.  

            - `D` - The processor declined the transaction.  

            - `E` - The processor received the transaction but will process the
            transaction later.  

            - `P` - The processor authorized a portion of the original amount of
            the transaction.  

            - `R` - The issuer declined the transaction and indicated that the
            customer should contact their bank.  

            - `C` - The issuer declined the transaction and indicated that the
            merchant should keep the card as it was reported lost or stolen.
        responseMessage:
          type: string
          description: Response description from the processor.
        link:
          $ref: '#/components/schemas/link'
      required:
        - paymentId
        - dateTime
        - currency
        - amount
        - status
        - responseCode
      description: Object that contains information about a payment.
      title: paymentSummary
    BankTransferResultType:
      type: string
      enum:
        - payment
        - refund
        - unreferencedRefund
        - accountVerification
      description: Type of transaction.
      title: BankTransferResultType
    BankTransferResultStatus:
      type: string
      enum:
        - ready
        - pending
        - declined
        - complete
        - admin
        - reversal
        - returned
      description: Status of the transaction.
      title: BankTransferResultStatus
    bankTransferResult:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/BankTransferResultType'
          description: Type of transaction.
        status:
          $ref: '#/components/schemas/BankTransferResultStatus'
          description: Status of the transaction.
        authorizedAmount:
          type: integer
          format: int64
          description: |
            Amount of the transaction.  
            **Note:** The amount is negative for a refund.
        currency:
          $ref: '#/components/schemas/currency'
        responseCode:
          type: string
          description: |
            Response from the processor.  
            - `A` - The processor approved the transaction.  
            - `D` - The processor declined the transaction.  
        responseMessage:
          type: string
          description: Description of the response from the processor.
        processorResponseCode:
          type: string
          description: Original response code that the processor sent.
      required:
        - type
        - status
        - responseCode
      description: Object that contains information about the transaction.
      title: bankTransferResult
    customField:
      type: object
      properties:
        name:
          type: string
          description: Name of the custom field.
        value:
          type: string
          description: Value for the custom field.
      required:
        - name
        - value
      title: customField
    bankTransferPayment:
      type: object
      properties:
        paymentId:
          type: string
          description: Unique identifier that we assigned to the payment.
        processingTerminalId:
          type: string
          description: Unique identifier that we assigned to the terminal.
        order:
          $ref: '#/components/schemas/bankTransferPaymentOrder'
        customer:
          $ref: '#/components/schemas/bankTransferCustomer'
        bankAccount:
          $ref: '#/components/schemas/BankTransferPaymentBankAccount'
          description: "Polymorphic object that contains bank account information.\n\nThe value of the type field determines which variant you should use:\n-\t`ach` - Automated Clearing House (ACH) details\n-\t`pad` - Pre-authorized debit (PAD) details\n"
        refunds:
          type: array
          items:
            $ref: '#/components/schemas/refundSummary'
          description: List of refunds issued against the payment.
        returns:
          type: array
          items:
            $ref: '#/components/schemas/bankTransferReturnSummary'
          description: List of returns issued against the payment.
        representment:
          $ref: '#/components/schemas/paymentSummary'
          description: List of re-presented payments linked to the return.
        transactionResult:
          $ref: '#/components/schemas/bankTransferResult'
        customFields:
          type: array
          items:
            $ref: '#/components/schemas/customField'
          description: |
            Array of customField objects.
      required:
        - paymentId
        - processingTerminalId
        - order
        - bankAccount
        - transactionResult
      description: >-
        Object that contains information about the sale and the customer's bank
        details.
      title: bankTransferPayment
    ErrorsItems:
      type: object
      properties:
        message:
          type: string
          description: Error message
      title: ErrorsItems
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

```

## Examples

### Store Token Bank Transfer Payment



**Response**

```json
{
  "paymentId": "M2MJOG6O2Y",
  "processingTerminalId": "1234001",
  "order": {
    "amount": 4999,
    "currency": "USD",
    "orderId": "OrderRef6543",
    "breakdown": {
      "subtotal": 4347,
      "taxes": [
        {
          "name": "Sales Tax",
          "rate": 5,
          "amount": 217
        }
      ],
      "tip": {
        "type": "percentage",
        "amount": 435,
        "percentage": 10
      }
    },
    "dateTime": "2024-07-02T15:30:00Z",
    "description": "Large Pepperoni Pizza"
  },
  "bankAccount": {
    "type": "ach",
    "accountNumber": "****3159",
    "nameOnAccount": "Sarah Hazel Hopper",
    "routingNumber": "053200983",
    "secCode": "web",
    "secureToken": {
      "secureTokenId": "MREF_abc1de23-f4a5-6789-bcd0-12e345678901fa",
      "customerName": "Sarah Hazel Hopper",
      "token": "296753123456",
      "status": "notValidated",
      "link": {
        "rel": "self",
        "method": "GET",
        "href": "https://api.payroc.com/v1/processing-terminals/1234001/secure-tokens/MREF_abc1de23-f4a5-6789-bcd0-12e345678901fa"
      }
    }
  },
  "transactionResult": {
    "type": "payment",
    "status": "ready",
    "responseCode": "A",
    "authorizedAmount": 4999,
    "currency": "USD",
    "responseMessage": "NoError",
    "processorResponseCode": "0"
  },
  "customer": {
    "notificationLanguage": "en",
    "contactMethods": [
      {
        "type": "email",
        "value": "sarah.hopper@example.com"
      }
    ]
  },
  "customFields": [
    {
      "name": "yourCustomField",
      "value": "abc123"
    }
  ]
}
```

**SDK Code**

```typescript Store Token Bank Transfer Payment
import { PayrocClient } from "payroc";

async function main() {
    const client = new PayrocClient();
    await client.bankTransferPayments.payments.retrieve("M2MJOG6O2Y");
}
main();

```

```python Store Token Bank Transfer Payment
from payroc import Payroc

client = Payroc()

client.bank_transfer_payments.payments.retrieve(
    payment_id="M2MJOG6O2Y",
)

```

```java Store Token Bank Transfer Payment
package com.example.usage;

import com.payroc.api.PayrocApiClient;
import com.payroc.api.resources.banktransferpayments.payments.requests.RetrievePaymentsRequest;

public class Example {
    public static void main(String[] args) {
        PayrocApiClient client = PayrocApiClient
            .builder()
            .build();

        client.bankTransferPayments().payments().retrieve(
            "M2MJOG6O2Y",
            RetrievePaymentsRequest
                .builder()
                .build()
        );
    }
}
```

```ruby Store Token Bank Transfer Payment
require "payroc"

client = Payroc::Client.new

client.bank_transfer_payments.payments.retrieve(payment_id: "M2MJOG6O2Y")

```

```csharp Store Token Bank Transfer Payment
using Payroc;
using System.Threading.Tasks;
using Payroc.BankTransferPayments.Payments;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayrocClient();

        await client.BankTransferPayments.Payments.RetrieveAsync(
            new RetrievePaymentsRequest {
                PaymentId = "M2MJOG6O2Y"
            }
        );
    }

}

```

```go Store Token Bank Transfer Payment
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.payroc.com/v1/bank-transfer-payments/M2MJOG6O2Y"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```php Store Token Bank Transfer Payment
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.payroc.com/v1/bank-transfer-payments/M2MJOG6O2Y', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```swift Store Token Bank Transfer Payment
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.payroc.com/v1/bank-transfer-payments/M2MJOG6O2Y")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Declined Payment



**Response**

```json
{
  "paymentId": "E29U8OU8Q4",
  "processingTerminalId": "1234001",
  "order": {
    "amount": 4999,
    "currency": "USD",
    "orderId": "OrderRef7654",
    "breakdown": {
      "subtotal": 4347,
      "taxes": [
        {
          "name": "Sales Tax",
          "rate": 5,
          "amount": 217
        }
      ],
      "tip": {
        "type": "percentage",
        "amount": 435,
        "percentage": 10
      }
    },
    "dateTime": "2024-07-02T15:30:00Z",
    "description": "Large Pepperoni Pizza"
  },
  "bankAccount": {
    "type": "ach",
    "accountNumber": "****1591",
    "nameOnAccount": "Sarah Hazel Hopper",
    "routingNumber": "053200983",
    "secCode": "web"
  },
  "transactionResult": {
    "type": "payment",
    "status": "declined",
    "responseCode": "D",
    "authorizedAmount": 4999,
    "currency": "USD",
    "responseMessage": "Payment Declined",
    "processorResponseCode": "R11"
  },
  "customer": {
    "notificationLanguage": "en",
    "contactMethods": [
      {
        "type": "email",
        "value": "sarah.hopper@example.com"
      }
    ]
  },
  "returns": [
    {
      "paymentId": "M2MJOG6O2Y",
      "date": "2024-07-02",
      "returnCode": "R11",
      "returnReason": "Customer advises not authorized",
      "represented": false,
      "link": {
        "rel": "self",
        "method": "GET",
        "href": "https://api.payroc.com/v1/bank-transfer-payments/M2MJOG6O2Y"
      }
    }
  ]
}
```

**SDK Code**

```typescript Declined Payment
import { PayrocClient } from "payroc";

async function main() {
    const client = new PayrocClient();
    await client.bankTransferPayments.payments.retrieve("M2MJOG6O2Y");
}
main();

```

```python Declined Payment
from payroc import Payroc

client = Payroc()

client.bank_transfer_payments.payments.retrieve(
    payment_id="M2MJOG6O2Y",
)

```

```java Declined Payment
package com.example.usage;

import com.payroc.api.PayrocApiClient;
import com.payroc.api.resources.banktransferpayments.payments.requests.RetrievePaymentsRequest;

public class Example {
    public static void main(String[] args) {
        PayrocApiClient client = PayrocApiClient
            .builder()
            .build();

        client.bankTransferPayments().payments().retrieve(
            "M2MJOG6O2Y",
            RetrievePaymentsRequest
                .builder()
                .build()
        );
    }
}
```

```ruby Declined Payment
require "payroc"

client = Payroc::Client.new

client.bank_transfer_payments.payments.retrieve(payment_id: "M2MJOG6O2Y")

```

```csharp Declined Payment
using Payroc;
using System.Threading.Tasks;
using Payroc.BankTransferPayments.Payments;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayrocClient();

        await client.BankTransferPayments.Payments.RetrieveAsync(
            new RetrievePaymentsRequest {
                PaymentId = "M2MJOG6O2Y"
            }
        );
    }

}

```

```go Declined Payment
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.payroc.com/v1/bank-transfer-payments/M2MJOG6O2Y"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```php Declined Payment
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.payroc.com/v1/bank-transfer-payments/M2MJOG6O2Y', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```swift Declined Payment
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.payroc.com/v1/bank-transfer-payments/M2MJOG6O2Y")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```