# API Reference

## Get list of available contracts

> Returns a list of all available smart contracts

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"paths":{"/api/v1/contracts/":{"get":{"tags":["contracts","Api"],"summary":"Get list of available contracts","description":"Returns a list of all available smart contracts","operationId":"PapayaApiEndpointsGetContracts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PapayaApiModelsContractInfo"}}}}}}}}},"components":{"schemas":{"PapayaApiModelsContractInfo":{"type":"object","description":"Information about a smart contract","additionalProperties":false,"properties":{"name":{"type":"string","description":"Name of the smart contract","nullable":true},"address":{"type":"string","description":"Ethereum address of the smart contract","nullable":true}}}}}}
```

## API information and status

> Returns information about the API and the status of smart contracts

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"paths":{"/api/v1/contracts/api-info":{"get":{"tags":["contracts","Api"],"summary":"API information and status","description":"Returns information about the API and the status of smart contracts","operationId":"PapayaApiEndpointsContractsGetApiInfo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsApiInfoResponse"}}}}}}}},"components":{"schemas":{"PapayaApiModelsApiInfoResponse":{"type":"object","description":"Response model for API information endpoint","additionalProperties":false,"properties":{"message":{"type":"string","description":"Message describing the API information","nullable":true},"contracts":{"type":"object","description":"Dictionary of available contracts and their information","nullable":true,"additionalProperties":{}}}}}}}
```

## Cancel subscription for a specific contract

