Writing

A collection of technical articles, blog posts, news, and other writing I've published.

WP Kyoto Blog

Implementing Subscription Management with Next.js and Clerk Billing

<p>Clerk Billingを使ったサブスクリプション管理をNext.jsで実装する方法を解説。環境構築から料金プラン設定、認証連携まで、Clerkの新機能を活用したサブスク機能の導入手順を詳しく紹介します。</p>

Read article
WP Kyoto Blog

Efficiently Tracking AI Usage with Vercel AI SDK and Stripe V2 API

<p>Unlock high-throughput AI usage tracking by combining Vercel AI SDK with Stripe&#8217;s V2 Meter EventStream API, enabling seamless token consumption metering and billing for modern AI applications at scale.</p> ...

Read article
WP Kyoto Blog

When Using Vercel AI SDK with Remix, Include Zod

<p>When using Vercel AI SDK with Remix, you may encounter a &#8220;z8.string(&#8230;).base64 is not a function&#8221; error. This occurs because Vercel AI SDK depends on the zod library for type validation, which needs to be installed explicitly. Simply run &#8220;npm install zod&#8221; to resolve the issue and enable seamless integration of AI capabilities into your Remix app.</p> ...

Read article
WP Kyoto Blog

Building a Message API with AWS CDK, LINE, and Hono

<p>Automate LINE messaging with AWS CDK, LINE API, and Hono! Build a scalable serverless LINE bot on AWS Lambda, handling webhooks and replying to users efficiently.</p> ...

Read article
WP Kyoto Blog

How to Restrict API Access to Local Environment in Cloudflare Workers

<p>Safeguard your Cloudflare Workers APIs during development by restricting access to your local environment with this simple code snippet that checks the request hostname and blocks unauthorized access.</p> ...

Read article
WP Kyoto Blog

Implementing Free Trial Subscriptions by Integrating Clerk and Stripe

<p>Unlock the power of seamless user authentication and subscription billing by integrating Clerk and Stripe. This comprehensive guide walks you through setting up a secure system, handling user registration with free trials, managing paid plan upgrades, and ensuring clean user deletion.</p> ...

Read article
Stripe.dev

Japan Community Highlights: Effective Testing and Security

This article highlights development tips for efficiently developing and operating Stripe at a lower cost, as presented by the Japanese Stripe user community JP_Stripes. We'll focus on content from two events held in September 2024 in Aizuwakamatsu, Fukushima Prefecture, and Sapporo, Hokkaido....

Read article
Stripe.dev

Developing and investigating subscription data flow

This article shows you how to use Stripe's sandbox to simplify your development process. You'll learn to create isolated test environments, simulate real-world scenarios, and debug your subscription logic efficiently. ...

Read article
Stripe.dev

Managing SaaS Access Control with Stripe’s Entitlements API

This post introduces how to manage SaaS feature entitlements efficiently using the Stripe API. It explains why it's important to provide multiple plans to your customers and how to differentiate each plan through entitlement management. With the Stripe API, managing entitlements can become more straightforward, allowing you to focus on building and improving your core services....

Read article
Stripe.dev

Optimize payment flow while reducing code complexity with Stripe's A/B Testing

This post explores how to leverage Stripe's A/B testing, its benefits, and how you can use it to boost online sales. You can learn how to improve the conversion rate by optimizing payment options without adding further code....

Read article
Stripe.dev

Easily debug your 3DS authentication with Stripe Workbench

In this article, you'll learn how to investigate the payment process with just a few clicks on the Stripe dashboard. You'll also see how to obtain event data for testing code related to the 3DS authentication flow....

Read article
WP Kyoto Blog

When you suffer from the &#8220;API: s3:PutBucketPolicy Access Denied&#8221; error while creating a new S3 bucket, how can we resolve it?

<p>The user encountered an error when trying to create a new Amazon S3 bucket for hosting a website. The error message indicated an &#8220;Access Denied&#8221; issue with the `s3:PutBucketPolicy` API. To resolve this, the user needs to add the `blockPublicAccess` attribute with the value `BlockPublicAccess.BLOCK_ACLS` to the CDK project configuration. By doing so, the default configuration of Amazon S3 will be updated correctly. The user provided additional links as references for more information on this topic.</p> ...

Read article
WP Kyoto Blog

Deploy Sonik application to AWS Lambda with functions URL by AWS CDK

