We do it from the core infrastructure we run ourselves. Built the full stack to have flexibility and innovate in industry where 90+% of CC transactions still run on mainframes & COBOL
Fair point, problem is that theres no short answer here. We partners with a bank to get our own BIN (https://en.wikipedia.org/wiki/Payment_card_number), that when loaded onto the networks, gets routed to our core infrastructure. There are many ways to segment this BIN, randomly, PRIN(?), few other industry standards, and so when you want to issue a new consumer a new card # you use whatever your algorithm is, and assign it to that customers account (or whatever exactly your data model is).
So its 2/3rds BD to get setup, 1/3 enterprise engineering and a lot of integration work to get fully setup and running. Payments is the only trillion dollar industry where nothing is written down, we're working on changing that since we find a lot of the stories fascinating and so do most people we retell them to.
If anyone is in Oakland area and wants a primer, always happy to share, we spent 3 years learning industry and now its our time to start giving back.