Skip to content

Commit 4d4e892

Browse files
committed
Merge remote-tracking branch 'mangopay/master'
2 parents a23a471 + d9a1fb7 commit 4d4e892

38 files changed

+3250
-381
lines changed

.github/workflows/build_py.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,26 @@ on:
55
branches:
66
# push on master branch
77
- master
8-
# push on a feature branch
9-
- feature/*
10-
# push on a bugfix branch
11-
- bugfix/*
128
pull_request:
139
branches: [ master ]
1410

1511

1612
jobs:
1713
build:
1814

19-
runs-on: ubuntu-20.04
15+
runs-on: ubuntu-22.04
2016

2117
steps:
22-
- uses: actions/checkout@v2
23-
- name: Set up Python 3.6
24-
uses: actions/setup-python@v2
25-
with:
26-
python-version: 3.6
27-
- name: Install dependencies
28-
run: |
29-
python -m pip install --upgrade pip
30-
pip install -r requirements/base.txt
31-
pip install -r requirements/development.txt
32-
- name: Run tests
33-
run: |
34-
python -m unittest discover
18+
- uses: actions/checkout@v4
19+
- name: Set up Python 3.9
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: 3.9
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r requirements/base.txt
27+
pip install -r requirements/development.txt
28+
- name: Run tests
29+
run: |
30+
python -m unittest discover

.github/workflows/python-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ on:
77

88
jobs:
99
deploy:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313
- name: Set up Python
14-
uses: actions/setup-python@v2
14+
uses: actions/setup-python@v4
1515
with:
16-
python-version: '3.6'
16+
python-version: '3.9'
1717
- name: Install dependencies
1818
run: |
1919
python -m pip install --upgrade pip

CHANGELOG.md

Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,229 @@
1+
## [3.43.0] - 2025-04-29
2+
### Added
3+
4+
#### SCA on wallet access endpoints
5+
`ScaContext` query parameter added on wallet access endpoints for the [introduction of SCA](https://docs.mangopay.com/guides/sca/wallets):
6+
7+
- [GET View a Wallet](https://docs.mangopay.com/api-reference/wallets/view-wallet)
8+
- [GET List Wallets for a User](https://docs.mangopay.com/api-reference/wallets/list-wallets-user)
9+
- [GET List Transactions for a User](https://docs.mangopay.com/api-reference/transactions/list-transactions-user)
10+
- [GET List Transactions for a Wallet](https://docs.mangopay.com/api-reference/transactions/list-transactions-wallet)
11+
12+
If SCA is required, Mangopay responds with a 401 response code. The `PendingUserAction` `RedirectUrl` is in the dedicated `WWW-Authenticate` response header.
13+
14+
See the tests for examples on handling this error.
15+
16+
#### BLIK with code
17+
Support for [BLIK with code endpoint](https://docs.mangopay.com/api-reference/blik/create-blik-payin-with-code)
18+
19+
## [3.42.0] - 2025-04-24
20+
### Added
21+
22+
#### Recipients
23+
- [GET View payout methods](/api-reference/recipients/view-payout-methods)
24+
- [GET View the schema for a Recipient](/api-reference/recipients/view-recipient-schema)
25+
- [POST Validate data for a Recipient](/api-reference/recipients/validate-recipient-data)
26+
- [POST Create a Recipient](/api-reference/recipients/create-recipient)
27+
- [GET View a Recipient](/api-reference/recipients/view-recipient)
28+
- [GET List Recipients for a user](/api-reference/recipients/list-recipients-user)
29+
- [PUT Deactivate a Recipient](/api-reference/recipients/deactivate-recipient)
30+
- Webhook event types:
31+
- `RECIPIENT_ACTIVE`
32+
- `RECIPIENT_CANCELED`
33+
- `RECIPIENT_DEACTIVATED`
34+
35+
#### SCA on Owner-initiated transfers
36+
- On [POST Create a Transfer](/api-reference/transfers/create-transfer)
37+
- `ScaContext` body parameter
38+
- `PendingUserAction` response field containing `RedirectUrl`
39+
40+
#### Endpoints to close a user account
41+
- [DELETE Close a Natural User](/api-reference/users/close-natural-user)
42+
- [DELETE Close a Legal User](/api-reference/users/close-legal-user)
43+
44+
## [3.41.0] - 2025-04-24
45+
### Changed
46+
- ⚠️ **Caution – Minimum language requirement changed to Python 3.9** ⚠️
47+
48+
The SDK has been upgraded to require Python 3.9 as a minimum version. This is due to dependencies in the SDK's deployment pipeline on GitHub Actions and Ubuntu runners, which no longer support lower than Python 3.9. Older versions of Python reached end-of-life in 2024 or before.
49+
50+
Failure to upgrade your Python language version to 3.9 before updating to this version of the SDK will result in errors. For more information on the differences between Python 3.9 and earlier, see the [Python docs](https://docs.python.org/3/whatsnew/3.9.html).
51+
52+
The SDK supports Python 3.9, 3.10, 3.11, and 3.12.
53+
54+
55+
#### Added
56+
- [POST Create a TWINT PayIn](https://docs.mangopay.com/api-reference/twint/create-twint-payin)
57+
- [POST Create a Pay by Bank PayIn](https://docs.mangopay.com/api-reference/pay-by-bank/create-pay-by-bank-payin), including related `PAYIN_NORMAL_PROCESSING_STATUS_PENDING_SUCCEEDED` webhook event type
58+
- PayPal recurring payments, thanks to the `PaymentType` value `PAYPAL` on [Recurring PayIn Registrations](https://docs.mangopay.com/api-reference/recurring-payin-registrations/create-recurring-payin-registration-paypal) and new endpoints ([POST Create a Recurring PayPal PayIn (CIT)](https://docs.mangopay.com/api-reference/paypal/create-recurring-paypal-payin-cit) and [POST Create a Recurring PayPal PayIn (MIT)](https://docs.mangopay.com/api-reference/paypal/create-recurring-paypal-payin-mit)
59+
60+
## [3.40.1] - 2025-04-02
61+
### Changed
62+
- User-Agent Header value standardized on format: User-Agent: Mangopay-SDK/`SDKVersion` (`Language`/`LanguageVersion`)
63+
64+
### Fixed
65+
- Fixed tests for categorize SCA users endpoint
66+
67+
## [3.40.0] - 2025-03-19
68+
### Added
69+
70+
New endpoints for [strong customer authentication (SCA)](https://docs.mangopay.com/guides/users/sca) on Owner users:
71+
- [POST Create a Natural User (SCA)](https://docs.mangopay.com/api-reference/users/create-natural-user-sca)
72+
- [PUT Update a Natural User (SCA)](https://docs.mangopay.com/api-reference/users/update-natural-user-sca)
73+
- [POST Create a Legal User (SCA)](https://docs.mangopay.com/api-reference/users/create-legal-user-sca)
74+
- [PUT Update a Legal User (SCA)](https://docs.mangopay.com/api-reference/users/update-legal-user-sca)
75+
- [PUT Categorize a Natural User (SCA)](https://docs.mangopay.com/api-reference/users/categorize-natural-user)
76+
- [PUT Categorize a Legal User (SCA)](https://docs.mangopay.com/api-reference/users/categorize-legal-user)
77+
- [POST Enroll a User in SCA](https://docs.mangopay.com/api-reference/users/enroll-user)
78+
79+
### Added
80+
81+
New endpoint for Payconiq:
82+
- [POST Create a Payconiq PayIn](https://docs.mangopay.com/api-reference/payconiq/create-payconiq-payin)
83+
84+
## [3.39.1] - 2025-02-28
85+
### Fixed
86+
87+
Rate limiting headers interpreted dynamically based on `X-RateLimit-Reset` time and for a variable number of bucket values.
88+
89+
## [3.39.0] - 2025-02-25
90+
### Added
91+
92+
Endpoints and webhooks for [hosted KYC/B solution](https://docs.mangopay.com/guides/users/verification/hosted) (in beta)
93+
94+
- Endpoints
95+
- [Create an IDV Session](https://docs.mangopay.com/api-reference/idv-sessions/create-idv-session)
96+
- [View an IDV Session](https://docs.mangopay.com/api-reference/idv-sessions/view-idv-session)
97+
- [View Checks for an IDV Session](https://mangopay-idv.mintlify.app/api-reference/idv-sessions/view-idv-session-checks)
98+
99+
- Event types
100+
- `IDENTITY_VERIFICATION_VALIDATED`
101+
- `IDENTITY_VERIFICATION_FAILED`
102+
- `IDENTITY_VERIFICATION_INCONCLUSIVE`
103+
- `IDENTITY_VERIFICATION_OUTDATED`
104+
105+
`CardInfo` added for [Apple Pay](https://docs.mangopay.com/api-reference/apple-pay/create-apple-pay-payin) and [Google Pay](https://docs.mangopay.com/api-reference/google-pay/create-google-pay-payin)
106+
107+
### Fixed
108+
109+
Test for KYC documents test_GetKycDocuments
110+
111+
Updating the UBO should not require the full object
112+
113+
Get User EMoney wrong output
114+
115+
## [3.38.0] - 2025-02-14
116+
### Added
117+
118+
New endpoint for the [Swish PayIn](https://docs.mangopay.com/api-reference/swish/swish-payin-object) object:
119+
120+
- [Create a Swish PayIn](https://docs.mangopay.com/api-reference/swish/create-swish-payin)
121+
- [View a PayIn (Swish)](https://docs.mangopay.com/api-reference/swish/view-payin-swish)
122+
123+
## [3.37.2] - 2025-02-05
124+
### Updated
125+
126+
Revised tests to improve reliability and address any outdated tests.
127+
128+
## [3.37.1] - 2025-02-03
129+
### Fixed
130+
131+
Added missing `debited_funds` and `fees` parameters to the `BankWirePayInExternalInstruction` class.
132+
133+
## [3.37.0] - 2024-12-13
134+
### Added
135+
136+
- New `PaymentRef` parameter for [Payouts](https://docs.mangopay.com/api-reference/payouts/payout-object#the-payout-object).
137+
138+
## [3.36.1] - 2024-11-28
139+
### Updated
140+
141+
Added all relevant `EVENT_TYPE_CHOICES` for virtual accounts:
142+
- `VIRTUAL_ACCOUNT_ACTIVE`
143+
- `VIRTUAL_ACCOUNT_BLOCKED`
144+
- `VIRTUAL_ACCOUNT_CLOSED`
145+
- `VIRTUAL_ACCOUNT_FAILED`
146+
147+
## [3.36.0] - 2024-11-22
148+
### Added
149+
150+
New endpoints for The Virtual Account object:
151+
152+
- Create a Virtual Account
153+
- Deactivate a Virtual Account
154+
- View a Virtual Account
155+
- List Virtual Accounts for a Wallet
156+
- View Client Availabilities
157+
158+
## [3.35.1] - 2024-09-03
159+
### Fixed
160+
161+
- Add `PreferredCardNetwork` parameter to Direct Card PayIn object. (thank you @pmourlanne)
162+
163+
## [3.35.0] - 2024-08-13
164+
### Added
165+
- New endpoint: [Create a Bancontact PayIn](https://mangopay.com/docs/endpoints/bancontact#create-bancontact-payin)
166+
167+
## [3.34.3] - 2024-08-09
168+
### Fixed
169+
170+
- Disable `truncatechars` function that would truncate data if it's over 255 characters.
171+
172+
## [3.34.2] - 2024-07-25
173+
### Added
174+
- New parameter SecureModeRedirectURL for [Google Pay PayIn](https://mangopay.com/docs/endpoints/google-pay#google-pay-payin-object)
175+
- New parameters StatementDescriptor for [Refund](https://mangopay.com/docs/endpoints/refunds#refund-object)
176+
177+
## [3.34.1] - 2024-06-12
178+
### Added
179+
180+
- New endpoint [List Transactions for a Client Wallet](https://mangopay.com/docs/endpoints/wallets#list-transactions-client-wallet)
181+
182+
## [3.34.0] - 2024-05-31
183+
### Fixed
184+
185+
- Usage of filters with `ReportTransactions` and the `create()` method
186+
- BIC is not required for iDeal
187+
188+
### Added
189+
190+
- New endpoint [Add tracking to Paypal payin](https://mangopay.com/docs/endpoints/paypal#add-tracking-paypal-payin)
191+
- New parameter `SecureMode` for [Create card validation](https://mangopay.com/docs/endpoints/card-validations#create-card-validation)
192+
- New parameters for Paypal mean of payment : `CancelURL` & `Category` (sub-parameter of `LineItems`). And management of `PaypalPayerID`, `BuyerCountry`, `BuyerFirstname`, `BuyerLastname`, `BuyerPhone`, `PaypalOrderID` in the response.
193+
- New parameter `PaymentCategory` for [Create card validation](https://mangopay.com/docs/endpoints/card-validations#create-card-validation) and two additional endpoints [More info](https://mangopay.com/docs/release-notes/kivu)
194+
195+
## [3.33.2] - 2024-05-24
196+
### Added
197+
198+
- New parameter `CardHolderName` for [Update Card registration](https://mangopay.com/docs/endpoints/card-validations#update-card-registration)
199+
200+
## [3.33.1] - 2024-04-30
201+
### Fixed
202+
203+
- Updated the implementation for [Look up metadata for a payment method](https://mangopay.com/docs/endpoints/payment-method-metadata#lookup-payment-method-metadata). The `CommercialIndicator` and `CardType` fields have been moved to the `BinData` object in the API response.
204+
205+
## [3.33.0] - 2024-03-08
206+
### Fixed
207+
208+
- Fixed incorrect spelling of the `Subtype` key in the `BinData` parameter.
209+
- Conversions endpoint spelling
210+
211+
### Added
212+
213+
- The optional Fees parameter is now available on instant conversions, allowing platforms to charge users for FX services. More information [here](https://mangopay.com/docs/release-notes/millefeuille).
214+
- Platforms can now use a quote to secure the rate for a conversion between two currencies for a set amount of time. More information [here](https://mangopay.com/docs/release-notes/millefeuille).
215+
- Introduced the `uk_header_flag` boolean configuration key. Platforms partnered with Mangopay's UK entity should set this key to true for proper configuration.
216+
217+
## [3.32.0] - 2024-02-12
218+
### Added
219+
220+
- New endpoint to look up metadata from BIN or Google Pay token. More information [here](https://mangopay.com/docs/release-notes/kisale)
221+
- [Get a card validation endpoint](https://mangopay.com/docs/endpoints/card-validations#view-card-validation)
222+
223+
### Fixed
224+
225+
- Resolved an issue in our Python SDK where certain events were unable to process string-based IDs
226+
1227
## [3.31.0] - 2023-12-22
2228
### Added
3229

mangopay/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@
55
temp_dir = None
66
api_version = 2.01
77
sandbox = True
8+
uk_header_flag = False
89

910
package_version = None
1011
try:
11-
with open('./setup.py', 'r') as f:
12+
with open('../setup.py', 'r') as f:
1213
for line in f:
1314
if line.startswith(' version'):
1415
package_version = line.split('=')[1].replace("'", "").replace(",", "").replace("\n", "")
1516
except:
1617
None
1718

1819

19-
from .utils import memoize
2020
from .api import APIRequest # noqa
21+
from .utils import memoize
2122

2223

2324
def _get_default_handler():

0 commit comments

Comments
 (0)