Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "blindpay"
version = "2.1.0"
version = "2.2.0"
description = "Official Python SDK for the Blindpay API — Global payments infrastructure"
readme = "README.md"
authors = [{ name = "Blindpay", email = "alves@blindpay.com" }]
Expand Down
2 changes: 1 addition & 1 deletion src/blindpay/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.1.0"
__version__ = "2.2.0"

from ._internal.exceptions import BlindPayError
from .client import BlindPay, BlindPaySync
Expand Down
2 changes: 1 addition & 1 deletion src/blindpay/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from blindpay.resources.wallets.offramp import OfframpWalletsResource, OfframpWalletsResourceSync
from blindpay.resources.webhooks.webhooks import WebhookEndpointsResource, WebhookEndpointsResourceSync

__version__ = "2.1.0"
__version__ = "2.2.0"

T = TypeVar("T")

Expand Down
12 changes: 12 additions & 0 deletions src/blindpay/resources/bank_accounts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,24 @@
CreateInternationalSwiftResponse,
CreatePixInput,
CreatePixResponse,
CreatePixSafeInput,
CreatePixSafeResponse,
CreateRtpInput,
CreateRtpResponse,
CreateSpeiInput,
CreateSpeiResponse,
CreateTedInput,
CreateTedResponse,
CreateWireInput,
CreateWireResponse,
GetBankAccountResponse,
ListBankAccountsResponse,
OfframpNetwork,
PixSafeType,
PixType,
RtpType,
SpeiBitsoType,
TedType,
TransfersBitsoType,
WireType,
create_bank_accounts_resource,
Expand All @@ -39,31 +45,37 @@
"BankAccountsResource",
"BankAccountsResourceSync",
"CreatePixInput",
"CreatePixSafeInput",
"CreateArgentinaTransfersInput",
"CreateSpeiInput",
"CreateColombiaAchInput",
"CreateAchInput",
"CreateWireInput",
"CreateInternationalSwiftInput",
"CreateRtpInput",
"CreateTedInput",
"AchCopBitsoType",
"AchCopDocument",
"AchType",
"ArgentinaTransfers",
"OfframpNetwork",
"PixType",
"PixSafeType",
"TransfersBitsoType",
"SpeiBitsoType",
"WireType",
"RtpType",
"TedType",
"GetBankAccountResponse",
"ListBankAccountsResponse",
"CreateAchResponse",
"CreateArgentinaTransfersResponse",
"CreateColombiaAchResponse",
"CreateInternationalSwiftResponse",
"CreatePixResponse",
"CreatePixSafeResponse",
"CreateRtpResponse",
"CreateSpeiResponse",
"CreateTedResponse",
"CreateWireResponse",
]
38 changes: 38 additions & 0 deletions src/blindpay/resources/bank_accounts/bank_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
InternationalSwiftType = Literal["international_swift"]
RtpType = Literal["rtp"]
PixSafeType = Literal["pix_safe"]
TedType = Literal["ted"]


class OfframpWallet(TypedDict):
Expand Down Expand Up @@ -85,6 +86,9 @@ class BankAccount(TypedDict):
tron_wallet_hash: Optional[str]
offramp_wallets: Optional[List[OfframpWallet]]
created_at: str
ted_bank_code: Optional[str]
ted_branch_code: Optional[str]
ted_cpf_cnpj: Optional[str]


class ListBankAccountsResponse(TypedDict):
Expand Down Expand Up @@ -404,6 +408,28 @@ class CreatePixSafeResponse(TypedDict):
created_at: str


class CreateTedInput(TypedDict):
receiver_id: str
name: str
account_number: str
account_type: BankAccountType
ted_bank_code: str
ted_branch_code: str
ted_cpf_cnpj: str


class CreateTedResponse(TypedDict):
id: str
type: TedType
name: str
account_number: str
account_type: BankAccountType
ted_bank_code: str
ted_branch_code: str
ted_cpf_cnpj: str
created_at: str


class BankAccountsResource:
def __init__(self, instance_id: str, client: InternalApiClient):
self._instance_id = instance_id
Expand Down Expand Up @@ -476,6 +502,12 @@ async def create_pix_safe(self, data: CreatePixSafeInput) -> BlindpayApiResponse
payload["type"] = "pix_safe"
return await self._client.post(f"/instances/{self._instance_id}/receivers/{receiver_id}/bank-accounts", payload)

async def create_ted(self, data: CreateTedInput) -> BlindpayApiResponse[CreateTedResponse]:
receiver_id = data["receiver_id"]
payload = {k: v for k, v in data.items() if k != "receiver_id"}
payload["type"] = "ted"
return await self._client.post(f"/instances/{self._instance_id}/receivers/{receiver_id}/bank-accounts", payload)


