#bluepine_api

1 messages ยท Page 1 of 1 (latest)

fading wrenBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1393209075126243409

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

bold horizon
#

๐Ÿ‘‹ happy to help

winter pollen
#

@bold horizon Thanks.

bold horizon
#

give me a few minutes and I will be with you shortly

winter pollen
#

yes, thanks.

bold horizon
#

did that help @winter pollen ?

winter pollen
#

yeah, Thanks.

fading wrenBOT
winter pollen
#

I am going to pay via this link.
But I can 't see bank transfer options in here

#

Please help me

heady meadow
#

Hey there, just stepping in for tarzan who needs to step away

winter pollen
#

yeah, thanks

#

I understood

#
  const session = await stripe.checkout.sessions.create({
    customer: "cus_Sf0Y2aLogcqvdY",
    line_items: [
      {
        price_data: {
          currency: "jpy",
          product_data: {
            name: "Tใ‚ทใƒฃใƒ„",
          },
          unit_amount: 1000,
        },
        quantity: 1,
      },
    ],
    mode: "payment",
    payment_method_types: ["card", "customer_balance"],
    payment_method_options: {
      customer_balance: {
        funding_type: "bank_transfer",
        bank_transfer: {
          type: "jp_bank_transfer",
        },
      },
    },
    success_url: "https://example.com/success",
    cancel_url: "https://example.com/failure",
  });

#

pls check that code

#

I am getting null value in session.client_secret

heady meadow
#

Yes, there is no client secret for hosted sessions, instead there is a url for the hosted session that you redirect your customer to.

#

What are you trying to do?

winter pollen
#
// This is your test secret API key.
const stripe = require("stripe")(
  "sk_test_51RjU3GPJW10toNHcdU1MlXdAu5E3S5z7kZCqdbYySPvkcJmkHQ52JqKt3Y6omlnG5Xy3X0xFNJy8zGYBO5MZpkVC00LuDhLaTW",
  {
    apiVersion: "2025-06-30.basil",
  }
);
const express = require("express");
const app = express();
app.use(express.static("public"));

const YOUR_DOMAIN = "http://localhost:4242";

app.post("/create-checkout-session", async (req, res) => {
  const stripe = require("stripe")(
  "sk_test_51RjU3GPJW10toNHcdU1MlXdAu5E3S5z7kZCqdbYySPvkcJmkHQ52JqKt3Y6omlnG5Xy3X0xFNJy8zGYBO5MZpkVC00LuDhLaTW",
  {
    apiVersion: "2025-06-30.basil",
  }
);
  const session = await stripe.checkout.sessions.create({
    customer: "cus_Sf0Y2aLogcqvdY",
    line_items: [
      {
        price_data: {
          currency: "jpy",
          product_data: {
            name: "blue",
          },
          unit_amount: 1000,
        },
        quantity: 1,
      },
    ],
    mode: "payment",
    payment_method_types: ["card", "customer_balance"],
    payment_method_options: {
      customer_balance: {
        funding_type: "bank_transfer",
        bank_transfer: {
          type: "jp_bank_transfer",
        },
      },
    },
    success_url: "https://example.com/success",
    cancel_url: "https://example.com/failure",
  });

  res.send({ clientSecret: session.client_secret });
});

app.get("/session-status", async (req, res) => {
  const session = await stripe.checkout.sessions.retrieve(req.query.session_id);

  res.send({
    status: session.status,
    customer_email: session.customer_details.email,
  });
});

app.listen(4242, () => console.log("Running on port 4242"));



#

This is full code.

#

pls check.

heady meadow
#

Thanks for sharing, but can you explain your goal? What are you trying to achieve?

winter pollen
#

I am going to enable bank transfer options here too.

#

pls help me

heady meadow
#

Ok, and what part do you need help with?

winter pollen
#

I run that code.

#

It is showing like that

heady meadow
#

You've created a hosetd checkout session, you need to redirect to the url

#

You can either redirect on your server, or send the url back to the client and redirect client side

#

When i visit the URL of one of your sessions, bank transfers seem to be working as expected

winter pollen
#

I see.

#

yeah, I got it.

heady meadow
winter pollen
#

Thanks.

heady meadow
#

NP!