Shipping

Create Shipping Invoice

Introduction

The shipping feature is an added value that allows you to simply sell and ship your product through the MyFatoorah platform with only one payment invoice for your customer. You can create your shipping invoice directly without having your products to be predefined at the MyFatoorah portal account. You just need to share your product information with our API with the exact dimensions and weight, then we take care of the rest.

Currently, we support both DHL and Aramex.

351351

❗️

Approval is needed!

Kindly, contact your account manager or sales representative to activate the Shipping feature.

🚧

Arabic Letters

DHL and Aramex do not support Arabic item names or descriptions.


How it works

📘

Portal account

Before you start, you need to set up your company shipping information in your portal account as described in the Shipping Information section.

Kindly, follow the below steps to fulfill the shipping integration in your system:

  1. Call GetCountries endpoint to get a list of all country that is supported by the shipping module.

  2. Call GetCities endpoint to get a list of all cities of a given country code obtained from step 1 response and the selected shipping method. Example of a GET request is "/v2/GetCities?shippingMethod=1&countryCode=US".

  3. Now after you have the country code and city details, you can use them in:

  4. Use the RedirectURL/PaymentURL from the previous step to do the payment.

  5. Once the payment is done successfully, you will be able to download DHL/Aramex AWBl as PDF in the download section of the receipt.

  6. Call GetShippingOrderList endpoint to get a list of order invoice ids of given order status and a used shipping method. Example of a GET request is "GetShippingOrderList?shippingMethod=1&orderStatus=0".

  7. Call UpdateShippingStatus endpoint, if you need to update the invoice status with the parameter explained in Update Shipping Status. After a successful payment, you have to change the order shipping status to “Prepared” to initiate the shipping. Note that: you can’t change the status to RequestPickup in this API call. If you want to change RequestPickup please follow the below step.

  8. Call ApiShipping/RequestPickup?shippingMethod=1 endpoint to get the details about updated orders number with status. Now it's ready for order status changes. For more details, follow steps in Request Pickup.

  9. Next use the UpdateShippingStatus endpoint to change another status like "Picked/ Delivered".


SendPayment with Shipping Sample Message

{
  "CustomerName": "name",
  "NotificationOption": "ALL",
  "MobileCountryCode": "965",
  "CustomerMobile": "12345678",
  "CustomerEmail": "[email protected]",
  "InvoiceValue": 100,
  "DisplayCurrencyIso": "kwd",
  "CallBackUrl": "https://yoursite.com/success",
  "ErrorUrl": "https://yoursite.com/error",
  "Language": "en",
  "CustomerAddress": {
    "Block": "string",
    "Street": "string",
    "HouseBuildingNo": "string",
    "Address": "address",
    "AddressInstructions": "string"
  },
  "InvoiceItems": [
    {
      "ItemName": "string",
      "Quantity": 20,
      "UnitPrice": 5,
      "Description": "string",
      "Weight": 0.5,
      "Width": 10,
      "Height": 15,
      "Depth": 19
    }
  ],
  "SourceInfo": "string",
  "ShippingMethod": 1,
  "ShippingConsignee": {
    "PersonName": "name",
    "Mobile": "12345678",
    "EmailAddress": "[email protected]",
    "LineAddress": "address",
    "CityName": "DUBAI",
    "PostalCode": "12345",
    "CountryCode": "AE"
  }
}
{
    "IsSuccess": true,
    "Message": "Invoice Created Successfully!",
    "ValidationErrors": null,
    "Data": {
        "InvoiceId": 300050,
        "InvoiceURL": "https://demo.myfatoorah.com/ie/0106230005034",
        "CustomerReference": null,
        "UserDefinedField": null
    }
}

ExecutePayment with Shipping Sample Message

{
  "PaymentMethodId": 1,
  "CustomerName": "test",
  "DisplayCurrencyIso": "kwd",
  "MobileCountryCode": "965",
  "CustomerMobile": "12345678",
  "CustomerEmail": "[email protected]",
  "InvoiceValue": 100,
  "CallBackUrl": "https://yoursite.com/success",
  "ErrorUrl": "https://yoursite.com/error",
  "Language": "en",
  "CustomerReference": "string",
  "CustomerCivilId": "string",
  "UserDefinedField": "string",
  "CustomerAddress": {
    "Block": "string",
    "Street": "string",
    "HouseBuildingNo": "string",
    "Address": "Address",
    "AddressInstructions": "Address"
  },
  "InvoiceItems": [
    {
      "ItemName": "name",
      "Quantity": "1",
      "UnitPrice": 100,
      "Description": "string",
      "Weight": 0.5,
      "Width": 10,
      "Height": 15,
      "Depth": 17
    }
  ],
  "ShippingMethod": 1,
  "ShippingConsignee": {
    "PersonName": "name",
    "Mobile": "12345678",
    "EmailAddress": "[email protected]",
    "LineAddress": "address",
    "CityName": "DUBAI",
    "PostalCode": "12345",
    "CountryCode": "AE"
  },
  "SourceInfo": "string"
}
{
    "IsSuccess": true,
    "Message": "Invoice Created Successfully!",
    "ValidationErrors": null,
    "Data": {
        "InvoiceId": 568119,
        "IsDirectPayment": false,
        "PaymentURL": "https://demo.MyFatoorah.com/En/KWT/PayInvoice/Checkout?invoiceKey=030675256811947&paymentGatewayId=20",
        "CustomerReference": "string",
        "UserDefinedField": "string"
    }
}


Did this page help you?