From 742905a166c093297e2250b6673a2aa77606f3c2 Mon Sep 17 00:00:00 2001 From: Eric Viana Date: Mon, 9 Feb 2026 11:06:09 -0300 Subject: [PATCH 1/6] WIP --- src/resources/receivers/index.ts | 307 ++++++++++++---------- src/resources/receivers/receivers.test.ts | 46 +++- 2 files changed, 193 insertions(+), 160 deletions(-) diff --git a/src/resources/receivers/index.ts b/src/resources/receivers/index.ts index f9451c1..a7c5221 100644 --- a/src/resources/receivers/index.ts +++ b/src/resources/receivers/index.ts @@ -21,6 +21,90 @@ export type PurposeOfTransactions = | "receive_salary" | "other"; +export type AccountPurpose = + | "charitable_donations" + | "ecommerce_retail_payments" + | "investment_purposes" + | "business_expenses" + | "payments_to_friends_or_family_abroad" + | "personal_or_living_expenses" + | "protect_wealth" + | "purchase_goods_and_services" + | "receive_payments_for_goods_and_services" + | "tax_optimization" + | "third_party_money_transmission" + | "other" + | "payroll" + | "treasury_management"; + +export type BusinessType = + | "corporation" + | "llc" + | "partnership" + | "sole_proprietorship" + | "trust" + | "non_profit"; + +export type BusinessIndustry = + | "541511" + | "541512" + | "541519" + | "518210" + | "511210" + | "541611" + | "541618" + | "541330" + | "541990" + | "522110" + | "523110" + | "523920" + | "423430" + | "423690" + | "423110" + | "423830" + | "423840" + | "423510" + | "424210" + | "424690" + | "424990" + | "454110" + | "334111" + | "334118" + | "325412" + | "339112" + | "336111" + | "336390" + | "551112" + | "561499" + | "488510" + | "484121" + | "493110" + | "424410" + | "424480" + | "315990" + | "313110" + | "213112" + | "517110" + | "541214"; + +export type EstimatedAnnualRevenue = + | "0_99999" + | "100000_999999" + | "1000000_9999999" + | "10000000_49999999" + | "50000000_249999999" + | "2500000000_plus"; + +export type SourceOfWealth = + | "business_dividends_or_profits" + | "investments" + | "asset_sales" + | "client_investor_contributions" + | "gambling" + | "charitable_contributions" + | "inheritance" + | "affiliate_or_royalty_income"; + export type SourceOfFundsDocType = | "business_income" | "gambling_proceeds" @@ -60,7 +144,9 @@ export type Owner = { id_doc_front_file: string; id_doc_back_file: string | null; proof_of_address_doc_type: ProofOfAddressDocType; - proof_of_address_doc_file: string; + proof_of_address_doc_file: string | null; + ownership_percentage: number | null; + title: string | null; }; export type IndividualWithStandardKYC = { @@ -202,88 +288,53 @@ export type BusinessWithStandardKYB = { }; }; -export type CreateIndividualWithStandardKYCInput = { - external_id?: string; - address_line_1: string; - address_line_2?: string; - city: string; +export type CreateReceiverInput = { country: Country; - date_of_birth: string; email: string; - first_name: string; - phone_number: string | null; - id_doc_country: Country; - id_doc_front_file: string; - id_doc_type: IdentificationDocument; - id_doc_back_file: string | null; - last_name: string; - postal_code: string; - proof_of_address_doc_file: string; - proof_of_address_doc_type: ProofOfAddressDocType; - state_province_region: string; - tax_id: string; - tos_id: string; -}; - -export type CreateIndividualWithStandardKYCResponse = { - id: string; -}; - -export type CreateIndividualWithEnhancedKYCInput = { - external_id?: string; - address_line_1: string; - address_line_2?: string; - city: string; - country: Country; - date_of_birth: string; - email: string; - first_name: string; - id_doc_country: Country; - id_doc_front_file: string; - id_doc_type: IdentificationDocument; - id_doc_back_file: string | null; - individual_holding_doc_front_file: string; - last_name: string; - postal_code: string; - phone_number: string | null; - proof_of_address_doc_file: string; - proof_of_address_doc_type: ProofOfAddressDocType; - purpose_of_transactions: PurposeOfTransactions; - source_of_funds_doc_file: string; - source_of_funds_doc_type: SourceOfFundsDocType; - purpose_of_transactions_explanation: string | null; - state_province_region: string; - tax_id: string; - tos_id: string; -}; - -export type CreateIndividualWithEnhancedKYCResponse = { - id: string; -}; - -export type CreateBusinessWithStandardKYBInput = { - external_id?: string; - address_line_1: string; - address_line_2?: string; - alternate_name: string; - city: string; - country: Country; - email: string; - formation_date: string; - incorporation_doc_file: string; - legal_name: string; - owners: Array>; - postal_code: string; - proof_of_address_doc_file: string; - proof_of_address_doc_type: ProofOfAddressDocType; - proof_of_ownership_doc_file: string; - state_province_region: string; - tax_id: string; - tos_id: string; - website: string | null; + kyc_type: KycType; + type: AccountClass; + account_purpose?: AccountPurpose | null; + address_line_1?: string | null; + address_line_2?: string | null; + alternate_name?: string | null; + business_description?: string | null; + business_industry?: BusinessIndustry | null; + business_type?: BusinessType | null; + city?: string | null; + date_of_birth?: string | null; + estimated_annual_revenue?: EstimatedAnnualRevenue | null; + external_id?: string | null; + first_name?: string | null; + formation_date?: string | null; + id_doc_back_file?: string | null; + id_doc_country?: Country | null; + id_doc_front_file?: string | null; + id_doc_type?: IdentificationDocument | null; + image_url?: string | null; + incorporation_doc_file?: string | null; + ip_address?: string | null; + last_name?: string | null; + legal_name?: string | null; + owners?: Array> | null; + phone_number?: string | null; + postal_code?: string | null; + proof_of_address_doc_file?: string | null; + proof_of_address_doc_type?: ProofOfAddressDocType | null; + proof_of_ownership_doc_file?: string | null; + publicly_traded?: boolean | null; + purpose_of_transactions?: PurposeOfTransactions | null; + purpose_of_transactions_explanation?: string | null; + selfie_file?: string | null; + source_of_funds_doc_file?: string | null; + source_of_funds_doc_type?: SourceOfFundsDocType | null; + source_of_wealth?: SourceOfWealth | null; + state_province_region?: string | null; + tax_id?: string | null; + tos_id?: string | null; + website?: string | null; }; -export type CreateBusinessWithStandardKYBResponse = { +export type CreateReceiverResponse = { id: string; }; @@ -300,59 +351,47 @@ export type GetReceiverResponse = export type UpdateReceiverInput = { receiver_id: string; - email?: string; - tax_id?: string; + account_purpose?: AccountPurpose | null; address_line_1?: string; address_line_2?: string; + alternate_name?: string; + business_description?: string; + business_industry?: BusinessIndustry | null; + business_type?: BusinessType | null; city?: string; - state_province_region?: string; country?: Country; - postal_code?: string; - ip_address?: string; - image_url?: string; - phone_number?: string; - proof_of_address_doc_type?: ProofOfAddressDocType; - proof_of_address_doc_file?: string; - first_name?: string; - last_name?: string; date_of_birth?: string; + email?: string; + estimated_annual_revenue?: EstimatedAnnualRevenue | null; + external_id?: string; + first_name?: string; + formation_date?: string; + id_doc_back_file?: string; id_doc_country?: Country; - id_doc_type?: IdentificationDocument; id_doc_front_file?: string; - id_doc_back_file?: string; - legal_name?: string; - alternate_name?: string; - formation_date?: string; - website?: string; - owners?: Array< - Pick< - Owner, - | "first_name" - | "last_name" - | "role" - | "date_of_birth" - | "tax_id" - | "address_line_1" - | "address_line_2" - | "city" - | "state_province_region" - | "country" - | "postal_code" - | "id_doc_country" - | "id_doc_type" - | "id_doc_front_file" - | "id_doc_back_file" - > - >; + id_doc_type?: IdentificationDocument; + image_url?: string; incorporation_doc_file?: string; + ip_address?: string; + last_name?: string; + legal_name?: string; + owners?: Array>; + phone_number?: string; + postal_code?: string; + proof_of_address_doc_file?: string; + proof_of_address_doc_type?: ProofOfAddressDocType; proof_of_ownership_doc_file?: string; - source_of_funds_doc_type?: SourceOfFundsDocType; - source_of_funds_doc_file?: string; - individual_holding_doc_front_file?: string; + publicly_traded?: boolean | null; purpose_of_transactions?: PurposeOfTransactions; purpose_of_transactions_explanation?: string; - external_id?: string; + selfie_file?: string; + source_of_funds_doc_file?: string; + source_of_funds_doc_type?: SourceOfFundsDocType; + source_of_wealth?: SourceOfWealth | null; + state_province_region?: string; + tax_id?: string; tos_id?: string; + website?: string; }; export type DeleteReceiverInput = string; @@ -415,32 +454,8 @@ export function createReceiversResource(instanceId: string, client: InternalApiC list(): Promise> { return client.get(`/instances/${instanceId}/receivers`); }, - createIndividualWithStandardKYC( - data: CreateIndividualWithStandardKYCInput - ): Promise> { - return client.post(`/instances/${instanceId}/receivers`, { - kyc_type: "standard", - type: "individual", - ...data, - }); - }, - createIndividualWithEnhancedKYC( - data: CreateIndividualWithEnhancedKYCInput - ): Promise> { - return client.post(`/instances/${instanceId}/receivers`, { - kyc_type: "enhanced", - type: "individual", - ...data, - }); - }, - createBusinessWithStandardKYB( - data: CreateBusinessWithStandardKYBInput - ): Promise> { - return client.post(`/instances/${instanceId}/receivers`, { - kyc_type: "standard", - type: "business", - ...data, - }); + create(data: CreateReceiverInput): Promise> { + return client.post(`/instances/${instanceId}/receivers`, data); }, get(receiver_id: GetReceiverInput): Promise> { return client.get(`/instances/${instanceId}/receivers/${receiver_id}`); diff --git a/src/resources/receivers/receivers.test.ts b/src/resources/receivers/receivers.test.ts index 91ef9fb..57860c5 100644 --- a/src/resources/receivers/receivers.test.ts +++ b/src/resources/receivers/receivers.test.ts @@ -1,9 +1,7 @@ import { afterEach, describe, expect, it } from "vitest"; import { BlindPay } from "../../client"; import type { - CreateBusinessWithStandardKYBResponse, - CreateIndividualWithEnhancedKYCResponse, - CreateIndividualWithStandardKYCResponse, + CreateReceiverResponse, GetLimitIncreaseRequestsResponse, GetReceiverLimitsResponse, GetReceiverResponse, @@ -151,6 +149,8 @@ describe("Receivers", () => { id_doc_back_file: "https://example.com/image.png", proof_of_address_doc_type: "UTILITY_BILL", proof_of_address_doc_file: "https://example.com/image.png", + ownership_percentage: 25, + title: "CEO", id: "ub_000000000000", }, ], @@ -183,7 +183,7 @@ describe("Receivers", () => { describe("Create receiver", () => { it("should create an individual receiver with standard KYC", async () => { - const mockedReceiver: CreateIndividualWithStandardKYCResponse = { + const mockedReceiver: CreateReceiverResponse = { id: "re_Euw7HN4OdxPn", }; @@ -191,14 +191,16 @@ describe("Receivers", () => { headers: { "Content-Type": "application/json" }, }); - const { data, error } = await blindpay.receivers.createIndividualWithStandardKYC({ + const { data, error } = await blindpay.receivers.create({ + type: "individual", + kyc_type: "standard", email: "bernardo.simonassi@gmail.com", + country: "BR", tax_id: "12345678900", address_line_1: "Av. Paulista, 1000", address_line_2: "Apto 101", city: "São Paulo", state_province_region: "SP", - country: "BR", postal_code: "01310-100", phone_number: "+5511987654321", first_name: "Bernardo", @@ -218,7 +220,7 @@ describe("Receivers", () => { }); it("should create an individual receiver with enhanced KYC", async () => { - const mockedReceiver: CreateIndividualWithEnhancedKYCResponse = { + const mockedReceiver: CreateReceiverResponse = { id: "re_YuaMcI2B8zbQ", }; @@ -226,14 +228,16 @@ describe("Receivers", () => { headers: { "Content-Type": "application/json" }, }); - const { data, error } = await blindpay.receivers.createIndividualWithEnhancedKYC({ + const { data, error } = await blindpay.receivers.create({ + type: "individual", + kyc_type: "enhanced", email: "bernardo.simonassi@gmail.com", + country: "BR", tax_id: "12345678900", address_line_1: "Av. Paulista, 1000", address_line_2: "Apto 101", city: "São Paulo", state_province_region: "SP", - country: "BR", postal_code: "01310-100", first_name: "Bernardo", last_name: "Simonassi", @@ -245,12 +249,12 @@ describe("Receivers", () => { id_doc_back_file: "https://example.com/image.png", proof_of_address_doc_type: "UTILITY_BILL", proof_of_address_doc_file: "https://example.com/image.png", - individual_holding_doc_front_file: "https://example.com/image.png", purpose_of_transactions: "personal_or_living_expenses", source_of_funds_doc_type: "savings", purpose_of_transactions_explanation: "I am receiving salary payments from my employer", source_of_funds_doc_file: "https://example.com/image.png", + selfie_file: "https://example.com/image.png", tos_id: "to_3ZZhllJkvo5Z", }); @@ -259,7 +263,7 @@ describe("Receivers", () => { }); it("should create a business receiver with standard KYB", async () => { - const mockedReceiver: CreateBusinessWithStandardKYBResponse = { + const mockedReceiver: CreateReceiverResponse = { id: "re_IOxAUL24LG7P", }; @@ -267,14 +271,16 @@ describe("Receivers", () => { headers: { "Content-Type": "application/json" }, }); - const { data, error } = await blindpay.receivers.createBusinessWithStandardKYB({ + const { data, error } = await blindpay.receivers.create({ + type: "business", + kyc_type: "standard", email: "contato@empresa.com.br", + country: "BR", tax_id: "20096178000195", address_line_1: "Av. Brigadeiro Faria Lima, 400", address_line_2: "Sala 1201", city: "São Paulo", state_province_region: "SP", - country: "BR", postal_code: "04538-132", legal_name: "Empresa Exemplo Ltda", alternate_name: "Exemplo", @@ -285,6 +291,13 @@ describe("Receivers", () => { proof_of_ownership_doc_file: "https://example.com/image.png", tos_id: "to_nppX66ntvtHs", website: "https://site.com/", + business_type: "llc", + business_description: "Software development company", + business_industry: "541511", + estimated_annual_revenue: "1000000_9999999", + source_of_wealth: "affiliate_or_royalty_income", + publicly_traded: false, + account_purpose: "treasury_management", owners: [ { role: "beneficial_owner", @@ -304,6 +317,8 @@ describe("Receivers", () => { id_doc_back_file: "https://example.com/image.png", proof_of_address_doc_type: "UTILITY_BILL", proof_of_address_doc_file: "https://example.com/image.png", + ownership_percentage: 25, + title: "CEO", }, ], }); @@ -426,13 +441,16 @@ describe("Receivers", () => { id_doc_type: "PASSPORT", id_doc_front_file: "https://example.com/image.png", id_doc_back_file: "https://example.com/image.png", + proof_of_address_doc_type: "UTILITY_BILL", + proof_of_address_doc_file: "https://example.com/image.png", + ownership_percentage: 25, + title: "CEO", }, ], incorporation_doc_file: "https://example.com/image.png", proof_of_ownership_doc_file: "https://example.com/image.png", source_of_funds_doc_type: "savings", source_of_funds_doc_file: "https://example.com/image.png", - individual_holding_doc_front_file: "https://example.com/image.png", purpose_of_transactions: "personal_or_living_expenses", purpose_of_transactions_explanation: "I am receiving salary payments from my employer", From 79084743005ea91e0993157cddec0e82c1cc6b4d Mon Sep 17 00:00:00 2001 From: Eric Viana Date: Mon, 9 Feb 2026 13:25:37 -0300 Subject: [PATCH 2/6] Update receiver creation according to API reference - Add new enum types: AccountPurpose, BusinessType, BusinessIndustry, EstimatedAnnualRevenue, SourceOfWealth - Update Owner type with ownership_percentage and title fields - Make only country and email required in create input types, all other fields optional/nullable - Add new optional fields to individual receiver types: account_purpose, selfie_file, source_of_wealth - Add new optional fields to business receiver type: account_purpose, business_description, business_industry, business_type, estimated_annual_revenue, publicly_traded, source_of_wealth - Keep three specific creation methods (createIndividualWithStandardKYC, createIndividualWithEnhancedKYC, createBusinessWithStandardKYB) - Update tests with new fields and owner properties --- src/resources/receivers/index.ts | 114 +++++++++++++++++++--- src/resources/receivers/receivers.test.ts | 22 ++--- 2 files changed, 107 insertions(+), 29 deletions(-) diff --git a/src/resources/receivers/index.ts b/src/resources/receivers/index.ts index a7c5221..af1df5f 100644 --- a/src/resources/receivers/index.ts +++ b/src/resources/receivers/index.ts @@ -288,32 +288,93 @@ export type BusinessWithStandardKYB = { }; }; -export type CreateReceiverInput = { +export type CreateIndividualWithStandardKYCInput = { + country: Country; + email: string; + account_purpose?: AccountPurpose | null; + address_line_1?: string | null; + address_line_2?: string | null; + city?: string | null; + date_of_birth?: string | null; + external_id?: string | null; + first_name?: string | null; + id_doc_back_file?: string | null; + id_doc_country?: Country | null; + id_doc_front_file?: string | null; + id_doc_type?: IdentificationDocument | null; + image_url?: string | null; + ip_address?: string | null; + last_name?: string | null; + phone_number?: string | null; + postal_code?: string | null; + proof_of_address_doc_file?: string | null; + proof_of_address_doc_type?: ProofOfAddressDocType | null; + selfie_file?: string | null; + source_of_funds_doc_file?: string | null; + source_of_funds_doc_type?: SourceOfFundsDocType | null; + source_of_wealth?: SourceOfWealth | null; + state_province_region?: string | null; + tax_id?: string | null; + tos_id?: string | null; +}; + +export type CreateIndividualWithStandardKYCResponse = { + id: string; +}; + +export type CreateIndividualWithEnhancedKYCInput = { country: Country; email: string; - kyc_type: KycType; - type: AccountClass; account_purpose?: AccountPurpose | null; address_line_1?: string | null; address_line_2?: string | null; - alternate_name?: string | null; - business_description?: string | null; - business_industry?: BusinessIndustry | null; - business_type?: BusinessType | null; city?: string | null; date_of_birth?: string | null; - estimated_annual_revenue?: EstimatedAnnualRevenue | null; external_id?: string | null; first_name?: string | null; - formation_date?: string | null; id_doc_back_file?: string | null; id_doc_country?: Country | null; id_doc_front_file?: string | null; id_doc_type?: IdentificationDocument | null; image_url?: string | null; - incorporation_doc_file?: string | null; ip_address?: string | null; last_name?: string | null; + phone_number?: string | null; + postal_code?: string | null; + proof_of_address_doc_file?: string | null; + proof_of_address_doc_type?: ProofOfAddressDocType | null; + purpose_of_transactions?: PurposeOfTransactions | null; + purpose_of_transactions_explanation?: string | null; + selfie_file?: string | null; + source_of_funds_doc_file?: string | null; + source_of_funds_doc_type?: SourceOfFundsDocType | null; + source_of_wealth?: SourceOfWealth | null; + state_province_region?: string | null; + tax_id?: string | null; + tos_id?: string | null; +}; + +export type CreateIndividualWithEnhancedKYCResponse = { + id: string; +}; + +export type CreateBusinessWithStandardKYBInput = { + country: Country; + email: string; + account_purpose?: AccountPurpose | null; + address_line_1?: string | null; + address_line_2?: string | null; + alternate_name?: string | null; + business_description?: string | null; + business_industry?: BusinessIndustry | null; + business_type?: BusinessType | null; + city?: string | null; + estimated_annual_revenue?: EstimatedAnnualRevenue | null; + external_id?: string | null; + formation_date?: string | null; + image_url?: string | null; + incorporation_doc_file?: string | null; + ip_address?: string | null; legal_name?: string | null; owners?: Array> | null; phone_number?: string | null; @@ -322,9 +383,6 @@ export type CreateReceiverInput = { proof_of_address_doc_type?: ProofOfAddressDocType | null; proof_of_ownership_doc_file?: string | null; publicly_traded?: boolean | null; - purpose_of_transactions?: PurposeOfTransactions | null; - purpose_of_transactions_explanation?: string | null; - selfie_file?: string | null; source_of_funds_doc_file?: string | null; source_of_funds_doc_type?: SourceOfFundsDocType | null; source_of_wealth?: SourceOfWealth | null; @@ -334,7 +392,7 @@ export type CreateReceiverInput = { website?: string | null; }; -export type CreateReceiverResponse = { +export type CreateBusinessWithStandardKYBResponse = { id: string; }; @@ -454,8 +512,32 @@ export function createReceiversResource(instanceId: string, client: InternalApiC list(): Promise> { return client.get(`/instances/${instanceId}/receivers`); }, - create(data: CreateReceiverInput): Promise> { - return client.post(`/instances/${instanceId}/receivers`, data); + createIndividualWithStandardKYC( + data: CreateIndividualWithStandardKYCInput + ): Promise> { + return client.post(`/instances/${instanceId}/receivers`, { + kyc_type: "standard", + type: "individual", + ...data, + }); + }, + createIndividualWithEnhancedKYC( + data: CreateIndividualWithEnhancedKYCInput + ): Promise> { + return client.post(`/instances/${instanceId}/receivers`, { + kyc_type: "enhanced", + type: "individual", + ...data, + }); + }, + createBusinessWithStandardKYB( + data: CreateBusinessWithStandardKYBInput + ): Promise> { + return client.post(`/instances/${instanceId}/receivers`, { + kyc_type: "standard", + type: "business", + ...data, + }); }, get(receiver_id: GetReceiverInput): Promise> { return client.get(`/instances/${instanceId}/receivers/${receiver_id}`); diff --git a/src/resources/receivers/receivers.test.ts b/src/resources/receivers/receivers.test.ts index 57860c5..ad75740 100644 --- a/src/resources/receivers/receivers.test.ts +++ b/src/resources/receivers/receivers.test.ts @@ -1,7 +1,9 @@ import { afterEach, describe, expect, it } from "vitest"; import { BlindPay } from "../../client"; import type { - CreateReceiverResponse, + CreateBusinessWithStandardKYBResponse, + CreateIndividualWithEnhancedKYCResponse, + CreateIndividualWithStandardKYCResponse, GetLimitIncreaseRequestsResponse, GetReceiverLimitsResponse, GetReceiverResponse, @@ -183,7 +185,7 @@ describe("Receivers", () => { describe("Create receiver", () => { it("should create an individual receiver with standard KYC", async () => { - const mockedReceiver: CreateReceiverResponse = { + const mockedReceiver: CreateIndividualWithStandardKYCResponse = { id: "re_Euw7HN4OdxPn", }; @@ -191,9 +193,7 @@ describe("Receivers", () => { headers: { "Content-Type": "application/json" }, }); - const { data, error } = await blindpay.receivers.create({ - type: "individual", - kyc_type: "standard", + const { data, error } = await blindpay.receivers.createIndividualWithStandardKYC({ email: "bernardo.simonassi@gmail.com", country: "BR", tax_id: "12345678900", @@ -220,7 +220,7 @@ describe("Receivers", () => { }); it("should create an individual receiver with enhanced KYC", async () => { - const mockedReceiver: CreateReceiverResponse = { + const mockedReceiver: CreateIndividualWithEnhancedKYCResponse = { id: "re_YuaMcI2B8zbQ", }; @@ -228,9 +228,7 @@ describe("Receivers", () => { headers: { "Content-Type": "application/json" }, }); - const { data, error } = await blindpay.receivers.create({ - type: "individual", - kyc_type: "enhanced", + const { data, error } = await blindpay.receivers.createIndividualWithEnhancedKYC({ email: "bernardo.simonassi@gmail.com", country: "BR", tax_id: "12345678900", @@ -263,7 +261,7 @@ describe("Receivers", () => { }); it("should create a business receiver with standard KYB", async () => { - const mockedReceiver: CreateReceiverResponse = { + const mockedReceiver: CreateBusinessWithStandardKYBResponse = { id: "re_IOxAUL24LG7P", }; @@ -271,9 +269,7 @@ describe("Receivers", () => { headers: { "Content-Type": "application/json" }, }); - const { data, error } = await blindpay.receivers.create({ - type: "business", - kyc_type: "standard", + const { data, error } = await blindpay.receivers.createBusinessWithStandardKYB({ email: "contato@empresa.com.br", country: "BR", tax_id: "20096178000195", From e201e8187eba24c7b7207717154701544cd98f6b Mon Sep 17 00:00:00 2001 From: Eric Viana Date: Mon, 9 Feb 2026 16:40:03 -0300 Subject: [PATCH 3/6] chore: bump version to 3.2.0 and add changeset --- .changeset/update-receiver-api.md | 11 +++++++++++ package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/update-receiver-api.md diff --git a/.changeset/update-receiver-api.md b/.changeset/update-receiver-api.md new file mode 100644 index 0000000..62c7b6b --- /dev/null +++ b/.changeset/update-receiver-api.md @@ -0,0 +1,11 @@ +--- +"@blindpay/node": minor +--- + +Update receiver creation according to API reference + +- Add new enum types: `AccountPurpose`, `BusinessType`, `BusinessIndustry`, `EstimatedAnnualRevenue`, `SourceOfWealth` +- Update `Owner` type with `ownership_percentage` and `title` fields +- Make only `country` and `email` required in create input types, all other fields optional/nullable +- Add new optional fields to individual receiver types: `account_purpose`, `selfie_file`, `source_of_wealth` +- Add new optional fields to business receiver type: `account_purpose`, `business_description`, `business_industry`, `business_type`, `estimated_annual_revenue`, `publicly_traded`, `source_of_wealth` diff --git a/package.json b/package.json index d080437..1c108f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@blindpay/node", - "version": "3.1.1", + "version": "3.2.0", "description": "Official Node.js SDK for Blindpay API - Global payments infrastructure", "keywords": [ "blindpay", From 11e56f2eb9e2fa0c597abbff04df3f2c32945c7c Mon Sep 17 00:00:00 2001 From: Eric Viana Date: Mon, 9 Feb 2026 16:52:38 -0300 Subject: [PATCH 4/6] chore: update description to boost our seo That is our main headline, we need to use it everywhere --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1c108f1..1d5e5ee 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@blindpay/node", "version": "3.2.0", - "description": "Official Node.js SDK for Blindpay API - Global payments infrastructure", + "description": "Official Node.js SDK for Blindpay API - Stablecoin API for global payments", "keywords": [ "blindpay", "payments", @@ -64,4 +64,4 @@ "dependencies": { "svix": "1.82.0" } -} +} \ No newline at end of file From c62808cac078827d522db363cd9ba3a7682f81fc Mon Sep 17 00:00:00 2001 From: Eric Viana Date: Tue, 10 Feb 2026 12:35:20 -0300 Subject: [PATCH 5/6] chore: lint --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1d5e5ee..1fc35a4 100644 --- a/package.json +++ b/package.json @@ -64,4 +64,4 @@ "dependencies": { "svix": "1.82.0" } -} \ No newline at end of file +} From 54fcb75e4f01dcde889d2630b8da45c6a7f6baa3 Mon Sep 17 00:00:00 2001 From: Eric Viana Date: Tue, 10 Feb 2026 14:15:46 -0300 Subject: [PATCH 6/6] feat: add hsbc banking partner and signed agreement id support --- .changeset/update-receiver-api.md | 4 +++- src/resources/virtual-accounts/index.ts | 3 ++- src/resources/virtual-accounts/virtual-accounts.test.ts | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.changeset/update-receiver-api.md b/.changeset/update-receiver-api.md index 62c7b6b..b1699da 100644 --- a/.changeset/update-receiver-api.md +++ b/.changeset/update-receiver-api.md @@ -2,10 +2,12 @@ "@blindpay/node": minor --- -Update receiver creation according to API reference +Update receiver and virtual account types according to API reference - Add new enum types: `AccountPurpose`, `BusinessType`, `BusinessIndustry`, `EstimatedAnnualRevenue`, `SourceOfWealth` - Update `Owner` type with `ownership_percentage` and `title` fields - Make only `country` and `email` required in create input types, all other fields optional/nullable - Add new optional fields to individual receiver types: `account_purpose`, `selfie_file`, `source_of_wealth` - Add new optional fields to business receiver type: `account_purpose`, `business_description`, `business_industry`, `business_type`, `estimated_annual_revenue`, `publicly_traded`, `source_of_wealth` +- Add `hsbc` to `BankingPartner` type +- Add optional `signed_agreement_id` to `CreateVirtualAccountInput` diff --git a/src/resources/virtual-accounts/index.ts b/src/resources/virtual-accounts/index.ts index 5a9b4f0..12267b8 100644 --- a/src/resources/virtual-accounts/index.ts +++ b/src/resources/virtual-accounts/index.ts @@ -1,7 +1,7 @@ import type { BlindpayApiResponse, Network, StablecoinToken } from "../../../types"; import type { InternalApiClient } from "../../internal/api-client"; -export type BankingPartner = "jpmorgan" | "citi"; +export type BankingPartner = "jpmorgan" | "citi" | "hsbc"; export type VirtualAccount = { id: string; @@ -47,6 +47,7 @@ export type CreateVirtualAccountInput = { banking_partner: BankingPartner; token: StablecoinToken; blockchain_wallet_id: string; + signed_agreement_id?: string | null; }; export type CreateVirtualAccountResponse = VirtualAccount; diff --git a/src/resources/virtual-accounts/virtual-accounts.test.ts b/src/resources/virtual-accounts/virtual-accounts.test.ts index f1239e2..5b26b54 100644 --- a/src/resources/virtual-accounts/virtual-accounts.test.ts +++ b/src/resources/virtual-accounts/virtual-accounts.test.ts @@ -201,6 +201,7 @@ describe("Virtual accounts", () => { banking_partner: "jpmorgan", blockchain_wallet_id: "bw_000000000000", token: "USDC", + signed_agreement_id: "123e4567-e89b-12d3-a456-426614174000", }); expect(error).toBeNull();