> Cancel an existing subscription to an author

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"API Key Authentication. Example: \"X-API-Key: {api_key}\"","name":"X-API-Key","in":"header","scheme":"ApiKey"}},"schemas":{"PapayaApiModelsTransactionResponse":{"type":"object","description":"Base response model for transaction operations","additionalProperties":false,"properties":{"message":{"type":"string","description":"Message describing the result of the transaction","nullable":true},"transaction":{"description":"Transaction details including gas estimates and other parameters","nullable":true,"oneOf":[{"$ref":"#/components/schemas/PapayaApiModelsTransactionModel"}]}}},"PapayaApiModelsTransactionModel":{"type":"object","description":"Represents a blockchain transaction with its key parameters","additionalProperties":{},"properties":{"from":{"type":"string","description":"The sender address initiating the transaction","nullable":true},"to":{"type":"string","description":"The destination address (typically a smart contract address)","nullable":true},"data":{"type":"string","description":"The encoded function call data","nullable":true},"gas":{"type":"integer","description":"The estimated gas amount for the transaction","format":"int64","nullable":true},"value":{"type":"string","description":"The amount of tokens/ETH to send with the transaction (optional)","nullable":true}}}}},"paths":{"/api/v1/{contract}/subscriptions/{author}":{"delete":{"tags":["subscriptions","Api"],"summary":"Cancel subscription for a specific contract","description":"Cancel an existing subscription to an author","operationId":"CancelSubscription","parameters":[{"name":"contract","in":"path","required":true,"schema":{"type":"string"}},{"name":"author","in":"path","required":true,"schema":{"type":"string"}},{"name":"From","in":"query","schema":{"type":"string","nullable":true}},{"name":"Sponsor","in":"query","schema":{"type":"string","nullable":true}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsTransactionResponse"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}}}}
```

## Create new payment stream/subscription for a specific contract

> Create a new subscription/payment stream to an author

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"API Key Authentication. Example: \"X-API-Key: {api_key}\"","name":"X-API-Key","in":"header","scheme":"ApiKey"}},"schemas":{"PapayaApiModelsCreateSubscriptionRequest":{"type":"object","additionalProperties":false,"properties":{"from":{"type":"string"},"author":{"type":"string"},"subscriptionRate":{"type":"string"},"projectId":{"type":"string"},"sponsor":{"type":"string","nullable":true}}},"PapayaApiModelsTransactionResponse":{"type":"object","description":"Base response model for transaction operations","additionalProperties":false,"properties":{"message":{"type":"string","description":"Message describing the result of the transaction","nullable":true},"transaction":{"description":"Transaction details including gas estimates and other parameters","nullable":true,"oneOf":[{"$ref":"#/components/schemas/PapayaApiModelsTransactionModel"}]}}},"PapayaApiModelsTransactionModel":{"type":"object","description":"Represents a blockchain transaction with its key parameters","additionalProperties":{},"properties":{"from":{"type":"string","description":"The sender address initiating the transaction","nullable":true},"to":{"type":"string","description":"The destination address (typically a smart contract address)","nullable":true},"data":{"type":"string","description":"The encoded function call data","nullable":true},"gas":{"type":"integer","description":"The estimated gas amount for the transaction","format":"int64","nullable":true},"value":{"type":"string","description":"The amount of tokens/ETH to send with the transaction (optional)","nullable":true}}}}},"paths":{"/api/v1/{contract}/subscriptions/":{"post":{"tags":["subscriptions","Api"],"summary":"Create new payment stream/subscription for a specific contract","description":"Create a new subscription/payment stream to an author","operationId":"CreateSubscription","parameters":[{"name":"contract","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsCreateSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsTransactionResponse"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}}}}
```

## List user's active subscriptions for a specific contract

> Retrieve a list of all active subscriptions for a user

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"API Key Authentication. Example: \"X-API-Key: {api_key}\"","name":"X-API-Key","in":"header","scheme":"ApiKey"}},"schemas":{"PapayaApiEndpointsSubscriptionsListSubscriptionsResponse":{"type":"object","additionalProperties":false,"properties":{"address":{"type":"string"},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/PapayaApiEndpointsSubscriptionsSubscriptionInfo"}}}},"PapayaApiEndpointsSubscriptionsSubscriptionInfo":{"type":"object","additionalProperties":false,"properties":{"to":{"type":"string"},"incomeRate":{"type":"number","format":"decimal"},"outgoingRate":{"type":"number","format":"decimal"},"incomeRateRaw":{"$ref":"#/components/schemas/SystemNumericsBigInteger"},"outgoingRateRaw":{"$ref":"#/components/schemas/SystemNumericsBigInteger"}}},"SystemNumericsBigInteger":{"type":"object","additionalProperties":false,"properties":{"IsPowerOfTwo":{"type":"boolean"},"IsZero":{"type":"boolean"},"IsOne":{"type":"boolean"},"IsEven":{"type":"boolean"},"Sign":{"type":"integer","format":"int32"},"_sign":{"type":"integer","format":"int32"},"_bits":{"type":"array","nullable":true,"items":{"type":"integer"}}}}}},"paths":{"/api/v1/{contract}/subscriptions/{address}":{"get":{"tags":["subscriptions","Api"],"summary":"List user's active subscriptions for a specific contract","description":"Retrieve a list of all active subscriptions for a user","operationId":"ListSubscriptions","parameters":[{"name":"contract","in":"path","required":true,"schema":{"type":"string"}},{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiEndpointsSubscriptionsListSubscriptionsResponse"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}}}}
```

## Deposit funds to user account

> Deposit funds to a user's account

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"API Key Authentication. Example: \"X-API-Key: {api_key}\"","name":"X-API-Key","in":"header","scheme":"ApiKey"}},"schemas":{"PapayaApiModelsDepositFundsRequest":{"type":"object","description":"Request model for depositing funds into the system","additionalProperties":false,"required":["from","amount"],"properties":{"from":{"type":"string","description":"Ethereum address to deposit funds from","minLength":1},"amount":{"type":"string","description":"Amount to deposit","minLength":1},"isPermit2":{"type":"boolean","description":"Whether to use Permit2 for token approval","nullable":true},"sponsor":{"type":"string","description":"Optional sponsor address that pays for gas fees","nullable":true}}},"PapayaApiModelsDepositFundsResponse":{"allOf":[{"$ref":"#/components/schemas/PapayaApiModelsTransactionResponse"},{"type":"object","description":"Response model for depositing funds into the system","additionalProperties":false,"properties":{"from":{"type":"string","description":"Ethereum address that funds were deposited from"},"amount":{"type":"string","description":"Amount that was deposited"},"isPermit2":{"type":"boolean","description":"Whether Permit2 was used for token approval","nullable":true},"sponsor":{"type":"string","description":"Address that paid for gas fees","nullable":true}}}]},"PapayaApiModelsTransactionResponse":{"type":"object","description":"Base response model for transaction operations","additionalProperties":false,"properties":{"message":{"type":"string","description":"Message describing the result of the transaction","nullable":true},"transaction":{"description":"Transaction details including gas estimates and other parameters","nullable":true,"oneOf":[{"$ref":"#/components/schemas/PapayaApiModelsTransactionModel"}]}}},"PapayaApiModelsTransactionModel":{"type":"object","description":"Represents a blockchain transaction with its key parameters","additionalProperties":{},"properties":{"from":{"type":"string","description":"The sender address initiating the transaction","nullable":true},"to":{"type":"string","description":"The destination address (typically a smart contract address)","nullable":true},"data":{"type":"string","description":"The encoded function call data","nullable":true},"gas":{"type":"integer","description":"The estimated gas amount for the transaction","format":"int64","nullable":true},"value":{"type":"string","description":"The amount of tokens/ETH to send with the transaction (optional)","nullable":true}}}}},"paths":{"/api/v1/{contract}/payments/deposit":{"post":{"tags":["payments","Api"],"summary":"Deposit funds to user account","description":"Deposit funds to a user's account","operationId":"DepositFunds","parameters":[{"name":"contract","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsDepositFundsRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsDepositFundsResponse"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}}}}
```

## Get user account balance

> Retrieve the balance of a user's account

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"API Key Authentication. Example: \"X-API-Key: {api_key}\"","name":"X-API-Key","in":"header","scheme":"ApiKey"}},"schemas":{"PapayaApiEndpointsPaymentsBalanceResponse":{"type":"object","additionalProperties":false,"properties":{"address":{"type":"string","nullable":true},"balance":{"type":"string","nullable":true}}}}},"paths":{"/api/v1/{contract}/payments/balance/{address}":{"get":{"tags":["payments","Api"],"summary":"Get user account balance","description":"Retrieve the balance of a user's account","operationId":"GetBalance","parameters":[{"name":"contract","in":"path","required":true,"schema":{"type":"string"}},{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiEndpointsPaymentsBalanceResponse"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}}}}
```

## Make a one-time payment

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

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"API Key Authentication. Example: \"X-API-Key: {api_key}\"","name":"X-API-Key","in":"header","scheme":"ApiKey"}},"schemas":{"PapayaApiModelsMakePaymentRequest":{"type":"object","description":"Request model for making a payment transaction","additionalProperties":false,"required":["from","to","amount"],"properties":{"from":{"type":"string","description":"Ethereum address of the sender","minLength":1},"to":{"type":"string","description":"Ethereum address of the recipient","minLength":1},"amount":{"type":"string","description":"Amount to be transferred (in wei for ETH)","minLength":1},"sponsor":{"type":"string","description":"Optional sponsor address that pays for gas fees. Must be either the sender or receiver.","nullable":true}}},"PapayaApiModelsMakePaymentResponse":{"allOf":[{"$ref":"#/components/schemas/PapayaApiModelsTransactionResponse"},{"type":"object","description":"Response model for making a payment transaction","additionalProperties":false,"properties":{"from":{"type":"string","description":"Ethereum address of the sender"},"to":{"type":"string","description":"Ethereum address of the recipient"},"amount":{"type":"string","description":"Amount to be transferred"},"sponsor":{"type":"string","description":"Address that pays for gas fees","nullable":true}}}]},"PapayaApiModelsTransactionResponse":{"type":"object","description":"Base response model for transaction operations","additionalProperties":false,"properties":{"message":{"type":"string","description":"Message describing the result of the transaction","nullable":true},"transaction":{"description":"Transaction details including gas estimates and other parameters","nullable":true,"oneOf":[{"$ref":"#/components/schemas/PapayaApiModelsTransactionModel"}]}}},"PapayaApiModelsTransactionModel":{"type":"object","description":"Represents a blockchain transaction with its key parameters","additionalProperties":{},"properties":{"from":{"type":"string","description":"The sender address initiating the transaction","nullable":true},"to":{"type":"string","description":"The destination address (typically a smart contract address)","nullable":true},"data":{"type":"string","description":"The encoded function call data","nullable":true},"gas":{"type":"integer","description":"The estimated gas amount for the transaction","format":"int64","nullable":true},"value":{"type":"string","description":"The amount of tokens/ETH to send with the transaction (optional)","nullable":true}}}}},"paths":{"/api/v1/{contract}/payments/":{"post":{"tags":["payments","Api"],"summary":"Make a one-time payment","description":"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).","operationId":"MakePayment","parameters":[{"name":"contract","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsMakePaymentRequest"}}},"required":true},"responses":{"200":{"description":"Successfully prepared payment transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsMakePaymentResponse"}}}},"400":{"description":"Bad Request - Invalid parameters or addresses"},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}}}}
```

## Withdraw funds from user account

> Withdraw funds from a user's account

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"API Key Authentication. Example: \"X-API-Key: {api_key}\"","name":"X-API-Key","in":"header","scheme":"ApiKey"}},"schemas":{"PapayaApiModelsWithdrawFundsRequest":{"type":"object","description":"Request model for withdrawing funds from the system","additionalProperties":false,"required":["from","amount","to"],"properties":{"from":{"type":"string","description":"Ethereum address to withdraw funds from","minLength":1},"amount":{"type":"string","description":"Amount to withdraw","minLength":1},"to":{"type":"string","description":"Ethereum address to withdraw funds to","minLength":1},"sponsor":{"type":"string","description":"Optional sponsor address that pays for gas fees","nullable":true}}},"PapayaApiModelsWithdrawFundsResponse":{"allOf":[{"$ref":"#/components/schemas/PapayaApiModelsTransactionResponse"},{"type":"object","description":"Response model for withdrawing funds from the system","additionalProperties":false,"properties":{"from":{"type":"string","description":"Ethereum address that funds were withdrawn from"},"amount":{"type":"string","description":"Amount that was withdrawn"},"to":{"type":"string","description":"Ethereum address that funds were withdrawn to"},"sponsor":{"type":"string","description":"Address that paid for gas fees","nullable":true}}}]},"PapayaApiModelsTransactionResponse":{"type":"object","description":"Base response model for transaction operations","additionalProperties":false,"properties":{"message":{"type":"string","description":"Message describing the result of the transaction","nullable":true},"transaction":{"description":"Transaction details including gas estimates and other parameters","nullable":true,"oneOf":[{"$ref":"#/components/schemas/PapayaApiModelsTransactionModel"}]}}},"PapayaApiModelsTransactionModel":{"type":"object","description":"Represents a blockchain transaction with its key parameters","additionalProperties":{},"properties":{"from":{"type":"string","description":"The sender address initiating the transaction","nullable":true},"to":{"type":"string","description":"The destination address (typically a smart contract address)","nullable":true},"data":{"type":"string","description":"The encoded function call data","nullable":true},"gas":{"type":"integer","description":"The estimated gas amount for the transaction","format":"int64","nullable":true},"value":{"type":"string","description":"The amount of tokens/ETH to send with the transaction (optional)","nullable":true}}}}},"paths":{"/api/v1/{contract}/payments/withdraw":{"post":{"tags":["payments","Api"],"summary":"Withdraw funds from user account","description":"Withdraw funds from a user's account","operationId":"WithdrawFunds","parameters":[{"name":"contract","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsWithdrawFundsRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsWithdrawFundsResponse"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}}}}
```

## Execute a meta transaction using a signature from the user

> Execute a meta transaction that has been signed by the user

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"API Key Authentication. Example: \"X-API-Key: {api_key}\"","name":"X-API-Key","in":"header","scheme":"ApiKey"}},"schemas":{"PapayaApiEndpointsMetaExecuteMetaTransactionRequest":{"type":"object","additionalProperties":false,"required":["from","signature","data","nonce"],"properties":{"from":{"type":"string","minLength":1},"signature":{"type":"string","minLength":1},"data":{"type":"string","minLength":1},"nonce":{"type":"integer","format":"int32"},"sponsor":{"type":"string","nullable":true},"deadline":{"type":"integer","format":"int64","nullable":true}}},"PapayaApiEndpointsMetaExecuteMetaTransactionResponse":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string"},"from":{"type":"string"},"transactionHash":{"type":"string"},"gasUsed":{"type":"integer","format":"int64"}}}}},"paths":{"/api/v1/{contract}/meta/execute":{"post":{"tags":["meta","Api"],"summary":"Execute a meta transaction using a signature from the user","description":"Execute a meta transaction that has been signed by the user","operationId":"ExecuteMetaTransaction","parameters":[{"name":"contract","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiEndpointsMetaExecuteMetaTransactionRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiEndpointsMetaExecuteMetaTransactionResponse"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}}}}
```

## Get the current nonce for an account

> Retrieve the current nonce value for a specific account

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"API Key Authentication. Example: \"X-API-Key: {api_key}\"","name":"X-API-Key","in":"header","scheme":"ApiKey"}},"schemas":{"PapayaApiEndpointsMetaGetNonceResponse":{"type":"object","additionalProperties":false,"properties":{"account":{"type":"string"},"nonce":{"type":"integer","format":"int32"}}}}},"paths":{"/api/v1/{contract}/meta/nonce/{account}":{"get":{"tags":["meta","Api"],"summary":"Get the current nonce for an account","description":"Retrieve the current nonce value for a specific account","operationId":"GetNonce","parameters":[{"name":"contract","in":"path","required":true,"schema":{"type":"string"}},{"name":"account","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiEndpointsMetaGetNonceResponse"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}}}}
```

## Create multiple subscriptions in one sponsored call

> Create multiple subscriptions in a single transaction

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"API Key Authentication. Example: \"X-API-Key: {api_key}\"","name":"X-API-Key","in":"header","scheme":"ApiKey"}},"schemas":{"PapayaApiModelsBatchSubscriptionRequest":{"type":"object","additionalProperties":false,"required":["from","subscriptions"],"properties":{"from":{"type":"string","minLength":1},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/PapayaApiModelsSubscription"}},"sponsor":{"type":"string","nullable":true}}},"PapayaApiModelsSubscription":{"type":"object","additionalProperties":false,"required":["author","subscriptionRate","projectId"],"properties":{"author":{"type":"string","minLength":1},"subscriptionRate":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1}}},"PapayaApiModelsBatchSubscriptionResponse":{"allOf":[{"$ref":"#/components/schemas/PapayaApiModelsTransactionResponse"},{"type":"object","additionalProperties":false,"properties":{"from":{"type":"string","nullable":true},"count":{"type":"integer","format":"int32"},"sponsor":{"type":"string","nullable":true}}}]},"PapayaApiModelsTransactionResponse":{"type":"object","description":"Base response model for transaction operations","additionalProperties":false,"properties":{"message":{"type":"string","description":"Message describing the result of the transaction","nullable":true},"transaction":{"description":"Transaction details including gas estimates and other parameters","nullable":true,"oneOf":[{"$ref":"#/components/schemas/PapayaApiModelsTransactionModel"}]}}},"PapayaApiModelsTransactionModel":{"type":"object","description":"Represents a blockchain transaction with its key parameters","additionalProperties":{},"properties":{"from":{"type":"string","description":"The sender address initiating the transaction","nullable":true},"to":{"type":"string","description":"The destination address (typically a smart contract address)","nullable":true},"data":{"type":"string","description":"The encoded function call data","nullable":true},"gas":{"type":"integer","description":"The estimated gas amount for the transaction","format":"int64","nullable":true},"value":{"type":"string","description":"The amount of tokens/ETH to send with the transaction (optional)","nullable":true}}}}},"paths":{"/api/v1/{contract}/batch/subscriptions":{"post":{"tags":["batch","Api"],"summary":"Create multiple subscriptions in one sponsored call","description":"Create multiple subscriptions in a single transaction","operationId":"CreateBatchSubscriptions","parameters":[{"name":"contract","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsBatchSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsBatchSubscriptionResponse"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}}}}
```

## Process batch payments to multiple recipients

> Process multiple payments to different recipients in a single transaction

```json
{"openapi":"3.0.0","info":{"title":"Papaya API","version":"v1"},"servers":[{"url":"https://api.papaya.finance"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"API Key Authentication. Example: \"X-API-Key: {api_key}\"","name":"X-API-Key","in":"header","scheme":"ApiKey"}},"schemas":{"PapayaApiModelsBatchPaymentRequest":{"type":"object","additionalProperties":false,"required":["from","payments"],"properties":{"from":{"type":"string","minLength":1},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PapayaApiModelsPayment"}},"sponsor":{"type":"string","nullable":true}}},"PapayaApiModelsPayment":{"type":"object","additionalProperties":false,"required":["to","amount"],"properties":{"to":{"type":"string","minLength":1},"amount":{"type":"string","minLength":1}}},"PapayaApiModelsBatchPaymentResponse":{"allOf":[{"$ref":"#/components/schemas/PapayaApiModelsTransactionResponse"},{"type":"object","additionalProperties":false,"properties":{"from":{"type":"string","nullable":true},"count":{"type":"integer","format":"int32"},"sponsor":{"type":"string","nullable":true}}}]},"PapayaApiModelsTransactionResponse":{"type":"object","description":"Base response model for transaction operations","additionalProperties":false,"properties":{"message":{"type":"string","description":"Message describing the result of the transaction","nullable":true},"transaction":{"description":"Transaction details including gas estimates and other parameters","nullable":true,"oneOf":[{"$ref":"#/components/schemas/PapayaApiModelsTransactionModel"}]}}},"PapayaApiModelsTransactionModel":{"type":"object","description":"Represents a blockchain transaction with its key parameters","additionalProperties":{},"properties":{"from":{"type":"string","description":"The sender address initiating the transaction","nullable":true},"to":{"type":"string","description":"The destination address (typically a smart contract address)","nullable":true},"data":{"type":"string","description":"The encoded function call data","nullable":true},"gas":{"type":"integer","description":"The estimated gas amount for the transaction","format":"int64","nullable":true},"value":{"type":"string","description":"The amount of tokens/ETH to send with the transaction (optional)","nullable":true}}}}},"paths":{"/api/v1/{contract}/batch/payments":{"post":{"tags":["batch","Api"],"summary":"Process batch payments to multiple recipients","description":"Process multiple payments to different recipients in a single transaction","operationId":"ProcessBatchPayments","parameters":[{"name":"contract","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsBatchPaymentRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PapayaApiModelsBatchPaymentResponse"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.papaya.finance/api/api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