class BankAccountsResourceSync:
def __init__(self, instance_id: str, client: InternalApiClientSync):
Expand Down Expand Up @@ -549,6 +581,12 @@ def create_pix_safe(self, data: CreatePixSafeInput) -> BlindpayApiResponse[Creat
payload["type"] = "pix_safe"
return self._client.post(f"/instances/{self._instance_id}/receivers/{receiver_id}/bank-accounts", payload)

def create_ted(self, data: CreateTedInput) -> BlindpayApiResponse[CreateTedResponse]:
receiver_id = data["receiver_id"]
payload = {k: v for k, v in data.items() if k != "receiver_id"}
payload["type"] = "ted"
return self._client.post(f"/instances/{self._instance_id}/receivers/{receiver_id}/bank-accounts", payload)


def create_bank_accounts_resource(instance_id: str, client: InternalApiClient) -> BankAccountsResource:
return BankAccountsResource(instance_id, client)
Expand Down
1 change: 1 addition & 0 deletions src/blindpay/resources/fees/fees.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class FeesResponse(TypedDict):
domestic_wire: Optional[FeeOptions]
pix: Optional[FeeOptions]
solana: Optional[FeeOptions]
ted: Optional[FeeOptions]


class FeesResource:
Expand Down
2 changes: 2 additions & 0 deletions src/blindpay/resources/payins/payins.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class Payin(TypedDict):
pse_full_name: Optional[str]
pse_payment_link: Optional[str]
pse_tax_id: Optional[str]
partner_fee_id: Optional[str]


class ListPayinsInput(PaginationParams):
Expand Down Expand Up @@ -165,6 +166,7 @@ class GetPayinTrackResponse(TypedDict):
address: str
network: Network
blindpay_bank_details: BankDetails
partner_fee_id: Optional[str]


class ExportPayinsInput(TypedDict):
Expand Down
2 changes: 1 addition & 1 deletion src/blindpay/resources/payins/quotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
StablecoinToken,
)

PaymentMethod = Literal["ach", "wire", "pix", "spei"]
PaymentMethod = Literal["ach", "wire", "pix", "spei", "rtp", "ted"]


class PayerRules(TypedDict, total=False):
Expand Down
4 changes: 4 additions & 0 deletions src/blindpay/resources/payouts/payouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ class Payout(TypedDict):
transfers_account: Optional[str]
transfers_type: ArgentinaTransfers
has_virtual_account: bool
partner_fee_id: Optional[str]
ted_bank_code: Optional[str]
ted_branch_code: Optional[str]
ted_cpf_cnpj: Optional[str]


class ListPayoutsInput(PaginationParams, total=False):
Expand Down
7 changes: 4 additions & 3 deletions src/blindpay/resources/receivers/receivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
StandardKycType = Literal["standard"]
EnhancedKycType = Literal["enhanced"]
KycType = Literal["light", "standard", "enhanced"]
KycStatus = Literal["awaiting_contract", "compliance_request"]

ProofOfAddressDocType = Literal[
"UTILITY_BILL", "BANK_STATEMENT", "RENTAL_AGREEMENT", "TAX_DOCUMENT", "GOVERNMENT_CORRESPONDENCE"
Expand Down Expand Up @@ -328,7 +329,7 @@ class IndividualWithStandardKYC(TypedDict):
id: str
type: IndividualType
kyc_type: StandardKycType
kyc_status: str
kyc_status: KycStatus
kyc_warnings: Optional[List[KycWarning]]
email: str
tax_id: str
Expand Down Expand Up @@ -378,7 +379,7 @@ class IndividualWithEnhancedKYC(TypedDict):
id: str
type: IndividualType
kyc_type: EnhancedKycType
kyc_status: str
kyc_status: KycStatus
kyc_warnings: Optional[List[KycWarning]]
email: str
tax_id: str
Expand Down Expand Up @@ -433,7 +434,7 @@ class BusinessWithStandardKYB(TypedDict):
id: str
type: BusinessType
kyc_type: StandardKycType
kyc_status: str
kyc_status: KycStatus
kyc_warnings: Optional[List[KycWarning]]
email: str
tax_id: str
Expand Down
64 changes: 61 additions & 3 deletions src/blindpay/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,19 @@ class BlindpaySuccessResponse(TypedDict, Generic[T]):

BankAccountType = Literal["checking", "savings"]

Currency = Literal["USDC", "USDT", "USDB", "BRL", "USD", "MXN", "COP", "ARS"]
Currency = Literal["USDB", "BRL", "USD", "MXN", "COP", "ARS"]

Rail = Literal[
"wire", "ach", "pix", "pix_safe", "spei_bitso", "transfers_bitso", "ach_cop_bitso", "international_swift", "rtp"
"wire",
"ach",
"pix",
"pix_safe",
"spei_bitso",
"transfers_bitso",
"ach_cop_bitso",
"international_swift",
"rtp",
"ted",
]

AccountClass = Literal["individual", "business"]
Expand Down Expand Up @@ -380,4 +389,53 @@ class TrackingPartnerFee(TypedDict):

BankingPartner = Literal["cfsb", "citi", "hsbc", "jpmorgan"]

PaymentMethod = Literal["ach", "wire", "pix", "spei", "transfers", "pse", "international_swift"]
PaymentMethod = Literal["ach", "wire", "pix", "spei", "transfers", "pse", "international_swift", "rtp", "ted"]

# New enum types from changelog
ActorType = Literal["api_key", "user"]

Decision = Literal["approved", "rejected"]

KycStatus = Literal["awaiting_contract", "compliance_request"]

Operation = Literal["create", "delete", "update"]

ReceiverType = Literal["business", "individual"]

Status = Literal["submitted"]

SwiftPaymentCode = Literal[
"SALA",
"CBFF",
"INTC",
"CORT",
"TRAD",
"TREA",
"SECU",
"LIMA",
"HOLD",
"COLL",
"COMC",
"CPKC",
"DIVI",
"GOVI",
"INST",
"INTB",
"LEND",
"LIQM",
"MGCC",
"NOWS",
"OTHR",
"PHOB",
"RINP",
"RLTI",
"SALA",
"SECU",
"SSBE",
"SUPP",
"TAXS",
"TRAD",
"TREA",
"VATX",
"WHLD",
]
Loading