Skip to main content

[3.53.0] - 2026-01-30

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:
class ConsentScopeField(Field):
    def python_value(self, value):
        if value is not None:
            return ConsentScope(contact_information_update=value.get('ContactInformationUpdate', None),
                                recipient_registration=value.get('RecipientRegistration', None),
                                transfer=value.get('Transfer', None),
                                view_account_information=value.get('ViewAccountInformation', None))

        return value

    def api_value(self, value):
        value = super(ConsentScopeField, self).api_value(value)

        if isinstance(value, ConsentScope):
            result = {}
            if value.contact_information_update is not None:
                result['ContactInformationUpdate'] = value.contact_information_update
            if value.recipient_registration is not None:
                result['RecipientRegistration'] = value.recipient_registration
            if value.transfer is not None:
                result['Transfer'] = value.transfer
            if value.view_account_information is not None:
                result['ViewAccountInformation'] = value.view_account_information
            return result

        return value
Added ScaStatus class in mangopay/resources.py:
@python_2_unicode_compatible
class ScaStatus(BaseModel):
    user_status = CharField(api_name='UserStatus')
    is_enrolled = BooleanField(api_name='IsEnrolled')
    last_enrollment_date = DateTimeField(api_name='LastEnrollmentDate')
    last_consent_collection_date = DateTimeField(api_name='LastConsentCollectionDate')
    consent_scope = ConsentScopeField(api_name='ConsentScope')

    class Meta:
        verbose_name = 'sca_status'
        verbose_name_plural = 'sca_statuses'
        url = {
            'GET': '/sca/users/%(id)s/sca-status',
        }

    @staticmethod
    def get(user_id, *args, **kwargs):
        kwargs['id'] = user_id
        select = SelectQuery(ScaStatus, *args, **kwargs)
        select.identifier = 'GET'
        return select.get("", *args, **kwargs)
Corresponding tests updated in tests/test_users.py.

New event types

Added new constants to mangopay/constants.py:
EVENT_TYPE_CHOICES = Choices(
('SCA_CONTACT_INFORMATION_UPDATE_CONSENT_GIVEN', 'sca_contact_information_update_consent_given', 'Sca Contact Information Update Consent Given'),
('SCA_CONTACT_INFORMATION_UPDATE_CONSENT_REVOKED', 'sca_contact_information_update_consent_revoked', 'Sca Contact Information Update Consent Revoked'),
('SCA_TRANSFER_CONSENT_GIVEN', 'sca_transfer_consent_given', 'Sca Transfer Consent Given'),
('SCA_TRANSFER_CONSENT_REVOKED', 'sca_transfer_consent_revoked', 'Sca Transfer Consent Revoked'),
('SCA_RECIPIENT_REGISTRATION_CONSENT_GIVEN', 'sca_recipient_registration_consent_given', 'Sca Recipient Registration Consent Given'),
('SCA_RECIPIENT_REGISTRATION_CONSENT_REVOKED', 'sca_recipient_registration_consent_revoked', 'Sca Recipient Registration Consent Revoked'),
('SCA_VIEW_ACCOUNT_INFORMATION_CONSENT_GIVEN', 'sca_view_account_information_consent_given', 'Sca View Account Information Consent Given'),
('SCA_VIEW_ACCOUNT_INFORMATION_CONSENT_REVOKED', 'sca_view_account_information_consent_revoked', 'Sca View Account Information Consent Revoked'),
('SCA_EMAIL_VERIFIED', 'sca_email_verified', 'Sca Email Verified'),
('SCA_PHONE_NUMBER_VERIFIED', 'sca_phone_number_verified', 'Sca Phone Number Verified'),
)

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:
recipient = 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:
client_id = None
apikey = None
api_url = 'https://api.mangopay.com/v2.01/'
api_sandbox_url = 'https://api.sandbox.mangopay.com/v2.01/'
temp_dir = None
api_version = 2.01
sandbox = True
uk_header_flag = False

package_version = None
try:
    # try importlib.metadata first
    from importlib.metadata import version
    package_version = version('mangopay4-python-sdk')
except Exception:
    # fallback for development/editable installs
    try:
        with open('./setup.py', 'r') as f:
            for line in f:
                if line.startswith('    version'):
                    package_version = line.split('=')[1].replace("'", "").replace(",", "").replace("\n", "").strip()
    except:
        None


from .api import APIRequest  # noqa
from .utils import memoize
def _get_default_handler():
    return APIRequest()
get_default_handler = memoize(_get_default_handler, {}, 0)

[3.52.0] - 2025-11-26

Changed

  • changed naming convention to mangopay4

[3.51.1] - 2025-11-25

Added

[3.51.0] - 2025-10-27

Added

Changed

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

[3.50.0] - 2025-10-01

Added

[3.49.4] - 2025-09-23

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] - 2025-09-08

Added

  • Support for ProfilingAttemptReference on all payment methods

[3.49.2] - 2025-09-03

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] - 2025-08-14

Added

[3.49.0] - 2025-08-07

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] - 2025-07-28

Added

[3.48.0] - 2025-07-18

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] - 2025-07-02

Added

[3.46.1] - 2025-06-16

Added

[3.46.0] - 2025-06-10

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] - 2025-06-06

Added

Fixed

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