Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/OluwagbeminiyiA/agro_pulse-API/llms.txt

Use this file to discover all available pages before exploring further.

When a payment is verified successfully and escrow is enabled, AgroPulse automatically calculates a three-way split: 80% to the farmer, 10% to the rider, and 10% as the platform fee. These figures are stored in a PaymentSplit record linked to the payment. As payouts are completed, farmer_processed and rider_processed flags are set to true, giving you a clear audit trail of which disbursements have been fulfilled.
PaymentSplit records are created automatically on payment verification — you cannot create or modify them directly. Use the Payouts API to act on the amounts they contain.

Endpoints

MethodPathAuthDescription
GET/api/payment-splits/RequiredList payment split records
GET/api/payment-splits/{id}/RequiredRetrieve a single payment split record
Both endpoints are read-only. All other HTTP methods return 405 Method Not Allowed.

Example response

curl https://api.agropulse.example/api/payment-splits/3c2b1a09-8d7e-6f5a-4b3c-210987654321/ \
  -H "Authorization: Bearer <token>"
{
  "id": "3c2b1a09-8d7e-6f5a-4b3c-210987654321",
  "payment": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "payment_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "farmer_amount": "12000.00",
  "rider_amount": "1500.00",
  "platform_fee": "1500.00",
  "farmer_processed": true,
  "rider_processed": false,
  "created_at": "2026-05-13T10:31:00Z"
}

Query parameters

ParameterTypeDescription
orderingstringSort by created_at or farmer_amount (prefix - for descending)

PaymentSplit object

id
string
UUID of the payment split record.
payment
string
UUID of the associated payment.
farmer_amount
string
Amount allocated to the farmer (80% of payment). Decimal string in NGN.
rider_amount
string
Amount allocated to the rider (10% of payment). Decimal string in NGN.
platform_fee
string
Amount retained as the platform fee (10% of payment). Decimal string in NGN.
farmer_processed
boolean
true once the farmer payout linked to this split has been marked completed.
rider_processed
boolean
true once the rider payout linked to this split has been marked completed.
created_at
string
ISO 8601 timestamp of when the split was created.

Build docs developers (and LLMs) love