探索支援的能力
使用GET /v3/customers/{customerId}/capabilities/supported 讀取客戶當前可用的選項:
directions、method 與 accountType 的回應項目。僅在 availability 為 available 或 beta,且 eligibility.eligible 為 true 時繼續。若回傳了 institutions,僅從該回應中選擇一個 ID。
將選定的 data[].id 儲存為 CAPABILITY_ID。切勿從其他客戶或其他環境複製 capability ID。
共用型與專屬型帳戶類型
銀行能力有兩種變體,分別以accountType 欄位與 capability ID 尾綴(例如 ach_pooled、wire_named)標示:
pooled: 共用的 Swipelux 銀行帳戶。每筆入金使用唯一的參考編號來路由資金。用於一次性轉帳。named: 為客戶專屬的銀行資料(虛擬 IBAN、專屬 ACH 帳戶)。可重複使用並可與任何付款人分享。發行銀行帳戶必須使用此類型。
pooled。僅在客戶需要可重複使用的銀行資料時才使用 named。可在 supported 回應中查看有哪些變體可用。
申請能力
使用POST /v3/customers/{customerId}/capabilities/{capabilityId} 申請所選的選項:
institutions 陣列。
將 data.status 儲存為 CAPABILITY_STATUS、data.openTaskIds 儲存為 OPEN_TASK_IDS,並將每個 data.applications[].id 存入 APPLICATION_IDS。
完成當前任務
使用GET /v3/customers/{customerId}/tasks 列出任務,從 OPEN_TASK_IDS 中選擇 ID,然後使用 GET /v3/customers/{customerId}/tasks/{taskId} 讀取每個當前任務:
data.revision 與 data.requirements。若兩者中任一可能已變更,請在提交前立即重新讀取任務。
託管操作
當任務回傳verificationSessions 或 tosSessions 時,請儲存每個 session 的 id 與當前的 url。將客戶引導至回傳的 URL,然後再次讀取該任務。這些是與任務相關的操作,而不是獨立的客戶驗證生命週期。
上傳文件
當要求提供文件時,請使用POST /v3/customers/{customerId}/documents 上傳:
data.id 儲存為 DOCUMENT_ID。
API 答覆
使用POST /v3/customers/{customerId}/tasks/{taskId}/submissions 為當前版本提交一組完整的答覆:
能力就緒後繼續
使用GET /v3/customers/{customerId}/capabilities/{capabilityId} 再次讀取能力: