arrow_back Back to home
Uncategorized 2 MIN READ

Midtrans Subscription Migration from WooCommerce to Node.js

albifajar October 8, 2025

Ever wondered how subscriptions in WooCommerce actually work? Honestly, I was already relieved when I could just install the plugin and have it run without errors :). But I had an interesting experience when I had to migrate Midtrans subscription data that previously ran on WooCommerce to a new donation system built with Node.js.

Difference in Subscription Mechanisms

At first, I thought subscription flows worked the same way everywhere. Turns out, they don’t:

So, in WooCommerce, the charge logic lives within the application, while in Node.js we rely more on the Midtrans API.

Challenges and Solutions

Although the flow is different, it wasn’t a major issue. The key lies in the card_token. As long as we store the user’s payment token, the new system can continue processing automatic charges. WooCommerce itself stores this token in its database as the saved card identity, so users don’t have to re-enter payment details for future charges.

This means that recurring donations previously managed in WooCommerce can continue seamlessly on the new Node.js-based platform without disrupting the user experience.

Conclusion

In short, the secret is the card_token — as long as it’s secure, subscription migration can run smoothly, even across different platforms.