The final phase in the order lifecycle is order completion. This occurs once payment has been successful and the delivery phase is finished.

For a multi-item order, as long as at least one item was fulfilled successfully the order is considered successful. If all items fail to deliver in an order then the order status is failed.

To determine the order completion status simply check the order.phase property. This will be set to completed for a successful order or failed if all items were unable to be delivered.

For a multi-item order you’ll need to loop through the lineItems array returned in the get order response to ensure the delivery.status is completed for each item.

Recommendations

Think through and implement the call to action that makes sense for your buyers.

Where can they access the purchased item?

If the token was minted to their Crossmint wallet you can provide a direct link and/or render a representation of it. Refer to the wallet UI components page for some details on how to accomplish this.

Even if they minted directly to an existing wallet you can provide a link to display the token in Crossmint. Use the following URL format to display NFTs within Crossmint:

https://www.crossmint.com/user/collection/<chain>:<contractAddress>:<tokenId>

For info on the values to use for <chain> refer to the supported chains page.

What are the next steps?

Can they stake, trade, or utilize the purchase in some way? Tell them how!

Handling Order failure

If there were any issues with delivery explain what happened and ensure they know that refunds are automatic. Anyone who purchases through Crossmint and has an issue with delivery can contact our support team for assistance.