Refund Transaction

You can issue a refund in any of the following circumstances:

  • Partial: Where only some of the lines in a transaction are refunded.
  • Full: Where all of the lines in a transaction are refunded.

Where Taxamo bears the liability, a credit note is issued to the Seller.

📘

Information

Refunds need to be generated at the line item level.

Use the following URL and a POST method to refund transactions:

{Taxamo_A_URL}/api/v3/seller/transactions/{key}/refunds

Where:

  • {Taxamo_A_URL} is the URL of the sandbox or production system.
  • {key} is the transaction key value. This specifies which transaction request you wish to refund. You also need to provide the line_key to identify which line to refund.

Details

TypeValue
Endpoint/api/v3/seller/transactions/{key}/refunds
MethodPOST
API Reference DocumentationRefund Transaction

Where {key} is the transaction key value. This specifies which transaction request you wish to refund.

Fields

For a full list of fields, see Fields Reference Overview.

❗️

Warning

The line_key field, which is used to identify which line to refund, is required.

The following table identifies some of the more prominent fields in this request:

FieldDescription
line_keyUnique identifier for the line that is to be refunded. This field is mandatory.
refund__total_amountIf you specify an amount here, the total amount including the tax is refunded. Taxamo does not calculate any tax.
refund_amountIf you specify an amount here, Taxamo calculates the tax based on this amount and that tax is refunded.
refund_reasonDescription of the reason for the refund.

Request Example

The following example shows how to model the required information to refund 19.95 EUR for the specified line key value (LSoVIkNietmI-Hov):

{
     "refunds": [
          {
               "line_key": "LSoVIkNietmI-Hov",
               "refund_amount": "19.95",
               "refund_reason": "returned under warranty"
          }
     ]
}

Response Example

Here is an example 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": "PqoUMkQAAG87PzCzCCmICQnQDqvFhBB5D1YyoMQ",
        "tax_amount": 2,
        "invoice_timestamp": "2021-07-30T15:44:03Z",
        "confirm_timestamp": "2021-07-30T15:44:08Z",
        "tax_liability_owner_codes": "Taxamo",
        "create_timestamp": "2021-07-30T15:44:03Z",
        "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.000,
                        "tax_name": "European VAT",
                        "rate_type": "Reduced",
                        "amount_fraction_taxable": 1,
                        "tax_base_amount": 19.95
                    }
                ],
                "tax_amount": 2.00,
                "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-7-30-9",
                "tax_exempt": false,
                "additional_currencies": {
                    "consignment": {
                        "currency_code": "EUR",
                        "fx_date": "2021-07-30T15:44:03Z",
                        "fx_rate": 1,
                        "fx_source": "ECB"
                    }
                },
                "tax_country_code": "FR",
                "special_tax_scheme": "IOSS",
                "line_key": "LSoVIkNietmI-Hov",
                "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.00,
                            "currency_code": "EUR"
                        },
                        "fee_key": "gV7LuePDhMrlhto8",
                        "rule": "tax-fee",
                        "type": "tax-fee",
                        "seller_code": "seller_vertex_5",
                        "currency_code": "EUR"
                    }
                ],
                "tax_liability_owner_code": "Taxamo",
                "line_num": 1,
                "is_seller_permanent": true,
                "quantity": 1.000000000000,
                "ioss_number": "{IOSS_Number}",
                "invoice_capable": true,
                "total_amount": 21.95,
                "seller_code": "seller_vertex_5",
                "product_cn_code": "0305420000",
                "invoice_image_url_secret": "sGy7DMsurr13TZng",
                "refunds": [
                    {
                        "refund_reason": "returned under warranty",
                        "refund_amount": 19.95,
                        "refund_timestamp": "2021-07-30T15:44:37Z",
                        "refund_note_url": "{Refund_URL}",
                        "refund_fees": [
                            {
                                "amount": {
                                    "amount": -1.99,
                                    "currency_code": "EUR"
                                },
                                "fee_key": "IcL09ZrTbD0-A1Vq",
                                "rule": "negative-fee",
                                "type": "refunded-tax-fee",
                                "seller_code": "seller_vertex_5",
                                "correlated_fee_key": "gV7LuePDhMrlhto8"
                            }
                        ],
                        "refund_tax_amount": 1.99,
                        "refund_note_number": 1,
                        "refund_note_subnumber": 1,
                        "refund_key": "2xsrW_WAgqm6b87mSOUQgg",
                        "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-07-30T15:44:03Z",
        "fees": [
            {
                "amount": {
                    "amount": 2,
                    "currency_code": "GBP"
                },
                "fee_key": "WhFdJRYEqGRthwYg",
                "rule": "flat-fee",
                "type": "amount-fee",
                "seller_code": "seller_vertex_5"
            }
        ],
        "buyer_name": "Eric Papin",
        "tax_timestamp": "2021-07-30T15:44:03Z",
        "total_amount": 21.95,
        "invoice_image_url_secret": "sGy7DMsurr13TZng",
        "currency_code": "EUR"
    }
}