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

# Get payment

> Get a payment by ID. If authenticated with a Bearer token and the operator owns this payment, payment operations will also be returned.



## OpenAPI

````yaml api-reference/payment-acceptance/payment-acceptance-api.yaml get /api/v1/payments/{id}
openapi: 3.1.1
info:
  title: Coinbase Commerce API
  description: API for processing payments on the PaymentEscrow smart contract protocol.
  version: v0.0.1
servers:
  - url: https://payments.coinbase.com
security: []
tags:
  - name: Payments
    description: >-
      Endpoints focused on handling payment transactions.


      This includes operations for authorizing funds without immediate capture,
      and capturing previously authorized funds directly via the PaymentEscrow
      smart contract protocol. The endpoints help ensure secure and controlled
      payment processing, including verifying signatures, and updating payment
      statuses.
  - name: Rewards
    description: >-
      Endpoints for managing reward operations.


      These endpoints allow you to independently allocate, distribute, send, and
      deallocate rewards on previously successful payment operations.
  - name: Campaigns
    description: >-
      Endpoints for managing reward campaigns.


      Create and manage campaigns that integrate with the Flywheel smart
      contract to provide reward functionality. Campaigns allow merchants to
      define reward structures with customizable parameters including reward
      percentages and maximum limits.
  - name: coinbase.engine.operator_api.v1.OperatorApiService
paths:
  /api/v1/payments/{id}:
    get:
      tags:
        - Payments
      summary: Get payment
      description: >-
        Get a payment by ID. If authenticated with a Bearer token and the
        operator owns this payment, payment operations will also be returned.
      operationId: OperatorApiService_GetPayment
      parameters:
        - schema:
            type: string
          name: id
          in: path
          required: true
          description: The ID of the payment.
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment:
                    $ref: >-
                      #/components/schemas/coinbase.engine.operator_api.v1.Payment
                  paymentOperations:
                    type: array
                    description: >-
                      List of payment operations associated with the payment.
                      Only returned when authenticated as the operator that owns
                      this payment.
                    title: Payment Operations
                    items:
                      $ref: >-
                        #/components/schemas/coinbase.engine.operator_api.v1.PaymentOperation
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/google.rpc.Status'
      security:
        - Bearer: []
