Hello Talia
Do your cards support 3D-Secure ID? If not, a purchase is not possible. You might have to contact your bank for this.
Do you use Apple Pay? You could use the SBB Mobile app, define the other persons as co-traveler and pay with Apple Pay. This should work. Or, you could buy it from DB Fahrplan, Auskunft, Tickets, informieren und buchen - Deutsche Bahn
However, there is actually no need to buy the train tickets in advance (unless you want to buy Supersaver tickets). You can also buy them on-site, the price is the same and tickets never sell out; same for trains, trains cannot sell out here as you will pay for transportation, not the seat. As a general rule, Swiss residents buy their tickets for local or national services 5 to 10 minutes before departure only.
Best regards,
Roland