UNPKG

@cocalc/server

Version:

CoCalc server functionality: functions used by either the hub and the next.js server

13 lines 530 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const client_1 = require("@cocalc/server/stripe/client"); const misc_1 = require("@cocalc/util/misc"); async function createPaymentMethod(account_id, token_id) { if (!(0, misc_1.isValidUUID)(account_id)) { throw Error("invalid uuid"); } const stripe = new client_1.StripeClient({ account_id }); await stripe.createPaymentMethod(token_id); } exports.default = createPaymentMethod; //# sourceMappingURL=create-payment-method.js.map