Paritial payments

  • 1
  • Question
  • Updated 4 months ago
Can anyone suggest best practices for implementing partial payments in Avalara, should we create a new transaction on receiving full payment or should we adjust the existing transaction once the payment is fulfilled.
Photo of s

s

  • 21 Posts
  • 0 Reply Likes

Posted 4 months ago

  • 1
Photo of Wayne Myer

Wayne Myer, Official Rep

  • 210 Posts
  • 25 Reply Likes
Hi There,

Partial payments are an interesting case, and jurisdictions have different rules governing long-running transactions, for example layaway or installment payments for custom fabrication. To state that another way, the jurisdictions where you have nexus can have varying rules.

To use Pennsylvania as an example, layaway transactions must collect the total sales tax for the transaction at the first payment (ref: PA 33.4). Arizona, in contrast, requires sales tax collection on the full value when transfer or ownership occurs or the amount paid into the transaction is considered non-refundable (ref: AZ R15-5-131). This is just to point out example differences that one may experience.

So the answer becomes... "it depends." In the case of Arizona, a regular CreateTransaction call when the layaway is closed out should cover your needs. In other long-running transactions, CreateOrAdjustTransaction is often the best fit. Since you can repeatedly update a transaction before committing, you commit the transaction once it is finalized. 

If you have a specific set of rules to which you are attempting to adapt the AvaTax Transaction Lifecycle, let us know. With more concise information, we can provide better suggestions on which API calls to use and in which order.

Thank you,
Wayne Myer
Photo of s

s

  • 21 Posts
  • 0 Reply Likes
Thank you for your reply.
We are currently creating multiple transactions for a order.For eg, if the user pays 50% amount for 1 item in the first transaction, we create the transaction record in Avalara with the 50% amount and when the user pays remaining half we create a new transaction with the remaining 50% amount. 
While refunding, if user has paid just the 50% amount and second payment is pending we create a negative transaction with the 50% amount.
In case user has paid full amount, then we create two negative transactions with the amounts that are to be refunded.
Since we allow multiple partial refunds, we are again creating the multiple negative records with the amount to be returned from each transaction.
Could you please let us know if this flow is ok?
Photo of Wayne Myer

Wayne Myer, Official Rep

  • 210 Posts
  • 25 Reply Likes
Thank you for the greater detail. Again, how this should be handled is ultimately going to be determined by the jurisdictions in which you have nexus, that is, when the jurisdiction determines sales tax is due. 

Here is one potential AvaTax workflow that can apply in cases when sales tax is due at the completion of transaction:
  1. Customer pays 50%
    Use CreateOrAdjustTransaction, commit=false; use your own internal transaction ID as the docCode (field: "code") to tie the AvaTax document to your internal bookkeeping
  2. Customer cancels, deposit is returned
    Use VoidTransaction to set the transaction status to DocVoided
  3. Customer pays remaining balance
    Use CreateOrAdjustTransaction, commit=true, update the total accordingly; this transaction now becomes eligible for reporting
  4. Customer changes line items within the transaction before finalizing payment
    Use CreateOrAdjustTransaction to add or remove lines from the original transaction, commit=false
Let me know if helps you out.

Thank you,
Wayne Myer
Photo of s

s

  • 21 Posts
  • 0 Reply Likes
I have a follow up question to this reply.

Since we have a use case where one transaction can have one or more fully paid item and one partially paid item.
In this case, if the transaction remains uncommitted since the partially paid item is not fulfilled yet then the entire order will be skipped while reporting for that filing period.

We are currently making two separate transactions:
transaction 1:
50% paid item, fully paid items
transaction 2:
remaining 50%

refund transaction 1:
negative of fully paid items amount
negative of  50% amount
refund transaction 2:
negative of  remaining 50%

Also while creating the transactions, we create negative transaction and pass the tax amount with the tax override option.
So that the amount received by user in order confirmation mail is same as the amount that we are charging him/her when the pay the remaining amount.
We are trying to minimize number of uncommitted transactions during a filing period.
And while creating refunds, we are not using void transaction API call and using negative transactions to do refund since we have complex refund cases like users are allowed to refund a single order multiple times, they can refund at item level or at order level (certain % of amount deducted from each item), they can refund before paying for items fully and after paying for items fully. Order can have just partially paid items, just fully paid items and combination of fully paid and partially paid.
There are some sample items in the order, with $0 amount. 
There some orders where certain users pay $0 initially and later pay full amount.
Also, we are passing the discounted amount, instead of passing the discount separately.

Please let us know whether we can go ahead with this flow. 
(Edited)
Photo of s

s

  • 21 Posts
  • 0 Reply Likes
Thank you for the above reply. Please clarify this scenario. Suppose tax filing is due on 31st August. An order is placed on 30th August and 50% amount is paid. So the transaction will be in uncommitted state since it has not been fully charged. So should we file this 50% amount during next filing period and skip the filing of the 50% amount paid during the current filing period?
Photo of Wayne Myer

Wayne Myer, Official Rep

  • 210 Posts
  • 25 Reply Likes
The short answer: depends on the jurisdiction.

