コンテンツにスキップ
アカウントを作成
または
サインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成
サインイン
始める
支払い
財務の自動化
プラットフォームおよびマーケットプレイス
資金管理
開発者向けのツール
始める
支払い
財務の自動化
始める
支払い
財務の自動化
プラットフォームおよびマーケットプレイス
資金管理
概要
Stripe Payments について
構築済みのシステムをアップグレード
支払いの分析
オンライン決済
概要ユースケースを見つけるManaged Payments
Payment Links を使用する
決済ページを構築
高度なシステムを構築
アプリ内実装を構築
決済手段
決済手段を追加
決済手段を管理
Link による購入の迅速化
支払いインターフェイス
Payment Links
Checkout
Web Elements
アプリ内 Elements
決済シナリオ
カスタムの決済フロー
柔軟なアクワイアリング
オーケストレーション
店頭支払い
端末
他の Stripe プロダクト
Financial Connections
仮想通貨
    概要
    ステーブルコインでの支払い
    法定通貨から仮想通貨へのオンランプ
      概要
      始める
      埋め込み可能なオンランプのクイックスタート
      埋め込み可能なオンランプの詳細ガイド
      ノーコードのスタンドアロン型オンランプ
      スタンドアロン型オンランプのガイド
      追加の実装
      Onramp Quotes API を使用する
      モバイル用の仮想通貨の導入
      Stripe 仮想通貨 SDK ES モジュールをインストールする
      リファレンス
      オンランプ API リファレンス
      バックエンド導入のベストプラクティス
    ステーブルコインでの入金
    ステーブルコイン用金融口座
Climate
ホーム支払いCryptoFiat-to-crypto onramp

Onramp Quotes API を使用する公開プレビュー

商品の UI に見積もりを表示します。

ページをコピー

Onramp Quotes API を使用すると、プラットフォームはさまざまなネットワークですべての仮想通貨へのオンランプ換算の見積もりを取得することができます。ソースまたは支払い先の固定金額を指定して、支払い先の通貨またはネットワークのサブセットに見積もりを制限することもできます。Quotes API では、ユーザーをオンランプウィジェットに誘導する前に商品 UI で見積もりを表示することができます。ユーザーがオンランプウィジェットにアクセスする前に見積もりの有効期限が切れた場合は、オンランプウィジェットでユーザーに表示される見積もりが若干異なる可能性があります。

コンバージョンの見積もりを取得する

GET /v1/crypto/onramp_quotes エンドポイントを使用して、コンバージョンの見積もりを取得します。次の表は、このエンドポイントで使用できるすべてのパラメーターをまとめたものです。

パラメータータイプデフォルト詳細
source_currency文字列 (オプション)usdISO-4217 通貨コード。現時点では、usd、eur のみに対応しています。
source_amount文字列 (オプション)100.00オンランプが必要な法定通貨の金額の文字列表現。source_amount が設定される場合、destination_amount は null にする必要があります (固定金額を設定できるのは取引の一方のみであるため、これらは相互排他的です)。
destination_amount文字列 (オプション)null購入する destination_currency の金額の文字列表現。destination_amount を設定する場合、source_amount は null にする必要があります。このフィールドを指定する場合は、destination_currencies に単一値を、destination_networks にも単一値を指定する必要があります (これにより、Stripe で見積もり対象の仮想通貨を認識できます)。
destination_currencies配列<String>(オプション)null
  • ['usdc', 'ethereum']
見積もり生成の対象となる仮想通貨のリスト。null のままである場合は、destination_networks がサポートしているすべての destination_currencies の見積もりを取得します。
  • 通貨: btc、eth、sol、matic、usdc、xlm
destination_networks配列<String>(オプション)null
  • ['polygon', 'bitcoin', 'solana', 'ethereum']
見積もりを生成する仮想通貨ネットワークのリスト。null のままである場合は、すべてのネットワークの destination_currencies の見積もりを取得します。
  • ネットワーク: bitcoin、ethereum、solana、polygon 、stellar

見積もりリクエストの例

デフォルトのソースの金額が 100 USD の支払い先通貨とネットワークのペアをすべて取得するには、次のコマンドを実行します。

Command Line
curl -G https://api.stripe.com/v1/crypto/onramp_quotes \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:

次のようなレスポンスを受信します。

{ "id": "cd35838481497f403988360cc0ff5ce5c5ce7451ce8938f86d379dff7157d33d", "rate_fetched_at": 1674265380.6883376, "destination_network_quotes": { "ethereum": [ { "id": "7eb9ccb7c1bffadf3773ca1f56ba3a352fe4a226328e72142925a80e7242b70c", "destination_currency": "eth", "destination_amount": "0.060232255577506866", "destination_network": "ethereum", "fees": { "network_fee_monetary": "1.41", "transaction_fee_monetary": "3.03" }, "source_total_amount": "104.44" }, { "id": "398de047128b6dff1abbc41519811db68dd8bcb69939b87c4a4621b1740a1c5b", "destination_currency": "usdc", "destination_amount": "100.00", "destination_network": "ethereum", "fees": { "network_fee_monetary": "5.63", "transaction_fee_monetary": "3.07" }, "source_total_amount": "108.70" } ], ... }, "livemode": true, "source_currency": "usd", "source_amount": "100.00" }

ソースの金額が 200 USD の支払い先通貨とネットワークのペアをすべて取得するには、次のコマンドを実行します。

Command Line
curl -G https://api.stripe.com/v1/crypto/onramp_quotes \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:
\ -d "source_amount"="200"

次のようなレスポンスを受信します。

