Save a card once and get a reusable card_token. Charge it as many times as you like — no card details on your server after the first save. Test mode, no money moves.
Test mode: 4242 4242 4242 4242 saves, 4000 0000 0000 0002 declines.
// Save the card on the first charge (or POST /tokens to save without charging):
const first = await fetch("https://cygma.cloud/api/m360/v1/payments", {
method: "POST",
headers: { Authorization: "Bearer " + SECRET_KEY, "Content-Type": "application/json" },
body: JSON.stringify({
amount: 1999,
card: { number: "4242424242424242", exp_month: 12, exp_year: 30, cvv: "123" },
save_card: true,
}),
}).then((r) => r.json());
// first.card_token -> "card_…" (store this; the PAN is gone)
// Charge the saved card later — no card details needed:
await fetch("https://cygma.cloud/api/m360/v1/payments", {
method: "POST",
headers: { Authorization: "Bearer " + SECRET_KEY, "Content-Type": "application/json" },
body: JSON.stringify({ amount: 1999, card_token: first.card_token }),
});Full reference at the Cards docs. To keep the PAN off your page entirely, use hosted fields. All tools on the examples page.
© 1998–2026 Electronic Payments, Inc. Test mode.