API Reference

This document describes the public and API-key authenticated endpoints of the AzothPay API

Get list of available contracts

get

Returns a list of all available smart contracts

Responses
chevron-right
200

Success

application/json
get
/api/v1/contracts/
200

Success

API information and status

get

Returns information about the API and the status of smart contracts

Responses
chevron-right
200

Success

application/json
get
/api/v1/contracts/api-info
200

Success

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
chevron-right
200

Success

application/json
delete
/api/v1/{contract}/subscriptions/{author}

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
chevron-right
200

Success

application/json
post
/api/v1/{contract}/subscriptions/

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
chevron-right
200

Success

application/json
get
/api/v1/{contract}/subscriptions/{address}

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
chevron-right
200

Success

application/json
post
/api/v1/{contract}/payments/deposit

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
chevron-right
200

Success

application/json
get
/api/v1/{contract}/payments/balance/{address}

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
chevron-right
200

Successfully prepared payment transaction

application/json
post
/api/v1/{contract}/payments/

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
chevron-right
200

Success

application/json
post
/api/v1/{contract}/payments/withdraw

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
chevron-right
200

Success

application/json
post
/api/v1/{contract}/meta/execute

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
chevron-right
200

Success

application/json
get
/api/v1/{contract}/meta/nonce/{account}

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
chevron-right
200

Success

application/json
post
/api/v1/{contract}/batch/subscriptions

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
chevron-right
200

Success

application/json
post
/api/v1/{contract}/batch/payments

Last updated