# 商品および価格 Invoicing API を使用して、商品と価格を管理します。 ビジネスと提供商品を一元的に定義します。*Products* (Products represent what your business sells—whether that's a good or a service) は販売品目を定義し、*Prices* (Prices define how much and how often to charge for products. This includes how much the product costs, what currency to use, and the interval if the price is for subscriptions) は請求金額と請求頻度を追跡します。これは Stripe の中核となるエンティティーであり、*サブスクリプション* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis)、*請求書* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice)、および [Checkout](https://docs.stripe.com/payments/checkout.md) と連携します。 Prices は以下のユースケースを実現します。 - ソフトウェアプロバイダーが、ユーザーが新しいサブスクリプションを作成するたびに 1 回限りの設定手数料を請求する。 - 月額 10 ドルの商品ボックスを継続的に配送する E-コマースストアで、顧客が 1 回限りのアドオンも購入できるようにする。 - プロフェッショナルサービスの提供企業が、手作業で各ラインアイテムを入力するのではなく、標準的なサービスのリストを作成し、請求書ごとにそのリストから選択できるようにする。 - 非営利組織で、各寄付者がカスタムの継続的な寄付金額を各自で定義できるようにする。 商品と価格を使用して、商品カタログを管理できます。商品は販売するものを定義し、価格は請求額と請求頻度を追跡します。商品と価格は、ダッシュボードまたは API を使用して管理します。 #### ダッシュボード *サンドボックス* (A sandbox is an isolated test environment that allows you to test Stripe functionality in your account without affecting your live integration. Use sandboxes to safely experiment with new features and changes)のダッシュボードでビジネスを設定した場合は、[商品カタログページ](https://dashboard.stripe.com/products)の**本番環境にコピー**を使用して、本番環境に各商品をコピーできます。Stripe の公式ライブラリを使用して、アプリケーションから Stripe API にアクセスします。 1. **商品カタログ**ページに移動し、**商品を追加**をクリックします。 1. **一度限りの商品**または**定期利用する商品**のどちらを作成するかを選択します。 1. 商品に名前を指定して、価格を割り当てます。 #### API [Product (商品)](https://docs.stripe.com/api/products.md) と [Price (価格)](https://docs.stripe.com/api/prices.md) を作成する方法をご紹介します。 > [Stripe CLI](https://docs.stripe.com/stripe-cli.md) または API の使用の開始に関する詳細なガイドは、[Invoicing のエンドツーエンドの導入ガイド](https://docs.stripe.com/invoicing/integration.md)をご覧ください。 ### 商品を作成する 商品を作成するには、その名前を入力します。 ```curl curl https://api.stripe.com/v1/products \ -u "<>:" \ -d "name=Gold Special" ``` ### 価格を作成する [Price (価格)](https://docs.stripe.com/api.md#prices) には、商品の価格と請求期間を定義します。これには、商品の価格、使用通貨、およびサブスクリプションの価格の場合は請求期間も含まれます。商品と同様に、価格の種類が少ない場合はダッシュボードで管理することをお勧めします。単価は、当該通貨の最小単位で示します。この場合はセントになります (10 USD は 1,000 セントのため、単価は 1000)。 商品の価格を作成する必要がない場合は、インボイスアイテムの作成時に [amount](https://docs.stripe.com/api/invoiceitems/create.md#create_invoiceitem-amount) パラメーターを使用できます。 価格を作成してそれを商品に割り当てるには、商品 ID、単価、および通貨を指定します。次の例では、「Gold Special」商品の価格は 10 USD です。 ```curl curl https://api.stripe.com/v1/prices \ -u "<>:" \ -d "product={{PRODUCT_ID}}" \ -d unit_amount=1000 \ -d currency=usd ```