Refund Transaction

Read about how to create a Refund Transaction request using the sample files.

Refunds can be for the entire amount for a line (full refund) or a a part of the amount (partial refund).

To trigger a refund, you use the Refund Transaction request. For more information, see Refund Transaction.

After the request is sent successfully to Taxamo, a credit note is issued to the buyer according to the settings made in the Invoice configuration.

Process Flow

579

Refund Transaction Process Flow

The process flow is as follows:

  1. Buyer requests a refund.
    The buyer, Eric, wants to request a refund. He visits the Web Store and requests a refund.
  2. Store uses request to connect to Taxamo.
    The store is integrated with the Taxamo using the Refund Transaction request. The request uses the transaction key generated in the earlier Store Transaction request to identify the correct transaction and issue a credit note with the relevant details.
  3. Credit note issued to buyer.
    Taxamo creates and sends a credit note similarly to how an invoice is sent for a confirmed transaction.
  4. Buyer receives credit note.
    Eric is sent the following credit note:
1036

Example Credit Note

Notes on the Request

Ensure that you retrieve the key field value from the previous Store Transaction request. You enter this in Postman to refund the transaction. For example:

1298

This sample request is for a full refund. It contains the line_key field to specify the transaction line that is to be refunded:

{
     "refunds": [
          {
               "line_key": "{{seller-transaction-line-key}}",
               "refund_amount": "{{seller-transaction-line-amount}}",
               "refund_reason": "returned under warranty"
          }
     ]
}

Notes on the Response

Taxamo breaks the refunded amount into the refunded tax (refund_tax_amount field) and the total refunded amount ('refund_total_amount` field). It also includes some other information.

],
                        "refund_tax_amount": 1.99,
                        "refund_note_number": 1,
                        "refund_note_subnumber": 1,
                        "refund_key": "akOAHxZctxoMyLB4xkZz9g",
                        "refund_total_amount": 21.94
                    }

Request

In this example, we have used variables to allow you to use environmental variables. You can use these or just enter the values manually:

{
     "refunds": [
          {
               "line_key": "{{seller-transaction-line-key}}",
               "refund_amount": "{{seller-transaction-line-amount}}",
               "refund_reason": "returned under warranty"
          }
     ]
}

Response

