@@ -353,18 +353,21 @@ def pay_invoice(self, invoice_id: str, status: str = "complete") -> Invoice:
353353 client = self .create_invoice_client ()
354354 return client .pay (invoice_id , status )
355355
356- def request_invoice_notifications (self , invoice_id : str ) -> bool :
356+ def request_invoice_notifications (
357+ self , invoice_id : str , invoice_token : str
358+ ) -> bool :
357359 """
358360 Request a BitPay Invoice Webhook.
359361
360362 :param str invoice_id: A BitPay invoice ID.
363+ :param str invoice_token: The resource token for the invoice_id. This token can be retrieved from the Bitpay's invoice object.
361364 :return: True if the webhook was successfully requested, false otherwise.
362365 :rtype: bool
363366 :raises BitPayException
364367 :raises InvoiceNotificationException
365368 """
366369 client = self .create_invoice_client ()
367- return client .request_invoice_notifications (invoice_id )
370+ return client .request_invoice_notifications (invoice_id , invoice_token )
368371
369372 def create_refund (
370373 self ,
@@ -501,18 +504,19 @@ def cancel_refund_by_guid(self, guid: str) -> Refund:
501504 client = self .create_refund_client ()
502505 return client .cancel_by_guid (guid )
503506
504- def request_refund_notification (self , refund_id : str ) -> bool :
507+ def request_refund_notification (self , refund_id : str , refund_token : str ) -> bool :
505508 """
506509 Send a refund notification.
507510
508511 :param str refund_id: BitPay refund ID to notify.
512+ :param str refund_token: The resource token for the refund_id. This token can be retrieved from the Bitpay's refund object.
509513 :return: True if the webhook was successfully requested, false otherwise.
510514 :rtype: bool
511515 :raises BitPayException
512516 :raises RefundNotificationException
513517 """
514518 client = self .create_refund_client ()
515- return client .request_notification (refund_id )
519+ return client .request_notification (refund_id , refund_token )
516520
517521 def get_supported_wallets (self ) -> List [Wallet ]:
518522 """
0 commit comments