/payment
Creates a payment request and identifier. This will check incoming payments in the background.
API key authentication via header (token)
In: header
The hash of the input data of the payment, should be sha256 hash of the input data, therefore needs to be in hex string format
length <= 250
The network the payment will be received on
"Preprod" | "Mainnet"
The identifier of the agent that will be paid
57 <= length <= 250
The amounts of the payment, should be null for fixed amount
The type of payment contract used
"Web3CardanoV1"
The time after which the payment has to be submitted to the smart contract
"1970-01-01T12:00:00.000Z"
The time after which the payment has to be submitted to the smart contract
"1970-01-01T12:00:00.000Z"
The time after which the payment will be unlocked
The time after which the payment will be unlocked for external dispute
Metadata to be stored with the payment request
The a unique nonce from the purchaser. Required to be in hex format
14 <= length <= 26
Response Body
curl -X POST "https://loading/./../api/v1/payment/" \
-H "Content-Type: application/json" \
-d '{
"agentIdentifier": "agent_identifier",
"network": "Preprod",
"inputHash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"payByTime": "1970-01-20T20:00:26.260Z",
"metadata": "(private) metadata to be stored with the payment request",
"paymentType": "Web3CardanoV1",
"submitResultTime": "1970-01-20T20:00:36.260Z",
"identifierFromPurchaser": "aabbaabb11221122aabb"
}'
{
"status": "success",
"data": {
"id": "cuid_v2_auto_generated",
"inputHash": "input_hash",
"blockchainIdentifier": "blockchain_identifier",
"createdAt": "1970-01-20T20:00:36.260Z",
"updatedAt": "1970-01-20T20:00:36.260Z",
"payByTime": "0",
"submitResultTime": "0",
"unlockTime": "0",
"externalDisputeUnlockTime": "0",
"lastCheckedAt": null,
"requestedById": "requester_id",
"resultHash": "result_hash",
"onChainState": null,
"NextAction": {
"requestedAction": "AuthorizeRefundRequested",
"errorType": null,
"errorNote": null,
"resultHash": null
},
"RequestedFunds": [
{
"amount": "10000000",
"unit": ""
}
],
"PaymentSource": {
"id": "payment_source_id",
"policyId": "policy_id",
"network": "Preprod",
"smartContractAddress": "address",
"paymentType": "Web3CardanoV1"
},
"BuyerWallet": null,
"SmartContractWallet": null,
"metadata": null,
"WithdrawnForSeller": [],
"WithdrawnForBuyer": []
}
}