const stripe = require('stripe')('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
// Create a payment intent to start a purchase flow.
let paymentIntent = await stripe.paymentIntents.create({
amount: 2000,
currency: 'usd',
description: 'My first payment',
});
// Complete the payment using a test card.
await stripe.paymentIntents.confirm(paymentIntent.id, {
payment_method: 'pm_card_mastercard',
});
Stripe.api_key = 'sk_test_BQokikJOvBiI2HlWgH4olfQ2'
# Create a payment intent to start a purchase flow.
payment_intent = Stripe::PaymentIntent.create({
amount: 2000,
currency: 'usd',
description: 'My first payment',
})
# Complete the payment using a test card.
Stripe::PaymentIntent.confirm(payment_intent.id, {
payment_method: 'pm_card_mastercard',
})
stripe.api_key = 'sk_test_BQokikJOvBiI2HlWgH4olfQ2'
# Create a payment intent to start a purchase flow.
payment_intent = stripe.PaymentIntent.create(
amount=2000,
currency='usd',
description='My first payment',
)
# Complete the payment using a test card.
stripe.PaymentIntent.confirm(
payment_intent.id,
payment_method='pm_card_mastercard',
)
stripe.Key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"
// Create a payment intent to start a purchase flow.
params := &stripe.PaymentIntentParams;{
Amount: stripe.Int64(2000),
Currency: stripe.String(string(stripe.CurrencyUSD)),
Description: stripe.String("My first payment"),
}
pi, _ := paymentintent.New(params)
// Complete the payment using a test card.
confirmParams := &stripe.PaymentIntentConfirmParams;{
PaymentMethod: stripe.String("pm_card_mastercard"),
}
paymentintent.Confirm(pi.ID, confirmParams)
$stripe = new \Stripe\StripeClient('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
// Create a payment intent to start a purchase flow.
$payment_intent = $stripe->paymentIntents->create([
'amount' => 2000,
'currency' => 'usd',
'description' => 'My first payment',
]);
// Complete the payment using a test card.
$payment_intent->confirm([
'payment_method' => 'pm_card_mastercard',
]);
Stripe.apiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2";
// Create a payment intent to start a purchase flow.
PaymentIntentCreateParams params =
PaymentIntentCreateParams.builder()
.setAmount(2000L)
.setCurrency("usd")
.setDescription("My first payment")
.build();
PaymentIntent paymentIntent = PaymentIntent.create(params);
// Complete the payment using a test card.
PaymentIntentConfirmParams confirmParams =
PaymentIntentConfirmParams.builder()
.setPaymentMethod("pm_card_mastercard")
.build();
paymentIntent.confirm(confirmParams);
StripeConfiguration.ApiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2";
// Create a payment intent to start a purchase flow.
var options = new PaymentIntentCreateOptions
{
Amount = 2000,
Currency = "usd",
Description = "My first payment",
};
var service = new PaymentIntentService();
var paymentIntent = service.Create(options);
// Complete the payment using a test card.
var confirmOptions = new PaymentIntentConfirmOptions
{
PaymentMethod = "pm_card_mastercard",
};
service.Confirm(paymentIntent.Id, confirmOptions);
const stripe = require('stripe')('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
// Create a payment intent to start a purchase flow.
let paymentIntent = await stripe.paymentIntents.create({
amount: 2000,
currency: 'usd',
description: 'My first payment',
});
// Complete the payment using a test card.
await stripe.paymentIntents.confirm(paymentIntent.id, {
payment_method: 'pm_card_mastercard',
});
Stripe Sessions—our annual conference—is back on May 24. Join us for this year’s exploration of the future of the internet economy, including how to maximize your revenue with the right global payments solutions.