The Mangopay connector polls a Mangopay client and surfaces multi-currency e-wallets, balances, bank accounts (external), and transactional events. It also initiates transfers and payouts, registers bank accounts, and ingests webhooks.
Prerequisites#
You need a Mangopay client and an API key pair. Mangopay uses HTTP Basic Auth (clientID:apiKey); the connector sets the header on every request.
Make sure to create an API key dedicated to Formance. Doing so will improve your auditability and security and will allow you to revoke access to Formance at any time if needed.
Installation#
curl -X POST $FORMANCE_API_URL/api/payments/v3/connectors/install/mangopay \
-H "Content-Type: application/json" \
-d @config.jsonConfiguration fields#
| Field | Type | Required | Default |
|---|---|---|---|
apiKey | string | Yes | |
clientID | string | Yes | |
endpoint | string | Yes | |
pageSize | integer | No | 25 |
pollingPeriod | string | No | 30m |
endpoint is https://api.mangopay.com for production,
https://api.sandbox.mangopay.com for sandbox.
Capabilities#
FETCH_ACCOUNTS— e-wallets, grouped byUserId.FETCH_BALANCES— per-wallet balance via Mangopay'sBalanceresource.FETCH_EXTERNAL_ACCOUNTS— bank accounts attached to each user.FETCH_PAYMENTS— payins, transfers, payouts, refunds, and disputes, unified intoPSPPayment.FETCH_OTHERS— KYC documents and mandates, surfaced undermangopay-*onv3ListPaymentsOther.CREATE_BANK_ACCOUNT— IBAN / US / GB / CA / OTHER variants.CREATE_TRANSFER— wallet-to-wallet viaPOST /transfers.CREATE_PAYOUT— wallet-to-bank-account viaPOST /payouts/bankwire.CREATE_WEBHOOKS+TRANSLATE_WEBHOOKS— one hook per consumedEventType.
Account model#
Every Connectivity internal account is one Mangopay e-wallet (single-currency, scoped to a UserId). The reference is the wallet ID; defaultAsset is the wallet's currency at ISO 4217 precision. Accounts are emitted per user (one fetch cycle per user from the workflow's parent payload). EXTERNAL accounts come from /users/{UserId}/bankaccounts; v3CreateBankAccount registers new ones (IBAN / US / GB / CA / OTHER). See Accounts for the cross-connector model.
Asset model#
Multi-currency (EUR / USD / GBP, …), formatted to UMN at ISO 4217 precision. Amounts are already in minor units — no scaling.
Status mapping#
Mangopay Status (Transactions) | Payment status |
|---|---|
CREATED, IN_PROGRESS | PENDING |
SUCCEEDED | SUCCEEDED |
FAILED | FAILED |
CANCELLED | CANCELLED |
CREATE_* initiations schedule PollTransferStatus / PollPayoutStatus against the relevant endpoint until terminal.
Metadata keys#
Under com.mangopay.spec/:
- Account:
wallet_id,description,owners(comma-joinedUserIdlist),currency. - External account:
bank_account_id,type(IBAN/US/GB/CA/OTHER),iban,bic,owner_name,owner_address. - Payment:
transaction_id,transaction_type(PAYIN/PAYOUT/TRANSFER/REFUND),nature(REGULAR/REPUDIATION/REFUND/SETTLEMENT),result_code,result_message.
Bank-account creation uses com.mangopay.spec/bank_account_type on the v3CreateBankAccount body to select the variant (default IBAN).
Workflow tree#
FetchAccounts (periodic) — paginated over UserList → WalletList
├── FetchBalances (FromPayload — no extra API call)
└── FetchPayments (periodic) — per wallet
FetchExternalAccounts (periodic) — per user
FetchOthers (periodic) — KYC docs, mandates
CreateBankAccount / CreateTransfer / CreatePayout (event-driven)
└── PollTransferStatus / PollPayoutStatus until terminal
CreateWebhooks (one-shot at install) — one hook per EventTypePagination and recovery#
1-indexed Page + Per_Page (max 100). The connector persists the watermark per stream in platform-managed State. Webhook deliveries dedupe by (EventType, ResourceId) against PSPPayment.Reference.
Known gaps#
- Pre-authorisations: not surfaced; only successful captures land as
PSPPayments. - Disputes: arrive via webhooks as
PSPPaymentrows taggedtransaction_type=DISPUTE; the full lifecycle lives in Mangopay's dashboard. - KYC: documents surface via
FETCH_OTHERSonly — submission happens in Mangopay's UI.