For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Reference

Get list of available contracts

get

Returns a list of all available smart contracts

Responses
200

Success

application/json

Information about a smart contract

namestring · nullableOptional

Name of the smart contract

addressstring · nullableOptional

Ethereum address of the smart contract

get/api/v1/contracts/
GET /api/v1/contracts/ HTTP/1.1
Host: api.papaya.finance
Accept: */*
200

Success

[
  {
    "name": "text",
    "address": "text"
  }
]

API information and status

get

Returns information about the API and the status of smart contracts

Responses
200

Success

application/json

Response model for API information endpoint

messagestring · nullableOptional

Message describing the API information

get/api/v1/contracts/api-info
GET /api/v1/contracts/api-info HTTP/1.1
Host: api.papaya.finance
Accept: */*
200

Success

{
  "message": "text",
  "contracts": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

Cancel subscription for a specific contract

delete

Cancel an existing subscription to an author

Authorizations
X-API-KeystringRequired

API Key Authentication. Example: "X-API-Key: {api_key}"

Path parameters
contractstringRequired
authorstringRequired
Query parameters
Fromstring · nullableOptional
Sponsorstring · nullableOptional
Responses
200

Success

application/json

Base response model for transaction operations

messagestring · nullableOptional

Message describing the result of the transaction

transactionone of · nullableOptional

Transaction details including gas estimates and other parameters

delete/api/v1/{contract}/subscriptions/{author}
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 new payment stream/subscription for a specific contract

post

Create a new subscription/payment stream to an author

Authorizations
X-API-KeystringRequired

API Key Authentication. Example: "X-API-Key: {api_key}"

Path parameters
contractstringRequired
Body
fromstringOptional
authorstringOptional
subscriptionRatestringOptional
projectIdstringOptional
sponsorstring · nullableOptional
Responses
200

Success

application/json

Base response model for transaction operations

messagestring · nullableOptional

Message describing the result of the transaction

transactionone of · nullableOptional

Transaction details including gas estimates and other parameters

post/api/v1/{contract}/subscriptions/
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"
  }
}

List user's active subscriptions for a specific contract

get

Retrieve a list of all active subscriptions for a user

Authorizations
X-API-KeystringRequired

API Key Authentication. Example: "X-API-Key: {api_key}"

Path parameters
contractstringRequired
addressstringRequired
Responses
200

Success

application/json
addressstringOptional
get/api/v1/{contract}/subscriptions/{address}
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 user account

post

Deposit funds to a user's account

Authorizations
X-API-KeystringRequired

API Key Authentication. Example: "X-API-Key: {api_key}"

Path parameters
contractstringRequired
Body

Request model for depositing funds into the system

fromstring · min: 1Required

Ethereum address to deposit funds from

amountstring · min: 1Required

Amount to deposit

isPermit2boolean · nullableOptional

Whether to use Permit2 for token approval

sponsorstring · nullableOptional

Optional sponsor address that pays for gas fees

Responses
200

Success

application/json
and
post/api/v1/{contract}/payments/deposit
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"
}

Get user account balance

get

Retrieve the balance of a user's account

Authorizations
X-API-KeystringRequired

API Key Authentication. Example: "X-API-Key: {api_key}"

Path parameters
contractstringRequired
addressstringRequired
Responses
200

Success

application/json
addressstring · nullableOptional
balancestring · nullableOptional
get/api/v1/{contract}/payments/balance/{address}
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"
}

Make a one-time payment

post

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).

Authorizations
X-API-KeystringRequired

API Key Authentication. Example: "X-API-Key: {api_key}"

Path parameters
contractstringRequired
Body

Request model for making a payment transaction

fromstring · min: 1Required

Ethereum address of the sender

tostring · min: 1Required

Ethereum address of the recipient

amountstring · min: 1Required

Amount to be transferred (in wei for ETH)

sponsorstring · nullableOptional

Optional sponsor address that pays for gas fees. Must be either the sender or receiver.

Responses
200

Successfully prepared payment transaction

application/json
and
post/api/v1/{contract}/payments/
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 user account

post

Withdraw funds from a user's account

Authorizations
X-API-KeystringRequired

API Key Authentication. Example: "X-API-Key: {api_key}"

Path parameters
contractstringRequired
Body

Request model for withdrawing funds from the system

fromstring · min: 1Required

Ethereum address to withdraw funds from

amountstring · min: 1Required

Amount to withdraw

tostring · min: 1Required

Ethereum address to withdraw funds to

sponsorstring · nullableOptional

Optional sponsor address that pays for gas fees

Responses
200

Success

application/json
and
post/api/v1/{contract}/payments/withdraw
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 using a signature from the user

post

Execute a meta transaction that has been signed by the user

Authorizations
X-API-KeystringRequired

API Key Authentication. Example: "X-API-Key: {api_key}"

Path parameters
contractstringRequired
Body
fromstring · min: 1Required
signaturestring · min: 1Required
datastring · min: 1Required
nonceinteger · int32Required
sponsorstring · nullableOptional
deadlineinteger · int64 · nullableOptional
Responses
200

Success

application/json
messagestringOptional
fromstringOptional
transactionHashstringOptional
gasUsedinteger · int64Optional
post/api/v1/{contract}/meta/execute
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
}

Get the current nonce for an account

get

Retrieve the current nonce value for a specific account

Authorizations
X-API-KeystringRequired

API Key Authentication. Example: "X-API-Key: {api_key}"

Path parameters
contractstringRequired
accountstringRequired
Responses
200

Success

application/json
accountstringOptional
nonceinteger · int32Optional
get/api/v1/{contract}/meta/nonce/{account}
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 one sponsored call

post

Create multiple subscriptions in a single transaction

Authorizations
X-API-KeystringRequired

API Key Authentication. Example: "X-API-Key: {api_key}"

Path parameters
contractstringRequired
Body
fromstring · min: 1Required
sponsorstring · nullableOptional
Responses
200

Success

application/json
and
post/api/v1/{contract}/batch/subscriptions
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 batch payments to multiple recipients

post

Process multiple payments to different recipients in a single transaction

Authorizations
X-API-KeystringRequired

API Key Authentication. Example: "X-API-Key: {api_key}"

Path parameters
contractstringRequired
Body
fromstring · min: 1Required
sponsorstring · nullableOptional
Responses
200

Success

application/json
and
post/api/v1/{contract}/batch/payments
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