Skip to content

Refund a payment

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

Refunds all or part of a card or ACH payment to the original payment method.

Parameters

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

  • typestringrequired

    Selects the operation. Always payment_refund 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 to refund. Less than the original amount for a partial refund.

    Example 150
  • transaction_idstringrequired

    Gateway transaction ID.

    Example ch_3Q8x2e
  • order_idstringrequired

    DCDial order ID.

    Example 77412
  • company_idintegerrequired

    Your DCDial company ID.

    Example 101
  • refund_feestringoptional

    Y to also refund the convenience fee.

    One ofYN
Terminal window
curl https://api.dcdial.com/api/ \
-d type=payment_refund \
-d token="$DCDIAL_TOKEN" \
-d account_id=ACC-10045 \
-d amount=150 \
-d transaction_id=ch_3Q8x2e \
-d order_id=77412 \
-d company_id=101
Response · 200 OK
{
"response": {
"success": "1",
"order_id": "77412",
"error": ""
}
}

Try it

Environment