Skip to content
Back to Prompts

Integrate customer onboarding with KYC and KYB

Build the full onboarding pipeline: terms of service, individual and business customers, document uploads, RFI handling, and status webhooks.

Compliance
Webhooks

Paste this prompt into your coding agent to build compliant customer onboarding, the prerequisite for every other BlindPay flow.

Prompt

text
You are building customer onboarding for BlindPay into my application, covering individuals (KYC) and businesses (KYB).

Before writing code, read these sources and follow them over any prior knowledge:
- https://blindpay.com/docs/llms.txt (read customers, the KYC knowledge base pages, supported countries, and webhooks)
- The OpenAPI spec: curl https://api.blindpay.com/doc

Build the pipeline:
1. Terms of service: POST /v1/e/instances/{instance_id}/tos with a UUID idempotency_key, open the returned session URL for the user, capture completion via the tos.accept webhook.
2. Document uploads: POST /v1/upload?instance_id=... (multipart) for ID documents, selfies, and KYB documents; optionally pre-screen with POST /v1/upload/analyze and warn users when approval_rate is low. Enforce the format rules: PDF/JPEG/PNG, max 5 MB, no screenshots or cropped photos.
3. Create the customer: POST /v1/instances/{instance_id}/customers with type individual or business, and kyc_type standard or enhanced. Route users from high-risk countries to enhanced KYC and block prohibited countries before calling the API.
4. Drive state from webhooks (customer.new, customer.update): handle verifying, approved, rejected, compliance_request (blocking RFI), and approved_rfi (non-blocking RFI). On rejection, surface kyc_warnings and create a new customer rather than editing the rejected one.
5. RFI handling: on compliance_request, fetch the request with GET /v1/instances/{instance_id}/customers/{customer_id}/rfi, collect what is asked, and submit once via POST to the same path. Submission is single-shot and expires at expires_at (27 days), so validate everything client-side first.

Constraints:
- API keys stay server-side. Verify Svix signatures on webhooks.
- Development instances auto-approve KYC (a customer named "Fail" forces rejection), so use that to test both paths.
- Persist re_ and rfi_ IDs and every status transition for audit.

Deliverables: onboarding service, upload helper, webhook-driven state machine for customer status, RFI flow, and a mapping of which form fields are required for individual standard, individual enhanced, and business customers.

How to use

  1. Decide which customer types you support (individuals, businesses, or both) and tell the agent.
  2. Paste the prompt with your stack details.
  3. Use the development instance tricks (auto-approve, the "Fail" name) to exercise every status path.

One API.
Multiple payment rails.

Blind Pay, Inc. (“BlindPay”) is a United States-based financial technology and payments infrastructure company, incorporated in the State of Delaware on May 2, 2024. BlindPay is duly registered as a Money Services Business (“MSB”) with the Financial Crimes Enforcement Network (“FinCEN”) under registration number 31000277566153. BlindPay is not a state-licensed money transmitter and does not, in its own capacity, engage in regulated money transmission services. All such regulated activities are conducted exclusively through, and under the licenses of, duly authorized financial institution partners. BlindPay's role is limited to providing financial technology, virtual account management, payment processing, and related payments infrastructure services that facilitate payment flows and account functionalities. These services are provided in coordination with its licensed partners and in compliance with applicable federal MSB requirements and relevant state regulatory frameworks.

Blind Pay, LLC (“BlindPay”) is a Delaware limited liability company formed on June 24, 2025. BlindPay is duly registered as a Money Services Business (“MSB”) with the Financial Crimes Enforcement Network (“FinCEN”) under registration number 31000318334247 and is listed in the Nationwide Multistate Licensing System (“NMLS”) under NMLS ID #2745309.

BLIND PAY SOCIEDADE PRESTADORA DE SERVIÇOS DE ATIVOS VIRTUAIS LTDA. (“BlindPay”) is a Virtual Asset Service Provider (“VASP”) operating in Brazil. The company is presently completing the regulatory adaptation process required of Virtual Asset Service Provider Companies (SPSAV) under Central Bank of Brazil Resolution No. 520/2025, and remains subject to the transitional regime set forth in Article 88 of that Resolution. Registered address: Avenida Princesa Isabel, nº 15, Sala 1405, Edifício Martinho de Freitas, Centro, Vitória/ES, 29010-361.

BlindPay is a stablecoin API that enables individuals and businesses to move money worldwide.