Skip to content

Commit 7a0bf9e

Browse files
authored
fix: complete API sync — all endpoints, fields, and methods (#34)
* fix: complete API sync — fix virtual account bugs, add missing methods and fields * fix: resolve type check errors in virtual accounts * style: ruff format virtual_accounts.py
1 parent 2bd1d1f commit 7a0bf9e

13 files changed

Lines changed: 110 additions & 33 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "blindpay"
3-
version = "1.5.0"
3+
version = "1.6.0"
44
description = "Official Python SDK for the Blindpay API — Global payments infrastructure"
55
readme = "README.md"
66
authors = [{ name = "Blindpay", email = "[email protected]" }]

src/blindpay/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.5.0"
1+
__version__ = "1.6.0"
22

33
from ._internal.exceptions import BlindPayError
44
from .client import BlindPay, BlindPaySync

src/blindpay/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
from blindpay.resources.wallets.offramp import OfframpWalletsResource, OfframpWalletsResourceSync
3939
from blindpay.resources.webhooks.webhooks import WebhookEndpointsResource, WebhookEndpointsResourceSync
4040

41-
__version__ = "1.4.0"
41+
__version__ = "1.6.0"
4242

4343
T = TypeVar("T")
4444

src/blindpay/resources/instances/instances.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ class InstanceMember(TypedDict):
2222
GetInstanceMembersResponse = List[InstanceMember]
2323

2424

25-
class UpdateInstanceInput(TypedDict):
25+
class UpdateInstanceInput(TypedDict, total=False):
2626
name: str
2727
receiver_invite_redirect_url: Optional[str]
28+
email_notifications: bool
29+
require_passkey: bool
2830

2931

3032
class UpdateInstanceMemberRoleInput(TypedDict):

src/blindpay/resources/payins/payins.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ class Payin(TypedDict):
8989
address: str
9090
network: Network
9191
blindpay_bank_details: BankDetails
92+
is_otc: Optional[bool]
93+
billing_fee_amount: Optional[str]
94+
pse_document_type: Optional[str]
95+
pse_full_name: Optional[str]
96+
pse_payment_link: Optional[str]
97+
pse_tax_id: Optional[str]
9298

9399

94100
class ListPayinsInput(PaginationParams):
@@ -206,6 +212,9 @@ async def export(self, params: ExportPayinsInput) -> BlindpayApiResponse[ExportP
206212
query_string = f"?{urlencode(filtered_params)}" if filtered_params else ""
207213
return await self._client.get(f"/instances/{self._instance_id}/export/payins{query_string}")
208214

215+
async def get_track(self, payin_id: str) -> BlindpayApiResponse[GetPayinTrackResponse]:
216+
return await self._client.get(f"/e/payins/{payin_id}")
217+
209218
async def create_evm(self, payin_quote_id: str) -> BlindpayApiResponse[CreateEvmPayinResponse]:
210219
return await self._client.post(f"/instances/{self._instance_id}/payins/evm", {"payin_quote_id": payin_quote_id})
211220

src/blindpay/resources/payins/quotes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class PayerRules(TypedDict, total=False):
1717
pix_allowed_tax_ids: List[str]
1818

1919

20-
class CreatePayinQuoteInput(TypedDict):
20+
class CreatePayinQuoteInput(TypedDict, total=False):
2121
blockchain_wallet_id: str
2222
currency_type: CurrencyType
2323
payment_method: PaymentMethod
@@ -26,6 +26,8 @@ class CreatePayinQuoteInput(TypedDict):
2626
cover_fees: bool
2727
partner_fee_id: Optional[str]
2828
payer_rules: PayerRules
29+
is_otc: bool
30+
wallet_id: str
2931

3032

3133
class CreatePayinQuoteResponse(TypedDict):

src/blindpay/resources/payouts/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
AuthorizeStellarTokenResponse,
44
CreateEvmPayoutInput,
55
CreateEvmPayoutResponse,
6+
CreateSolanaPayoutInput,
7+
CreateSolanaPayoutResponse,
68
CreateStellarPayoutInput,
79
CreateStellarPayoutResponse,
810
ExportPayoutsInput,
@@ -30,6 +32,8 @@
3032
"AuthorizeStellarTokenResponse",
3133
"CreateStellarPayoutInput",
3234
"CreateStellarPayoutResponse",
35+
"CreateSolanaPayoutInput",
36+
"CreateSolanaPayoutResponse",
3337
"CreateEvmPayoutInput",
3438
"CreateEvmPayoutResponse",
3539
]

src/blindpay/resources/payouts/payouts.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,23 @@ class CreateEvmPayoutResponse(TypedDict):
155155
receiver_id: str
156156

157157

158+
class CreateSolanaPayoutInput(TypedDict):
159+
quote_id: str
160+
sender_wallet_address: str
161+
162+
163+
class CreateSolanaPayoutResponse(TypedDict):
164+
id: str
165+
status: TransactionStatus
166+
sender_wallet_address: str
167+
tracking_complete: Optional[TrackingComplete]
168+
tracking_payment: Optional[TrackingPayment]
169+
tracking_transaction: Optional[TrackingTransaction]
170+
tracking_partner_fee: Optional[TrackingPartnerFee]
171+
tracking_liquidity: Optional[TrackingLiquidity]
172+
receiver_id: str
173+
174+
158175
class SubmitPayoutDocumentsInput(TypedDict):
159176
payout_id: str
160177
transaction_document_type: TransactionDocumentType
@@ -205,6 +222,9 @@ async def create_stellar(self, data: CreateStellarPayoutInput) -> BlindpayApiRes
205222
async def create_evm(self, data: CreateEvmPayoutInput) -> BlindpayApiResponse[CreateEvmPayoutResponse]:
206223
return await self._client.post(f"/instances/{self._instance_id}/payouts/evm", data)
207224

225+
async def create_solana(self, data: CreateSolanaPayoutInput) -> BlindpayApiResponse[CreateSolanaPayoutResponse]:
226+
return await self._client.post(f"/instances/{self._instance_id}/payouts/solana", data)
227+
208228
async def submit_documents(
209229
self, data: SubmitPayoutDocumentsInput
210230
) -> BlindpayApiResponse[SubmitPayoutDocumentsResponse]:
@@ -251,6 +271,9 @@ def create_stellar(self, data: CreateStellarPayoutInput) -> BlindpayApiResponse[
251271
def create_evm(self, data: CreateEvmPayoutInput) -> BlindpayApiResponse[CreateEvmPayoutResponse]:
252272
return self._client.post(f"/instances/{self._instance_id}/payouts/evm", data)
253273

274+
def create_solana(self, data: CreateSolanaPayoutInput) -> BlindpayApiResponse[CreateSolanaPayoutResponse]:
275+
return self._client.post(f"/instances/{self._instance_id}/payouts/solana", data)
276+
254277
def submit_documents(self, data: SubmitPayoutDocumentsInput) -> BlindpayApiResponse[SubmitPayoutDocumentsResponse]:
255278
payout_id = data["payout_id"]
256279
payload = {k: v for k, v in data.items() if k != "payout_id"}

src/blindpay/resources/transfers/transfers.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,19 @@ class Transfer(TypedDict):
3535
tracking_complete: TransferTrackingStep
3636
created_at: str
3737
updated_at: str
38+
external_id: Optional[str]
39+
receiver_network: Optional[str]
40+
receiver_token: Optional[str]
41+
sender_token: Optional[str]
3842

3943

40-
class CreateTransferQuoteInput(TypedDict):
44+
class CreateTransferQuoteInput(TypedDict, total=False):
4145
source_wallet_id: str
4246
destination_wallet_id: str
4347
amount: float
48+
amount_reference: str
49+
cover_fees: bool
50+
partner_fee_id: str
4451

4552

4653
CreateTransferQuoteResponse = TransferQuote

src/blindpay/resources/virtual_accounts/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
CreateVirtualAccountInput,
55
CreateVirtualAccountResponse,
66
GetVirtualAccountResponse,
7+
ListVirtualAccountsResponse,
78
ReceivingBankInfo,
89
UpdateVirtualAccountInput,
910
USBankDetails,
@@ -24,6 +25,7 @@
2425
"UpdateVirtualAccountInput",
2526
"CreateVirtualAccountResponse",
2627
"GetVirtualAccountResponse",
28+
"ListVirtualAccountsResponse",
2729
"USBankDetails",
2830
"BeneficiaryInfo",
2931
"ReceivingBankInfo",

0 commit comments

Comments
 (0)