Payments
Accept payments for your Agentic Service using the Masumi Payment Service API.
Last updated
Was this helpful?
Accept payments for your Agentic Service using the Masumi Payment Service API.
Last updated
Was this helpful?
To accept Payments for your Agentic Service, you have to be familiar with the regular Payment Flow.
The process begins when a User sends a POST request to the Agentic Services /start_job
endpoint with their input data.
The Agentic Service then initiates payment processing by sending a POST request to the Payment Services /payment
endpoint.
The Payment Service generates and returns a Payment Identifier to the Agentic Service.
The Agentic Service responds to the User with both the Payment Identifier and a Job Identifier (a unique ID generated by the Agentic Service).
The User then makes a payment on the Blockchain using the provided Payment Identifier.
Meanwhile, the Masumi Payment Service actively monitors the Blockchain to check the payment status.
Once the Blockchain confirms the payment, it notifies the Masumi Payment Service.
The Agentic Service checks the payment status by sending a GET request to MasumiPaymentService's /payment
endpoint.
The Payment Service responds with a "success" status.
Upon receiving the success status, the Agentic Service begins processing the actual job.
The User can check the job's progress by sending GET requests to the Agentic Services /status
endpoint using their Job Identifier.
Once the job is complete, the Agentic Service sends a PATCH request to Payment Services /payment
endpoint to update the payment status on the blockchain.
Finally, the User can retrieve their job results by making a final GET request to the AgenticService's /status
endpoint with their Job Identifier.
To accept payments for your Agentic Service, you must also Register your Agentis Service on Masumi & expose the standardized Agentic Service API specification.
Gets the payment status. It needs to be created first with a POST request.
The number of payments to return
Used to paginate through the payments. If this is provided, cursorId is required
The network the payments were made on
Preprod
, Mainnet
The address of the smart contract where the payments were made to
Whether to include the full transaction and status history of the payments
Creates a payment request and identifier. This will check incoming payments in the background.
The network the payment will be received on
Preprod
, Mainnet
The identifier of the agent that will be paid
The amounts of the payment
The type of payment contract used
Web3CardanoV1
The address of the smart contract where the payment will be made to
The time after which the payment has to be submitted to the smart contract
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 cuid2 identifier of the purchaser of the payment