Contacts and Payments API

Mark Edesy Collect debtors paid, promised or stopped, and set payment status from your payment system with the payment webhook endpoint.

1 min read

Base URL
https://voice-api.edesy.in/v1/collect
Auth
Authorization: Bearer sk_...Get a key

These endpoints change a debtor's payment status. Any status other than pending cancels the debtor's next scheduled call. Use the per-contact endpoints from your own tools, or the payment webhook endpoint from your payment system. Each takes the debtor's contact ID, which you get from the campaign's contact list.

Find the contact ID#

curl "https://voice-api.edesy.in/v1/campaigns/CAMPAIGN_ID/contacts?page=1&per_page=50" \
  -H "Authorization: Bearer sk_your_api_key"

The response has data (contacts, each with id, phone_number and payment_status) and meta (total, page, per_page).

Mark one debtor#

POST /v1/collect/contacts/:id/paid
POST /v1/collect/contacts/:id/promised
POST /v1/collect/contacts/:id/stop

No body. Response:

{ "status": "ok", "payment_status": "promised" }

Payment webhook#

POST/v1/collect/webhooks/payment
Field Type Required Description
contact_id uuid Required The debtor's contact ID
status string Optional paid (default), promised, stopped or pending
curl -X POST https://voice-api.edesy.in/v1/collect/webhooks/payment \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"contact_id": "CONTACT_ID"}'
{ "status": "ok" }

Idempotent: repeating the same status is safe. It authenticates with your API key like the other endpoints. See Payment Webhook and Razorpay for wiring it to your payment gateway.

Errors#

Status When
400 Invalid contact ID or status
404 Contact not found in your workspace
Was this page helpful?