components:
  schemas:
    coinbase.engine.operator_api.v1.Payment:
      type: object
      properties:
        entity:
          type: string
          description: Entity type, e.g., 'payment'.
          title: Entity
          examples:
            - payment
        id:
          type: string
          description: Unique payment ID.
          title: Id
          examples:
            - payment123
        maxAmount:
          type: string
          description: Max payment amount approved by the buyer.
          title: Max Amount
          examples:
            - '100.00'
        token:
          type: string
          description: Token address used.
          title: Token Address
          examples:
            - '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        networkId:
          type: integer
          format: int32
          description: Identifier for the blockchain network.
          title: Network Id
          examples:
            - '8453'
        payer:
          type: string
          description: Payer's EVM address.
          title: Payer
          examples:
            - 0xpayer
        signature:
          type: string
          description: Digital signature of the preapproved amount signed by the buyer.
          title: Signature
          examples:
            - 0xsig
        receiver:
          type: string
          description: Receiver's EVM address.
          title: Receiver
          examples:
            - 0xreceiver
        maxFeeBps:
          type: integer
          format: int32
          description: Max fee in basis points.
          title: Max Fee Bps
          examples:
            - '50'
        minFeeBps:
          type: integer
          format: int32
          description: Min fee in basis points.
          title: Min Fee Bps
          examples:
            - '50'
        feeReceiver:
          type: string
          description: Fee recipient address.
          title: Fee Recipient
          examples:
            - '0xfee789'
        salt:
          type: string
          description: Unique salt to prevent duplicate preapproval authorizations.
          title: Salt
          examples:
            - '2334324235415445346745646'
        paymentInfoHash:
          type: string
          description: Hash of the payment info.
          title: Payment Info Hash
          examples:
            - '0x2334324235415445346745646'
        nonce:
          type: string
          description: Nonce in the Preapproval Authorization.
          title: Nonce in the Preapproval Authorization
          examples:
            - '2334324235415445346745646'
        authorizationExpiry:
          type: string
          format: int64
          description: Expiry time for the authorization.
          title: Authorization expiry
          examples:
            - '1843954582'
        preApprovalExpiry:
          type: string
          format: int64
          description: Expiry time for preapproval
          title: Pre-approval expiry
          examples:
            - '1843954582'
        refundExpiry:
          type: string
          format: int64
          description: Expiry time for refund
          title: Refund expiry
          examples:
            - '1843954582'
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp.
          title: Created At
          examples:
            - '2021-05-03T00:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp.
          title: Updated At
          examples:
            - '2021-05-03T01:00:00.000Z'
        operator:
          type: string
          description: Operator handling the payment.
          title: Operator
          examples:
            - 0xoperator
        contractAddress:
          type: string
          description: Smart contract address of the Commerce PaymentEscrow protocol
          title: Contract Address
          examples:
            - 0xcontract
        authorizedAmount:
          type: string
          description: Authorized payment amount.
          title: Authorized Amount
          examples:
            - '50.00'
        capturedAmount:
          type: string
          description: Captured payment amount.
          title: Captured Amount
          examples:
            - '50.00'
        voidedAmount:
          type: string
          description: Voided payment amount.
          title: Voided Amount
          examples:
            - '0.00'
        refundedAmount:
          type: string
          description: Refunded payment amount.
          title: Refunded Amount
          examples:
            - '0.00'
        chargedAmount:
          type: string
          description: Charged payment amount.
          title: Charged Amount
          examples:
            - '50.00'
        merchantId:
          type: string
          description: Merchant ID.
          title: Merchant Id
          examples:
            - merchant123
      description: >-
        Payment details including identifiers, amounts, and blockchain
        transaction data.
      title: Payment
      required:
        - entity
        - id
        - maxAmount
        - token
        - networkId
        - payer
        - signature
        - receiver
        - maxFeeBps
        - minFeeBps
        - feeReceiver
        - salt
        - paymentInfoHash
        - nonce
        - authorizationExpiry
        - preApprovalExpiry
        - refundExpiry
        - createdAt
        - updatedAt
        - operator
        - contractAddress
        - authorizedAmount
        - capturedAmount
        - voidedAmount
        - refundedAmount
        - chargedAmount
        - merchantId
      examples:
        - entity: payment
          id: payment123
          maxAmount: '100.00'
          token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          networkId: 8453
          payer: 0xpayer
          signature: 0xsig
          receiver: 0xreceiver
          minFeeBps: 50
          maxFeeBps: 50
          feeReceiver: '0xcccccccccccccccccccccccccccccccccccccccc'
          salt: '2334324235415445346745646'
          paymentInfoHash: '2334324235415445346745646'
          nonce: '2334324235415445346745646'
          authorizationExpiry: 1843954582
          preApprovalExpiry: 0
          refundExpiry: 1843954582
          createdAt: '2024-03-20T00:00:00.000Z'
          updatedAt: '2024-03-20T00:00:00.000Z'
          operator: 0xoperator
          contractAddress: 0xcontract
          authorizedAmount: '50.00'
          capturedAmount: '50.00'
          voidedAmount: '0.00'
          refundedAmount: '0.00'
          chargedAmount: '50.00'
    coinbase.engine.operator_api.v1.PaymentOperation:
      type: object
      properties:
        entity:
          type: string
          description: Entity type, e.g., 'payment-operation'.
          title: Entity
          examples:
            - payment-operation
        id:
          type: string
          description: Unique event ID.
          title: Id
          examples:
            - event123
        transactionHash:
          type: string
          description: Blockchain transaction hash.
          title: Transaction Hash
          examples:
            - 0xhash
        params:
          type: object
          additionalProperties:
            type: string
          description: Payment Operation Parameters.
          title: Params
          examples:
            - amount: '10.00'
        status:
          $ref: >-
            #/components/schemas/coinbase.engine.operator_api.v1.PaymentOperationStatus
          description: Payment Operation status.
          title: Status
          examples:
            - PAYMENT_OPERATION_STATUS_SUCCEEDED
        action:
          $ref: >-
            #/components/schemas/coinbase.engine.operator_api.v1.PaymentOperationAction
          description: Type of action (e.g., PAYMENT_OPERATION_ACTION_AUTHORIZE).
          title: Action
          examples:
            - PAYMENT_OPERATION_ACTION_AUTHORIZE
        createdAt:
          type: string
          format: date-time
          description: Event creation timestamp.
          title: Created At
          examples:
            - '2021-05-03T00:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: Event update timestamp.
          title: Updated At
          examples:
            - '2021-05-03T00:30:00.000Z'
        payment:
          $ref: '#/components/schemas/coinbase.engine.operator_api.v1.Payment'
          description: Detailed payment object.
          title: Payment
          examples:
            - id: payment123
        output:
          type: string
          description: Output of the payment operation.
          title: Output
          examples:
            - 0xoutput
        error:
          type: string
          description: Error of the payment operation.
          title: Error
          examples:
            - an unknown error occurred
        errorCode:
          type: string
          description: Error code of the payment operation.
          title: Error Code
          examples:
            - Error
        revertReason:
          type: string
          description: Blockchain revert reason of the payment operation.
          title: Blockchain Revert Reason
          examples:
            - 0xrevert
        blockNumber:
          type: string
          format: int64
          description: Block number of the payment operation.
          title: Block Number
          examples:
            - '123'
        metadata:
          type: object
          description: Additional metadata as a free-form object.
          title: Metadata
          examples:
            - key: value
      description: >-
        Event details related to a payment including transaction hash, status,
        and associated payment information.
      title: PaymentOperation
      required:
        - entity
        - id
        - transactionHash
        - params
        - status
        - action
        - createdAt
        - updatedAt
        - payment
      examples:
        - entity: payment-operation
          id: event123
          transactionHash: 0xhash
          amount: '50.00'
          status: SUCCEEDED
          eventType: AUTHORIZED
          createdAt: '2021-05-03T00:00:00.000Z'
          updatedAt: '2021-05-03T00:30:00.000Z'
          payment:
            id: payment123
    google.rpc.Status:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/google.protobuf.Any'
            type: object
    coinbase.engine.operator_api.v1.PaymentOperationStatus:
      type: string
      enum:
        - PAYMENT_OPERATION_STATUS_SUCCEEDED
        - PAYMENT_OPERATION_STATUS_FAILED
        - PAYMENT_OPERATION_STATUS_PENDING
      description: Status of the payment operation.
      title: PaymentOperationStatus
    coinbase.engine.operator_api.v1.PaymentOperationAction:
      type: string
      enum:
        - PAYMENT_OPERATION_ACTION_AUTHORIZE
        - PAYMENT_OPERATION_ACTION_CAPTURE
        - PAYMENT_OPERATION_ACTION_CHARGE
        - PAYMENT_OPERATION_ACTION_RECLAIM
        - PAYMENT_OPERATION_ACTION_REFUND
        - PAYMENT_OPERATION_ACTION_VOID
      description: Action to be performed on the payment.
      title: PaymentOperationAction
    google.protobuf.Any:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        Authorization header using the Bearer scheme. Learn more about JWT
        tokens in the Coinbase Developer Portal.
      name: Authorization
      in: header

````