Tag: Custom WordPress Development

  • Case Study 20: Building a Courier Booking & Shipping API Integration for WordPress

    From a Simple API Integration to a Complete Online Courier Booking Workflow

    Project Overview

    A courier business approached Ranjit Singh through Fiverr in February 2023 with what initially appeared to be a straightforward requirement:

    Integrate a third-party parcel delivery quotation API into their WordPress website.

    The website was Courier.ie, and the requested API was provided by Norsk Global, a shipping and logistics platform.

    The initial requirement was to connect the API with WordPress/PHP so customers could obtain parcel delivery quotes. However, as the integration progressed, the project expanded considerably.

    What began as an API integration became a broader shipping workflow incorporating:

    • Delivery-service quotation
    • Shipment booking
    • Shipment tracking
    • Customer and consignee information
    • Parcel dimensions and customs information
    • WordPress/PHP integration
    • Payment processing
    • Stripe integration
    • PayPal integration
    • Currency conversion
    • Business markup and fuel surcharge calculations
    • Shipping-label access
    • Carrier/service presentation
    • Address suggestions
    • Production deployment
    • Debugging between the website, API and Norsk support team

    The project became a practical example of how a third-party API integration can evolve into a complete business automation system.


    The Initial Requirement

    The client first contacted Ranjit on February 8, 2023, asking whether he could integrate a third-party parcel delivery quotation API into a WordPress website.

    The first discussion focused on understanding the API, the website and the number of services required. The client provided the website and API documentation and initially expected several API services to be integrated.

    The first service was estimated at $30, with subsequent services priced separately. At that stage, the client indicated that the same implementation could eventually be required for multiple websites.

    The initial scope was therefore relatively simple:

    WordPress website → PHP → Norsk API → shipping information

    But the real complexity appeared once testing began.


    The First Challenge: Working With a Third-Party API

    The first integration was performed on a staging environment.

    Instead of immediately building the complete customer-facing system, the implementation was approached service by service.

    This allowed individual API functions to be tested before being incorporated into the larger workflow.

    The first service became the foundation for the remaining integrations because other API functions depended on the same underlying communication and response handling.

    This staged approach became important when the API credentials and test environment started returning errors.

    For example, the staging API returned an authorization error indicating that the public key was invalid. Test shipment data also produced an unknown error.

    Rather than treating the API documentation as sufficient, the project required real-world testing, API responses, and communication with the provider.


    Working Between the Client and API Provider

    One of the most important aspects of the project was that the developer was not working with only one system.

    There were effectively three parties involved:

    1. Courier.ie — the business website
    2. Ranjit Singh — WordPress/PHP developer
    3. Norsk Global — third-party logistics API provider

    When an API response could not be explained from the website side, the client communicated with Norsk support and passed the responses back to the developer.

    This created an iterative debugging process:

    Website request → Norsk API → API response → developer analysis → provider clarification → revised request → testing

    A particularly important breakthrough occurred when Norsk explained that an attempted UPS shipment was using an export service incorrectly for the selected route. The consignee country and shipment direction did not match the service requirements.

    After this information was applied, the integration began working for that scenario.

    This demonstrated an important lesson:

    Not every API error is a programming error.

    Sometimes the problem is caused by business rules, service restrictions, account configuration or incorrect request parameters.


    Moving Beyond the API

    After the core API functions were working, the project moved from backend integration toward an actual customer-facing booking system.

    The client wanted customers to be able to:

    • Enter shipment information
    • Obtain delivery quotes
    • Select a shipping service
    • Book the shipment
    • Track the shipment
    • Make payment
    • Access the shipment label

    The developer created functional forms for the quote, booking and tracking workflow.

    At this point, the project was no longer simply an API connection.

    It was becoming a complete shipping application inside WordPress.


    Using an Existing Industry Workflow as a Reference

    The client repeatedly referred to ParcelHero as an example of the type of customer experience they wanted.

    The reasoning was practical: ParcelHero was also using Norsk’s services, so its workflow could serve as a useful reference for the customer journey.

    The client asked for the new system to follow a similar pattern, including the presentation of shipping services and booking information.

    This changed the nature of the project.

    It was no longer enough for the API to technically work.

    The output also needed to make sense to an actual customer.


    Expanding the Booking Form

    As real-world testing continued, additional fields were identified as important.

    The booking workflow eventually needed information such as:

    • Collection location
    • Destination location
    • City
    • Postal code
    • Parcel information
    • Shipment details
    • Customs information
    • Export/import reasons
    • HS code
    • Country of origin
    • Consignor information
    • Consignee information

    The client specifically requested additional city and postal-code fields after testing the form.

    Later, the client also emphasized customs-related fields such as country of origin, export/import reasons, parcel description and HS code.

    This is a common pattern in API projects:

    The API documentation describes what the system can do; real users reveal what the interface actually needs.


    Handling Difficult Shipping Routes

    One of the most challenging parts of the project involved international routes.

    Ireland-to-UK and UK-to-Ireland quotations did not always behave as expected.

    At one stage, the system could return services for some routes but not others.

    The developer tested different request parameters, reviewed API responses and worked with the client to obtain additional information from Norsk.

    The client compared the expected results with ParcelHero, which was using the same underlying logistics provider. This gave the project a useful real-world benchmark.

    The debugging process included examining request and response data rather than simply changing code blindly.

    The developer also exposed request/response information during debugging so that the client could share precise technical information with Norsk’s support team.

    This created a much more effective support loop.


    Payment Gateway Integration

    Once the quotation and booking workflow was taking shape, payment became the next major component.

    The client already had access to:

    • Stripe
    • PayPal

    The project therefore expanded to include payment processing.

    The payment module was developed and tested in stages, initially using sandbox credentials. Later, the Stripe integration was moved to the live environment.

    The client also wanted both Stripe and PayPal available rather than relying on a single payment provider.

    This introduced another layer to the workflow:

    Norsk quote → customer price → payment → successful booking → shipment label


    Currency Conversion and Business Pricing

    Another important business requirement emerged during payment integration.

    Norsk’s prices were being returned in GBP, while the courier business operated in Ireland and wanted customers to see prices in EUR.

    Simply displaying the API price was therefore insufficient.

    The system needed to account for:

    1. Supplier/API price
    2. Currency conversion
    3. Business markup
    4. Additional surcharge
    5. Final customer price

    The client specifically requested a mechanism for adding a margin to the supplier prices, as well as accounting for fuel surcharge.

    A currency conversion API was subsequently introduced into the workflow so that GBP-based API prices could be converted for the customer’s EUR-facing experience.

    This was a significant transition from a technical API integration to a business-pricing system.

    The application was no longer simply showing what the carrier charged.

    It was helping the courier business determine what its own customers should pay.


    Shipment Labels and Post-Payment Experience

    The project also needed to handle what happened after payment.

    The client wanted customers to be able to access and print their shipment labels after successfully placing an order.

    A label download link was added to the successful shipment-booking flow.

    This completed an important part of the customer journey:

    Get Quote → Select Service → Enter Shipment Details → Pay → Book Shipment → Access Label

    That is substantially different from a simple “API integration.”

    It is an end-to-end transaction workflow.


    Improving the User Experience

    The client wanted the interface to resemble established courier-booking platforms.

    Several user-experience improvements were therefore introduced during the project:

    • Carrier/service logos
    • Estimated delivery information
    • Additional form fields
    • Address suggestions
    • Payment-provider icons
    • Pricing adjustments
    • Shipment-label access
    • Improved service presentation

    The client specifically requested carrier logos and ETA information because competing services displayed these details. The developer explained that the API response itself did not provide the logos and therefore created a mapping mechanism for displaying them.

    This is another important API-development lesson:

    External APIs often provide data, not the complete presentation layer.

    The application may need to build additional logic around the API to turn raw data into a useful customer experience.


    Debugging in the Real Environment

    The project encountered several issues that required investigation beyond ordinary coding.

    Examples included:

    • Invalid staging credentials
    • API request errors
    • Route/service restrictions
    • Missing services for particular destinations
    • Development-environment differences
    • Payment configuration
    • Currency mismatch
    • Address validation
    • API field requirements
    • Carrier/service presentation
    • Production configuration

    At one point, the client reported that a route returned no services even though the provider’s own system showed available services.

    Instead of assuming the problem was in the form, the developer compared requests and responses and continued working with Norsk’s technical team.

    This approach helped isolate issues that were caused by API-side business rules rather than WordPress code.


    From Staging to Production

    The implementation eventually moved from the development/staging environment toward the production website.

    The plugin was transferred to the production environment, and the quote and tracking pages were made available on the production setup.

    The transition required additional production credentials and configuration, including the live payment environment.

    This is an important distinction in API projects:

    A system that works in a sandbox is not automatically production-ready.

    Production deployment requires another round of testing, credentials, payment configuration, webhooks, pricing and customer-flow verification.


    The Project’s Evolution

    The project can be viewed in several stages.

    Stage 1 — API Proof of Concept

    The original requirement was simple:

    Connect WordPress/PHP to Norsk Global API.

    Stage 2 — Core Shipping Functions

    The integration expanded to include:

    • Quote
    • Booking
    • Tracking

    Four of the planned services were initially implemented, while several less-immediate endpoints were postponed until they were required.

    Stage 3 — Customer Booking Interface

    The API was connected to functional WordPress forms so customers could interact with the system.

    Stage 4 — Business Logic

    The system began handling:

    • Pricing
    • Markup
    • Fuel surcharge
    • Currency conversion
    • Service selection

    Stage 5 — Payments

    Stripe and PayPal were integrated into the workflow.

    Stage 6 — Post-Payment Fulfillment

    The booking process was extended to include shipment-label access.

    Stage 7 — Production

    The system was moved toward the production courier website.


    The Most Important Technical Lesson

    The biggest lesson from this project is that API integration is rarely just about making an HTTP request and displaying the response.

    In a real business environment, the API sits inside a larger system:

    Customer
       ↓
    WordPress Form
       ↓
    PHP Application Logic
       ↓
    Norsk Global API
       ↓
    Shipping Services / Pricing
       ↓
    Business Pricing Rules
       ↓
    Currency Conversion
       ↓
    Payment Gateway
       ↓
    Shipment Booking
       ↓
    Shipping Label
       ↓
    Customer
    

    Every layer introduces its own requirements.

    The API might return a price in one currency.

    The business may sell in another.

    The supplier price may need a markup.

    The customer may need to pay through Stripe or PayPal.

    The booking may require customs information.

    And after payment, the customer may need a printable label.

    A successful integration therefore requires understanding both technical requirements and business requirements.


    What Made This Project Different

    Several characteristics made this project particularly valuable as a development case study.

    1. It involved a real third-party logistics API

    The integration was not built around a simple demonstration API. It required dealing with real shipping-service rules and provider support.

    2. It required iterative debugging

    Several problems could not be solved solely from the original documentation. Request/response analysis and communication with Norsk were essential.

    3. It combined multiple systems

    The project brought together:

    • WordPress
    • PHP
    • Norsk Global API
    • Stripe
    • PayPal
    • Currency conversion
    • Google address suggestions
    • Shipping-label functionality

    4. The requirements evolved

    The project began with an API integration and gradually became a much larger application.

    5. The focus moved from code to business workflow

    The final objective was not simply:

    “Does the API work?”

    It was:

    “Can a customer successfully obtain a quote, choose a service, pay, book a shipment and obtain the necessary shipping information?”


    Project Outcome

    The conversation history documents the development of a working courier-booking workflow and its continued refinement toward production.

    The client ultimately moved from asking whether the API could be integrated to requesting additional functionality, design improvements, payment integration, pricing logic, currency conversion, shipment labels and deployment.

    The client also discussed deploying similar functionality on additional websites, indicating that the underlying integration had value beyond the original implementation.

    The project therefore demonstrated the ability to take a third-party logistics API and progressively transform it into a customized WordPress-based courier booking solution.


    Key Takeaways

    This project demonstrates several principles that are useful for any business considering API integration.

    Start with a working proof of concept

    Instead of building the entire application immediately, the integration was tested service by service.

    Test real API responses

    Documentation provides the structure, but real responses reveal the practical problems.

    Separate API problems from application problems

    A failed API request does not necessarily mean the PHP code is wrong. Service restrictions, account settings, credentials and route rules can all affect results.

    Build around the business workflow

    The API is only one part of the solution.

    Expect requirements to evolve

    Once customers and business owners begin testing the system, additional requirements naturally appear.

    Build for the complete transaction

    For an online courier service, the complete experience includes:

    Quote → Select → Book → Pay → Track → Label

    not merely:

    API → Response


    Conclusion

    What started on February 8, 2023 as a request to integrate a parcel-delivery quotation API became a multi-stage WordPress/PHP logistics application.

    The project required API integration, debugging, third-party coordination, customer-facing forms, shipping logic, payment processing, currency conversion, pricing rules, shipment tracking and label handling.

    Most importantly, the project illustrates the difference between connecting an API and building a business workflow around an API.

    The technical challenge was not simply sending requests to Norsk Global.

    The real challenge was turning those API capabilities into a usable courier-booking experience for customers of Courier.ie.

    That progression—from a small API request to a complete business workflow—is what makes this project a valuable example of practical API integration and WordPress/PHP development.

  • Case Study 6: Fixing a Kiyoh XML Review Feed After a PHP 8.3 Upgrade

    From Custom XML Feed to Production Review Integration

    A WordPress XML/RSS project can sometimes evolve far beyond the original requirement. This case started with a relatively simple RSS feed problem and eventually became a custom XML integration for displaying Kiyoh customer reviews on a WordPress website.

    The project involved multiple websites, custom XML processing, a WordPress plugin, external review data, and eventually a compatibility issue following a PHP 8.3 upgrade.

    The Initial RSS Feed Problem

    The project originally started in May 2024 when the client needed help creating an RSS feed for jonglogistiek.nl.

    The client had already created an RSS feed using RSS.app, but several important fields were not being generated correctly:

    • Some posts were missing their publishing date.
    • Some posts had no image.
    • The description was incorrect.
    • The client wanted the first paragraph of each post to appear in the feed.
    • A “Lees meer” (Read more) link was required after the introductory text.

    The existing RSS.app feed was provided for reference, and a custom WordPress plugin was developed to generate the required RSS feed.

    Expanding the Requirement: Custom XML

    Shortly afterward, the client asked whether the service was limited to RSS feeds or whether other XML formats could also be created.

    The requirement turned out to be completely different from the original RSS project.

    The client was building a website for Boender Outdoor and wanted to display Kiyoh customer reviews on the website. Kiyoh provided review information through an XML feed, and the client wanted functionality similar to another website that was already displaying reviews using XML data.

    The goal was to make the review information available on:

    boenderoutdoor.nl/reviews

    The client subsequently provided the Kiyoh XML feed URL and confirmed that the requirement was to import the review feed and display it on the website.

    Reading the External XML Feed

    After analyzing the requirement, the technical approach was straightforward:

    1. Retrieve the XML feed from Kiyoh.
    2. Read and process the review data.
    3. Make the review information available inside WordPress.
    4. Display the reviews on the client’s website.
    5. Allow the website’s existing design to control the presentation.

    The client already had a design in mind, so the implementation focused primarily on processing the XML data rather than creating a new review interface from scratch.

    This distinction is important in XML integrations: data processing and front-end presentation are often separate layers. A reliable feed integration should first make sure that the external data can be retrieved and interpreted correctly before worrying about styling.

    A Production Issue Six Months Later

    The project returned in December 2024 when the client reported that the original XML feed on Jonglogistiek.nl had stopped working.

    The timing was critical because the client was preparing to launch an app that depended on the XML feed that same day.

    The client provided access, and the issue was fixed quickly.

    The feed URL remained:

    jonglogistiek.nl/rssfeed.xml

    After confirming that the feed was working again, the client placed an order for the fix.

    This was an example of an important characteristic of XML integrations: the feed URL itself can become part of another application’s infrastructure. Once an app, portal, or external service depends on a feed, keeping that endpoint operational becomes important.

    The PHP 8.3 Compatibility Problem

    The next major issue appeared in August 2025.

    The client upgraded the Boender Outdoor website to PHP 8.3, after which the Kiyoh review integration stopped displaying reviews correctly.

    The client explained that a custom plugin was responsible for retrieving and processing Kiyoh’s XML feed hourly. The plugin provided shortcodes for displaying review statistics and reviews throughout the website.

    Interestingly, some parts of the integration were still working.

    The client reported that the review information at the top of the page was working, while another section displayed:

    “Geen reviews gevonden”

    meaning “No reviews found.”

    The client wanted the review widget on the reviews page restored to its previous working state.

    Diagnosing a Live WordPress Website

    Because the website was live, the repair needed to be handled carefully.

    Access initially became a challenge. The supplied WordPress credentials did not work, and the client encountered login problems as well. The client eventually disabled the firewall and provided working access, allowing the troubleshooting process to continue.

    Once access was available, the focus was narrowed to the existing Kiyoh Review Verwerker plugin.

    The client specifically clarified that:

    • The existing styling was already correct.
    • The plugin was already responsible for the XML functionality.
    • The problem was that reviews were no longer being loaded on the reviews page.
    • The desired presentation should remain unchanged.

    This made the task a targeted compatibility/debugging job rather than a complete rebuild.

    Restoring the Review Display

    The existing review system was investigated and the review display issue was fixed.

    The client had also requested that the reviews remain limited to 25 reviews per page. During the fix, it was confirmed that this limit was already configured, so no additional change was necessary for that requirement.

    The client was informed that the issue had been fixed and was directed to the reviews page for verification.

    The Technical Lesson

    This project demonstrates why upgrading PHP versions on WordPress websites can expose problems in older custom integrations.

    A site can appear to be functioning normally while a particular data-processing component silently stops working. In this case, the website’s styling and surrounding review interface were still present, but the external XML review data was no longer being displayed correctly.

    Rather than rebuilding the entire system, the better approach was to:

    • Identify the failing component.
    • Preserve the existing design.
    • Preserve the existing plugin architecture where possible.
    • Check the external XML source.
    • Investigate the data-processing path.
    • Restore the review output.
    • Verify the existing pagination requirement.

    What This Project Shows

    This project involved several different types of WordPress XML work over time:

    1. Custom RSS feed development

    A standard RSS service was not producing the required post data, so a custom WordPress feed was created.

    2. Custom XML integration

    The requirement expanded into processing an external Kiyoh XML review feed.

    3. WordPress plugin development

    The XML processing was integrated into a custom WordPress plugin with shortcodes for displaying review information.

    4. External data retrieval

    The website depended on XML data supplied by an external review platform.

    5. PHP compatibility troubleshooting

    After a PHP 8.3 upgrade, the review display stopped functioning correctly and required debugging.

    6. Production maintenance

    The issue was resolved on a live website while keeping the existing styling and functionality intact.

    Conclusion

    What began as a simple RSS feed requirement eventually became a longer-term XML integration and maintenance relationship.

    The project illustrates an important principle in WordPress XML development:

    A feed is not just an XML document—it can become a critical data bridge between WordPress, external platforms, widgets, and applications.

    When that bridge stops working because of a PHP upgrade, changes in external XML data, or plugin compatibility issues, the solution requires more than simply checking whether the XML file exists. The complete flow—from external data retrieval to WordPress processing and final display—needs to be examined.

    This case is a good example of how custom XML development can evolve into ongoing integration, troubleshooting, and maintenance work.