Skip to content
Merged
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
35 changes: 35 additions & 0 deletions paymentsgate/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
PayOutModel,
PayOutResponseModel,
InvoiceModel,
InvoiceCredentialsModel,
GetQuoteTlv,
PayOutTlvRequest,
QuoteTlvResponse,
Expand Down Expand Up @@ -146,6 +147,23 @@ async def Status(self, id: str) -> InvoiceModel:
raise APIResponseError(response)
return response.cast(InvoiceModel, APIResponseError)

def Credentials(self, id: str) -> InvoiceCredentialsModel:
# Prepare request
request = Request(
method="get",
path=ApiPaths.invoices_credentials.replace(':id', id),
content_type='application/json',
noAuth=False,
signature=False,
)

# Handle response
response = self._send_request(request)
if not response.success:
raise APIResponseError(response)

return response.cast(InvoiceCredentialsModel, APIResponseError)

# dateFrom: str # ISO: 2025-07-10T00:00:00.873+00:00
# dateTo?: str # ISO: 2025-07-10T00:00:00.873+00:00
async def List(self, page: int = 0, dateFrom: str = '', dateTo: str = '') -> InvoiceListModelWithMeta:
Expand Down Expand Up @@ -396,6 +414,23 @@ def Status(self, id: str) -> InvoiceModel:
raise APIResponseError(response)

return response.cast(InvoiceModel, APIResponseError)

def Credentials(self, id: str) -> InvoiceCredentialsModel:
# Prepare request
request = Request(
method="get",
path=ApiPaths.invoices_credentials.replace(':id', id),
content_type='application/json',
noAuth=False,
signature=False,
)

# Handle response
response = self._send_request(request)
if not response.success:
raise APIResponseError(response)

return response.cast(InvoiceCredentialsModel, APIResponseError)

# dateFrom: str # ISO: 2025-07-10T00:00:00.873+00:00
# dateTo?: str # ISO: 2025-07-10T00:00:00.873+00:00
Expand Down
36 changes: 33 additions & 3 deletions paymentsgate/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ class Currencies(StrEnum):
YER = "YER"
ZMK = "ZMK"
MNT = "MNT"
TRX = "TRX"
ETH = "ETH"

class Languages(StrEnum):
EN = ("EN",)
Expand All @@ -160,7 +162,10 @@ class Languages(StrEnum):
RU = ("RU",)
IN = ("IN",)
AR = ("AR",)
KG = "KG"
KG = ("KG",)
ES = ("ES",)
TG = ("TG",)
MN = ("MN",)


class Statuses(StrEnum):
Expand All @@ -172,6 +177,7 @@ class Statuses(StrEnum):
disputed = "disputed"
canceled = "canceled"
expired = "expired"
refunded = "refunded"


class CurrencyTypes(StrEnum):
Expand Down Expand Up @@ -212,6 +218,7 @@ class InvoiceTypes(StrEnum):
phonepe = ("phonepe",)
freecharge = ("freecharge",)
instapay = ("instapay",)
instapayqr = ("instapayqr",)
vodafonecash = ("vodafonecash",)
orangecash = ("orangecash",)
razn = ("razn",)
Expand All @@ -224,12 +231,14 @@ class InvoiceTypes(StrEnum):
stry = ("stry",)
sthb = ("sthb",)
sberpay = ("sberpay",)
sberpay_s = ("sberpay_s",)
tpay = ("tpay",)
opay = ("opay",)
moniepoint = ("moniepoint",)
palmpay = ("palmpay",)
wave = ("wave",)
orangemoney = ("orangemoney",)
orangemoneyjod = ("orangemoneyjod",)
moovmoney = ("moovmoney",)
rtjscard = ("rtjscard",)
ruzs = ("ruzs",)
Expand Down Expand Up @@ -260,7 +269,25 @@ class InvoiceTypes(StrEnum):
banktransferzar = ("banktransferzar",)
dcecomusd = ("dcecomusd",)
dcecomeur = ("dcecomeur",)
benefitpay = "benefitpay"
benefitpay = ("benefitpay",)
cliq = ("cliq",)
papara = ("papara",)
blik = ("blik",)
promptpayqr = ("promptpayqr",)
applepay = ("applepay",)
ideal = ("ideal",)
napas = ("napas",)
vndqr = ("vndqr",)
egpqr = ("egpqr",)
oneclick = ("oneclick",)
thaiqr = ("thaiqr",)
mobilecom = ("mobilecom",)
banktransferuyu = ("banktransferuyu",)
banktransferngn = ("banktransferngn",)
mpesa = ("mpesa",)
airtel = ("airtel",)
equitel = ("equitel",)
fib = ("fib",)

class EELQRBankALias(StrEnum):
bakai = ("bakai",)
Expand All @@ -287,6 +314,7 @@ class RiskScoreLevels(StrEnum):
hr = "hr" # highest risk
ftd = "ftd" # high risk
trusted = "trusted" # low risk
mixed = "mixed"


class CancellationReason(StrEnum):
Expand All @@ -300,7 +328,9 @@ class CancellationReason(StrEnum):
ANTISPAM = ("ANTISPAM",)
BY_CLIENT = ("BY_CLIENT",)
BY_EXPIRATION = ("BY_EXPIRATION",)
PAID_CANCEL_BY_EXPIRATION = "PAID_BY_EXPIRATION"
PAID_CANCEL_BY_EXPIRATION = ("PAID_BY_EXPIRATION")
DIRECT_MATCH_WITHOUT_MATCH_FLOW_FAILED = ("DIRECT_MATCH_WITHOUT_MATCH_FLOW_FAILED")
REFUNDED = ("REFUNDED")


class FeesStrategy(StrEnum):
Expand Down
Loading