<p>Sonik is a JavaScript meta framework maintained by Yusuke-san, Hono framework maintainer. It allows building websites and web applications with Next.js-like file-based routing and Hono-like REST API. The text provides instructions on how to configure an AWS CDK project and deploy a Sonik app to AWS. It includes code snippets for defining AWS Lambda and Amazon S3 resources, as well as setting up static asset deployment. The text also mentions updating the Sonik app to adapt to AWS Lambda by adding a new entry point file, setting the handler function for mapping requests and responses, and adding a middleware to support static assets deployed to S3. It suggests using CloudFront for distributing static assets in a production environment.</p> ...

Read article
WP Kyoto Blog

Upgrade the version of nodenv through the anyenv ( Resolving un-listed Node.js version 18 issue)

<p>The provided text explains how to resolve the issue of not being able to find Node.js version 18 using the nodenv install &#8211;list command. The author suggests upgrading nodenv using the anyenv command, as the usual method of upgrading through brew may not work when anyenv is used. After reinstalling nodenv and restarting the shell session, the user should be able to install Node.js version 18 using the nodenv install &#8211;list command. The author concludes by emphasizing the importance of understanding how to manage different language versions when using different version managers like nodenv.</p> ...

Read article
WP Kyoto Blog

Fetching to the internal API (relative API path) on the Next.js App Router

<p>The text discusses how to fetch the internal API on the Next.js App Router. It highlights the difference between the Next.js Page Router and the App Router in terms of calling the internal REST API. It mentions that using the fetch function with a relative path will result in an error, and suggests setting the fetch target URL as a full URL. The text also describes how to retrieve the domain and host on the application using the next/headers library. It provides an example code snippet that demonstrates fetching the API with the full URL. Finally, it mentions that in the Next.js App Router, the request header information such as the protocol and host can be obtained using the next/headers library.</p> ...

Read article
WP Kyoto Blog

Integrating Google App Script with Orbit Champion program: Submitting Form Data

<p>This tutorial guides you on how to integrate Google App Script with Orbit, a tool for community building and developer advocacy. The focus is on submitting form data from a Google Form to Orbit using a custom script. The tutorial provides step-by-step instructions on defining form field mappings, submitting form data to Orbit, and setting up a Google Form trigger. By following this tutorial, you&#8217;ll be able to automate the process of sending data from your Google Form to your Orbit Champions program. This custom script will streamline your community-building efforts and enhance your developer advocacy.</p> ...

Read article
WP Kyoto Blog

Read RSS Feed on Cloudflare Workers

<p>When utilizing Cloudflare Workers, it can be difficult to use npm packages due to runtime differences. However, to create an RSS feed reader application, one can use the fetch API and htmlparser2 library for Cloudflare Workers. The example code provided showcases how to parse a feed and return a JSON response containing the title, description, datetime, and href of each item in the feed.</p> ...

Read article
WP Kyoto Blog

Calling third-party API from Cloudflare Workers by using Fetch API

<p>Sometimes, we want to use external (third-party) API, like OpenAI, from Cloudflare Workers. But some SDK canno [&hellip;]</p>

Read article
WP Kyoto Blog

Create Shopify App using Next.js &#038; Koa with TypeScript

<p>Basically, we will create a new Shopify application by using shopify node create. But if using the command, we [&hellip;]</p>

Read article
WP Kyoto Blog

How to remove `getInitialProps` from the Next.js application made by shopify-app-node

<p>We can easy to create a new own Next.js application for the Shopify app by using shopify-app-node and Shopify [&hellip;]</p>

Read article
WP Kyoto Blog

Testing React component including SVG file by using Jest and tsdx

<p>When we use an SVG file inside a React component, the test will be throwing these error. Solution: use jest-sv [&hellip;]</p>

Read article
WP Kyoto Blog

Create AWS CloudFront Function by using AWS CDK

<p>AWS CloudFront Functions is a simple edge computing service. We can deploy our own function to the AWS CDN edg [&hellip;]</p>

Read article
WP Kyoto Blog

How to replace Subscription interval on Stripe Billings

<p>When you have any web service with a subscription, we usually want to provide several interval plans like mont [&hellip;]</p>

Read article
WP Kyoto Blog

How to prefill credit card data on Stripe Checkout

<p>Using Stripe checkout can provide a credit card form to customers. But by default, we have to fill in our own [&hellip;]</p>

Read article
WP Kyoto Blog

Write a testing code of registration for the custom wp-cron event by using PHPUnit

<p>We can register a single cron job by using the WordPress function named wp_schedule_single_event. But sometime [&hellip;]</p>

Read article

View More Articles

Showing the latest 20 articles. View older articles on each site.