View difference between Paste ID: 1d4wg2L3 and MJUmPvTV
SHOW: | | - or go back to the newest paste.
1-
var stripe = require("stripe")("sk_test_GFdAiDDtbC7P2jcY5UlHYANz");
1+
var stripe = require("stripe")("INSERT_TEST_SECRET_KEY_HERE");
2
3
4
async function thisErrors() {
5
    return stripe.paymentIntents.create({
6
        amount: 100,
7
        currency: "usd",
8
        payment_method: "pm_card_authenticationRequiredOnSetup",
9
        confirm: true,
10
        off_session: true,
11
    });
12
}
13
14
try {
15
    cus = await thisErrors();
16
    console.log("cus is:");
17
    console.log(cus);
18
}
19
catch(e) {
20
    console.log(e);
21
    console.log(e.message);
22
    console.log("decline code:");
23
    console.log(e.raw.decline_code);
24
}