There are two situations at play here. First, if your transaction is uncommitted, it is omitted for reporting. Only when the transaction is committed is it considered for reporting. Second, you must contact your tax professional or relevant departments of revenue on when they consider a long-running transaction taxable.

Thank you,
Wayne Myer
Photo of s

s

  • 21 Posts
  • 0 Reply Likes
Thank you very much for your reply, I had few more questions regarding the refund API and the dates used in the above scenario:

1.These the our nexus states 'CA', 'OH', 'NY', 'MA', 'CO', 'TX', 'FL'. 

2. When the initial 50% amount is paid, we are using the date used to create the uncommitted for calculating the tax, later when the remaining amount is paid which date should we use for calculating the tax for remaining 50% amount? Should it be equal to the first transaction's date or the date when remaining payment is made.

3. We also have a case where some users are allowed to do $0 purchase and later after 30 days they pay the full amount.They are allowed to refund the order before paying the amount and are charged only for the items that they didn't return.

4. For normal orders where full amount is paid, with gift card purchase, 
Suppose if user makes purchase of $300,
$200- item 1 and $100- gift-card and decides to do order level partial refund of $50, we don't allow gift card refunds(amount should not be deducted from $100 gift card), but the $50 amount can be deducted from $200 item.
We are using this API : https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/RefundTransaction/

So if we use the refund transaction API with refundtype= percentage and send the percentage amount i.e 0.166667 to refund API, it deducts $33.33 from $200 item and $16.66 from $100 gift card.
So total amount deducted is $49.99 which is approximately equal to $50, but our use case requires skipping the $100 gift card from calculation while doing percentage refund.
We intend to deduct $50 amount from the $200 item. Could you please let us know if anything is available in Avalara refund API that allows to skip certain items while doing percentage refund?

5. I had another query about the above refundAPI, an order that is partial order level refunded can be refunded at item level from our system. eg. there are two items of $100, total amount paid is $200.
original transaction:
line number    amount         
line 1:             $100           
line 2:             $100

User decides to do order level partial refund from both items of $10, so amount refunded is $5 and $5 from each item. 

1st order level partial refund transaction:
line 1:              -$5
line 2:              -$5

Next time if the same user decides to do item level refund, and we pass the line numbers and use refund type=partial, it considers the original transaction and deducts -$100 and -$100 from each item, so extra refund of $10 is done.

2nd item level refund actually done:
line 1:             -$100
line 2:             -$100

2nd item level refund expected:
line 1:              -$95
line 2:              -$95

Could you please let us know this can be handled from Avalara API side?

6. For what duration are uncommitted transactions kept in Avalara?
(Edited)
Photo of Katina

Katina, Official Rep

  • 283 Posts
  • 28 Reply Likes
Regarding the question about recognizing and taxing the revenue from sales and payments, this is something that you'll need to decide from a business standpoint.

Depending on your business and the state in question, the state may allow you to recognize the sale when you receive payment ("cash based") or you may need to record (and tax) when you make the sale.

From the AvaTax side of things, we report sales and taxes based on the document date and calculate taxes based on the tax date (which defaults to the document date unless specifically overridden). If you keep these two rules in mind you can readily identify how the system will behave. Beyond that, when you want to calculate or remit the tax is something you would want to discuss with your tax professional or the state in question.

Regarding your specific scenarios:

2. This is going to be a business decision and we cannot tell you which date to use to calculate taxes. For remittance purposes, if you want the sale reported in the current period, you would need to use a current date for the document date.

3. In this case, it sounds like you would only invoice them for the items that they are keeping sine they never bought (or paid for) the items being returned.

4. If the user is buying a $200 worth of items (say fur $50 items) and a $100 gift card and then decides to return one of the $50 items, you'd simply process a refund for that item. The purchased gift card has nothing to do with the refund. You'd want to refund just the lines (and not percentage) or build the ReturnInvoice manually instead of using RefundTransaction. The percentage method for the RefundTransaction is generally used for very specific scenarios and doesn't sound like it is appropriate for your needs.

5. Using RefundTransaction to build a ReturnInvoice only considers the original SalesInvoice and not any previous refunds. Thus, you would need to keep track of this on your end to know how much was still outstanding to be refunded.

6. At this time, uncommitted transactions are kept indefinitely.

Give that you are looking at scenarios where you're refunding partial lines, it sounds like you might be better served by building the ReturnInvoice manually instead of using the RefundTransaction endpoint, which is designed for fairly standard return situations.  We have a blog post that does a great job of illustrating the different capabilities of the two options: https://www.avalara.com/us/en/blog/2018/12/refundtransaction-vs-createtransaction.html
Photo of s

s

  • 21 Posts
  • 0 Reply Likes
Thanks for your reply
Photo of s

s

  • 21 Posts
  • 0 Reply Likes
About the tax date override and tax amount override options, while doing refunds is tax date override preferred over tax amount override?
https://developer.avalara.com/avatax/dev-guide/discounts-and-overrides/overrides/#targetText=Overriding%20the%20Tax%20Amount,than%20having%20AvaTax%20calculate%20it.

If we use create transaction API to generate negative transaction for refunds, and we store the original tax amount in DB, can we use tax amount override while doing refunds?
(Edited)