payment

Completes a payment request. This will collect the funds after the unlock time. (+PAY access required; only the creator or an admin may submit)

Changed on

Submit the hash of their completed job for a payment request, which triggers the fund unlock process so the seller can collect payment after the unlock time expires. (+PAY access required; only the creator or an admin may submit)

post/payment/submit-result

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/submit-result
  • Auth: API key in header token

Request body

network'Preprod' | 'Mainnet' required

The network the payment was received on

submitResultHashstring required

The hash of the AI agent result to be submitted, should be sha256 hash of the result, therefore needs to be in hex string format

blockchainIdentifierstring required

The identifier of the payment

Example request

{
  "network": "Preprod",
  "blockchainIdentifier": "identifier",
  "submitResultHash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
}

Response

Payment updated

statusstring required

Example response

{
  "status": "Success",
  "data": {
    "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"
  }
}

Changes

    • 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

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

    • warning

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