Store Transaction

Read about how to store transactions.

You can use this endpoint and a POST method to store transaction data.

The service stores a transaction to enable the displaying of tax information for unconfirmed payments.

To store a transaction, use a POST method and the following URL:

{service_URI}/api/v3/marketplace/transactions

where {service_URI} is the service's URI.

For example:

curl --request POST \
  --url https://marketplace-api.sandbox.marketplace.taxamo.com/api/v3/marketplace/transactions \

Details

TypeValue
Endpoint/api/v3/marketplace/transactions
MethodPOST
Seller API Reference DocumentationStore Transaction

Fields

The fields are listed in the Transactions Fields Reference section.

Request Example

The following example is a transaction for physical goods:

curl --request POST \
  --url https://marketplace-api.sandbox.marketplace.taxamo.com/api/v3/marketplace/transactions \
  --header 'content-type: application/json' \
  --header "x-marketplace-token: $TOKEN" \
  --data '{
	"transaction": {
		"currency_code": "EUR",
		"buyer_name": "Scenario #1 buyer",
    "invoice_timestamp": "2020-05-20T01:59:59+04:00",
		"ship_to_address": {
			"street_name": "30 Monmouth Street",
			"city": "Bath",
			"postal_code": "BA1 2AP",
			"country_code": "GB"
		},   
		"description": "Example sale to GB.",
		"transaction_lines": [
			{
        "seller_code": "EU1M",
				"custom_id": "line_1",
				"amount": 200,
				"ship_from_address": {"country_code": "CN"},
				"product_class": "P",
				
				"description": "Goods #1",				
				"parcel_reference": "3897329872423",
				"carrier_id": "DHL",
        "product_cn_code": "8504 31 80 15",
        "product_reference_number": ""
        
        
			}, 
    {
        "seller_code": "CN1M",
				"custom_id": "line_2",
				"amount": 100,
				"ship_from_address": {"country_code": "PL"},
				"product_class": "P",
				
				"description": "Goods #2",				
				"parcel_reference": "3897329872423",
				"carrier_id": "DHL",
        "product_cn_code": "8504 31 80 15",
        "product_reference_number": ""
        
        
    }]
	}
}'

Response Example

The following output is returned, containing the key ( "key" : "PJyj7WQAAAAYTSOvTCmQLpBvs7KRe1lL6v3GSnQ") attribute that will be used in the subsequent Confirm Transaction request:

{
   "transaction" : {
      "update_timestamp" : 1591104250934,
      "required_fields" : {
         "storage_required_fields" : [],
         "tax_required_fields" : [],
         "audit_required_fields" : []
      },
      "invoice_timestamp" : "2020-05-20T01:59:59+04:00",
      "tax_amount" : 20,
      "ship_to_address" : {
         "country_code" : "GB",
         "street_name" : "30 Monmouth Street",
         "city" : "Bath",
         "postal_code" : "BA1 2AP"
      },
      "description" : "Example sale to GB.",
      "currency_code" : "EUR",
      "tax_liability_owner_codes" : "buyer,P1",
      "invoice_place" : "VILLENEUVE D'ASCQ, 4 BD DE MONS",
      "location_evidence" : {},
      "invoice_address" : {
         "country_code" : "GB",
         "postal_code" : "BA1 2AP",
         "city" : "Bath",
         "street_name" : "30 Monmouth Street"
      },
      "product_classes" : "P",
      "amount" : 300,
      "total_amount" : 320,
      "transaction_lines" : [
         {
            "deducted_tax_amount" : 0,
            "reverse_charge" : false,
            "carrier_id" : "DHL",
            "tax_engine" : "taxamo",
            "unit_price" : 200,
            "kind" : "b2c",
            "quantity" : 1,
            "tax_country_code" : "GB",
            "taxes" : [],
            "product_reference_number" : "",
            "description" : "Goods #1",
            "tax_liability_owner_code" : "buyer",
            "tax_liability_rule" : "physical-shipment-into-EU-goods-above-150-eur",
            "amount" : 200,
            "custom_id" : "line_1",
            "tax_entity_name" : "United Kingdom",
            "total_amount" : 200,
            "product_cn_code" : "8504 31 80 15",
            "parcel_reference" : "3897329872423",
            "ship_from_address" : {
               "country_code" : "CN"
            },
            "line_num" : 1,
            "deducted_tax_rate" : 0,
            "tax_address_kind" : "ship-to-address",
            "seller_code" : "EU1M",
            "tax_region" : "EU",
            "product_class" : "P",
            "tax_supported" : true,
            "tax_number_service" : "vies",
            "line_key" : "mpbZeqL1Dclo52tp"
         },
         {
            "line_num" : 2,
            "ship_from_address" : {
               "country_code" : "PL"
            },
            "seller_code" : "CN1M",
            "tax_region" : "EU",
            "tax_address_kind" : "ship-to-address",
            "tax_entity_name" : "United Kingdom",
            "total_amount" : 120,
            "product_cn_code" : "8504 31 80 15",
            "parcel_reference" : "3897329872423",
            "back_to_back_transaction_key" : "PUEp5agAAAAg3V1FBAAAAAEFBQVkAAA5pVFNPdlBKeWo3V1FBQUFBWVRTT3ZUQ21RTHBCdnM3S1JlMWxMNnYzR1NuUS5QLlBMLjg",
            "line_key" : "5fdQ8TiVelhNXMrZ",
            "tax_supported" : true,
            "product_class" : "P",
            "tax_number_service" : "vies",
            "back_to_back_invoice_country_code" : "PL",
            "tax_engine" : "taxamo",
            "unit_price" : 100,
            "quantity" : 1,
            "kind" : "b2c",
            "back_to_back_external_unique_id" : "PJyj7WQAAAAYTSOvTCmQLpBvs7KRe1lL6v3GSnQ.P.PL.8",
            "reverse_charge" : false,
            "carrier_id" : "DHL",
            "tax_amount" : 20,
            "tax_liability_rule" : "physical-shipment-inside-EU-seller-outside-EU",
            "tax_liability_owner_code" : "P1",
            "custom_id" : "line_2",
            "amount" : 100,
            "tax_country_code" : "GB",
            "product_reference_number" : "",
            "taxes" : [
               {
                  "amount_fraction_taxable" : 1,
                  "tax_name" : "European VAT physical",
                  "rate" : 20,
                  "rate_type" : "Standard"
               }
            ],
            "description" : "Goods #2"
         }
      ],
      "test" : false,
      "buyer_name" : "Scenario #1 buyer",
      "key" : "PJyj7WQAAAAYTSOvTCmQLpBvs7KRe1lL6v3GSnQ",
      "countries" : {},
      "marketplace_code" : "P1",
      "create_timestamp" : "2020-06-02T13:24:10Z",
      "status" : "N",
      "tax_country_codes" : "GB"
   }
}