Get agreement details
Returns a payment agreement with its schedule and payment history.
Parameters
Send as application/x-www-form-urlencoded.
typestringrequiredSelects the operation. Always
agreement_detailsfor this endpoint.tokenstringrequiredYour API token from Log in. See Authentication.
Your reference for the account (its accountid).
ExampleACC-10045Your DCDial company ID.
Example101ID of the payment agreement.
Example5521
curl https://api.dcdial.com/api/ \ -d type=agreement_details \ -d token="$DCDIAL_TOKEN" \ -d account_id=ACC-10045 \ -d company_id=101<?php$ch = curl_init('https://api.dcdial.com/api/');curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => http_build_query([ 'type' => 'agreement_details', 'token' => getenv('DCDIAL_TOKEN'), 'account_id' => 'ACC-10045', 'company_id' => 101, ]),]);$result = json_decode(curl_exec($ch), true);curl_close($ch);
if (($result['response']['success'] ?? 0) != 1) { throw new RuntimeException($result['response']['error'] ?? 'Request failed');}const res = await fetch('https://api.dcdial.com/api/', { method: 'POST', body: new URLSearchParams({ type: "agreement_details", token: process.env.DCDIAL_TOKEN, account_id: "ACC-10045", company_id: "101", }),});const { response } = await res.json();if (response.success != 1) throw new Error(response.error);import osimport requests
r = requests.post( "https://api.dcdial.com/api/", data={ "type": "agreement_details", "token": os.environ["DCDIAL_TOKEN"], "account_id": "ACC-10045", "company_id": 101, }, timeout=30,)response = r.json()["response"]if str(response.get("success")) != "1": raise RuntimeError(response.get("error")){ "response": { "agreement_id": "5521", "agreement_status": "Active", "account_id": "ACC-10045", "first_name": "Jane", "last_name": "Doe", "phone_number": "5550100123", "start_date": "2026-11-01", "payment_frequency": "monthly", "amount": "150.00", "total_payments": "6", "remaining_payments": "5", "successful_payments": "1", "failed_payments": "0", "next_billing_date": "2026-12-01", "exclude_holidays": "N", "initial_balance": "900.00", "remaining_balance": "750.00", "payment_method": "CC", "cc_4digit": "4242", "last_payment_status": "Completed", "schedule_id": "77120", "agent": "jane.agent", "voided_refunded_payments": 0, "voided_nsf_payments": 0, "voided_chargedback_payments": 0, "voided_other_payments": 0 }}Try it