payment

Get information about a payment request. (READ access required)

Changed on

Gets the payment status. It needs to be created first with a POST request.

get/payment

Request

  • Base URL: ./../api/v1/ (relative, and the document was published on a file host, not at the API’s origin)
  • URL: ./../api/v1/payment
  • Auth: API key in header token

Query parameters

limitnumber

The number of payments to return

cursorIdstring

Used to paginate through the payments. If this is provided, cursorId is required

network'Preprod' | 'Mainnet' required

The network the payments were made on

filterSmartContractAddressstring nullable

The smart contract address of the payment source. When omitted with no explicit payment source type, payment list/count endpoints default to Web3CardanoV1 for backwards compatibility. Supplying this field queries that exact V1 or V2 source.

filterOnChainState'FundsLocked' | 'FundsOrDatumInvalid' | 'ResultSubmitted' | 'RefundRequested' | 'Disputed' | 'WithdrawAuthorized' | 'RefundAuthorized' | 'Withdrawn' | 'RefundWithdrawn' | 'DisputedWithdrawn'

Filter by on-chain state

filterPaymentSourceType'Web3CardanoV1' | 'Web3CardanoV2'

Filter by payment source type. When omitted with no smart-contract-address filter, payment list/count endpoints default to Web3CardanoV1 for backwards compatibility.

filterNeedsManualActionstring

When true, only returns payments that require manual resolution: the next action is WaitingForManualAction or an error was recorded on it

filterAgentIdentifierstring

Restrict results to one or more agents by exact agent identifier, as a comma-separated list of at most 20. Prefer this over searchQuery when filtering by agent: it is an exact (case-insensitive) match and will not match other fields. Supplying this field does not apply the default Web3CardanoV1 compatibility filter, so agents on a Web3CardanoV2 source are found too. A value naming no agent matches nothing.

searchQuerystring

Free-text search. Matches ID, blockchain identifier (exact), agent identifier, agent name, smart contract wallet address, on-chain state, layer ("L1", "L2" or "hydra"), or amount. A query that looks like a hash (5+ hex characters) additionally matches input hash, result hash, Hydra head ID, and the current or any historical transaction hash. Matching is case-insensitive, and "%" and "_" are matched literally.

includeHistorystring

Whether to include the full transaction and action history of the payments

Response

Payment status

statusstring required

Example response

{
  "status": "Success",
  "data": {
    "Payments": [
      {
        "id": "cuid_v2_auto_generated",
        "blockchainIdentifier": "blockchain_identifier",
        "agentIdentifier": "agent_identifier",
        "agentName": "Example Agent",
        "pricingType": "Fixed",
        "createdAt": "1970-01-20T20:00:36.260Z",
        "updatedAt": "1970-01-20T20:00:36.260Z",
        "submitResultTime": "0",
        "unlockTime": "0",
        "externalDisputeUnlockTime": "0",
        "lastCheckedAt": null,
        "cooldownTime": 0,
        "payByTime": null,
        "cooldownTimeOtherParty": 0,
        "collateralReturnLovelace": null,
        "buyerReturnAddress": null,
        "sellerReturnAddress": null,
        "requestedById": "requester_id",
        "resultHash": "result_hash",
        "onChainState": null,
        "forceLayer": null,
        "inputHash": "input_hash",
        "NextAction": {
          "requestedAction": "AuthorizeRefundRequested",
          "errorType": null,
          "errorNote": null,
          "resultHash": null
        },
        "CurrentTransaction": null,
        "RequestedFunds": [
          {
            "unit": "",
            "amount": "10000000"
          }
        ],
        "PaymentSource": {
          "id": "payment_source_id",
          "network": "Preprod",
          "paymentSourceType": "Web3CardanoV1",
          "smartContractAddress": "address",
          "policyId": "policy_id"
        },
        "WithdrawnForSeller": [],
        "WithdrawnForBuyer": [],
        "BuyerWallet": null,
        "SmartContractWallet": null,
        "metadata": null,
        "totalBuyerCardanoFees": 0,
        "totalSellerCardanoFees": 0,
        "nextActionOrOnChainStateOrResultLastChangedAt": "1970-01-20T20:00:36.260Z",
        "nextActionLastChangedAt": "1970-01-20T20:00:36.260Z",
        "onChainStateOrResultLastChangedAt": "1970-01-20T20:00:36.260Z",
        "TransactionHistory": []
      }
    ]
  }
}

Changes

    • warning

      for the query request parameter searchQuery, the maxLength was set to 500

    • info

      added the new optional query request parameter filterAgentIdentifier

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the required property /// to the response with the status

    • breaking

      removed the required property /// from the response with the status

    • warning

      deleted the query request parameter filterAgentIdentifier

    • warning

      removed the optional property //// from the response with the status

    • warning

      removed the optional property //// from the response with the status

    • warning

      removed the optional property ///// from the response with the status

    • warning

      removed the optional property ///// from the response with the status