{
    "transaction": {
        "ship_to_address": {
            "city": "Paris",
            "country_code": "FR",
            "postal_code": "75008 ",
            "street_name": "Rue du Saint-Germain",
            "address_detail": "Chateuax 12",
            "building_number": "55",
            "tax_region": "EU"
        },
        "amount": 19.95,
        "required_fields": {
            "tax_required_fields": [],
            "audit_required_fields": [],
            "storage_required_fields": []
        },
        "refunded_amount": 19.95,
        "marketplace_code": "Taxamo",
        "tax_country_codes": "FR",
        "key": "PNI3PZQAAG87FUbbtCmIB6KluHsxhlOWbvurWLw",
        "tax_amount": 2,
        "invoice_timestamp": "2021-11-17T11:20:59Z",
        "confirm_timestamp": "2021-11-17T11:24:25Z",
        "tax_liability_owner_codes": "Taxamo",
        "create_timestamp": "2021-11-17T11:20:59Z",
        "transaction_lines": [
            {
                "description": "Smoked herrings",
                "reverse_charge": false,
                "amount": 19.95,
                "refunded_amount": 19.95,
                "tax_rule_applied": "physical-tax",
                "unit_price": 19.95,
                "taxes": [
                    {
                        "rate": 10,
                        "tax_name": "European VAT",
                        "rate_type": "Reduced",
                        "amount_fraction_taxable": 1,
                        "tax_base_amount": 19.95
                    }
                ],
                "tax_amount": 2,
                "import_address": {
                    "country_code": "FR",
                    "tax_region": "EU"
                },
                "tax_liability_rule": "physical-shipment-into-EU-goods-below-150-eur-with-ioss-non-EU-supplier",
                "platform_liability_assumed_amount": 19.95,
                "seller_tax_number": "IE3764989CH",
                "tax_region": "EU",
                "invoice_place": "The RDI Hub, Killarney Road, Killorglin, Co. Kerry, V93 KP68",
                "invoice_number": "FR2021-11-17-1",
                "tax_exempt": false,
                "additional_currencies": {
                    "consignment": {
                        "currency_code": "EUR",
                        "fx_date": "2021-11-17T11:20:59Z",
                        "fx_rate": 1,
                        "fx_source": "ECB"
                    }
                },
                "tax_country_code": "FR",
                "special_tax_scheme": "IOSS",
                "line_key": "PbXH_wSheSKdsx9f",
                "custom_id": "51315A00-DC44-408E-A575-8CE42A32AE1B",
                "refunded_tax_amount": 1.99,
                "tax_address_kind": "ship_to_address",
                "ship_from_address": {
                    "city": "London",
                    "country_code": "GB",
                    "postal_code": "SW1A 2AA",
                    "street_name": "Wessex End Street",
                    "building_number": "12",
                    "tax_region": "GB"
                },
                "tax_engine": "taxamo",
                "invoice_status": "R",
                "kind": "b2c",
                "invoice_image_url":"{Invoice_url}",
                "tax_number_service": "vies",
                "refunded_total_amount": 21.94,
                "product_class": "P",
                "fees": [
                    {
                        "amount": {
                            "amount": 2,
                            "currency_code": "EUR"
                        },
                        "fee_key": "ybj6qNfT2C5mS2U0",
                        "rule": "tax-fee",
                        "type": "tax-fee",
                        "seller_code": "seller_jftest_1",
                        "currency_code": "EUR"
                    }
                ],
                "tax_liability_owner_code": "Taxamo",
                "line_num": 1,
                "is_seller_permanent": true,
                "quantity": 1,
                "ioss_number": "IM1234567890",
                "invoice_capable": true,
                "total_amount": 21.95,
                "seller_code": "seller_jftest_1",
                "product_cn_code": "0305420000",
                "invoice_image_url_secret": "pJdWdrsUP_9HBtN2",
                "refunds": [
                    {
                        "refund_reason": "returned under warranty",
                        "refund_amount": 19.95,
                        "refund_timestamp": "2021-11-17T11:25:46Z",
                        "refund_note_url": "https://marketplace-api.sandbox.marketplace.taxamo.com/html/v3/invoices/PNI3PZQAAG87FUbbtCmIB6KluHsxhlOWbvurWLw/0/pJdWdrsUP_9HBtN2/FR2021-11-17-1/refunds/1",
                        "refund_fees": [
                            {
                                "amount": {
                                    "amount": -1.99,
                                    "currency_code": "EUR"
                                },
                                "fee_key": "4Y21IL003MACGxu3",
                                "rule": "negative-fee",
                                "type": "refunded-tax-fee",
                                "seller_code": "seller_jftest_1",
                                "correlated_fee_key": "ybj6qNfT2C5mS2U0"
                            }
                        ],
                        "refund_tax_amount": 1.99,
                        "refund_note_number": 1,
                        "refund_note_subnumber": 1,
                        "refund_key": "akOAHxZctxoMyLB4xkZz9g",
                        "refund_total_amount": 21.94
                    }
                ],
                "tax_entity_name": "France",
                "tax_supported": true
            }
        ],
        "discounts": [],
        "location_evidence": {},
        "vouchers": [],
        "refunded_tax_amount": 1.99,
        "product_classes": "P",
        "billing_address": {
            "city": "Paris",
            "country_code": "FR",
            "postal_code": "75008 ",
            "street_name": "Rue du Saint-Germain",
            "address_detail": "Chateuax 12",
            "building_number": "55",
            "tax_region": "EU"
        },
        "status": "C",
        "refunded_total_amount": 21.94,
        "update_timestamp": "2021-11-17T11:20:59Z",
        "fees": [
            {
                "amount": {
                    "amount": 2,
                    "currency_code": "GBP"
                },
                "fee_key": "61p_fO8Mw1b233U7",
                "rule": "flat-fee",
                "type": "amount-fee",
                "seller_code": "seller_jftest_1"
            }
        ],
        "buyer_name": "Eric Papin",
        "tax_timestamp": "2021-11-17T11:20:59Z",
        "total_amount": 21.95,
        "invoice_image_url_secret": "pJdWdrsUP_9HBtN2",
        "currency_code": "EUR"
    }
}