API Reference
Returns a list of all available smart contracts
Success
Information about a smart contract
Name of the smart contract
Ethereum address of the smart contract
GET /api/v1/contracts/ HTTP/1.1
Host: api.papaya.finance
Accept: */*
Success
[
{
"name": "text",
"address": "text"
}
]Returns information about the API and the status of smart contracts
Success
Response model for API information endpoint
Message describing the API information
GET /api/v1/contracts/api-info HTTP/1.1
Host: api.papaya.finance
Accept: */*
Success
{
"message": "text",
"contracts": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Cancel an existing subscription to an author
API Key Authentication. Example: "X-API-Key: {api_key}"
Success
Base response model for transaction operations
Message describing the result of the transaction
Transaction details including gas estimates and other parameters
Bad Request
Unauthorized
Forbidden
Internal Server Error
DELETE /api/v1/{contract}/subscriptions/{author} HTTP/1.1
Host: api.papaya.finance
X-API-Key: YOUR_API_KEY
Accept: */*
{
"message": "text",
"transaction": {
"from": "text",
"to": "text",
"data": "text",
"gas": 1,
"value": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Create a new subscription/payment stream to an author
API Key Authentication. Example: "X-API-Key: {api_key}"
Success
Base response model for transaction operations
Message describing the result of the transaction
Transaction details including gas estimates and other parameters
Bad Request
Unauthorized
Forbidden
Internal Server Error
POST /api/v1/{contract}/subscriptions/ HTTP/1.1
Host: api.papaya.finance
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 93
{
"from": "text",
"author": "text",
"subscriptionRate": "text",
"projectId": "text",
"sponsor": "text"
}{
"message": "text",
"transaction": {
"from": "text",
"to": "text",
"data": "text",
"gas": 1,
"value": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Retrieve a list of all active subscriptions for a user
API Key Authentication. Example: "X-API-Key: {api_key}"
Success
Bad Request
Unauthorized
Forbidden
Internal Server Error
GET /api/v1/{contract}/subscriptions/{address} HTTP/1.1
Host: api.papaya.finance
X-API-Key: YOUR_API_KEY
Accept: */*
{
"address": "text",
"subscriptions": [
{
"to": "text",
"incomeRate": 1,
"outgoingRate": 1,
"incomeRateRaw": {
"IsPowerOfTwo": true,
"IsZero": true,
"IsOne": true,
"IsEven": true,
"Sign": 1,
"_sign": 1,
"_bits": [
1
]
},
"outgoingRateRaw": {
"IsPowerOfTwo": true,
"IsZero": true,
"IsOne": true,
"IsEven": true,
"Sign": 1,
"_sign": 1,
"_bits": [
1
]
}
}
]
}Deposit funds to a user's account
API Key Authentication. Example: "X-API-Key: {api_key}"
Request model for depositing funds into the system
Ethereum address to deposit funds from
Amount to deposit
Whether to use Permit2 for token approval
Optional sponsor address that pays for gas fees
Success
Bad Request
Unauthorized
Forbidden
Internal Server Error
POST /api/v1/{contract}/payments/deposit HTTP/1.1
Host: api.papaya.finance
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 65
{
"from": "text",
"amount": "text",
"isPermit2": true,
"sponsor": "text"
}{
"message": "text",
"transaction": {
"from": "text",
"to": "text",
"data": "text",
"gas": 1,
"value": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"from": "text",
"amount": "text",
"isPermit2": true,
"sponsor": "text"
}Retrieve the balance of a user's account
API Key Authentication. Example: "X-API-Key: {api_key}"
Success
Bad Request
Unauthorized
Forbidden
Internal Server Error
GET /api/v1/{contract}/payments/balance/{address} HTTP/1.1
Host: api.papaya.finance
X-API-Key: YOUR_API_KEY
Accept: */*
{
"address": "text",
"balance": "text"
}Create a transaction to make a one-time payment to another user. This endpoint supports sponsored transactions where gas fees can be paid by the recipient. The sponsor must be either the sender or receiver of the payment. All addresses must be valid Ethereum addresses (42 characters starting with 0x).
API Key Authentication. Example: "X-API-Key: {api_key}"
Request model for making a payment transaction
Ethereum address of the sender
Ethereum address of the recipient
Amount to be transferred (in wei for ETH)
Optional sponsor address that pays for gas fees. Must be either the sender or receiver.
Successfully prepared payment transaction
Bad Request - Invalid parameters or addresses
Unauthorized - Invalid API key
Forbidden
Internal Server Error
POST /api/v1/{contract}/payments/ HTTP/1.1
Host: api.papaya.finance
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 189
{
"from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"to": "0x8ba1f109551bD432803012645Hacab3dF0cDeaC1",
"amount": "1000000000000000000",
"sponsor": "0x8ba1f109551bD432803012645Hacab3dF0cDeaC1"
}{
"message": "text",
"transaction": {
"from": "text",
"to": "text",
"data": "text",
"gas": 1,
"value": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"from": "text",
"to": "text",
"amount": "text",
"sponsor": "text"
}Withdraw funds from a user's account
API Key Authentication. Example: "X-API-Key: {api_key}"
Request model for withdrawing funds from the system
Ethereum address to withdraw funds from
Amount to withdraw
Ethereum address to withdraw funds to
Optional sponsor address that pays for gas fees
Success
Bad Request
Unauthorized
Forbidden
Internal Server Error
POST /api/v1/{contract}/payments/withdraw HTTP/1.1
Host: api.papaya.finance
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"from": "text",
"amount": "text",
"to": "text",
"sponsor": "text"
}{
"message": "text",
"transaction": {
"from": "text",
"to": "text",
"data": "text",
"gas": 1,
"value": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"from": "text",
"amount": "text",
"to": "text",
"sponsor": "text"
}Execute a meta transaction that has been signed by the user
API Key Authentication. Example: "X-API-Key: {api_key}"
Success
Bad Request
Unauthorized
Forbidden
Internal Server Error
POST /api/v1/{contract}/meta/execute HTTP/1.1
Host: api.papaya.finance
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 88
{
"from": "text",
"signature": "text",
"data": "text",
"nonce": 1,
"sponsor": "text",
"deadline": 1
}{
"message": "text",
"from": "text",
"transactionHash": "text",
"gasUsed": 1
}Retrieve the current nonce value for a specific account
API Key Authentication. Example: "X-API-Key: {api_key}"
Success
Bad Request
Unauthorized
Forbidden
Internal Server Error
GET /api/v1/{contract}/meta/nonce/{account} HTTP/1.1
Host: api.papaya.finance
X-API-Key: YOUR_API_KEY
Accept: */*
{
"account": "text",
"nonce": 1
}Create multiple subscriptions in a single transaction
API Key Authentication. Example: "X-API-Key: {api_key}"
Success
Bad Request
Unauthorized
Forbidden
Internal Server Error
POST /api/v1/{contract}/batch/subscriptions HTTP/1.1
Host: api.papaya.finance
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 113
{
"from": "text",
"subscriptions": [
{
"author": "text",
"subscriptionRate": "text",
"projectId": "text"
}
],
"sponsor": "text"
}{
"message": "text",
"transaction": {
"from": "text",
"to": "text",
"data": "text",
"gas": 1,
"value": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"from": "text",
"count": 1,
"sponsor": "text"
}Process multiple payments to different recipients in a single transaction
API Key Authentication. Example: "X-API-Key: {api_key}"
Success
Bad Request
Unauthorized
Forbidden
Internal Server Error
POST /api/v1/{contract}/batch/payments HTTP/1.1
Host: api.papaya.finance
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 75
{
"from": "text",
"payments": [
{
"to": "text",
"amount": "text"
}
],
"sponsor": "text"
}{
"message": "text",
"transaction": {
"from": "text",
"to": "text",
"data": "text",
"gas": 1,
"value": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"from": "text",
"count": 1,
"sponsor": "text"
}Last updated