@fluid-app/fluid-cli-payments 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -2
- package/dist/index.d.mts +20 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1922 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +81 -3
package/README.md
CHANGED
|
@@ -1,3 +1,69 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @fluid-app/fluid-cli-payments
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Fluid CLI plugin for payments onboarding: the KYC form at
|
|
4
|
+
**Settings → Onboarding** in the admin. See what's missing, fill in fields and
|
|
5
|
+
documents, and submit the form for review.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @fluid-app/fluid-cli @fluid-app/fluid-cli-payments
|
|
9
|
+
fluid login
|
|
10
|
+
fluid payments onboarding show # status, steps, and every required field still missing
|
|
11
|
+
fluid payments onboarding fields --required # keys, types, options, and when each is required
|
|
12
|
+
fluid payments onboarding options mcc-codes # also business-types (--country US), countries, currencies
|
|
13
|
+
fluid payments onboarding set --yes \
|
|
14
|
+
--set info.user_has_authority=true --set info.user_is_signatory=true \
|
|
15
|
+
--set entity.legal_name="Acme Inc" --set entity.country_iso=US \
|
|
16
|
+
--file entity.business_license=./license.pdf
|
|
17
|
+
fluid payments onboarding set --yes --file owner.government_issued_ids=./passport.jpg --id-type passport
|
|
18
|
+
fluid payments onboarding set --yes --owner new --set owner.full_name="Sam Lee" --set owner.is_beneficial_owner=true
|
|
19
|
+
fluid payments onboarding set --yes --set country.US.currency=USD --set country.US.settlement_currency=USD \
|
|
20
|
+
--set country.US.entity_legally_registered=true
|
|
21
|
+
fluid payments onboarding remove owner 42 --yes # or entity, bank, or a country by ISO code
|
|
22
|
+
fluid payments onboarding submit --accept-terms --yes
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Prefer answering question by question? `fluid payments onboarding walk` asks
|
|
26
|
+
for each missing field in form order and saves each answer as you go. Type
|
|
27
|
+
`<` to go back, `>` to skip, or `?` for the menu. From the menu you can jump to
|
|
28
|
+
any step, change a saved answer, or submit. Pick lists cover yes/no, countries,
|
|
29
|
+
currencies, MCC codes, and business types. Sensitive answers are hidden as you
|
|
30
|
+
type. `--step <id>` starts at a step. It needs a terminal; scripts and agents
|
|
31
|
+
use `show` and `set`.
|
|
32
|
+
|
|
33
|
+
`show` and `set` return a `missing` list. Each entry names the step, the
|
|
34
|
+
field, why it's needed, and a `fix`: the `set` flags that resolve it, such as
|
|
35
|
+
`--entity 12 --set entity.website=<value>`. `readyToSubmit: true` means
|
|
36
|
+
`submit` will go through.
|
|
37
|
+
|
|
38
|
+
Fields go to records:
|
|
39
|
+
|
|
40
|
+
- `info.*` and `underwriting.*` are the company's answers.
|
|
41
|
+
- `entity.*` goes to the primary legal entity, or `--entity <id|new>`.
|
|
42
|
+
- `bank.*` goes to the primary bank account, or `--bank <id|new>`.
|
|
43
|
+
- `owner.*` goes to the onboarding contact (the person filling in the form),
|
|
44
|
+
or `--owner <id|new>`.
|
|
45
|
+
- `country.<ISO>.*` adds or updates a country the company sells in.
|
|
46
|
+
|
|
47
|
+
A record that doesn't exist yet is created. The first legal entity and bank
|
|
48
|
+
account become primary, and the first person becomes the onboarding contact.
|
|
49
|
+
|
|
50
|
+
Documents upload with `--file key=path`, up to 10 MB each. Multi-file
|
|
51
|
+
documents add to what's there unless you pass `--replace-files`. Policies and
|
|
52
|
+
agreements also take a URL: `--set underwriting.privacy_policy.link=https://...`.
|
|
53
|
+
|
|
54
|
+
`submit` marks every step complete and accepts Fluid's payments terms for
|
|
55
|
+
the company. That's why it needs `--accept-terms` as well as `--yes`. It
|
|
56
|
+
refuses while anything is missing. The acceptance records the person who
|
|
57
|
+
signed, so it needs a person's sign-in (`fluid login` with email). With a
|
|
58
|
+
company API token, `submit` writes nothing and returns
|
|
59
|
+
`status: "ready_to_submit"` with `submitUrl`, the admin's onboarding form,
|
|
60
|
+
where a person submits.
|
|
61
|
+
|
|
62
|
+
Tax IDs, account and routing numbers, ID numbers, and dates of birth are
|
|
63
|
+
masked in every output. Uploaded documents are named, never linked. Every
|
|
64
|
+
command prints JSON. Failures print a JSON `error` on stderr and exit
|
|
65
|
+
non-zero. Commands that change data ask for confirmation unless you pass
|
|
66
|
+
`--yes`.
|
|
67
|
+
|
|
68
|
+
The walkthrough is the payments onboarding guided setup at
|
|
69
|
+
https://docs.fluid.app/setup.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CommandContext, FluidPlugin } from "@fluid-app/fluid-cli";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Changes to the onboarding form need an explicit yes. Scripts and agents
|
|
7
|
+
* pass `--yes`; an interactive terminal is asked. With neither, nothing runs.
|
|
8
|
+
*/
|
|
9
|
+
declare function confirmChange(question: string, yes: boolean, interactive?: boolean): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Print a failure as JSON on stderr and exit non-zero. The API's error body
|
|
12
|
+
* names fields and reasons, never the submitted values, so its `errors` are
|
|
13
|
+
* passed through as `details`.
|
|
14
|
+
*/
|
|
15
|
+
declare function fail(err: unknown, write?: (text: string) => void): void;
|
|
16
|
+
declare function registerOnboardingCommands(parent: Command, ctx: CommandContext): void;
|
|
17
|
+
declare const plugin: FluidPlugin;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { confirmChange, plugin as default, fail, registerOnboardingCommands };
|
|
20
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;AA8CA;;iBAAsB,aAAA,CACpB,QAAA,UACA,GAAA,WACA,WAAA,aACC,OAAA;;;;;;iBAkBa,IAAA,CACd,GAAA,WACA,KAAA,IAAQ,IAAA;AAAA,iBAmDM,0BAAA,CACd,MAAA,EAAQ,OAAA,EACR,GAAA,EAAK,cAAA;AAAA,cA4TD,MAAA,EAAQ,WAAA"}
|