Getting startedRelease notesSDK

Python SDK

Package: mangopay4-python-sdk



3.55.0 - Mar 23, 2026

Added

Support for mTLS authentication

To support mTLS authentication for SCA on platforms, which is required for platforms taking SCA-triggering action under proxy:

  • Added mtls_cert, mtls_private_key properties
  • Moved requests_session = requests.Session() from being global to being instantiated per handler (self._session = requests.Session())
  • Updated the requests logic to add the mTLS certificate if present
  • Updated README.md file with details on how to configure mTLS for the SDK

Note: The SDK requires TLS 1.2+ for TLS compliance, even for non-mTLS connections, in line with Mangopay’s security guidelines.

3.54.1 - Feb 19, 2026

Added

ChargeBearer body parameter on payouts

On POST Create a Payout, platforms can now request to pay all SWIFT fees using the OUR value of the new ChargeBearer property (API release note):

  • Added charge_bearer param (CharField) to BankWirePayOut class
  • Updated tests

Added

AuthenticationType response property on card pay-ins

The AuthenticationResult.AuthenticationType response property is now returned on card pay-ins (API release note):

  • Added the AuthenticationResult class
  • Added the AuthenticationResultField class
  • Added authentication_result param (AuthenticationResultField) to PreAuthorization, CardValidation, Deposit, PayIn classes
  • Updated tests

Added

TelephoneOrder body parameter on recurring card pay-ins (CIT and MIT)

To support the TelephoneOrder property on POST Create a Recurring PayIn (both CIT and MIT payloads):

  • Added payment_category (CharField) to RecurringPayInCIT and RecurringPayInMIT classes
  • Updated tests

3.54.0 - Feb 12, 2026

FX

Breaking change

Custom fees

To support percentage-based FX fees (API release note):

Caution - Breaking change

  • The InstantConversion.Fees type is now CustomFeesField instead of MoneyField
  • Added Fees, RequestedFees to ConversionQuote
  • Added RequestedFees to Conversion

Added

User margin

To support the FX user margin (API release note):

  • Added UserMargin to ConversionQuote, InstantConversion
  • Added MarginsResponse to ConversionQuote, Conversion

Echo

Breaking change

Settlement upload endpoints

To support the new behavior of the POST Create a Settlement endpoint to obtain an UploadUrl:

  • Updated settlement_sample.csv and tests
  • Added file_name and upload_url to Settlement

Caution - Breaking change

  • Replaced upload method in Settlement with generate_upload_url:
Python
1settlement = Settlement(file_name='settlement_sample.csv')
2created = SettlementTestLive._settlement = Settlement(**settlement.generate_upload_url())

Caution - Breaking change

  • Replaced update method in Settlement with: generate_new_upload_url
Python
1dto = Settlement(id=settlement.settlement_id, file_name='updated_settlement_sample.csv')
2result = Settlement(**dto.generate_new_upload_url())

Added

GET validations for a Settlement endpoint

To support the GET View validations for a Settlement endpoint:

  • Added SettlementValidation class
  • Added get method to SettlementValidation
Python
1validations = SettlementValidation.get(settlement.settlement_id, page=1, per_page=10)

PUT Cancel a Settlement endpoint

To support the PUT Cancel a Settlement endpoint:

  • Changes: added cancel method to Settlement
Python
1cancelled = Settlement.cancel(settlement.settlement_id)

Intent unfunded amounts and source wallet

  • Added SplitOriginWalletId to PayInIntentSplit
  • Added UnfundedAmount to PayInIntent

POST Create an Intent Refund

To support POST Create an Intent Refund:

  • Added Refund and Capture to PayInIntent
  • Added create_refund method to PayInIntent
Python
1PayInIntent.create_refund(intent.id, **dto)

POST Reverse an Intent Refund

To support POST Reverse an Intent Refund:

  • Added reverse_refund method to PayInIntent
Python
1PayInIntent.reverse_refund(intent.id, intent.refund.id, **dto)

POST Create an Intent Dispute

To support POST Create an Intent Dispute:

  • Added Dispute to PayInIntent
  • Added create_dispute method to PayInIntent
Python
1PayInIntent.create_dispute(intent.id, intent.capture.id, **dto)

