Skip to content

Create payment agreement

Payments
POSThttps://api.dcdial.com/api/type=create_payment_plan
PaymentsToken

Creates a payment agreement (a schedule of payments) for an account and sends it to the account holder by SMS, email or both to sign.

Payments start once the account holder signs. Use billing_dates and billing_amounts for an irregular schedule.

Parameters

Send as application/x-www-form-urlencoded.

  • typestringrequired

    Selects the operation. Always create_payment_plan for this endpoint.

  • tokenstringrequired

    Your API token from Log in. See Authentication.

  • account_idstringrequired

    Your reference for the account (its accountid).

    Example ACC-10045
  • billing_start_datestringrequired

    Date of the first payment (YYYY-MM-DD).

    Example 2026-11-01
  • total_paymentsintegerrequired

    Number of payments in the plan.

    Example 6
  • amountnumberrequired

    Amount in the account currency.

    Example 150
  • payment_schedulestringrequired

    How often payments are taken.

    One ofdailyweeklybiweeklymonthlybimonthlyquarterlyannuallybiannually
  • communication_methodstringrequired

    How the agreement is sent to the account holder to sign.

    One ofsmsemailboth
  • phone_numberstringrequired

    Phone number in E.164 or 10-digit US format.

    Example 5551234567
  • emailstringrequired

    Email address.

  • company_idintegerrequired

    Your DCDial company ID.

    Example 101
  • billing_datesstringoptional

    Explicit payment dates instead of a schedule, as a JSON array.

    Example ["2026-11-01","2026-12-01","2027-01-01"]
  • billing_amountsstringoptional

    Amounts for each date in billing_dates, as a JSON array.

    Example ["50.00","50.00","50.00"]

Notes

type=create_payment_agreement is another name for this endpoint and works the same way.

Terminal window
curl https://api.dcdial.com/api/ \
-d type=create_payment_plan \
-d token="$DCDIAL_TOKEN" \
-d account_id=ACC-10045 \
-d billing_start_date=2026-11-01 \
-d total_payments=6 \
-d amount=150 \
-d payment_schedule=daily \
-d communication_method=sms \
-d phone_number=5551234567 \
-d company_id=101
Response · 200 OK
{
"response": {
"success": 1,
"message": "Payment plan created successfully",
"agreement_id": 5521,
"agreement_link": "https://pay.dcdial.com/a/Xy12Ab",
"account_id": "ACC-10045",
"lead_id": "884512"
}
}

Try it

Environment