# Send the current transaction date as the document date for refunds

Source: https://developer.avalara.com/erp-integration-guide/transactions/certification-requirements/send-current-transaction-date/

**Element type:** Required for Refunds

**Endpoints/models used:** [CreateTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/), [RefundTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/RefundTransaction/)

When issuing refunds for transactions that occurred on earlier dates, you should provide a way to include the current transaction date for recording purposes.

Imagine a scenario where a customer purchases an item on October 1 and then returns the item on October 10. The date used for posting this refund should be October 10. It should not be the original transaction date of October 1.

When issuing refunds using the [CreateTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/) API, send the current transaction date using the `date` field in the CreateTransactionModel.

When issuing refunds using the [RefundTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/RefundTransaction/) API, send the current transaction date using the `refundDate` field in the RefundTransactionModel..

[![Closed](https://avalara-devdocs-prod.mcoutput.com/avatax-for-erps/Content/Skins/Default/Stylesheets/Images/transparent.gif)View CreateTransaction example](javascript:void\(0\);)

When using CreateTransaction, include the current transaction date in the invoice. In the example below, the date when the return is issued is July12, 2024.

```
 {  "lines": [    {      "number":"1",      "quantity":1,      "amount":-100,      "taxCode":"P0000000",      "itemCode":"Test SKU",      "description":"Test Item Description"    }  ],  "taxOverride":{    "type": "TaxDate",    "taxDate":"2024-06-29",    "reason": "Return"  },  "addresses": {    "singleLocation":{      "line1":"100 Ravine Ln NE",      "city":"Bainbridge Island",      "region":"WA",      "country":"US",      "postalCode":"98110-2687"    }  },   "type":"ReturnInvoice",  "code":"TestTransactions2",  "companyCode":"DEFAULT",  "date":"2024-07-12",  "customerCode":"Test Customer ID",  "commit":true,  "currencyCode":"USD"}
```

[![Closed](https://avalara-devdocs-prod.mcoutput.com/avatax-for-erps/Content/Skins/Default/Stylesheets/Images/transparent.gif)View RefundTransaction example](javascript:void\(0\);)

When using RefundTransaction, use the `refundDate` field to specify the date when this refund is issued. In the example below, the refund date is July 12, 2024.

```
curl    -X POST    -H 'Accept: application/json'    -H 'Authorization: Basic ${btoa!(`:`)}'    -H 'Content-Type: application/json'    --data '{      "refundTransactionCode": "RefundTransactionTest",      "refundDate": "2024-07-12",      "refundType": "Full",      "referenceCode": "Refund for a committed transaction"    }'    'https://sandbox-rest.avatax.com/api/v2/companies/DEFAULT/transactions/TestTransactions1/refund'        
```