PUT Update an Intent Dispute

To support PUT Update an Intent Dispute:

  • Added decision to PayInIntent
  • Added update_dispute_outcome method to PayInIntent
Python
1PayInIntent.update_dispute_outcome(intent.id, intent.capture.id, intent.dispute.id, **update_outcome_dto)

3.53.0 - Jan 30, 2026

Added

Support for new SCA status endpoint

The SDK now supports the new GET View the SCA status of a User endpoint.

Added ConsentScopeField in mangopay/fields.py:

1class ConsentScopeField(Field):
2 def python_value(self, value):
3 if value is not None:
4 return ConsentScope(contact_information_update=value.get('ContactInformationUpdate', None),
5 recipient_registration=value.get('RecipientRegistration', None),
6 transfer=value.get('Transfer', None),
7 view_account_information=value.get('ViewAccountInformation', None))
8
9 return value
10
11 def api_value(self, value):
12 value = super(ConsentScopeField, self).api_value(value)
13
14 if isinstance(value, ConsentScope):
15 result = {}
16 if value.contact_information_update is not None:
17 result['ContactInformationUpdate'] = value.contact_information_update
18 if value.recipient_registration is not None:
19 result['RecipientRegistration'] = value.recipient_registration
20 if value.transfer is not None:
21 result['Transfer'] = value.transfer
22 if value.view_account_information is not None:
23 result['ViewAccountInformation'] = value.view_account_information
24 return result
25
26 return value

Added ScaStatus class in mangopay/resources.py:

1@python_2_unicode_compatible
2class ScaStatus(BaseModel):
3 user_status = CharField(api_name='UserStatus')
4 is_enrolled = BooleanField(api_name='IsEnrolled')
5 last_enrollment_date = DateTimeField(api_name='LastEnrollmentDate')
6 last_consent_collection_date = DateTimeField(api_name='LastConsentCollectionDate')
7 consent_scope = ConsentScopeField(api_name='ConsentScope')
8
9 class Meta:
10 verbose_name = 'sca_status'
11 verbose_name_plural = 'sca_statuses'
12 url = {
13 'GET': '/sca/users/%(id)s/sca-status',
14 }
15
16 @staticmethod
17 def get(user_id, *args, **kwargs):
18 kwargs['id'] = user_id
19 select = SelectQuery(ScaStatus, *args, **kwargs)
20 select.identifier = 'GET'
21 return select.get("", *args, **kwargs)

Corresponding tests updated in tests/test_users.py.

New event types

Added new constants to mangopay/constants.py:

1EVENT_TYPE_CHOICES = Choices(
2('SCA_CONTACT_INFORMATION_UPDATE_CONSENT_GIVEN', 'sca_contact_information_update_consent_given', 'Sca Contact Information Update Consent Given'),
3('SCA_CONTACT_INFORMATION_UPDATE_CONSENT_REVOKED', 'sca_contact_information_update_consent_revoked', 'Sca Contact Information Update Consent Revoked'),
4('SCA_TRANSFER_CONSENT_GIVEN', 'sca_transfer_consent_given', 'Sca Transfer Consent Given'),
5('SCA_TRANSFER_CONSENT_REVOKED', 'sca_transfer_consent_revoked', 'Sca Transfer Consent Revoked'),
6('SCA_RECIPIENT_REGISTRATION_CONSENT_GIVEN', 'sca_recipient_registration_consent_given', 'Sca Recipient Registration Consent Given'),
7('SCA_RECIPIENT_REGISTRATION_CONSENT_REVOKED', 'sca_recipient_registration_consent_revoked', 'Sca Recipient Registration Consent Revoked'),
8('SCA_VIEW_ACCOUNT_INFORMATION_CONSENT_GIVEN', 'sca_view_account_information_consent_given', 'Sca View Account Information Consent Given'),
9('SCA_VIEW_ACCOUNT_INFORMATION_CONSENT_REVOKED', 'sca_view_account_information_consent_revoked', 'Sca View Account Information Consent Revoked'),
10('SCA_EMAIL_VERIFIED', 'sca_email_verified', 'Sca Email Verified'),
11('SCA_PHONE_NUMBER_VERIFIED', 'sca_phone_number_verified', 'Sca Phone Number Verified'),
12)

