Search code examples
recurly

Preview vat amounts for a one time transaction using recurly


We use Recurly to manage subscription payments and one time transactions.

RecurlyJS V3 provides a way to give the user a preview of the total amount including tax for subscription plans following the new (2015) EU VAT regulations. Is there a way to get a preview for the total amount (including tax) for one time transactions?


Solution

  • If you use the standard one-time transaction functionality (ie https://docs.recurly.com/api/transactions#create-transaction), you will not be given a tax preview.

    However, if you first post a charge (https://docs.recurly.com/api/adjustments#create-adjustment), you can then do an invoice preview (https://docs.recurly.com/api/invoices#preview-invoice).

    The main difference between these two pieces of functionality is what happens if the payment fails. In the case of a one-time transaction, it's all or nothing - if any part of the process fails, the transaction does not get created. By posting a charge, however, if the payment fails the invoice is still created but then enters the dunning process. For some merchants one behavior is more desirable than the other, so just something to keep in mind!