API Credentialを発行
Merchant Portal → Merchant API
Credential作成後、Key ID (vmk_...) とSecretが表示されます。Secretは再表示されないため、安全なSecret Managerへ保存してください。
V-RECの現行APIは、Merchant Server API、Corporate / Partner Payout API、本人用User Session API、SAKURA Connected Apps連携の4層に分かれています。ユーザー登録、KYC、カード、Payout作成、Tenant Fundingによる資金割当を同じAPIとして扱わず、責任境界ごとに実装してください。
# Merchant Server API
X-VREC-Merchant-Key: vmk_...
X-VREC-Timestamp: ...
X-VREC-Nonce: ...
X-VREC-Signature: ...
# Corporate / Partner Payout API
X-VREC-Key: vrec_...
X-VREC-Timestamp: ...
X-VREC-Nonce: ...
X-VREC-Signature: ...Merchant Server APIを利用する場合、最初にMerchant PortalでAPI Credentialを発行し、次にWebhook URLとWebhook Secretを設定してください。API SecretとWebhook Secretは別物です。
Merchant Portal → Merchant API
Credential作成後、Key ID (vmk_...) とSecretが表示されます。Secretは再表示されないため、安全なSecret Managerへ保存してください。
Merchant Portal → Merchant API → Merchant Webhook
HTTPSの受信URLと32文字以上のWebhook Secretを登録します。保存後はCONFIGURED表示と保存済みURLを確認できます。
webhook.test
Merchant Portalの「テストWebhookを送信」を押し、配信履歴でDELIVEREDとHTTP 2xxを確認してください。配信はschedulerにより処理されます。
X-VREC-Merchant-Key: vmk_...
X-VREC-Timestamp: UNIX timestamp
X-VREC-Nonce: unique random string
X-VREC-Signature: HMAC-SHA256(...)X-VREC-Event: user.registered | user.kyc.updated | tenant.funding.* | webhook.test
X-VREC-Delivery: mwd_...
X-VREC-Timestamp: UNIX timestamp
X-VREC-Signature: HMAC-SHA256(timestamp + "\n" + delivery + "\n" + event + "\n" + SHA256(raw_body))受信側はraw bodyを変更せずに署名検証し、正常受信時はHTTP 2xxを返してください。
外部法人のバックエンドで使うAPIと、本人ブラウザ、V-RECとSAKURA間の内部APIを混在させないでください。
/api/merchant/v1/*
ユーザー登録・状態管理・KYC状態・mask済みカード・Merchant帰属残高/取引/Payout参照・レポート。
/api/v1/payouts*
外部法人からV-RECユーザーへのPayout指示を作成・参照します。Payout作成は資金CREDITそのものではありません。
/api/v1/me/*
ログイン済み本人のKYC入力、カード発行/操作、本人残高・取引、PAN/CVVのstep-up表示。
/api/integrations/vrec/*
V-RECとSAKURA間の内部連携。プロフィール/KYC、カード、Tenant Fundingの状態・残高・fund/return/usageを処理します。一般Merchantへ直接公開するAPIではありません。
v2.5.0: 暗号資産ウォレット(crypto_wallet / crypto_wallet_manage)も同経路で処理します。
加盟店専用の講座・受講履歴、外部講義終了通知、Googleカレンダー同期、加盟店プールの送金履歴とガスレス送金要求に対応します。ブラウザではなく自社サーバーからHMAC署名で呼び出します。
Merchant APIはサーバー間通信専用です。認可対象MerchantはCredentialから決まり、request bodyのmerchant_idを認可根拠にしません。
METHOD + "\n" +
PATH + "\n" +
CANONICAL_QUERY + "\n" +
TIMESTAMP + "\n" +
NONCE + "\n" +
SHA256(raw_body)/api/merchant/v1/context認証中Merchantと利用可能scopeを確認
/api/merchant/v1/profile-optionsSAKURA管理のcountry / dial code候補
/api/merchant/v1/users自社Merchantに所属するV-RECユーザー一覧
/api/merchant/v1/usersユーザー作成。Idempotency-Key必須
/api/merchant/v1/user-links既存SAKURAユーザー用の本人同意URLを発行
/api/merchant/v1/user-links/{id}本人同意リンクの完了状態を確認
/api/merchant/v1/users/{id}ユーザー詳細
/api/merchant/v1/users/{id}/statusACTIVE / SUSPENDED
/api/merchant/v1/users/{id}/kycSAKURAの現在KYC状態を同期して取得
/api/merchant/v1/users/{id}/kyc/start本人へV-RECログインを要求。eKYC URLはMerchantへ返さない
/api/merchant/v1/crypto-salesv2.6.0 暗号資産売買の実績・ロイヤリティ(crypto_sales.read)
/api/merchant/v1/users/{id}/walletv2.5.0 ウォレットのアドレス・残高を参照のみ(wallets.read)
/api/merchant/v1/users/{id}/cardsmask済みカード一覧。PAN/CVVなし
/api/merchant/v1/users/{id}/cardsVIRTUALカード発行(cards.issue、運営者承認、Idempotency-Key必須)
/api/merchant/v1/users/{id}/cards/issuance/{key}発行結果の照会。照合待ちは再送せず運営者による確認が必要
/api/merchant/v1/users/{id}/cards/{cardId}/transactionsMatchMoveカード別決済履歴(transactions.read)
/api/merchant/v1/users/{id}/cards/{cardId}/statuscards.manage の明示許可でカードをFREEZE/SUSPEND(発行会社へのFROZEN要求)またはUNFREEZEできます。CLOSEDには対応しません。
/api/merchant/v1/users/{id}/cards/{cardId}/sensitive-linkPAN/CVVは返さずV-REC本人パスワード確認画面URLのみ発行(cards.sensitive.link、運営者承認)
/api/merchant/v1/users/{id}/matchmove-balanceSAKURA経由でMatchMove実残高を取得(台帳とは別、取得失敗時は503)
/api/merchant/v1/users/{id}/cards/physical/linkProxy / Association IDで既存Physical Cardを紐付け
/api/merchant/v1/users/balancesbalances.read · 自Merchantのユーザー残高を一括取得(最大200件/回)
/api/merchant/v1/users/{id}/balanceMerchant帰属残高
/api/merchant/v1/users/{id}/transactionsMerchant帰属取引
/api/merchant/v1/payouts当該Merchantに関連するPayout参照
/api/merchant/v1/reportMerchant集計レポート
POST /api/merchant/v1/users では、既定でV-RECパスワード設定メールとSAKURAパスワード設定メールを該当時に自動送信します。notifications.send_vrec_activation_email と notifications.send_sakura_password_setup_email をJSON booleanで指定すると、それぞれ独立してON/OFFできます。
"notifications": {
"send_vrec_activation_email": false,
"send_sakura_password_setup_email": true
}V-RECメールは新規ローカルログイン作成時だけです。SAKURAメールはSAKURAからone-time setup URLが返った場合だけです。SAKURA setup URLはMerchant APIへ公開しません。responseのuser.notificationsで sent / disabled / not_applicable / failed を確認できます。
Corporate / Partner Payout APIは、承認済みPartnerが紐付くMerchantのMatchMove USD残高から、V-RECユーザーのMatchMove USDウォレットへ送金する経路です。Tenantが直接資金を割り当てる場合は別のMerchant Tenant Funding APIを使用します。このAPIで作成したPayoutはTenant Fundingでは資金化されません。
資金の裏付けがない付与を禁止 参照番号だけで残高を増やす旧LEGACY_REFERENCE方式は新規作成できません。新規PayoutはMERCHANT_BALANCEのみです。SAKURAがCOMPLETEDを返し、Payout ID・受取人・資産種別・金額が一致し、MatchMove取引IDとSAKURA転送UUIDが存在する場合に限りCREDITEDにします。送金証跡は台帳ロット作成より先に保存され、ロット作成だけが保留された場合はFUNDEDのまま/reconcileで再試行します。タイムアウト時は再送せず照合してください。
/api/v1/payoutsPayout指示作成(資金は動きません)。Idempotency-Key必須。SAKURAのKYCが承認済みならPENDING_FUNDS、未承認ならAWAITING_KYC。同じキーでの再送は全項目が同一の場合のみ元のPayoutを201で返します。
/api/v1/payouts/{id}/fundMATCHMOVEUSD→MATCHMOVEUSDの送金をSAKURAへ依頼。ボディは署名付き {}。HTTP 200でも成功とは限らないため、status と merchant_transfer_status で判定します。同じPayoutへの再実行は安全で、二重送金になりません。最長150秒かかります。
/api/v1/payouts/{id}/reconcile読取専用の照合(再送金しません)。ボディは {}。結果不明・処理中・入金保留のPayoutに使用します。
/api/v1/payouts/{id}/cancel送金が一度も行われていないことをSAKURAで確認できる場合だけ取消。ボディは {}。取消後もexternal_referenceは再利用できません。
/api/v1/payouts/{id}/approval-status上限超過時のMerchant承認状態をSAKURAから読取。fund_retry_permitted=true のときだけ同じPayoutで /fund を再実行します。
/api/v1/payoutsPartnerのPayout一覧(新しい順に最大100件、ページ送りなし)
/api/v1/payouts/{id}Payout状態確認(V-RECの保存状態。SAKURAへは問い合わせません)
/api/v1/beneficiaries/{id}/statusbeneficiaryの状態/KYCを確認
/api/v1/webhooks/testPartner API署名の疎通確認(送信したJSONを返します。Webhookは送信しません)
POST /api/v1/payouts は受領指示を登録するだけです。資金移動は /fund で行い、SAKURAの送金証跡を検証できた時点でCREDITEDになります。Tenant FundingによるPayoutの資金化は、過去に作成されたLEGACY_REFERENCEのPayoutだけが対象です。
Partner APIの署名文字列はMerchant APIと異なります(並び順が違い、クエリは含めません)。Merchant API用の実装を流用しないでください。
X-VREC-Key: vrec_... # Partner key ID
X-VREC-Timestamp: 1792540800 # Unix seconds, within ±300 s
X-VREC-Nonce: 7d1c... # unique, 1-128 chars, never reused
X-VREC-Signature: hex HMAC-SHA256
body_hash = hex(SHA256(raw_body)) # GET: SHA256("") = e3b0c442...b855
message = TIMESTAMP + "\n" + NONCE + "\n" + METHOD + "\n" + PATH + "\n" + body_hash
signature = hex(HMAC-SHA256(message, partner_secret))
# PATH = URL path only, e.g. /api/v1/payouts/po_abc/fund
POSTはすべてJSONオブジェクトのボディが必須です。項目がない場合は {} を送信してください(空ボディは400 invalid_json)。認証エラーは401(partner_not_authorized / stale_timestamp / invalid_nonce / invalid_signature)、nonce再利用は409 replayed_nonce、許可IP外は403 ip_not_allowed です。
金額の表示通貨はUSDです。source_assetとdestination_assetの両方を指定し、同じ資産種別の場合に限り受付します。実送金できるのはMATCHMOVEUSD同士だけで、USD→USD、SGP-USD→SGP-USDは作成できても /fund で拒否されます。異種資産間・自動交換は禁止です。
POST /api/v1/payouts
Idempotency-Key: corp-20261021-0001
{
"beneficiary_id": "VREC-...",
"merchant_id": "mrc_...", // optional, see OpenAPI
"amount": "100.00", // string, max 2 decimals
"currency": "USD",
"funding_mode": "MERCHANT_BALANCE",
"source_asset": "MATCHMOVEUSD",
"destination_asset": "MATCHMOVEUSD",
"external_reference": "INVOICE-2026-10-001", // required, unique per Partner
"purpose": "corporate_payout" // optional, max 80 chars
}
→ 201 {"id":"po_...","status":"PENDING_FUNDS","merchant_transfer_status":null, ...}
POST /api/v1/payouts/po_.../fund body: {}
→ 200 {"status":"CREDITED","merchant_transfer_status":"COMPLETED","provider_tx_id":"...", ...}
| merchant_transfer_status | 次の対応 |
|---|---|
COMPLETED + CREDITED | 完了 |
COMPLETED + FUNDED | 送金は確認済み。台帳入金が保留(KYC等)。後で /reconcile |
SUBMITTING | 処理中。GETまたは /reconcile で確認 |
RECONCILE_REQUIRED | 結果不明。/reconcile のみ。新しいPayoutを作らない |
RETRYABLE | 送金されていないことが確定。merchant_pre_submission_reject_code を確認し、原因解消後に同じPayoutで /fund、または /cancel |
FAILED_CONFIRMED | 運用で未実行を確認済み。/cancel 後、新しい external_reference で作り直し |
事前条件:承認済みPartnerとMerchantの紐付け、受取人のKYC承認とACTIVE/FULLの所属、SAKURA Connected Appのcorporate_payout権限、そしてSAKURAの加盟店管理画面「V-REC Corporate Payout」で加盟店が送金上限(1件・日次、UTC日付)を有効化していること。未設定の場合 /fund は RETRYABLE(corporate_payout_policy_not_enabled)になります。
上限超過時:/fund が RETRYABLE(corporate_payout_merchant_approval_required)を返し、SAKURAに承認申請が作られます。加盟店がSAKURAで個別承認(24時間有効)した後、GET /approval-status で fund_retry_permitted=true を確認してから、同じPayoutで /fund を再実行してください。承認されない場合は /cancel できます。
Tenant FundingではV-RECがテナント利用可能額を独自正本として持ちません。GET balance / capacityでSAKURA正本を確認し、直接AllocationまたはPayout経由Fundingを実行します。新規資金移転はACTIVE/FULLかつSource Merchant=Tenant MerchantのMembershipだけが対象です。READONLYはmask済みカード参照を維持できますが、Tenant資金の新規割当には使えません。
現在の資金操作はMerchant APIのtenant_funding.read/writeだけでは承認されません。既存SAKURA Connected Appは明示的にtenant_fundingへ再認可し、接続Merchant・origin・program、Tenant binding、ENFORCED、api_execute_enabledおよび照合状態を確認してください。権限不足やREADONLYは資金割当を拒否します。
/api/merchant/v1/tenant-funding/balancetenant_funding.read · SAKURA正本のavailable / reserved / expiry policy確認
/api/merchant/v1/tenant-funding/diagnosticstenant_funding.read · 実資金を動かさずschema/binding/SAKURA/Membership/Source-Target Merchant/操作可否を確認
/api/merchant/v1/tenant-funding/users/{id}/capacitytenant_funding.read · Membershipと割当可能額の事前確認(割当可能額=テナント利用可能額−割当手数料)
/api/merchant/v1/tenant-funding/allocationstenant_funding.write · Tenant→User直接Allocation。Idempotency-Key必須。残高不足や処理中の別操作(operation_in_progress / unresolved_request_exists)などで実行されなかった場合は409・REJECTED。REJECTEDは資金が動いていないため、原因を解消して新しいIdempotency-Keyで作り直してください。
/api/merchant/v1/tenant-funding/allocationstenant_funding.read · 指定日時以降に更新されたAllocationの一覧(Cronでの結果取得用)
/api/merchant/v1/tenant-funding/allocations/{id}tenant_funding.read · Allocation状態確認
/api/merchant/v1/tenant-funding/allocations/{id}/reversetenant_funding.write · そのAllocation由来の未使用額だけを組み戻し
/api/merchant/v1/tenant-funding/users/{id}/returntenant_funding.write · 当該Tenant由来のユーザー保有資金を返却
Direct allocation
GET /tenant-funding/balance
GET /tenant-funding/users/{id}/capacity
↓ eligible / available
POST /tenant-funding/allocations + Idempotency-Key
↓
V-REC re-checks Membership + SAKURA status
↓
SAKURA /api/integrations/vrec/tenant-funding/fund
↓ 201 COMPLETED / 409 REJECTED (not executed) / 202 UNKNOWN (retry same key)
GET /tenant-funding/allocations?updated_since=… (cron result collection)
V-REC creates provenance lot with expiry snapshot
Payout-based funding (historical LEGACY_REFERENCE payouts only)
existing LEGACY_REFERENCE payout, KYC APPROVED
↓ tenant-funding cron, same SAKURA fund guard
↓ COMPLETED
Payout = CREDITED
# New payouts (MERCHANT_BALANCE) are never funded by Tenant Funding.
180日制限等のexpiryはSAKURAがAllocation実行時に返すeffective snapshotをV-REC lotへ保存します。V-REC側の表示・利用・returnで期限を再起算しません。
SAKURAの /api/integrations/vrec/tenant-funding/* は引き続きConnected App間の内部APIです。外部Merchantはそれを直接呼ばず、上記 /api/merchant/v1/tenant-funding/* を使用します。
/api/v1/me本人セッション情報
/api/v1/me/kyc本人のKYC状態
/api/v1/me/kyc/form現在のSAKURA KYCFORMを動的取得
/api/v1/me/kyc/submit本人KYC送信。next_actionを処理
/api/v1/me/cards/VIRTUALKYC承認済み本人がVirtual Card発行
/api/v1/me/cards/PHYSICALKYC承認済み本人がPhysical Card発行
/api/v1/me/cards/physical/link本人step-upで既存Physical Cardを紐付け
/api/v1/me/cards/{id}/sensitivecurrent_password確認後にPAN/Expiry/CVVを一時取得。no-store
/api/v1/me/walletv2.5.0 ウォレット概要・USDT/ETH残高・ガスレス可否
/api/v1/me/wallet本人step-upでアンホステッドウォレット作成。シードフレーズは1回だけ返却(no-store)
/api/v1/me/wallet/rotate本人step-upでウォレット入れ替え(ローテーション)
/api/v1/me/wallet/purchase-quotesv2.6.0 暗号資産を代金とするSGP-USD/加盟店ポイントの購入(売買契約の見積)
/api/v1/me/wallet/purchases/{contract}/confirm契約条件に同意して代金を支払う(当社1%+加盟店ロイヤリティ)
/api/v1/me/wallet/gasless-transferUSDTガスレス送金。Idempotency-Key必須、ガス代はSAKURA負担
/api/v1/me/balance本人V-REC残高
/api/v1/me/transactions本人取引
/api/v1/me/payouts本人が受領したPayout
profile-options → POST /merchant/v1/users
kyc/start → user login → /me/kyc/form → submit → webhook
beneficiary/status → POST /api/v1/payouts (MERCHANT_BALANCE)
POST /api/v1/payouts/{id}/fund → (approval-status) → reconcile
Tenant資金の割当は別API:/api/merchant/v1/tenant-funding/allocations
KYC APPROVED → /me/cards/VIRTUAL|PHYSICAL
GET payout / Merchant balance / user balance / webhooks
user.kyc.updatedSAKURAから再取得した最新KYC状態をMerchantへ署名付き配信
payout.created / payout.creditedPartner向けのPayout通知(この2種類のみ。取消・照合待ちは通知されません)。イベントIDはないため、X-VREC-Event と payout.id の組で重複排除し、状態はGETで確認してください。 署名仕様 →
Webhook Secretはフロントへ公開せず、raw bodyを用いて署名検証してください。
Merchant APIには直接fund endpointはありません。 ユーザーへの受領指示はPartner Payout APIで作成します。Merchantでバーチャルカード発行が可能ですが運営者のcards.issue権限が必要です。PAN/CVVはMerchantサーバーに返しません。本人がV-REC画面でパスワードを入力し、5分間有効の一度限りのリンクから参照できます。Merchantはcards.manageの明示許可でフリーズ/解除が可能ですが、PINやPAN/CVVは取得できません。