> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get onramp transactions by ID

> When you initialize the Onramp Widget you can pass a `partnerUserRef` parameter to associate the transaction created during that session with the ID. You can then use that ID in this API to retrieve that transaction and any others that share the ID. The value of the `partnerUserRef` param can be any string you want e.g. the ID of the user in your app, a unique transaction ID, or a combination of values. Anything that is meaningful to your app.



## OpenAPI

````yaml GET /v1/buy/user/{partnerUserRef}/transactions
openapi: 3.0.3
info:
  title: OnrampUnauthService API
  version: v1
servers:
  - url: https://api.developer.coinbase.com/onramp
security:
  - bearerAuth: []
tags:
  - name: Onramp/Offramp
paths:
  /v1/buy/user/{partnerUserRef}/transactions:
    get:
      tags:
        - Onramp/Offramp
      summary: Get onramp transactions by ID
      description: >-
        When you initialize the Onramp Widget you can pass a `partnerUserRef`
        parameter to associate the transaction created during that session with
        the ID. You can then use that ID in this API to retrieve that
        transaction and any others that share the ID. The value of the
        `partnerUserRef` param can be any string you want e.g. the ID of the
        user in your app, a unique transaction ID, or a combination of values.
        Anything that is meaningful to your app.
      operationId: OnrampOfframp_GetTransactionsForPartnerUser
      parameters:
        - description: The `partnerUserRef` parameter used to initialize the Onramp Widget
          in: path
          name: partnerUserRef
          required: true
          schema:
            type: string
        - description: Page key returned by this API for pagination
          in: query
          name: pageKey
          schema:
            type: string
        - description: The number of transactions to return, between 1 and 1000
          in: query
          name: pageSize
          schema:
            format: int64
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTransactionsForPartnerUserResponse'
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
          description: Default error response
components:
  schemas:
    GetTransactionsForPartnerUserResponse:
      description: Get Onramp Transactions by ID API response
      properties:
        next_page_key:
          description: >-
            The page key to be passed into this API to get the next page of
            results
          type: string
        total_count:
          description: The number of transactions returned by this call
          format: int64
          type: integer
        transactions:
          description: List of transactions matching the `partnerUserRef`
          items:
            $ref: '#/components/schemas/OnrampTransaction'
          type: array
      type: object
    Status:
      description: >-
        The `Status` type defines a logical error model that is suitable for
        different programming environments, including REST APIs and RPC APIs. It
        is used by [gRPC](https://github.com/grpc). Each `Status` message
        contains three pieces of data: error code, error message, and error
        details. You can find out more about this error model and how to work
        with it in the [API Design
        Guide](https://cloud.google.com/apis/design/errors).
      properties:
        code:
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
          format: int32
          type: integer
        details:
          description: >-
            A list of messages that carry the error details.  There is a common
            set of message types for APIs to use.
          items:
            $ref: '#/components/schemas/GoogleProtobufAny'
          type: array
        message:
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
          type: string
      type: object
    OnrampTransaction:
      description: OnrampTransaction
      properties:
        coinbase_fee:
          $ref: '#/components/schemas/Amount'
        completed_at:
          description: The completed at timestamp
          format: date-time
          type: string
        contract_address:
          description: The user's contact address
          type: string
        country:
          description: The user's country
          type: string
        created_at:
          description: The created at timestamp
          format: date-time
          type: string
        end_partner_name:
          description: The name of the developer app
          type: string
        exchange_rate:
          $ref: '#/components/schemas/Amount'
        failure_reason:
          description: The reason for the transaction failure (if applicable)
          enum:
            - FAILURE_REASON_BUY_FAILED
            - FAILURE_REASON_SEND_FAILED
          format: enum
          type: string
        network_fee:
          $ref: '#/components/schemas/Amount'
        partner_user_ref:
          description: >-
            The `partnerUserRef` provided when initializing the Onramp session
            that created this transaction
          type: string
        payment_method:
          description: The payment method type used to purchase the crypto
          enum:
            - UNSPECIFIED
            - CARD
            - ACH_BANK_ACCOUNT
            - APPLE_PAY
            - FIAT_WALLET
            - CRYPTO_ACCOUNT
            - GUEST_CHECKOUT_CARD
            - PAYPAL
            - RTP
            - GUEST_CHECKOUT_APPLE_PAY
          format: enum
          type: string
        payment_subtotal:
          $ref: '#/components/schemas/Amount'
        payment_total:
          $ref: '#/components/schemas/Amount'
        payment_total_usd:
          $ref: '#/components/schemas/Amount'
        purchase_amount:
          $ref: '#/components/schemas/Amount'
        purchase_currency:
          description: Purchase currency symbol e.g. `ETH`
          type: string
        purchase_network:
          description: Network purchased crypto will be sent on e.g. `ethereum`
          type: string
        status:
          description: Current status of the transaction
          enum:
            - ONRAMP_TRANSACTION_STATUS_CREATED
            - ONRAMP_TRANSACTION_STATUS_IN_PROGRESS
            - ONRAMP_TRANSACTION_STATUS_SUCCESS
            - ONRAMP_TRANSACTION_STATUS_FAILED
          format: enum
          type: string
        transaction_id:
          description: The unique transaction ID
          type: string
        tx_hash:
          description: The tx hash of the send
          type: string
        type:
          description: The type of Onramp transaction
          enum:
            - ONRAMP_TRANSACTION_TYPE_BUY_AND_SEND
            - ONRAMP_TRANSACTION_TYPE_SEND
          format: enum
          type: string
        user_id:
          description: A has of the internal user ID
          type: string
        user_type:
          description: The type of user
          enum:
            - USER_TYPE_AUTHED
            - USER_TYPE_GUEST
          format: enum
          type: string
        wallet_address:
          description: The address the crypto was sent to
          type: string
      type: object
    GoogleProtobufAny:
      additionalProperties: true
      description: >-
        Contains an arbitrary serialized message along with a @type that
        describes the type of the serialized message.
      properties:
        '@type':
          description: The type of the serialized message.
          type: string
      type: object
    Amount:
      description: A monetary amount represented by a decimal value and currency symbol
      properties:
        currency:
          description: Currency symbol e.g. `USD`, `BTC`
          type: string
        value:
          description: Non-localized amount in decimal notation (e.g. `1.234`)
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: >-
        Enter your JSON Web Token (JWT) here. Refer to the [Generate
        JWT](/api-reference/authentication#2-generate-jwt-server-only) section
        of our Authentication docs for information on how to generate your
        Bearer Token.
      scheme: bearer
      type: http

````