Order online and Pay Later With Sitecore Commmerce

Does your company want to offer online ordering with the ability to pay later? XCentium is the first to offer this capability with Sitecore Experience Commerce.  

A lot of shops have started offering Pay Later option to customers. For example, when you are making a reservation for hotel room, you are given an option to Pay Later. If your store allows Pick up in store, the customer may just want to pay in store while picking up the merchandise, but don’t forget, the customer would like to place an order online because he/she found the right product. Also, pay later is a very common scenario in B2B.

Let me talk through the various steps of allowing a Pay Later payment option using Sitecore Commerce Engine.



You can have a look at the plugin here

If you need access to github repo, just send us an email.



The ootb payment methods are Federated or Giftcard. If you notice, both of these payment components are derived from a base component called PaymentComponent (Sitecore.Commerce.Plugin.Payments.PaymentComponent). When an order is being created, a validation is performed where the order balance must match the payment total. The order balance is selected from the cart totals and the payment total is selected from PaymentTotal component of the order. The PaymentTotal is the sum of all the components that are derived from PaymentComponent base class.

So in order to allow a pay later payment option, there has to be a component added to cart (before it is converted to an order) that derives from Sitecore.Commerce.Plugin.Payments.PaymentComponent and it should hold the balance that the customer has to pay.

Let us call this component - PayLaterComponent


    public class PayLaterComponent : PaymentComponent
        public DateTime DateCreated { get; set; }

        public PayLaterComponent(Money money) : base(money)
            DateCreated = DateTime.UtcNow;

How to set this component

On the payment page you present the user with four payment options :

  1. Pay Now using Credit Card.
  2. Pay Now using Gift Card,
  3. Pay Later (in Store or Online)
  4. Pay Now using Crypto (#hodl)  (Check my blog here Cryptocurrencies and Sitecore Commerce)

User selects Pay Later, in the back end you will call a custom commerce api (Let's say /api/AddPayLaterPaymentToOrder), this API will perform some basic validations (as in Federated Payment option) and adds a new component to the cart, the one that we declared above. The value will be equal to the order total with tax and shipping. 

This is how the core logic in the block looks like

// Get the current cart

var cartId = arg.CartId;
FindEntityArgument findEntityArgument = new FindEntityArgument(typeof(Cart), cartId, false);
Cart cart = await _findEntityPipeline.Run(findEntityArgument, context) as Cart; // Add the paylater component to cart var amount = decimal.Parse(arg.Amt); PayLaterComponent payLaterComponent = new PayLaterComponent(new Money(context.CommerceContext.CurrentCurrency(), amount)); cart.Components.Add(payLaterComponent);



After this block, of course you will persist the cart using PersistCartBlock. BUT before persisting the cart, remember to call the pipelines ICalculateCartLinesPipeline and ICalculateCartPipeline so that the totals are appropriately calculated on the cart


That's it, you can now let the customers successfully checkout using a pay later option on the website. 


Now what? How do i accept a payment for the order when the customer is ready to pay (either via order history online or in store)


To allow the customer pay for the order (not cart anymore, see my blog here to check out how to make changes on a submitted order) or allow them to call and pay through an admin portal, we need a new api in the commerce that will do the following:


1. Accept the Federated Payment

2. Remove the Paylater component or Add a negative Paylater component for auditing


After this block, of course you will persist the cart using PersistCartBlock. BUT before persisting the cart, remember to call the pipelines ICalculateCartLinesPipeline and ICalculateCartPipeline so that the totals are appropriately calculated on the cart


There are other things that can be implemented based on your shop requirements:


1. Do not allow the shipment of product if payment has not been received (unless Pick up in store)

2. A minion that notifies the user that Payment is due and merchandise won't be shipped until payment is received.

3. If the order is time sensitive, then do not allow pay later.

4. Do not allow pay later on Back-ordered items. 

5. Allow Pay later for orders only when fulfillment type is picked up in store.

6. If you offer pick up in store, then adding a pay later in store option can offer a great experience for a customer.


 Sitecore Commerce Engine is ready for any challenge coming its way and allows you to stay ahead of your competitors. Elevate the experience.


buy now pay later





Sitecore 144
Commerce 100
Web Development 100
Sitecore Commerce 83
Sitecore Experience Commerce 9 64
Sitecore Experience Commerce 59
Content Management 55
eCommerce 48
B2B eCommerce 42
Sitecore Experience Platform 39
Sitecore Platinum Partner 39
Architecture 34
Insite 29
User Experience 26
Strategy 22
B2C eCommerce 21
B2B Commerce Blogs 21
commerceconnect 21
CloudCraze 20
SaaS (Software as a Service) 20
Cloud 17
Commerce Server 17
Salesforce B2B Commerce Cloud 16
Mobile 13
Search 13
Plugins 12
Analytics 12
Application Development 12
Digital Transformation 11
Sitecore Symposium 11
Helix 10
Social 8
Business Process 7
Authentication 7
5 Reasons 7
BI and Big Data 6
Data Visualization 6
Sitecore Presentation 6
Coveo 6
NET Development 5
Microsoft Azure 5
Automation 5
Front-End Development 4
SaaS (Software as a Service) 4
Digital Strategy 4
Brightcove 4
Press Release 4
Avalara Tax 3
Sitecore Experience Accelerator (SXA) 3
Sitecore Layouts 3
Video 3
Multi-site 3
Multi-lingual 3
Accessibility 3
Habitat 3
Vault 3
Identity 2
Managed Services 2
Cryptocurrency 2
Sitecore Forms 2
Sitecore Experience Commerce 9 Promotions 2
Uncategorized 2
Conversational Commerce 2
Sitecore SaaS 2
Security 2
Unit Testing 2
Headless Architecture 2
Sitecore Experience Awards 2
Google 1
Content Delivery Network 1
Configure Price Quote 1
Blockchain 1
Coupons 1
Sitecore Rss 1
Artificial Intelligence 1
Machine Learning 1
Okta 1
RFP Process 1
Flex Accelerator for Sitecore 1
Reviews 1
Page Labels 1