Authorization ヘッダに入れて下記エンドポイントを呼び出します。マーチャント API Key はサーバから外に出ません。
Session トークンは
buyerIdentity + visitingStoreId でスコープされ、その customer がその店舗内で保持するレコードに対する操作のみ認可されます。マーチャント全体の状態は読み取れません。各呼び出しで必須のヘッダ
| ヘッダ | 値 |
|---|---|
Authorization | Bearer <session-token>(Issue Session Token が返す JWT) |
X-Environment | test または prod(トークン mint 時の environment と一致) |
エンドポイント
Preview Trial
Customer がトライアルの対象か確認
ワンタイム注文の作成
認証済み customer 用にワンタイム注文を作成
ワンタイム注文のキャンセル
決済完了前に pending のワンタイム注文をキャンセル
サブスクリプション注文の作成
認証済み customer 用に定期プランを購読
サブスクリプションのキャンセル
customer を代表して active または pending のサブスクリプションをキャンセル
サブスクリプションの再有効化
canceling 中に予定済みキャンセルを取り消すプラン変更
active なサブスクリプションを別の商品へ切替
GraphQL
Customer 自身の注文、支払い、返金を照会
トークン経路固有のエラー
Session-token 呼び出し経路でのみ発生するエラー:| ステータス | errors[0].message | 意味 |
|---|---|---|
| 400 | Missing X-Context-Buyer-Identity header | トークンに buyer identity claim が含まれない — 再 mint |
| 400 | Missing X-Context-Visiting-Store-Id header | トークンが店舗にスコープされていない — visitingStoreId 付きで再 mint |
| 401 | Authentication failed | Session token の期限切れ、形式不正、または別マーチャント向けに署名されている |