Endpoint
Overview
Use this endpoint to refund a payment or void an eligible transaction. The system automatically determines whether to perform a refund or void based on the transaction timing and type.Void vs Refund: If the transaction is eligible to be voided, the system will perform a void instead of a refund. Voids are processed faster and don’t incur additional processing fees.
Void Eligibility
Transactions can be voided under these conditions:- Card Transactions: Can be voided before 11:59 PM PST on the same day the transaction was processed
- ACH Transactions: Cannot be voided through the API. Contact support for ACH transaction issues.
Authentication
| Header | Value | Required |
|---|---|---|
x-api-key | Your API key from onboarding | Yes |
Authorization | Bearer {appToken} | Yes |
appId | Your application ID | Yes |
Content-Type | application/json | Yes |
Request Body
Must be
"payments"Container for payment attributes
Must be
"refund" for refund/void operationsThe payment ID of the original transaction to refund or void
Transaction details
Optional JSON string with refund reason or additional metadata
Example Request - Full Refund
Example Request - Partial Refund
Response
Success Response (201 Created)
Indicates whether transaction was voided (
"void") or refunded ("refund")Code Examples
Void vs Refund Comparison
| Feature | Void | Refund |
|---|---|---|
| Timing | Same day before 11:59 PM PST | Any time after settlement |
| Processing Speed | Immediate | 3-10 business days |
| Additional Fees | None | May incur refund processing fees |
| Fund Return | Instantly released on customer’s card | Processed as credit to customer’s card |
| Transaction Record | Transaction cancelled | New refund transaction created |
Error Responses
Common Error Scenarios
Payment not found
Payment not found
Error: 404 Not FoundSolution: Verify the parentPaymentId is correct and the payment exists in your account.
Refund amount exceeds original
Refund amount exceeds original
Error: 400 Bad RequestSolution: Ensure the refund amount doesn’t exceed the original transaction amount or the remaining refundable balance.
Payment already refunded
Payment already refunded
Error: 422 Unprocessable EntitySolution: Check the payment status. If already fully refunded, no additional refunds are possible.
ACH refund attempted
ACH refund attempted
Error: 422 Unprocessable EntitySolution: Contact Digitzs support for ACH refund processing. ACH refunds require special handling.
Important Notes
ACH Transactions: Do not use this endpoint for ACH transactions. Contact Digitzs support for ACH refund assistance.
Partial Refunds: Multiple partial refunds are supported up to the original transaction amount.
Void Window: Process refunds on the same day before 11:59 PM PST to get instant voids instead of multi-day refunds.
Best Practices
- Check Timing: If same-day, consider the void window for faster processing
- Track Refunds: Monitor all refund transactions for reconciliation
- Document Reasons: Use miscData to record why refunds were issued
- Validate Amounts: Ensure refund amount doesn’t exceed original or remaining balance
- Customer Communication: Inform customers about refund processing time (instant void vs 3-10 day refund)
- Handle Splits: Use the split refund endpoint for split payments
Next Steps
Refund Split Payment
Learn how to refund split payments
Get Payment Status
Check refund status

