Skip to content

Process a payment

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

Charges a card or bank account now, once or on a recurring schedule.

Needs a payment processor set up in DCDial. Prefer payment links, which keep card data off your servers.

Parameters

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

  • typestringrequired

    Selects the operation. Always charge_customer for this endpoint.

  • tokenstringrequired

    Your API token from Log in. See Authentication.

  • account_idstringrequired

    Your reference for the account (its accountid).

    Example ACC-10045
  • amountnumberrequired

    Amount in the account currency.

    Example 150
  • payment_methodstringrequired

    Card (CC) or bank account (ACH).

    One ofCCACH
  • phone_numberstringrequired

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

    Example 5551234567
  • company_idintegerrequired

    Your DCDial company ID.

    Example 101
  • agentstringrequired

    Username of the agent taking the payment.

    Example jane.agent
  • currency_codestringrequired

    Currency of the payment.

    One ofUSDGBP
  • first_namestringrequired

    First name.

    Example Jane
  • last_namestringrequired

    Last name.

    Example Doe
  • descriptionstringoptional

    Description shown on the receipt.

  • cc_numberstringoptional

    Card number. Required when payment_method=CC.

    Example 4242424242424242
  • cc_expiry_datestringoptional

    Card expiry date (MMYY). Required when payment_method=CC.

    Example 1229
  • cc_cvvstringoptional

    Card security code. Required when payment_method=CC.

    Example 123
  • card_holder_namestringoptional

    Name on the card. Required when payment_method=CC.

    Example Jane Doe
  • routing_numberstringoptional

    Bank routing number. Required when payment_method=ACH.

    Example 110000000
  • bank_account_numberstringoptional

    Bank account number. Required when payment_method=ACH.

    Example 000123456789
  • bank_namestringoptional

    Bank name. Required when payment_method=ACH.

    Example Example Bank
  • account_holder_namestringoptional

    Name on the bank account. Required when payment_method=ACH.

    Example Jane Doe
  • addressstringoptional

    Street address.

  • citystringoptional

    City.

  • zipcodestringoptional

    ZIP code.

  • isrecurringstringoptional

    Y to set up recurring payments with start_date and total_payments.

    One ofYN
  • start_datestringoptional

    Date of the first recurring payment (YYYY-MM-DD). Required when isrecurring=Y.

    Example 2026-10-01
  • total_paymentsintegeroptional

    Number of recurring payments. Required when isrecurring=Y.

    Example 6
  • billing_address1stringoptional

    Billing address line 1.

  • billing_address2stringoptional

    Billing address line 2.

  • billing_citystringoptional

    Billing city.

  • billing_zipcodestringoptional

    Billing ZIP code.

  • billing_statestringoptional

    Billing state.

  • billing_countrystringoptional

    Billing country.

  • email_addressstringoptional

    Email for the receipt.

Terminal window
curl https://api.dcdial.com/api/ \
-d type=charge_customer \
-d token="$DCDIAL_TOKEN" \
-d account_id=ACC-10045 \
-d amount=150 \
-d payment_method=CC \
-d phone_number=5551234567 \
-d company_id=101 \
-d agent=jane.agent \
-d currency_code=USD \
-d first_name=Jane \
-d last_name=Doe
Response · 200 OK
{
"response": {
"approved": 1,
"transaction_id": "ch_3Q8x2e",
"invoice_id": 88812,
"message": "Payment approved"
}
}

Try it

Environment