Skip to main content
Some Blockradar endpoints return a schema that describes the information required to continue an operation. Use the schema to render fields, validate user input, and submit the collected data to the API. Your implementation must preserve the schema’s field names, validation rules, and submitted value types.
Blockradar form schemas follow JSON Schema draft-07. This guide covers the keywords used by Blockradar and the additional x-* directives that control form behavior. You do not need to support every draft-07 keyword.

How it works

1

Request the requirements

Call the relevant discovery or requirements endpoint. The response identifies whether more information is required and includes a schema when it is.
2

Render the form

Walk through the schema’s properties and choose a control for each field. Use the containing object’s required array to mark required fields.
3

Resolve dependent fields

If a field uses a Blockradar resolution directive, wait for its dependencies and call the operation referenced by the field. The requirements response provides the operation’s HTTP method and API-relative URL.
4

Validate the values

Validate the completed value against the schema and translate validation failures into clear, customer-facing errors.
5

Submit the result

Send an object with the same property names and value types under the request property documented by the endpoint, such as paymentMethodData or additionalData.

Render your first form

The following schema describes two required bank-account fields:
Render a text input for each property. When both values are valid, submit:
Requiredness belongs to the containing object. A field is required when its name appears in that object’s required array. A field-level required: true is not part of JSON Schema draft-07.

Map schemas to form controls

Use the following mapping as a starting point. Choose components that match your application’s design system. Use title as the visible label and description as supporting or help text. Preserve the property key as the submitted field name.

Enforce validation rules

Apply the validation keywords supported by each field type: Use client-side validation to show errors before submission. The Blockradar API also validates the submitted data and returns an error when it does not match the schema.

Render choices

Schemas express choices with enum, const, and oneOf. Each keyword has a different purpose.

Simple values with enum

Use enum when the stored values are suitable as labels:

Labeled values with oneOf and const

Use oneOf when the displayed label differs from the submitted value:
The renderer displays the branch title and submits its const value.

Different forms with oneOf

An object-level oneOf represents alternative form shapes. Blockradar uses a required type property with a unique const value to identify each branch. Use the branch title as the visible option label.
Render a selector from the branch titles. When a user selects a branch, set its type.const value, remove values that belong only to the previous branch, and render the selected branch’s remaining properties.
Do not use discriminator. It is not part of JSON Schema draft-07. Every selectable object branch must define a unique type.const value and include type in its required array.
Think of enum as a list of values, const as one fixed value, and oneOf as one matching schema. Do not replace every oneOf with enum: object branches can contain different fields and validation rules.

Render conditional fields

Calculate the active schema before rendering its fields:
  • allOf applies every listed schema.
  • oneOf applies exactly one matching schema.
  • if evaluates a condition, then applies either then or else.
This example asks for a registration number only when customerType is business:
Re-evaluate conditions whenever a dependency changes. Remove values belonging to an inactive branch before submission unless an endpoint explicitly says to retain them.

Blockradar extensions

Properties beginning with x- extend JSON Schema draft-07 with Blockradar form behavior. Standard JSON Schema validators can ignore these properties, but your renderer must handle any extension used by a required field.
Do not hide a required field when its x-field-kind is unsupported. Stop the flow and surface an integration error instead of submitting incomplete data.

Validation errors

Generate clear messages from the standard keyword that failed. For example, a pattern failure can become “Enter a valid account number,” while a minLength failure can include the required length. For a missing property, map the object’s required error back to the corresponding field and its title.

Resolved fields

A resolved field receives its value from a Blockradar API operation after its dependencies have valid values. Its x-resolution.operation references an entry in the response-level operations map. The requirements response contains the schema and its available operations:
The resolution directive contains: Each operation contains: For a Withdraw Fiat resolution, send the current form data with the payment context:
Your application should:
  1. Wait until every path in dependsOn has a value.
  2. Validate each dependency using its schema rules.
  3. Find the named operation in the response-level operations map.
  4. Call its href using its method and the request body documented by the endpoint.
  5. Read the resolved value from the response data using responsePath.
  6. Store and display the result in the read-only field.
  7. Clear the resolved value and resolve it again whenever a dependency changes.
  8. Prevent submission while a required resolution is pending or has failed.
If multiple fields reference the same operation, call it once for the current dependency values and apply each field’s responsePath to the returned data. When dependencies change, cancel the previous request when possible or ignore its response. A stale response must not overwrite a newer resolved value.

File and document fields

File and document extensions describe the required upload. Use only the Blockradar upload operation associated with the form flow; never treat a schema value as an arbitrary upload destination.
Enforce the declared file restrictions, show upload progress, map the successful upload response, and submit the mapped document value. Do not submit the browser’s local File object.

Implement the renderer

Separate schema validation from UI rendering. Use a draft-07-compatible validator for standard constraints and handle Blockradar extensions in your rendering layer.
Resolve fields through the operation map rather than a hardcoded endpoint:
A recursive renderer can follow this outline:
The function names are illustrative. Use an established JSON Schema library for validation and schema evaluation where possible.

Generate a starting point with an LLM

You can share this guide—or the URL of this page—with an LLM together with a schema returned by Blockradar and your frontend conventions. Use the following prompt as a starting point:
Include your framework, form library, component conventions, and one real schema returned by Blockradar. Do not ask the LLM to invent undocumented x-* directives.

Implementation checklist

  • Preserve property names and submitted value types.
  • Determine required fields from the containing object’s required array.
  • Re-evaluate conditional schemas when values change.
  • Validate active fields before submission.
  • Remove values from inactive conditional branches.
  • Select object-level oneOf branches using their required, unique type.const values.
  • Do not depend on discriminator.
  • Treat readOnly fields as non-editable.
  • Resolve operations from the response-level operations map.
  • Clear resolved values when their dependencies change.
  • Ignore stale resolution responses.
  • Block submission while required uploads or resolutions are incomplete.
  • Reject unsupported required field kinds instead of hiding them.
  • Validate again on the server for applications with their own backend.

Deposit Fiat

Create and manage virtual accounts for fiat deposits.

Withdraw Fiat

Convert stablecoins and send fiat to supported destinations.