From f7639e07ccee6f4353d9eb71fafcb153225214f6 Mon Sep 17 00:00:00 2001 From: Admin Date: Wed, 13 May 2026 14:27:56 -0700 Subject: [PATCH 1/2] Add COP fields needed for Thunes standard-bank payouts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thunes' Colombia bank corridor requires four fields beyond what the current CopAccountInfo and CopBeneficiary schemas expose: - bankName: needed at the account level for bank rail - bankAccountType: account_type CPI for std banks (CHECKING/SAVINGS) - documentType / documentNumber: id_type / id_number that nearly every Colombian payer needs to KYC-match the beneficiary Add these as optional properties so existing COP_ACCOUNT consumers aren't broken. Required-field enforcement moves to the sparkcore runtime where it can be rail-conditional (BANK_TRANSFER wants bankName + accountNumber + bankAccountType; MOBILE_MONEY only wants phoneNumber). This is the foundation PR — sparkcore wiring (receiver fields, account.py response shape, CURRENCY_PAYEE_FIELD_MAPPINGS update, union-shape extraction) follows once Stainless regenerates the SDK. --- mintlify/openapi.yaml | 26 ++++++++++++++++--- openapi.yaml | 26 ++++++++++++++++--- .../schemas/common/CopAccountInfoBase.yaml | 21 ++++++++++++--- .../schemas/common/CopBeneficiary.yaml | 8 ++++++ 4 files changed, 69 insertions(+), 12 deletions(-) diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index b3b729ec..858738d2 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -12498,29 +12498,41 @@ components: - accountType description: |- Required fields depend on the selected paymentRails: - - BANK_TRANSFER: accountNumber + - BANK_TRANSFER: bankName, accountNumber, bankAccountType - MOBILE_MONEY: phoneNumber properties: accountType: type: string enum: - COP_ACCOUNT + bankName: + type: string + description: The name of the bank (BANK_TRANSFER only) + minLength: 1 + maxLength: 255 accountNumber: type: string - description: The account number of the bank + description: The account number of the bank (BANK_TRANSFER only) minLength: 1 maxLength: 34 + bankAccountType: + type: string + description: The bank account type (BANK_TRANSFER only) + enum: + - CHECKING + - SAVINGS phoneNumber: type: string - description: The phone number in international format + description: The phone number in international format (MOBILE_MONEY only — Nequi, Daviplata) example: '+1234567890' minLength: 7 maxLength: 15 pattern: ^\+[0-9]{6,14}$ example: accountType: COP_ACCOUNT + bankName: Bancolombia accountNumber: '1234567890' - phoneNumber: '+1234567890' + bankAccountType: CHECKING CopAccountInfo: allOf: - $ref: '#/components/schemas/CopAccountInfoBase' @@ -12566,6 +12578,12 @@ components: description: The country of residence of the beneficiary address: $ref: '#/components/schemas/Address' + documentType: + type: string + description: Identity document type — required by most Colombian banks (e.g. CC for Cédula de Ciudadanía, CE for Cédula de Extranjería, NIT, PP for passport) + documentNumber: + type: string + description: Identity document number — required by most Colombian banks CopExternalAccountInfo: title: COP Account allOf: diff --git a/openapi.yaml b/openapi.yaml index b3b729ec..858738d2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -12498,29 +12498,41 @@ components: - accountType description: |- Required fields depend on the selected paymentRails: - - BANK_TRANSFER: accountNumber + - BANK_TRANSFER: bankName, accountNumber, bankAccountType - MOBILE_MONEY: phoneNumber properties: accountType: type: string enum: - COP_ACCOUNT + bankName: + type: string + description: The name of the bank (BANK_TRANSFER only) + minLength: 1 + maxLength: 255 accountNumber: type: string - description: The account number of the bank + description: The account number of the bank (BANK_TRANSFER only) minLength: 1 maxLength: 34 + bankAccountType: + type: string + description: The bank account type (BANK_TRANSFER only) + enum: + - CHECKING + - SAVINGS phoneNumber: type: string - description: The phone number in international format + description: The phone number in international format (MOBILE_MONEY only — Nequi, Daviplata) example: '+1234567890' minLength: 7 maxLength: 15 pattern: ^\+[0-9]{6,14}$ example: accountType: COP_ACCOUNT + bankName: Bancolombia accountNumber: '1234567890' - phoneNumber: '+1234567890' + bankAccountType: CHECKING CopAccountInfo: allOf: - $ref: '#/components/schemas/CopAccountInfoBase' @@ -12566,6 +12578,12 @@ components: description: The country of residence of the beneficiary address: $ref: '#/components/schemas/Address' + documentType: + type: string + description: Identity document type — required by most Colombian banks (e.g. CC for Cédula de Ciudadanía, CE for Cédula de Extranjería, NIT, PP for passport) + documentNumber: + type: string + description: Identity document number — required by most Colombian banks CopExternalAccountInfo: title: COP Account allOf: diff --git a/openapi/components/schemas/common/CopAccountInfoBase.yaml b/openapi/components/schemas/common/CopAccountInfoBase.yaml index 7a84d977..177929ef 100644 --- a/openapi/components/schemas/common/CopAccountInfoBase.yaml +++ b/openapi/components/schemas/common/CopAccountInfoBase.yaml @@ -3,7 +3,7 @@ required: - accountType description: 'Required fields depend on the selected paymentRails: - - BANK_TRANSFER: accountNumber + - BANK_TRANSFER: bankName, accountNumber, bankAccountType - MOBILE_MONEY: phoneNumber' properties: @@ -11,19 +11,32 @@ properties: type: string enum: - COP_ACCOUNT + bankName: + type: string + description: The name of the bank (BANK_TRANSFER only) + minLength: 1 + maxLength: 255 accountNumber: type: string - description: The account number of the bank + description: The account number of the bank (BANK_TRANSFER only) minLength: 1 maxLength: 34 + bankAccountType: + type: string + description: The bank account type (BANK_TRANSFER only) + enum: + - CHECKING + - SAVINGS phoneNumber: type: string - description: The phone number in international format + description: The phone number in international format (MOBILE_MONEY only — + Nequi, Daviplata) example: '+1234567890' minLength: 7 maxLength: 15 pattern: ^\+[0-9]{6,14}$ example: accountType: COP_ACCOUNT + bankName: Bancolombia accountNumber: '1234567890' - phoneNumber: '+1234567890' + bankAccountType: CHECKING diff --git a/openapi/components/schemas/common/CopBeneficiary.yaml b/openapi/components/schemas/common/CopBeneficiary.yaml index d9332d63..cbf33895 100644 --- a/openapi/components/schemas/common/CopBeneficiary.yaml +++ b/openapi/components/schemas/common/CopBeneficiary.yaml @@ -28,3 +28,11 @@ properties: description: The country of residence of the beneficiary address: $ref: ./Address.yaml + documentType: + type: string + description: Identity document type — required by most Colombian banks + (e.g. CC for Cédula de Ciudadanía, CE for Cédula de Extranjería, NIT, + PP for passport) + documentNumber: + type: string + description: Identity document number — required by most Colombian banks From 28486db8746aec6d273084aacb95a5f6e625745d Mon Sep 17 00:00:00 2001 From: Admin Date: Wed, 13 May 2026 14:46:41 -0700 Subject: [PATCH 2/2] Address Greptile: enum-constrain documentType, add length guards to documentNumber --- mintlify/openapi.yaml | 10 +++++++++- openapi.yaml | 10 +++++++++- .../components/schemas/common/CopBeneficiary.yaml | 14 +++++++++++--- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 858738d2..c6489dcb 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -12580,10 +12580,18 @@ components: $ref: '#/components/schemas/Address' documentType: type: string - description: Identity document type — required by most Colombian banks (e.g. CC for Cédula de Ciudadanía, CE for Cédula de Extranjería, NIT, PP for passport) + description: 'Identity document type — required by most Colombian banks. CC: Cédula de Ciudadanía, CE: Cédula de Extranjería, TI: Tarjeta de Identidad, NIT: Número de Identificación Tributaria, PP: Passport' + enum: + - CC + - CE + - TI + - NIT + - PP documentNumber: type: string description: Identity document number — required by most Colombian banks + minLength: 1 + maxLength: 50 CopExternalAccountInfo: title: COP Account allOf: diff --git a/openapi.yaml b/openapi.yaml index 858738d2..c6489dcb 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -12580,10 +12580,18 @@ components: $ref: '#/components/schemas/Address' documentType: type: string - description: Identity document type — required by most Colombian banks (e.g. CC for Cédula de Ciudadanía, CE for Cédula de Extranjería, NIT, PP for passport) + description: 'Identity document type — required by most Colombian banks. CC: Cédula de Ciudadanía, CE: Cédula de Extranjería, TI: Tarjeta de Identidad, NIT: Número de Identificación Tributaria, PP: Passport' + enum: + - CC + - CE + - TI + - NIT + - PP documentNumber: type: string description: Identity document number — required by most Colombian banks + minLength: 1 + maxLength: 50 CopExternalAccountInfo: title: COP Account allOf: diff --git a/openapi/components/schemas/common/CopBeneficiary.yaml b/openapi/components/schemas/common/CopBeneficiary.yaml index cbf33895..25fd33b3 100644 --- a/openapi/components/schemas/common/CopBeneficiary.yaml +++ b/openapi/components/schemas/common/CopBeneficiary.yaml @@ -30,9 +30,17 @@ properties: $ref: ./Address.yaml documentType: type: string - description: Identity document type — required by most Colombian banks - (e.g. CC for Cédula de Ciudadanía, CE for Cédula de Extranjería, NIT, - PP for passport) + description: 'Identity document type — required by most Colombian banks. + CC: Cédula de Ciudadanía, CE: Cédula de Extranjería, TI: Tarjeta de + Identidad, NIT: Número de Identificación Tributaria, PP: Passport' + enum: + - CC + - CE + - TI + - NIT + - PP documentNumber: type: string description: Identity document number — required by most Colombian banks + minLength: 1 + maxLength: 50