purchase

Request a refund for a completed purchase, which will be automatically collected after the refund time period expires. (+PAY access required)

Changed on

Requests a refund for a completed purchase. This will collect the refund after the refund time.

post/purchase/request-refund

Request

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

Request body

blockchainIdentifierstring required

The identifier of the purchase to be refunded

network'Preprod' | 'Mainnet' required

The network the Cardano wallet will be used on

Example request

{
  "network": "Preprod",
  "blockchainIdentifier": "blockchain_identifier"
}

Response

Purchase refund requested

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",
    "lastCheckedAt": null,
    "payByTime": null,
    "submitResultTime": "0",
    "unlockTime": "0",
    "externalDisputeUnlockTime": "0",
    "requestedById": "requester_id",
    "onChainState": null,
    "forceLayer": null,
    "paymentForceLayer": null,
    "collateralReturnLovelace": null,
    "buyerReturnAddress": null,
    "sellerReturnAddress": null,
    "cooldownTime": 0,
    "cooldownTimeOtherParty": 0,
    "inputHash": "input_hash",
    "resultHash": null,
    "NextAction": {
      "requestedAction": "FundsLockingRequested",
      "errorType": null,
      "errorNote": null
    },
    "CurrentTransaction": null,
    "PaidFunds": [
      {
        "unit": "",
        "amount": "10000000"
      }
    ],
    "PaymentSource": {
      "id": "payment_source_id",
      "policyId": "policy_id",
      "network": "Preprod",
      "paymentSourceType": "Web3CardanoV1",
      "smartContractAddress": "address"
    },
    "SellerWallet": null,
    "SmartContractWallet": null,
    "metadata": null,
    "WithdrawnForSeller": [],
    "WithdrawnForBuyer": [],
    "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

    • info

      added the required property / to the response with the status

    • breaking

      removed the required property / from 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