I am trying to create a card token following the documentation but keep getting the 400 error when calling the API.
export default async (req, res) => { try { const response = await fetch("https://token.clover.com/v1/tokens", { method: "POST, headers: { Accept: "application/json", apiKey: process.env.CLOVER_PUBLIC, "Content-Type": "application/json", }, body: { card: { number: "411111111111", exp_month: "07", exp_year: "2023", cvv: "123", }, }, }); const data = await response.json( } catch (err) { console.log(err); } };
that is the code I'm using to call on my server side, if this does not work the documentation says i can also use an 'alternate_tender' as a source of payment. What can be considered an 'alternate_tender'?