FastCheckout shipping options request

If you cannot send your available shipping options for the shipping element on the FastCheckout page in your create order request, you can trigger a GET or POST request from MultiSafepay to your webhook endpoint to retrieve the options.

How it works

FastCheckout shipping options

Integration

To trigger the shipping options request, in your create order request, set checkout_options.use_shipping_notification (boolean) to true.

See Recipe ā€“ Create a FastCheckout page > Step 6. Configure shipping options.

Request

Via notification_url

  1. In payment_options.notification_url, specify your webhook endpoint.
  2. Set payment_options.notification_method to POST (recommended) or GET.

See Recipe ā€“ Create a FastCheckout page > Step 1. Create an order.

POST

The following is an example POST request from MultiSafepay to you.

{
  "order_id":"my-order-id-1",
  "amount":"9810",
  "currency":"EUR",
  "customer":{
    "locale":"nl_NL",
    "ip_address":"127.0.0.1",
    "forwarded_ip":"127.0.0.1",
    "first_name":"Simon",
    "last_name":"Smit",
    "address1":"Kraanspoor",
    "address2":"",
    "house_number":"39",
    "zip_code":"1033 SC",
    "city":"Amsterdam",
    "country":"NL",
    "phone":"0612345678",
    "email":"[email protected]"
  },
  "delivery":{
    "locale":"nl_NL",
    "ip_address":"127.0.0.1",
    "forwarded_ip":"127.0.0.1",
    "company_name":"",
    "first_name":"Delivery name",
    "last_name":"Delivery Last name",
    "address1":"Kraanspoor",
    "address2":"",
    "house_number":"39",
    "zip_code":"1033 SC",
    "city":"Amsterdam",
    "state":"Noord-Holland",
    "country":"NL",
    "phone":"0612345678",
    "email":"[email protected]"
  },
  "shopping_cart":{
    "items":[
      {
        "name":"Geometric Candle Holders",
        "description":"",
        "unit_price":60,
        "quantity":"1",
        "merchant_item_id":"hdd0061",
        "tax_table_selector":"2",
        "weight":{
          "unit":"KG",
          "value":"1"
        }
      },
      {
        "name":"Mordern Candle Holders",
        "description":"",
        "unit_price":30,
        "quantity":"1",
        "merchant_item_id":"hdd006",
        "tax_table_selector":"2",
        "weight":{
          "unit":"KG",
          "value":"1"
        }
      }
    ]
  }
}
Parameters key
ParameterTypeDescription
order_idstringYour unique (client-defined) identifier for the order.
amountintegerThe payment amount in the currency's smallest unit:
- Decimal currencies: Value for 10 EUR = 1000 (1000 cents)
- Zero-decimal currencies: Value for 10 YEN = 10
currencyThe currency of the payment.
Format: ISO-4217 currency code .
customerobjectSee Recipes ā€“ Customer object .
deliveryobjectSee Recipes ā€“ Delivery object .
shopping_cartobjectSee Recipes ā€“ Display shopping cart .

GET

The following is an example GET request from MultiSafepay to you.

The data is sent as query parameters.

%notification_url%?
identifier=shipping&
country=Netherlands&
countrycode=NL&
weight=2&
transactionid=my-order-id-1&
currency=EUR&
amount=9810&
total_incl_vat=9810&
total_incl_vat_excl_shipping=9810&
items_count=2
Query parameters key
ParameterDescription
notification_urlThe webhook endpoint for MultiSafepay to send order updates and other notifications for this site.
See also feed_url below.
identifierThe identifier of the request. Set to shipping.
countryThe customer's country.
countrycodeThe country code.
Format: ISO-3166-1 alpha-2 , e.g. NL.
weightThe weight of the item to be shipped.
transactionidMultiSafepay's unique identifier for the transaction.
currencyThe currency of the shipping cost.
Format: ISO-4217 currency code .
amountThe total amount of the order.
total_incl_vatThe total amount of the order including VAT.
total_incl_vat_excl_shippingThe total amount of the order, including VAT and excluding the shipping cost.
items_countThe total number of items in the order.

Via feed_url

An alternative to payment_options.notification_url is payment_options.feed_url, which is a dedicated webhook URL for non-order related updates, particularly shipping options. It defaults to POST.

Response

We expect to receive your response formatted as follows:

{
  "pickup":{
    "name":"PostNL pickup points",
    "provider":"PostNL",
    "price":6
  },
  "flat_rate_shipping":[
    {
      "name":"TNT - Netherlands",
      "price":7,
      "allowed_areas":[
        "NL"
      ]
    },
    {
      "name":"Seur - Spain",
      "price":7,
      "allowed_areas":[
        "ES"
      ]
    },
    {
      "name":"TNT - Belgium & France",
      "price":12,
      "allowed_areas":[
        "BE",
        "FR",
      ]
    }
  ]
}
Attributes key
AttributeTypeDescription
pickupobjectInformation about available pickup points.
pickup.namestringThe name of the pickup point.
pickup.providerstringThe name of the shipping company.
pickup.pricenumber (float)The shipping cost as a whole number or decimal number.
Example: 5 EUR = 5 and 5.50 EUR = 5.5
flat_rate_shippingarrayInformation about shipping options for a fixed cost.
flat_rate_shipping.namestringThe name of the fixed-rate shipping option.
flat_rate_shipping.pricenumber (float)The cost of the fixed-rate shipping option.
Example: 5 EUR = 5 and 5.50 EUR = 5.5
flat_rate_shipping.allowed_areasarrayA list of available countries for the shipping option. All other countries are excluded.
The availability is based on the country of the customer's shipping address.
Format: ISO-3166-1 alpha-2 , e.g. NL, ES.
flat_rate_shipping.excluded_areasarrayA list of unavailable countries for the shipping option. All other countries are included.
The availability is based on the country of the customer's shipping address.
Format: ISO-3166-1 alpha-2 , e.g. NL, ES.


šŸ’¬

Support

Email [email protected]

Top of page