addedOutput schema / $defs
Added value: +{
+ "DocumentOption": {
+ "description": "One accepted way to fill a document slot (e.g. passport or ID card).",
+ "properties": {
+ "copies": {
+ "default": [],
+ "description": "Names of the customer's own fields copied onto this document automatically.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Copies",
+ "type": "array"
+ },
+ "fields": {
+ "default": [],
+ "description": "Extra values this document needs. Send them in the slot's `fields`.",
+ "items": {
+ "$ref": "#/$defs/FieldSpec"
+ },
+ "title": "Fields",
+ "type": "array"
+ },
+ "file_required": {
+ "default": true,
+ "description": "True when the customer must upload a file for this option.",
+ "title": "File Required",
+ "type": "boolean"
+ },
+ "key": {
+ "description": "Value to send as `option` for this document type.",
+ "title": "Key",
+ "type": "string"
+ },
+ "label": {
+ "description": "Label to show the customer, e.g. 'Passport'.",
+ "title": "Label",
+ "type": "string"
+ },
+ "needs_address": {
+ "default": false,
+ "description": "True when this document refers to the address the customer gave.",
+ "title": "Needs Address",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "key",
+ "label",
+ "file_required",
+ "fields",
+ "copies",
+ "needs_address"
+ ],
+ "title": "DocumentOption",
+ "type": "object"
+ },
+ "DocumentSlot": {
+ "description": "A required proof (identity, address, registration) with its options.",
+ "properties": {
+ "help": {
+ "default": "",
+ "description": "Help text from the carrier.",
+ "title": "Help",
+ "type": "string"
+ },
+ "label": {
+ "description": "Label to show the customer, e.g. 'Proof of identity'.",
+ "title": "Label",
+ "type": "string"
+ },
+ "name": {
+ "description": "Key for this slot in `documents` and in the `file.<name>` part.",
+ "title": "Name",
+ "type": "string"
+ },
+ "needs_input": {
+ "description": "False when there is nothing to ask: one option, no file, no extra\nvalues. The UI hides such a slot; the plug-in still fills it.",
+ "readOnly": true,
+ "title": "Needs Input",
+ "type": "boolean"
+ },
+ "options": {
+ "description": "The accepted ways to fill this slot. The customer picks one.",
+ "items": {
+ "$ref": "#/$defs/DocumentOption"
+ },
+ "title": "Options",
+ "type": "array"
+ }
+ },
+ "required": [
+ "name",
+ "label",
+ "help",
+ "options",
+ "needs_input"
+ ],
+ "title": "DocumentSlot",
+ "type": "object"
+ },
+ "FieldOption": {
+ "description": "One allowed value for a field with a fixed set of answers.",
+ "properties": {
+ "key": {
+ "description": "Value to send.",
+ "title": "Key",
+ "type": "string"
+ },
+ "label": {
+ "description": "Label to show the customer.",
+ "title": "Label",
+ "type": "string"
+ }
+ },
+ "required": [
+ "key",
+ "label"
+ ],
+ "title": "FieldOption",
+ "type": "object"
+ },
+ "FieldSpec": {
+ "description": "One value the customer types in.",
+ "properties": {
+ "help": {
+ "default": "",
+ "description": "Help text from the carrier.",
+ "title": "Help",
+ "type": "string"
+ },
+ "kind": {
+ "default": "text",
+ "description": "Input kind: 'text', 'email', 'phone', 'url', or 'choices' (pick several of `options`; send their keys joined by commas).",
+ "enum": [
+ "text",
+ "email",
+ "phone",
+ "url",
+ "choices"
+ ],
+ "title": "Kind",
+ "type": "string"
+ },
+ "label": {
+ "description": "Label to show the customer.",
+ "title": "Label",
+ "type": "string"
+ },
+ "max_choices": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For kind 'choices': the most options to pick.",
+ "title": "Max Choices"
+ },
+ "max_length": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The most characters the value may hold, when known, counted in UTF-16 code units (an emoji counts as 2). Enforced: a longer value gets 422. A form can show a field allowed more than about 100 characters as a box that wraps.",
+ "title": "Max Length"
+ },
+ "min_choices": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For kind 'choices': the fewest options to pick.",
+ "title": "Min Choices"
+ },
+ "name": {
+ "description": "Key to send this value under in `fields`.",
+ "title": "Name",
+ "type": "string"
+ },
+ "options": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/$defs/FieldOption"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Allowed values, when the field is a choice. Show a select, not a text box.",
+ "title": "Options"
+ },
+ "pattern": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Regular expression the value must match, when the carrier gives one.",
+ "title": "Pattern"
+ },
+ "required": {
+ "default": true,
+ "description": "False when the field is optional.",
+ "title": "Required",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name",
+ "label",
+ "kind",
+ "help",
+ "pattern",
+ "options",
+ "required",
+ "min_choices",
+ "max_choices",
+ "max_length"
+ ],
+ "title": "FieldSpec",
+ "type": "object"
+ }
+}
addedOutput schema / anyOf
Added value: +[
+ {
+ "description": "What the carrier needs for one (country, number type, subject type),\nas the public API shows it: without the carrier's name.",
+ "properties": {
+ "address_required": {
+ "default": false,
+ "description": "True when an address must be collected.",
+ "title": "Address Required",
+ "type": "boolean"
+ },
+ "country_code": {
+ "description": "ISO alpha-2 country code.",
+ "title": "Country Code",
+ "type": "string"
+ },
+ "documents": {
+ "default": [],
+ "description": "Documents to collect. Skip slots with `needs_input` false.",
+ "items": {
+ "$ref": "#/$defs/DocumentSlot"
+ },
+ "title": "Documents",
+ "type": "array"
+ },
+ "fields": {
+ "default": [],
+ "description": "Values to collect about the person or business.",
+ "items": {
+ "$ref": "#/$defs/FieldSpec"
+ },
+ "title": "Fields",
+ "type": "array"
+ },
+ "number_type": {
+ "description": "'local', 'mobile', 'toll_free', or 'national'.",
+ "title": "Number Type",
+ "type": "string"
+ },
+ "required": {
+ "description": "False when the carrier needs no verification for this combination.",
+ "title": "Required",
+ "type": "boolean"
+ },
+ "subject_type": {
+ "description": "'person' or 'business'.",
+ "enum": [
+ "person",
+ "business"
+ ],
+ "title": "Subject Type",
+ "type": "string"
+ },
+ "subject_types": {
+ "default": [],
+ "description": "Subject types the carrier accepts here, so you can offer the choice.",
+ "items": {
+ "enum": [
+ "person",
+ "business"
+ ],
+ "type": "string"
+ },
+ "title": "Subject Types",
+ "type": "array"
+ }
+ },
+ "required": [
+ "country_code",
+ "number_type",
+ "subject_type",
+ "required",
+ "fields",
+ "documents",
+ "address_required",
+ "subject_types"
+ ],
+ "title": "VerificationRequirements",
+ "type": "object"
+ },
+ {
+ "properties": {
+ "error": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "error"
+ ],
+ "type": "object"
+ }
+]