RecipientId property on payouts

To support the sending of RecipientId on payouts, in mangopay/resources.py:

  • Moved the Recipient class before the BankWirePayOut class in order to be able to reference the recipient inside the payout
  • Inside the BankWirePayOut class, made bank_account nullable
  • Inside the BankWirePayOut class added reference to recipient:
1recipient = ForeignKeyField(Recipient, api_name='RecipientId')

Added PayOutsTestLive class in tests/test_payouts.py.

Fixed

User-Agent header

In mangopay/init.py The SDK now tries to use importlib.metadata.version to get the package version and falls back to the previous method:

1client_id = None
2apikey = None
3api_url = 'https://api.mangopay.com/v2.01/'
4api_sandbox_url = 'https://api.sandbox.mangopay.com/v2.01/'
5temp_dir = None
6api_version = 2.01
7sandbox = True
8uk_header_flag = False
9
10package_version = None
11try:
12 # try importlib.metadata first
13 from importlib.metadata import version
14 package_version = version('mangopay4-python-sdk')
15except Exception:
16 # fallback for development/editable installs
17 try:
18 with open('./setup.py', 'r') as f:
19 for line in f:
20 if line.startswith(' version'):
21 package_version = line.split('=')[1].replace("'", "").replace(",", "").replace("n", "").strip()
22 except:
23 None
24
25from .api import APIRequest # noqa
26from .utils import memoize
27def _get_default_handler():
28 return APIRequest()
29get_default_handler = memoize(_get_default_handler, {}, 0)

3.52.0 - Nov 26, 2025

Changed

  • changed naming convention to mangopay4

3.51.1 - Nov 25, 2025

Added

3.51.0 - Oct 27, 2025

Added

Changed

  • x-tenant-id deprecated as no longer necessary for UK platforms; the parameter is ignored by Mangopay

3.50.0 - Oct 1, 2025

Added

3.49.4 - Sep 23, 2025

Added

  • Webhook event types for Echo, Mangopay’s solution for third-party PSP integrations: INTENT_AUTHORIZED,INTENT_CAPTURED,INTENT_REFUNDED,INTENT_REFUND_REVERSED,INTENT_DISPUTE_CREATED,INTENT_DISPUTE_DEFENDED,INTENT_DISPUTE_WON,INTENT_DISPUTE_LOST,INTENT_SETTLED_NOT_PAID,INTENT_PAID,SPLIT_CREATED,SPLIT_PENDING_FUNDS_RECEPTION,SPLIT_AVAILABLE,SPLIT_REJECTED,SPLIT_REVERSED #448
  • Support for VirtualAccountPurpose on Banking Alias object

3.49.3 - Sep 8, 2025

Added

  • Support for ProfilingAttemptReference on all payment methods

3.49.2 - Sep 3, 2025

Added

  • Support for missing fields on TransferRefund

Changed

  • Casing of 3 fields to harmonise on snake_case ⚠️ Breaking change for Conversion quote_Id, Document(KYC) processed_date, and Ubo is_active
  • OAuth token refresh buffer before expiry updated to 30s
  • Updated testing library to pynose

Fixed

  • Tests

3.49.1 - Aug 14, 2025

Added

3.49.0 - Aug 7, 2025

Added

Support for new Splits endpoints for Echo (API release note):

New ReportTypes for Echo (API release note):

  • ECHO_INTENT
  • ECHO_INTENT_ACTION
  • ECHO_SETTLEMENT
  • ECHO_SPLIT

3.48.1 - Jul 28, 2025

Added

3.48.0 - Jul 18, 2025

Added

Endpoints for Mangopay Echo, a solution for platforms working with another third-party PSP for funds acquisition (including via the Mirakl Connector):

3.47.0 - Jul 2, 2025

Added

3.46.1 - Jun 16, 2025

Added

3.46.0 - Jun 10, 2025

Added

Endpoints for new Reporting Service feature:

Webhook event types for new Reporting Service:

  • REPORT_GENERATED
  • REPORT_FAILED

Support for GET List Disputes for a PayIn endpoint.

3.45.1 - Jun 6, 2025

Added

Fixed

  • Status enum value on Identity Verification object changed from OUTDATED to OUT_OF_DATE