{ "id": "2e5818944df6a2325c7e9c1e72d27174b9bedfc8e64ace47c081370a5b982a7b", "rate_fetched_at": 1674265506.3408287, "destination_network_quotes": { "ethereum": [ { "id": "d160a80828eabb6b6d4aeafac585eee62d95425c7fb7577866ab04b9a786df00", "destination_currency": "eth", "destination_amount": "0.253568242640499553", "destination_network": "ethereum", "fees": { "network_fee_monetary": "1.45", "transaction_fee_monetary": "12.71" }, "source_total_amount": "214.20" }, { "id": "53f864cb28a42f11e1d9d5aff7e43ac96b056406f74cbf618399c6fa40f3d275", "destination_currency": "usdc", "destination_amount": "200.00", "destination_network": "ethereum", "fees": { "network_fee_monetary": "5.80", "transaction_fee_monetary": "12.76" }, "source_total_amount": "218.56" } ], ... }, "livemode": true, "source_currency": "usd", "source_amount": "200.00" }

イーサリアムとソラナのネットワークで ETH と SOL の見積もりを取得するには、次のコマンドを実行します (イーサリアムでは ETH に、ソラナのネットワークでは SOL が返されます)。 destination_currencies と destination_networks を指定すると、製品間の有効な通貨とネットワークのペアごとに見積もりが返されます。destination_currencies のデフォルト値はすべての通貨で、destination_networks のデフォルト値はすべてのネットワークです。

Command Line
curl -G https://api.stripe.com/v1/crypto/onramp_quotes \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:
\ -d "source_amount"="200" \ -d "destination_currencies[]"="eth" \ -d "destination_currencies[]"="sol" \ -d "destination_networks[]"="ethereum" \ -d "destination_networks[]"="solana"

次のようなレスポンスを受信します。

{ "id": "c9ab6fd14f87290ef94b583f0dd346de8e197321e029776c12b7790cd83fb78c", "rate_fetched_at": 1674265576.8238478, "destination_network_quotes": { "bitcoin": [], "ethereum": [ { "id": "97bbd7b9f8bc1a029264cdc28b47b636e989f8bcab96a80a3bded2094131e311", "destination_currency": "eth", "destination_amount": "0.253433817682353791", "destination_network": "ethereum", "fees": { "network_fee_monetary": "1.46", "transaction_fee_monetary": "12.71" }, "source_total_amount": "214.17" } ], "polygon": [], "solana": [ { "id": "79f00923b96543aa69d140172c7cefd0e73a2ed089d8935e63dcf21028698e23", "destination_currency": "sol", "destination_amount": "16.767237943", "destination_network": "solana", "fees": { "network_fee_monetary": "0.01", "transaction_fee_monetary": "12.70" }, "source_total_amount": "212.71" } ] }, "livemode": true, "source_currency": "usd", "source_amount": "200.00" }

イーサリアムとソラナで USDC の見積もりを取得するには、次のコマンドを実行します。

Command Line
curl -G https://api.stripe.com/v1/crypto/onramp_quotes \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:
\ -d "source_amount"="200" \ -d "destination_currencies[]"="usdc" \ -d "destination_networks[]"="ethereum" \ -d "destination_networks[]"="solana"

次のようなレスポンスを受信します。

{ "id": "8727e8de9a22915aea079973028054e31d362a328758a5953cee6ba1b6f22569", "rate_fetched_at": 1674268717.432479, "destination_network_quotes": { "bitcoin": [], "ethereum": [ { "id": "603f29933c921d59b169572cf2d61da7d88f2a6973da0d6fcb686b3dec3de223", "destination_currency": "usdc", "destination_amount": "200.00", "destination_network": "ethereum", "fees": { "network_fee_monetary": "5.88", "transaction_fee_monetary": "12.76" }, "source_total_amount": "218.64" } ], "polygon": [], "solana": [ { "id": "38b8388072e6272e7a0c0d5ee1161d3d747362a574f54fe76f1554ff60e3a007", "destination_currency": "usdc", "destination_amount": "200.00", "destination_network": "solana", "fees": { "network_fee_monetary": "0.01", "transaction_fee_monetary": "12.70" }, "source_total_amount": "212.71" } ] }, "livemode": true, "source_currency": "usd", "source_amount": "200.00" }

destination_amount が指定された単一の支払い先の通貨とネットワークのペア (イーサリアムの ETH) の見積もりを取得するには、次のコマンドを実行します。

Command Line
curl -G https://api.stripe.com/v1/crypto/onramp_quotes \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:
\ -d "destination_amount"="0.42" \ -d "destination_currencies[]"="eth" \ -d "destination_networks[]"="ethereum"

次のようなレスポンスを受信します。

{ "id": "74f73859a8836293ce4f1e6757dc258c9f1016deea7b075faba8b5755d163168", "rate_fetched_at": 1674268804.6989243, "destination_network_quotes": { "bitcoin": null, "ethereum": [ { "id": "f1adad5680b081031b03b89c174d25ce6b609416fc82f976423e95a089a10334", "destination_currency": "eth", "destination_amount": "0.420000000000000000", "destination_network": "ethereum", "fees": { "network_fee_monetary": "1.45", "transaction_fee_monetary": "21.06" }, "source_total_amount": "719.53" } ], "polygon": null, "solana": null }, "livemode": true, "source_currency": "usd", "source_amount": "697.02" }
このページはお役に立ちましたか。
はいいいえ
お困りのことがございましたら 、サポートにお問い合わせください。
早期アクセスプログラムにご参加ください。
変更ログをご覧ください。
ご不明な点がございましたら、お問い合わせください。
LLM ですか?llms.txt を読んでください。
Powered by Markdoc