Skip to content

Distribute the Payment

This page documents the API endpoint for distributing payments from a split contract. This endpoint allows you to trigger the distribution of payment tokens (native or ERC20) from a split contract to its recipients according to their configured allocations.

Endpoint

POST https://inprocess.world/api/distribute

Request Body

The request body must be sent as JSON with Content-Type: application/json.

NameTypeRequiredDefaultDescription
splitAddressstringYesThe address of the split contract to distribute from
tokenAddressstringNo0x0...00The address of the token to distribute (optional, defaults to zero address for native token)
chainIdstringNo8453Chain ID where the split contract exists (default: Base, 8453)

Example Requests

cURL
# Native token distribution (tokenAddress can be omitted)
curl -X POST https://inprocess.world/api/distribute \
  -H "Content-Type: application/json" \
  -d '{
    "splitAddress": "0x4b4324bcC6dB9380ABBbbD20B24A16C11FB5B38A"
  }'
 
# ERC20 token distribution (tokenAddress is required)
curl -X POST https://inprocess.world/api/distribute \
  -H "Content-Type: application/json" \
  -d '{
    "splitAddress": "0x4b4324bcC6dB9380ABBbbD20B24A16C11FB5B38A",
    "tokenAddress": "0xYourERC20TokenAddress"
  }'

Response

{
  "status": "success",
  "hash": "0xTransactionHash"
}

Notes

  • tokenAddress is optional and defaults to the zero address (0x0000000000000000000000000000000000000000) for native token distribution (ETH)
  • For ERC20 tokens, provide the contract address of the token in tokenAddress
  • The payment distribution will split funds according to the allocations configured in the split contract
  • The transaction hash returned can be used to track the payment distribution onchain