# The API Response object ### Description The API Response object is a record of a response made by the API in the past. It can only be retrieved by using the idempotency feature. **Caution– Limited availability of API responses** You can only retrieve responses within 24 hours of the initial use of the idempotency key. ### Attributes The HTTP response code indicating the success or the failure of the request. The size of the message body in bytes. The media type (two-part identifier for file formats and format contents) of the resource. The date and time when the response was sent. The URL of the API request. The body of the request’s response. # View an API Response GET /v2.01/{ClientId}/responses/{IdempotencyKey} This call returns an API response based on the corresponding idempotency key, within 24 hours of the initial call. ### Path parameters *Min. length: 16 characters; max. length: 36 characters; only alphanumeric and dashes* A unique string generated by the platform. ### Responses The HTTP response code indicating the success or the failure of the request. The size of the message body in bytes. The media type (two-part identifier for file formats and format contents) of the resource. The date and time when the response was sent. The URL of the API request. The body of the request’s response. ```json 200 { "StatusCode": "200", "ContentLength": "591", "ContentType": "application/json; charset=utf-8", "Date": "Tue, 19 Jul 2022 08:47:59 GMT", "RequestURL": "https://api.mangopay.com/V2.01/clientId/users/natural", "Resource": { "Address": { "AddressLine1": "Rue des plantes", "AddressLine2": "The Oasis", "City": "Paris", "Region": "Ile de France", "PostalCode": "75001", "Country": "FR" }, "FirstName": "Jane", "LastName": "Doe", "Birthday": null, "Nationality": null, "CountryOfResidence": null, "Occupation": null, "IncomeRange": null, "ProofOfIdentity": null, "ProofOfAddress": null, "Capacity": "NORMAL", "Id": "146476890", "Tag": "test doc july 2022", "CreationDate": 1658220479, "PersonType": "NATURAL", "Email": "jdoe@mail.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": true, "TermsAndConditionsAcceptedDate": 1658220479, "UserCategory": "PAYER" } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'your-temporary-folder-path'; try { $idempotencyKey = "fk7urhkW45kpTHf445608d"; $response = $api->Responses->Get($idempotencyKey); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.IdempotencyResponse; public class ViewApiResponse { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var key = "P7urhkW45pTHf4498B"; IdempotencyResponse viewReponse = mangopay.getIdempotencyApi().get(key); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewReponse); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import IdempotencyResponse key = 'ok7urhkW45-pTHf4496-80' idempotency_response = IdempotencyResponse.get(key) pprint(idempotency_response._data) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var idempotencyKey = "kRitowx83-okajuE-934K"; var viewApiResponse = await api.Idempotent.GetAsync(idempotencyKey); string prettyPrint = JsonConvert.SerializeObject(viewApiResponse, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Apple Pay PayIn object ### Description The Apple Pay PayIn object allows platforms to process payments with Apple Pay. **Caution – Prerequisites to using Apple Pay** Using Apple Pay requires approval and activation from Mangopay. See How to process an Apple Pay payment for more information. The platform also needs to integrate with Apple Pay. For more information, see the Apple Pay documentation. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. The values must match those requested from Apple Pay, because they are encrypted in the `PaymentData`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. The values must match those requested from Apple Pay, because they are encrypted in the `PaymentData`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `APPLEPAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The mode applied for the 3DS2 protocol. On Apple Pay, this value is returned `null` as 3DS redirection is not applicable. With Apple Pay, this parameter is always `null`. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered. On Apple Pay, `null` is returned as 3DS redirection does not apply. *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. On Apple Pay, `null` is returned as 3DS redirection does not apply. Whether or not the `SecureMode` was used. The language in which the payment page is to be displayed. On Apple Pay, `null` is returned. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. On Apple Pay, `null` is returned as 3DS redirection does not apply. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. On Apple Pay, `null` is returned as 3DS redirection does not apply. Information about the end user billing address. On Apple Pay, `null` is returned as 3DS redirection does not apply. Information about the end user’s shipping address. On Apple Pay, `null` is returned as 3DS redirection does not apply. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The unique identifier of the recurring pay-in registration. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about Apple Pay Learn how to process an Apple Pay payment # Create an Apple Pay PayIn POST /v2.01/{ClientId}/payins/applepay/direct ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. The unique identifier of the credited wallet. Information about the debited funds. The values must match those requested from Apple Pay, because they are encrypted in the `PaymentData`. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. The values must match those requested from Apple Pay, because they are encrypted in the `PaymentData`. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The data returned by Apple Pay containing information about the payment. Apple Pay’s unique identifier of the payment. The payment network used for the payment request. The encrypted string for the payment request. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. The values must match those requested from Apple Pay, because they are encrypted in the `PaymentData`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. The values must match those requested from Apple Pay, because they are encrypted in the `PaymentData`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `APPLEPAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The mode applied for the 3DS2 protocol. On Apple Pay, this value is returned `null` as 3DS redirection is not applicable. With Apple Pay, this parameter is always `null`. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered. On Apple Pay, `null` is returned as 3DS redirection does not apply. *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. On Apple Pay, `null` is returned as 3DS redirection does not apply. Whether or not the `SecureMode` was used. The language in which the payment page is to be displayed. On Apple Pay, `null` is returned. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. On Apple Pay, `null` is returned as 3DS redirection does not apply. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. On Apple Pay, `null` is returned as 3DS redirection does not apply. Information about the end user billing address. On Apple Pay, `null` is returned as 3DS redirection does not apply. Information about the end user’s shipping address. On Apple Pay, `null` is returned as 3DS redirection does not apply. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The unique identifier of the recurring pay-in registration. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 - Success { "Id": "payin_m_01J83BDHEBH7Z0ZSR7WZXEZ6RB", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1726689494, "AuthorId": "user_m_01J84RCFJ0Q9RVQZ13618FSNWN", "CreditedUserId": "user_m_01J84RCFJ0Q9RVQZ13618FSNWN", "DebitedFunds": { "Currency": "EUR", "Amount": 1600 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1600 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1726689503, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01J84RDF46N1EQJ9ZA1560B1ZK", "DebitedWalletId": null, "PaymentType": "APPLEPAY", "ExecutionType": "DIRECT", "SecureMode": null, "CardId": null, "SecureModeReturnURL": null, "SecureModeRedirectURL": null, "SecureModeNeeded": false, "Culture": null, "SecurityInfo": { "AVSResult": "NO_CHECK" }, "StatementDescriptor": "Custom data", "BrowserInfo": null, "IpAddress": null, "Billing": null, "Shipping": null, "Requested3DSVersion": null, "Applied3DSVersion": null, "RecurringPayinRegistrationId": null, "PreferredCardNetwork": null, "PaymentCategory": null, "CardInfo": { "BIN": "516398", "IssuingBank": "BANCO SANTANDER S.A.", "IssuerCountryCode": "ES", "Type": "DEBIT", "Brand": "MASTERCARD", "SubType": "PLATINUM" } } ``` ```json REST { "Tag": "Created using the Mangopay API Postman collection", "AuthorId": "user_m_01J84RCFJ0Q9RVQZ13618FSNWN", "CreditedWalletId": "wlt_m_01J84RDF46N1EQJ9ZA1560B1ZK", "DebitedFunds": { "Currency": "EUR", "Amount": 1600 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "StatementDescriptor": "Custom data", "PaymentData": { "transactionId": "97e64d87f13a89ff6443cdcc205d5ccf7e15368b0d64126a8a2e0888a3a5c2a0", "network": "MasterCard", "tokenData": "{\"data\":\"2TihgKbmyPje02jYvkB6P+a6LCNmvKTFi4b7UN32sP4FJkllQP8CXIUPdv71xpIpBHetQ6TL7ON3Yex3L0Sc9hm15pME46/5fehwUxmgiumiK1eTupckAST6Zc0IYy2f9iJB9XpX+6dnKqTj7di12bo/iDXW4g2rbenNiDI0caiWebDaUG9DHSFjDxipQWx3Z8rf+zDiMGuDwO41LVh2SA1hRVbdINLpPpLtpxvyDeDkPQVohakcE+sK83QCHx0cEahAUKj6gAv6QuOLtWTsTtad04/ct3G0GnGeRp9p0fE0yJ+s4ybPj4WuV8lKNm6Lsg/WS9TqzT3RFgdjDjGdZ8W1CaEb/deG+Hh4MCebVJBP7iEdyfkB1afjJa0AqfbOBW2SIKXULtjP84QP\",\"signature\":\"MIAGCSqGSIb3DQEHAqCAMIACAQExDTAL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1\"}" } } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInPaymentDetailsApplePay; import com.mangopay.entities.subentities.PaymentData; public class CreateApplePayPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; PayIn applePayPayin = new PayIn(); applePayPayin.setAuthorId(userId); applePayPayin.setCreditedWalletId(walletId); applePayPayin.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); applePayPayin.setFees(new Money(CurrencyIso.EUR, 0)); applePayPayin.setPaymentType(PayInPaymentType.APPLEPAY); applePayPayin.setExecutionType(PayInExecutionType.DIRECT); applePayPayin.setTag("Created using the Mangopay Java SDK"); PaymentData paymentData = new PaymentData() .setTransactionId("061EB32181A2D9CA42AD16031B476EEBAA62A9A095AD660E2759FBA52B51A61") .setNetwork("VISA") .setTokenData("{\"version\":\"EC_v1\"," + "\"data\":\"w4HMBVqNC9ghPP4zncTA\\/0oQAsduERfsx78oxgniynNjZLANTL6+0koEtkQnW\\/K38Zew8qV1GLp+fLHo+qCBpiKCIwlz3eoFBTbZU+8pYcjaeIYBX9SOxcwxXsNGrGLk+kBUqnpiSIPaAG1E+WPT8R1kjOCnGvtdombvricwRTQkGjtovPfzZo8LzD3ZQJnHMsWJ8QYDLyr\\/ZN9gtLAtsBAMvwManwiaG3pOIWpyeOQOb01YcEVO16EZBjaY4x4C\\/oyFLWDuKGvhbJwZqWh1d1o9JT29QVmvy3Oq2JEjq3c3NutYut4rwDEP4owqI40Nb7mP2eb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EzRIZDWm0qn7Y0HB0PNzV1DDKfpYrnhRb4GEhBF\\/oEXBOe452PxbCnN1qAlqcSUWw==\"," + "\"publicKeyHash\":\"saPRAqS7TZ4bAYwzBj8ezDDC55ZolyH1FL+Xc8fd93o=\"," + "\"transactionId\":\"b061eb32181a2d9ca42ad16031b476eebaa62a9a095ad660e2759fba52b51a61\"}}"); applePayPayin.setPaymentDetails(new PayInPaymentDetailsApplePay() .setPaymentData(paymentData) .setStatementDescriptor("MGP")); PayIn createApplePayPayin = mangopay.getPayInApi().create(applePayPayin); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createApplePayPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, ApplepayPayIn from mangopay.utils import Money, ApplepayPaymentData natural_user = NaturalUser.get('210513027') applepay_payin = ApplepayPayIn( author_id = natural_user.id, credited_wallet_id = '210514820', debited_funds = Money(amount=500, currency='EUR'), fees = Money(amount=50, currency='EUR'), payment_data = ApplepayPaymentData( transaction_id='97e64d87f13a89ff6443cdcc205d5ccf7e15368b0d64126a8a2e0888a3a5c2a0', network='MasterCard', token_data='{\"data\":\"your-token-data"}' ), tag = 'Created using Mangopay Python SDK' ) create_applepay_payin = applepay_payin.save() pprint(create_applepay_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2V0P9B1WCX46GEBDWCTXNQ0"; var walletId = "wlt_m_01J3D7EQ6V6P4TQ3JK6ZATTQRT"; var paymentData = new PaymentData { Network = "MasterCard", TransactionId = "97e64d87f13a89ff6443cdcc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oZIzj0EAwIwLwYJKoZIhvcNAQkEMSIEICNPuucWpap0huG1HkZR1liLCfnUyPRFKc3BMuYYfb/1MAoGCCqGSM49BAMCBEcwRQIhAJSGdxshD9TsTvVniHsRx1Jez6j/5cv+1HFeJCjQxpXPAiBXBwBFqfvNpeUuEGHIJATVLN4kGQaxAunVG6aZ36e0CwAAAAAAAA==\",\"header\":{\"publicKeyHash\":\"xUyeFb75d359bfPEiq2JJMQj694UAxtTuBsaTWMOJxQ=\",\"ephemeralPublicKey\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEkeuICjZ7x15b7hPEBEBT5Zp43l95wCmJCU3QNxBvOCusG9w9sJMULuXlT4K8LOlPgaZzAcyWlfNwnLivVdOPfg==\",\"transactionId\":\"97e64d87f13a89ff6443cdcc205d5ccf7e15368b0d64126a8a2e0888a3a5c2a0\"},\"version\":\"EC_v1\"}" }; var applePayIn = new ApplePayDirectPayInPostDTO { PaymentType = PayInPaymentType.APPLEPAY, ExecutionType = PayInExecutionType.DIRECT, AuthorId = userId, CreditedUserId = userId, CreditedWalletId = walletId, DebitedFunds = new Money { Amount = 200, Currency = CurrencyIso.EUR }, Fees = new Money { Amount = 1, Currency = CurrencyIso.EUR }, PaymentData = paymentData, StatementDescriptor = "MGP", Tag = "Created using the Mangopay .NET SDK" }; var createApplePayPayIn = await api.PayIns.CreateApplePayAsync(applePayIn); string prettyPrint = JsonConvert.SerializeObject(createApplePayPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a PayIn (Apple Pay) GET /v2.01/{ClientId}/payins/{PayInId} ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. The values must match those requested from Apple Pay, because they are encrypted in the `PaymentData`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. The values must match those requested from Apple Pay, because they are encrypted in the `PaymentData`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `APPLEPAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The mode applied for the 3DS2 protocol. On Apple Pay, this value is returned `null` as 3DS redirection is not applicable. With Apple Pay, this parameter is always `null`. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered. On Apple Pay, `null` is returned as 3DS redirection does not apply. *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. On Apple Pay, `null` is returned as 3DS redirection does not apply. Whether or not the `SecureMode` was used. The language in which the payment page is to be displayed. On Apple Pay, `null` is returned. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. On Apple Pay, `null` is returned as 3DS redirection does not apply. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. On Apple Pay, `null` is returned as 3DS redirection does not apply. Information about the end user billing address. On Apple Pay, `null` is returned as 3DS redirection does not apply. Information about the end user’s shipping address. On Apple Pay, `null` is returned as 3DS redirection does not apply. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The unique identifier of the recurring pay-in registration. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 - Success { "Id": "payin_m_01J83BDHEBH7Z0ZSR7WZXEZ6RB", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1726689494, "AuthorId": "user_m_01J84RCFJ0Q9RVQZ13618FSNWN", "CreditedUserId": "user_m_01J84RCFJ0Q9RVQZ13618FSNWN", "DebitedFunds": { "Currency": "EUR", "Amount": 1600 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1600 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1726689503, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01J84RDF46N1EQJ9ZA1560B1ZK", "DebitedWalletId": null, "PaymentType": "APPLEPAY", "ExecutionType": "DIRECT", "SecureMode": null, "CardId": null, "SecureModeReturnURL": null, "SecureModeRedirectURL": null, "SecureModeNeeded": false, "Culture": null, "SecurityInfo": { "AVSResult": "NO_CHECK" }, "StatementDescriptor": "Custom data", "BrowserInfo": null, "IpAddress": null, "Billing": null, "Shipping": null, "Requested3DSVersion": null, "Applied3DSVersion": null, "RecurringPayinRegistrationId": null, "PreferredCardNetwork": null, "PaymentCategory": null, "CardInfo": { "BIN": "516398", "IssuingBank": "BANCO SANTANDER S.A.", "IssuerCountryCode": "ES", "Type": "DEBIT", "Brand": "MASTERCARD", "SubType": "PLATINUM" } } ``` ```json REST // GET has no body parameters ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $PayInId = "payin_m_01J87NTMTED8HW42J9ZSQX6RST"; $response = $api->PayIns->Get($PayInId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key" }) let myPayIn = { Id: "payin_m_01J87NTMTED8HW42J9ZSQX6RST" } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: "payin_m_01J87DAKCB24ZT8TW122A7M5QP" } viewPayIn(myPayIn[:ApplePayId]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("payin_m_01J87NTMTED8HW42J9ZSQX6RST"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'payin_m_01J87DAKCB24ZT8TW122A7M5QP' try: view_applepay_payin = PayIn.get(payin_id) pprint(vars(view_applepay_payin)) except PayIn.DoesNotExist: print('The ApplePay PayIn {} does not exist.'.format(payin_id)) ``` # The Bancontact PayIn object ### Description The Bancontact PayIn object allows platforms to process payments with Bancontact made by scanning a QR code, or by using a Bancontact-branded card (that is not saved). **Note – New integration in beta** This integration of Bancontact is in beta and therefore liable to change. The existing Bancontact integration using the **Web Card PayIn** (with `CardType` value `BCMC`) is still supported. A transition period will be implemented in the coming months to migrate flows, requiring no change on the part of platforms. The existing Bancontact integration using the **Direct Card PayIn** is unaffected and continues to be supported. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `BCMC` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Whether or not the pay-in forms part of a Bancontact recurring payment flow (not yet available). **Allowed values:** One of the supported languages in the ISO 639-1 format: DE, EN, FR, NL **Default value:** FR The language in which the Bancontact payment page is to be displayed. **Allowed values:** `WEB`, `APP` **Default value:** `WEB` The platform environment of the post-payment flow. The `PaymentFlow` value combines with the `ReturnURL` to manage the redirection behavior after payment: * Set the value to `APP` to send the user to your platform's mobile app * Set the value to `WEB` to send the user to a web browser In both cases you need to provide the relevant `ReturnURL`, whether to your app or website. The mobile URL to which to redirect the user to complete the payment in an app-to-app flow. **Note:** In Sandbox, this value is a placeholder: the `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. ### Related resources Learn more about Bancontact Learn about testing Bancontact # Create a Bancontact PayIn POST /v2.01/{ClientId}/payins/payment-methods/bancontact **Note – Timeout after 1 hour** The Bancontact payment session lasts for 1 hour, at which point the pay-in fails automatically if no action has been taken by the user. ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Whether or not the pay-in forms part of a Bancontact recurring payment flow (not yet available). **Allowed values:** One of the supported languages in the ISO 639-1 format: DE, EN, FR, NL **Default value:** FR The language in which the Bancontact payment page is to be displayed. **Allowed values:** `WEB`, `APP` **Default value:** `WEB` The platform environment of the post-payment flow. The `PaymentFlow` value combines with the `ReturnURL` to manage the redirection behavior after payment: * Set the value to `APP` to send the user to your platform's mobile app * Set the value to `WEB` to send the user to a web browser In both cases you need to provide the relevant `ReturnURL`, whether to your app or website. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `BCMC` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Whether or not the pay-in forms part of a Bancontact recurring payment flow (not yet available). **Allowed values:** One of the supported languages in the ISO 639-1 format: DE, EN, FR, NL **Default value:** FR The language in which the Bancontact payment page is to be displayed. **Allowed values:** `WEB`, `APP` **Default value:** `WEB` The platform environment of the post-payment flow. The `PaymentFlow` value combines with the `ReturnURL` to manage the redirection behavior after payment: * Set the value to `APP` to send the user to your platform's mobile app * Set the value to `WEB` to send the user to a web browser In both cases you need to provide the relevant `ReturnURL`, whether to your app or website. The mobile URL to which to redirect the user to complete the payment in an app-to-app flow. **Note:** In Sandbox, this value is a placeholder: the `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. ```json 200 - Created { "Id": "wt_45b42782-5fb1-4083-9c77-43b573af7deb", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1718721483, "AuthorId": "user_m_01HZSK5MX04KS9Q7SQSSRGQQ4Q", "DebitedFunds": { "Currency": "EUR", "Amount": 1627 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1464 }, "Fees": { "Currency": "EUR", "Amount": 163 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01HW8AS48VH6MRXVT44RKK5RW1", "CreditedUserId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "PaymentType": "BCMC", "ExecutionType": "WEB", "ReturnURL": "https://www.mangopay.com/docs/please-ignore?transactionId=wt_45b42782-5fb1-4083-9c77-43b573af7deb", "RedirectURL": "https://r3.girogate.de/ti/simbcmc?tx=2222192564&rs=NXyX461Ol79WBMuNVLDUQFDQrkgKDOte&cs=05e30e859ba461b405ff6696796caf4df5b277178484337a85bfa098049467a6", "StatementDescriptor": "Example123", "Recurring": false, "Culture": "EN", "PaymentFlow": "APP", "DeepLinkURL": "BEP://1BC.GIROGATE.DE/BCMC/123456789$ICAE3BUIH5P9U53Y5HKA9CRT" } ``` ```json REST { "Tag": "Created using the Mangopay API Postman collection", "AuthorId": "user_m_01HZSK5MX04KS9Q7SQSSRGQQ4Q", "DebitedFunds": { "Currency": "EUR", "Amount": 1627 }, "Fees": { "Currency": "EUR", "Amount": 163 }, "CreditedWalletId": "wlt_m_01HW8AS48VH6MRXVT44RKK5RW1", "ReturnURL": "https://www.mangopay.com/docs/please-ignore", "StatementDescriptor" : "Example123", "Recurring" : false, "Culture" : "EN", "PaymentFlow": "APP" } ``` # View a PayIn (Bancontact) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `BCMC` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Whether or not the pay-in forms part of a Bancontact recurring payment flow (not yet available). **Allowed values:** One of the supported languages in the ISO 639-1 format: DE, EN, FR, NL **Default value:** FR The language in which the Bancontact payment page is to be displayed. **Allowed values:** `WEB`, `APP` **Default value:** `WEB` The platform environment of the post-payment flow. The `PaymentFlow` value combines with the `ReturnURL` to manage the redirection behavior after payment: * Set the value to `APP` to send the user to your platform's mobile app * Set the value to `WEB` to send the user to a web browser In both cases you need to provide the relevant `ReturnURL`, whether to your app or website. The mobile URL to which to redirect the user to complete the payment in an app-to-app flow. **Note:** In Sandbox, this value is a placeholder: the `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. ```json 200 - Succeeded { "Id": "wt_45b42782-5fb1-4083-9c77-43b573af7deb", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1718721483, "AuthorId": "user_m_01HZSK5MX04KS9Q7SQSSRGQQ4Q", "DebitedFunds": { "Currency": "EUR", "Amount": 1627 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1464 }, "Fees": { "Currency": "EUR", "Amount": 163 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1718721503, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01HW8AS48VH6MRXVT44RKK5RW1", "CreditedUserId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "PaymentType": "BCMC", "ExecutionType": "WEB", "ReturnURL": "https://www.mangopay.com/docs/please-ignore?transactionId=wt_45b42782-5fb1-4083-9c77-43b573af7deb", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=2268171296&rs=7aOKg7NOrsDswV0grlEuH7pdA7cQjjte&cs=80902c0479c4400785a66cb5db61c1c1fd670fff450c28c34fbb206462ceade4", "StatementDescriptor": "Example123", "Recurring": false, "Culture": "EN", "PaymentFlow": "APP", "DeepLinkURL": "BEP://1BC.GIROGATE.DE/BCMC/123456789$ICAE3BUIH5P9U53Y5HKA9CRT" } ``` ```json REST // GET has no body parameters ``` # The Bank Account object ### Description The Bank Account object represents the actual bank account of the user and is therefore required to: * Process a bank wire payout * Set up a mandate to process a pay-in by direct debit with a mandate (BACS or SEPA network only) Different information is required for bank accounts in different countries. This is managed by the `Type` parameter, which determines the information that needs to be provided via the dedicated endpoint. The values are:  * IBAN – For accounts registered in countries that use IBAN  * US – For accounts registered in the United States  * CA – For accounts registered in Canada * GB – For accounts registered in the United Kingdom * OTHER – For accounts registered in countries that do not use IBAN (and are not US, CA, GB). The country of registration of a bank account is not linked to its currency. **Caution – Creating the wrong type can lead to processing delays** Failure to use the correct type can lead to processing delays. Use the dedicated types for US, CA, and GB. Only use OTHER if the country isn’t one of these and doesn’t use IBAN. **Note – Bank Account creation blocked in restricted countries** Due to anti-money laundering policy, Mangopay doesn’t accept the creation of bank accounts registered in some countries (see the Country restrictions article). ### Attributes Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). *Length: Up to 34 characters* The IBAN (international bank account number) of the bank account. It follows the CCDDBBAN format in which: * CC represents the country code (ISO 3166-1 alpha 2) * DD represents two check digits used by banking systems to avoid simple errors * BBAN stands for the Basic Bank Account Number which is up to 30 alphanumeric characters that are country-specific.\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. *Digits only* The account number of the bank account. The format and length depends on the Bank Account `Type`. The BIC (international identifier of the bank) for IBAN or OTHER-type bank accounts.\ The BIC can have one of the two following formats: * BIC8 – 8-character BIC (AAAABBCC) * BIC11 – 11-character BIC (AAAABBCCDDD)\ In which: * AAAA represents the bank code: 4 characters defining the bank * BB represents the country code: 2 characters forming the country ISO code (ISO 3166 format) * CC represents the location code: 2 localization characters (alphabetical or numeric) to distinguish banks from the same country * DDD represents the branch code: 3 optional characters defining the branch as a branch of the bank\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. *Length: 9 characters* The American Banking Association (ABA) routing number for US-type bank accounts. **Returned values:** `CHECKING`, `SAVINGS` The deposit type for US-type bank accounts. *Length: 3 digits* The 3-digit number assigned to Canadian financial institutions, for CA-type bank accounts. *Length: 5 digits* The 5-digit number assigned to branches of Canadian financial institutions, for CA-type bank accounts. *Max. length: 50 characters (letters and digits only)* The name of the Canadian bank for CA-type bank accounts. The 6-digit sort code, assigned to UK financial institutions, for GB-type bank accounts. The country in which the bank account is domiciled. The unique identifier of the User (natural or legal) who owns the bank account. **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account, indicating the country where the real-life account is registered\ The values are: * `IBAN` – For accounts registered in countries that use IBAN  * `US` – For accounts registered in the United States  * `CA` – For accounts registered in Canada * `GB` – For accounts registered in the United Kingdom * `OTHER` – For accounts registered in countries that do not use IBAN (and are not US, CA, GB) The unique identifier of the object. The date and time at which the object was created. Whether or not the Bank Account is active. Mangopay automatically sets this parameter to `false` if the bank account is closed or does not exist anymore. # Create a CA Bank Account POST /v2.01/{ClientId}/users/{UserId}/bankaccounts/ca ### Path parameters The unique identifier of the User (natural or legal) who owns the bank account. ### Body parameters Information about the address of residence of the bank account owner. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. The country of the address. *Digits only* The unique number of the bank account (between 7 to 35 digits). *Length: 3 digits* The 3-digit number assigned to Canadian financial institutions, for CA-type bank accounts. *Length: 5 digits* The 5-digit number assigned to branches of Canadian financial institutions, for CA-type bank accounts. *Max. length: 50 characters (letters and digits only)* The name of the Canadian bank for CA-type bank accounts. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). ### Responses Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Digits only* The unique number of the bank account (between 7 to 35 digits). *Length: 3 digits* The 3-digit number assigned to Canadian financial institutions, for CA-type bank accounts. *Length: 5 digits* The 5-digit number assigned to branches of Canadian financial institutions, for CA-type bank accounts. *Max. length: 50 characters (letters and digits only)* The name of the Canadian bank for CA-type bank accounts. The unique identifier of the User (natural or legal) who owns the bank account. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account, indicating the country where the real-life account is registered\ The values are: * `IBAN` – For accounts registered in countries that use IBAN  * `US` – For accounts registered in the United States  * `CA` – For accounts registered in Canada * `GB` – For accounts registered in the United Kingdom * `OTHER` – For accounts registered in countries that do not use IBAN (and are not US, CA, GB) The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). The date and time at which the object was created. Whether or not the Bank Account is active. Mangopay automatically sets this parameter to `false` if the bank account is closed or does not exist anymore. ```json { "Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type":"param_error", "Id":"4ee7cdf4-602a-4d6f-8859-4e7548022abf#1661865189", "Date":1661865190.0, "errors":{ "InstitutionNumber":"The InstitutionNumber field is required.", "BranchCode":"The BranchCode field is required.", "BankName":"The BankName field is required." } } ``` ```json 200 { "OwnerAddress":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" }, "AccountNumber":"11696419", "InstitutionNumber":"614", "BranchCode":"00152", "BankName":"The Bank", "UserId":"142036728", "OwnerName":"Joe Blogs", "Type":"CA", "Id":"150295080", "Tag":null, "CreationDate":1661865058, "Active":true } ``` ```json REST { "OwnerAddress":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" }, "AccountNumber":"11696419", "InstitutionNumber":"614", "BranchCode":"00152", "BankName":"The Bank", "OwnerName":"Joe Blogs", "Tag":"custom meta", } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $bankAccount = new \MangoPay\BankAccount(); $address = new \MangoPay\Address(); $address->AddressLine1 = 'Address line 1'; $address->AddressLine2 = 'Address line 2'; $address->City = 'Paris'; $address->Country = 'FR'; $address->PostalCode = '75000'; $address->Region = 'Region'; $details = new \MangoPay\BankAccountDetailsCA(); $details->AccountNumber = '11696419'; $details->InstitutionNumber = '614'; $details->BranchCode = '00152'; $details->BankName = 'Bank of Canada'; $bankAccount->OwnerAddress = $address; $bankAccount->OwnerName = 'Alex Smith'; $bankAccount->Tag = 'Created using Mangopay PHP SDK'; $bankAccount->Type = 'IBAN'; $bankAccount->Details = $details; $response = $api->Users->CreateBankAccount($userId, $bankAccount); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '165863393', Address: { AddressLine1: 'Edgewood Road', AddressLine2: null, City: 'Little Rock', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, FirstName: 'John', LastName: 'Doe', } let bankAccount = { Type: 'CA', OwnerName: user.FirstName + '' + user.LastName, OwnerAddress: user.Address, AccountNumber: '11696419', InstitutionNumber: '614', BranchCode: '00152', BankName: 'The Bank', Tag: 'Created using Mangopay NodeJS SDK', } const createBankAccount = async (userId, bankAccount) => { return await mangopay.Users.createBankAccount(userId, bankAccount) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createBankAccount(user.Id, bankAccount) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createCaBankAccount(userId, caBankAccountObject) begin response = MangoPay::BankAccount.create(userId, caBankAccountObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create bank account: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '165863393' } myCaBankAccount = { Type: 'CA', OwnerName: 'Alex Smith', OwnerAddress: { AddressLine1: 'Edgewood Road', AddressLine2: 'Address line 2', City: 'Little Rock', Region: 'IDF', PostalCode: '75000', Country: 'FR' }, AccountNumber: '11696419', InstitutionNumber: '614', BranchCode: '00152', BankName: 'The Bank', Tag: 'Created using Mangopay Ruby SDK' } createCaBankAccount(myUser[:Id], myCaBankAccount) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.core.enumerations.BankAccountType; import com.mangopay.core.enumerations.CountryIso; import com.mangopay.entities.BankAccount; import com.mangopay.entities.subentities.BankAccountDetailsCA; public class CreateCABankAccount { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01J29D5XMKKNPX72AR5HRV804X"; BankAccountDetailsCA bankAccountDetails = new BankAccountDetailsCA(); bankAccountDetails.setAccountNumber("11696419"); bankAccountDetails.setBankName("The Bank"); bankAccountDetails.setBranchCode("00152"); bankAccountDetails.setInstitutionNumber("614"); Address address = new Address(); address.setAddressLine1("Rue des plantes"); address.setAddressLine2("The Oasis"); address.setCity("FR"); address.setRegion("Ile de France"); address.setPostalCode("75001"); address.setCountry(CountryIso.FR); BankAccount bankAccount = new BankAccount(); bankAccount.setOwnerName("John Doe"); bankAccount.setDetails(bankAccountDetails); bankAccount.setOwnerAddress(address); bankAccount.setType(BankAccountType.CA); bankAccount.setTag("Created using the Mangopay Java SDK"); BankAccount createBankAccount = mangopay.getUserApi().createBankAccount(userId, bankAccount); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createBankAccount); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, BankAccount from mangopay.utils import Address natural_user = NaturalUser.get('213753890') ca_bank_account = BankAccount( user_id = natural_user.id, owner_name = f'{natural_user.first_name} {natural_user.last_name}', owner_address = Address( address_line_1 = natural_user.address.address_line_1, address_line_2 = natural_user.address.address_line_2, city = natural_user.address.city, region = natural_user.address.region, postal_code = natural_user.address.postal_code, country = natural_user.address.country, ), account_number = '11696419', institution_number = '614', branch_code = '00152', bank_name = 'The Bank', type = 'CA', tag = 'Created using the Mangopay Python SDK', ) create_ca_bank_account = ca_bank_account.save() pprint(create_ca_bank_account) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.GET; using MangoPay.SDK.Entities.POST; using MangoPay.SDK.Core.Enumerations; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var user = await api.Users.GetNaturalAsync("user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"); var accountNumber = "11696419"; var institutionNumber = "614"; var branchCode = "00152"; var bankName = "The Bank"; var CaBankAccount = new BankAccountCaPostDTO( user.FirstName + " " + user.LastName, user.Address, bankName, institutionNumber, branchCode, accountNumber ) { Tag = "Created using the Mangopay .NET SDK" }; BankAccountDTO createCaBankAccount = await api.Users.CreateBankAccountCaAsync(user.Id, CaBankAccount); string prettyPrint = JsonConvert.SerializeObject(createCaBankAccount, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a GB Bank Account POST /v2.01/{ClientId}/users/{UserId}/bankaccounts/gb ### Path parameters The unique identifier of the User (natural or legal) who owns the bank account. ### Body parameters Information about the address of residence of the bank account owner. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. The country of the address. *Length: 8 digits* The unique set of digits of the bank account. The 6-digit sort code, assigned to UK financial institutions, for GB-type bank accounts. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). ### Responses Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Length: 8 digits* The unique set of digits of the bank account. The 6-digit sort code, assigned to UK financial institutions, for GB-type bank accounts. The unique identifier of the User (natural or legal) who owns the bank account. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account, indicating the country where the real-life account is registered\ The values are: * `IBAN` – For accounts registered in countries that use IBAN  * `US` – For accounts registered in the United States  * `CA` – For accounts registered in Canada * `GB` – For accounts registered in the United Kingdom * `OTHER` – For accounts registered in countries that do not use IBAN (and are not US, CA, GB) The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). The date and time at which the object was created. Whether or not the Bank Account is active. Mangopay automatically sets this parameter to `false` if the bank account is closed or does not exist anymore. ```json { "Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type":"param_error", "Id":"9d4feea4-353f-416d-b8d6-8053471785ea#1677146902", "Date":1677146903, "errors":{ "GB":"The GB account is blocked by Fraud Policy" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "6977ee65-e865-4fdb-8a4b-835f47fff41f", "Date": 1698756883.0, "errors": { "AccountNumber": "The field AccountNumber must match the regular expression '\\d{8}'." } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "9b1dd701-a274-4be8-aabf-872a1557c9e9", "Date": 1698756987.0, "errors": { "SortCode": "The field SortCode must match the regular expression '\\d{6}'." } } ``` ```json { "Message": "One or several required parameters are missing or incorrect", "Type": "bankaccount_error", "Id": "c2cea07c-4403-4f5d-b80e-806c1cc60112", "Date": 1698757035.0, "errors": { "SortCode": "SortCode is invalid" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect", "Type": "bankaccount_error", "Id": "55ed90cb-cbc5-438b-ba5d-3207ef27d341", "Date": 1698757180.0, "errors": { "AccountNumber": "AccountNumber is invalid or is not applicable for this SortCode" } } ``` ```json 200 { "OwnerAddress":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" }, "AccountNumber":"11696419", "SortCode":"010039", "UserId":"142036728", "OwnerName":"Joe Blogs", "Type":"GB", "Id":"150297947", "Tag":null, "CreationDate":1661866223, "Active":true } ``` ```json REST { "OwnerAddress":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" }, "AccountNumber":"11696419", "SortCode":"010039", "OwnerName":"Joe Blogs", "Tag":"Created using the Mangopay API Collection Postman" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $bankAccount = new \MangoPay\BankAccount(); $address = new \MangoPay\Address(); $address->AddressLine1 = 'Address line 1'; $address->AddressLine2 = 'Address line 2'; $address->City = 'Paris'; $address->Country = 'FR'; $address->PostalCode = '75000'; $address->Region = 'Region'; $details = new \MangoPay\BankAccountDetailsGB(); $details->AccountNumber = '11696419'; $details->SortCode = '010039'; $bankAccount->OwnerAddress = $address; $bankAccount->OwnerName = 'Alex Smith'; $bankAccount->Tag = 'Created using Mangopay PHP SDK'; $bankAccount->Type = 'IBAN'; $bankAccount->Details = $details; $response = $api->Users->CreateBankAccount($userId, $bankAccount); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '165863393', Address: { AddressLine1: 'Edgewood Road', AddressLine2: null, City: 'Little Rock', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, FirstName: 'John', LastName: 'Doe', } let bankAccount = { Type: 'GB', OwnerName: user.FirstName + '' + user.LastName, OwnerAddress: user.Address, AccountNumber: '11696419', SortCode: '010039', Tag: 'Created using Mangopay NodeJS SDK', } const createBankAccount = async (userId, bankAccount) => { return await mangopay.Users.createBankAccount(userId, bankAccount) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createBankAccount(user.Id, bankAccount) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createGbBankAccount(userId, gbBankAccountObject) begin response = MangoPay::BankAccount.create(userId, gbBankAccountObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create bank account: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '165863393' } myGbBankAccount = { Type: 'GB', OwnerName: 'Alex Smith', OwnerAddress: { AddressLine1: 'Edgewood Road', AddressLine2: 'Address line 2', City: 'Little Rock', Region: 'IDF', PostalCode: '75000', Country: 'FR' }, AccountNumber: '11696419', SortCode: '010039', Tag: 'Created using Mangopay Ruby SDK' } createGbBankAccount(myUser[:Id], myGbBankAccount) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.BankAccountType; import com.mangopay.entities.BankAccount; import com.mangopay.entities.UserNatural; import com.mangopay.entities.subentities.BankAccountDetailsGB; public class createGBbankaccount { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); UserNatural user = mangopay.getUserApi().getNatural("user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"); BankAccount account = new BankAccount(); account.setType(BankAccountType.GB); account.setOwnerName(user.getFirstName() + " " + user.getLastName()); account.setOwnerAddress(user.getAddress()); account.setType(BankAccountType.GB); BankAccountDetailsGB details = new BankAccountDetailsGB(); details.setAccountNumber("63956474"); details.setSortCode("200000"); account.setDetails(details); account.setTag("Created using the Mangopay Java SDK"); BankAccount createAccount = mangopay.getUserApi().createBankAccount(user.getId(), account); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createAccount); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, BankAccount from mangopay.utils import Address natural_user = NaturalUser.get('213753890') gb_bank_account = BankAccount( user_id = natural_user.id, owner_name = f'{natural_user.first_name} {natural_user.last_name}', owner_address = Address( address_line_1 = natural_user.address.address_line_1, address_line_2 = natural_user.address.address_line_2, city = natural_user.address.city, region = natural_user.address.region, postal_code = natural_user.address.postal_code, country = natural_user.address.country, ), account_number = '11696419', sort_code = '010039', type = 'GB', tag = 'Created using the Mangopay Python SDK', ) create_gb_bank_account = gb_bank_account.save() pprint(create_gb_bank_account) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.GET; using MangoPay.SDK.Entities.POST; using MangoPay.SDK.Core.Enumerations; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var user = await api.Users.GetNaturalAsync("user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"); var accountNumber = "11696419"; var GbBankAccount = new BankAccountGbPostDTO( user.FirstName + " " + user.LastName, user.Address, accountNumber ) { SortCode = "010039", Tag = "Created using the Mangopay .NET SDK" }; BankAccountDTO createGbBankAccount = await api.Users.CreateBankAccountGbAsync(user.Id, GbBankAccount); string prettyPrint = JsonConvert.SerializeObject(createGbBankAccount, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create an IBAN Bank Account POST /v2.01/{ClientId}/users/{UserId}/bankaccounts/iban **Caution – Only for countries that use IBAN** Only use the IBAN type for accounts registered in countries that use IBAN and aren’t GB, US, or CA (for which you should use the dedicated type).  ### Path parameters The unique identifier of the User (natural or legal) who owns the bank account. ### Body parameters Information about the address of residence of the bank account owner. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. The country of the address. *Length: Up to 34 characters* The IBAN (international bank account number) of the bank account. It follows the CCDDBBAN format in which: * CC represents the country code (ISO 3166-1 alpha 2) * DD represents two check digits used by banking systems to avoid simple errors * BBAN stands for the Basic Bank Account Number which is up to 30 alphanumeric characters that are country-specific.\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. The BIC (international identifier of the bank) for IBAN or OTHER-type bank accounts.\ The BIC can have one of the two following formats: * BIC8 – 8-character BIC (AAAABBCC) * BIC11 – 11-character BIC (AAAABBCCDDD)\ In which: * AAAA represents the bank code: 4 characters defining the bank * BB represents the country code: 2 characters forming the country ISO code (ISO 3166 format) * CC represents the location code: 2 localization characters (alphabetical or numeric) to distinguish banks from the same country * DDD represents the branch code: 3 optional characters defining the branch as a branch of the bank *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). ### Responses Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Length: Up to 34 characters* The IBAN (international bank account number) of the bank account. It follows the CCDDBBAN format in which: * CC represents the country code (ISO 3166-1 alpha 2) * DD represents two check digits used by banking systems to avoid simple errors * BBAN stands for the Basic Bank Account Number which is up to 30 alphanumeric characters that are country-specific.\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. The BIC (international identifier of the bank) for IBAN or OTHER-type bank accounts.\ The BIC can have one of the two following formats: * BIC8 – 8-character BIC (AAAABBCC) * BIC11 – 11-character BIC (AAAABBCCDDD)\ In which: * AAAA represents the bank code: 4 characters defining the bank * BB represents the country code: 2 characters forming the country ISO code (ISO 3166 format) * CC represents the location code: 2 localization characters (alphabetical or numeric) to distinguish banks from the same country * DDD represents the branch code: 3 optional characters defining the branch as a branch of the bank\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. The unique identifier of the user. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account, indicating the country where the real-life account is registered\ The values are: * `IBAN` – For accounts registered in countries that use IBAN  * `US` – For accounts registered in the United States  * `CA` – For accounts registered in Canada * `GB` – For accounts registered in the United Kingdom * `OTHER` – For accounts registered in countries that do not use IBAN (and are not US, CA, GB) The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). The date and time at which the object was created. Whether or not the Bank Account is active. Mangopay automatically sets this parameter to `false` if the bank account is closed or does not exist anymore. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "c35b1e0b-1a21-42e4-a80f-440ad9de3c57#1662449222", "Date": 1662449223.0, "errors": { "BIC": "The field BIC must match the regular expression '^[a-zA-Z]{6}\\w{2}(\\w{3})?$'." } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "692b34b2-86a5-4859-a515-f8838292a56e#1662449297", "Date": 1662449298.0, "errors": { "IBAN": "The value is not a valid IBAN" } } ``` ```json 200 { "OwnerAddress":{ "AddressLine1":"Rue des plantes", "AddressLine2":"The Oasis", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" }, "IBAN":"FR7630004000031234567890143", "BIC":"BNPAFRPP", "UserId":"142036728", "OwnerName":"John Doe", "Type":"IBAN", "Id":"150287803", "Tag":"custom meta", "CreationDate":1661859994, "Active":true } ``` ```json REST { "OwnerAddress": { "AddressLine1": "Rue des plantes", "AddressLine2": "The Oasis", "City": "Paris", "Region": "Ile de France", "PostalCode": "75001", "Country": "FR" }, "IBAN": "FR7630004000031234567890143", "BIC": "BNPAFRPP", "OwnerName": "John Doe", "Tag": "Created using the Mangopay API Postman collection" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $bankAccount = new \MangoPay\BankAccount(); $address = new \MangoPay\Address(); $address->AddressLine1 = 'Address line 1'; $address->AddressLine2 = 'Address line 2'; $address->City = 'Paris'; $address->Country = 'FR'; $address->PostalCode = '75000'; $address->Region = 'Region'; $details = new \MangoPay\BankAccountDetailsIBAN(); $details->IBAN = 'FR7630004000031234567890143'; $details->BIC = 'BNPAFRPP'; $bankAccount->OwnerAddress = $address; $bankAccount->OwnerName = 'Alex Smith'; $bankAccount->Tag = 'Created using Mangopay PHP SDK'; $bankAccount->Type = 'IBAN'; $bankAccount->Details = $details; $response = $api->Users->CreateBankAccount($userId, $bankAccount); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '165863393', Address: { AddressLine1: 'Edgewood Road', AddressLine2: null, City: 'Little Rock', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, FirstName: 'John', LastName: 'Doe', } let bankAccount = { Type: 'IBAN', OwnerName: user.FirstName + '' + user.LastName, OwnerAddress: user.Address, IBAN: 'FR7630004000031234567890143', BIC: 'BNPAFRPP', Tag: 'Created using Mangopay NodeJS SDK', } const createBankAccount = async (userId, bankAccount) => { return await mangopay.Users.createBankAccount(userId, bankAccount) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createBankAccount(user.Id, bankAccount) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createIbanBankAccount(userId, ibanBankAccountObject) begin response = MangoPay::BankAccount.create(userId, ibanBankAccountObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create bank account: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '165863393' } myIbanBankAccount = { Type: 'IBAN', OwnerName: 'Alex Smith', OwnerAddress: { AddressLine1: 'Edgewood Road', AddressLine2: 'Address line 2', City: 'Little Rock', Region: 'IDF', PostalCode: '75000', Country: 'FR' }, IBAN: 'FR7630004000031234567890143', BIC: 'BNPAFRPP', Tag: 'Created using Mangopay Ruby SDK' } createIbanBankAccount(myUser[:Id], myIbanBankAccount) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.BankAccountType; import com.mangopay.entities.BankAccount; import com.mangopay.entities.UserNatural; import com.mangopay.entities.subentities.BankAccountDetailsIBAN; public class createIBANankaccount { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); UserNatural user = mangopay.getUserApi().getNatural("user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"); BankAccount account = new BankAccount(); account.setType(BankAccountType.IBAN); account.setOwnerName(user.getFirstName() + " " + user.getLastName()); account.setOwnerAddress(user.getAddress()); account.setUserId(user.getId()); BankAccountDetailsIBAN bankAccountDetails = new BankAccountDetailsIBAN(); bankAccountDetails.setIban("FR7630004000031234567890143"); bankAccountDetails.setBic("BNPAFRPP"); account.setDetails(bankAccountDetails); account.setTag("Created using the Mangopay Java SDK"); BankAccount createAccount = mangopay.getUserApi().createBankAccount(user.getId(), account); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createAccount); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, BankAccount from mangopay.utils import Address natural_user = NaturalUser.get('213753890') iban_bank_account = BankAccount( user_id = natural_user.id, owner_name = f'{natural_user.first_name} {natural_user.last_name}', owner_address = Address( address_line_1 = natural_user.address.address_line_1, address_line_2 = natural_user.address.address_line_2, city = natural_user.address.city, region = natural_user.address.region, postal_code = natural_user.address.postal_code, country = natural_user.address.country, ), iban = 'FR7630004000031234567890143', bic = 'BNPAFRPP', type = 'IBAN', tag = 'Created using the Mangopay Python SDK' ) create_iban_bank_account = iban_bank_account.save() pprint(create_iban_bank_account) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.GET; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var user = await api.Users.GetNaturalAsync("user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"); var iban = "FR7630004000031234567890143"; var IbanBankAccount = new BankAccountIbanPostDTO( user.FirstName + " " + user.LastName, user.Address, iban ) { BIC = "BNPAFRPP", Tag = "Created using the Mangopay .NET SDK" }; BankAccountDTO createIbanBankAccount = await api.Users.CreateBankAccountIbanAsync(user.Id, IbanBankAccount); string prettyPrint = JsonConvert.SerializeObject(createIbanBankAccount, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create an OTHER Bank Account POST /v2.01/{ClientId}/users/{UserId}/bankaccounts/other **Caution – Only for countries that don’t use IBAN** Only use the OTHER type if the account is registered in a country that doesn’t use IBAN and isn’t GB, US, or CA (for which you should use the dedicated type). **Note – Additional information may be required** OTHER-type bank accounts may require additional information depending on the country. Additional precisions per country (if applicable), are given below. For accounts registered in:  * Australia, provide the Bank State Branch (BSB) number (6 digits) in the `BIC` parameter. ### Path parameters The unique identifier of the User (natural or legal) who owns the bank account. ### Body parameters Information about the address of residence of the bank account owner. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. The country of the address. *Digits only* The unique number of the bank account (between 7 to 35 digits). The BIC (international identifier of the bank) for IBAN or OTHER-type bank accounts.\ The BIC can have one of the two following formats: * BIC8 – 8-character BIC (AAAABBCC) * BIC11 – 11-character BIC (AAAABBCCDDD)\ In which: * AAAA represents the bank code: 4 characters defining the bank * BB represents the country code: 2 characters forming the country ISO code (ISO 3166 format) * CC represents the location code: 2 localization characters (alphabetical or numeric) to distinguish banks from the same country * DDD represents the branch code: 3 optional characters defining the branch as a branch of the bank The country in which the bank account is domiciled. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). ### Responses Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Digits only* The unique number of the bank account (between 7 to 35 digits). The BIC (international identifier of the bank) for IBAN or OTHER-type bank accounts.\ The BIC can have one of the two following formats: * BIC8 – 8-character BIC (AAAABBCC) * BIC11 – 11-character BIC (AAAABBCCDDD)\ In which: * AAAA represents the bank code: 4 characters defining the bank * BB represents the country code: 2 characters forming the country ISO code (ISO 3166 format) * CC represents the location code: 2 localization characters (alphabetical or numeric) to distinguish banks from the same country * DDD represents the branch code: 3 optional characters defining the branch as a branch of the bank\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the bank account is domiciled. The unique identifier of the User (natural or legal) who owns the bank account. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account, indicating the country where the real-life account is registered\ The values are: * `IBAN` – For accounts registered in countries that use IBAN  * `US` – For accounts registered in the United States  * `CA` – For accounts registered in Canada * `GB` – For accounts registered in the United Kingdom * `OTHER` – For accounts registered in countries that do not use IBAN (and are not US, CA, GB) The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). The date and time at which the object was created. Whether or not the Bank Account is active. Mangopay automatically sets this parameter to `false` if the bank account is closed or does not exist anymore. ```json 200 { "OwnerAddress":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" }, "AccountNumber":"11696419", "BIC":"BNPAFRPP", "Country":"FR", "UserId":"142036728", "OwnerName":"Joe Blogs", "Type":"OTHER", "Id":"150298347", "Tag":null, "CreationDate":1661866304, "Active":true } ``` ```json REST { "OwnerAddress":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" }, "AccountNumber":"11696419", "BIC":"BNPAFRPP", "Country":"FR", "OwnerName":"Joe Blogs", "Tag":"custom meta", } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $bankAccount = new \MangoPay\BankAccount(); $address = new \MangoPay\Address(); $address->AddressLine1 = 'Address line 1'; $address->AddressLine2 = 'Address line 2'; $address->City = 'Paris'; $address->Country = 'FR'; $address->PostalCode = '75000'; $address->Region = 'Region'; $details = new \MangoPay\BankAccountDetailsOTHER(); $details->AccountNumber = '11696419'; $details->BIC = 'BNPAFRPP'; $details->Country = 'FR'; $bankAccount->OwnerAddress = $address; $bankAccount->OwnerName = 'Alex Smith'; $bankAccount->Tag = 'Created using Mangopay PHP SDK'; $bankAccount->Type = 'IBAN'; $bankAccount->Details = $details; $response = $api->Users->CreateBankAccount($userId, $bankAccount); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '165863393', Address: { AddressLine1: 'Edgewood Road', AddressLine2: null, City: 'Little Rock', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, FirstName: 'John', LastName: 'Doe', } let bankAccount = { Type: 'OTHER', OwnerName: user.FirstName + '' + user.LastName, OwnerAddress: user.Address, AccountNumber: '11696419', BIC: 'BNPAFRPP', Country: 'FR', Tag: 'Created using Mangopay NodeJS SDK', } const createBankAccount = async (userId, bankAccount) => { return await mangopay.Users.createBankAccount(userId, bankAccount) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createBankAccount(user.Id, bankAccount) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createOtherBankAccount(userId, otherBankAccountObject) begin response = MangoPay::BankAccount.create(userId, otherBankAccountObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create bank account: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '165863393' } myOtherBankAccount = { Type: 'OTHER', OwnerName: 'Alex Smith', OwnerAddress: { AddressLine1: 'Edgewood Road', AddressLine2: 'Address line 2', City: 'Little Rock', Region: 'IDF', PostalCode: '75000', Country: 'FR' }, AccountNumber: '11696419', BIC: 'BNPAFRPP', Country: 'FR', Tag: 'Created using Mangopay Ruby SDK' } createOtherBankAccount(myUser[:Id], myOtherBankAccount) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.core.enumerations.BankAccountType; import com.mangopay.core.enumerations.CountryIso; import com.mangopay.entities.BankAccount; import com.mangopay.entities.subentities.BankAccountDetailsOTHER; public class CreateOtherBankAccount { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01J29D5XMKKNPX72AR5HRV804X"; BankAccountDetailsOTHER bankAccountDetails = new BankAccountDetailsOTHER(); bankAccountDetails.setAccountNumber("11696419"); bankAccountDetails.setBic("BNPAFRPP"); bankAccountDetails.setCountry(CountryIso.FR); Address address = new Address(); address.setAddressLine1("Rue des plantes"); address.setAddressLine2("The Oasis"); address.setCity("FR"); address.setRegion("Ile de France"); address.setPostalCode("75001"); address.setCountry(CountryIso.FR); BankAccount bankAccount = new BankAccount(); bankAccount.setOwnerName("John Doe"); bankAccount.setDetails(bankAccountDetails); bankAccount.setOwnerAddress(address); bankAccount.setType(BankAccountType.OTHER); bankAccount.setTag("Created using the Mangopay Java SDK"); BankAccount createBankAccount = mangopay.getUserApi().createBankAccount(userId, bankAccount); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createBankAccount); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, BankAccount from mangopay.utils import Address natural_user = NaturalUser.get('213753890') other_bank_account = BankAccount( user_id = natural_user.id, owner_name = f'{natural_user.first_name} {natural_user.last_name}', owner_address = Address( address_line_1 = natural_user.address.address_line_1, address_line_2 = natural_user.address.address_line_2, city = natural_user.address.city, region = natural_user.address.region, postal_code = natural_user.address.postal_code, country = natural_user.address.country, ), account_number = '11696419', bic = 'BNPAFRPP', country = 'FR', type = 'OTHER', tag = 'Created using the Mangopay Python SDK' ) create_other_bank_account = other_bank_account.save() pprint(create_other_bank_account) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.GET; using MangoPay.SDK.Entities.POST; using MangoPay.SDK.Core.Enumerations; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var user = await api.Users.GetNaturalAsync("user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"); var accountNumber = "11696419"; var bic = "BNPAFRPP"; var OtherBankAccount = new BankAccountOtherPostDTO( user.FirstName + " " + user.LastName, user.Address, accountNumber, bic ) { Country = CountryIso.FR, Tag = "Created using the Mangopay .NET SDK" }; BankAccountDTO createOtherBankAccount = await api.Users.CreateBankAccountOtherAsync(user.Id, OtherBankAccount); string prettyPrint = JsonConvert.SerializeObject(createOtherBankAccount, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a US Bank Account POST /v2.01/{ClientId}/users/{UserId}/bankaccounts/us ### Path parameters The unique identifier of the User (natural or legal) who owns the bank account. ### Body parameters Information about the address of residence of the bank account owner. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. The country of the address. *Digits only* The unique set of digits of the bank account. *Length: 9 characters* The American Banking Association (ABA) routing number for US-type bank accounts. **Allowed values:** `CHECKING`, `SAVINGS` The deposit type for US-type bank accounts. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). ### Responses Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Digits only* The unique set of digits of the bank account. *Length: 9 characters* The American Banking Association (ABA) routing number for US-type bank accounts. **Returned values:** `CHECKING`, `SAVINGS` The deposit type for US-type bank accounts. The unique identifier of the User (natural or legal) who owns the bank account. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account, indicating the country where the real-life account is registered\ The values are: * `IBAN` – For accounts registered in countries that use IBAN  * `US` – For accounts registered in the United States  * `CA` – For accounts registered in Canada * `GB` – For accounts registered in the United Kingdom * `OTHER` – For accounts registered in countries that do not use IBAN (and are not US, CA, GB) The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). The date and time at which the object was created. Whether or not the Bank Account is active. Mangopay automatically sets this parameter to `false` if the bank account is closed or does not exist anymore. ```json 200 { "OwnerAddress": { "AddressLine1": "The Oasis", "AddressLine2": "Rue des plantes", "City": "Paris", "Region": "Ile de France", "PostalCode": "75009", "Country": "FR" }, "AccountNumber": "11696419", "ABA": "071000288", "DepositAccountType": "CHECKING", "UserId": "142036728", "OwnerName": "John Doe", "Type": "US", "Id": "150294885", "Tag": null, "CreationDate": 1661864955, "Active": true } ``` ```json REST { "OwnerAddress": { "AddressLine1": "The Oasis", "AddressLine2": "Rue des plantes", "City": "Paris", "Region": "Ile de France", "PostalCode": "75009", "Country": "FR" }, "AccountNumber": "11696419", "ABA": "071000288", "DepositAccountType": "CHECKING", "OwnerName": "John Doe", "Tag": "custom meta", } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $bankAccount = new \MangoPay\BankAccount(); $address = new \MangoPay\Address(); $address->AddressLine1 = 'Address line 1'; $address->AddressLine2 = 'Address line 2'; $address->City = 'Paris'; $address->Country = 'FR'; $address->PostalCode = '75000'; $address->Region = 'Region'; $details = new \MangoPay\BankAccountDetailsUS(); $details->AccountNumber = '11696419'; $details->ABA = '071000288'; $details->DepositAcountType = 'CHECKING'; $bankAccount->OwnerAddress = $address; $bankAccount->OwnerName = 'Alex Smith'; $bankAccount->Tag = 'Created using Mangopay PHP SDK'; $bankAccount->Type = 'IBAN'; $bankAccount->Details = $details; $response = $api->Users->CreateBankAccount($userId, $bankAccount); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '165863393', Address: { AddressLine1: 'Edgewood Road', AddressLine2: null, City: 'Little Rock', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, FirstName: 'John', LastName: 'Doe', } let bankAccount = { Type: 'US', OwnerName: user.FirstName + '' + user.LastName, OwnerAddress: user.Address, AccountNumber: '11696419', ABA: '071000288', DepositAccountType: 'CHECKING', Tag: 'Created using Mangopay NodeJS SDK', } const createBankAccount = async (userId, bankAccount) => { return await mangopay.Users.createBankAccount(userId, bankAccount) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createBankAccount(user.Id, bankAccount) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createUsBankAccount(userId, usBankAccountObject) begin response = MangoPay::BankAccount.create(userId, usBankAccountObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create bank account: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '165863393' } myUsBankAccount = { Type: 'US', OwnerName: 'Alex Smith', OwnerAddress: { AddressLine1: 'Edgewood Road', AddressLine2: 'Address line 2', City: 'Little Rock', Region: 'IDF', PostalCode: '75000', Country: 'FR' }, AccountNumber: '11696419', ABA: '071000288', DepositAccountType: 'CHECKING', Tag: 'Created using Mangopay Ruby SDK' } createUsBankAccount(myUser[:Id], myUsBankAccount) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.core.enumerations.BankAccountType; import com.mangopay.core.enumerations.CountryIso; import com.mangopay.core.enumerations.DepositAccountType; import com.mangopay.entities.BankAccount; import com.mangopay.entities.subentities.BankAccountDetailsUS; public class CreateUSBankAccount { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01J29D5XMKKNPX72AR5HRV804X"; BankAccountDetailsUS bankAccountDetails = new BankAccountDetailsUS(); bankAccountDetails.setAba("071000288"); bankAccountDetails.setAccountNumber("11696419"); bankAccountDetails.setDepositAccountType(DepositAccountType.CHECKING); Address address = new Address(); address.setAddressLine1("Rue des plantes"); address.setAddressLine2("The Oasis"); address.setCity("FR"); address.setRegion("Ile de France"); address.setPostalCode("75001"); address.setCountry(CountryIso.FR); BankAccount bankAccount = new BankAccount(); bankAccount.setOwnerName("John Doe"); bankAccount.setDetails(bankAccountDetails); bankAccount.setOwnerAddress(address); bankAccount.setType(BankAccountType.US); bankAccount.setTag("Created using the Mangopay Java SDK"); BankAccount createBankAccount = mangopay.getUserApi().createBankAccount(userId, bankAccount); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createBankAccount); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, BankAccount from mangopay.utils import Address natural_user = NaturalUser.get('213753890') us_bank_account = BankAccount( user_id = natural_user.id, owner_name = f'{natural_user.first_name} {natural_user.last_name}', owner_address = Address( address_line_1 = natural_user.address.address_line_1, address_line_2 = natural_user.address.address_line_2, city = natural_user.address.city, region = natural_user.address.region, postal_code = natural_user.address.postal_code, country = natural_user.address.country, ), account_number = '11696419', aba = '071000288', type = 'US', deposit_account_type = 'CHECKING', tag = 'Created using the Mangopay Python SDK', ) create_us_bank_account = us_bank_account.save() pprint(create_us_bank_account) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.GET; using MangoPay.SDK.Entities.POST; using MangoPay.SDK.Core.Enumerations; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var user = await api.Users.GetNaturalAsync("user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"); var accountNumber = "11696419"; var aba = "071000288"; var UsBankAccount = new BankAccountUsPostDTO( user.FirstName + " " + user.LastName, user.Address, accountNumber, aba ) { DepositAccountType = DepositAccountType.CHECKING, Tag = "Created using the Mangopay .NET SDK" }; BankAccountDTO createUsBankAccount = await api.Users.CreateBankAccountUsAsync(user.Id, UsBankAccount); string prettyPrint = JsonConvert.SerializeObject(createUsBankAccount, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Deactivate a Bank Account PUT /v2.01/{ClientId}/users/{UserId}/bankaccounts/{BankAccountId} ### Path parameters The unique identifier of the User (natural or legal) who owns the bank account. The unique identifier of the bank account. ### Body parameters Whether or not the Bank Account is active. Mangopay automatically sets this parameter to `false` if the bank account is closed or does not exist anymore. ### Responses Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Length: Up to 34 characters* The IBAN (international bank account number) of the bank account. It follows the CCDDBBAN format in which: * CC represents the country code (ISO 3166-1 alpha 2) * DD represents two check digits used by banking systems to avoid simple errors * BBAN stands for the Basic Bank Account Number which is up to 30 alphanumeric characters that are country-specific.\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. The BIC (international identifier of the bank) for IBAN or OTHER-type bank accounts.\ The BIC can have one of the two following formats: * BIC8 – 8-character BIC (AAAABBCC) * BIC11 – 11-character BIC (AAAABBCCDDD)\ In which: * AAAA represents the bank code: 4 characters defining the bank * BB represents the country code: 2 characters forming the country ISO code (ISO 3166 format) * CC represents the location code: 2 localization characters (alphabetical or numeric) to distinguish banks from the same country * DDD represents the branch code: 3 optional characters defining the branch as a branch of the bank\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. The unique identifier of the User (natural or legal) who owns the bank account. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account, indicating the country where the real-life account is registered\ The values are: * `IBAN` – For accounts registered in countries that use IBAN  * `US` – For accounts registered in the United States  * `CA` – For accounts registered in Canada * `GB` – For accounts registered in the United Kingdom * `OTHER` – For accounts registered in countries that do not use IBAN (and are not US, CA, GB) The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). The date and time at which the object was created. Whether or not the Bank Account is active. Mangopay automatically sets this parameter to `false` if the bank account is closed or does not exist anymore. ```json 200 - IBAN-type Bank Account example { "OwnerAddress":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75010", "Country":"FR" }, "IBAN":"FR7630004000031234567890143", "BIC":"CRLYFRPP", "UserId":"142036728", "OwnerName":"John Doe", "Type":"IBAN", "Id":"142036878", "Tag":"Custom meta", "CreationDate":1654073079, "Active":false } ``` ```json REST { "Active":false } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '165863393', } let bankAccount = { Id: '172327870', } const deactivateBankAccount = async (userId, bankAccountId) => { return await mangopay.Users.deactivateBankAccount(userId, bankAccountId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } deactivateBankAccount(user.Id, bankAccount.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def deactivateBankAccount(userId, bankAccountId, params) begin response = MangoPay::BankAccount.update(userId, bankAccountId, params) puts response return response rescue MangoPay::ResponseError => error puts "Failed to deactivate bank account: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '165863393' } myBankAccount = { Id: '194239783', } myParams = { Active: false, } deactivateBankAccount(myUser[:Id], myBankAccount[:Id], myParams) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.BankAccount; public class DeactivateBankAccount { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01J29D5XMKKNPX72AR5HRV804X"; var bankAccountId = "bankacc_m_01J29HTDKMX1P4Z8251CEV81K7"; BankAccount bankAccount = mangopay.getUserApi().getBankAccount(userId, bankAccountId); bankAccount.setActive(false); BankAccount deactivateBankAccount = mangopay.getUserApi().updateBankAccount(userId, bankAccount, bankAccountId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(deactivateBankAccount); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, BankAccount natural_user = NaturalUser.get('213753890') bank_account = BankAccount( user_id = natural_user.id, id = '214328750', active = False ) deactivate_bank_account = bank_account.save() pprint(deactivate_bank_account) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var bankAccountId = "bankacc_m_01J536KTRQFK9GBMNBNJXRCCRM"; var bankAccount = new DisactivateBankAccountPutDTO { Active = false }; var deactivateCard = await api.Users.UpdateBankAccountAsync(userId, bankAccount, bankAccountId); string prettyPrint = JsonConvert.SerializeObject(deactivateCard, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Bank Accounts for a User GET /v2.01/{ClientId}/users/{UserId}/bankaccounts **Note** The returned parameters may vary depending on the encountered bank account types. ### Query parameters *Start value: 1* **Default value:** 1 Indicates the index of the page for the pagination. *Max. value: 100* **Default value:** 10 Indicates the number of items returned for each page of the pagination. **Allowed values:** `CreationDate:ASC`, `CreationDate:DESC` Indicates the direction in which to sort the list. Whether or not the Bank Account is active. Mangopay automatically sets this parameter to `false` if the bank account is closed or does not exist anymore. ### Path parameters The unique identifier of the User (natural or legal) who owns the bank account. ### Responses The list of Bank Accounts objects created by the platform. Returned parameters can vary depending on the bank account `Type`. The Bank Account object created by the platform. Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Max. length: 255 characters* The owner of the banking alias. The `OwnerName` must match the name of the user owning the wallet (`FirstName` and `LastName` for a Natural User, `Name` for a Legal User). If Mangopay has provided your platform with a Technical Collection Virtual IBAN for reconciliation purposes, the `OwnerName` must be "Mangopay S.A." or "Mangopay S.A. - Your Trading Name". Please ensure your have confirmed this integration with our teams via the Dashboard. *Max. length: 255 characters* Custom data that you can add to this object. The IBAN (international bank account number) for the bank account. *Digits only* The unique set of digits of the bank account. The BIC (international identifier of the bank) for IBAN or OTHER-type bank accounts.\ The BIC can have one of the two following formats: * BIC8 – 8-character BIC (AAAABBCC) * BIC11 – 11-character BIC (AAAABBCCDDD)\ In which: * AAAA represents the bank code: 4 characters defining the bank * BB represents the country code: 2 characters forming the country ISO code (ISO 3166 format) * CC represents the location code: 2 localization characters (alphabetical or numeric) to distinguish banks from the same country * DDD represents the branch code: 3 optional characters defining the branch as a branch of the bank\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. *Length: 9 characters* The American Banking Association (ABA) routing number for US-type bank accounts. **Returned values:** `CHECKING`, `SAVINGS` The deposit type for US-type bank accounts. *Length: 3 digits* The 3-digit number assigned to Canadian financial institutions, for CA-type bank accounts. *Length: 5 digits* The 5-digit number assigned to branches of Canadian financial institutions, for CA-type bank accounts. *Max. length: 50 characters (letters and digits only)* The name of the Canadian bank for CA-type bank accounts. The 6-digit sort code, assigned to UK financial institutions, for GB-type bank accounts. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the bank account is domiciled. The unique identifier of the User (natural or legal) who owns the bank account. **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account, indicating the country where the real-life account is registered\ The values are: * `IBAN` – For accounts registered in countries that use IBAN  * `US` – For accounts registered in the United States  * `CA` – For accounts registered in Canada * `GB` – For accounts registered in the United Kingdom * `OTHER` – For accounts registered in countries that do not use IBAN (and are not US, CA, GB) The unique identifier of the object. The date and time at which the object was created. Whether or not the Bank Account is active. Mangopay automatically sets this parameter to `false` if the bank account is closed or does not exist anymore. ```json 200 [ { "OwnerAddress":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des plantes", "City":"Paris", "Region":"Ile de Frog", "PostalCode":"75010", "Country":"FR" }, "IBAN":"FR7630004000031234567890143", "BIC":"CRLYFRPP", "UserId":"142036728", "OwnerName":"John Doe", "Type":"IBAN", "Id":"142036878", "Tag":"Postman create a bank account", "CreationDate":1654073079, "Active":true }, { "OwnerAddress":{ "AddressLine1":"77 Street", "AddressLine2":"Rue des plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75009", "Country":"FR" }, "AccountNumber":"11696419", "ABA":"071000288", "DepositAccountType":"CHECKING", "UserId":"142036728", "OwnerName":"John Doe", "Type":"US", "Id":"150294885", "Tag":null, "CreationDate":1661864955, "Active":true } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $response = $api->Users->GetBankAccounts($userId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r$e); } } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '165863393', } const listUserBankAccounts = async (userId) => { return await mangopay.Users.getBankAccounts(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listUserBankAccounts(user.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listBankAccounts(userId) begin response = MangoPay::BankAccount.fetch(userId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch bank account: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '165863393' } listBankAccounts(myUser[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.BankAccount; import java.util.List; public class ListUserBankAccounts { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01J29D5XMKKNPX72AR5HRV804X"; List bankAccounts = mangopay.getUserApi().getBankAccounts(userId, null, null); for (BankAccount bankAccount : bankAccounts) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(bankAccount); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser natural_user = NaturalUser.get('213753890') bank_accounts = natural_user.bankaccounts.all() for bank_account in bank_accounts: pprint(vars(bank_account)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var bankAccounts = await api.Users.GetBankAccountsAsync(userId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(bankAccounts, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Bank Account GET /v2.01/{ClientId}/users/{UserId}/bankaccounts/{BankAccountId} ### Path parameters The unique identifier of the bank account. ### Responses Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Length: Up to 34 characters* The IBAN (international bank account number) of the bank account. It follows the CCDDBBAN format in which: * CC represents the country code (ISO 3166-1 alpha 2) * DD represents two check digits used by banking systems to avoid simple errors * BBAN stands for the Basic Bank Account Number which is up to 30 alphanumeric characters that are country-specific.\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. The BIC (international identifier of the bank) for IBAN or OTHER-type bank accounts.\ The BIC can have one of the two following formats: * BIC8 – 8-character BIC (AAAABBCC) * BIC11 – 11-character BIC (AAAABBCCDDD)\ In which: * AAAA represents the bank code: 4 characters defining the bank * BB represents the country code: 2 characters forming the country ISO code (ISO 3166 format) * CC represents the location code: 2 localization characters (alphabetical or numeric) to distinguish banks from the same country * DDD represents the branch code: 3 optional characters defining the branch as a branch of the bank\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. The unique identifier of the User (natural or legal) who owns the bank account. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account, indicating the country where the real-life account is registered\ The values are: * `IBAN` – For accounts registered in countries that use IBAN  * `US` – For accounts registered in the United States  * `CA` – For accounts registered in Canada * `GB` – For accounts registered in the United Kingdom * `OTHER` – For accounts registered in countries that do not use IBAN (and are not US, CA, GB) The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). The date and time at which the object was created. Whether or not the Bank Account is active. Mangopay automatically sets this parameter to `false` if the bank account is closed or does not exist anymore. Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Length: 8 digits* The unique set of digits of the bank account. The 6-digit sort code, assigned to UK financial institutions, for GB-type bank accounts. The unique identifier of the User (natural or legal) who owns the bank account. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account, indicating the country where the real-life account is registered\ The values are: * `IBAN` – For accounts registered in countries that use IBAN  * `US` – For accounts registered in the United States  * `CA` – For accounts registered in Canada * `GB` – For accounts registered in the United Kingdom * `OTHER` – For accounts registered in countries that do not use IBAN (and are not US, CA, GB) The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For bank accounts, you can use this parameter to identify the bank account by currency or usage (personal or professional for instance). The date and time at which the object was created. Whether or not the Bank Account is active. Mangopay automatically sets this parameter to `false` if the bank account is closed or does not exist anymore. ```json 200 - IBAN-type { "OwnerAddress":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75010", "Country":"FR" }, "IBAN":"FR7630004000031234567890143", "BIC":"CRLYFRPP", "UserId":"user_m_01J18HZSACR1EMYNY1TBS8KTJD", "OwnerName":"Alex Smith", "Type":"IBAN", "Id":"bankacc_m_01J6A30MFXK50P8C8PCB73PM1B", "Tag":"Created using Mangopay API Postman Collection", "CreationDate":1654073079, "Active":true } ``` ```json 200 - GB-type { "OwnerAddress": { "AddressLine1": "123 London Road", "AddressLine2": "Flat 6", "City": "London", "Region": "Greater London", "PostalCode": "SE1 7WP", "Country": "GB" }, "AccountNumber": "11696419", "SortCode": "010039", "UserId": "user_m_01J18HZSACR1EMYNY1TBS8KTJD", "OwnerName": "Alex Smith", "Type": "GB", "Id": "bankacc_m_01J6A30MFXK50P8C8PCB73PM1B", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1724768080, "Active": true } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $bankAccountId = '194612216'; $response = $api->Users->GetBankAccount($userId, $bankAccountId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '165863393', } let bankAccount = { Id: '172327870', } const getBankAccount = async (userId, bankAccountId) => { return await mangopay.Users.getBankAccount(userId, bankAccountId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getBankAccount(user.Id, bankAccount.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewBankAccount(userId, bankAccountId) begin response = MangoPay::BankAccount.fetch(userId, bankAccountId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch bank account: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '165863393' } myBankAccount = { Id: '194239783' } viewBankAccount(myUser[:Id], myBankAccount[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.BankAccount; public class DeactivateBankAccount { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01J29D5XMKKNPX72AR5HRV804X"; var bankAccountId = "bankacc_m_01J29HTDKMX1P4Z8251CEV81K7"; BankAccount bankAccount = mangopay.getUserApi().getBankAccount(userId, bankAccountId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(bankAccount); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import BankAccount bank_account_id = '214651521' natural_user_id = '213753890' try: view_bank_account_id = BankAccount.get(reference = bank_account_id, user_id = natural_user_id) pprint(vars(view_bank_account)) except BankAccount.DoesNotExist: print('The Bank Account {} does not exist.'.format(bank_account_id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var bankAccountId = "bankacc_m_01J536R3EM0A8CSPSVQHHDRG6E"; var viewBankAccount = await api.Users.GetBankAccountAsync(userId, bankAccountId); string prettyPrint = JsonConvert.SerializeObject(viewBankAccount, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Bank Wire PayIn object ### Description The Direct Bank Wire PayIn object represents a declaration of funds to be wired by the end user to the returned bank account. When the funds are received on the bank account and reconciled (i.e., matched) with the declaration, the status is updated to `SUCCEEDED` and the wallet is credited. The object expires 1 month after creation if no funds are received. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. \ For a direct bank wire pay-in, the `DebitedFunds` displays placeholder values (currency XXX and amount 0) until the `Status` changes to `SUCCEEDED`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet).\ For a direct bank wire pay-in, the `Fees` displays placeholder values (currency XXX and amount 0) until the `Status` changes to SUCCEEDED. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. Information about the declared funds to be wired by the end user to the returned bank account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees to be taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* The reference which the end user must provide when making the bank wire. The `WireReference` is used to reconcile the funds that arrive on the bank account with the `DeclaredDebitedFunds` in the Direct Bank Wire PayIn object. **Caution:** This reference is specific to each payment and must be retrieved dynamically. Information about the bank account to which the bank wire must be made by the end user. **Caution:** Do not hardcode the returned values. Mangopay may change the underlying bank details without prior notice. Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account. *Max. length: 255 characters* The full name of the owner of the bank account. The IBAN (international bank account number) for the bank account. The BIC (international identifier of the bank) for the bank account. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about bank wire pay-ins # Create a Bank Wire PayIn POST /v2.01/{ClientId}/payins/bankwire/direct/ This call declares the payment to be made by the end user and returns the `BankAccount` details and `WireReference` they must use. **Caution – Retrieve the returned bank details dynamically** In addition to the `WireReference`, ensure you implement the `BankAccount` object parameter dynamically so the `IBAN`, `BIC`, and other response values appear as returned in for each pay-in. Mangopay may change the underlying bank account without prior notice and mismatched data my lead to delays. See the bank wire pay-in guide for more details. ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the credited wallet. Information about the declared funds to be wired by the end user to the returned bank account. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees to be taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet).\ For a direct bank wire pay-in, the `Fees` displays placeholder values (currency XXX and amount 0) until the `Status` changes to SUCCEEDED. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. Information about the declared funds to be wired by the end user to the returned bank account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees to be taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* The reference which the end user must provide when making the bank wire. The `WireReference` is used to reconcile the funds that arrive on the bank account with the `DeclaredDebitedFunds` in the Direct Bank Wire PayIn object. **Caution:** This reference is specific to each payment and must be retrieved dynamically. Information about the bank account to which the bank wire must be made by the end user. **Caution:** Do not hardcode the returned values. Mangopay may change the underlying bank details without prior notice. Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account. *Max. length: 255 characters* The full name of the owner of the bank account. The IBAN (international bank account number) for the bank account. The BIC (international identifier of the bank) for the bank account. ```json 200 - Status is CREATED { "Id": "157579682", "Tag": null, "CreationDate": 1670249107, "ResultCode": null, "ResultMessage": null, "AuthorId": "156671912", "CreditedUserId": "156671912", "DebitedFunds": { "Currency": "XXX", "Amount": 0 }, "CreditedFunds": { "Currency": "XXX", "Amount": 0 }, "Fees": { "Currency": "XXX", "Amount": 0 }, "Status": "CREATED", "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "156683554", "DebitedWalletId": null, "PaymentType": "BANK_WIRE", "ExecutionType": "DIRECT", "DeclaredDebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "DeclaredFees": { "Currency": "EUR", "Amount": 0 }, "WireReference": "MGi3dy0q42", "BankAccount": { "OwnerAddress": { "AddressLine1": "2 Avenue Amélie", "AddressLine2": null, "City": "Luxembourg", "Region": null, "PostalCode": "L-1125", "Country": "LU" }, "Type": "IBAN", "OwnerName": "MANGOPAY SA", "IBAN": "FR7630056009271234567890182", "BIC": "CCFRFRPPXXX" } } ``` ```json REST { "Tag": "Custom meta", "AuthorId": "156671912", "CreditedUserId": "156671912", "CreditedWalletId": "156683554", "DeclaredDebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "DeclaredFees": { "Currency": "EUR", "Amount": 0 }, } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = 'user_m_01HQK25M6KVHKDV0S36JY9NRKR'; $walletId = 'wlt_m_01HQT6422EER2N7FPRXWTSDCSV'; $bankwirePayIn = new \MangoPay\PayIn(); $bankwirePayIn->AuthorId = $userId; $bankwirePayIn->CreditedWalletId = $walletId; $bankwirePayIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsBankWire(); $bankwirePayIn->PaymentDetails->DeclaredDebitedFunds = new \MangoPay\Money(); $bankwirePayIn->PaymentDetails->DeclaredDebitedFunds->Amount = 1000; $bankwirePayIn->PaymentDetails->DeclaredDebitedFunds->Currency = 'EUR'; $bankwirePayIn->PaymentDetails->DeclaredFees = new \MangoPay\Money(); $bankwirePayIn->PaymentDetails->DeclaredFees->Amount = 0; $bankwirePayIn->PaymentDetails->DeclaredFees->Currency = 'EUR'; $bankwirePayIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); $bankwirePayIn->ExecutionDetails->Culture = 'FR'; $response = $api->PayIns->Create($bankwirePayIn); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myDirectBankWirePayIn = { PaymentType: 'BANK_WIRE', ExecutionType: 'DIRECT', AuthorId: '146476890', Tag: 'Created with Mangopay Node.js SDK', CreditedUserId: '146476890', DeclaredDebitedFunds: { Currency: 'EUR', Amount: 1000, }, DeclaredFees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '148968396', } const createDirectBankWirePayIn = async (payin) => { return await mangopay.PayIns.create(payin) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createDirectBankWirePayIn(myDirectBankWirePayIn) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createDirectBankWirePayIn(payInObject) begin response = MangoPay::PayIn::BankWire::Direct.create(payInObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create pay-in: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { AuthorId: '146476890', Tag: 'Created with Mangopay Node.js SDK', CreditedUserId: '146476890', DeclaredDebitedFunds: { Currency: 'EUR', Amount: 1000, }, DeclaredFees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '148968396', } createDirectBankWirePayIn(myPayIn) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInExecutionDetailsDirect; import com.mangopay.entities.subentities.PayInPaymentDetailsBankWire; public class CreateDirectBankWirePayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR"; var walletId = "wlt_m_01HQT6422EER2N7FPRXWTSDCSV"; PayIn bankwirePayin = new PayIn(); PayInPaymentDetailsBankWire payinDetails = new PayInPaymentDetailsBankWire(); payinDetails.setDeclaredDebitedFunds(new Money(CurrencyIso.EUR, 1000)); payinDetails.setDeclaredFees(new Money(CurrencyIso.EUR, 1000)); bankwirePayin.setAuthorId(userId); bankwirePayin.setCreditedWalletId(walletId); bankwirePayin.setPaymentDetails(payinDetails); bankwirePayin.setExecutionDetails(new PayInExecutionDetailsDirect()); PayIn createPayIn = mangopay.getPayInApi().create(bankwirePayin); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPayIn); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Wallet, BankWirePayIn from mangopay.utils import Money natural_user = NaturalUser.get('213753890') user_wallet = Wallet.get('215029593') direct_bank_wire_payin = BankWirePayIn( author_id=natural_user, credited_wallet_id=user_wallet.id, declared_debited_funds=Money(amount=1000, currency='EUR'), declared_fees=Money(amount=50, currency='EUR') ) create_direct_bank_wire_payin = direct_bank_wire_payin.save() pprint(create_direct_bank_wire_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var payIn = new PayInBankWireDirectPostDTO( userId, walletId, new Money { Amount = 1000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR } ) { CreditedWalletId = walletId, AuthorId = userId, Tag = "Created using the Mangopay .NET SDK" }; PayInDTO createBankWirePayIn = await api.PayIns.CreateBankWireDirectAsync(payIn); string prettyPrint = JsonConvert.SerializeObject(createBankWirePayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a PayIn (Bank Wire) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet).\ For a direct bank wire pay-in, the `Fees` displays placeholder values (currency XXX and amount 0) until the `Status` changes to SUCCEEDED. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. Information about the declared funds to be wired by the end user to the returned bank account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees to be taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* The reference which the end user must provide when making the bank wire. The `WireReference` is used to reconcile the funds that arrive on the bank account with the `DeclaredDebitedFunds` in the Direct Bank Wire PayIn object. **Caution:** This reference is specific to each payment and must be retrieved dynamically. Information about the bank account to which the bank wire must be made by the end user. **Caution:** Do not hardcode the returned values. Mangopay may change the underlying bank details without prior notice. Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account. *Max. length: 255 characters* The full name of the owner of the bank account. The IBAN (international bank account number) for the bank account. The BIC (international identifier of the bank) for the bank account. ```json 200 - Status is SUCCEEDED { "Id":"157579682", "Tag":null, "CreationDate":1670249107, "ResultCode":"000000", "ResultMessage":"Success", "AuthorId":"156671912", "CreditedUserId":"156671912", "DebitedFunds":{ "Currency":"EUR", "Amount":1000 }, "CreditedFunds":{ "Currency":"EUR", "Amount":1000 }, "Fees":{ "Currency":"EUR", "Amount":0 }, "Status":"SUCCEEDED", "ExecutionDate":1670249208, "Type":"PAYIN", "Nature":"REGULAR", "CreditedWalletId":"156683554", "DebitedWalletId":null, "PaymentType":"BANK_WIRE", "ExecutionType":"DIRECT", "DeclaredDebitedFunds":{ "Currency":"EUR", "Amount":1000 }, "DeclaredFees":{ "Currency":"EUR", "Amount":0 }, "WireReference":"MGi3dy0q42", "BankAccount":{ "OwnerAddress":{ "AddressLine1":"2 Avenue Amélie", "AddressLine2":null, "City":"Luxembourg", "Region":null, "PostalCode":"L-1125", "Country":"LU" }, "Type":"IBAN", "OwnerName":"MANGOPAY SA", "IBAN":"FR7630056009271234567890182", "BIC":"CCFRFRPPXXX" } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetBankWireDirectAsync("payin_m_01J3CZ2Y7V37TRNMD55AAA2J2A"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Banking Alias object ### Description Mangopay relies on the Banking Alias object to create a virtual IBAN or account number attached to a wallet. Once attached, the IBAN can be used by end users to wire funds directly to the wallet. **Note – Regulated feature** The virtual IBAN feature is regulated and has the following constraints: * Activation is required, including in Sandbox (contact our teams via the Dashboard) * A contract amendment is needed to specify the BIC to use for your platform * Only one banking alias can be created per wallet * Fees cannot be taken on pay-ins to banking aliases ### Attributes *Max. length: 255 characters* The owner of the banking alias. The `OwnerName` must match the name of the user owning the wallet (`FirstName` and `LastName` for a Natural User, `Name` for a Legal User). If Mangopay has provided your platform with a Technical Collection Virtual IBAN for reconciliation purposes, the `OwnerName` must be "Mangopay S.A." or "Mangopay S.A. - Your Trading Name". Please ensure your have confirmed this integration with our teams via the Dashboard. The IBAN (international bank account number) of the banking alias. The BIC (international identifier of the bank) for the banking alias. The banking alias details in local format. This parameter is only returned for applicable countries (for example, GB). The sort code of the banking alias in local format. The account number of the banking alias in local format. The unique identifier of the user whose wallet is credited, in other words, the Owner of the wallet for which the alias is created.\ Note: Once the banking alias is created, it is not possible to change the `CreditedUserId`. **Allowed values:** DE, DK, ES, FR, GB, LU, PL The country of the banking alias. The country must correspond to the currency of the wallet. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. Whether or not the banking alias is active.\ Caution: Setting this value to `false` is irreversible. **Returned values:** `IBAN` The type of banking alias. The unique identifier of the object. The unique identifier of the wallet. ### Related resources Learn more about virtual IBAN Learn how to attach a virtual IBAN to a wallet # Create an IBAN Banking Alias POST /v2.01/{ClientId}/wallets/{WalletId}/bankingaliases/iban ### Path parameters The unique identifier of the wallet. ### Body parameters *Max. length: 255 characters* The owner of the banking alias. The `OwnerName` must match the name of the user owning the wallet (`FirstName` and `LastName` for a Natural User, `Name` for a Legal User). If Mangopay has provided your platform with a Technical Collection Virtual IBAN for reconciliation purposes, the `OwnerName` must be "Mangopay S.A." or "Mangopay S.A. - Your Trading Name". Please ensure your have confirmed this integration with our teams via the Dashboard. **Allowed values:** DE, DK, ES, FR, GB, LU, PL The country of the banking alias. The country must correspond to the currency of the wallet. *Max. length: 255 characters* Custom data that you can add to this object. ### Responses *Max. length: 255 characters* The owner of the banking alias. The `OwnerName` must match the name of the user owning the wallet (`FirstName` and `LastName` for a Natural User, `Name` for a Legal User). If Mangopay has provided your platform with a Technical Collection Virtual IBAN for reconciliation purposes, the `OwnerName` must be "Mangopay S.A." or "Mangopay S.A. - Your Trading Name". Please ensure your have confirmed this integration with our teams via the Dashboard. The IBAN (international bank account number) of the banking alias. The BIC (international identifier of the bank) for the banking alias. The unique identifier of the user whose wallet is credited, in other words, the Owner of the wallet for which the alias is created.\ Note: Once the banking alias is created, it is not possible to change the `CreditedUserId`. **Returned values:** DE, DK, ES, FR, GB, LU, PL The country of the banking alias. The country must correspond to the currency of the wallet. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. Whether or not the banking alias is active.\ Caution: Setting this value to `false` is irreversible. **Returned values:** `IBAN`, `GB` The type of banking alias. The `GB` value is only returned if the `Country` is `GB`. The unique identifier of the object. The unique identifier of the wallet. *Max. length: 255 characters* The owner of the banking alias. The `OwnerName` must match the name of the user owning the wallet (`FirstName` and `LastName` for a Natural User, `Name` for a Legal User). If Mangopay has provided your platform with a Technical Collection Virtual IBAN for reconciliation purposes, the `OwnerName` must be "Mangopay S.A." or "Mangopay S.A. - Your Trading Name". Please ensure your have confirmed this integration with our teams via the Dashboard. The IBAN (international bank account number) of the banking alias. The BIC (international identifier of the bank) for the banking alias. The banking alias details in local format. This parameter is only returned for applicable countries (for example, GB). The sort code of the banking alias in local format. The account number of the banking alias in local format. The unique identifier of the user whose wallet is credited, in other words, the Owner of the wallet for which the alias is created.\ Note: Once the banking alias is created, it is not possible to change the `CreditedUserId`. **Returned values:** DE, DK, ES, FR, GB, LU, PL The country of the banking alias. The country must correspond to the currency of the wallet. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. Whether or not the banking alias is active.\ Caution: Setting this value to `false` is irreversible. **Returned values:** `IBAN`, `GB` The type of banking alias. The `GB` value is only returned if the `Country` is `GB`. The unique identifier of the object. The unique identifier of the wallet. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "fd020620-8e5c-4b64-925c-aa980e42c237#1670340996", "Date": 1670340997.0, "errors": { "Country": "The requested country is not supported" } } ``` ```json { "Message": "There is already a wallet banking alias existing for this criteria", "Type": "wallet_banking_alias_already_exists", "Id": "7227ab60-2c18-42db-be46-e9169aaeb64a", "Date": 1689155544.0, "errors": null } ``` ```json { "Message": "Invalid country GB for EUR wallet. Possible value(s): LU/FR/ES/DE.", "Type": "country_not_associated_to_wallet_currency", "Id": "1eb1c947-bac2-4127-a636-fe7d811db9e7", "Date": 1725288513.0, "errors": null } ``` ```json { "Message": "This endpoint is not available for your account", "Type": "forbidden_ressource", "Id": "441d156a-ebd1-421e-851b-460a25c6a53f#1670262779", "Date": 1670262780.0, "errors": null } ``` ```json 200 - FR { "OwnerName": "Alex Smith", "IBAN": "FR7674521100005657670994474", "BIC": "MPAYFRP1PIN", "CreditedUserId": "user_m_01HSB23417BFG7YXR7E371JSEA", "Country": "FR", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1710846581, "Active": true, "Type": "IBAN", "Id": "wltbank_m_01HSB6E769Y3ZBYDJACSP3THGA", "WalletId": "wlt_m_01HSB6DE1YT1EMTH0K7ASYPG96" } ``` ```json 200 - GB { "OwnerName": "Alex Smith", "IBAN": "GB78SAPY60838221394585", "BIC": null, "LocalAccountDetails": { "SortCode": "608382", "AccountNumber": "21394585" }, "CreditedUserId": "user_m_01JADFDBCZS25REHAF6M0NJH5G", "Country": "GB", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1730883439, "Active": true, "Type": "GB", "Id": "wltbank_01JC0B2JH632KTAGSM0ZBJYG7Q", "WalletId": "wlt_m_01JC0B1VZA7YG1J4YC21E60PZM" } ``` ```json REST { "OwnerName": "Alex Smith", "Country": "FR", "Tag": "Created using Mangopay API Postman Collection" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $walletId = '194311530'; $bankingAlias = new \MangoPay\BankingAliasIBAN(); $bankingAlias->OwnerName = 'Alex Smith'; $bankingAlias->Tag = 'Updated using Mangopay PHP SDK'; $bankingAlias->Country ='FR'; $bankingAlias->WalletId = $walletId; $response = $api->BankingAliases->Create($bankingAlias); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myBankingAlias = { OwnerName: 'John', Tag: 'Created with Mangopay NodeJS SDK', Country: 'FR', Type: 'IBAN', WalletId: '172463559', } const createBankingAlias = async (bankingAlias) => { return await mangopay.BankingAliases.create(bankingAlias) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createBankingAlias(myBankingAlias) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createBankingAlias(bankingAliasObject, walletId) begin response = MangoPay::BankingAliasesIBAN.create(bankingAliasObject, walletId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create banking alias: #{error.message}" puts "Error details: #{error.details}" return false end end myBankingAlias = { OwnerName: 'John', Tag: 'Created with Mangopay NodeJS SDK', Country: 'FR', Type: 'IBAN', WalletId: '194311640' } myWallet = { Id: '194311640' } createBankingAlias(myBankingAlias, myWallet[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.CountryIso; import com.mangopay.entities.BankingAlias; import com.mangopay.entities.UserNatural; public class CreateIbanBankingAlias { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); UserNatural user = mangopay.getUserApi().getNatural("user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"); var walletId = "wlt_m_01J1YRFBF1EDX4TK2A5G0MNRSN"; BankingAlias bankingAlias = new BankingAlias(); bankingAlias.setOwnerName(String.format("%s %s", user.getFirstName(), user.getLastName())); bankingAlias.setCountry(CountryIso.FR); BankingAlias createBankingAlias = mangopay.getBankingAliases().create(walletId, bankingAlias); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createBankingAlias); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Wallet, BankingAliasIBAN natural_user = NaturalUser.get('213753890') user_wallet = Wallet.get('215029593') iban_alias = BankingAliasIBAN( owner_name = f'{natural_user.first_name} {natural_user.last_name}', credited_user = natural_user, wallet_id = user_wallet.id, tag = 'Create using the Mangopay Python SDK', country = 'FR' ) create_iban_alias = iban_alias.save() pprint(create_iban_alias) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; UserNaturalDTO user = await api.Users.GetNaturalAsync(userId); var walletId = "wlt_m_01J3D02K6ETV3BDP88C7PD2NDB"; var bankingAliasIban = new BankingAliasIbanPostDTO( user.FirstName + " " + user.LastName, CountryIso.FR ) { Tag = "Created using the Mangopay .NET SDK" }; var createBankingAlias = await api.BankingAlias.CreateIbanAsync(walletId, bankingAliasIban); string prettyPrint = JsonConvert.SerializeObject(createBankingAlias, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Deactivate a Banking Alias PUT /v2.01/{ClientId}/bankingaliases/{BankingAliasId} **Caution – Deactivating a Banking Alias is irreversible** Once the Banking Alias object is deactivated, you cannot reactivate it or attach another to the same wallet. Any funds wired to the banking alias won’t be credited to the corresponding wallet. If such cases arise, contact Mangopay via the Dashboard. ### Path parameters The unique identifier of the banking alias. ### Body parameters Whether or not the banking alias is active.\ Caution: Setting this value to `false` is irreversible. ### Responses *Max. length: 255 characters* The owner of the banking alias. The `OwnerName` must match the name of the user owning the wallet (`FirstName` and `LastName` for a Natural User, `Name` for a Legal User). If Mangopay has provided your platform with a Technical Collection Virtual IBAN for reconciliation purposes, the `OwnerName` must be "Mangopay S.A." or "Mangopay S.A. - Your Trading Name". Please ensure your have confirmed this integration with our teams via the Dashboard. The IBAN (international bank account number) of the banking alias. The BIC (international identifier of the bank) for the banking alias. The unique identifier of the user whose wallet is credited, in other words, the Owner of the wallet for which the alias is created.\ Note: Once the banking alias is created, it is not possible to change the `CreditedUserId`. **Returned values:** DE, DK, ES, FR, GB, LU, PL The country of the banking alias. The country must correspond to the currency of the wallet. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. Whether or not the banking alias is active.\ Caution: Setting this value to `false` is irreversible. **Returned values:** `IBAN`, `GB` The type of banking alias. The `GB` value is only returned if the `Country` is `GB`. The unique identifier of the object. The unique identifier of the wallet. ```json 200 { "OwnerName": "John Doe.", "IBAN": "FR617452110000GJX2HRBQPLS41", "BIC": "MPAYFRP1PIN", "CreditedUserId": "145397183", "Country": "FR", "Tag": "ibanized", "CreationDate": 1670342493, "Active": false, "Type": "IBAN", "Id": "157688274", "WalletId": "157688124" } ``` ```json REST { "Active": false, } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $bankingAliasId = '199314046'; $bankingAliasIBAN = $api->BankingAliases->Get($bankingAliasId); $bankingAliasIBAN->Active = false; $response = $api->BankingAliases->Update($bankingAliasIBAN); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myBankingAlias = { Id: '169741679', } const deactivateBankingAlias = async (bankingAliasId) => { return await mangopay.BankingAliases.deactivate(bankingAliasId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } deactivateBankingAlias(myBankingAlias.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def deactivateBankingAlias(bankingAliasId) begin response = MangoPay::BankingAliases.update(bankingAliasId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to deactivate banking alias: #{error.message}" puts "Error details: #{error.details}" return false end end myBankingAlias = { Id: '194349049', Active: false } deactivateBankingAlias(myBankingAlias[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.BankingAlias; public class DeactivateIbanBankingAlias { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); BankingAlias bankingAlias = mangopay.getBankingAliases().get("wltbank_m_01HTHTXVG59ATHA89ZHG2CKADA"); bankingAlias.Active = false; BankingAlias deactivateIbanBankingAlias = mangopay.getBankingAliases().deactivate(bankingAlias.getId(), bankingAlias); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(deactivateIbanBankingAlias); System.out.println(prettyJson); } } ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var bankingAliasId = "wltbank_m_01J3CZJSQW4V3BGHGTNM34EA1P"; var bankingAliasPut = new BankingAliasPutDTO { Active = false }; var deactivateBankingAlias = await api.BankingAlias.UpdateAsync(bankingAliasPut, bankingAliasId); string prettyPrint = JsonConvert.SerializeObject(deactivateBankingAlias, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The External Instruction Bank Wire PayIn object ### Description The External Instruction Bank Wire PayIn object represents a pay-in made to a Banking Alias directly from the end user bank. This pay-in is therefore not generated with the Mangopay API but created automatically upon receiving the funds. In Sandbox, you can use the "Create a banking alias payin" feature in the Dashboard Sandbox operations to create this object. **Note – `DebitedBankAccount` only available for EU IBAN** The `DebitedBankAccount` information may not be available for pay-ins made from non-EU IBANs. ### Attributes **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the user at the source of the transaction. The unique identifier of the credited wallet. Information about the debited bank account. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account. *Length: Up to 34 characters* The IBAN (international bank account number) of the bank account. It follows the CCDDBBAN format in which: * CC represents the country code (ISO 3166-1 alpha 2) * DD represents two check digits used by banking systems to avoid simple errors * BBAN stands for the Basic Bank Account Number which is up to 30 alphanumeric characters that are country-specific.\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. The BIC (international identifier of the bank) for IBAN or OTHER-type bank accounts.\ The BIC can have one of the two following formats: * BIC8 – 8-character BIC (AAAABBCC) * BIC11 – 11-character BIC (AAAABBCCDDD)\ In which: * AAAA represents the bank code: 4 characters defining the bank * BB represents the country code: 2 characters forming the country ISO code (ISO 3166 format) * CC represents the location code: 2 localization characters (alphabetical or numeric) to distinguish banks from the same country * DDD represents the branch code: 3 optional characters defining the branch as a branch of the bank\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. The unique identifier of the banking alias. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The date and time at which the object was created. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The reference of the wire made to a banking alias. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. # View a Banking Alias GET /v2.01/{ClientId}/bankingaliases/{BankingAliasId} ### Query parameters The unique identifier of the banking alias. ### Responses *Max. length: 255 characters* The owner of the banking alias. The `OwnerName` must match the name of the user owning the wallet (`FirstName` and `LastName` for a Natural User, `Name` for a Legal User). If Mangopay has provided your platform with a Technical Collection Virtual IBAN for reconciliation purposes, the `OwnerName` must be "Mangopay S.A." or "Mangopay S.A. - Your Trading Name". Please ensure your have confirmed this integration with our teams via the Dashboard. The IBAN (international bank account number) of the banking alias. The BIC (international identifier of the bank) for the banking alias. The unique identifier of the user whose wallet is credited, in other words, the Owner of the wallet for which the alias is created.\ Note: Once the banking alias is created, it is not possible to change the `CreditedUserId`. **Returned values:** DE, DK, ES, FR, GB, LU, PL The country of the banking alias. The country must correspond to the currency of the wallet. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. Whether or not the banking alias is active.\ Caution: Setting this value to `false` is irreversible. **Returned values:** `IBAN`, `GB` The type of banking alias. The `GB` value is only returned if the `Country` is `GB`. The unique identifier of the object. The unique identifier of the wallet. *Max. length: 255 characters* The owner of the banking alias. The `OwnerName` must match the name of the user owning the wallet (`FirstName` and `LastName` for a Natural User, `Name` for a Legal User). If Mangopay has provided your platform with a Technical Collection Virtual IBAN for reconciliation purposes, the `OwnerName` must be "Mangopay S.A." or "Mangopay S.A. - Your Trading Name". Please ensure your have confirmed this integration with our teams via the Dashboard. The IBAN (international bank account number) of the banking alias. The BIC (international identifier of the bank) for the banking alias. The banking alias details in local format. This parameter is only returned for applicable countries (for example, GB). The sort code of the banking alias in local format. The account number of the banking alias in local format. The unique identifier of the user whose wallet is credited, in other words, the Owner of the wallet for which the alias is created.\ Note: Once the banking alias is created, it is not possible to change the `CreditedUserId`. **Returned values:** DE, DK, ES, FR, GB, LU, PL The country of the banking alias. The country must correspond to the currency of the wallet. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. Whether or not the banking alias is active.\ Caution: Setting this value to `false` is irreversible. **Returned values:** `IBAN`, `GB` The type of banking alias. The `GB` value is only returned if the `Country` is `GB`. The unique identifier of the object. The unique identifier of the wallet. ```json 200 - FR { "OwnerName": "Alex Smith", "IBAN": "FR7674521100005657670994474", "BIC": "MPAYFRP1PIN", "CreditedUserId": "user_m_01HSB23417BFG7YXR7E371JSEA", "Country": "FR", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1710846581, "Active": true, "Type": "IBAN", "Id": "wltbank_m_01HSB6E769Y3ZBYDJACSP3THGA", "WalletId": "wlt_m_01HSB6DE1YT1EMTH0K7ASYPG96" } ``` ```json 200 - GB { "OwnerName": "Alex Smith", "IBAN": "GB78SAPY60838221394585", "BIC": null, "LocalAccountDetails": { "SortCode": "608382", "AccountNumber": "21394585" }, "CreditedUserId": "user_m_01JADFDBCZS25REHAF6M0NJH5G", "Country": "GB", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1730883439, "Active": true, "Type": "GB", "Id": "wltbank_01JC0B2JH632KTAGSM0ZBJYG7Q", "WalletId": "wlt_m_01JC0B1VZA7YG1J4YC21E60PZM" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $bankingAliasId = '157608228'; $response = $api->BankingAliases->Get($bankingAliasId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let bankingAlias = { Id: '172463615', } const getBankingAlias = async (bankingAliasId) => { return await mangopay.BankingAliases.get(bankingAliasId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getBankingAlias(bankingAlias.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewBankingAlias(bankingAliasId) begin response = MangoPay::BankingAliases.fetch(bankingAliasId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch banking alias: #{error.message}" puts "Error details: #{error.details}" return false end end myBankingAlias = { Id: '157608228' } viewBankingAlias(myBankingAlias[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.BankingAlias; public class ViewBankingAlias { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); BankingAlias bankingAlias = mangopay.getBankingAliases().get("wltbank_m_01HTHTXVG59ATHA89ZHG2CKADA"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(bankingAlias); System.out.println(prettyJson); } } ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var bankingAliasId = "wltbank_m_01J3CZJSQW4V3BGHGTNM34EA1P"; var viewBankingAlias = await api.BankingAlias.GetAsync(bankingAliasId); string prettyPrint = JsonConvert.SerializeObject(viewBankingAlias, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Banking Alias for a Wallet GET /v2.01/{ClientId}/wallets/{WalletId}/bankingaliases ### Path parameters The unique identifier of the wallet. ### Responses The list of banking aliases created by the platform. The Banking Alias object created by the platform. *Max. length: 255 characters* The owner of the banking alias. The `OwnerName` must match the name of the user owning the wallet (`FirstName` and `LastName` for a Natural User, `Name` for a Legal User). If Mangopay has provided your platform with a Technical Collection Virtual IBAN for reconciliation purposes, the `OwnerName` must be "Mangopay S.A." or "Mangopay S.A. - Your Trading Name". Please ensure your have confirmed this integration with our teams via the Dashboard. The IBAN (international bank account number) of the banking alias. The BIC (international identifier of the bank) for the banking alias. The banking alias details in local format. This parameter is only returned for applicable countries (for example, GB). The sort code of the banking alias in local format. The account number of the banking alias in local format. The unique identifier of the user whose wallet is credited, in other words, the Owner of the wallet for which the alias is created.\ Note: Once the banking alias is created, it is not possible to change the `CreditedUserId`. **Returned values:** DE, DK, ES, FR, GB, LU, PL The country of the banking alias. The country must correspond to the currency of the wallet. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. Whether or not the banking alias is active.\ Caution: Setting this value to `false` is irreversible. **Returned values:** `IBAN`, `GB` The type of banking alias. The `GB` value is only returned if the `Country` is `GB`. The unique identifier of the object. The unique identifier of the wallet. ```json 200 - FR [ { "OwnerName": "Alex Smith", "IBAN": "FR7674521100005657670994474", "BIC": "MPAYFRP1PIN", "CreditedUserId": "user_m_01HSB23417BFG7YXR7E371JSEA", "Country": "FR", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1710846581, "Active": true, "Type": "IBAN", "Id": "wltbank_m_01HSB6E769Y3ZBYDJACSP3THGA", "WalletId": "wlt_m_01HSB6DE1YT1EMTH0K7ASYPG96" } ] ``` ```json 200 - GB [ { "OwnerName": "Alex Smith", "IBAN": "GB78SAPY60838221394585", "BIC": null, "LocalAccountDetails": { "SortCode": "608382", "AccountNumber": "21394585" }, "CreditedUserId": "user_m_01JADFDBCZS25REHAF6M0NJH5G", "Country": "GB", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1730883439, "Active": true, "Type": "GB", "Id": "wltbank_01JC0B2JH632KTAGSM0ZBJYG7Q", "WalletId": "wlt_m_01JC0B1VZA7YG1J4YC21E60PZM" } ] ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myWallet = { Id: '169738660', } const getWalletBankingAlias = async (walletId) => { return await mangopay.BankingAliases.getAll(walletId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getWalletBankingAlias(myWallet.Id) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.BankingAlias; import com.mangopay.entities.Wallet; import java.util.List; public class ViewWalletBankingAlias { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Wallet wallet = mangopay.getWalletApi().get("wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"); List bankingAliases = mangopay.getBankingAliases().listForWallet(wallet.getId()); for (BankingAlias bankingAlias : bankingAliases) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(bankingAlias); System.out.println(prettyJson); } } } ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var walletId = "wlt_m_01J3D02K6ETV3BDP88C7PD2NDB"; var viewWalletBankingAlias = await api.BankingAlias.GetAllAsync(walletId, null, null); string prettyPrint = JsonConvert.SerializeObject(viewWalletBankingAlias, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a PayIn (Banking Alias) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the user at the source of the transaction. The unique identifier of the credited wallet. Information about the debited bank account. *Max. length: 255 characters* The full name of the owner of the bank account. (Format: FirstName LastName) **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account. *Length: Up to 34 characters* The IBAN (international bank account number) of the bank account. It follows the CCDDBBAN format in which: * CC represents the country code (ISO 3166-1 alpha 2) * DD represents two check digits used by banking systems to avoid simple errors * BBAN stands for the Basic Bank Account Number which is up to 30 alphanumeric characters that are country-specific.\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. The BIC (international identifier of the bank) for IBAN or OTHER-type bank accounts.\ The BIC can have one of the two following formats: * BIC8 – 8-character BIC (AAAABBCC) * BIC11 – 11-character BIC (AAAABBCCDDD)\ In which: * AAAA represents the bank code: 4 characters defining the bank * BB represents the country code: 2 characters forming the country ISO code (ISO 3166 format) * CC represents the location code: 2 localization characters (alphabetical or numeric) to distinguish banks from the same country * DDD represents the branch code: 3 optional characters defining the branch as a branch of the bank\ Note: You will need a valid IBAN (i.e., existing in real life) when testing on a Sandbox account even if no actual payout will be processed. The unique identifier of the banking alias. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The date and time at which the object was created. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The reference of the wire made to a banking alias. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. ```json 200 { "CreditedUserId": "user_m_01HSB23417BFG7YXR7E371JSEA", "AuthorId": "user_m_01HSB23417BFG7YXR7E371JSEA", "CreditedWalletId": "wlt_m_01HSB6DE1YT1EMTH0K7ASYPG96", "DebitedBankAccount": { "IBAN": "FR7630004000031234567890143", "BIC": "BNPAFRPP", "AccountNumber": null, "Country": null, "OwnerName": "Alex Smith", "Type": "IBAN" }, "BankingAliasId": "wltbank_m_01HSB6E769Y3ZBYDJACSP3THGA", "Type": "PAYIN", "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "Nature": "REGULAR", "CreationDate": 1710847216, "ExecutionDate": 1710847216, "WireReference": "Example123", "PaymentType": "BANK_WIRE", "ExecutionType": "EXTERNAL_INSTRUCTION", "DebitedWalletId": null, "Fees": { "Currency": "EUR", "Amount": 0 }, "DebitedFunds": { "Currency": "EUR", "Amount": 14654 }, "CreditedFunds": { "Currency": "EUR", "Amount": 14654 }, "Id": "payin_m_01HSB71JKJ9FVYZ61D97ZQ1ASR", "Tag": null } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetAsync("payin_m_01J334XF2V6751GRG9M2M558HG"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The BLIK PayIn object ### Description The BLIK PayIn object enables you to process BLIK payments. There are two BLIK pay-in options: * With code (also known as BLIK Classic): users generate a temporary 6-digit BLIK code from their banking app, enter it on your platform's website or app, and then confirm the payment in their banking app. * Without code (also known as BLIK OneClick): after generating the temporary 6-digit BLIK code and confirming the payment, the users can save your platform which allows future payments to be processed directly. For both options, the endpoint is the same but the parameters required are different in each case. **Note – Timeout after 55 seconds** The payment session lasts for 55 seconds, at which point the pay-in fails automatically if no action has been taken by the user. **Note – Minimum amount in Production** In Production, the minimum accepted amount for BLIK is 0.01 PLN (`1`). ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** `PLN` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** `PLN` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** `PLN` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. The 6-digit code from the user’s banking application. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `BLIK` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. ***Note:** This parameter is only returned if it is sent.* *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. ### Related resources Learn more about BLIK # Create a BLIK PayIn (with code) POST /v2.01/{ClientId}/payins/payment-methods/blik **Note – Timeout after 55 seconds** The payment session lasts for 55 seconds, at which point the pay-in fails automatically if no action has been taken by the user. **Note – Minimum amount in Production** In Production, the minimum accepted amount for BLIK is 0.01 PLN (`1`). ### Body parameters The unique identifier of the user at the source of the transaction. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the credited wallet. Information about the debited funds. **Allowed values:** `PLN` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** `PLN` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The 6-digit code from the user’s banking application. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. ***Note**: This parameter is only returned if it is sent.* Information about the browser used by the end user (author) to perform the payment. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** `PLN` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** `PLN` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** `PLN` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `BLIK` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. ***Note:** This parameter is only returned if it is sent.* The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The 6-digit code from the user’s banking application. Information about the browser used by the end user (author) to perform the payment. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. ```json 200 - Created { "Id": "wt_54874ce5-751d-4616-b7f0-7cee68aee39d", "Tag": "Created using Mangopay API Collection Postman", "CreationDate": 1718178213, "AuthorId": "user_m_01HWSRS7HK6S0XKKD4CJM3PQ04", "DebitedFunds": { "Currency": "PLN", "Amount": 100 }, "CreditedFunds": { "Currency": "PLN", "Amount": 100 }, "Fees": { "Currency": "PLN", "Amount": 0 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01HWSSQV8W6550FJ5NTJQE1DE1", "CreditedUserId": "user_m_01HWSRS7HK6S0XKKD4CJM3PQ04", "PaymentType": "BLIK", "ExecutionType": "WEB", "ReturnURL": "https://www.mangopay.com/docs/please-ignore?transactionId=wt_54874ce5-751d-4616-b7f0-7cee68aee39d", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=2263480064&rs=It3FPwW1ezPJlRIb84DFwDj2S7pk8n80&cs=2b704ceaa038b2519137369f883d4b560e63cf490adcc8e2426ae45524c965e9", "StatementDescriptor": "May2024", "Code": "777365", "BrowserInfo": null, "IpAddress": "159.180.248.187" } ``` ```json REST { "AuthorId": "user_m_01HWSRS7HK6S0XKKD4CJM3PQ04", "CreditedWalletId": "wlt_m_01HWSSQV8W6550FJ5NTJQE1DE1", "DebitedFunds": { "Currency": "PLN", "Amount": 100 }, "Fees": { "Currency": "PLN", "Amount": 0 }, "Code" : "777365", "IpAddress" : "159.180.248.187", "ReturnUrl": "https://www.mangopay.com/docs/please-ignore", "BrowserInfo": { "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "Tag": "Created using Mangopay API Collection Postman", "StatementDescriptor" : "May2024" } ``` # Create a BLIK PayIn (without code) POST /v2.01/{ClientId}/payins/payment-methods/blik ### Body parameters The unique identifier of the user at the source of the transaction. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the credited wallet. Information about the debited funds. **Allowed values:** `PLN` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** `PLN` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** `PLN` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** `PLN` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** `PLN` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `BLIK` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The 6-digit code from the user’s banking application. Information about the browser used by the end user (author) to perform the payment. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. ```json 200 - Created { "Id": "wt_dbb46bf7-71e1-463c-bbd5-8217f3c4b474", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1715610590, "AuthorId": "user_m_01HWSRS7HK6S0XKKD4CJM3PQ04", "DebitedFunds": { "Currency": "PLN", "Amount": 100 }, "CreditedFunds": { "Currency": "PLN", "Amount": 100 }, "Fees": { "Currency": "PLN", "Amount": 0 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01HWSSQV8W6550FJ5NTJQE1DE1", "CreditedUserId": "user_m_01HWSRS7HK6S0XKKD4CJM3PQ04", "PaymentType": "BLIK", "ExecutionType": "WEB", "ReturnURL": "https://www.mangopay.com/docs/please-ignore?transactionId=wt_dbb46bf7-71e1-463c-bbd5-8217f3c4b474", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=2246577013&rs=D4a2bjG5roOlXDEvsBOdb2NoCNtPxxKZ&cs=f3452531239c64143ec6a9ccd382553ec71a987cdcdc16a4f2046bc5e3b8d373", "StatementDescriptor": "May2024", "Code": null, "BrowserInfo": null, "IpAddress": null } ``` ```json REST { "AuthorId": "user_m_01HWSRS7HK6S0XKKD4CJM3PQ04", "CreditedWalletId": "wlt_m_01HWSSQV8W6550FJ5NTJQE1DE1", "DebitedFunds": { "Currency": "PLN", "Amount": 100 }, "Fees": { "Currency": "PLN", "Amount": 0 }, "ReturnUrl": "https://www.mangopay.com/docs/please-ignore", "Tag": "Created using the Mangopay API Postman collection", "StatementDescriptor": "May2024" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInExecutionDetailsWeb; import com.mangopay.entities.subentities.PayInPaymentDetailsBlik; public class CreateBLIKPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01J291BGPEPVHWA1BEQPV0SWP6"; PayIn blikPayin = new PayIn(); blikPayin.setAuthorId(userId); blikPayin.setCreditedWalletId(walletId); blikPayin.setDebitedFunds(new Money(CurrencyIso.PLN, 1000)); blikPayin.setFees(new Money(CurrencyIso.PLN, 0)); blikPayin.setTag("Created using the Mangopay Java SDK"); PayInExecutionDetailsWeb executionDetails = new PayInExecutionDetailsWeb(); executionDetails.setReturnUrl("https://www.mangopay.com/docs/please-ignore"); blikPayin.setExecutionDetails(executionDetails); PayInPaymentDetailsBlik paymentDetails = new PayInPaymentDetailsBlik(); paymentDetails.setStatementDescriptor("Jul2024"); blikPayin.setPaymentDetails(paymentDetails); blikPayin.setPaymentType(PayInPaymentType.BLIK); blikPayin.setExecutionType(PayInExecutionType.WEB); PayIn createBlikPayin = mangopay.getPayInApi().create(blikPayin); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createBlikPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, BlikPayIn from mangopay.utils import Money blik_payin = BlikPayIn( author_id = 'user_m_01HWSRS7HK6S0XKKD4CJM3PQ04', credited_wallet_id = 'wlt_m_01HWSSQV8W6550FJ5NTJQE1DE1', debited_funds = Money(amount=100, currency='PLN'), fees = Money(amount=0, currency='PLN'), return_url = 'https://www.mangopay.com/docs/please-ignore', tag = 'Created using Mangopay Python SDK', statement_descriptor = 'May2024' ) create_blik_payin = blik_payin.save() pprint(create_blik_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J2Y06CEN8J3K19KP0F7YJVNT"; var returnUrl = "https://www.mangopay.com/docs/please-ignore/"; var payIn = new PayInBlikWebPostDTO( userId, new Money { Amount = 2000, Currency = CurrencyIso.PLN }, new Money { Amount = 0, Currency = CurrencyIso.PLN }, walletId, returnUrl, "Created using the Mangopay .NET SDK", "MGP"); var createBlikPayIn = await api.PayIns.CreateBlikWebAsync(payIn); string prettyPrint = JsonConvert.SerializeObject(createBlikPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a PayIn (BLIK) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** `PLN` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** `PLN` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** `PLN` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `BLIK` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. ***Note:** This parameter is only returned if it is sent.* The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The 6-digit code from the user’s banking application. Information about the browser used by the end user (author) to perform the payment. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** `PLN` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** `PLN` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** `PLN` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `BLIK` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The 6-digit code from the user’s banking application. Information about the browser used by the end user (author) to perform the payment. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. ```json 200 - Succeeded (with code) { "Id": "wt_54874ce5-751d-4616-b7f0-7cee68aee39d", "Tag": "Created using Mangopay API Collection Postman", "CreationDate": 1718178213, "AuthorId": "user_m_01HWSRS7HK6S0XKKD4CJM3PQ04", "DebitedFunds": { "Currency": "PLN", "Amount": 100 }, "CreditedFunds": { "Currency": "PLN", "Amount": 100 }, "Fees": { "Currency": "PLN", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1718178312, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01HWSSQV8W6550FJ5NTJQE1DE1", "CreditedUserId": "user_m_01HWSRS7HK6S0XKKD4CJM3PQ04", "PaymentType": "BLIK", "ExecutionType": "WEB", "ReturnURL": "https://www.mangopay.com/docs/please-ignore?transactionId=wt_54874ce5-751d-4616-b7f0-7cee68aee39d", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=2263480064&rs=It3FPwW1ezPJlRIb84DFwDj2S7pk8n80&cs=2b704ceaa038b2519137369f883d4b560e63cf490adcc8e2426ae45524c965e9", "StatementDescriptor": "May2024", "Code": "777365", "BrowserInfo": null, "IpAddress": "159.180.248.187" } ``` ```json 200 - Succeeded (without code) { "Id": "wt_dbb46bf7-71e1-463c-bbd5-8217f3c4b474", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1715610590, "AuthorId": "user_m_01HWSRS7HK6S0XKKD4CJM3PQ04", "DebitedFunds": { "Currency": "PLN", "Amount": 100 }, "CreditedFunds": { "Currency": "PLN", "Amount": 100 }, "Fees": { "Currency": "PLN", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1715610597, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01HWSSQV8W6550FJ5NTJQE1DE1", "CreditedUserId": "user_m_01HWSRS7HK6S0XKKD4CJM3PQ04", "PaymentType": "BLIK", "ExecutionType": "WEB", "ReturnURL": "https://www.mangopay.com/docs/please-ignore?transactionId=wt_dbb46bf7-71e1-463c-bbd5-8217f3c4b474", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=2246577013&rs=D4a2bjG5roOlXDEvsBOdb2NoCNtPxxKZ&cs=f3452531239c64143ec6a9ccd382553ec71a987cdcdc16a4f2046bc5e3b8d373", "StatementDescriptor": "May2024", "Code": null, "BrowserInfo": null, "IpAddress": null } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetBlikAsync("wt_c5f8ce73-507f-44c8-92f3-f89a0f62ca5b"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Card Registration object Register card details to obtain a `CardId` token for one-time, recurring, or preauthorized card payments ### Description Mangopay relies on the Card Registration object to safely tokenize a card and create the [Card](/api-reference/cards/card-object) object. Successfully registering a card to create the Card object is a multiple-step process. It is necessary to process card payments (direct, preauthorized, and recurring card pay-ins) or validate the card. **Note – Card validation within 24 hours** A successful transaction (preauthorization, pay-in, or recurring) or card validation within 24 hours of the card registration is required to validate a card. Otherwise, the card becomes invalid and a new card registration will be necessary. **Warning – End user approval** Under no circumstances should card information be kept without the end user's approval. If you don’t have the end user’s approval, you need to deactivate the card. **Best practice – Use Checkout SDK** Simplify payments by card and other payment methods with the Mangopay [Checkout SDK](/sdks/checkout). ### Attributes The unique identifier of the Card Registration object. Custom data that can be added to this object.\ In the case of the Card Registration, this parameter can be used to facilitate the link between the User object and its equivalent on your platform for instance. This value will be inherited by the Card object `Tag` parameter and will not be editable. The date and time at which the object was created. The unique identifier of the user the card belongs to. The secure value to use when tokenizing the card via the dedicated endpoint. The secure value to identify the registration when tokenizing the card via the dedicated endpoint. The string returned by the tokenization server on the POST Tokenize the card endpoint. This string must be sent in full as the `RegistrationData` on the PUT Update a Card Registration endpoint to create the Card object. The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. The URL to make the card tokenization call. **Caution:** This variable URL is specific to each card registration. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the card. **Returned values:** `CREATED`, `VALIDATED`, `ERROR` The status of the card registration: * `CREATED` – The card registration has been created, but no `RegistrationData` has been entered yet and the `CardId` value is `null`. * `VALIDATED` – The card registration has been successfully updated with the `RegistrationData` from the tokenization server. * `ERROR` – The card registration couldn’t be updated with the `RegistrationData` and no `CardId` was generated. For more information, refer to the `ResultCode` (105206, 105299) and `ResultMessage`. ### Related resources Learn how to process a card payment Learn about card registration and processing Learn more about testing all payment methods Simplify card registration with Checkout SDK for web and mobile # Create a Card Registration POST /v2.01/{ClientId}/cardregistrations [Read more about the Card Registration object →](/api-reference/card-registrations/card-registration-object) ### Body parameters Custom data that can be added to this object.\ In the case of the Card Registration, this parameter can be used to facilitate the link between the User object and its equivalent on your platform for instance. This value will be inherited by the Card object `Tag` parameter and will not be editable. The unique identifier of the user the card belongs to. **Allowed values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the card. ### Responses The unique identifier of the Card Registration object. Custom data that can be added to this object.\ In the case of the Card Registration, this parameter can be used to facilitate the link between the User object and its equivalent on your platform for instance. This value will be inherited by the Card object `Tag` parameter and will not be editable. The date and time at which the object was created. The secure value to use when tokenizing the card via the dedicated endpoint. The secure value to identify the registration when tokenizing the card via the dedicated endpoint. The string returned by the tokenization server, which must be sent in full as the `RegistrationData` on the PUT Update a Card Registration endpoint to create the Card object. The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. The URL to make the card tokenization call. **Caution:** This variable URL is specific to each card registration. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the card. **Returned values:** `CREATED`, `VALIDATED`, `ERROR` The status of the card registration: * `CREATED` – The card registration has been created, but no `RegistrationData` has been entered yet and the `CardId` value is `null`. * `VALIDATED` – The card registration has been successfully updated with the `RegistrationData` from the tokenization server. * `ERROR` – The card registration couldn’t be updated with the `RegistrationData` and no `CardId` was generated. For more information, refer to the `ResultCode` (105206, 105299) and `ResultMessage`. ```json 200 { "Id": "cardreg_wt_11ed4694-d244-4bd1-92fb-dc473c99a9d4", "Tag": null, "CreationDate": 1726239226, "UserId": "user_m_01J7KACBPAV7XAF8AH9BDCJPRS", "AccessKey": "ehvrHoPE6FpjCCAgmNvg", "PreregistrationData": "lhOJ6CFiDJPCXViyHjfcayh92nouB3AAaB5yqiLCBT6yjkLPCptmxsUdfffAc6EE4uj9AuSfmwbdfKN3BMechzUU3Gz8ectEx70TDeupudr", "RegistrationData": null, "CardId": null, "CardType": "CB_VISA_MASTERCARD", "CardRegistrationURL": "https://pci.sandbox.mangopay.com/api/mangopay/vault/tokenize/eyJjbGllbnQiOiJhbnRob255aF90ZXN0MSIsInRva2VuIjoiUlBQTVdJR1hrd0ZJSGFacyJ9", "ResultCode": null, "ResultMessage": null, "Currency": "EUR", "Status": "CREATED" } ``` ```json REST { "Tag": null, "UserId": "user_m_01J7KACBPAV7XAF8AH9BDCJPRS", "CardType": "CB_VISA_MASTERCARD", "Currency": "EUR" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $cardRegistration = new \MangoPay\CardRegistration(); $cardRegistration->UserId = '195627761'; $cardRegistration->CardType = 'CB_VISA_MASTERCARD'; $cardRegistration->Currency = 'EUR'; $cardRegistration->Tag = 'Created using Mangopay PHP SDK'; $response = $api->CardRegistrations->Create($cardRegistration); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key", }) let user = { Id: 'user_m_01HQK25M6KVHKDV0S36JY9NRKR', } let userCardRegistration = { UserId: user.Id, Currency: 'EUR', CardType: 'CB_VISA_MASTERCARD' } const createCardRegistration = async(cardRegistration) => { return await mangopay.CardRegistrations.create(cardRegistration) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createCardRegistration(userCardRegistration) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createCardRegistration(params) begin response = MangoPay::CardRegistration.create(params) puts response return response rescue MangoPay::ResponseError => error puts "Failed : #{error.message}" puts "Error details: #{error.details}" return false end end params = { "UserId": "user_m_01J2BGH2PGWC4NNWGADT75ATB6", "CardType": "CB_VISA_MASTERCARD", "Currency": "EUR" } createCardRegistration(params) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.CardType; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.CardRegistration; public class CreateCardRegistration { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; CardRegistration cardReg = new CardRegistration(); cardReg.setUserId(userId); cardReg.setCardType(CardType.CB_VISA_MASTERCARD); cardReg.setCurrency(CurrencyIso.EUR); cardReg.setTag("Created using the Mangopay Java SDK"); CardRegistration createCardRegistration = mangopay.getCardRegistrationApi().create(cardReg); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createCardRegistration); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, CardRegistration natural_user = NaturalUser.get('213600749') card_registration = CardRegistration( user_id = natural_user.id, currency = 'GBP', card_type = 'CB_VISA_MASTERCARD' ) create_card_registration = card_registration.save() pprint(create_card_registration) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var cardRegistration = new CardRegistrationPostDTO( userId, CurrencyIso.EUR, CardType.CB_VISA_MASTERCARD ); var createCardRegistration = await api.CardRegistrations.CreateAsync(cardRegistration); string prettyPrint = JsonConvert.SerializeObject(createCardRegistration, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Tokenize the card POST {CardRegistrationURL} This call sends the necessary information to a PCI-DSS-compliant tokenization server without reaching Mangopay’s servers. The URL to use for this endpoint is returned in the `CardRegistrationURL` parameter on the POST Create a Card Registration call. The request must be made using the “application/x-www-form-urlencoded" content type. **Note – Do not hardcode the URL** The `CardRegistrationURL` is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. **Caution – Card details must never pass via your server** For security reasons, it is strictly forbidden to send the card details to your own server. You must rely on the dedicated PCI-DSS-compliant tokenization server by using the endpoint provided. ### Body parameters The value of the `AccessKey` attribute returned when creating a Card Registration. The value of the `PreregistrationData` attribute returned when creating a Card Registration. The number of the card to be tokenized. *Format: “MMYY”* The expiration date of the card. The card verification code (CVC) of the card (on the back, usually 3 digits). ### Responses The string returned by the tokenization server. This string must be sent in full as the `RegistrationData` on the PUT Update a Card Registration endpoint to create the Card object. ```json 200 data=acIcnwwLleiAvlZUea5VxYT1eCIn3MER8jyZXr-p8Bzb4Rm8GIA0MQtPs2NL7zPzPO_I7EjQm-m92V909JUL6KT-PmPzJfAQZV_8PIz6wKvjorGNaNd8Mg1rqN6eBpS5Nx0xgKTVnyDj15oG8jR875 ``` {/* python used as language only for highlighting (closest fit, seems cURL isn't supported) */} ```python cURL curl --request POST \ --url https://api.sandbox.mangopay.com/{CardRegistrationURL} \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data '{ "accessKeyRef": "ehvrHoPE6FpjCCAgmNvg", "data": "lhOJ6CFiDJPCXViyHjfcayh92nouB3AAaB5yqiLCBT6yjkLPCptmxsUdfffAc6EE4uj9AuSfmwbdfKN3BMechzUU3Gz8ectEx70TDeupudr", "cardNumber": "4970105181818183", "cardExpirationDate": "1229", "cardCvx": "123" }' ``` # Update a Card Registration PUT /v2.01/{ClientId}/cardregistrations/{CardRegistrationId} This call is used to add the string acquired from the tokenization to the Card Registration object in the parameter `RegistrationData`, thereby validating the registration. As a result, the Card object is created and the corresponding `CardId` returned. Platforms should also send the cardholder’s name as it appears on the payment card. The `CardHolderName` parameter is sent on this call but not returned in the response; it is added to the Card object. ### Path parameters The unique identifier of the Card Registration object. ### Body parameters The string returned by the tokenization server on the POST Tokenize the card endpoint. *Min. length: 2 characters; max. length: 45 characters passed to card network, 255 accepted by the API* The cardholder's name shown on the payment card. This value is passed to the card network for use in transaction risk analysis. The value should only contain unmarked alphabetic characters (A-Z, a-z), hyphens (-), apostrophes (‘), and spaces. Letters with diacritics (e.g. É, Ü, ẞ), honorifics (e.g. MRS.) and other special characters are not recommended. The `CardHolderName` is not returned in the Card Registration object; it is added to the Card object. ### Responses The unique identifier of the Card Registration object. Custom data that can be added to this object.\ In the case of the Card Registration, this parameter can be used to facilitate the link between the User object and its equivalent on your platform for instance. This value will be inherited by the Card object `Tag` parameter and will not be editable. The date and time at which the object was created. The unique identifier of the user the card belongs to. The secure value to use when tokenizing the card via the dedicated endpoint. The secure value to identify the registration when tokenizing the card via the dedicated endpoint. The string returned by the tokenization server, which must be sent in full as the `RegistrationData` on the PUT Update a Card Registration endpoint to create the Card object. The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. The URL to make the card tokenization call. **Caution:** This variable URL is specific to each card registration. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the card. **Returned values:** `CREATED`, `VALIDATED`, `ERROR` The status of the card registration: * `CREATED` – The card registration has been created, but no `RegistrationData` has been entered yet and the `CardId` value is `null`. * `VALIDATED` – The card registration has been successfully updated with the `RegistrationData` from the tokenization server. * `ERROR` – The card registration couldn’t be updated with the `RegistrationData` and no `CardId` was generated. For more information, refer to the `ResultCode` (105206, 105299) and `ResultMessage`. The unique identifier of the Card Registration object. Custom data that can be added to this object.\ In the case of the Card Registration, this parameter can be used to facilitate the link between the User object and its equivalent on your platform for instance. This value will be inherited by the Card object `Tag` parameter and will not be editable. The date and time at which the object was created. The unique identifier of the user the card belongs to. The secure value to use when tokenizing the card via the dedicated endpoint. The secure value to identify the registration when tokenizing the card via the dedicated endpoint. The string returned by the tokenization server, which must be sent in full as the `RegistrationData` on the PUT Update a Card Registration endpoint to create the Card object. The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. The URL to make the card tokenization call. **Caution:** This variable URL is specific to each card registration. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the card. **Returned values:** `CREATED`, `VALIDATED`, `ERROR` The status of the card registration: * `CREATED` – The card registration has been created, but no `RegistrationData` has been entered yet and the `CardId` value is `null`. * `VALIDATED` – The card registration has been successfully updated with the `RegistrationData` from the tokenization server. * `ERROR` – The card registration couldn’t be updated with the `RegistrationData` and no `CardId` was generated. For more information, refer to the `ResultCode` (105206, 105299) and `ResultMessage`. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "a241d282-377f-4415-ab81-5dc11c63f972", "Date": 1723543647.0, "errors": { "CardHolderName": "The field CardHolderName must be between 2 and 255 characters long." } } ``` ```json 200 - Status "VALIDATED" { "Id": "cardreg_wt_11ed4694-d244-4bd1-92fb-dc473c99a9d4", "Tag": null, "CreationDate": 1726239226, "UserId": "user_m_01J7KACBPAV7XAF8AH9BDCJPRS", "AccessKey": "ehvrHoPE6FpjCCAgmNvg", "PreregistrationData": "lhOJ6CFiDJPCXViyHjfcayh92nouB3AAaB5yqiLCBT6yjkLPCptmxsUdfffAc6EE4uj9AuSfmwbdfKN3BMechzUU3Gz8ectEx70TDeupudr", "RegistrationData": "data=acIcnwwLleiAvlZUea5VxYT1eCIn3MER8jyZXr-p8Bzb4Rm8GIA0MQtPs2NL7zPzPO_I7EjQm-m92V909JUL6KT-PmPzJfAQZV_8PIz6wKvjorGNaNd8Mg1rqN6eBpS5Nx0xgKTVnyDj15oG8jR875", "CardId": "card_m_NioQspdYckEoRlzd", "CardType": "CB_VISA_MASTERCARD", "CardRegistrationURL": "https://pci.sandbox.mangopay.com/api/mangopay/vault/tokenize/eyJjbGllbnQiOiJhbnRob255aF90ZXN0MSIsInRva2VuIjoiUlBQTVdJR1hrd0ZJSGFacyJ9", "ResultCode": "000000", "ResultMessage": "Success", "Currency": "EUR", "Status": "VALIDATED" } ``` ```json 200 - Status "ERROR" { "Id": "cardreg_wt_80b891e6-15f2-4f41-92f6-6e1a4bd85f2c", "Tag": null, "CreationDate": 1726239743, "UserId": "user_m_01J7KACBPAV7XAF8AH9BDCJPRS", "AccessKey": "1X0m87dmM2LiwFgxPLBJ", "PreregistrationData": "YkgVxL1yNY4ZOfKtqEew_e0SsxIfYZWISRpVi5B_jKboe08cd0V_NE-iZ891ehPx2ddFLVXdicolcUIkv_kKEA", "RegistrationData": "data=R7hxMYui4h4rBkaNwbiH1PcCheeXpguO2974jNGgynAVfsmychzXX2Wj-MoseJpnl8C1taMnTBqWmjbSWmgMQNE2bMetrwzREAFpp6SMaYi3vFHtOVUf5ZCUjtEbhayaNx0xgKTVnyDj15oG8jR88g", "CardId": null, "CardType": "CB_VISA_MASTERCARD", "CardRegistrationURL": "https://pci.sandbox.mangopay.com/api/mangopay/vault/tokenize/eyJjbGllbnQiOiJjbGllbnRJZCIsInRva2VuIjoidW5xaXVlVG9rZW4ifQ==", "ResultCode": "105299", "ResultMessage": "Token input Error", "Currency": "EUR", "Status": "ERROR" } ``` ```json REST { "RegistrationData": "data=acIcnwwLleiAvlZUea5VxZlDBkf07H6B9-N7SrRv5Vv7oSLc1hhCdoFX4JxfZL2iUkLIQL3o9ehAOeaXCbc1KFWnr4ySDvkZ--mJxxdF-vw-gzLNe3lvG2loJvmwrDyRNx0xgKTVnyDj15oG8jR88g", "CardHolderName": "Alex Smith" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $cardRegistration = new \MangoPay\CardRegistration(); $cardRegistration->Id = '198660792'; $cardRegistration->RegistrationData = 'data=EwQibNkLWbGepaBektTHQcnk7KxDDpQybRm3BWmKLu4DKdgmC-JI0b4bK9UW5C3u1L4A4AkhT3LJqC3_FAvbwYQXIPvj1ElxL2OIJfvlS3YXlJyOctdX1PGkkgCkgl3j0ftIYwFxOdfmDQ5GtM_cIg'; $response = $api->CardRegistrations->Update($cardRegistration); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key", }) let user = { Id: 'user_m_01HQK25M6KVHKDV0S36JY9NRKR', } let userCardRegistration = { Id: 'cardreg_m_01HRETW28RKJFC8RB9H625RVBD', UserId: user.Id, Currency: 'EUR', CardType: 'CB_VISA_MASTERCARD', RegistrationData: 'data=acIcnwwLleiAvlZUea5VxT5mw_fK696E0m-dvIdK-KnTCrftajOU7W3fTvYLnKiF68q7RUkmAEL86Wi8c0oX7wHD6vfA3lowMRD7SvlcCCl6Xl3Esy_DIyBzznraJzm70ftIYwFxOdfmDQ5GtM_cIg' } const updateCardRegistration = async(cardRegistration) => { return await mangopay.CardRegistrations.update(cardRegistration) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } updateCardRegistration(userCardRegistration) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def updateCardRegistration(card_registration_id, params) begin response = MangoPay::CardRegistration.update(card_registration_id, params) puts response return response rescue MangoPay::ResponseError => error puts "Failed : #{error.message}" puts "Error details: #{error.details}" return false end end params = { "RegistrationData": "data=acIcnwwLleiAvlZUea5VxW4I8X8iCT0M1Z4j5kgkKf4KQzh0G0UQLpozaVZwyqUOQJM3kYVZIDlCIp6vDysQ6F0qIb1486gpwf_EGW9fTllJlstGZZo5YuZ8RWz_814ONx0xgKTVnyDj15oG8jR88g", "CardHolderName": "ALEX SMITH" } updateCardRegistration("cardreg_m_01J2C8JM4YHV1Z57RKRBK97B0Y", params) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.CardRegistration; public class UpdateCardRegistration { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); CardRegistration cardReg = mangopay.getCardRegistrationApi().get("cardreg_m_01HXY9VZN4J1TERYG1BNPDHENN"); cardReg.setRegistrationData("data=acIcnwwLleiAvlZUea5VxfRSGv9nDzXcMqBpL3byXCz_GKPvDDem-KDL6Tf_yaRZBYWP-ghC9O56GivqHUjmwR4Dq2M_FO0KhF_NWnd-fb5L_0I49NvwmWI1uPP5WuzcNx0xgKTVnyDj15oG8jR88g"); CardRegistration updateCardRegistration = mangopay.getCardRegistrationApi().update(cardReg); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(updateCardRegistration); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import CardRegistration user_card_registration = CardRegistration( id = '213600973', registration_data = 'data=R7hxMYui4h4rBkaNwbiH1DvQL35Y-goFSYQI384_jNsDngV32O95BVgk3Pg7vqU_mZIFFs4gFl24VlSBXNiuoi4Be_uieN3jEegz77g8ElaToz_b7S91YuROvHH0w6J40ftIYwFxOdfmDQ5GtM_cIg' ) update_card_registration = user_card_registration.save() pprint(update_card_registration) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var cardRegistrationId = "cardreg_m_01J2Y3ZTFTZSKB5XWAKCNMPWFC"; var registrationData = "data=qc_ShKapgXF-A2t_OC72Ktbe2pgMGnalwOa7YhCbIDdpW0cgKABxbhU6R6yVTVJKZpvPpkvQy0HS6G3zrpUyXboAD2d1WLU2-FKrT2dHpcH9c8YxZgpdCs4Z6c6u-qDT0ftIYwFxOdfmDQ5GtM_cIg"; var cardRegistration = new CardRegistrationPutDTO { RegistrationData = registrationData, Tag = "Updated using the Mangopay .NET SDK" }; var updateCardRegistration = await api.CardRegistrations.UpdateAsync(cardRegistration, cardRegistrationId); string prettyPrint = JsonConvert.SerializeObject(updateCardRegistration, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Card Registration GET /v2.01/{ClientId}/cardregistrations/{CardRegistrationId} ### Path parameters The unique identifier of the Card Registration object. ### Responses The unique identifier of the Card Registration object. Custom data that can be added to this object.\ In the case of the Card Registration, this parameter can be used to facilitate the link between the User object and its equivalent on your platform for instance. This value will be inherited by the Card object `Tag` parameter and will not be editable. The date and time at which the object was created. The unique identifier of the user the card belongs to. The secure value to use when tokenizing the card via the dedicated endpoint. The secure value to identify the registration when tokenizing the card via the dedicated endpoint. The string returned by the tokenization server, which must be sent in full as the `RegistrationData` on the PUT Update a Card Registration endpoint to create the Card object. The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. The URL to make the card tokenization call. **Caution:** This variable URL is specific to each card registration. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the card. **Returned values:** `CREATED`, `VALIDATED`, `ERROR` The status of the card registration: * `CREATED` – The card registration has been created, but no `RegistrationData` has been entered yet and the `CardId` value is `null`. * `VALIDATED` – The card registration has been successfully updated with the `RegistrationData` from the tokenization server. * `ERROR` – The card registration couldn’t be updated with the `RegistrationData` and no `CardId` was generated. For more information, refer to the `ResultCode` (105206, 105299) and `ResultMessage`. ```json 200 { "Id": "cardreg_wt_80b891e6-15f2-4f41-92f6-6e1a4bd85f2c", "Tag": null, "CreationDate": 1726239743, "UserId": "user_m_01J7KACBPAV7XAF8AH9BDCJPRS", "AccessKey": "0dEUcnUbQTdNXi3WF4WM", "PreregistrationData": "lW7pQ21Gv8eJh5u4qWUKd8PUVwdHTGBDaBGXeVcQdSjIGJ7HqsEgrWMKFcQlGUPrn6X2n88FG9yZmJa932yIDyK6lpGoNUYyrgeQDsluRU9", "RegistrationData": "data=qc_ShKapgXF-A2t_OC72KsUngOEnxFTIhI4U9nqKay8J_UGfLFelDx_8GUFWt5zp8HH5DRSTnhLZ_RIB_OJ35ZsP3bOVmF1YdoePYUxf8CWOxMdP0Uc0Rm6ABJRWHIWYn7Rs6J2udgLD-WrTkZpRtw", "CardId": "card_m_GhrYYFpBoNeXXRFx", "CardType": "CB_VISA_MASTERCARD", "CardRegistrationURL": "https://pci.sandbox.mangopay.com/api/mangopay/vault/tokenize/eyJjbGllbnQiOiJhbnRob255aF90ZXN0MSIsInRva2VuIjoiRU50VVhTc2RhSUpBVUJ6VCJ9", "ResultCode": "000000", "ResultMessage": "Success", "Currency": "EUR", "Status": "VALIDATED" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $cardRegistrationId = '192900791'; $response = $api->CardRegistrations->Get($cardRegistrationId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key", }) let userCardRegistration = { Id: 'cardreg_m_01HRETW28RKJFC8RB9H625RVBD', } const viewCardRegistration = async (cardRegistrationId) => { return await mangopay.CardRegistrations.get(cardRegistrationId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewCardRegistration(userCardRegistration.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewCardRegistration(cardRegistrationId) begin response = MangoPay::CardRegistration.fetch(cardRegistrationId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Card Registration: #{error.message}" puts "Error details: #{error.details}" return false end end myCardRegistration = { Id: '195067583' } viewCardRegistration(myCardRegistration[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.CardRegistration; public class ViewCardRegistration { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String cardRegId = "cardreg_m_01HXY9VZN4J1TERYG1BNPDHENN"; CardRegistration viewCardRegistration = mangopay.getCardRegistrationApi().get(cardRegId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewCardRegistration); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import CardRegistration card_registration = CardRegistration( id = '213600973' ) try: view_card_registration = CardRegistration.get(card_registration.id) pprint(vars(view_card_registration)) except CardRegistration.DoesNotExist: print('Card registration {} does not exist.'.format(view_card_registration.id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var cardRegistrationId = "cardreg_m_01J2Y3ZTFTZSKB5XWAKCNMPWFC"; var viewCardRegistration = await api.CardRegistrations.GetAsync(cardRegistrationId); string prettyPrint = JsonConvert.SerializeObject(viewCardRegistration, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Card Validation object ### Description The Card Validation object allows you to validate an user’s card using 3DS authentication without processing a payment. A Card object's `Validity` is automatically set to `INVALID` after 24 hours unless it is validated through successful authentication with a Card Validation or a payment (Direct Card PayIn, Preauthorization, Recurring Registration). **Note – Card validation only available for CB\_VISA\_MASTERCARD** The card validation feature is only available for cards with the `CardType` `CB_VISA_MASTERCARD`. **Note – Card validation expires after 5 minutes** Because you cannot create two requests at once for the same card, the card validation will expire after 5 minutes, setting the `Status` of the Card Validation object to `FAILED`.  The Card `Validity`, however, will remain `UNKNOWN`, which allows you to request a new Card Validation. ### Attributes The unique identifier of the user at the source of the transaction. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. Whether or not the `SecureMode` was used. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. **Returned values:** `CARD_VALIDATION` The type of the card validation. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** DEFAULT\ **Allowed values:** DEFAULT, FORCE, NO\_CHOICE The mode applied for the [3DS protocol](/guides/payment-methods/card/3ds) for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. *Note: Sending the FORCE value automatically sets the ValidationUsage value to MIT.* **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). **Default value:** MIT\ **Allowed values:** MIT, CIT Indicates the intended usage of the card: * CIT – For customer-initiated transactions (CITs), meaning 3DS is less likely to be required on the card validation. * MIT – For merchant-initiated transactions (MITs), meaning 3DS is more likely to be required on the card validation. *Note: The MIT value is returned automatically if the SecureMode value is FORCE, even if CIT is sent.* **Returned values:** `UNKNOWN`, `VALID`, `INVALID` Whether the card is valid or not. * `UNKNOWN` – No payment or card validation has been processed, so the validity of the card remains unknown. * `VALID` – The first payment or card validation using the card was processed successfully within 24 hours of the initial card registration. * `INVALID` – The first payment or card validation using the card was attempted and failed, or the status of the corresponding card registration was `CREATED` for more than 24 hours.\ Once a card is set to `INVALID`, it cannot be set back to `VALID`. A new card registration will be necessary to make a payment. The date and time at which the object was created. The date and time at which successful authorization occurred. If authorization failed, the value is `null`. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. Information about the card used for the transaction. \ If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. # Create a Card Validation POST /V2.01/{ClientId}/cards/{CardId}/validation ### Path parameters The unique identifier of the Card object, obtained during the card registration process. ### Body parameters The unique identifier of the user at the source of the transaction. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. **Allowed values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). **Allowed values:** `DEFAULT`, `FORCE`, `NO_CHOICE` **Default value:** `DEFAULT` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. **Note:** Sending the FORCE value automatically sets the ValidationUsage value to MIT. **Default value:** MIT\ **Allowed values:** MIT, CIT Indicates the intended usage of the card: * CIT – For customer-initiated transactions (CITs), meaning 3DS is less likely to be required on the card validation. * MIT – For merchant-initiated transactions (MITs), meaning 3DS is more likely to be required on the card validation. *Note: The MIT value is returned automatically if the SecureMode value is FORCE, even if CIT is sent.* The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. The unique identifier of the user at the source of the transaction. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). **Default value:** DEFAULT\ **Allowed values:** DEFAULT, FORCE, NO\_CHOICE The mode applied for the [3DS protocol](/guides/payment-methods/card/3ds) for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. *Note: Sending the FORCE value automatically sets the ValidationUsage value to MIT.* **Default value:** MIT\ **Allowed values:** MIT, CIT Indicates the intended usage of the card: * CIT – For customer-initiated transactions (CITs), meaning 3DS is less likely to be required on the card validation. * MIT – For merchant-initiated transactions (MITs), meaning 3DS is more likely to be required on the card validation. *Note: The MIT value is returned automatically if the SecureMode value is FORCE, even if CIT is sent.* **Returned values:** `UNKNOWN`, `VALID`, `INVALID` Whether the card is valid or not. * `UNKNOWN` – No payment or card validation has been processed, so the validity of the card remains unknown. * `VALID` – The first payment or card validation using the card was processed successfully within 24 hours of the initial card registration. * `INVALID` – The first payment or card validation using the card was attempted and failed, or the status of the corresponding card registration was `CREATED` for more than 24 hours.\ Once a card is set to `INVALID`, it cannot be set back to `VALID`. A new card registration will be necessary to make a payment. The date and time at which the object was created. **Returned values:** `CARD_VALIDATION` The type of the card validation. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "c67ea4b3-c144-4142-8fbd-aca45be840da", "Date": 1706044641.0, "errors": { "CardId": "The underlying card type is invalid. Only card type CB_VISA_MASTERCARD is accepted on this feature." } } ``` ```json { "Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type":"param_error", "Id":"7a2d1d57-6c0e-4689-bb80-62222ae073ed#1687358437", "Date":1687358438.0, "errors":{ "CardId":"This card is already being validated." } } ``` ```json { "Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type":"param_error", "Id":"7af030d9-c652-4cfa-a76b-ae445018ed6e#1687358113", "Date":1687358114.0, "errors":{ "CardId":"This card is already VALID." } } ``` ```json { "Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type":"param_error", "Id":"7af030d9-c652-4cfa-a76b-ae445018ed6e#1687358113", "Date":1687358114.0, "errors":{ "CardId":"This card is INVALID." } } ``` ```json 200 - Created { "Id": "110e5f73-9bdc-4333-860d-84dc3ab0fb3a", "AuthorId": "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT", "Status": "SUCCEEDED", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore?cardValidationId=110e5f73-9bdc-4333-860d-84dc3ab0fb3a", "SecureModeRedirectURL": null, "SecureModeNeeded": false, "IpAddress": "159.180.248.187", "BrowserInfo": { "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<", "JavaEnabled": true, "Language": "fr", "ColorDepth": 32, "ScreenHeight": 667, "ScreenWidth": 375, "TimeZoneOffset": -120, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "PreferredCardNetwork": "CB", "SecureMode": "NO_CHOICE", "PaymentCategory": "ECommerce", "ValidationUsage": "CIT", "Validity": "VALID", "CreationDate": 1717085089, "AuthorizationDate": 1717085089, "Type": "CARD_VALIDATION", "Applied3DSVersion": "V2_1", "ResultCode": "000000", "ResultMessage": "Success", "Tag": "Custom meta", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json REST { "AuthorId": "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore", "IpAddress": "159.180.248.187", "Tag": "Custom meta", "BrowserInfo": { "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<", "JavaEnabled": true, "Language": "fr", "ColorDepth": 32, "ScreenHeight": 667, "ScreenWidth": 375, "TimeZoneOffset": "-120", "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "PreferredCardNetwork":"CB", "SecureMode":"NO_CHOICE", "ValidationUsage":"CIT" } ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.CardValidation; import com.mangopay.entities.subentities.BrowserInfo; public class CreateCardValidation { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; String cardId = "card_m_01HY0MA4E2WQ0NRYQJP8X8SXMB"; BrowserInfo browserInfo = new BrowserInfo(); browserInfo.setAcceptHeader("application/json,text/javascript,*/*;q=0.01<"); browserInfo.setJavaEnabled(true); browserInfo.setLanguage("fr"); browserInfo.setColorDepth(32); browserInfo.setScreenHeight(667); browserInfo.setScreenWidth(375); browserInfo.setTimeZoneOffset("-120"); browserInfo.setUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"); browserInfo.setJavascriptEnabled(true); CardValidation cardVal = new CardValidation(); cardVal.setAuthorId(userId); cardVal.setSecureModeReturnUrl("https://mangopay.com/docs/please-ignore"); cardVal.setIpAddress("159.180.248.187"); cardVal.setBrowserInfo(browserInfo); cardVal.setTag("Created using the Mangopay Java SDK"); CardValidation createCardValidation = mangopay.getCardApi().validate(cardId, cardVal); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createCardValidation); System.out.println(prettyJson); } } ``` ```python Python import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, CardValidation from mangopay.utils import BrowserInfo natural_user = NaturalUser.get('213600749') user_card_validation = CardValidation( author = natural_user, secure_mode_return_url = 'https://mangopay.com/docs/please-ignore', ip_address = '159.180.248.187', tag = 'Created with Mangopay Python SDK', browser_info = BrowserInfo( user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', screen_width = 375, screen_height = 667, color_depth = 32, language = 'EN', accept_header = 'application/json,text/javascript,*/*;q=0.01<', timezone_offset = '-120', java_enabled = True, javascript_enabled = True ), card_id = '213601128' ) create_card_validation = user_card_validation.validate(card_id = user_card_validation.card_id) pprint(create_card_validation) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var cardId = "card_m_01J3049JBA2XPA7GC7GEFJRQG4"; var cardValidation = new CardValidationPostDTO( userId, "http://www.mangopay.com/docs/please-ignore", "2001:0620:0000:0000:0211:24FF:FE80:C12C", new BrowserInfo { AcceptHeader = "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", JavaEnabled = true, Language = "FR-FR", ColorDepth = 4, ScreenHeight = 1800, ScreenWidth = 400, JavascriptEnabled = true, TimeZoneOffset = "+60", UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" }, "Created using the Mangopay .NET SDK" ); var createCardValidation = await api.Cards.ValidateAsync(cardId, cardValidation); string prettyPrint = JsonConvert.SerializeObject(createCardValidation, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Card Validation GET /V2.01/{ClientId}/cards/{CardId}/validation/{ValidationId} ### Path parameters The unique identifier of the Card object, obtained during the card registration process. The unique identifier of the Card Validation object. ### Responses The unique identifier of the object. The unique identifier of the user at the source of the transaction. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** DEFAULT\ **Allowed values:** DEFAULT, FORCE, NO\_CHOICE The mode applied for the [3DS protocol](/guides/payment-methods/card/3ds) for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. *Note: Sending the FORCE value automatically sets the ValidationUsage value to MIT.* **Default value:** MIT\ **Allowed values:** MIT, CIT Indicates the intended usage of the card: * CIT – For customer-initiated transactions (CITs), meaning 3DS is less likely to be required on the card validation. * MIT – For merchant-initiated transactions (MITs), meaning 3DS is more likely to be required on the card validation. *Note: The MIT value is returned automatically if the SecureMode value is FORCE, even if CIT is sent.* **Returned values:** `UNKNOWN`, `VALID`, `INVALID` Whether the card is valid or not. * `UNKNOWN` – No payment or card validation has been processed, so the validity of the card remains unknown. * `VALID` – The first payment or card validation using the card was processed successfully within 24 hours of the initial card registration. * `INVALID` – The first payment or card validation using the card was attempted and failed, or the status of the corresponding card registration was `CREATED` for more than 24 hours.\ Once a card is set to `INVALID`, it cannot be set back to `VALID`. A new card registration will be necessary to make a payment. The date and time at which the object was created. **Returned values:** `CARD_VALIDATION` The type of the card validation. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 - Succeeded { "Id": "110e5f73-9bdc-4333-860d-84dc3ab0fb3a", "AuthorId": "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT", "Status": "SUCCEEDED", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore?cardValidationId=110e5f73-9bdc-4333-860d-84dc3ab0fb3a", "SecureModeRedirectURL": null, "SecureModeNeeded": false, "IpAddress": "159.180.248.187", "BrowserInfo": { "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<", "JavaEnabled": true, "Language": "fr", "ColorDepth": 32, "ScreenHeight": 667, "ScreenWidth": 375, "TimeZoneOffset": -120, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "PreferredCardNetwork": "CB", "SecureMode": "NO_CHOICE", "PaymentCategory": "ECommerce", "ValidationUsage": "CIT", "Validity": "VALID", "CreationDate": 1717085089, "AuthorizationDate": 1717085089, "Type": "CARD_VALIDATION", "Applied3DSVersion": "V2_1", "ResultCode": "000000", "ResultMessage": "Success", "Tag": "Custom meta", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key", }) let myCard = { Id: 'card_m_01HRAB5X7K39MDNS5NV6DD68G8' } let myCardValidation = { Id: '5b0ab172-e1fd-47d7-a1f8-d674986630d2' } const viewCardValidation = async (cardValidationId) => { return await mangopay.Cards.getCardValidation(myCard.Id, cardValidationId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewCardValidation(myCardValidation.Id) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.CardValidation; public class ViewCardValidation { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String cardId = "card_m_01HY0MA4E2WQ0NRYQJP8X8SXMB"; String cardValidationId = "68230c33-fcf7-486a-9275-74c9e6064968"; CardValidation viewCardValidation = mangopay.getCardApi().getCardValidation(cardId, cardValidationId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewCardValidation); System.out.println(prettyJson); } } ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var cardId = "card_m_01J3049JBA2XPA7GC7GEFJRQG4"; var cardValidationId = "a5309b17-0455-45cb-9f94-061784604bd3"; var viewCardValidation = await api.Cards.GetCardValidationAsync(cardId, cardValidationId); string prettyPrint = JsonConvert.SerializeObject(viewCardValidation, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Card object ### Description The Card object is the virtual and secured version (i.e., the tokenized version) of a card that can be used to make a payment. The card object is created upon successfully completing the card registration process. The same actual card can be registered several times for security and privacy purposes. As a consequence, for a single real-life card, multiple Card objects can be created in the Mangopay environment. **Caution – Card validation within 24 hours** A successful transaction (preauthorization, pay-in, or recurring) or card validation within 24 hours of the card registration is required to validate a card. Otherwise, the card becomes invalid and a new card registration will be necessary. ### Attributes *Format: “MMYY”* The expiration date of the card. The card number, partially obfuscated. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. **Allowed values:** `CB`, `VISA`, `MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`, `JCB`, `DISCOVER` The provider of the card. *Format: ISO-3166-1 alpha-3 three-letter country code (e.g., “FRA”)* The country of the card (which is the same as the country of the issuer). The product type of the card. You can find the list of products in the Card products article (coming soon). The unique 5-number code of the issuer. Whether the card is active or not. Setting this parameter to `false` is irreversible and should be done once the pay-in is successful. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the card. **Returned values:** `UNKNOWN`, `VALID`, `INVALID` Whether the card is valid or not. * `UNKNOWN` – No payment or card validation has been processed, so the validity of the card remains unknown. * `VALID` – The first payment or card validation using the card was processed successfully within 24 hours of the initial card registration. * `INVALID` – The first payment or card validation using the card was attempted and failed, or the status of the corresponding card registration was `CREATED` for more than 24 hours.\ Once a card is set to `INVALID`, it cannot be set back to `VALID`. A new card registration will be necessary to make a payment. The unique identifier of the user the card belongs to. The unique identifier of the Card object. Custom data added to this object.\ In the case of the Card object, the tag value is inherited from the Card Registration object and is not editable. The date and time at which the object was created. The unique representation of the card number. This string can be used to track the card behavior while keeping the card information confidential. *Max. length: 45 characters* The cardholder’s name shown on the payment card. This value is passed to the card network for use in transaction risk analysis. ### Related resources Learn how to process a card payment Learn about card registration and processing Learn more about testing all payment methods Simplify card registration with Checkout SDK for web and mobile # Deactivate or edit a Card PUT /v2.01/{ClientId}/cards/{CardId} This call serves one of two purposes: * Setting the card as inactive, and thereby disabling it from being used again. This action is irreversible but doesn’t prevent the card being registered again with [POST Create a Card Registration](/api-reference/card-registrations/create-card-registration). * Adding the `CardHolderName` to an existing Card object. The `CardHolderName` cannot be modified once added to a Card object. It can also be done during registration with [PUT Update a Card Registration](/api-reference/card-registrations/update-card-registration). **Warning – Implement card deactivation** Because card information cannot be kept without the end user's approval, you should implement a way to deactivate the end user’s card systematically when relevant. ### Path parameters The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`. ### Body parameters Whether the card is active or not. Setting this parameter to `false` is irreversible and should be done once the pay-in is successful. *Max. length: 45 characters passed to card network, 255 accepted by the API* The cardholder’s name shown on the payment card. This value is passed to the card network for use in transaction risk analysis. The value should only contain unmarked alphabetic characters (A-Z, a-z), hyphens (-), apostrophes (‘), and spaces. Letters with diacritics (e.g. É, Ü, ẞ), honorifics (e.g. MRS.) and other special characters are not recommended (they are transformed before being sent to the card network). The `CardHolderName` is not returned in the Card Registration object; it is added to the Card object. ### Responses *Format: “MMYY”* The expiration date of the card. The card number, partially obfuscated. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. **Allowed values:** `CB`, `VISA`, `MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`, `JCB`, `DISCOVER` The provider of the card. *Format: ISO-3166-1 alpha-3 three-letter country code (e.g., “FRA”)* The country of the card (which is the same as the country of the issuer). The product type of the card. You can find the list of products in the Card products article (coming soon). The unique 5-number code of the issuer. Whether the card is active or not. Setting this parameter to `false` is irreversible and should be done once the pay-in is successful. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the card. **Returned values:** `UNKNOWN`, `VALID`, `INVALID` Whether the card is valid or not. * `UNKNOWN` – No payment or card validation has been processed, so the validity of the card remains unknown. * `VALID` – The first payment or card validation using the card was processed successfully within 24 hours of the initial card registration. * `INVALID` – The first payment or card validation using the card was attempted and failed, or the status of the corresponding card registration was `CREATED` for more than 24 hours.\ Once a card is set to `INVALID`, it cannot be set back to `VALID`. A new card registration will be necessary to make a payment. The unique identifier of the user the card belongs to. The unique identifier of the Card object. Custom data added to this object.\ In the case of the Card object, the tag value is inherited from the Card Registration object and is not editable. The unique representation of the card number. This string can be used to track the card behavior while keeping the card information confidential. *Max. length: 45 characters* The cardholder’s name shown on the payment card. This value is passed to the card network for use in transaction risk analysis. ```json { "Message": "The card has already been deactivated", "Type": "card_already_not_active", "Id": "8ebd2256-e596-4404-8c76-cd14b505d7a4", "Date": 1690292341.0, "errors": null } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "b89e7138-7812-486e-be79-ee817e4441ac#1718650010", "Date": 1718650011, "errors": { "cardHolderName": "card holder name already exists" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "e92e4d2a-81fc-4ca6-9a2b-4b3a0cba57e9", "Date": 1723036573.0, "errors": { "CardHolderName": "The field CardHolderName must be between 2 and 255 characters long." } } ``` ```json 200 { "ExpirationDate": "1229", "Alias": "497010XXXXXX8183", "CardType": "CB_VISA_MASTERCARD", "CardProvider": "VISA", "Country": "FRA", "Product": "I", "BankCode": "unknown", "Active": true, "Currency": "EUR", "Validity": "VALID", "UserId": "user_m_01HZSK5MX04KS9Q7SQSSRGQQ4Q", "Id": "card_m_01J0KPBMM32MMSET50CZZ3RMVJ", "Tag": null, "CreationDate": 1718647902, "Fingerprint": "48d63bbcfc2c47fcbc19df35e47b2f8d", "CardHolderName": "ALEX SMITH" } ``` ```json REST { "Active": false } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $card = new \MangoPay\Card(); $card->Id = '198660883'; $card->Active = false; $response = $api->Cards->Update($card); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myCard = { Id: '156285393', Active: false, } const deactivateCard = async (card) => { return await mangopay.Cards.update(card) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } deactivateCard(myCard) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def deactivateCard(cardId, cardObject) begin response = MangoPay::Card.update(cardId, cardObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to deactivate card: #{error.message}" puts "Error details: #{error.details}" return false end end myCard = { Id: '194579926', Active: false } deactivateCard(myCard[:Id], myCard) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Card; public class DeactivateCard { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String cardId = "card_m_01HXYAVH217SC0ARVDHSE0HQJ0"; Card card = mangopay.getCardApi().get(cardId); Card disableCard = mangopay.getCardApi().disable(card); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(disableCard); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Card user_card = Card( id = '213601128', active = False ) deactive_card = user_card.save() pprint(deactive_card) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var cardId = "card_m_01J2Y4W2R4RWKVEME5WG180SQ3"; var card = new CardPutDTO { Active = false }; var deactivateCard = await api.Cards.UpdateAsync(card, cardId); string prettyPrint = JsonConvert.SerializeObject(deactivateCard, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Cards for a Fingerprint GET /v2.01/{ClientId}/cards/fingerprints/{Fingerprint} This call returns all the cards with the same `Fingerprint` value. This can be useful to detect abnormal or fraudulent behavior. Learn more about card fingerprint → ### Path parameters The unique representation of the card number. This string can be used to track the card behavior while keeping the card information confidential. ### Responses The list of the cards created by the platform. The card object created by the platform. *Format: “MMYY”* The expiration date of the card. The card number, partially obfuscated. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. **Allowed values:** `CB`, `VISA`, `MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`, `JCB`, `DISCOVER` The provider of the card. *Format: ISO-3166-1 alpha-3 three-letter country code (e.g., “FRA”)* The country of the card (which is the same as the country of the issuer). The unique 5-number code of the issuer. Whether the card is active or not. Setting this parameter to `false` is irreversible and should be done once the pay-in is successful. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the card. **Returned values:** `UNKNOWN`, `VALID`, `INVALID` Whether the card is valid or not. * `UNKNOWN` – No payment or card validation has been processed, so the validity of the card remains unknown. * `VALID` – The first payment or card validation using the card was processed successfully within 24 hours of the initial card registration. * `INVALID` – The first payment or card validation using the card was attempted and failed, or the status of the corresponding card registration was `CREATED` for more than 24 hours.\ Once a card is set to `INVALID`, it cannot be set back to `VALID`. A new card registration will be necessary to make a payment. The unique identifier of the user the card belongs to. The unique identifier of the Card object. Custom data added to this object.\ In the case of the Card object, the tag value is inherited from the Card Registration object and is not editable. The date and time at which the object was created. The unique representation of the card number. This string can be used to track the card behavior while keeping the card information confidential. ```json 200 [ { "ExpirationDate": "1229", "Alias": "497010XXXXXX8183", "CardType": "CB_VISA_MASTERCARD", "CardProvider": "VISA", "Country": "FRA", "Product": "I", "BankCode": "unknown", "Active": true, "Currency": "EUR", "Validity": "UNKNOWN", "UserId": "user_m_01HWQ0VWBTFSWCPF29SR3E7PK9", "Id": "card_m_01HXVF29TMRSTBRE11RY6EY6PT", "Tag": null, "CreationDate": 1715687466, "Fingerprint": "48d63bbcfc2c47fcbc19df35e47b2f8d", "CardHolderName": "Jody Smith" }, { "ExpirationDate": "1229", "Alias": "497010XXXXXX8183", "CardType": "CB_VISA_MASTERCARD", "CardProvider": "VISA", "Country": "FRA", "Product": "I", "BankCode": "unknown", "Active": true, "Currency": "EUR", "Validity": "UNKNOWN", "UserId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T", "Id": "card_m_01HXVD91R8QEDY7MYC8TX9R9M8", "Tag": null, "CreationDate": 1715685590, "Fingerprint": "48d63bbcfc2c47fcbc19df35e47b2f8d", "CardHolderName": "Alex Smith" } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $fingerprint = '36c74d2e60ba474eab6d6f6d46a642b0'; $response = $api->Cards->GetByFingerprint($fingerprint); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myCard = { fingerprint: '48d63bbcfc2c47fcbc19df35e47b2f8d', } const listCardsFingerprint = async (fingerprint) => { return await mangopay.Cards.getByFingerprint(fingerprint) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listCardsFingerprint(myCard.fingerprint) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listFingerprintCards(fingerprint) begin response = MangoPay::Card.get_by_fingerprint(fingerprint) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch cards for fingerprint: #{error.message}" puts "Error details: #{error.details}" return false end end myCard = { Fingerprint: '36c74d2e60ba474eab6d6f6d46a642b0', } listFingerprintCards(myCard[:Fingerprint]) ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Card fingerprint = '48d63bbcfc2c47fcbc19df35e47b2f8d' cards = Card.get_by_fingerprint(fingerprint) for card in cards: pprint(vars(card)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var fingerprint = "48d63bbcfc2c47fcbc19df35e47b2f8d"; var userCards = await api.Cards.GetCardsByFingerprintAsync(fingerprint, null, null); string prettyPrint = JsonConvert.SerializeObject(userCards, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Cards for a User GET /v2.01/{ClientId}/users/{UserId}/cards ### Query parameters Whether the card is active or not. ### Path parameters The unique identifier of the user. ### Responses The list of the cards created by the platform. The card object created by the platform. *Format: “MMYY”* The expiration date of the card. The card number, partially obfuscated. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. **Allowed values:** `CB`, `VISA`, `MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`, `JCB`, `DISCOVER` The provider of the card. *Format: ISO-3166-1 alpha-3 three-letter country code (e.g., “FRA”)* The country of the card (which is the same as the country of the issuer). The unique 5-number code of the issuer. Whether the card is active or not. Setting this parameter to `false` is irreversible and should be done once the pay-in is successful. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the card. **Returned values:** `UNKNOWN`, `VALID`, `INVALID` Whether the card is valid or not. * `UNKNOWN` – No payment or card validation has been processed, so the validity of the card remains unknown. * `VALID` – The first payment or card validation using the card was processed successfully within 24 hours of the initial card registration. * `INVALID` – The first payment or card validation using the card was attempted and failed, or the status of the corresponding card registration was `CREATED` for more than 24 hours.\ Once a card is set to `INVALID`, it cannot be set back to `VALID`. A new card registration will be necessary to make a payment. The unique identifier of the user the card belongs to. The unique identifier of the Card object. Custom data added to this object.\ In the case of the Card object, the tag value is inherited from the Card Registration object and is not editable. The date and time at which the object was created. The unique representation of the card number. This string can be used to track the card behavior while keeping the card information confidential. ```json 200 [ { "ExpirationDate": "1229", "Alias": "497010XXXXXX8183", "CardType": "CB_VISA_MASTERCARD", "CardProvider": "VISA", "Country": "FRA", "Product": "I", "BankCode": "unknown", "Active": true, "Currency": "EUR", "Validity": "UNKNOWN", "UserId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T", "Id": "card_m_01HXVD91R8QEDY7MYC8TX9R9M8", "Tag": null, "CreationDate": 1715685590, "Fingerprint": "48d63bbcfc2c47fcbc19df35e47b2f8d", "CardHolderName": "Alex Smith" }, { "ExpirationDate": "0626", "Alias": "497010XXXXXX1119", "CardType": "CB_VISA_MASTERCARD", "CardProvider": "VISA", "Country": "FRA", "Product": "I", "BankCode": "unknown", "Active": true, "Currency": "EUR", "Validity": "UNKNOWN", "UserId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T", "Id": "card_m_01HXVF4VAM59ZT3FT42T1ZH35Y", "Tag": null, "CreationDate": 1715687550, "Fingerprint": "36c74d2e60ba474eab6d6f6d46a642b0", "CardHolderName": "Jody Smith" } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $response = $api->Users->GetCards($userId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '146476890', } const listUserCards = async (userId) => { return await mangopay.Users.getCards(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listUserCards(user.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listUserCards(userId) begin response = MangoPay::User.cards(userId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch cards for the user: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '146476890' } listUserCards(myUser[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Card; import java.util.List; public class ListUserCards { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; List cards = mangopay.getUserApi().getCards(userId, null, null); for (Card card : cards) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(card); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser natural_user = NaturalUser.get('211919260') cards = natural_user.cards.all() for card in cards: pprint(vars(card)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR"; var userCards = await api.Users.GetCardsAsync(userId, null, null); string prettyPrint = JsonConvert.SerializeObject(userCards, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Card GET /v2.01/{ClientId}/cards/{CardId} ### Path parameters The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`. ### Responses *Format: “MMYY”* The expiration date of the card. The card number, partially obfuscated. **Allowed values:** `CB`, `VISA`, `MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`, `JCB`, `DISCOVER` The provider of the card. *Format: ISO-3166-1 alpha-3 three-letter country code (e.g., “FRA”)* The country of the card (which is the same as the country of the issuer). The product type of the card. You can find the list of products in the Card products article (coming soon). The unique 5-number code of the issuer. **Returned values:** `UNKNOWN`, `VALID`, `INVALID` Whether the card is valid or not. * `UNKNOWN` – No payment or card validation has been processed, so the validity of the card remains unknown. * `VALID` – The first payment or card validation using the card was processed successfully within 24 hours of the initial card registration. * `INVALID` – The first payment or card validation using the card was attempted and failed, or the status of the corresponding card registration was `CREATED` for more than 24 hours.\ Once a card is set to `INVALID`, it cannot be set back to `VALID`. A new card registration will be necessary to make a payment. The unique identifier of the user the card belongs to. The unique identifier of the Card object. Custom data added to this object.\ In the case of the Card object, the tag value is inherited from the Card Registration object and is not editable. The date and time at which the object was created. The unique representation of the card number. This string can be used to track the card behavior while keeping the card information confidential. ```json 200 { "ExpirationDate": "1229", "Alias": "497010XXXXXX8183", "CardType": "CB_VISA_MASTERCARD", "CardProvider": "VISA", "Country": "FRA", "Product": "I", "BankCode": "unknown", "Active": true, "Currency": "EUR", "Validity": "UNKNOWN", "UserId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T", "Id": "card_m_01HXVD91R8QEDY7MYC8TX9R9M8", "Tag": null, "CreationDate": 1715685590, "Fingerprint": "48d63bbcfc2c47fcbc19df35e47b2f8d", "CardHolderName": "Alex Smith" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $cardId = '193935874'; $response = $api->Cards->Get($cardId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myCard = { Id: '192775715', } const viewCard = async (cardId) => { return await mangopay.Cards.get(cardId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewCard(myCard.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewCard(cardId) begin response = MangoPay::Card.fetch(cardId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch card: #{error.message}" puts "Error details: #{error.details}" return false end end myCard = { Id: '194579926' } viewCard(myCard[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Card; public class ViewCard { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String cardId = "card_m_01HXYAVH217SC0ARVDHSE0HQJ0"; Card viewCard = mangopay.getCardApi().get(cardId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewCard); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Card natural_user = NaturalUser.get('213600749') user_card_id = '213601128' try: view_user_card = Card.get(user_card_id) pprint(vars(view_user_card)) except Card.DoesNotExist: print('The Card {} does not exist for User {}'.format(user_card_id, natural_user.id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var cardId = "card_m_01J2Y4W2R4RWKVEME5WG180SQ3"; var viewCard = await api.Cards.GetAsync(cardId); string prettyPrint = JsonConvert.SerializeObject(viewCard, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Client Wallet object ### Description The Client Wallet object represents one of two wallets created automatically by Mangopay for each currency: * Fees Wallet - Stores all `Fees` taken on transactions (see the Fees guide for more information). The `FundsType` of the Fees Wallet is `FEES`. * Repudiation Wallet - Manages funds relating to disputes management. The `FundsType` of the Repudiation Wallet is `CREDIT`. There can be only one wallet per `FundsType` and `Currency`. **Note – Latency of balance update** The client wallet balance can take a few minutes to be updated after a transfer with fees has been done. ### Attributes The current balance of the wallet. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the balance. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallet. **Returned values:** `DEFAULT`, `FEES`, `CREDIT` The type of funds in the wallet: * `DEFAULT` – Regular funds for user-owned wallets. Wallets with this `FundsType` cannot have a negative balance. * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. The unique identifier of the wallet. In the specific case of the Client Wallet object, this value has the format `FundsType`\_`Currency` (e.g., `FEES_EUR`). *Max. length: 255 characters* This parameter usually allows you to enter custom data, but in the case of the Client Wallet object, it is always “null” as the object is automatically created. The date and time at which the wallet was created. # List all Client Wallets GET /v2.01/{ClientId}/clients/wallets ### Responses The list of Client Wallets. The Client Wallet object created by MANGOPAY. The current balance of the wallet. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the balance. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallet. **Returned values:** `DEFAULT`, `FEES`, `CREDIT` The type of funds in the wallet: * `DEFAULT` – Regular funds for user-owned wallets. Wallets with this `FundsType` cannot have a negative balance. * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. The unique identifier of the wallet. In the specific case of the Client Wallet object, this value has the format `FundsType`\_`Currency` (e.g., `FEES_EUR`). *Max. length: 255 characters* Custom data that you can add to this object.\ For wallets, you can use this parameter to identify the corresponding end user in your platform. The date and time at which the wallet was created. ```json 200 [ { "Balance": { "Currency": "EUR", "Amount": 1027 }, "Currency": "EUR", "FundsType": "FEES", "Id": "FEES_EUR", "Tag": null, "CreationDate": 1658926202 }, { "Balance": { "Currency": "EUR", "Amount": 5000 }, "Currency": "EUR", "FundsType": "CREDIT", "Id": "CREDIT_EUR", "Tag": null, "CreationDate": 1658926202 } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $response = $api->Clients->GetWallets(); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) const listClientWallets = async () => { return await mangopay.Clients.getClientWallets() .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listClientWallets() ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listClientWallets() begin response = MangoPay::Client.fetch_wallets() puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch client wallets: #{error.message}" puts "Error details: #{error.details}" return false end end listClientWallets() ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.Pagination; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.FundsType; import com.mangopay.entities.Wallet; public class ListClientWallets { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); List clientWallets = mangopay.getClientApi().getWallets(FundsType.DEFAULT, new Pagination(1, 100)); for (Wallet clientWallet : clientWallets) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(updateUbo); System.out.println(clientWallet); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import ClientWallet client_wallets = ClientWallet.all() for client_wallet in client_wallets: pprint(vars(client_wallet)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var clientWallets = await api.Clients.GetWalletsAsync(FundsType.DEFAULT, new Pagination(1, 10)); string prettyPrint = JsonConvert.SerializeObject(clientWallets, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Client Wallets by FundsType GET /v2.01/{ClientId}/clients/wallets/{FundsType} ### Path parameters **Allowed values:** `FEES`, `CREDIT` The type of funds in the Client Wallet: * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. ### Responses The list of Client Wallets. The Client Wallet object created by MANGOPAY. The current balance of the wallet. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the balance. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallet. **Returned values:** `DEFAULT`, `FEES`, `CREDIT` The type of funds in the wallet: * `DEFAULT` – Regular funds for user-owned wallets. Wallets with this `FundsType` cannot have a negative balance. * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. The unique identifier of the wallet. In the specific case of the Client Wallet object, this value has the format `FundsType`\_`Currency` (e.g., `FEES_EUR`). *Max. length: 255 characters* Custom data that you can add to this object.\ For wallets, you can use this parameter to identify the corresponding end user in your platform. The date and time at which the wallet was created. ```json 200 [ { "Balance": { "Currency": "EUR", "Amount": 1027 }, "Currency": "EUR", "FundsType": "FEES", "Id": "FEES_EUR", "Tag": null, "CreationDate": 1658926202 } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; //To get only Fees Wallets try { $fundsType = \MangoPay\FundsType::FEES; $response = $api->Clients->GetWallets($fundsType); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } // To only get Credit Wallets try { $fundsType = \MangoPay\FundsType::CREDIT $response = $api->Clients->GetWallets($fundsType); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myWallets = { FundsType: 'FEES', } //* FundsType may be 'DEFAULT', 'FEES', or 'CREDIT' const listClientWalletsByFundsType = async (fundsType) => { return await mangopay.Clients.getClientWalletsByFundsType(fundsType) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listClientWalletsByFundsType(myWallets.FundsType) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listClientWalletsByFundsType(fundsType) begin response = MangoPay::Client.fetch_wallets(fundsType) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch client wallets: #{error.message}" puts "Error details: #{error.details}" return false end end myWallets = { FundsType: 'FEES' } listClientWalletsByFundsType(myWallets[:FundsType]) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.Pagination; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.FundsType; import com.mangopay.entities.Wallet; public class ListClientWallets { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); List clientWallets = mangopay.getClientApi().getWallets(FundsType.FEES, new Pagination(1, 100)); for (Wallet clientWallet : clientWallets) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(updateUbo); System.out.println(clientWallet); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import ClientWallet client_wallets = ClientWallet.all_by_funds_type(fund_type = 'CREDIT') for client_wallet in client_wallets: pprint(vars(client_wallet)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var clientWallets = await api.Clients.GetWalletsAsync(FundsType.FEES, new Pagination(1, 10)); string prettyPrint = JsonConvert.SerializeObject(clientWallets, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Client Wallet GET /v2.01/{ClientId}/clients/wallets/{FundsType}/{Currency} ### Path parameters **Allowed values:** `FEES`, `CREDIT` The type of funds in the Client Wallet: * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallet. ### Responses The current balance of the wallet. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the balance. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallet. **Returned values:** `DEFAULT`, `FEES`, `CREDIT` The type of funds in the wallet: * `DEFAULT` – Regular funds for user-owned wallets. Wallets with this `FundsType` cannot have a negative balance. * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. The unique identifier of the wallet. In the specific case of the Client Wallet object, this value has the format `FundsType`\_`Currency` (e.g., `FEES_EUR`). *Max. length: 255 characters* Custom data that you can add to this object.\ For wallets, you can use this parameter to identify the corresponding end user in your platform. The date and time at which the wallet was created. ```json 200 { "Balance": { "Currency": "EUR", "Amount": 2027 }, "Currency": "EUR", "FundsType": "FEES", "Id": "FEES_EUR", "Tag": null, "CreationDate": 1658926202 } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myWallet = { FundsType: 'FEES', Currency: 'EUR', } const viewClientWallet = async (fundsType, currency) => { return await mangopay.Clients.getClientWallet(fundsType, currency) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewClientWallet(myWallet.FundsType, myWallet.Currency) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewClientWallet(fundsType, currency) begin response = MangoPay::Client.fetch_wallet(fundsType, currency) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch client wallets: #{error.message}" puts "Error details: #{error.details}" return false end end myClientWallet = { FundsType: 'FEES', Currency: 'EUR' } viewClientWallet(myClientWallet[:FundsType], myClientWallet[:Currency]) ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = '/tmp/'; try { // $fundsType = MangoPay\FundsType::FEES; $fundsType = MangoPay\FundsType::CREDIT; $response = $api->Clients->GetWallets($fundsType); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.FundsType; import com.mangopay.entities.Wallet; public class ViewClientWallet { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Wallet clientWallet = mangopay.getClientApi().getWallet(FundsType.FEES, CurrencyIso.EUR); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(updateUbo); System.out.println(clientWallet); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import ClientWallet client_wallet = ClientWallet.get(funds_type = 'FEES', currency = 'GBP') pprint(vars(client_wallet)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewWallet = await api.Clients.GetWalletAsync(FundsType.FEES, CurrencyIso.EUR, null); string prettyPrint = JsonConvert.SerializeObject(viewWallet, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Client object ### Description The Client object allows you to view and edit information regarding your platform account. ### Attributes The unique identifier associated with the API key, giving access to either the Sandbox or Production environment. The trading name of the company operating the platform. The registered legal name of the company operating the platform. *Emails must be ≤ 40 characters* List of email addresses to contact the platform for technical matters. \ Important: If the email length exceeds 40 characters, it will be be impossible to process some payments. List of email addresses to contact the platform for administrative or commercial matters. List of email addresses to contact the platform for billing matters. List of email addresses to contact the platform for fraud and compliance matters. The address of the platform operator’s headquarters. This parameter must be provided for the platform’s payouts to be processed. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. *Max. length: 15 characters; international telephone numbering plan E.164 (+ followed by the country code, then the number)* The phone number of the platform operator’s headquarters. The tax (or VAT) number for the company operating the platform. The categorization of the platform in terms of business and sector of activity. The business type of the platform. The sector of activity of the platform. The URL of the platform’s website. *Max. length: 2,000 characters* The description of what the platform does. The unique reference for the platform, which should be used when contacting Mangopay. *Hex color code* The primary color of your branding, which is displayed on some payment pages (e.g., mandate confirmation). *Hex color code* The primary color of your branding, which is displayed in call-to-action buttons on some payment pages (e.g., mandate confirmation). The URL of the platform’s logo. Logos may be added by using the Upload a Client Logo endpoint. The registration number of the company operating the platform, assigned by the relevant national authority. 4-digit merchant category code. The MCC is used to classify a business by the types of goods or services it provides. # Update a Client PUT /v2.01/{ClientId}/clients This endpoint allows you to update some of your platform information directly via the API. ### Body parameters *Emails must be ≤ 40 characters* List of email addresses to contact the platform for technical matters. \ Important: If the email length exceeds 40 characters, it will be be impossible to process some payments. List of email addresses to contact the platform for administrative or commercial matters. List of email addresses to contact the platform for billing matters. List of email addresses to contact the platform for fraud and compliance matters. The address of the platform operator’s headquarters. This parameter must be provided for the platform’s payouts to be processed. *Max. length: 255 characters* Required if `HeadquarterAddress` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* Required if `HeadquarterAddress` is sent. The city of the address. *Max. length: 255 characters* Required if `HeadquarterAddress` is sent and `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if `HeadquarterAddress` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. Required if `HeadquarterAddress` is sent. The country of the address. *Max. length: 15 characters; international telephone numbering plan E.164 (+ followed by the country code, then the number)* The phone number of the platform operator’s headquarters. The tax (or VAT) number for the company operating the platform. The URL of the platform’s website. *Max. length: 2,000 characters* The description of what the platform does. *Hex color code* The primary color of your branding, which is displayed on some payment pages (e.g., mandate confirmation). *Hex color code* The primary color of your branding, which is displayed in call-to-action buttons on some payment pages (e.g., mandate confirmation). ### Responses Type of the platform. This field has been replaced by the `PlatformCategorization` object. The unique identifier associated with the API key, giving access to either the Sandbox or Production environment. The trading name of the company operating the platform. The registered legal name of the company operating the platform. *Emails must be ≤ 40 characters* List of email addresses to contact the platform for technical matters. \ Important: If the email length exceeds 40 characters, it will be be impossible to process some payments. List of email addresses to contact the platform for administrative or commercial matters. List of email addresses to contact the platform for billing matters. List of email addresses to contact the platform for fraud and compliance matters. The address of the platform operator’s headquarters. This parameter must be provided for the platform’s payouts to be processed. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Max. length: 15 characters; international telephone numbering plan E.164 (+ followed by the country code, then the number)* The phone number of the platform operator’s headquarters. The tax (or VAT) number for the company operating the platform. The categorization of the platform in terms of business and sector of activity. The business type of the platform. The sector of activity of the platform. The URL of the platform’s website. *Max. length: 2,000 characters* The description of what the platform does. The unique reference for the platform, which should be used when contacting Mangopay. *Hex color code* The primary color of your branding, which is displayed on some payment pages (e.g., mandate confirmation). *Hex color code* The primary color of your branding, which is displayed in call-to-action buttons on some payment pages (e.g., mandate confirmation). The URL of the platform’s logo. Logos may be added by using the Upload a Client Logo endpoint. The registration number of the company operating the platform, assigned by the relevant national authority. 4-digit merchant category code. The MCC is used to classify a business by the types of goods or services it provides. ```json 200 { "PlatformType": null, "ClientId": "sandbox4586", "Name": "Platform’s name", "RegisteredName": "Platform’s SA", "TechEmails": [ "platformtech@example.com" ], "AdminEmails": [], "BillingEmails": [], "FraudEmails": [], "HeadquartersAddress": { "AddressLine1": "Rue des plantes", "AddressLine2": "The Oasis", "City": "Paris", "Region": "Ile de France", "PostalCode": "75010", "Country": "FR" }, "HeadquartersPhoneNumber": "+330606060606", "TaxNumber": "n/a", "PlatformCategorization": { "BusinessType": "MARKETPLACE", "Sector": "RENTALS" }, "PlatformURL": "http://mangopay.com/docs/please-ignore", "PlatformDescription": "n/a", "CompanyReference": null, "PrimaryThemeColour": "#afafaf", "PrimaryButtonColour": "#ff974b", "Logo": null, "CompanyNumber": "00000000000000000000", "MCC": "0742" } ``` ```json REST { "TechEmails": [ "platformtech@example.com" ], "AdminEmails": [], "BillingEmails": [], "FraudEmails": [], "HeadquartersAddress": { "AddressLine1": "Rue des plantes", "AddressLine2": "The Oasis", "City": "Paris", "Region": "Ile de France", "PostalCode": "75010", "Country": "FR" }, "HeadquartersPhoneNumber": "+330606060606", "TaxNumber": "n/a", "PlatformURL": "http://mangopay.com/docs/please-ignore", "PlatformDescription": "n/a", "PrimaryThemeColour": "#afafaf", "PrimaryButtonColour": "#ff974b" } ``` # Upload a Client logo PUT /v2.01/{ClientId}/clients/logo This endpoint allows you to upload the logo of the platform that is displayed on some payment pages to which end users may be redirected (e.g., mandate confirmation). ### Body parameters *Format: Base64 encoded file* The encoded file of the logo to upload. ### Responses *No response body parameters* ```json REST { "File": "iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHzSURBVHgBrZbfTfMwFMXvvU7y9eGTqNQW8RgmaDYgbNANgAlgA2AC2ACYAJiAskHZILwVASK8oAJtL7YLUuw4cYg4UhX51r+bE/vkD8Iv1O10Y5gHsR78n09yqb/gsPdvnU0Eb5/fH1KjSdBPSdAJAiTFOjOfL+nzOJ/lGTjUi3ojRnHo4wg86nf6h0LQjd1I20XcJY5u9JU6OEBxWccNwkHiNdELB7vMdFQ3R54kFhyeteEWhJddqfqVINhx4PeOWqq27GfEhPtNOGWE3qKDShPKoWperDHDscxLHCJt2vNJ4EhzcmvKGShwDLllJKk0Id6i1K5FROfqOJ1NM3kwrgwZY80to6SWQ3g1DCIMK00wcmqVsu+Tu4XY1RzwyDQHk1oOaoIpl2loFBjG0ESIQxODiQ9xmnDlAYhvwSPFOW7Jax/nNBHMgtK+hiDG4JErRyFRu5VYLim1SplvX5V+naM6E4i8ZXaHO2igtjkKKtqlxpD4CjySd8UaAiYW582RnmY/PGS7rdKkRTnhMvUvxbHrHdEkR7q/3McLz5zs8fOxZILQm/pGedC9IhSnCqiagEh7rvq889GKc5pQbuUzfVt9R1j/ZbLR9tNsOnaB6sNkxZVWpJaT58lWL7PVD/WvoI3ORjyXbzZcLHLXFlSpLfejL4BI06DoOrygAAAAAElFTkSuQmCC" } ``` # View a Client GET /v2.01/{ClientId}/clients ### Responses Type of the platform. This field has been replaced by the `PlatformCategorization` object. The unique identifier associated with the API key, giving access to either the Sandbox or Production environment. The trading name of the company operating the platform. The registered legal name of the company operating the platform. *Emails must be ≤ 40 characters* List of email addresses to contact the platform for technical matters. \ Important: If the email length exceeds 40 characters, it will be be impossible to process some payments. List of email addresses to contact the platform for administrative or commercial matters. List of email addresses to contact the platform for billing matters. List of email addresses to contact the platform for fraud and compliance matters. The address of the platform operator’s headquarters. This parameter must be provided for the platform’s payouts to be processed. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Max. length: 15 characters; international telephone numbering plan E.164 (+ followed by the country code, then the number)* The phone number of the platform operator’s headquarters. The tax (or VAT) number for the company operating the platform. The categorization of the platform in terms of business and sector of activity. The business type of the platform. The sector of activity of the platform. The URL of the platform’s website. *Max. length: 2,000 characters* The description of what the platform does. The unique reference for the platform, which should be used when contacting Mangopay. *Hex color code* The primary color of your branding, which is displayed on some payment pages (e.g., mandate confirmation). *Hex color code* The primary color of your branding, which is displayed in call-to-action buttons on some payment pages (e.g., mandate confirmation). The URL of the platform’s logo. Logos may be added by using the Upload a Client Logo endpoint. The registration number of the company operating the platform, assigned by the relevant national authority. 4-digit merchant category code. The MCC is used to classify a business by the types of goods or services it provides. ```json 200 { "PlatformType": null, "ClientId": "sandbox4586", "Name": "Platform’s name", "RegisteredName": "Platform’s SA", "TechEmails": [ "platformtech@example.com" ], "AdminEmails": [], "BillingEmails": [], "FraudEmails": [], "HeadquartersAddress": { "AddressLine1": "Rue des plantes", "AddressLine2": "The Oasis", "City": "Paris", "Region": "Ile de France", "PostalCode": "75010", "Country": "FR" }, "HeadquartersPhoneNumber": "+330606060606", "TaxNumber": "n/a", "PlatformCategorization": { "BusinessType": "MARKETPLACE", "Sector": "RENTALS" }, "PlatformURL": "http://mangopay.com/docs/please-ignore", "PlatformDescription": "n/a", "CompanyReference": null, "PrimaryThemeColour": "#afafaf", "PrimaryButtonColour": "#ff974b", "Logo": null, "CompanyNumber": "00000000000000000000", "MCC": "0742" } ``` # The Conversion Rate object (FX) ### Description The Conversion Rate object represents a foreign exchange rate offered by Mangopay for a currency pair.  **Note – Activation required** Foreign exchange requires activation for your API environment, even in Sandbox. In Production, the feature is subject to a contract amendment. For more information or to activate contact the Support team via the Dashboard. ### Attributes **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The sell currency (the currency of the debited wallet during a conversion). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The buy currency (the currency of the credited wallet during a conversion). *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. The date and time at which the market rate was retrieved. ### Related resources Learn more about FX # View an indicative Conversion Rate GET /v2.01/{ClientId}/conversions/rate/{DebitedCurrency}/{CreditedCurrency} **Note – Rate is not guaranteed** The rate returned by the API is indicative of the rate offered by Mangopay, but it is not a guaranteed rate. For quoted conversions, the rate is guaranteed by the quote. For instant conversions, the rate is displayed in the response. Learn more about FX **→** ### Path parameters **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The sell currency (the currency of the debited wallet during a conversion). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The buy currency (the currency of the credited wallet during a conversion). ### Responses **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The sell currency (the currency of the debited wallet during a conversion). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The buy currency (the currency of the credited wallet during a conversion). *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. The date and time at which the market rate was retrieved. ```json { "Message": "Forex module is not enabled. Contact your support to activate this feature.", "Type": "forbidden_ressource", "Id": "51199cfd-d8ca-4f30-8262-955c1d2f97ec", "Date": 1699977915.0, "errors": null } ``` ```json 200 - EURGBP currency pair with markup of 100 basis points (1% or 0.01) { "DebitedCurrency": "EUR", "CreditedCurrency": "GBP", "ClientRate": 0.8315406, "MarketRate": 0.83994, "MarketRateDate": 1721742951 } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.ConversionRate; public class ViewConversionRate { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-client-password"); ConversionRate conversionRate = mangopay.getConversionsApi().getConversionRate("EUR", "GBP"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(conversionRate); System.out.println(prettyJson); } } ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; using MangoPay.SDK.Entities.GET; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; ConversionRateDTO conversionRate = await api.Conversions.GetConversionRate("EUR", "GBP"); string prettyPrint = JsonConvert.SerializeObject(conversionRate, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Conversion object (FX) ### Description The Conversion object allows you to convert funds in the Mangopay environment from one currency to another. The transaction takes place between two wallets of different currencies with the same owner. The two wallets can be either two Wallets created by the platform for its users, or two Client Wallets. There are two types of conversion: * **Instant (Spot FX)** – Conversion executed without a quote, at the rate returned in the call. * **Quoted (Guaranteed FX)** – Conversion executed against an active Quote that previously locked in the rate. **Caution – Conversions can’t be refunded** A refund is not possible for a quoted or instant conversion. You must reconvert the funds by creating another conversion with the reverse currency pair. **Note – Activation required for feature and currencies** In Production, foreign exchange services are subject to a contract amendment. In Sandbox, both the feature and currencies require activation for your API environment. For more information or to activate contact the Support team via the Dashboard. ### Attributes The unique identifier of the object. The unique identifier of the active quote which guaranteed the rate for the conversion. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The date and time at which the object was created. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author. The unique identifier of the debited wallet (in the sell currency). The unique identifier of the credited wallet (in the buy currency). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, `CreditedFunds.Amount` = (`DebitedFunds.Amount` - `Fees`) \* `MarketRate`.  Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Note:** The fees currency must match the debited funds currency. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. Information about the conversion rate used during the transaction. *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. *Max. length: 255 characters* Custom data that you can add to this object. ### Related resources Learn more about FX # Create an Instant Conversion between Client Wallets POST /v2.01/{ClientId}/clients/conversions/instant-conversion This call triggers an immediate conversion at the market rate, of the debited funds to the credited wallet at the market rate. A quote is not required for an instant conversion. ### Body parameters **Allowed values:** `FEES`, `CREDIT` The type of the client wallet to be debited: * `FEES` – Fees Wallet, for fees collected by the platform. * `CREDIT` – Repudiation Wallet, for funds related to dispute management. The amount and currency of the debited funds are defined by the quote. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  **Allowed values:** `FEES`, `CREDIT` The type of the client wallet to be credited: * `FEES` – Fees Wallet, for fees collected by the platform. * `CREDIT` – Repudiation Wallet, for funds related to dispute management. The amount and currency of the credited funds are defined by the quote. Information about the credited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. ### Responses The unique identifier of the object. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The date and time at which the object was created. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author. The unique identifier of the debited wallet (in the sell currency). The unique identifier of the credited wallet (in the buy currency). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, `CreditedFunds.Amount` = (`DebitedFunds.Amount` - `Fees`) \* `MarketRate`.  The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. Information about the conversion rate used during the transaction. *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. *Max. length: 255 characters* Custom data that you can add to this object. Functional errors (`ResultCode`) are possible on a 200 response. Read more **→** *** ```json 200 - Succeeded { "Id": "cvr_01J47619CVSEVWZE480Z245AMB", "Type": "CONVERSION", "Nature": "REGULAR", "CreationDate": 1722523100, "Status": "SUCCEEDED", "AuthorId": "farah_sandbox2", "DebitedWalletId": "FEES_EUR", "CreditedWalletId": "FEES_USD", "DebitedFunds": { "Currency": "EUR", "Amount": 5000 }, "CreditedFunds": { "Currency": "USD", "Amount": 5399 }, "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1722523101, "ConversionRateResponse": { "ClientRate": 1.071231, "MarketRate": 1.07987 }, "Tag": "Created using Mangopay API Collection Postman" } ``` ```json REST { "DebitedWalletType": "FEES", "DebitedFunds": { "Currency": "EUR", "Amount": 5000 }, "CreditedWalletType": "FEES", "CreditedFunds": { "Currency": "USD" }, "Tag": "Created using Mangopay API Collection Postman" } ``` # Create an Instant Conversion between user Wallets POST /v2.01/{ClientId}/conversions/instant-conversion This call triggers an immediate conversion at the market rate, of the debited funds to the credited wallet at the market rate. A quote is not required for an instant conversion. ### Body parameters The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author. The unique identifier of the debited wallet (in the sell currency). The unique identifier of the credited wallet (in the buy currency). Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Note:** The fees currency must match the debited funds currency. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). Required if `Fees` is sent. The currency of the fees. Required if `Fees` is sent. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* Custom data that you can add to this object. ### Responses The unique identifier of the object. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The date and time at which the object was created. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author. The unique identifier of the debited wallet (in the sell currency). The unique identifier of the credited wallet (in the buy currency). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, `CreditedFunds.Amount` = (`DebitedFunds.Amount` - `Fees`) \* `MarketRate`.  Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Note:** The fees currency must match the debited funds currency. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. Information about the conversion rate used during the transaction. *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. *Max. length: 255 characters* Custom data that you can add to this object. Functional errors (`ResultCode`) are possible on a 200 response. Read more **→** *** ```json { "Message": "Author 45671234 is not debited wallet 204089031 owner.", "Type": "author_is_not_debited_wallet_owner", "Id": "5251717e-0965-4e33-a85a-a1042775913f", "Date": 1699532783, "errors": null } ``` ```json { "Message": "Author 204068024 is not credited wallet 208282959 owner.", "Type": "author_is_not_credited_wallet_owner", "Id": "f072dcfd-d02c-4489-835f-7abe0b11fa66", "Date": 1699532982, "errors": null } ``` ```json { "Message": "Debited currency incompatibility.", "Type": "currency_incompatibility", "Id": "af071186-b891-4e0d-baeb-736c15a757e8", "Date": 1699532861, "errors": null } ``` ```json { "Message": "Credited currency incompatibility.", "Type": "currency_incompatibility", "Id": "2466e688-5f4f-4dfa-8ebe-97b5608c3dd5", "Date": 1699532915, "errors": null } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "f19eafbd-0310-4814-8f6b-691910b7b4a2", "Date": 1707323047, "errors": { "Fees.Currency": "Provided currency USD does not match debit currency of GBP" } } ``` ```json { "Message": "The currency JPY is not enabled for Forex. Contact your support to activate this feature.", "Type": "forex_not_available", "Id": "f8701d45-2540-4497-a7ce-4a3bc3181d68", "Date": 1699533051, "errors": null } ``` ```json { "Message": "Forex module is not enabled. Contact your support to activate this feature.", "Type": "forbidden_ressource", "Id": "812b8909-9fb1-45b5-9000-06e8c8d73687", "Date": 1699533020, "errors": null } ``` ```json 200 - Succeeded { "Id": "cvr_01J3G21RF2R88PCA34P287ZQPQ", "Type": "CONVERSION", "Nature": "REGULAR", "CreationDate": 1721747169, "Status": "SUCCEEDED", "AuthorId": "user_m_01HSB23417BFG7YXR7E371JSEA", "DebitedWalletId": "wlt_m_01HSJTVB0JKMMHXBEJBV6TMF96", "CreditedWalletId": "wlt_m_01J3G1CY4VH5FNMSAM8M0S5A64", "DebitedFunds": { "Currency": "GBP", "Amount": 1000 }, "CreditedFunds": { "Currency": "USD", "Amount": 1161 }, "Fees": { "Currency": "GBP", "Amount": 100 }, "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1721747170, "ConversionRateResponse": { "ClientRate": 1.277585, "MarketRate": 1.2904899 }, "Tag": "Created using the Mangopay API Postman collection" } ``` ```json REST { "AuthorId": "user_m_01HSB23417BFG7YXR7E371JSEA", "DebitedWalletId": "wlt_m_01HSJTVB0JKMMHXBEJBV6TMF96", "CreditedWalletId": "wlt_m_01J3G1CY4VH5FNMSAM8M0S5A64", "DebitedFunds": { "Currency": "GBP", "Amount": 1000 }, "CreditedFunds": { "Currency": "USD" }, "Fees": { "Currency": "GBP", "Amount": 100 }, "Tag": "Created using the Mangopay API Postman collection" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.Conversion; import com.mangopay.entities.CreateInstantConversion; public class CreatingInstantConversion { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var debitedUserId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR"; var debitedWalletId = "wlt_m_01HQT7AS0FJPGYXDXJ0R151NBV"; var creditedWalletId = "wlt_m_01HQT6422EER2N7FPRXWTSDCSV"; CreateInstantConversion instantConversion = new CreateInstantConversion(); instantConversion.setAuthorId(debitedUserId); instantConversion.setCreditedWalletId(creditedWalletId); instantConversion.setDebitedWalletId(debitedWalletId); Money debitedFunds = new Money(); debitedFunds.setCurrency(CurrencyIso.GBP); debitedFunds.setAmount(100); Money creditedFunds = new Money(); creditedFunds.setCurrency(CurrencyIso.EUR); Money fees = new Money(); fees.setCurrency(CurrencyIso.GBP); fees.setAmount(10); instantConversion.setCreditedFunds(creditedFunds); instantConversion.setDebitedFunds(debitedFunds); instantConversion.setFees(fees); instantConversion.setTag("Created using the Mangopay Java SDK"); Conversion createInstantConversion = mangopay.getConversionsApi().createInstantConversion(instantConversion, null); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createInstantConversion); System.out.println(prettyJson); } } ``` # Create a Quoted Conversion between Client Wallets POST /v2.01/{ClientId}/clients/conversions/quoted-conversion This call triggers a conversion at the rate defined in its quote. The debited funds (buy currency), credited funds (sell currency) and currencies are defined in the quote. The Client Wallets to debit and credit are defined in the conversion. Each quoted conversion requires a dedicated Quote object, linked in the `QuoteId`. **Note - Quote cannot contain fees** For a quoted conversion between client wallets, the quote cannot have fees specified. ### Body parameters The unique identifier of the active quote which guaranteed the rate for the conversion. **Allowed values:** `FEES`, `CREDIT` The type of the client wallet to be debited: * `FEES` – Fees Wallet, for fees collected by the platform. * `CREDIT` – Repudiation Wallet, for funds related to dispute management. The amount and currency of the debited funds are defined by the quote. **Allowed values:** `FEES`, `CREDIT` The type of the client wallet to be credited: * `FEES` – Fees Wallet, for fees collected by the platform. * `CREDIT` – Repudiation Wallet, for funds related to dispute management. The amount and currency of the credited funds are defined by the quote. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. ### Responses The unique identifier of the object. The unique identifier of the active quote which guaranteed the rate for the conversion. Returned `null` in the case of an instant conversion. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The date and time at which the object was created. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author. The unique identifier of the debited wallet (in the sell currency). The unique identifier of the credited wallet (in the buy currency). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, `CreditedFunds.Amount` = (`DebitedFunds.Amount` - `Fees`) \* `MarketRate`.  The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. Information about the conversion rate used during the transaction. *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. *Max. length: 255 characters* Custom data that you can add to this object. Functional errors (`ResultCode`) are possible on a 200 response. Read more **→** *** ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "b4372752-a7dd-4751-b894-d2c960df3e5c", "Date": 1721729683.0, "errors": { "QuoteId": "No fees allowed on client quoted conversion" } } ``` ```json 200 { "Id": "cvr_01J475ZYZ6WBZK3JK3HSZFXHVN", "QuoteId": "cvrquote_01J475ZRENK67V9A62JCQ6PYVW", "Type": "CONVERSION", "Nature": "REGULAR", "CreationDate": 1722523057, "Status": "SUCCEEDED", "AuthorId": "your-client-id", "DebitedWalletId": "FEES_EUR", "CreditedWalletId": "CREDIT_GBP", "DebitedFunds": { "Currency": "EUR", "Amount": 10 }, "CreditedFunds": { "Currency": "GBP", "Amount": 8 }, "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1722523057, "ConversionRateResponse": { "ClientRate": 0.8352637, "MarketRate": 0.84336 }, "Tag": "Created using Mangopay API Collection Postman" } ``` ```json REST { "QuoteId" : "cvrquote_01J475ZRENK67V9A62JCQ6PYVW", "DebitedWalletType" : "FEES", "CreditedWalletType" : "CREDIT", "Tag": "Created using Mangopay API Collection Postman" } ``` # Create a Quoted Conversion between user Wallets POST /v2.01/{ClientId}/conversions/quoted-conversion This call triggers a conversion at the rate defined in its quote. The debited funds (buy currency), credited funds (sell currency) and currencies are defined in the quote. Each quoted conversion requires a dedicated Quote object, linked in the `QuoteId`. ### Body parameters The unique identifier of the active quote which guaranteed the rate for the conversion. The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author. The unique identifier of the debited wallet (in the sell currency). The unique identifier of the credited wallet (in the buy currency). *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. ### Responses The unique identifier of the object. The unique identifier of the active quote which guaranteed the rate for the conversion. Returned `null` in the case of an instant conversion. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The date and time at which the object was created. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author. The unique identifier of the debited wallet (in the sell currency). The unique identifier of the credited wallet (in the buy currency). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, `CreditedFunds.Amount` = (`DebitedFunds.Amount` - `Fees`) \* `MarketRate`.  Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Note:** The fees currency must match the debited funds currency. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. Information about the conversion rate used during the transaction. *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. Functional errors (`ResultCode`) are possible on a 200 response. Read more **→** *** ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "ffaf5ad6-d9f1-47bf-832c-ea5da626037e", "Date": 1706192320, "errors": { "QuoteId": "Quote not found" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "31dc86e1-783e-4e34-94d0-4e1891fd74bb", "Date": 1707301282, "errors": { "QuoteId": "The quote is expired" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "2b989396-3dc7-4fcf-8a7e-2c6463262633", "Date": 1707301113, "errors": { "QuoteId": "The quote is already consumed" } } ``` ```json { "Message": "Credited currency incompatibility.", "Type": "currency_incompatibility", "Id": "47ade3b3-0c5d-4c32-ae11-1cfd23720a11", "Date": 1707314958, "errors": null } ``` ```json { "Message": "Debited currency incompatibility.", "Type": "currency_incompatibility", "Id": "f83e073e-287d-4781-bbba-87256dad4aa0", "Date": 1707315285, "errors": null } ``` ```json { "Message": "Author 204071581 is not debited wallet 214818911 owner.", "Type": "author_is_not_debited_wallet_owner", "Id": "c16cb140-0f02-4c5f-a705-9cfdb11fb499", "Date": 1708382645.0, "errors": null } ``` ```json { "Message": "Author 204071581 is not credited wallet 214818911 owner.", "Type": "author_is_not_credited_wallet_owner", "Id": "5586bf7e-8e33-4e7a-a140-107f7a9e3a26", "Date": 1708382704.0, "errors": null } ``` ```json 200 - Succeeded { "Id": "cvr_01J3G1FKHQ5NAPM2ZG8RKKD706", "QuoteId": "cvrquote_01J3G1FBKHNSB88AJ7RDRCFK9S", "Type": "CONVERSION", "Nature": "REGULAR", "CreationDate": 1721746574, "Status": "SUCCEEDED", "AuthorId": "user_m_01HSB23417BFG7YXR7E371JSEA", "DebitedWalletId": "wlt_m_01HSJTVB0JKMMHXBEJBV6TMF96", "CreditedWalletId": "wlt_m_01J3G1CY4VH5FNMSAM8M0S5A64", "DebitedFunds": { "Currency": "GBP", "Amount": 1000 }, "CreditedFunds": { "Currency": "USD", "Amount": 1162 }, "Fees": { "Currency": "GBP", "Amount": 100 }, "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1721746575, "ConversionRateResponse": { "ClientRate": 1.2787055, "MarketRate": 1.2911001 }, "Tag": "Created using the Mangopay API Postman collection" } ``` ```json REST { "QuoteId": "cvrquote_01HP1H6EK4H39SCQ8WJ349WMBB", "AuthorId": "204071581", "DebitedWalletId": "204079338", "CreditedWalletId": "209408867", "Tag": "Created using the Mangopay API Postman collection" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Conversion; import com.mangopay.entities.CreateQuotedConversion; public class CreatingQuotedConversion { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var debitedUserId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR"; var debitedWalletId = "wlt_m_01HQT7AS0FJPGYXDXJ0R151NBV"; var creditedWalletId = "wlt_m_01HQT6422EER2N7FPRXWTSDCSV"; var quoteId = "cvrquote_01J1YPZQXF6A5AAG7YCZAM9D9N"; CreateQuotedConversion quotedConversion = new CreateQuotedConversion(); quotedConversion.setQuoteId(quoteId); quotedConversion.setAuthorId(debitedUserId); quotedConversion.setDebitedWalletId(debitedWalletId); quotedConversion.setCreditedWalletId(creditedWalletId); quotedConversion.setTag("Created using the Mangopay Java SDK"); Conversion createQuotedConversion = mangopay.getConversionsApi().createQuotedConversion(quotedConversion, null); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createQuotedConversion); System.out.println(prettyJson); } } ``` # View a Conversion GET /v2.01/{ClientId}/conversions/{ConversionId} All conversions returned by this endpoint contain the `QuoteId` parameter. For instant conversions, it is `null`. **Note – Conversion data retained for 13 months** An API call to retrieve a conversion whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the conversion. ### Responses The unique identifier of the object. The unique identifier of the active quote which guaranteed the rate for the conversion. Returned `null` in the case of an instant conversion. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The date and time at which the object was created. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author. The unique identifier of the debited wallet (in the sell currency). The unique identifier of the credited wallet (in the buy currency). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, `CreditedFunds.Amount` = (`DebitedFunds.Amount` - `Fees`) \* `MarketRate`.  Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Note:** The fees currency must match the debited funds currency. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. Information about the conversion rate used during the transaction. *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. *Max. length: 255 characters* Custom data that you can add to this object. The unique identifier of the object. The unique identifier of the active quote which guaranteed the rate for the conversion. Returned `null` in the case of an instant conversion. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The date and time at which the object was created. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author. The unique identifier of the debited wallet (in the sell currency). The unique identifier of the credited wallet (in the buy currency). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, `CreditedFunds.Amount` = (`DebitedFunds.Amount` - `Fees`) \* `MarketRate`.  Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Note:** The fees currency must match the debited funds currency. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. Information about the conversion rate used during the transaction. *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. ```json 200 - Instant conversion { "Id": "cvr_01HQ1QSE554QW3HYQ9DMVF0D5H", "QuoteId": null, "Type": "CONVERSION", "Nature": "REGULAR", "CreationDate": 1708381747, "Status": "SUCCEEDED", "AuthorId": "204071581", "DebitedWalletId": "204844308", "CreditedWalletId": "204079338", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "CreditedFunds": { "Currency": "GBP", "Amount": 8468 }, "Fees": { "Currency": "EUR", "Amount": 100 }, "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1708381747, "ConversionRateResponse": { "ClientRate": 0.8468, "MarketRate": 0.8554 }, "Tag": "Created using the Mangopay API Postman collection" } ``` ```json 200 - Quoted conversion { "Id": "cvr_01HP1H6P56SSSTBZK1K9THFP79", "QuoteId": "cvrquote_01HP1H6EK4H39SCQ8WJ349WMBB", "Type": "CONVERSION", "Nature": "REGULAR", "CreationDate": 1707301099, "Status": "SUCCEEDED", "AuthorId": "204071581", "DebitedWalletId": "204079338", "CreditedWalletId": "209408867", "DebitedFunds": { "Currency": "GBP", "Amount": 1000 }, "CreditedFunds": { "Currency": "USD", "Amount": 1263 }, "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1707301100, "ConversionRateResponse": { "ClientRate": 1.2504, "MarketRate": 1.263 }, "Tag": "Created using the Mangopay API Postman collection" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Conversion; public class ViewConversion { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Conversion conversion = mangopay.getConversionsApi().getConversion("cvr_01HTFQG61V40A3SSBMPB50QQZ0"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(conversion); System.out.println(prettyJson); } } ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var conversionId = "cvr_01J53K1QWW4PHD8GN8DDYXMPTA"; var viewConversion = await api.Conversions.GetInstantConversion(conversionId); string prettyPrint = JsonConvert.SerializeObject(viewConversion, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Country Authorizations object ### Description The Country Authorization object provides information about whether or not a country is subject to the following restrictions: * Blocked user creation * Blocked bank account creation * Blocked payout creation ### Attributes **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The code of the country. Name of the country. Information about the country’s restrictions. Whether or not user creation is possible based on the user’s country of residence, address, and nationality. Whether or not bank account creation is possible based on the bank’s country of domiciliation. Whether or not payout creation is possible based on the bank’s country of domiciliation. The date and time when at least one of the country's authorizations has been last updated. ### Related resources Learn more about country restrictions # List Authorizations for all countries GET /v2.01/countries/authorizations This call returns the restrictions of all countries. ### Responses The list of countries and their restrictions. The country authorization object indicating if there are restrictions for a given country. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The code of the country. Name of the country. Information about the country’s restrictions. Whether or not user creation is possible based on the user’s country of residence, address, and nationality. Whether or not bank account creation is possible based on the bank’s country of domiciliation. Whether or not payout creation is possible based on the bank’s country of domiciliation. The date and time when at least one of the country's authorizations has been last updated. ```json 200 [ { "CountryCode":"FI", "CountryName":"Finland", "Authorization":{ "BlockUserCreation":false, "BlockBankAccountCreation":false, "BlockPayout":false }, "LastUpdate":1644574249 }, { "CountryCode":"FR", "CountryName":"France", "Authorization":{ "BlockUserCreation":false, "BlockBankAccountCreation":false, "BlockPayout":false }, "LastUpdate":1644574249 } ] ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) const listCountryAuthorizations = async () => { return await mangopay.Regulatory.getAllCountriesAuthorizations() .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listCountryAuthorizations() ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listCountryAuthorization() begin response = MangoPay::Regulatory.get_all_countries_authorizations() puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch country authorizations: #{error.message}" puts "Error details: #{error.details}" return false end end listCountryAuthorization() ``` ```java Java import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Pagination; import com.mangopay.entities.CountryAuthorization; public class ListCountryAuthorizations { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); List countryAuthorizations = mangopay.getRegulatoryApi().getAllCountriesAuthorizations(new Pagination(1, 100), null); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(countryAuthorizations); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import CountryAuthorization country_authorizations = CountryAuthorization.get_all_countries_authorizations() for country_authorization in country_authorizations: pprint(country_authorization._data) pprint(vars(country_authorization.authorization)) print() ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var countryAuthorizations = await api.Regulatory.GetAllCountriesAuthorizations(); string prettyPrint = JsonConvert.SerializeObject(countryAuthorizations, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View Authorizations for a country GET /v2.01/countries/{CountryCode}/authorizations This call returns the restrictions for a specific country. ### Path parameters **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). The code of the country. ### Responses **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The code of the country. Name of the country. Information about the country’s restrictions. Whether or not user creation is possible based on the user’s country of residence, address, and nationality. Whether or not bank account creation is possible based on the bank’s country of domiciliation. Whether or not payout creation is possible based on the bank’s country of domiciliation. The date and time when at least one of the country's authorizations has been last updated. ```json 200 { "CountryCode":"FR", "CountryName":"France", "Authorization":{ "BlockUserCreation":false, "BlockBankAccountCreation":false, "BlockPayout":false }, "LastUpdate":1463494366 } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myCountry = { code: 'FR' } const viewCountryAuthorizations = async (countryCode) => { return await mangopay.Regulatory.getCountryAuthorizations(countryCode) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewCountryAuthorizations(myCountry.code) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewCountryAuthorization(countryCode) begin response = MangoPay::Regulatory.get_country_authorizations(countryCode) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch country authorizations: #{error.message}" puts "Error details: #{error.details}" return false end end myCountry = { Code: 'FR' } viewCountryAuthorization(myCountry[:Code]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.CountryIso; import com.mangopay.entities.CountryAuthorization; public class ViewCountryAuthorization { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); CountryAuthorization viewCountryAuthorization = mangopay.getRegulatoryApi().getCountryAuthorizations(CountryIso.FR); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewCountryAuthorization); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import CountryAuthorization view_country_authorization = CountryAuthorization.get_country_authorizations(country_code='FR') pprint(view_country_authorization._data) pprint(vars(view_country_authorization.authorization)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.GET; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; CountryAuthorizationDTO countryAuthorization = await api.Regulatory.GetCountryAuthorizations(CountryIso.FR); string prettyPrint = JsonConvert.SerializeObject(countryAuthorization, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Cancel a Deposit Preauthorization or request a no-show PUT /v2.01/{ClientId}/deposit-preauthorizations/{DepositId} This endpoints allows you to take one of two actions against a deposit preauthorization, in both cases provided that no preauthorized pay-ins have been made to capture funds: * Cancel it manually by setting the `PaymentStatus` to `CANCEL`. A canceled deposit preauthorization can’t be used for any further action. * Request a no-show by setting the `PaymentStatus` to `NO_SHOW_REQUESTED`. If successful, the `PaymentStatus` `NO_SHOW` indicates that you can use the Create a Deposit Preauthorized PayIn complement endpoint to capture additional funds. ### Path parameters The unique identifier of the deposit preauthorization. ### Body parameters **Allowed values:** `CANCELED`,`NO_SHOW_REQUESTED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. ### Responses *Max. length: 255 characters* The date and time at which the object was created. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the deposit preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. Information about the deposit preauthorized pay-ins made against the deposit preauthorization. The unique identifier of the preauthorized pay-in (capture) made against the deposit preauthorization to debit the preauthorized funds. The unique identifier of the deposit preauthorized pay-in complement made against the deposit preauthorization to debit additional funds. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the Card object, obtained during the card registration process. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json { "Message": "The capture has a success status.", "Type": "invalid_action", "Id": "37b05486-e0de-4b17-9056-b3197a4d85e2", "Date": 1699264645.0, "errors": null } ``` ```json 200 { "Id": "bca6b50b-b808-4b6b-ae46-145259dd01b5", "CreationDate": 1669137965, "ExpirationDate": 1671729965, "AuthorId": "156671912", "DebitedFunds": { "Currency": "EUR", "Amount": 500 }, "Status": "SUCCEEDED", "PaymentStatus": "CANCELED", "PayinsLinked": { "PayinCaptureId": null, "PayinComplementId": null }, "ResultCode": "000000", "ResultMessage": "Success", "CardId": "156674899", "PreferredCardNetwork": null, "SecureModeReturnURL": "https://docs.mangopay.com/please-ignore?depositId=bca6b50b-b808-4b6b-ae46-145259dd01b5", "SecureModeRedirectURL": null, "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "80.236.38.245", "Billing": { "FirstName": "Joe", "LastName": "Bloggs", "Address": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null } }, "Shipping": { "FirstName": "Joe", "LastName": "Bloggs", "Address": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "Tag": "Custom meta", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json REST { "PaymentStatus": "CANCELED" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.PaymentStatus; import com.mangopay.entities.CardPreAuthorization; public class CancelPreauthorization { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); CardPreAuthorization preauthorization = mangopay.getCardPreAuthorizationApi().get("preauth_m_01J1Z336RKEZ0MF2YR26JPZCC5"); preauthorization.setPaymentStatus(PaymentStatus.CANCELED); CardPreAuthorization cancelPreauthorization = mangopay.getCardPreAuthorizationApi().update(preauthorization); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(cancelPreauthorization); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Deposit deposit_preauthorization = Deposit( id = '5ac7a986-cf01-47f0-a882-8b0928ae5458', payment_status = 'CANCELED' ) cancel_deposit_preauthorization = deposit_preauthorization.save() pprint(cancel_deposit_preauthorization) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var depositId = "deposit_m_01J333VFZYAYF6QTZ4Q5ENA9F9"; var cancelDeposit = await api.Deposits.CancelAsync(depositId); string prettyPrint = JsonConvert.SerializeObject(cancelDeposit, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Deposit Preauthorization POST /v2.01/{ClientId}/deposit-preauthorizations/card/direct ### Body parameters The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the Card object, obtained during the card registration process. **Allowed values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Allowed values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Required if the parent parameter is sent. Information about the shipping address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses *Max. length: 255 characters* The date and time at which the object was created. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the deposit preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. Information about the deposit preauthorized pay-ins made against the deposit preauthorization. The unique identifier of the preauthorized pay-in (capture) made against the deposit preauthorization to debit the preauthorized funds. The unique identifier of the deposit preauthorized pay-in complement made against the deposit preauthorization to debit additional funds. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the Card object, obtained during the card registration process. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 { "Id": "524a7e9c-cad9-4df7-9fe3-03b8948930fe", "CreationDate": 1669137219, "ExpirationDate": 1671729219, "AuthorId": "156671912", "DebitedFunds": { "Currency": "EUR", "Amount": 500 }, "Status": "CREATED", "PaymentStatus": "WAITING", "PayinsLinked": { "PayinCaptureId": null, "PayinComplementId": null }, "ResultCode": null, "ResultMessage": null, "CardId": "156674899", "PreferredCardNetwork": null, "SecureModeReturnURL": "https://docs.mangopay.com/please-ignore?depositId=524a7e9c-cad9-4df7-9fe3-03b8948930fe", "SecureModeRedirectURL": "https://api.sandbox.mangopay.com/deposit-preauthorizations/Acs/Redirect?secureSessionToken=8bf75b26-01c1-4745-8f82-727e8a047dcb", "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "80.236.38.245", "Billing": { "FirstName": "Joe", "LastName": "Bloggs", "Address": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null } }, "Shipping": { "FirstName": "Joe", "LastName": "Bloggs", "Address": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "Tag": "Custom meta", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json REST { "AuthorId": "203063430", "DebitedFunds": { "Currency": "EUR", "Amount": 20000 }, "CardId": "203076791", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore", "StatementDescriptor": null, "Culture": "EN", "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "97d6:24d6:357a:8acc:5190:606b:91a2:f60c", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75004", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75004", "Country": "FR" } }, "Tag": "Created using Mangopay API Postman Collection" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CultureCode; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.Deposit; import com.mangopay.entities.subentities.BrowserInfo; import com.mangopay.entities.subentities.CreateDeposit; public class CreateDepositPreauth { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var cardId = "card_m_01HY0MA4E2WQ0NRYQJP8X8SXMB"; CreateDeposit deposit = new CreateDeposit(); deposit.setAuthorId(userId); deposit.setCardId(cardId); deposit.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); deposit.setSecureModeReturnUrl("https://mangopay.com/docs/please-ignore"); deposit.setCulture(CultureCode.EN); deposit.setIpAddress("192.158.1.38"); deposit.setBrowserInfo(new BrowserInfo()); deposit.getBrowserInfo().setAcceptHeader("text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8"); deposit.getBrowserInfo().setJavaEnabled(true); deposit.getBrowserInfo().setLanguage("EN"); deposit.getBrowserInfo().setColorDepth(4); deposit.getBrowserInfo().setScreenHeight(1800); deposit.getBrowserInfo().setScreenWidth(400); deposit.getBrowserInfo().setTimeZoneOffset("60"); deposit.getBrowserInfo().setUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"); deposit.getBrowserInfo().setJavascriptEnabled(true); Deposit createDeposit = mangopay.getDepositApi().create(deposit, null); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createDeposit); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Deposit from mangopay.utils import Money, BrowserInfo natural_user = NaturalUser.get('213753890') deposit_preauthorization = Deposit( author_id = natural_user.id, debited_funds = Money(amount=3000, currency='EUR'), card_id = '213944219', secure_mode_return_url = 'https://mangopay.com/docs/please-ignore', browser_info = BrowserInfo( user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', screen_width = 375, screen_height = 667, color_depth = 32, language = 'EN', accept_header = 'application/json,text/javascript,*/*;q=0.01<', timezone_offset = '-120', java_enabled = True, javascript_enabled = True ), ip_address = '159.180.248.187', tag = 'Created using the Mangopay Python SDK' ) create_deposit_preauthorization = deposit_preauthorization.save() pprint(create_deposit_preauthorization) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var cardId = "card_m_01J3049JBA2XPA7GC7GEFJRQG4"; var deposit = new DepositPostDTO ( userId, new Money { Amount = 2000, Currency = CurrencyIso.EUR }, cardId, "http://www.mangopay.com/docs/please-ignore", "2001:0620:0000:0000:0211:24FF:FE80:C12C", new BrowserInfo { AcceptHeader = "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", JavaEnabled = true, Language = "FR-FR", ColorDepth = 4, ScreenHeight = 1800, ScreenWidth = 400, JavascriptEnabled = true, TimeZoneOffset = "+60", UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" } ) { Billing = new Billing { FirstName = "Joe", LastName = "Blogs", Address = new Address { AddressLine1 = "1 MangoPay Street", AddressLine2 = "The Loop", City = "Paris", Region = "Ile de France", PostalCode = "75001", Country = CountryIso.FR } }, Shipping = new Shipping { FirstName = "Joe", LastName = "Blogs", Address = new Address { AddressLine1 = "1 MangoPay Street", AddressLine2 = "The Loop", City = "Paris", Region = "Ile de France", PostalCode = "75001", Country = CountryIso.FR } }, Tag = "Created using the Mangopay .NET SDK" }; var createDepositPreauthorization = await api.Deposits.CreateAsync(deposit); string prettyPrint = JsonConvert.SerializeObject(createDepositPreauthorization, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Deposit Preauthorized PayIn complement POST /v2.01/{ClientId}/payins/deposit-preauthorized/direct/complement This endpoint allows you to make an additional capture linked to a deposit preauthorization in the following cases: * After using the Create a Deposit Preauthorized PayIn prior to complement endpoint to capture the preauthorized funds. You can use this endpoint once the `PaymentStatus` is `TO_BE_COMPLETED`. * After using the Cancel a Deposit Preauthorization or request a no-show endpoint to set the Deposit object’s `PaymentStatus` to `NO_SHOW_REQUESTED`. You can use this endpoint once the `PaymentStatus` is `NO_SHOW`. ### Body parameters The unique identifier of the user at the source of the transaction. The unique identifier of the credited wallet. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the deposit preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. ### Responses The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the credited wallet. The unique identifier of the deposit preauthorization. The unique identifier of the object. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ```json { "Message": "Deposit mode is not compatible with Complement.", "Type": "invalid_action", "Id": "c47da3ff-e846-4a5f-abf0-47a0d0ce8704", "Date": 1699263277.0, "errors": null } ``` ```json 200 { "AuthorId": "203063430", "CreditedUserId": "203063430", "CreditedWalletId": "203063456", "DepositId": "09d21294-f9ac-4797-b2b9-8cc7b4f05f1d", "Id": "0c267115-230a-4333-bcc1-2edac84c8224", "CreationDate": 1695114758, "ResultCode": "000000", "ResultMessage": "Success", "Status": "SUCCEEDED", "ExecutionDate": 1695114759, "Type": "PAYIN", "Nature": "REGULAR", "PaymentType": "PREAUTHORIZED", "ExecutionType": "DIRECT", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 9000 }, "Fees": { "Currency": "EUR", "Amount": 1000 }, "Tag": "Created using Mangopay API Postman Collection", "StatementDescriptor": null } ``` ```json REST { "AuthorId": "203063430", "CreditedWalletId": "203063456", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "Fees": { "Currency": "EUR", "Amount": 1000 }, "DepositId": "09d21294-f9ac-4797-b2b9-8cc7b4f05f1d", "Tag": "Created using Mangopay API Postman Collection" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.CardPreAuthorizedDepositPayIn; import com.mangopay.entities.subentities.CreateCardPreAuthorizedDepositPayIn; public class CreateDepositPreauthPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTF5S9MG0XXBZ8A0550MED3Z"; var depositId = "deposit_m_01J21R19BR04YQ9XTPH7860BFV"; CreateCardPreAuthorizedDepositPayIn payin = new CreateCardPreAuthorizedDepositPayIn(); payin.setAuthorId(userId); payin.setCreditedWalletId(walletId); payin.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); payin.setFees(new Money(CurrencyIso.EUR, 1000)); payin.setDepositId(depositId); payin.setTag("Created using the Mangopay Java SDK"); CardPreAuthorizedDepositPayIn createPayin = mangopay.getPayInApi().createCardPreAuthorizedDepositPayIn(payin, null); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, CardPreAuthorizedDepositPayIn from mangopay.utils import Money natural_user = NaturalUser.get('213753890') preauthorized_deposit_payin = CardPreAuthorizedDepositPayIn( author_id = natural_user.id, credited_wallet_id = '213754077', deposit_id = '3766b5f6-717b-4863-b0e9-aab4d174ad88', debited_funds = Money(amount=10, currency='EUR'), fees = Money(amount=0, currency='EUR'), tag='Created using the Mangopay Python SDK' ) create_preauthorized_deposit_payin = preauthorized_deposit_payin.save() pprint(create_preauthorized_deposit_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var depositId = "deposit_m_01J332W8CHP62NYWXTQFHSQ6SR"; var depositPayIn = new CardPreAuthorizedDepositPayInPostDTO ( walletId, new Money { Amount = 1200, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, depositId ) { Tag = "Created using the Mangopay .NET SDK" }; var createDepositPayIn = await api.PayIns.CreateCardPreAuthorizedDepositPayIn(depositPayIn); string prettyPrint = JsonConvert.SerializeObject(createDepositPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Deposit Preauthorized PayIn prior to complement POST /v2.01/{ClientId}/payins/deposit-preauthorized/direct/capture-with-complement This endpoint allows you to capture the preauthorized funds without closing the preauthorization deposit object. It can be used prior to capturing additional funds with the Create a Deposit Preauthorized PayIn complement endpoint. **Note – Pay-in prior to complement must be full capture** The pay-in requested on this endpoint (prior to complement) must be a full capture of the preauthorized amount - it can’t be partial. ### Body parameters The unique identifier of the user at the source of the transaction. The unique identifier of the credited wallet. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the deposit preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. ### Responses The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the credited wallet. The unique identifier of the deposit preauthorization. The unique identifier of the object. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "c15a0451-5f23-46b9-b6ec-74f3a74f18c6", "Date": 1699263395, "errors": { "DebitedFunds": "The value should be equal to 20000" } } ``` ```json { "Message": "The deposit is not in the PreAuthorized status.", "Type": "invalid_action", "Id": "bc763733-37ca-4eb9-88bb-0829194652db", "Date": 1695118133, "errors": null } ``` ```json 200 - Succeeded { "AuthorId": "203063430", "CreditedUserId": "203063430", "CreditedWalletId": "203063456", "DepositId": "09d21294-f9ac-4797-b2b9-8cc7b4f05f1d", "Id": "265d22b6-a3dc-48a4-a685-8655e5bcac6f", "CreationDate": 1695114697, "ResultCode": "000000", "ResultMessage": "Success", "Status": "SUCCEEDED", "ExecutionDate": 1695114698, "Type": "PAYIN", "Nature": "REGULAR", "PaymentType": "PREAUTHORIZED", "ExecutionType": "DIRECT", "DebitedFunds": { "Currency": "EUR", "Amount": 20000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 19000 }, "Fees": { "Currency": "EUR", "Amount": 1000 }, "Tag": "Created using Mangopay API Postman Collection" } ``` ```json REST { "AuthorId": "203063430", "CreditedWalletId": "203063456", "DebitedFunds": { "Currency": "EUR", "Amount": 20000 }, "Fees": { "Currency": "EUR", "Amount": 1000 }, "DepositId": "09d21294-f9ac-4797-b2b9-8cc7b4f05f1d", "Tag": "Created using Mangopay API Postman Collection" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.CardPreAuthorizedDepositPayIn; import com.mangopay.entities.subentities.CreateCardPreAuthorizedDepositPayIn; public class CreateDepositPreauthPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTF5S9MG0XXBZ8A0550MED3Z"; var depositId = "deposit_m_01J21R19BR04YQ9XTPH7860BFV"; CreateCardPreAuthorizedDepositPayIn payin = new CreateCardPreAuthorizedDepositPayIn(); payin.setAuthorId(userId); payin.setCreditedWalletId(walletId); payin.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); payin.setFees(new Money(CurrencyIso.EUR, 1000)); payin.setDepositId(depositId); payin.setTag("Created using the Mangopay Java SDK"); CardPreAuthorizedDepositPayIn createPayin = mangopay.getPayInApi().createCardPreAuthorizedDepositPayIn(payin, null); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, CardPreAuthorizedDepositPayIn from mangopay.utils import Money natural_user = NaturalUser.get('213753890') preauthorized_deposit_payin = CardPreAuthorizedDepositPayIn( author_id = natural_user.id, credited_wallet_id = '213754077', deposit_id = '3766b5f6-717b-4863-b0e9-aab4d174ad88', debited_funds = Money(amount=10, currency='EUR'), fees = Money(amount=0, currency='EUR'), tag='Created using the Mangopay Python SDK' ) create_preauthorized_deposit_payin = preauthorized_deposit_payin.save() pprint(create_preauthorized_deposit_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var depositId = "deposit_m_01J332W8CHP62NYWXTQFHSQ6SR"; var depositPayIn = new CardPreAuthorizedDepositPayInPostDTO ( walletId, new Money { Amount = 1200, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, depositId ) { Tag = "Created using the Mangopay .NET SDK" }; var createDepositPayIn = await api.PayIns.CreateCardPreAuthorizedDepositPayIn(depositPayIn); string prettyPrint = JsonConvert.SerializeObject(createDepositPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Deposit Preauthorized PayIn without complement POST /v2.01/{ClientId}/payins/deposit-preauthorized/direct/full-capture ### Body parameters The unique identifier of the user at the source of the transaction. The unique identifier of the credited wallet. The unique identifier of the deposit preauthorization. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. ### Responses **Default values:** The `AuthorId` of the Deposit Preauthorization object. **Returned values:** The `AuthorId` of the Deposit Preauthorization object. The unique identifier of the user at the source of the transaction. On the Deposit Preauthorized PayIn, this parameter returns the same value as the `AuthorId` of the Deposit Preauthorization object, regardless of the value sent. **Default value:** The `AuthorId` of the Deposit Preauthorization object. The unique identifier of the user whose wallet is credited. On the Deposit Preauthorized PayIn, this parameter returns the same value as the `AuthorId` of the Deposit Preauthorization object, regardless of the value sent. The unique identifier of the credited wallet. The unique identifier of the deposit preauthorization. The unique identifier of the object. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. ```json { "Message": "CreditedUserExternalId:204069570 must be Equal to authorId:204068024.", "Type": "invalid_action", "Id": "42ba6af2-75ba-4d2b-92e9-b72650db3787", "Date": 1696492277, "errors": null } ``` ```json 200 { "AuthorId": "156671912", "CreditedUserId": "156671912", "CreditedWalletId": "154851912", "DepositId": "524a7e9c-cad9-4df7-9fe3-03b8948930fe", "Id": "1719d157-5a97-4af3-91b0-7d660b34b21c", "CreationDate": 1669137480, "ResultCode": "000000", "ResultMessage": "Success", "Status": "SUCCEEDED", "ExecutionDate": 1669137481, "Type": "PAYIN", "Nature": "REGULAR", "PaymentType": "PREAUTHORIZED", "ExecutionType": "DIRECT", "DebitedFunds": { "Currency": "EUR", "Amount": 500 }, "CreditedFunds": { "Currency": "EUR", "Amount": 500 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Tag": "custom meta" } ``` ```json REST { "AuthorId": "203063430", "CreditedWalletId": "203063456", "DebitedFunds": { "Currency": "EUR", "Amount": 20000 }, "Fees": { "Currency": "EUR", "Amount": 1000 }, "DepositId": "09d21294-f9ac-4797-b2b9-8cc7b4f05f1d", "Tag": "Created using Mangopay API Postman Collection" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.CardPreAuthorizedDepositPayIn; import com.mangopay.entities.subentities.CreateCardPreAuthorizedDepositPayIn; public class CreateDepositPreauthPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTF5S9MG0XXBZ8A0550MED3Z"; var depositId = "deposit_m_01J21R19BR04YQ9XTPH7860BFV"; CreateCardPreAuthorizedDepositPayIn payin = new CreateCardPreAuthorizedDepositPayIn(); payin.setAuthorId(userId); payin.setCreditedWalletId(walletId); payin.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); payin.setFees(new Money(CurrencyIso.EUR, 1000)); payin.setDepositId(depositId); payin.setTag("Created using the Mangopay Java SDK"); CardPreAuthorizedDepositPayIn createPayin = mangopay.getPayInApi().createCardPreAuthorizedDepositPayIn(payin, null); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, CardPreAuthorizedDepositPayIn from mangopay.utils import Money natural_user = NaturalUser.get('213753890') preauthorized_deposit_payin = CardPreAuthorizedDepositPayIn( author_id = natural_user.id, credited_wallet_id = '213754077', deposit_id = '3766b5f6-717b-4863-b0e9-aab4d174ad88', debited_funds = Money(amount=10, currency='EUR'), fees = Money(amount=0, currency='EUR'), tag='Created using the Mangopay Python SDK' ) create_preauthorized_deposit_payin = preauthorized_deposit_payin.save() pprint(create_preauthorized_deposit_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var depositId = "deposit_m_01J332W8CHP62NYWXTQFHSQ6SR"; var depositPayIn = new CardPreAuthorizedDepositPayInPostDTO ( walletId, new Money { Amount = 1200, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, depositId ) { Tag = "Created using the Mangopay .NET SDK" }; var createDepositPayIn = await api.PayIns.CreateCardPreAuthorizedDepositPayIn(depositPayIn); string prettyPrint = JsonConvert.SerializeObject(createDepositPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Deposit Preauthorization object ### Description The Deposit Preauthorization object enables you to reserve funds on a card so they can be captured later. A deposit preauthorization thus has two parts: * Authorization of the transaction, handled by the Deposit Preauthorization object * Capture of the funds, handled by the Deposit Preauthorized PayIn object The preauthorized funds can be captured within 29.5 days of a successful authorization. Note that preauthorizations may not be permitted by some issuers and for some card types. The Deposit Preauthorization feature also allows you to charge a complement against it, either on top of the preauthorized amount or instead of it (by declaring a no-show). **Caution – Multi-capture not possible with the Deposit Preauthorization** A maximum of two captures are possible against a Deposit Preauthorization: (i) the initial pay-in to capture the preauthorized amount, and/or (ii) a pay-in complement to capture an additional amount. Multiple partial captures are not possible with the Deposit Preauthorization like they are with the Preauthorization object. ### Attributes *Max. length: 255 characters* The date and time at which the object was created. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the deposit preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. Information about the deposit preauthorized pay-ins made against the deposit preauthorization. The unique identifier of the preauthorized pay-in (capture) made against the deposit preauthorization to debit the preauthorized funds. The unique identifier of the deposit preauthorized pay-in complement made against the deposit preauthorization to debit additional funds. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the Card object, obtained during the card registration process. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. *Max. length: 255 characters* Custom data that you can add to this object. Information about the card used for the transaction. \ If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about 30-day preauthorization # The Deposit Preauthorized PayIn object ### Description The Deposit Preauthorized PayIn object represents a request to capture funds previously authorized with a Deposit Preauthorization object.  The preauthorized pay-in must be: * Of an amount equal to or less than the preauthorized amount * Done within 30 days of a successful authorization ### Attributes The unique identifier of the user at the source of the transaction. **Default value:** The `AuthorId` of the Deposit Preauthorization object. The unique identifier of the user whose wallet is credited. On the Deposit Preauthorized PayIn, this parameter returns the same value as the `AuthorId` of the Deposit Preauthorization object, regardless of the value sent. The unique identifier of the deposit preauthorization. The unique identifier of the object. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* Custom data that you can add to this object. # List Deposit Preauthorizations for a Card GET /v2.01/{ClientId}/cards/{CardId}/deposit-preauthorizations ### Query parameters The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. **Allowed values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. ### Responses List of deposit preauthorizations created by the platform. The deposit preauthorization created by the platform. *Max. length: 255 characters* The date and time at which the object was created. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the deposit preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made. The date and time at which successful authorization occurred. If authorization failed, the value is `null`. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. **Returned values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. Information about the deposit preauthorized pay-ins made against the deposit preauthorization. The unique identifier of the preauthorized pay-in (capture) made against the deposit preauthorization to debit the preauthorized funds. The unique identifier of the deposit preauthorized pay-in complement made against the deposit preauthorization to debit additional funds. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `KLARNA` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, NL, NO, PL, PT, SK, SV. The language in which the payment page is to be displayed. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if supplied. Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 [ { "Id": "78e82d95-bf01-4633-84d9-f433e1130eba", "CreationDate": 1696256380, "ExpirationDate": 1698848380, "AuthorizationDate": 1696256388, "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 22223 }, "Status": "SUCCEEDED", "PaymentStatus": "CANCELED", "PayinsLinked": { "PayinCaptureId": null, "PayinComplementId": null }, "ResultCode": "000000", "ResultMessage": "Success", "CardId": "204068248", "PreferredCardNetwork": null, "SecureModeReturnURL": null, "SecureModeRedirectURL": null, "SecureModeNeeded": null, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": null, "BrowserInfo": null, "IpAddress": null, "Billing": null, "Shipping": null, "Requested3DSVersion": null, "Applied3DSVersion": null, "Tag": "Created using Mangopay API Postman Collection", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ] ``` # List Deposit Preauthorizations for a User GET /v2.01/{ClientId}/users/{UserId}/deposit-preauthorizations ### Query parameters The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. **Allowed values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. ### Responses List of deposit preauthorizations created by the platform. The deposit preauthorization created by the platform. *Max. length: 255 characters* The date and time at which the object was created. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the deposit preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made. The date and time at which successful authorization occurred. If authorization failed, the value is `null`. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. **Returned values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. Information about the deposit preauthorized pay-ins made against the deposit preauthorization. The unique identifier of the preauthorized pay-in (capture) made against the deposit preauthorization to debit the preauthorized funds. The unique identifier of the deposit preauthorized pay-in complement made against the deposit preauthorization to debit additional funds. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `KLARNA` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, NL, NO, PL, PT, SK, SV. The language in which the payment page is to be displayed. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if supplied. Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 [ { "Id": "748bfd3c-96f0-4475-949b-3aedfa3bdcfc", "CreationDate": 1696255231, "ExpirationDate": 1698847231, "AuthorizationDate": 1696255242, "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 22220 }, "Status": "SUCCEEDED", "PaymentStatus": "CANCELED", "PayinsLinked": { "PayinCaptureId": null, "PayinComplementId": null }, "ResultCode": "000000", "ResultMessage": "Success", "CardId": "204068248", "PreferredCardNetwork": null, "SecureModeReturnURL": null, "SecureModeRedirectURL": null, "SecureModeNeeded": null, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": null, "BrowserInfo": null, "IpAddress": null, "Billing": null, "Shipping": null, "Requested3DSVersion": null, "Applied3DSVersion": null, "Tag": "Created using Mangopay API Postman Collection", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ] ``` # View a Deposit Preauthorization GET /v2.01/{ClientId}/deposit-preauthorizations/{DepositId} ### Path parameters The unique identifier of the deposit preauthorization. ### Responses *Max. length: 255 characters* The date and time at which the object was created. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the deposit preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made. The date and time at which successful authorization occurred. If authorization failed, the value is `null`. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. Information about the deposit preauthorized pay-ins made against the deposit preauthorization. The unique identifier of the preauthorized pay-in (capture) made against the deposit preauthorization to debit the preauthorized funds. The unique identifier of the deposit preauthorized pay-in complement made against the deposit preauthorization to debit additional funds. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the Card object, obtained during the card registration process. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. *Max. length: 255 characters* The date and time at which the object was created. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the deposit preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made. The date and time at which successful authorization occurred. If authorization failed, the value is `null`. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. Information about the deposit preauthorized pay-ins made against the deposit preauthorization. The unique identifier of the preauthorized pay-in (capture) made against the deposit preauthorization to debit the preauthorized funds. The unique identifier of the deposit preauthorized pay-in complement made against the deposit preauthorization to debit additional funds. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the Card object, obtained during the card registration process. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. *Max. length: 255 characters* The date and time at which the object was created. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the deposit preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made. The date and time at which successful authorization occurred. If authorization failed, the value is `null`. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. Information about the deposit preauthorized pay-ins made against the deposit preauthorization. The unique identifier of the preauthorized pay-in (capture) made against the deposit preauthorization to debit the preauthorized funds. The unique identifier of the deposit preauthorized pay-in complement made against the deposit preauthorization to debit additional funds. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the Card object, obtained during the card registration process. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. *Max. length: 255 characters* The date and time at which the object was created. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the deposit preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made. The date and time at which successful authorization occurred. If authorization failed, the value is `null`. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. Information about the deposit preauthorized pay-ins made against the deposit preauthorization. The unique identifier of the preauthorized pay-in (capture) made against the deposit preauthorization to debit the preauthorized funds. The unique identifier of the deposit preauthorized pay-in complement made against the deposit preauthorization to debit additional funds. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the Card object, obtained during the card registration process. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. *Max. length: 255 characters* Custom data that you can add to this object. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 - Capture without complement { "Id": "524a7e9c-cad9-4df7-9fe3-03b8948930fe", "CreationDate": 1669137219, "ExpirationDate": 1671729219, "AuthorizationDate": 1669137235, "AuthorId": "156671912", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "Status": "SUCCEEDED", "PaymentStatus": "VALIDATED", "PayinsLinked": { "PayinCaptureId": "1719d157-5a97-4af3-91b0-7d660b34b21c", "PayinComplementId": null }, "ResultCode": "000000", "ResultMessage": "Success", "CardId": "156674899", "PreferredCardNetwork": null, "SecureModeReturnURL": "https://docs.mangopay.com/please-ignore?depositId=524a7e9c-cad9-4df7-9fe3-03b8948930fe", "SecureModeRedirectURL": "https://api.sandbox.mangopay.com/deposit-preauthorizations/Acs/Redirect?secureSessionToken=8bf75b26-01c1-4745-8f82-727e8a047dcb", "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "80.236.38.245", "Billing": { "FirstName": "Joe", "LastName": "Bloggs", "Address": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null } }, "Shipping": { "FirstName": "Joe", "LastName": "Bloggs", "Address": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "Tag":"Custom meta", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json 200 - Capture made prior to complement { "Id": "09d21294-f9ac-4797-b2b9-8cc7b4f05f1d", "CreationDate": 1695114673, "ExpirationDate": 1697706673, "AuthorizationDate": 1695114682, "AuthorId": "203063430", "DebitedFunds": { "Currency": "EUR", "Amount": 20000 }, "Status": "SUCCEEDED", "PaymentStatus": "TO_BE_COMPLETED", "PayinsLinked": { "PayinCaptureId": "265d22b6-a3dc-48a4-a685-8655e5bcac6f", "PayinComplementId": null }, "ResultCode": "000000", "ResultMessage": "Success", "CardId": "203076791", "PreferredCardNetwork": null, "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore?depositId=09d21294-f9ac-4797-b2b9-8cc7b4f05f1d", "SecureModeRedirectURL": "https://api.sandbox.mangopay.com/deposit-preauthorizations/Acs/Redirect?secureSessionToken=fb86b917-c81a-47a0-83bc-a737b2199819", "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "97d6:24d6:357a:8acc:5190:606b:91a2:f60c", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75004", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75004", "Country": "FR" } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "Tag": "Created using Mangopay API Postman Collection", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json 200 - Capture and complement made { "Id": "09d21294-f9ac-4797-b2b9-8cc7b4f05f1d", "CreationDate": 1695114673, "ExpirationDate": 1697706673, "AuthorizationDate": 1695114682, "AuthorId": "203063430", "DebitedFunds": { "Currency": "EUR", "Amount": 20000 }, "Status": "SUCCEEDED", "PaymentStatus": "VALIDATED", "PayinsLinked": { "PayinCaptureId": "265d22b6-a3dc-48a4-a685-8655e5bcac6f", "PayinComplementId": "0c267115-230a-4333-bcc1-2edac84c8224" }, "ResultCode": "000000", "ResultMessage": "Success", "CardId": "203076791", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore?depositId=09d21294-f9ac-4797-b2b9-8cc7b4f05f1d", "SecureModeRedirectURL": "https://api.sandbox.mangopay.com/deposit-preauthorizations/Acs/Redirect?secureSessionToken=fb86b917-c81a-47a0-83bc-a737b2199819", "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "97d6:24d6:357a:8acc:5190:606b:91a2:f60c", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75004", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75004", "Country": "FR" } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "Tag": "Created using Mangopay API Postman Collection", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json 200 - No-show declared and complement made { "Id": "4f6e5390-48f1-4a04-abd1-ede66da94466", "CreationDate": 1695115172, "ExpirationDate": 1697707172, "AuthorizationDate": 1695115194, "AuthorId": "203063430", "DebitedFunds": { "Currency": "EUR", "Amount": 20000 }, "Status": "SUCCEEDED", "PaymentStatus": "VALIDATED", "PayinsLinked": { "PayinCaptureId": null, "PayinComplementId": "7c89d633-2023-440c-843a-ac8ce2a683a4" }, "ResultCode": "000000", "ResultMessage": "Success", "CardId": "203076791", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore?depositId=4f6e5390-48f1-4a04-abd1-ede66da94466", "SecureModeRedirectURL": "https://api.sandbox.mangopay.com/deposit-preauthorizations/Acs/Redirect?secureSessionToken=48c40631-31de-40d6-bbac-3a59d0ae7e5b", "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "1e34:f7f8:c8c8:fb03:b603:7479:abcd:65c8", "Billing": { "FirstName": "Nels", "LastName": "Littel", "Address": { "AddressLine1": "9675 Gussie Crescent", "AddressLine2": "Mortimer Shores", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" } }, "Shipping": { "FirstName": "Nels", "LastName": "Littel", "Address": { "AddressLine1": "9675 Gussie Crescent", "AddressLine2": "Mortimer Shores", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "Tag": "Created using Mangopay API Postman Collection", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Deposit; public class ViewDepositPreauth { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Deposit getDeposit = mangopay.getDepositApi().cancel("deposit_m_01J21RMN7TET5VNNJJQTMYEX8Z"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(getDeposit); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Deposit deposit_preauthorization = Deposit( id = '11057b51-7bfc-43e9-bdec-268ba41148cc' ) try: view_deposit_preauthorization = Deposit.get(deposit_preauthorization.id) pprint(vars(view_deposit_preauthorization)) pprint(vars(view_deposit_preauthorization.billing)) pprint(vars(view_deposit_preauthorization.browser_info)) pprint(vars(view_deposit_preauthorization.payins_linked)) pprint(vars(view_deposit_preauthorization.shipping)) except Deposit.DoesNotExist: print('The Deposit PreAuthorization {} does not exist'.format(deposit_preauthorization.id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var depositId = "deposit_m_01J332W8CHP62NYWXTQFHSQ6SR"; var viewDeposit = await api.Deposits.GetAsync(depositId); string prettyPrint = JsonConvert.SerializeObject(viewDeposit, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a PayIn (Deposit Preauthorized Card) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the user at the source of the transaction. **Default value:** The `AuthorId` of the Deposit Preauthorization object. The unique identifier of the user whose wallet is credited. On the Deposit Preauthorized PayIn, this parameter returns the same value as the `AuthorId` of the Deposit Preauthorization object, regardless of the value sent. The unique identifier of the credited wallet. The unique identifier of the deposit preauthorization. The unique identifier of the object. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. ```json 200 { "AuthorId": "204068024", "CreditedUserId": "204068024", "CreditedWalletId": "204089031", "DepositId": "bda62a05-2d3d-4cd8-8763-53d8dffdab49", "Id": "b45fb6f7-75d4-4757-a8e5-6fe46d9edde2", "CreationDate": 1696583378, "ResultCode": "000000", "ResultMessage": "Success", "Status": "SUCCEEDED", "ExecutionDate": 1696583379, "Type": "PAYIN", "Nature": "REGULAR", "PaymentType": "PREAUTHORIZED", "ExecutionType": "DIRECT", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 9000 }, "Fees": { "Currency": "EUR", "Amount": 1000 }, "Tag": "Created using Mangopay API Postman Collection" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetAsync("payin_m_01J334XF2V6751GRG9M2M558HG"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Direct Card PayIn POST /v2.01/{ClientId}/payins/card/direct [Read more about the Direct Card PayIn object →](/api-reference/direct-card-payins/direct-card-payin-object) ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. **Allowed values:** `DEFAULT`, `FORCE`, `NO_CHOICE` **Default value:** `DEFAULT` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). The language in which the payment page is to be displayed. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Required if the parent parameter is sent. Information about the shipping address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. **Allowed values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The unique identifier of the recurring pay-in registration. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json { "Message": "Error: multi-currency usage is not authorized", "Type": "currency_incompatibility", "Id": "e384d310-ab19-4455-bf27-f54822361bd3", "Date": 1700045351.0, "errors": { "currency": "The card's currency GBP and the debitedAmount's currency EUR must be the same" } } ``` ```json { "Message": "Error: multi-currency usage is not authorized", "Type": "currency_incompatibility", "Id": "1f29b2ff-cf01-4185-9cfd-c0545f6cbd0c", "Date": 1700044992.0, "errors": { "currency": "The Wallet's currency GBP and the DebitedFunds's currency EUR must be the same" } } ``` ```json 200 { "Id": "209160523", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1700210889, "AuthorId": "204069570", "CreditedUserId": "204069570", "DebitedFunds": { "Currency": "EUR", "Amount": 57842 }, "CreditedFunds": { "Currency": "EUR", "Amount": 48965 }, "Fees": { "Currency": "EUR", "Amount": 8877 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204069727", "DebitedWalletId": null, "PaymentType": "CARD", "ExecutionType": "DIRECT", "SecureMode": "DEFAULT", "CardId": "209160226", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore?transactionId=209160523", "SecureModeRedirectURL": "https://api.sandbox.mangopay.com:443/Redirect/ACSWithValidation?token=39265d841d7044a98e44253fbda2870c&mgpsecureid=39265d841d7044a98e44253fbda2870c", "SecureModeNeeded": true, "Culture": "EN", "SecurityInfo": { "AVSResult": "NO_CHECK" }, "StatementDescriptor": "Mangopay", "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "en", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "658e:1b88:7f7a:a60b:32af:0b7f:56e1:2e9a", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "RecurringPayinRegistrationId": null, "PreferredCardNetwork": null, "PaymentCategory": "ECommerce", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json REST { "Tag": "Created using Mangopay API Postman Collection", "AuthorId": "204069570", "CreditedUserId": "204069570", "DebitedFunds": { "Currency": "EUR", "Amount": 57842 }, "Fees": { "Currency": "EUR", "Amount": 8877 }, "CreditedWalletId": "204069727", "SecureMode": "DEFAULT", "CardId": "209160226", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore", "StatementDescriptor": "Mangopay", "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "en", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "658e:1b88:7f7a:a60b:32af:0b7f:56e1:2e9a", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" } } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payIn = new \MangoPay\PayIn(); $payIn->Tag = "Created using Mangopay PHP SDK"; $payIn->CreditedWalletId = "148968396"; $payIn->PaymentType = "CARD"; $payIn->AuthorId = "146476890"; $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = "EUR"; $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = "EUR"; $payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsCard(); $payIn->PaymentDetails->CardId = "169687329"; $payIn->PaymentDetails->StatementDescriptor = "Mangopay"; $payIn->PaymentDetails->IpAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C"; $payIn->PaymentDetails->BrowserInfo = new \MangoPay\BrowserInfo(); $payIn->PaymentDetails->BrowserInfo->AcceptHeader = "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8"; $payIn->PaymentDetails->BrowserInfo->JavaEnabled = true; $payIn->PaymentDetails->BrowserInfo->Language = "FR-FR"; $payIn->PaymentDetails->BrowserInfo->ColorDepth = 4; $payIn->PaymentDetails->BrowserInfo->ScreenHeight = 1800; $payIn->PaymentDetails->BrowserInfo->ScreenWidth = 400; $payIn->PaymentDetails->BrowserInfo->TimeZoneOffset = 60; $payIn->PaymentDetails->BrowserInfo->UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"; $payIn->PaymentDetails->BrowserInfo->JavascriptEnabled = true; $payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); $payIn->ExecutionDetails->SecureModeReturnURL = "https://mangopay.com/docs/please-ignore"; $payIn->ExecutionDetails->Culture = 'FR'; $response = $api->PayIns->Create($payIn); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myDirectCardPayIn = { PaymentType: 'CARD', ExecutionType: 'DIRECT', AuthorId: '146476890', Tag: 'Created with Mangopay Node.js SDK', CreditedUserId: '146476890', DebitedFunds: { Currency: 'EUR', Amount: 1000, }, Fees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '148968396', CardId: '169687329', CardType: 'CB_VISA_MASTERCARD', SecureMode: 'DEFAULT', SecureModeReturnURL: 'https://mangopay.com/docs/please-ignore', BrowserInfo: { AcceptHeader: 'text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8', JavaEnabled: true, Language: 'FR-FR', ColorDepth: 4, ScreenHeight: 1800, ScreenWidth: 400, TimeZoneOffset: 60, UserAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', JavascriptEnabled: true, }, IpAddress: '2d1b:f91a:075a:7fc8:0cb7:b471:cd55:017e', Billing: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, Shipping: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, StatementDescriptor: 'Nov2023', } const createDirectCardPayIn = async (payin) => { return await mangopay.PayIns.create(payin) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createDirectCardPayIn(myDirectCardPayIn) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createDirectCardPayIn(payInObject) begin response = MangoPay::PayIn::Card::Direct.create(payInObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create pay-in: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { AuthorId: '192822811', Tag: 'Created with Mangopay Ruby SDK', CreditedUserId: '192822811', DebitedFunds: { Currency: 'EUR', Amount: 1200, }, Fees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '192822814', CardId: '192822826', CardType: 'CB_VISA_MASTERCARD', SecureMode: 'DEFAULT', SecureModeReturnURL: 'https://mangopay.com/docs/please-ignore', BrowserInfo: { AcceptHeader: 'text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8', JavaEnabled: true, Language: 'FR-FR', ColorDepth: 4, ScreenHeight: 1800, ScreenWidth: 400, TimeZoneOffset: 60, UserAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', JavascriptEnabled: true, }, IpAddress: '2d1b:f91a:075a:7fc8:0cb7:b471:cd55:017e', Billing: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, Shipping: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, StatementDescriptor: 'Nov2023', } createDirectCardPayIn(myPayIn) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.core.Billing; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CountryIso; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.core.enumerations.SecureMode; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.BrowserInfo; import com.mangopay.entities.subentities.PayInExecutionDetailsDirect; import com.mangopay.entities.subentities.PayInPaymentDetailsCard; public class CreateDirectCardPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; String walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; String cardId = "card_m_01HY0MA4E2WQ0NRYQJP8X8SXMB"; PayIn payIn = new PayIn(); Money debitedFunds = new Money(); debitedFunds.setAmount(500); debitedFunds.setCurrency(CurrencyIso.EUR); Money fees = new Money(); fees.setAmount(0); fees.setCurrency(CurrencyIso.EUR); BrowserInfo browserInfo = new BrowserInfo(); browserInfo.setAcceptHeader("application/json,text/javascript,*/*;q=0.01<"); browserInfo.setJavaEnabled(true); browserInfo.setLanguage("fr"); browserInfo.setColorDepth(32); browserInfo.setScreenHeight(667); browserInfo.setScreenWidth(375); browserInfo.setTimeZoneOffset("-120"); browserInfo.setUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"); browserInfo.setJavascriptEnabled(true); Address address = new Address(); Billing billing = new Billing(); address.setAddressLine1("2795 Edgewood Road"); address.setCity("Little Rock"); address.setRegion("Arkansas"); address.setPostalCode("72212"); address.setCountry(CountryIso.FR); billing.setFirstName("Alex"); billing.setLastName("Smith"); billing.setAddress(address); PayInExecutionDetailsDirect executionDetails = new PayInExecutionDetailsDirect(); executionDetails.setBilling(billing); executionDetails.setCardId(cardId); executionDetails.setSecureModeReturnUrl("https://mangopay.com/docs/please-ignore"); executionDetails.setSecureMode(SecureMode.DEFAULT); PayInPaymentDetailsCard paymentDetails = new PayInPaymentDetailsCard(); paymentDetails.setIpAddress("658e:1b88:7f7a:a60b:32af:0b7f:56e1:2e9a"); paymentDetails.setBrowserInfo(browserInfo); payIn.setPaymentType(PayInPaymentType.CARD); payIn.setExecutionType(PayInExecutionType.DIRECT); payIn.setAuthorId(userId); payIn.setDebitedFunds(debitedFunds); payIn.setFees(fees); payIn.setCreditedWalletId(walletId); payIn.setExecutionDetails(executionDetails); payIn.setPaymentDetails(paymentDetails); PayIn createPayIn = mangopay.getPayInApi().create(payIn); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPayIn); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, LegalUser, Wallet, Card, DirectPayIn from mangopay.utils import Money, BrowserInfo legal_user = LegalUser.get('211918806') legal_user_wallet = Wallet.get('214564765') natural_user = NaturalUser.get('213753890') natural_user_card= Card.get('213944219') direct_payin = DirectPayIn( author = natural_user, debited_funds = Money(amount=1000, currency='EUR'), fees = Money(amount=1, currency='EUR'), credited_wallet_id = legal_user_wallet.id, card_id = natural_user_card, secure_mode = 'DEFAULT', secure_mode_return_url = "https://mangopay.com/docs/please-ignore", tag = 'Created with Mangopay Python SDK', browser_info = BrowserInfo( user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', screen_width = 375, screen_height = 667, color_depth = 32, language = 'EN', accept_header = 'application/json,text/javascript,*/*;q=0.01<', timezone_offset = '-120', java_enabled = True, javascript_enabled = True ), ip_address = '159.180.248.187', ) create_direct_payin = direct_payin.save() pprint(create_direct_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var cardId = "card_m_01J3049JBA2XPA7GC7GEFJRQG4"; var directCardPayin = new PayInCardDirectPostDTO(userId, userId, new Money { Amount = 1000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, "http://www.mangopay.com/docs/please-ignore", cardId) { CardType = CardType.CB_VISA_MASTERCARD, IpAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C", Requested3DSVersion = "V2_1", BrowserInfo = new BrowserInfo { AcceptHeader = "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", JavaEnabled = true, Language = "FR-FR", ColorDepth = 4, ScreenHeight = 1800, ScreenWidth = 400, JavascriptEnabled = true, TimeZoneOffset = "+60", UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" }, Billing = new Billing { Address = new Address { City = "Paris", AddressLine1 = "17 Rue de la République", Country = CountryIso.FR, PostalCode = "65400" }, FirstName = "Joe", LastName = "Doe" }, Shipping = new Shipping { Address = new Address { City = "Paris", AddressLine1 = "17 Rue de la République", Country = CountryIso.FR, PostalCode = "65400" }, FirstName = "Joe", LastName = "Doe" } }; var createDirectCardPayIn = await api.PayIns.CreateCardDirectAsync(directCardPayin); string prettyPrint = JsonConvert.SerializeObject(createDirectCardPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Direct Card PayIn object Process a one-time payment with a `CardId`, obtained from the card registration process ### Description Mangopay relies on the Direct Card PayIn to process one-time payments with a registered card. A Direct Card PayIn requires a `CardId`, obtained from the Card Registration object, Checkout SDK, or Vault SDK. The Direct Card PayIn represents a one-time card payment. Different endpoints are required for [recurring](/api-reference/recurring-payin-registrations/create-recurring-payin-registration), [7-day preauthorized](/api-reference/preauthorizations/preauthorization-object), or [30-day preauthorized](/api-reference/deposit-preauthorizations/deposit-preauthorization-object) card payments, as well as to [validate a card without debiting it](/api-reference/card-validations/card-validation-object). **Best practice – Pay-in to the author’s wallet** Funds should be credited in two steps: 1. Pay-in to the author’s wallet. 2. Transfer to the credited user’s wallet. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. **Default value:** DEFAULT The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. Whether or not the `SecureMode` was used. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The unique identifier of the recurring pay-in registration. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). Information about the card used for the transaction. \ If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn how to process a card payment Simplify one-time card payments with Checkout SDK for web and mobile # View a PayIn (Direct Card) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The unique identifier of the recurring pay-in registration. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 { "Id":"149625824", "Tag":"Custom description for this specific PayIn", "CreationDate":1661159886, "AuthorId":"146476890", "CreditedUserId":"146476890", "DebitedFunds":{ "Currency":"EUR", "Amount":4500 }, "CreditedFunds":{ "Currency":"EUR", "Amount":4455 }, "Fees":{ "Currency":"EUR", "Amount":45 }, "Status":"SUCCEEDED", "ResultCode":"000000", "ResultMessage":"Success", "ExecutionDate":1661159887, "Type":"PAYIN", "Nature":"REGULAR", "CreditedWalletId":"148968396", "DebitedWalletId":null, "PaymentType":"CARD", "ExecutionType":"DIRECT", "SecureMode":"DEFAULT", "CardId":"149334067", "SecureModeReturnURL":null, "SecureModeRedirectURL":null, "SecureModeNeeded":false, "Culture":"EN", "SecurityInfo":{ "AVSResult":"NO_CHECK" }, "StatementDescriptor":"Mar2016", "BrowserInfo":null, "IpAddress":"2001:0620:0000:0000:0211:24FF:FE80:C12C", "Billing":{ "FirstName":"Nat", "LastName":"Doe", "Address":{ "AddressLine1":"Rue des plantes", "AddressLine2":"The Oasis", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Shipping":{ "FirstName":"Nat", "LastName":"Doe", "Address":{ "AddressLine1":"4 Oasis street", "AddressLine2":"The Oasis", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Requested3DSVersion":null, "Applied3DSVersion":null, "RecurringPayinRegistrationId":null, "PreferredCardNetwork":null, "PaymentCategory":"ECommerce", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetAsync("payin_m_01J334XF2V6751GRG9M2M558HG"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Direct Debit PayIn POST /v2.01/{ClientId}/payins/directdebit/direct ### Body parameters The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the credited wallet. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the mandate. *Max. length: SEPA: 100 characters, BACS: truncated after 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Note:** On BACS Direct Debit pay-ins, the length is truncated at 10 alphanumeric characters or spaces, but the technical limit is 100. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The date used to notify the user of the future charge, set at midnight (00:00) on the given day. The user's account is usually debited the following day. For more information on direct debit processing times, see the direct debit guide. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* Custom data that you can add to this object. The unique identifier of the mandate. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The unique identifier of the object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The date used to notify the user of the future charge, set at midnight (00:00) on the given day. The user's account is usually debited the following day. For more information on direct debit processing times, see the direct debit guide. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the mandate. *Max. length: SEPA: 100 characters, BACS: truncated after 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Note:** On BACS Direct Debit pay-ins, the length is truncated at 10 alphanumeric characters or spaces, but the technical limit is 100. ```json { "Message":"Error this mean of payment for this asked currency has been disabled", "Type":"disabled_mean_of_payment_for_currency", "Id":"2c4253ca-dd49-4092-8997-65b20b467b45#1663145348", "Date":1663145349.0, "errors":{ "error":"The method payment DIRECT_DEBIT_GOCARDLESS with the ccy EUR is not active for the partner Sandboxtest" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "24e0f9e1-7f37-4a8b-b644-873cabc4ee97", "Date": 1695374496.0, "errors": { "StatementDescriptor": "This field is only available for Mandates with the Scheme 'SEPA'" } } ``` ```json 200 { "Id": "payin_m_01J9C36G3DYBNZEHVZ5HC7WB5D", "CreationDate": 1728056606, "AuthorId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "CreditedUserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "Status":"CREATED", "ExecutionDate": null, "ChargeDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01J6EN9X1Q0PGM0CJ9QD197CRG", "DebitedWalletId": null, "CreditedFunds": { "Currency": "EUR", "Amount": 1188 }, "DebitedFunds": { "Currency": "EUR", "Amount": 1200 }, "Fees": { "Currency": "EUR", "Amount": 12 }, "ResultCode": null, "ResultMessage": null, "PaymentType": "DIRECT_DEBIT", "ExecutionType": "DIRECT", "Tag": "Created using Mangopay API Postman Collection", "MandateId": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "StatementDescriptor": "Example123" } ``` ```json 200 - Failed due to invalid mandate status { "Id": "payin_m_01J9C36G3DYBNZEHVZ5HC7WB5D", "CreationDate": 1728056606, "AuthorId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "CreditedUserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "Status":"FAILED", "ExecutionDate": null, "ChargeDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01J6EN9X1Q0PGM0CJ9QD197CRG", "DebitedWalletId": null, "CreditedFunds": { "Currency": "EUR", "Amount": 1188 }, "DebitedFunds": { "Currency": "EUR", "Amount": 1200 }, "Fees": { "Currency": "EUR", "Amount": 12 }, "ResultCode":"001833", "ResultMessage":"The Status of this Mandate does not allow for payments", "PaymentType": "DIRECT_DEBIT", "ExecutionType": "DIRECT", "Tag": "Created using Mangopay API Postman Collection", "MandateId": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "StatementDescriptor": "Example123" } ``` ```json REST { "AuthorId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "CreditedWalletId": "wlt_m_01J6EN9X1Q0PGM0CJ9QD197CRG", "DebitedFunds": { "Currency": "EUR", "Amount": 1200 }, "Fees": { "Currency": "EUR", "Amount": 12 }, "Tag": "Created using the Mangopay API Postman collection", "MandateId": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "StatementDescriptor": "Example123" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = 'user_m_01HYDWQNXC3M655SJXVGNDP91J'; $walletId = 'wlt_m_01HYDWR4NMAF0GRM2GZ25479EG'; $mandateId = 'mdt_m_01HYDWRQNDFC7R7P37DWH8C9SP'; $directDirectDebitPayIn = new \MangoPay\PayIn(); $directDirectDebitPayIn->AuthorId = $userId; $directDirectDebitPayIn->CreditedWalletId = $walletId; $directDirectDebitPayIn->DebitedFunds = new Money(); $directDirectDebitPayIn->DebitedFunds->Amount = 1000; $directDirectDebitPayIn->DebitedFunds->Currency = 'EUR'; $directDirectDebitPayIn->Fees = new Money(); $directDirectDebitPayIn->Fees->Amount = 0; $directDirectDebitPayIn->Fees->Currency = 'EUR'; $directDirectDebitPayIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsDirectDebit(); $directDirectDebitPayIn->PaymentDetails->MandateId = $mandateId; $directDirectDebitPayIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); $directDirectDebitPayIn->Tag = 'Created using the Mangopay PHP SDK'; $createPayIn = $api->PayIns->Create($directDirectDebitPayIn); print_r($createPayIn); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { PaymentType: 'DIRECT_DEBIT', ExecutionType: 'DIRECT', AuthorId: '168935886', Tag: 'Created with Mangopay Node.js SDK', CreditedUserId: '168935886', DebitedFunds: { Currency: 'EUR', Amount: 1000, }, Fees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '168935920', MandateId: '193168736', StatementDescriptor: 'Mangopay', } const createDirectDirectDebitPayIn = async (payin) => { return await mangopay.PayIns.create(payin) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createDirectDirectDebitPayIn(myPayIn) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createDirectDirectDebitPayIn(payInObject) begin response = MangoPay::PayIn::DirectDebit::Direct.create(payInObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create pay-in: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { AuthorId:'195074410', Tag: 'Created with Mangopay Ruby SDK', CreditedUserId:'195074410', DebitedFunds: { Currency: 'EUR', Amount: 1000, }, Fees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '195074411', MandateId: '195074413', StatementDescriptor: 'Mangopay', } createDirectDirectDebitPayIn(myPayIn) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInExecutionDetailsDirect; import com.mangopay.entities.subentities.PayInPaymentDetailsDirectDebit; public class CreateDirectDirectDebitPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTF5S9MG0XXBZ8A0550MED3Z"; var mandateId = "mdt_m_01HW30HV697QX2SQN7E500FQBJ"; PayIn payIn = new PayIn(); Money debitedFunds = new Money(); debitedFunds.setAmount(1000); debitedFunds.setCurrency(CurrencyIso.EUR); Money fees = new Money(); fees.setAmount(0); fees.setCurrency(CurrencyIso.EUR); PayInPaymentDetailsDirectDebit paymentDetails = new PayInPaymentDetailsDirectDebit(); paymentDetails.setMandateId(mandateId); paymentDetails.setStatementDescriptor("Apr2024"); PayInExecutionDetailsDirect executionDetails = new PayInExecutionDetailsDirect(); payIn.setAuthorId(userId); payIn.setCreditedWalletId(walletId); payIn.setDebitedFunds(debitedFunds); payIn.setFees(fees); payIn.setPaymentDetails(paymentDetails); payIn.setExecutionDetails(executionDetails); PayIn createPayIn = mangopay.getPayInApi().create(payIn); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPayIn); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, DirectDebitDirectPayIn, Money natural_user = NaturalUser.get('213753890') direct_debit_direct_payin = DirectDebitDirectPayIn( author_id = natural_user.id, credited_wallet_id = '213754077', debited_funds = Money(amount='1000', currency='EUR'), fees = Money(amount='100', currency='EUR'), tag = 'Created using the Mangopay Python SDK', mandate_id = '214224837', statement_descriptor = 'Jan2024' ) create_direct_debit_direct_payin = direct_debit_direct_payin.save() pprint(create_direct_debit_direct_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var returnUrl = "https://www.mangopay.com/docs/please-ignore/"; var mandateId = "mdt_m_01J3D1C35QZHHAT7XJ4WXTHRTJ"; var payIn = new PayInMandateDirectPostDTO( userId, new Money { Amount = 100, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, returnUrl, mandateId); var createDirectDirectDebitPayIn = await api.PayIns.CreateMandateDirectDebitAsync(payIn); string prettyPrint = JsonConvert.SerializeObject(createDirectDirectDebitPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Direct Debit PayIn object ### Description The Direct Debit PayIn object represents a pay-in transaction directly from a user’s Bank Account to a Wallet. This operation is only possible by creating a Mandate beforehand. ### Attributes The unique identifier of the object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The date used to notify the user of the future charge, set at midnight (00:00) on the given day. The user's account is usually debited the following day. For more information on direct debit processing times, see the direct debit guide. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* Custom data that you can add to this object. The unique identifier of the mandate. *Max. length: SEPA: 100 characters, BACS: truncated after 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Note:** On BACS Direct Debit pay-ins, the length is truncated at 10 alphanumeric characters or spaces, but the technical limit is 100. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. # View a PayIn (Direct Debit) GET /v2.01/{ClientId}/payins/{PayInId} ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The date used to notify the user of the future charge, set at midnight (00:00) on the given day. The user's account is usually debited the following day. For more information on direct debit processing times, see the direct debit guide. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* Custom data that you can add to this object. The unique identifier of the mandate. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ```json 200 { "Id": "payin_m_01J9C36G3DYBNZEHVZ5HC7WB5D", "CreationDate": 1728056606, "AuthorId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "CreditedUserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "Status":"CREATED", "ExecutionDate": null, "ChargeDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01J6EN9X1Q0PGM0CJ9QD197CRG", "DebitedWalletId": null, "CreditedFunds": { "Currency": "EUR", "Amount": 1188 }, "DebitedFunds": { "Currency": "EUR", "Amount": 1200 }, "Fees": { "Currency": "EUR", "Amount": 12 }, "ResultCode": null, "ResultMessage": null, "PaymentType": "DIRECT_DEBIT", "ExecutionType": "DIRECT", "Tag": "Created using Mangopay API Postman Collection", "MandateId": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "StatementDescriptor": "Example123" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetDirectDebitAsync("payin_m_01J3D2NPHD12DRGSVP330QPZMH"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Dispute Document POST /v2.01/{ClientId}/disputes/{DisputeId}/documents ### Path parameters The unique identifier of the dispute. ### Body parameters **Allowed values:** `DELIVERY_PROOF`, `INVOICE`, `REFUND_PROOF`, `USER_CORRESPONDANCE`, `USER_ACCEPTANCE_PROOF`, `PRODUCT_REPLACEMENT_PROOF`, `OTHER` The type of the dispute document. *Max. length: 255 characters* Custom data that you can add to this object. ### Responses The unique identifier of the dispute. **Returned values:** `DELIVERY_PROOF`, `INVOICE`, `REFUND_PROOF`, `USER_CORRESPONDANCE`, `USER_ACCEPTANCE_PROOF`, `PRODUCT_REPLACEMENT_PROOF`, `OTHER` The type of the dispute document. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time at which the document was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the dispute document. **Returned values:** DOCUMENT\_DO\_NOT\_MATCH\_USER\_DATA, DOCUMENT\_FALSIFIED, DOCUMENT\_HAS\_EXPIRED, DOCUMENT\_INCOMPLETE, DOCUMENT\_MISSING, DOCUMENT\_NOT\_ACCEPTED, DOCUMENT\_UNREADABLE, SPECIFIC\_CASE, UNDERAGE\_PERSON The reason for the dispute document refusal. See the RefusedReasonMessage for more information. *Max. length: 255 characters* **Default value:** null Additional information about why the KYC Document was refused, provided by Mangopay’s team. ```json 200 { "DisputeId": "159102965", "Type": "DELIVERY_PROOF", "Id": "159188418", "Tag": null, "CreationDate": 1672655973, "ProcessedDate": null, "Status": "CREATED", "RefusedReasonType": null, "RefusedReasonMessage": null } ``` ```json REST { "Type": "DELIVERY_PROOF", "Tag": "Custom meta" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; ry { $disputeId = '199385842'; $document = new \MangoPay\DisputeDocument(); $document->Type = \MangoPay\DisputeDocumentType::DeliveryProof; $document->Tag = 'Created using Mangopay PHP SDK'; $response = $api->Disputes->CreateDisputeDocument($disputeId, $document); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myDispute = { Id: '172969213', } let myDisputeDocument = { Type: 'DELIVERY_PROOF', Tag: 'Created using Mangopay Node.js SDK', } const createDisputeDocument = async (disputeId, disputeDocument) => { return await mangopay.Disputes.createDisputeDocument(disputeId, disputeDocument) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createDisputeDocument(myDispute.Id, myDisputeDocument) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.DisputeDocumentType; import com.mangopay.entities.DisputeDocument; public class CreateDisputeDoc { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var disputeId = "dispute_m_01J354MZ17XZA4DMAQS1766VXM"; DisputeDocument disputeDocument = new DisputeDocument(); disputeDocument.setDisputeId(disputeId); disputeDocument.setType(DisputeDocumentType.DELIVERY_PROOF); DisputeDocument createDisputeDoc = mangopay.getDisputeApi().createDisputeDocument(disputeDocument, disputeId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createDisputeDoc); System.out.println(prettyJson); } } ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createDisputeDocument(disputeId, disputeDocumentObject) begin response = MangoPay::Dispute.create_document(disputeId, disputeDocumentObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create Document: #{error.message}" puts "Error details: #{error.details}" return false end end myDispute = { Id:'194413022' } myDocument = { Type:'DELIVERY_PROOF', Tag:'Created using Mangopay Ruby SDK' } createDisputeDocument(myDispute[:Id], myDocument) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var disputeId = "dispute_m_01J41GEVRQN3W1C4YRK7NC04QT"; DisputeDocumentPostDTO disputeDoc = new DisputeDocumentPostDTO(DisputeDocumentType.INVOICE); var createDisputeDocument = await api.Disputes.CreateDisputeDocumentAsync(disputeDoc, disputeId); string prettyPrint = JsonConvert.SerializeObject(createDisputeDocument, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Dispute Document Page POST /v2.01/{ClientId}/disputes/{DisputeId}/documents/{DisputeDocumentId}/pages The Dispute Document Page is a file attached to the Dispute Document for Mangopay’s team to review. You can have as many Dispute Document Pages as there are actual pages of the document you send. In order to be able to create a document page: * The corresponding Dispute Document `Status` must be `CREATED` * The `File` must be a base64 encoded file and have a maximum size of 10MB ### Path parameters The unique identifier of the dispute. The unique identifier of the dispute document. ### Body parameters *Format: Base64 encoded file* The encoded file of the document page. ### Responses *No response body parameters* ```json REST { "File": "iVBORw0KGgoAAAANSUhEUgAAAlgAAAFRCAIAAAAn40TeAAAACXBIWXMAAAsSAAALEgHS3X78AAAgAElEQVR4nOy9eXhc1Xn4f5fZ933RjKTRZkmWZMt2vBvb2Bgwa7EDpIGGtLQJCUl4mjZJ26d8Q5qQ9GmThzRpCKRAgBICGLIQQ8AYDA7GlvdF1r5Lo8VaZl/uzNx7f3+8P91OpJnRnX1snc8fPGZ0l3PP8r7nfc973iNgWRbLFJZlcRyPRCLf/OY33377bY1Gg2EYwzAZPxAgCALDsN7e3h/+8Ief+9znBAIBjuNLluS999574okn+vv7tVotTdMJH3vlypXPfvaz3//+9+GrUz+WYRiCIE6dOrV//36NRiOVShM+NvWHRKNRDMO++tWv/s3f/A08MBgM/vCHP3z11VeFQqFIJMq+urIEqiIWiz388MOf+cxnVCpVuk+A73rmmWe+/OUvr1mzhmXZLD9KKBTOzs4aDIZ/+Id/uOuuu6A/cE32yCOP/PrXv66pqYlEIkt2jCLCsqxIJBobG9PpdH/84x/LyspgvMCfIpHIz372s2984xutra0kSRa9GwBQ5vHx8crKynfeeUcmk3Flzi2BQODVV1/913/9V7PZLBAIspFChQHG/g9+8IObb74ZOjzUjNfrffbZZ59++mmRSCSVSmOxWDbVJRAIAoHA9PT07373u02bNsVXPrz0/Pnze/fu1el0CoUiXXG0AIIgaJr2+/233nrr9773vcVtDf978eLFH/zgB8eOHTOZTARBlEhHxXEcROs999zz8MMPq9XqbDpqLBYjsi8TlCAajQaDQZqmQWxlBo7jBEHEYrFAIJBWjeM47nQ6XS6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/84Q933nmnQqHgvjT16wiCiEQi77//vtvthnct2QdYloXD786ePXvdddfV1tbGlzz1jXDB2bNnX3zxxe7u7rTOeaBpOhKJgE8lrY4qEAh4eu+yFxTFVIQ4jsMyIUVRaWUNwOePldDr9TjvA3I1Gg2k2E93+gATdoVCkZO9E1BahmEOHz584MCBDz/8EMMwg8HAUzmxLCsUCiORyJtvvjkwMHDx4sX777+f5yG6BEHs3bv3xIkTc3NzPN8I8zKtVhsKhZ599tmjR4/SNE1R1P33319XVweZ7bhZLcMwJ0+efPnllz/44AOPxwPL42k160cffTQyMnLx4sV9+/ZVV1dnqQvhdq/Xe+DAgQMHDly6dMlkMkmlUp5aEJufeYhEovLy8vPnz/f39w8NDX3uc59raGjIuFTxZaMo6tixYy+//PL7779PkqROp0urc4JKy+DVV5dvkGvHw4cPv/jii21tbQaDwWq1RqPRtJ4Ti8UqKytHRkZ+/vOfd3R03H///Vu2bMlJCXEcn5ycfOedd44ePdrR0QGHAfBR0rAST1HUU089de7cuZ07d+7evTuF3wV+j0ajJ06cOHToUFtbWzQalUqlPCcE4E86derUY489dt111910002Q6jLFQIM/zc7O/uY3vzl48ODJkyfNZnNaTjWwXDNIYFTIjlpMRUiSJJzkQFEU/7Nz4XqdTsdFyvAUakKhsLW1taOjI925MIh4tVqt0WiyzNwNTxsdHT148ODLL7/c09Njs9lEIlFae0jATKmqqhocHPzxj388MjJy1113bd68mVNLCV8KbvctW7ZYLJaJiYm0HP0wsO12+9zcHHgvY7EY10fBrJmYmHjzzTf/8Ic/nDx50maz2e32dFdxMAxzOBxjY2NPPvlkd3f33XffvXPnzmwSgMVisfb29t/97ne//vWvI5GIw+GIRqPplgqqLhqNlpeXB4PB559/fmRk5O67777++uszPqWI8we8/vrrb7311qVLlyorK0mShFlzWlxdhl1m4Dje0dHx29/+9s033xwdHXU4HGBkZBAsQ1GU1WqNRCKvv/56X1/fgw8+uHv3bphPZ1y8ubm5w4cPHz9+/I9//OPs7Gx5eTlPLQjA1HZubu655547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63Hp7e8vLy1955ZW///3vkUgEVFC85oYMEonE6XRardaHHnropptuivnseREkSZrN5scee2z8+PHd3d2iHot4hf256PnEypt9EUJU/7e//W1eXh5sy4l1pwiCIDQazfz582+77Tb0p3x8HyB7YHAMzCYFYthJnufPnz//4IMPTp8+XTBPo4ughT//+c8LCgrELgl7hV0iLnnssX1VIDhCkuSNN9548803R70z/wezVxgtmrI60gAAAABJRU5ErkJggg==" } ``` ```java Java import java.util.Base64; import com.mangopay.MangoPayApi; public class CreateDisputeDocPage { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var disputeId = "dispute_m_01J354MZ17XZA4DMAQS1766VXM"; var disputeDocId = "dispdoc_m_01J35502PVF13JEV84D6PET414"; String file = "iVBORw0KGgoAAAANSUhEUgAAAlgAAAFRCAIAAAAn40TeAAAACXBIWXMAAAsSAAALEgHS3X78AAAgAElEQVR4nOy9eXhc1Xn4f5fZ933RjKTRZkmWZMt2vBvb2Bgwa7EDpIGGtLQJCUl4mjZJ26d8Q5qQ9GmThzRpCKRAgBICGLIQQ8AYDA7GlvdF1r5Lo8VaZl/uzNx7f3+8P91OpJnRnX1snc8fPGZ0l3PP8r7nfc973iNgWRbLFJZlcRyPRCLf/OY33377bY1Gg2EYwzAZPxAgCALDsN7e3h/+8Ief+9znBAIBjuNLluS999574okn+vv7tVotTdMJH3vlypXPfvaz3//+9+GrUz+WYRiCIE6dOrV//36NRiOVShM+NvWHRKNRDMO++tWv/s3f/A08MBgM/vCHP3z11VeFQqFIJMq+urIEqiIWiz388MOf+cxnVCpVuk+A73rmmWe+/OUvr1mzhmXZLD9KKBTOzs4aDIZ/+Id/uOuuu6A/cE32yCOP/PrXv66pqYlEIkt2jCLCsqxIJBobG9PpdH/84x/LyspgvMCfIpHIz372s2984xutra0kSRa9GwBQ5vHx8crKynfeeUcmk3Flzi2BQODVV1/913/9V7PZLBAIspFChQHG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z45bty4eFBBYkCofOHChbW1tZs2bUJTT/I7u0Fc2BF4aZ7bpT+J1dODYOSIESN+8YtfoNxB/33A3pubbrqptrb2H//4R25uLoJ6OgMRbn+gwQHZbcL/FVITwfgj/v98DfRwHBcOh++++25wrUfXNwMiRFHUmDFjpkyZAv5J9BuFiQFDI+jcRY/90qwZlMCs2NXVlZqa+uCDDyYlJUW3DyI63Hp7e8vLy1955ZW///3vkUgEVFC85oYMEonE6XRardaHHnropptuivnseREkSZrN5scee2z8+PHd3d2iHot4hf256PnEypt9EUJU/7e//W1eXh5sy4l1pwiCIDQazfz582+77Tb0p3x8HyB7YHAMzCYFYthJnufPnz//4IMPTp8+XTBPo4ughT//+c8LCgrELgl7hV0iLnnssX1VIDhCkuSNN9548803R70z/wezVxgtmrI60gAAAABJRU5ErkJggg=="; byte[] fileData = Base64.getDecoder().decode(file); mangopay.getDisputeApi().createDisputePage(disputeId, disputeDocId, fileData); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Dispute, DisputeDocument, DisputeDocumentPage dispute = Dispute.get('dispute_m_01HQT8ZRCWP0HBT8QGRFMBA97B') dispute_doc = DisputeDocument.get('dispdoc_m_01HQTAHCSMH0Q6MRHYWZ0B39M5') page = DisputeDocumentPage( file = 'encoded file data of the document page', document = dispute_doc, dispute = dispute ) create_dispute_doc_page = page.save() pprint(create_dispute_doc_page) ``` # Create a weblink to view the Pages of a Dispute Document POST /v2.01/{ClientId}/dispute-documents/{DisputeDocumentId}/consult This call returns one link per document page in order to consult them. These links are available for 10 minutes. ### Path parameters The unique identifier of the dispute document. ### Responses The list of Dispute Document Pages created by the platform. The dispute document page created by the platform. ```json 200 [ { "Url": "https://api.sandbox.mangopay.com/public/documents/c2a145/consult/L0D3y1QRad0Oos6rYlkG0Q59VG", "ExpirationDate": 1673362529 }, { "Url": "https://api.sandbox.mangopay.com/public/documents/c2a145/consult/DB8MOWLgP21jMIe6VKGGP9EMyA", "ExpirationDate": 1673362529 } ] ``` # The Dispute Document object ### Description The Dispute Document object is a container to store document pages before being sent to Mangopay’s team for review as part of the dispute process. One Dispute Document object is necessary for each type of document. ### Attributes The unique identifier of the dispute. **Returned values:** `DELIVERY_PROOF`, `INVOICE`, `REFUND_PROOF`, `USER_CORRESPONDANCE`, `USER_ACCEPTANCE_PROOF`, `PRODUCT_REPLACEMENT_PROOF`, `OTHER` The type of the dispute document. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time at which the document was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the dispute document. **Returned values:** DOCUMENT\_DO\_NOT\_MATCH\_USER\_DATA, DOCUMENT\_FALSIFIED, DOCUMENT\_HAS\_EXPIRED, DOCUMENT\_INCOMPLETE, DOCUMENT\_MISSING, DOCUMENT\_NOT\_ACCEPTED, DOCUMENT\_UNREADABLE, SPECIFIC\_CASE, UNDERAGE\_PERSON The reason for the dispute document refusal. The reason for the dispute document refusal. See the `RefusedReasonMessage` for more information. *Max. length: 255 characters* **Default value:** null Additional information about why the KYC Document was refused, provided by Mangopay’s team. # List all Dispute Documents GET /v2.01/{ClientId}/dispute-documents ### Query parameters The date before which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. ### Responses The list of dispute documents created by the platform. The dispute document created by the platform. The unique identifier of the dispute. **Returned values:** `DELIVERY_PROOF`, `INVOICE`, `REFUND_PROOF`, `USER_CORRESPONDANCE`, `USER_ACCEPTANCE_PROOF`, `PRODUCT_REPLACEMENT_PROOF`, `OTHER` The type of the dispute document. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time at which the document was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the dispute document. **Returned values:** DOCUMENT\_DO\_NOT\_MATCH\_USER\_DATA, DOCUMENT\_FALSIFIED, DOCUMENT\_HAS\_EXPIRED, DOCUMENT\_INCOMPLETE, DOCUMENT\_MISSING, DOCUMENT\_NOT\_ACCEPTED, DOCUMENT\_UNREADABLE, SPECIFIC\_CASE, UNDERAGE\_PERSON The reason for the dispute document refusal. See the RefusedReasonMessage for more information. *Max. length: 255 characters* **Default value:** null Additional information about why the KYC Document was refused, provided by Mangopay’s team. ```json 200 [ { "DisputeId": "159102965", "Type": "DELIVERY_PROOF", "Id": "159188418", "Tag": null, "CreationDate": 1672655973, "ProcessedDate": null, "Status": "VALIDATION_ASKED", "RefusedReasonType": null, "RefusedReasonMessage": null } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $response = $api->DisputeDocuments->GetAll(); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) const listDisputeDocuments = async () => { return await mangopay.DisputeDocuments.getAll() .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listDisputeDocuments() ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listDisputeDocuments() begin response = MangoPay::Dispute.fetch_documents() puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Dispute Documents: #{error.message}" puts "Error details: #{error.details}" return false end end listDisputeDocuments() ``` ```java Java import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.DisputeDocument; public class ListAllDisputeDocs { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); List disputeDocs = mangopay.getDisputeApi().getDocumentsForClient(null, null, null); for (DisputeDocument disputeDoc : disputeDocs) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(disputeDoc); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import DisputeDocument dispute_docs = DisputeDocument.all() for dispute_doc in dispute_docs: print() pprint(dispute_doc._data) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewAllDisputesDocs = await api.Disputes.GetDocumentsForClientAsync(new Pagination(1, 10), null); string prettyPrint = JsonConvert.SerializeObject(viewAllDisputesDocs, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Documents for a Dispute GET /v2.01/{ClientId}/disputes/{DisputeId}/documents ### Path parameters The unique identifier of the dispute. ### Responses The list of dispute documents created by the platform. The dispute document created by the platform. The unique identifier of the dispute. **Returned values:** `DELIVERY_PROOF`, `INVOICE`, `REFUND_PROOF`, `USER_CORRESPONDANCE`, `USER_ACCEPTANCE_PROOF`, `PRODUCT_REPLACEMENT_PROOF`, `OTHER` The type of the dispute document. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time at which the document was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the dispute document. **Returned values:** DOCUMENT\_DO\_NOT\_MATCH\_USER\_DATA, DOCUMENT\_FALSIFIED, DOCUMENT\_HAS\_EXPIRED, DOCUMENT\_INCOMPLETE, DOCUMENT\_MISSING, DOCUMENT\_NOT\_ACCEPTED, DOCUMENT\_UNREADABLE, SPECIFIC\_CASE, UNDERAGE\_PERSON The reason for the dispute document refusal. See the RefusedReasonMessage for more information. *Max. length: 255 characters* **Default value:** null Additional information about why the KYC Document was refused, provided by Mangopay’s team. ```json 200 [ { "DisputeId": "159102965", "Type": "DELIVERY_PROOF", "Id": "159188418", "Tag": null, "CreationDate": 1672655973, "ProcessedDate": null, "Status": "VALIDATION_ASKED", "RefusedReasonType": null, "RefusedReasonMessage": null } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $disputeId = '192746554'; $response = $api->Disputes->GetDocumentsForDispute($disputeId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myDispute = { Id: '192746554', } const listDisputeDocuments = async (disputeId) => { return await mangopay.Disputes.getDocumentsForDispute(disputeId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listDisputeDocuments(myDispute.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listDocumentsForDispute(disputeId) begin response = MangoPay::Dispute.fetch_documents(disputeId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Dispute Documents: #{error.message}" puts "Error details: #{error.details}" return false end end myDispute = { Id:'192746554' } listDocumentsForDispute(myDispute[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.DisputeDocument; public class ListDisputeDocs { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var disputeId = "dispute_m_01J354MZ17XZA4DMAQS1766VXM"; List disputeDocs = mangopay.getDisputeApi().getDocumentsForDispute(disputeId, null, null, null); for (DisputeDocument disputeDoc : disputeDocs) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(disputeDoc); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import DisputeDocument dispute_docs = DisputeDocument.all(dispute_id = "dispute_m_01HQT8ZRCWP0HBT8QGRFMBA97B") for dispute_doc in dispute_docs: print() pprint(dispute_doc._data) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var disputeId = "dispute_m_01J41GEVRQN3W1C4YRK7NC04QT"; var viewDisputeDocs = await api.Disputes.GetDocumentsForDisputeAsync(disputeId, new Pagination(1, 10), null); string prettyPrint = JsonConvert.SerializeObject(viewDisputeDocs, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Submit a Dispute Document PUT /v2.01/{ClientId}/disputes/{DisputeId}/documents/{DisputeDocumentId} ### Path parameters The unique identifier of the dispute. The unique identifier of the dispute document. ### Body parameters **Allowed values:** `VALIDATION_ASKED` The status of the dispute document. ### Responses The unique identifier of the dispute. **Returned values:** `DELIVERY_PROOF`, `INVOICE`, `REFUND_PROOF`, `USER_CORRESPONDANCE`, `USER_ACCEPTANCE_PROOF`, `PRODUCT_REPLACEMENT_PROOF`, `OTHER` The type of the dispute document. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time at which the document was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the dispute document. **Returned values:** DOCUMENT\_DO\_NOT\_MATCH\_USER\_DATA, DOCUMENT\_FALSIFIED, DOCUMENT\_HAS\_EXPIRED, DOCUMENT\_INCOMPLETE, DOCUMENT\_MISSING, DOCUMENT\_NOT\_ACCEPTED, DOCUMENT\_UNREADABLE, SPECIFIC\_CASE, UNDERAGE\_PERSON The reason for the dispute document refusal. See the RefusedReasonMessage for more information. *Max. length: 255 characters* **Default value:** null Additional information about why the KYC Document was refused, provided by Mangopay’s team. ```json 200 { "DisputeId": "159102965", "Type": "DELIVERY_PROOF", "Id": "159188418", "Tag": null, "CreationDate": 1672655973, "ProcessedDate": null, "Status": "VALIDATION_ASKED", "RefusedReasonType": null, "RefusedReasonMessage": null } ``` ```json REST { "Status": "VALIDATION_ASKED" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $disputeId = '199385842'; $disputeDocumentId = '199387308'; $disputeDocument = $api->DisputeDocuments->Get($disputeDocumentId); $disputeDocument->Status = \MangoPay\DisputeDocumentStatus::ValidationAsked; $response = $api->Disputes->UpdateDisputeDocument($disputeId, $disputeDocument); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myDispute = { Id: '192746554', } let myDisputeDocument = { Id: '192747541', Status: 'VALIDATION_ASKED', } const submitDisputeDocument = async (disputeId, disputeDocument) => { return await mangopay.Disputes.updateDisputeDocument(disputeId, disputeDocument) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } submitDisputeDocument(myDispute.Id, myDisputeDocument) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def submitDisputeDocument(disputeId, disputeDocumentId, disputeDocumentObject) begin response = MangoPay::Dispute.update_document(disputeId, disputeDocumentId, disputeDocumentObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to submit Document: #{error.message}" puts "Error details: #{error.details}" return false end end myDispute = { Id:'194413022' } myDocument = { Id:'194643965', Status:'VALIDATION_ASKED' } submitDisputeDocument(myDispute[:Id], myDocument[:Id], myDocument) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.DisputeDocumentStatus; import com.mangopay.entities.DisputeDocument; public class SubmitDisputeDoc { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var disputeId = "dispute_m_01J354MZ17XZA4DMAQS1766VXM"; var disputeDocId = "dispdoc_m_01J35502PVF13JEV84D6PET414"; var disputeDoc = mangopay.getDisputeApi().getDocument(disputeDocId); disputeDoc.setStatus(DisputeDocumentStatus.VALIDATION_ASKED); DisputeDocument submitDispute = mangopay.getDisputeApi().submitDisputeDocument(disputeDoc, disputeId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(submitDispute); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) dispute_doc = DisputeDocument( id = 'dispdoc_m_01HQTAHCSMH0Q6MRHYWZ0B39M5', dispute = dispute, status = 'VALIDATION_ASKED' ) submit_dispute = dispute_doc.submit() pprint(submit_dispute) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var disputeId = "dispute_m_01J41GEVRQN3W1C4YRK7NC04QT"; var disputeDocId = "dispdoc_m_01J41GSW7D919YXBY2ZEK91ACD"; DisputeDocumentPutDTO disputeDoc = new DisputeDocumentPutDTO { Status = DisputeDocumentStatus.VALIDATION_ASKED }; var submitDisputeDoc = await api.Disputes.SubmitDisputeDocumentAsync(disputeDoc, disputeId, disputeDocId); string prettyPrint = JsonConvert.SerializeObject(submitDisputeDoc, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Dispute Document GET /v2.01/{ClientId}/dispute-documents/{DisputeDocumentId} ### Path parameters The unique identifier of the dispute document. ### Responses The unique identifier of the dispute. **Returned values:** `DELIVERY_PROOF`, `INVOICE`, `REFUND_PROOF`, `USER_CORRESPONDANCE`, `USER_ACCEPTANCE_PROOF`, `PRODUCT_REPLACEMENT_PROOF`, `OTHER` The type of the dispute document. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time at which the document was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the dispute document. **Returned values:** DOCUMENT\_DO\_NOT\_MATCH\_USER\_DATA, DOCUMENT\_FALSIFIED, DOCUMENT\_HAS\_EXPIRED, DOCUMENT\_INCOMPLETE, DOCUMENT\_MISSING, DOCUMENT\_NOT\_ACCEPTED, DOCUMENT\_UNREADABLE, SPECIFIC\_CASE, UNDERAGE\_PERSON The reason for the dispute document refusal. See the RefusedReasonMessage for more information. *Max. length: 255 characters* **Default value:** null Additional information about why the KYC Document was refused, provided by Mangopay’s team. ```json 200 { "DisputeId": "159102965", "Type": "DELIVERY_PROOF", "Id": "159188418", "Tag": null, "CreationDate": 1672655973, "ProcessedDate": null, "Status": "VALIDATION_ASKED", "RefusedReasonType": null, "RefusedReasonMessage": null } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $disputeDocumentId = '199387308'; $response = $api->DisputeDocuments->Get($disputeDocumentId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myDisputeDocument = { Id: '192747541', } const viewDisputeDocument = async (disputeDocumentId) => { return await mangopay.DisputeDocuments.get(disputeDocumentId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewDisputeDocument(myDisputeDocument.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewDisputeDocument(disputeDocumentId) begin response = MangoPay::Dispute.fetch_document(disputeDocumentId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Document: #{error.message}" puts "Error details: #{error.details}" return false end end myDocument = { Id:'159188418' } viewDisputeDocument(myDocument[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.DisputeDocument; public class ViewDisputeDoc { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var disputeDocId = "dispdoc_m_01J35502PVF13JEV84D6PET414"; DisputeDocument viewDisputeDoc = mangopay.getDisputeApi().getDocument(disputeDocId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewDisputeDoc); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import DisputeDocument dispute_doc_id = 'dispdoc_m_01HQTAHCSMH0Q6MRHYWZ0B39M5' try: view_dispute_doc = DisputeDocument.get(dispute_doc_id) pprint(view_dispute_doc._data) except DisputeDocument.DoesNotExist: print('Dispute doc {} does not exist.'.format(view_dispute_doc.id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var disputeDocId = "dispdoc_m_01J41GSW7D919YXBY2ZEK91ACD"; var viewDisputeDoc = await api.Disputes.GetDocumentAsync(disputeDocId); string prettyPrint = JsonConvert.SerializeObject(viewDisputeDoc, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Bank Wire PayIn to the Repudiation Wallet POST /v2.01/{ClientId}/clients/payins/bankwire/direct/ This endpoint allows the platform to make a Direct Bank Wire PayIn, instead of a Settlement Transfer, to their Repudiation Wallet in order to settle the negative balance due to a `LOST` dispute. The object expires 1 month after creation if no funds are received. **Warning – Ensure you use the correct reference and bank account** The direct bank wire relies on independent action from the platform. You must use the `WireReference` and wire the funds to the bank account identified by the `IBAN` and `BIC`.\ Otherwise, the crediting of your Repudiation Wallet may be delayed or unsuccessful. ### Body parameters The unique identifier of the credited wallet.\ In the case of the direct bank wire to the Repudiation Wallet, this value has the format `CREDIT_CCY` where `CCY` is the currency of the Client Wallet to be credited (e.g., `CREDIT_EUR`). Information about the declared funds to be wired by the platform to the returned bank account. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the user at the source of the transaction.\ In the case of the direct bank wire to the Repudiation Wallet, the `AuthorId` is automatically set to the platform’s `ClientId`. The unique identifier of the user whose wallet is credited.\ In the case of the direct bank wire to the Repudiation Wallet, the `CreditedUserId` is automatically set to the platform’s `ClientId`. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet).\ For a direct bank wire pay-in, the `Fees` displays placeholder values (currency XXX and amount 0) until the `Status` changes to SUCCEEDED. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet.\ In the case of the direct bank wire to the Repudiation Wallet, this value has the format `CREDIT_CCY` where `CCY` is the currency of the Client Wallet to be credited (e.g., `CREDIT_EUR`). The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. Information about the declared funds to be wired by the platform to the returned bank account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees to be taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* The reference which the end user must provide when making the bank wire. The `WireReference` is used to reconcile the funds that arrive on the bank account with the `DeclaredDebitedFunds` in the Direct Bank Wire PayIn object. **Caution:** This reference is specific to each payment and must be retrieved dynamically. Information about the bank account to which the bank wire must be made by the end user. **Caution:** Do not hardcode the returned values. Mangopay may change the underlying bank details without prior notice. Information about the address of residence of the bank account owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER` The type of the bank account. *Max. length: 255 characters* The full name of the owner of the bank account. The IBAN (international bank account number) for the bank account. The BIC (international identifier of the bank) for the bank account. ```json 200 - Status is CREATED { "Id": "163311508", "Tag": null, "CreationDate": 1677579888, "ResultCode": null, "ResultMessage": null, "AuthorId": "ClientId", "CreditedUserId": "ClientId", "DebitedFunds": { "Currency": "XXX", "Amount": 0 }, "CreditedFunds": { "Currency": "XXX", "Amount": 0 }, "Fees": { "Currency": "XXX", "Amount": 0 }, "Status": "CREATED", "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "CREDIT_EUR", "DebitedWalletId": null, "PaymentType": "BANK_WIRE", "ExecutionType": "DIRECT", "DeclaredDebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "DeclaredFees": { "Currency": "EUR", "Amount": 0 }, "WireReference": "MGx5nyoxdi", "BankAccount": { "OwnerAddress": { "AddressLine1": "2 Avenue Amélie", "AddressLine2": null, "City": "Luxembourg", "Region": null, "PostalCode": "L-1125", "Country": "LU" }, "Type": "IBAN", "OwnerName": "MANGOPAY SA", "IBAN": "FR7630056009271234567890182", "BIC": "CCFRFRPPXXX" } } ``` ```json REST { "CreditedWalletId": "CREDIT_EUR", "DeclaredDebitedFunds": { "Currency": "EUR", "Amount": 1000 } } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.ClientBankWireDirect; import com.mangopay.entities.PayIn; public class CreateDirectBankWirePayInToRepudiationWallet { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); ClientBankWireDirect bankwireDirectPayIn = new ClientBankWireDirect("CREDIT_EUR", new Money(CurrencyIso.EUR, 100)); PayIn createPayIn = mangopay.getClientApi().createBankWireDirect(bankwireDirectPayIn); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPayIn); System.out.println(prettyJson); } } ``` # Create a Settlement Transfer POST /v2.01/{ClientId}/repudiations/{RepudiationId}/settlementtransfer ### Path parameters The unique identifier of the repudiation. ### Body parameters The unique identifier of the user at the source of the transaction. Information about the debited funds. Please note that: * The `Currency` must be identical to that of the initial transaction. * The `Amount` cannot exceed the initial’s transaction minus the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. Please note that: * The `Currency` must be identical to that of the initial transaction. * The `Amount` cannot exceed the initial’s transaction. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. Information about the debited funds. Please note that: * The `Currency` must be identical to that of the initial transaction. * The `Amount` cannot exceed the initial’s transaction minus the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. Please note that: * The `Currency` must be identical to that of the initial transaction. * The `Amount` cannot exceed the initial’s transaction. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the wallet. In the specific case of the Client Wallet object, this value is returned by the Mangopay API in the form of the funds type and the currency (e.g., “FEES\_EUR”). The unique identifier of the debited wallet. The unique identifier of the repudiation. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. Information about the debited funds. Please note that: * The `Currency` must be identical to that of the initial transaction. * The `Amount` cannot exceed the initial’s transaction minus the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. Please note that: * The `Currency` must be identical to that of the initial transaction. * The `Amount` cannot exceed the initial’s transaction. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. The unique identifier of the repudiation. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "7da1f9f4-8c9f-4f9f-ba1c-babf394131ca#1673358577", "Date": 1673358578.0, "errors": { "DebitedFunds": "The settlement DebitedFunds cannot exceed the initial transaction DebitedFunds" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "084e42e2-7523-4e28-99eb-79300d0dc37b#1672678394", "Date": 1672678395.0, "errors": { "Fees": "The settlement Fees cannot exceed the initial transaction Fees" } } ``` ```json 200 { "Id": "159220385", "Tag": null, "CreationDate": 1672677972, "ResultCode": "000000", "ResultMessage": "Success", "DebitedFunds": { "Currency": "EUR", "Amount": 999 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "AuthorId": "146476890", "CreditedUserId": null, "CreditedFunds": { "Currency": "EUR", "Amount": 999 }, "Status": "SUCCEEDED", "ExecutionDate": 1672677972, "Type": "TRANSFER", "Nature": "SETTLEMENT", "CreditedWalletId": "CREDIT_EUR", "DebitedWalletId": "148968396", "RepudiationId": "159196330" } ``` ```json 200 - Failed { "Id": "159220127", "Tag": null, "CreationDate": 1672677824, "ResultCode": "003010", "ResultMessage": "The total DebitedFunds settled cannot exceed the initial transaction DebitedFunds available for settlement", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 1 }, "AuthorId": "146476890", "CreditedUserId": null, "CreditedFunds": { "Currency": "EUR", "Amount": 999 }, "Status": "FAILED", "ExecutionDate": null, "Type": "TRANSFER", "Nature": "SETTLEMENT", "CreditedWalletId": "CREDIT_EUR", "DebitedWalletId": "148968396", "RepudiationId": "159196330" } ``` ```json REST { "AuthorId":"146476890", "DebitedFunds":{ "Currency":"EUR", "Amount":12 }, "Fees":{ "Currency":"EUR", "Amount":12 } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $repudiationId = '199385843'; $repudiation = $api->Disputes->GetRepudiation($repudiationId); $settlementTransfer = new \MangoPay\SettlementTransfer(); $settlementTransfer->AuthorId = $repudiation->AuthorId; $settlementTransfer->DebitedFunds = new \MangoPay\Money(); $settlementTransfer->DebitedFunds->Amount = 500; $settlementTransfer->DebitedFunds->Currency = "EUR"; $settlementTransfer->Fees = new \MangoPay\Money(); $settlementTransfer->Fees->Amount = 0; $settlementTransfer->Fees->Currency = "EUR"; $response = $api->Disputes->CreateSettlementTransfer($settlementTransfer, $repudiationId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myDispute = { Id: '192775714', RepudiationId: '192775715', } let mySettlementTransfer = { AuthorId: '180749339', DebitedFunds: { Currency: 'EUR', Amount: '1000', }, Fees: { Currency: 'EUR', Amount: 0, }, } const createSettlementTransfer = async (settlementTransfer, repudiationId) => { return await mangopay.Disputes.createSettlementTransfer( settlementTransfer, repudiationId ) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createSettlementTransfer(mySettlementTransfer, myDispute.RepudiationId) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end myRepudiation = { Id: '194618172' } mySettlementTransfer = { Type: 'TRANSFER', Nature: 'SETTLEMENT', AuthorId: '194579896', DebitedFunds: { Currency: 'EUR', Amount: 10000 }, Fees: { Currency: 'EUR', Amount: 9000 } } createSettlementTransfer(myRepudiation[:Id], mySettlementTransfer) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.SettlementTransfer; import com.mangopay.entities.Transfer; public class CreateSettlementTransfer { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR"; var repudiationId = "repud_m_01J2KVEDBG9ABZZAWRXFHAJ97H"; SettlementTransfer settlementTransfer = new SettlementTransfer(); settlementTransfer.setAuthorId(userId); settlementTransfer.setDebitedFunds(new Money(CurrencyIso.EUR, 200)); settlementTransfer.setFees(new Money(CurrencyIso.EUR, 0)); settlementTransfer.setTag("Created using the Mangopay Java SDK"); Transfer createSettlement = mangopay.getDisputeApi().createSettlementTransfer(settlementTransfer, repudiationId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createSettlement); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Repudiation, SettlementTransfer from mangopay.utils import Money natural_user = NaturalUser.get('user_m_01HQK25M6KVHKDV0S36JY9NRKR') repudiation = Repudiation.get('repud_m_01HQT8ZRDVYBVT7T8240AWZD3D') settlement_transfer = SettlementTransfer( author = natural_user, credited_user_id = natural_user.id, debited_funds = Money(amount=4000, currency='GBP'), fees = Money(amount=0, currency='GBP'), repudiation = repudiation ) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var repudiationId = "repud_m_01J354MZ35CNMZZMCENS3ERPQ3"; var repudiation = await api.Disputes.GetRepudiationAsync(repudiationId); SettlementTransferPostDTO settlementTransfer = new SettlementTransferPostDTO( repudiation.AuthorId, new Money { Currency = CurrencyIso.EUR, Amount = 1 }, new Money { Currency = CurrencyIso.EUR, Amount = 0 } ); var createSettelementTransfer = await api.Disputes.CreateSettlementTransferAsync(settlementTransfer, repudiationId); string prettyPrint = JsonConvert.SerializeObject(createSettelementTransfer, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Settlement Transfer object ### Description The Settlement Transfer object represents the transfer of funds from the user Wallet to the platform’s Repudiation Wallet in order to settle the negative balance due to a `LOST` dispute. **Note – Dispute must be closed** Only disputes with the CLOSED `Status` can be settled. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. Information about the debited funds. Please note that: * The `Currency` must be identical to that of the initial transaction. * The `Amount` cannot exceed the initial’s transaction minus the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. Please note that: * The `Currency` must be identical to that of the initial transaction. * The `Amount` cannot exceed the initial’s transaction. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the wallet. In the specific case of the Client Wallet object, this value is returned by the Mangopay API in the form of the funds type and the currency (e.g., “FEES\_EUR”). The unique identifier of the debited wallet. The unique identifier of the repudiation. # View a Settlement Transfer GET /v2.01/{ClientId}/settlements/{SettlementId} **Note – Settlement transfer data retained for 13 months** An API call to retrieve a settlement transfer whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the settlement transfer. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. Information about the debited funds. Please note that: * The `Currency` must be identical to that of the initial transaction. * The `Amount` cannot exceed the initial’s transaction minus the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. Please note that: * The `Currency` must be identical to that of the initial transaction. * The `Amount` cannot exceed the initial’s transaction. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the wallet. In the specific case of the Client Wallet object, this value is returned by the Mangopay API in the form of the funds type and the currency (e.g., “FEES\_EUR”). The unique identifier of the debited wallet. The unique identifier of the repudiation. ```json 200 { "Id": "159220385", "Tag": null, "CreationDate": 1672677972, "ResultCode": "000000", "ResultMessage": "Success", "DebitedFunds": { "Currency": "EUR", "Amount": 999 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "AuthorId": "146476890", "CreditedUserId": null, "CreditedFunds": { "Currency": "EUR", "Amount": 999 }, "Status": "SUCCEEDED", "ExecutionDate": 1672677972, "Type": "TRANSFER", "Nature": "SETTLEMENT", "CreditedWalletId": "CREDIT_EUR", "DebitedWalletId": "148968396", "RepudiationId": "159196330" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $settlementTransferId = '199394630'; $response = $api->Disputes->GetSettlementTransfer($settlementTransferId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let mySettlementTransfer = { Id: '192776141', } const viewSettlementTransfer = async (settlementTransferId) => { return await mangopay.Disputes.getSettlementTransfer(settlementTransferId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewSettlementTransfer(settlementTransferId) begin response = MangoPay::Dispute.fetch_settlement_transfer(settlementTransferId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch settlement transfer: #{error.message}" puts "Error details: #{error.details}" return false end end mySettlementTransfer = { Id: '194996201' } viewSettlementTransfer(mySettlementTransfer[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi;import com.mangopay.entities.Transfer; public class ViewSettlementTransfer { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var settlementId = "repudstl_m_01J35Q6WHVK305X7MKQJ90XNP3"; Transfer viewSettlement = mangopay.getSettlementApi().get(settlementId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewSettlement); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import SettlementTransfer try: view_settlement_transfer = SettlementTransfer.get('repudstl_m_01HQWXSKCQHTNN45341N23GHPT') pprint(view_settlement_transfer._data) except SettlementTransfer.DoesNotExist: print('Settlement Transfer {} does not exist.'.format(view_settlement_transfer)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var settlementTransferId = "repudstl_m_01J52XBJTKCNHTVDT4VN62BSZG"; var viewSettelementTransfer = await api.Disputes.GetSettlementTransferAsync(settlementTransferId); string prettyPrint = JsonConvert.SerializeObject(viewSettelementTransfer, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Close a Dispute PUT /v2.01/{ClientId}/disputes/{DisputeId}/close **Note – Empty body required** For the call to be successful, you need to pass an empty body. ### Path parameters The unique identifier of the dispute. ### Responses The unique identifier of the initial pay-in being disputed. **Returned values:** `PAYIN` The type of the initial transaction being disputed. **Returned values:** `REGULAR` The nature of the initial transaction being disputed. **Returned values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of dispute: * `CONTESTABLE` – Dispute for which the chargeback can be contested by providing proof (i.e., Dispute Documents) justifying the original transaction. * `NOT_CONTESTABLE` – Dispute that is automatically closed after its creation, without any action possible for the platform. * `RETRIEVAL` – Dispute that is actually a chargeback warning issued by the bank. The platform is required to provide documents, but no funds will be taken from the Repudiation Wallet. The date and time until which the platform can contest the dispute (i.e., the `Status` is set to `SUBMITTED`). This date is defined by the issuing bank of the initial transaction and may usually vary between 7 to 18 days. Once the deadline passes, the dispute `Status` is automatically set to `CLOSED`. Information about the disputed funds.\ Note: This amount can be lower than the initial transaction amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the contested funds, in other words, the amount that you wish to contest.\ Note: This amount can be lower than the disputed funds amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `REOPENED_PENDING_CLIENT_ACTION`, `CLOSED` The status of the dispute: * `CREATED` – The dispute is created. * `PENDING_CLIENT_ACTION` – The dispute was not closed automatically upon its creation, it now requires some actions from the platform (either submission after providing the relevant proofs or closing). * `SUBMITTED` – The dispute is submitted by the platform for the Mangopay team to review the documents. * `PENDING_BANK_ACTION` – Mangopay accepted the documents and passed them on to the bank for them to review the dispute contestation. They will either reject or accept the contestation, or require further documents. * `REOPENED_PENDING_CLIENT_ACTION` – Mangopay didn’t accept the documents and requires more information or documents before sending the documents to the bank. * `CLOSED` – The dispute is closed. Additional information about the dispute `Status` communicated by Mangopay teams. Information about the reasons for the dispute. The reason for the dispute. *Max. length: 255 characters* Additional information about the reason for the dispute sent by Mangopay teams. **Returned values:** `LOST`, `WON`, `VOID` The result of the dispute for the platform, which can be: * `LOST` – The platform lost the dispute and must settle its debt to Mangopay with a Settlement Transfer. * `WON` – The platform won the dispute, the disputed funds will be credited back to the Repudiation Wallet. * `VOID` – The dispute has been canceled. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time the dispute was closed (i.e., its `Status` is set to `CLOSED`).\ Note: This value will be `null` for any Dispute closed before February 16th, 2023. The unique identifier of the repudiation. ```json 200 { "InitialTransactionId": "159196283", "InitialTransactionType": "PAYIN", "InitialTransactionNature": "REGULAR", "DisputeType": "CONTESTABLE", "ContestDeadlineDate": 1673395199, "DisputedFunds": { "Currency": "EUR", "Amount": 1000 }, "ContestedFunds": { "Currency": "EUR", "Amount": 1000 }, "Status": "CLOSED", "StatusMessage": null, "DisputeReason": { "DisputeReasonMessage": "This is a test dispute", "DisputeReasonType": "DUPLICATE" }, "ResultCode": "LOST", "ResultMessage": null, "Id": "159196329", "Tag": null, "CreationDate": 1672662590, "ClosedDate": 1675260940, "RepudiationId": "159196330" } ``` ```json REST { } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $disputeId = '199385514'; $response = $api->Disputes->CloseDispute($disputeId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myDispute = { Id: '192775714', } const closeDispute = async (disputeId) => { return await mangopay.Disputes.closeDispute(disputeId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } closeDispute(myDispute.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def closeDispute(disputeId) begin response = MangoPay::Dispute.close(disputeId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to close Dispute: #{error.message}" puts "Error details: #{error.details}" return false end end myDispute = { Id: '194618171' } closeDispute(myDispute[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Dispute; public class CloseDispute { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var disputeId = "dispute_m_01J2KVED9HY54JPWNSHSFV8RGC"; Dispute closeDispute = mangopay.getDisputeApi().closeDispute(disputeId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(closeDispute); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Dispute dispute = Dispute( id = 'dispute_m_01HQT6XRGC0JNZ27E339AX8QBB' ) close_dispute = dispute.close() pprint(close_dispute._data) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var disputeId = "dispute_m_01J41GEVRQN3W1C4YRK7NC04QT"; var closeDispute = await api.Disputes.CloseDisputeAsync(disputeId); string prettyPrint = JsonConvert.SerializeObject(closeDispute, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Dispute object ### Description Mangopay relies on the Dispute object to manage chargeback requests from a User. This object is automatically created when the user’s bank orders the reversal of a pay-in. As a consequence, Mangopay withdraws the required funds from the platform’s Repudiation Wallet. This is called a repudiation and results in the repudiation wallet having a negative balance that the platform will need to settle. ### Attributes The unique identifier of the initial pay-in being disputed. **Returned values:** `PAYIN` The type of the initial transaction being disputed. The nature of the initial transaction being disputed. **Returned values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of dispute: * `CONTESTABLE` – Dispute for which the chargeback can be contested by providing proof (i.e., Dispute Documents) justifying the original transaction. * `NOT_CONTESTABLE` – Dispute that is automatically closed after its creation, without any action possible for the platform. * `RETRIEVAL` – Dispute that is actually a chargeback warning issued by the bank. The platform is required to provide documents, but no funds will be taken from the Repudiation Wallet. The date and time until which the platform can contest the dispute (i.e., the `Status` is set to `SUBMITTED`). This date is defined by the issuing bank of the initial transaction and may usually vary between 7 to 18 days. Once the deadline passes, the dispute `Status` is automatically set to `CLOSED`. Information about the disputed funds.\ Note: This amount can be lower than the initial transaction amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the contested funds, in other words, the amount that you wish to contest.\ Note: This amount can be lower than the disputed funds amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `REOPENED_PENDING_CLIENT_ACTION`, `CLOSED` The status of the dispute: * `CREATED` – The dispute is created. * `PENDING_CLIENT_ACTION` – The dispute was not closed automatically upon its creation, it now requires some actions from the platform (either submission after providing the relevant proofs or closing). * `SUBMITTED` – The dispute is submitted by the platform for the Mangopay team to review the documents. * `PENDING_BANK_ACTION` – Mangopay accepted the documents and passed them on to the bank for them to review the dispute contestation. They will either reject or accept the contestation, or require further documents. * `REOPENED_PENDING_CLIENT_ACTION` – Mangopay didn’t accept the documents and requires more information or documents before sending the documents to the bank. * `CLOSED` – The dispute is closed. Additional information about the dispute `Status` communicated by Mangopay teams. Information about the reasons for the dispute. The reason for the dispute. *Max. length: 255 characters* Additional information about the reason for the dispute sent by Mangopay teams. **Returned values:** `LOST`, `WON`, `VOID` The result of the dispute for the platform, which can be: * `LOST` – The platform lost the dispute and must settle its debt to Mangopay with a Settlement Transfer. * `WON` – The platform won the dispute, the disputed funds will be credited back to the Repudiation Wallet. * `VOID` – The dispute has been canceled. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time the dispute was closed (i.e., its `Status` is set to `CLOSED`).\ Note: This value will be `null` for any Dispute closed before February 16th, 2023. The unique identifier of the repudiation. ### Related resources Learn more about disputes # List all Disputes GET /v2.01/{ClientId}/disputes ### Query parameters The date before which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. **Allowed values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `CLOSED`, `REOPENED_PENDING_CLIENT_ACTION` The status of the Dispute. You can filter on multiple values by separating them with a comma. **Allowed values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of the Dispute. You can filter on multiple values by separating them with a comma. ### Responses The list of disputes automatically created by Mangopay. The dispute automatically created by Mangopay. The unique identifier of the initial pay-in being disputed. **Returned values:** `PAYIN` The type of the initial transaction being disputed. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the initial transaction being refunded, providing more information about the context in which the transaction occurred: * REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * REPUDIATION – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user requested a chargeback). * REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle the credit from a repudiation following a lost dispute. **Returned values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of dispute: * `CONTESTABLE` – Dispute for which the chargeback can be contested by providing proof (i.e., Dispute Documents) justifying the original transaction. * `NOT_CONTESTABLE` – Dispute that is automatically closed after its creation, without any action possible for the platform. * `RETRIEVAL` – Dispute that is actually a chargeback warning issued by the bank. The platform is required to provide documents, but no funds will be taken from the Repudiation Wallet. The date and time until which the platform can contest the dispute (i.e., the `Status` is set to `SUBMITTED`). This date is defined by the issuing bank of the initial transaction and may usually vary between 7 to 18 days. Once the deadline passes, the dispute `Status` is automatically set to `CLOSED`. Information about the disputed funds.\ Note: This amount can be lower than the initial transaction amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the contested funds, in other words, the amount that you wish to contest.\ Note: This amount can be lower than the disputed funds amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `REOPENED_PENDING_CLIENT_ACTION`, `CLOSED` The status of the dispute: * `CREATED` – The dispute is created. * `PENDING_CLIENT_ACTION` – The dispute was not closed automatically upon its creation, it now requires some actions from the platform (either submission after providing the relevant proofs or closing). * `SUBMITTED` – The dispute is submitted by the platform for the Mangopay team to review the documents. * `PENDING_BANK_ACTION` – Mangopay accepted the documents and passed them on to the bank for them to review the dispute contestation. They will either reject or accept the contestation, or require further documents. * `REOPENED_PENDING_CLIENT_ACTION` – Mangopay didn’t accept the documents and requires more information or documents before sending the documents to the bank. * `CLOSED` – The dispute is closed. Additional information about the dispute `Status` communicated by Mangopay teams. Information about the reasons for the dispute. The reason for the dispute. *Max. length: 255 characters* Additional information about the reason for the dispute sent by Mangopay teams. **Returned values:** `LOST`, `WON`, `VOID` The result of the dispute for the platform, which can be: * `LOST` – The platform lost the dispute and must settle its debt to Mangopay with a Settlement Transfer. * `WON` – The platform won the dispute, the disputed funds will be credited back to the Repudiation Wallet. * `VOID` – The dispute has been canceled. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time the dispute was closed (i.e., its `Status` is set to `CLOSED`).\ Note: This value will be `null` for any Dispute closed before February 16th, 2023. The unique identifier of the repudiation. ```json 200 [ { "InitialTransactionId": "158596153", "InitialTransactionType": "PAYIN", "InitialTransactionNature": "REGULAR", "DisputeType": "CONTESTABLE", "ContestDeadlineDate": 1673049599, "DisputedFunds": { "Currency": "EUR", "Amount": 1200 }, "ContestedFunds": { "Currency": "EUR", "Amount": 1200 }, "Status": "PENDING_CLIENT_ACTION", "StatusMessage": null, "DisputeReason": { "DisputeReasonMessage": "This is a test dispute", "DisputeReasonType": "UNKNOWN" }, "ResultCode": "", "ResultMessage": null, "Id": "159102965", "Tag": null, "CreationDate": 1672411848, "ClosedDate": 1675260940, "RepudiationId": "159102966" } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $response = $api->Disputes->GetAll(); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) const listDisputes = async () => { return await mangopay.Disputes.getAll() .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listDisputes() ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listDisputes() begin response = MangoPay::Dispute.fetch() puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Disputes: #{error.message}" puts "Error details: #{error.details}" return false end end listDisputes() ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Dispute; import java.util.List; public class ListDisputes { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); List disputes = mangopay.getDisputeApi().getAll(); for (Dispute dispute : disputes) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(dispute); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Dispute disputes = Dispute.all() for dispute in disputes: print() pprint(dispute._data) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var disputes = await api.Disputes.GetAllAsync(new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(disputes, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Disputes for a PayIn GET /v2.01/{ClientId}/payins/{PayInId}/disputes ### Path parameters The unique identifier of the pay-in. ### Query parameters The date before which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. **Allowed values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `CLOSED`, `REOPENED_PENDING_CLIENT_ACTION` The status of the Dispute. You can filter on multiple values by separating them with a comma. **Allowed values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of the Dispute. You can filter on multiple values by separating them with a comma. ### Responses The list of disputes automatically created by Mangopay. The dispute automatically created by Mangopay. The unique identifier of the initial pay-in being disputed. **Returned values:** `PAYIN` The type of the initial transaction being disputed. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the initial transaction being refunded, providing more information about the context in which the transaction occurred: * REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * REPUDIATION – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user requested a chargeback). * REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle the credit from a repudiation following a lost dispute. **Returned values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of dispute: * `CONTESTABLE` – Dispute for which the chargeback can be contested by providing proof (i.e., Dispute Documents) justifying the original transaction. * `NOT_CONTESTABLE` – Dispute that is automatically closed after its creation, without any action possible for the platform. * `RETRIEVAL` – Dispute that is actually a chargeback warning issued by the bank. The platform is required to provide documents, but no funds will be taken from the Repudiation Wallet. The date and time until which the platform can contest the dispute (i.e., the `Status` is set to `SUBMITTED`). This date is defined by the issuing bank of the initial transaction and may usually vary between 7 to 18 days. Once the deadline passes, the dispute `Status` is automatically set to `CLOSED`. Information about the disputed funds.\ Note: This amount can be lower than the initial transaction amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the contested funds, in other words, the amount that you wish to contest.\ Note: This amount can be lower than the disputed funds amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `REOPENED_PENDING_CLIENT_ACTION`, `CLOSED` The status of the dispute: * `CREATED` – The dispute is created. * `PENDING_CLIENT_ACTION` – The dispute was not closed automatically upon its creation, it now requires some actions from the platform (either submission after providing the relevant proofs or closing). * `SUBMITTED` – The dispute is submitted by the platform for the Mangopay team to review the documents. * `PENDING_BANK_ACTION` – Mangopay accepted the documents and passed them on to the bank for them to review the dispute contestation. They will either reject or accept the contestation, or require further documents. * `REOPENED_PENDING_CLIENT_ACTION` – Mangopay didn’t accept the documents and requires more information or documents before sending the documents to the bank. * `CLOSED` – The dispute is closed. Additional information about the dispute `Status` communicated by Mangopay teams. Information about the reasons for the dispute. The reason for the dispute. *Max. length: 255 characters* Additional information about the reason for the dispute sent by Mangopay teams. **Returned values:** `LOST`, `WON`, `VOID` The result of the dispute for the platform, which can be: * `LOST` – The platform lost the dispute and must settle its debt to Mangopay with a Settlement Transfer. * `WON` – The platform won the dispute, the disputed funds will be credited back to the Repudiation Wallet. * `VOID` – The dispute has been canceled. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time the dispute was closed (i.e., its `Status` is set to `CLOSED`).\ Note: This value will be `null` for any Dispute closed before February 16th, 2023. The unique identifier of the repudiation. ```json 200 [ { "InitialTransactionId": "158596153", "InitialTransactionType": "PAYIN", "InitialTransactionNature": "REGULAR", "DisputeType": "CONTESTABLE", "ContestDeadlineDate": 1673049599, "DisputedFunds": { "Currency": "EUR", "Amount": 1200 }, "ContestedFunds": { "Currency": "EUR", "Amount": 1200 }, "Status": "PENDING_CLIENT_ACTION", "StatusMessage": null, "DisputeReason": { "DisputeReasonMessage": "This is a test dispute", "DisputeReasonType": "UNKNOWN" }, "ResultCode": "", "ResultMessage": null, "Id": "159102965", "Tag": null, "CreationDate": 1672411848, "ClosedDate": null, "RepudiationId": "159102966" } ] ``` ``` ``` # List Disputes pending settlement GET /v2.01/{ClientId}/disputes/pendingsettlement This call lists all the disputes for which you need to make a settlement transfer. ### Responses The list of disputes automatically created by Mangopay. The dispute automatically created by Mangopay. The unique identifier of the initial pay-in being disputed. **Returned values:** `PAYIN` The type of the initial transaction being disputed. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the initial transaction being refunded, providing more information about the context in which the transaction occurred: * REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * REPUDIATION – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user requested a chargeback). * REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle the credit from a repudiation following a lost dispute. **Returned values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of dispute: * `CONTESTABLE` – Dispute for which the chargeback can be contested by providing proof (i.e., Dispute Documents) justifying the original transaction. * `NOT_CONTESTABLE` – Dispute that is automatically closed after its creation, without any action possible for the platform. * `RETRIEVAL` – Dispute that is actually a chargeback warning issued by the bank. The platform is required to provide documents, but no funds will be taken from the Repudiation Wallet. The date and time until which the platform can contest the dispute (i.e., the `Status` is set to `SUBMITTED`). This date is defined by the issuing bank of the initial transaction and may usually vary between 7 to 18 days. Once the deadline passes, the dispute `Status` is automatically set to `CLOSED`. Information about the disputed funds.\ Note: This amount can be lower than the initial transaction amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the contested funds, in other words, the amount that you wish to contest.\ Note: This amount can be lower than the disputed funds amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `REOPENED_PENDING_CLIENT_ACTION`, `CLOSED` The status of the dispute: * `CREATED` – The dispute is created. * `PENDING_CLIENT_ACTION` – The dispute was not closed automatically upon its creation, it now requires some actions from the platform (either submission after providing the relevant proofs or closing). * `SUBMITTED` – The dispute is submitted by the platform for the Mangopay team to review the documents. * `PENDING_BANK_ACTION` – Mangopay accepted the documents and passed them on to the bank for them to review the dispute contestation. They will either reject or accept the contestation, or require further documents. * `REOPENED_PENDING_CLIENT_ACTION` – Mangopay didn’t accept the documents and requires more information or documents before sending the documents to the bank. * `CLOSED` – The dispute is closed. Additional information about the dispute `Status` communicated by Mangopay teams. Information about the reasons for the dispute. The reason for the dispute. *Max. length: 255 characters* Additional information about the reason for the dispute sent by Mangopay teams. **Returned values:** `LOST`, `WON`, `VOID` The result of the dispute for the platform, which can be: * `LOST` – The platform lost the dispute and must settle its debt to Mangopay with a Settlement Transfer. * `WON` – The platform won the dispute, the disputed funds will be credited back to the Repudiation Wallet. * `VOID` – The dispute has been canceled. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time the dispute was closed (i.e., its `Status` is set to `CLOSED`).\ Note: This value will be `null` for any Dispute closed before February 16th, 2023. The unique identifier of the repudiation. ```json 200 [ { "InitialTransactionId": "158596153", "InitialTransactionType": "PAYIN", "InitialTransactionNature": "REGULAR", "DisputeType": "CONTESTABLE", "ContestDeadlineDate": 1673049599, "DisputedFunds": { "Currency": "EUR", "Amount": 1200 }, "ContestedFunds": { "Currency": "EUR", "Amount": 1200 }, "Status": "CLOSED", "StatusMessage": null, "DisputeReason": { "DisputeReasonMessage": "This is a test dispute", "DisputeReasonType": "UNKNOWN" }, "ResultCode": "LOST", "ResultMessage": null, "Id": "159102965", "Tag": null, "CreationDate": 1672411848, "ClosedDate": null, "RepudiationId": "159102966" } ] ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) const listDisputesPendingSettlement = async () => { return await mangopay.Disputes.getPendingSettlement() .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listDisputesPendingSettlement() ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Dispute; import java.util.List; public class ListDisputesPendingSettlement { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); List disputes = mangopay.getDisputeApi().getDisputesWithPendingSettlement(); for (Dispute dispute : disputes) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(dispute); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Dispute disputes = Dispute.all(status = 'PENDING_CLIENT_ACTION') for dispute in disputes: print() pprint(dispute._data) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var disputes = await api.Disputes.GetDisputesPendingSettlementAsync(new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(disputes, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Disputes for a User GET /v2.01/{ClientId}/users/{UserId}/disputes ### Path parameters The unique identifier of the user. ### Query parameters The date before which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. **Allowed values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `CLOSED`, `REOPENED_PENDING_CLIENT_ACTION` The status of the Dispute. You can filter on multiple values by separating them with a comma. **Allowed values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of the Dispute. You can filter on multiple values by separating them with a comma. ### Responses The list of disputes automatically created by Mangopay. The dispute automatically created by Mangopay. The unique identifier of the initial pay-in being disputed. **Returned values:** `PAYIN` The type of the initial transaction being disputed. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the initial transaction being refunded, providing more information about the context in which the transaction occurred: * REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * REPUDIATION – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user requested a chargeback). * REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle the credit from a repudiation following a lost dispute. **Returned values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of dispute: * `CONTESTABLE` – Dispute for which the chargeback can be contested by providing proof (i.e., Dispute Documents) justifying the original transaction. * `NOT_CONTESTABLE` – Dispute that is automatically closed after its creation, without any action possible for the platform. * `RETRIEVAL` – Dispute that is actually a chargeback warning issued by the bank. The platform is required to provide documents, but no funds will be taken from the Repudiation Wallet. The date and time until which the platform can contest the dispute (i.e., the `Status` is set to `SUBMITTED`). This date is defined by the issuing bank of the initial transaction and may usually vary between 7 to 18 days. Once the deadline passes, the dispute `Status` is automatically set to `CLOSED`. Information about the disputed funds.\ Note: This amount can be lower than the initial transaction amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the contested funds, in other words, the amount that you wish to contest.\ Note: This amount can be lower than the disputed funds amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `REOPENED_PENDING_CLIENT_ACTION`, `CLOSED` The status of the dispute: * `CREATED` – The dispute is created. * `PENDING_CLIENT_ACTION` – The dispute was not closed automatically upon its creation, it now requires some actions from the platform (either submission after providing the relevant proofs or closing). * `SUBMITTED` – The dispute is submitted by the platform for the Mangopay team to review the documents. * `PENDING_BANK_ACTION` – Mangopay accepted the documents and passed them on to the bank for them to review the dispute contestation. They will either reject or accept the contestation, or require further documents. * `REOPENED_PENDING_CLIENT_ACTION` – Mangopay didn’t accept the documents and requires more information or documents before sending the documents to the bank. * `CLOSED` – The dispute is closed. Additional information about the dispute `Status` communicated by Mangopay teams. Information about the reasons for the dispute. The reason for the dispute. *Max. length: 255 characters* Additional information about the reason for the dispute sent by Mangopay teams. **Returned values:** `LOST`, `WON`, `VOID` The result of the dispute for the platform, which can be: * `LOST` – The platform lost the dispute and must settle its debt to Mangopay with a Settlement Transfer. * `WON` – The platform won the dispute, the disputed funds will be credited back to the Repudiation Wallet. * `VOID` – The dispute has been canceled. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time the dispute was closed (i.e., its `Status` is set to `CLOSED`).\ Note: This value will be `null` for any Dispute closed before February 16th, 2023. The unique identifier of the repudiation. ```json 200 [ { "InitialTransactionId": "158596153", "InitialTransactionType": "PAYIN", "InitialTransactionNature": "REGULAR", "DisputeType": "CONTESTABLE", "ContestDeadlineDate": 1673049599, "DisputedFunds": { "Currency": "EUR", "Amount": 1200 }, "ContestedFunds": { "Currency": "EUR", "Amount": 1200 }, "Status": "PENDING_CLIENT_ACTION", "StatusMessage": null, "DisputeReason": { "DisputeReasonMessage": "This is a test dispute", "DisputeReasonType": "UNKNOWN" }, "ResultCode": "", "ResultMessage": null, "Id": "159102965", "Tag": null, "CreationDate": 1672411848, "ClosedDate": null, "RepudiationId": "159102966" } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $response = $api->Disputes->GetDisputesForUser($userId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: '146476890', } const listDisputesUser = async (userId) => { return await mangopay.Disputes.getDisputesForUser(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listDisputesUser(myUser.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listUserDisputes(userId) begin response = MangoPay::Dispute.fetch_for_user(userId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Dispute: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '146476890' } listUserDisputes(myUser[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Dispute; import java.util.List; public class ListUserDisputes { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR"; List disputes = mangopay.getDisputeApi().getDisputesForUser(userId, null, null, null); for (Dispute dispute : disputes) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(dispute); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Dispute natural_user = NaturalUser.get('user_m_01HQK25M6KVHKDV0S36JY9NRKR') disputes = Dispute.all(user_id = natural_user.id) for dispute in disputes: print() pprint(dispute._data) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var disputes = await api.Disputes.GetDisputesForUserAsync(userId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(disputes, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Disputes for a Wallet GET /v2.01/{ClientId}/wallets/{WalletId}/disputes ### Path parameters The unique identifier of the wallet. ### Query parameters The date before which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. **Allowed values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `CLOSED`, `REOPENED_PENDING_CLIENT_ACTION` The status of the Dispute. You can filter on multiple values by separating them with a comma. **Allowed values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of the Dispute. You can filter on multiple values by separating them with a comma. ### Responses The list of disputes automatically created by Mangopay. The dispute automatically created by Mangopay. The unique identifier of the initial pay-in being disputed. **Returned values:** `PAYIN` The type of the initial transaction being disputed. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the initial transaction being refunded, providing more information about the context in which the transaction occurred: * REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * REPUDIATION – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user requested a chargeback). * REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle the credit from a repudiation following a lost dispute. **Returned values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of dispute: * `CONTESTABLE` – Dispute for which the chargeback can be contested by providing proof (i.e., Dispute Documents) justifying the original transaction. * `NOT_CONTESTABLE` – Dispute that is automatically closed after its creation, without any action possible for the platform. * `RETRIEVAL` – Dispute that is actually a chargeback warning issued by the bank. The platform is required to provide documents, but no funds will be taken from the Repudiation Wallet. The date and time until which the platform can contest the dispute (i.e., the `Status` is set to `SUBMITTED`). This date is defined by the issuing bank of the initial transaction and may usually vary between 7 to 18 days. Once the deadline passes, the dispute `Status` is automatically set to `CLOSED`. Information about the disputed funds.\ Note: This amount can be lower than the initial transaction amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the contested funds, in other words, the amount that you wish to contest.\ Note: This amount can be lower than the disputed funds amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `REOPENED_PENDING_CLIENT_ACTION`, `CLOSED` The status of the dispute: * `CREATED` – The dispute is created. * `PENDING_CLIENT_ACTION` – The dispute was not closed automatically upon its creation, it now requires some actions from the platform (either submission after providing the relevant proofs or closing). * `SUBMITTED` – The dispute is submitted by the platform for the Mangopay team to review the documents. * `PENDING_BANK_ACTION` – Mangopay accepted the documents and passed them on to the bank for them to review the dispute contestation. They will either reject or accept the contestation, or require further documents. * `REOPENED_PENDING_CLIENT_ACTION` – Mangopay didn’t accept the documents and requires more information or documents before sending the documents to the bank. * `CLOSED` – The dispute is closed. Additional information about the dispute `Status` communicated by Mangopay teams. Information about the reasons for the dispute. The reason for the dispute. *Max. length: 255 characters* Additional information about the reason for the dispute sent by Mangopay teams. **Returned values:** `LOST`, `WON`, `VOID` The result of the dispute for the platform, which can be: * `LOST` – The platform lost the dispute and must settle its debt to Mangopay with a Settlement Transfer. * `WON` – The platform won the dispute, the disputed funds will be credited back to the Repudiation Wallet. * `VOID` – The dispute has been canceled. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time the dispute was closed (i.e., its `Status` is set to `CLOSED`).\ Note: This value will be `null` for any Dispute closed before February 16th, 2023. The unique identifier of the repudiation. ```json 200 [ { "InitialTransactionId": "158596153", "InitialTransactionType": "PAYIN", "InitialTransactionNature": "REGULAR", "DisputeType": "CONTESTABLE", "ContestDeadlineDate": 1673049599, "DisputedFunds": { "Currency": "EUR", "Amount": 1200 }, "ContestedFunds": { "Currency": "EUR", "Amount": 1200 }, "Status": "PENDING_CLIENT_ACTION", "StatusMessage": null, "DisputeReason": { "DisputeReasonMessage": "This is a test dispute", "DisputeReasonType": "UNKNOWN" }, "ResultCode": "", "ResultMessage": null, "Id": "159102965", "Tag": null, "CreationDate": 1672411848, "ClosedDate": 1675260940, "RepudiationId": "159102966" } ] ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myWallet = { Id: '148968396', } const listWalletDisputes = async (walletId) => { return await mangopay.Disputes.getDisputesForWallet(walletId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listWalletDisputes(myWallet.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listWalletDisputes(walletId) begin response = MangoPay::Dispute.fetch_for_wallet(walletId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Dispute: #{error.message}" puts "Error details: #{error.details}" return false end end myWallet = { Id: '194579906' } listWalletDisputes(myWallet[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Dispute; import java.util.List; public class ListWalletDisputes { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var walletId = "wlt_m_01HT2J9Q2M6GMFW4Z7GYBAFJ4T"; List disputes = mangopay.getDisputeApi().getDisputesForWallet(walletId, null, null, null); for (Dispute dispute : disputes) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(dispute); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Wallet user_wallet = Wallet.get('wlt_m_01HQT7AS0FJPGYXDXJ0R151NBV') disputes = user_wallet.disputes.all() for dispute in disputes: print() pprint(dispute._vars) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var disputes = await api.Disputes.GetDisputesForWalletAsync(walletId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(disputes, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Submit a Dispute PUT /v2.01/{ClientId}/disputes/{DisputeId}/submit This call is used both for the initial submission of the dispute and any resubmission made afterwards (in case more documents are required for instance). ### Path parameters The unique identifier of the dispute. ### Body parameters Information about the contested funds, in other words, the amount that you wish to contest.\ Note: This amount can be lower than the disputed funds amount. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). ### Responses The unique identifier of the initial pay-in being disputed. **Returned values:** `PAYIN` The type of the initial transaction being disputed. **Returned values:** `REGULAR` The nature of the initial transaction being disputed. **Returned values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of dispute: * `CONTESTABLE` – Dispute for which the chargeback can be contested by providing proof (i.e., Dispute Documents) justifying the original transaction. * `NOT_CONTESTABLE` – Dispute that is automatically closed after its creation, without any action possible for the platform. * `RETRIEVAL` – Dispute that is actually a chargeback warning issued by the bank. The platform is required to provide documents, but no funds will be taken from the Repudiation Wallet. The date and time until which the platform can contest the dispute (i.e., the `Status` is set to `SUBMITTED`). This date is defined by the issuing bank of the initial transaction and may usually vary between 7 to 18 days. Once the deadline passes, the dispute `Status` is automatically set to `CLOSED`. Information about the disputed funds.\ Note: This amount can be lower than the initial transaction amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the contested funds, in other words, the amount that you wish to contest.\ Note: This amount can be lower than the disputed funds amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `REOPENED_PENDING_CLIENT_ACTION`, `CLOSED` The status of the dispute: * `CREATED` – The dispute is created. * `PENDING_CLIENT_ACTION` – The dispute was not closed automatically upon its creation, it now requires some actions from the platform (either submission after providing the relevant proofs or closing). * `SUBMITTED` – The dispute is submitted by the platform for the Mangopay team to review the documents. * `PENDING_BANK_ACTION` – Mangopay accepted the documents and passed them on to the bank for them to review the dispute contestation. They will either reject or accept the contestation, or require further documents. * `REOPENED_PENDING_CLIENT_ACTION` – Mangopay didn’t accept the documents and requires more information or documents before sending the documents to the bank. * `CLOSED` – The dispute is closed. Additional information about the dispute `Status` communicated by Mangopay teams. Information about the reasons for the dispute. The reason for the dispute. *Max. length: 255 characters* Additional information about the reason for the dispute sent by Mangopay teams. **Returned values:** `LOST`, `WON`, `VOID` The result of the dispute for the platform, which can be: * `LOST` – The platform lost the dispute and must settle its debt to Mangopay with a Settlement Transfer. * `WON` – The platform won the dispute, the disputed funds will be credited back to the Repudiation Wallet. * `VOID` – The dispute has been canceled. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time the dispute was closed (i.e., its `Status` is set to `CLOSED`).\ Note: This value will be `null` for any Dispute closed before February 16th, 2023. The unique identifier of the repudiation. ```json { "Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type":"param_error", "Id":"994a6ed2-bca5-4673-a37f-16c01e9ad065#1673365608", "Date":1673365609, "errors":{ "ContestedFunds":"This field is required" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "d37b150a-6238-4298-9da4-2540e6d46bd5#1672669956", "Date": 1672669957.0, "errors": { "ContestedFunds": "The ContestedFunds amount must be less than or equal to the DisputedFunds amount" } } ``` ```json { "Message": "The ContestDeadlineDate has now passed and this Dispute is no longer contestable", "Type": "dispute_contest_deadline_passed", "Id": "9544eb52-8ae4-41ac-99e0-1215f17e3859#1673434106", "Date": 1673434107.0, "errors": null } ``` ```json 200 { "InitialTransactionId": "158596153", "InitialTransactionType": "PAYIN", "InitialTransactionNature": "REGULAR", "DisputeType": "CONTESTABLE", "ContestDeadlineDate": 1673049599, "DisputedFunds": { "Currency": "EUR", "Amount": 1200 }, "ContestedFunds": { "Currency": "EUR", "Amount": 1200 }, "Status": "SUBMITTED", "StatusMessage": null, "DisputeReason": { "DisputeReasonMessage": "This is a test dispute", "DisputeReasonType": "UNKNOWN" }, "ResultCode": "", "ResultMessage": null, "Id": "159102965", "Tag": null, "CreationDate": 1672411848, "ClosedDate": null, "RepudiationId": "159102966" } ``` ```json REST { "ContestedFunds": { "Currency": "EUR", "Amount": 1200 } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; // To submit a dispute for the first time try { $disputeId = '199385842'; $contestedFunds = new \MangoPay\Money(); $contestedFunds->Amount = 500; $contestedFunds->Currency = 'EUR'; $response = $api->Disputes->ContestDispute($disputeId, $contestedFunds); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } // To submit a reopened dispute try { $disputeId = '199385842'; $response = $api->Disputes->ResubmitDispute($disputeId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) // When submitting a dispute for the first time let myDispute = { Id: '193572349', contestedFunds: { Currency: 'EUR', Amount: '10', }, } const submitDispute = async (disputeId, contestedFunds) => { return await mangopay.Disputes.contestDispute(disputeId, contestedFunds) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } submitDispute(myDispute.Id, myDispute.contestedFunds) // When resubmitting the dispute (in case more documents are required) let myDispute = { Id: '192746554', } const resubmitDispute = async (disputeId) => { return await mangopay.Disputes.resubmitDispute(disputeId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } resubmitDispute(myDispute.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end # When submitting a dispute for the first time def submitDispute(disputeId, contestedFunds) begin response = MangoPay::Dispute.contest(disputeId, contestedFunds) puts response return response rescue MangoPay::ResponseError => error puts "Failed to submit Dispute: #{error.message}" puts "Error details: #{error.details}" return false end end myDispute = { Id:'194413022' } myContestedFunds = { Currency: 'EUR', Amount: 250 } submitDispute(myDispute[:Id], myContestedFunds) # When resubmitting the dispute (in case more documents are required) def resubmitDispute(disputeId) begin response = MangoPay::Dispute.resubmit(disputeId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to submit Dispute: #{error.message}" puts "Error details: #{error.details}" return false end end myDispute = { Id: '194413022' } resubmitDispute(myDispute[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.Dispute; public class SubmitDispute { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var disputeId = "dispute_m_01J2H7DQES2T3NH0QEN3HV3MED"; Dispute submitDispute = mangopay.getDisputeApi().contestDispute(new Money(CurrencyIso.EUR, 500), disputeId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(submitDispute); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Dispute from mangopay.utils import Money dispute = Dispute( id = 'dispute_m_01HQT6F2162Q1791CZR5RM4WSD' ) submit_dispute = Dispute.contest(self = dispute, money=Money(amount=2000, currency='EUR')) pprint(submit_dispute) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var disputeId = "dispute_m_01J41GEVRQN3W1C4YRK7NC04QT"; Money contestedFunds = new Money { Amount = 1000, Currency = CurrencyIso.EUR }; var submitDispute = await api.Disputes.ContestDisputeAsync(contestedFunds, disputeId); string prettyPrint = JsonConvert.SerializeObject(submitDispute, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Update a Dispute PUT /v2.01/{ClientId}/disputes/{DisputeId} ### Path parameters The unique identifier of the dispute. ### Responses The unique identifier of the initial pay-in being disputed. **Returned values:** `PAYIN` The type of the initial transaction being disputed. **Returned values:** `REGULAR` The nature of the initial transaction being disputed. **Returned values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of dispute: * `CONTESTABLE` – Dispute for which the chargeback can be contested by providing proof (i.e., Dispute Documents) justifying the original transaction. * `NOT_CONTESTABLE` – Dispute that is automatically closed after its creation, without any action possible for the platform. * `RETRIEVAL` – Dispute that is actually a chargeback warning issued by the bank. The platform is required to provide documents, but no funds will be taken from the Repudiation Wallet. The date and time until which the platform can contest the dispute (i.e., the `Status` is set to `SUBMITTED`). This date is defined by the issuing bank of the initial transaction and may usually vary between 7 to 18 days. Once the deadline passes, the dispute `Status` is automatically set to `CLOSED`. Information about the disputed funds.\ Note: This amount can be lower than the initial transaction amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the contested funds, in other words, the amount that you wish to contest.\ Note: This amount can be lower than the disputed funds amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `REOPENED_PENDING_CLIENT_ACTION`, `CLOSED` The status of the dispute: * `CREATED` – The dispute is created. * `PENDING_CLIENT_ACTION` – The dispute was not closed automatically upon its creation, it now requires some actions from the platform (either submission after providing the relevant proofs or closing). * `SUBMITTED` – The dispute is submitted by the platform for the Mangopay team to review the documents. * `PENDING_BANK_ACTION` – Mangopay accepted the documents and passed them on to the bank for them to review the dispute contestation. They will either reject or accept the contestation, or require further documents. * `REOPENED_PENDING_CLIENT_ACTION` – Mangopay didn’t accept the documents and requires more information or documents before sending the documents to the bank. * `CLOSED` – The dispute is closed. Additional information about the dispute `Status` communicated by Mangopay teams. Information about the reasons for the dispute. The reason for the dispute. *Max. length: 255 characters* Additional information about the reason for the dispute sent by Mangopay teams. **Returned values:** `LOST`, `WON`, `VOID` The result of the dispute for the platform, which can be: * `LOST` – The platform lost the dispute and must settle its debt to Mangopay with a Settlement Transfer. * `WON` – The platform won the dispute, the disputed funds will be credited back to the Repudiation Wallet. * `VOID` – The dispute has been canceled. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time the dispute was closed (i.e., its `Status` is set to `CLOSED`).\ Note: This value will be `null` for any Dispute closed before February 16th, 2023. The unique identifier of the repudiation. ```json 200 { "InitialTransactionId": "159196292", "InitialTransactionType": "PAYIN", "InitialTransactionNature": "REGULAR", "DisputeType": "CONTESTABLE", "ContestDeadlineDate": 1673395199, "DisputedFunds": { "Currency": "EUR", "Amount": 2000 }, "ContestedFunds": { "Currency": "EUR", "Amount": 2000 }, "Status": "PENDING_CLIENT_ACTION", "StatusMessage": null, "DisputeReason": { "DisputeReasonMessage": "This is a test dispute", "DisputeReasonType": "DUPLICATE" }, "ResultCode": "", "ResultMessage": null, "Id": "159206448", "Tag": "Updated tag", "CreationDate": 1672669787, "ClosedDate": null, "RepudiationId": "159206449" } ``` ```json REST { "Tag": "Updated tag" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $disputeId = '192746554'; $dispute = $api->Disputes->Get($disputeId); $dispute->Tag = 'Updated using Mangopay PHP SDK'; $response = $api->Disputes->Update($dispute); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myDispute = { Id: '192746554', Tag: 'Created using Mangopay NodeJS SDK', } const updateDispute = async (dispute) => { return await mangopay.Disputes.update(dispute) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } updateDispute(myDispute) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def updateDispute(disputeId, disputeObject) begin response = MangoPay::Dispute.update(disputeId, disputeObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to update Dispute: #{error.message}" puts "Error details: #{error.details}" return false end end myDispute = { Id:'194413022', Tag: 'Updated using Mangopay Ruby SDK' } updateDispute(myDispute[:Id], myDispute) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Dispute; public class UpdateDispute { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var disputeId = "dispute_m_01J2H7DQES2T3NH0QEN3HV3MED"; Dispute updateDispute = mangopay.getDisputeApi().updateTag("Updated using the Mangopay Java SDK", disputeId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(updateDispute); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Dispute dispute = Dispute( id = 'dispute_m_01HQT6F2162Q1791CZR5RM4WSD', tag = 'Updated using the Mangopay Python SDK' ) update_dispute = dispute.save() pprint(update_dispute) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var disputeId = "dispute_m_01J41GEVRQN3W1C4YRK7NC04QT"; var updateDispute = await api.Disputes.UpdateTagAsync( "Updated using the Mangopay .NET SDK", disputeId ); string prettyPrint = JsonConvert.SerializeObject(updateDispute, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Dispute GET /v2.01/{ClientId}/disputes/{DisputeId} ### Path parameters The unique identifier of the dispute. ### Responses The unique identifier of the initial pay-in being disputed. **Returned values:** `PAYIN` The type of the initial transaction being disputed. **Returned values:** `REGULAR` The nature of the initial transaction being disputed. **Returned values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of dispute: * `CONTESTABLE` – Dispute for which the chargeback can be contested by providing proof (i.e., Dispute Documents) justifying the original transaction. * `NOT_CONTESTABLE` – Dispute that is automatically closed after its creation, without any action possible for the platform. * `RETRIEVAL` – Dispute that is actually a chargeback warning issued by the bank. The platform is required to provide documents, but no funds will be taken from the Repudiation Wallet. The date and time until which the platform can contest the dispute (i.e., the `Status` is set to `SUBMITTED`). This date is defined by the issuing bank of the initial transaction and may usually vary between 7 to 18 days. Once the deadline passes, the dispute `Status` is automatically set to `CLOSED`. Information about the disputed funds.\ Note: This amount can be lower than the initial transaction amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the contested funds, in other words, the amount that you wish to contest.\ Note: This amount can be lower than the disputed funds amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `REOPENED_PENDING_CLIENT_ACTION`, `CLOSED` The status of the dispute: * `CREATED` – The dispute is created. * `PENDING_CLIENT_ACTION` – The dispute was not closed automatically upon its creation, it now requires some actions from the platform (either submission after providing the relevant proofs or closing). * `SUBMITTED` – The dispute is submitted by the platform for the Mangopay team to review the documents. * `PENDING_BANK_ACTION` – Mangopay accepted the documents and passed them on to the bank for them to review the dispute contestation. They will either reject or accept the contestation, or require further documents. * `REOPENED_PENDING_CLIENT_ACTION` – Mangopay didn’t accept the documents and requires more information or documents before sending the documents to the bank. * `CLOSED` – The dispute is closed. Additional information about the dispute `Status` communicated by Mangopay teams. Information about the reasons for the dispute. The reason for the dispute. *Max. length: 255 characters* Additional information about the reason for the dispute sent by Mangopay teams. **Returned values:** `LOST`, `WON`, `VOID` The result of the dispute for the platform, which can be: * `LOST` – The platform lost the dispute and must settle its debt to Mangopay with a Settlement Transfer. * `WON` – The platform won the dispute, the disputed funds will be credited back to the Repudiation Wallet. * `VOID` – The dispute has been canceled. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time the dispute was closed (i.e., its `Status` is set to `CLOSED`).\ Note: This value will be `null` for any Dispute closed before February 16th, 2023. The unique identifier of the repudiation. ```json 200 { "InitialTransactionId": "156981683", "InitialTransactionType": "PAYIN", "InitialTransactionNature": "REGULAR", "DisputeType": "CONTESTABLE", "ContestDeadlineDate": 1670025599, "DisputedFunds": { "Currency": "EUR", "Amount": 10000 }, "ContestedFunds": { "Currency": "EUR", "Amount": 10000 }, "Status": "PENDING_CLIENT_ACTION", "StatusMessage": null, "DisputeReason": { "DisputeReasonMessage": "This is a test dispute", "DisputeReasonType": "UNKNOWN" }, "ResultCode": "", "ResultMessage": null, "Id": "156981783", "Tag": null, "CreationDate": 1669384460, "ClosedDate": null, "RepudiationId": "156981784" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $disputeId = '193572349'; $response = $api->Disputes->Get($disputeId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myDispute = { Id: '159763014', } const viewDispute = async (disputeId) => { return await mangopay.Disputes.get(disputeId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewDispute(myDispute.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewDispute(disputeId) begin response = MangoPay::Dispute.fetch(disputeId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Dispute: #{error.message}" puts "Error details: #{error.details}" return false end end myDispute = { Id: '159763014' } viewDispute(myDispute[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Dispute; public class ViewDispute { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var disputeId = "dispute_m_01HQT8ZRCWP0HBT8QGRFMBA97B"; Dispute viewDispute = mangopay.getDisputeApi().get(disputeId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewDispute); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Dispute dispute_id = 'dispute_m_01HQT6F2162Q1791CZR5RM4WSD' try: view_dispute = Dispute.get(dispute_id) pprint(view_dispute._data) except Dispute.DoesNotExist: print('Dispute {} does not exist.'.format(view_dispute.id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var disputeId = "dispute_m_01HQT8ZRCWP0HBT8QGRFMBA97B"; var viewDispute = await api.Disputes.GetAsync(disputeId); string prettyPrint = JsonConvert.SerializeObject(viewDispute, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Event object ### Description The Event object is a record of something that happened in the API. You can set up notifications for events by using the Hook feature. ### Attributes *Max. length: 255 characters* The unique identifier of the event. The date and time the event occurred. **Returned values:** An `EventType` listed in the event types list The type of the event. ### Related resources Learn more about event types # List all Events GET /v2.01/{ClientId}/events **Note** Events are returned up to 45 days after they occur. Any request attempting to access an event older than 45 days will result in an HTTP 400 - error. ### Query parameters **Allowed values:** An `EventType` listed in the event types list The type of the event. The date before which the event was created (based on the event’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the event was created (based on the event’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. ### Responses The list of events created by the platform. The Event object created by the platform. *Max. length: 255 characters* The unique identifier of the event. The date and time the event occured. **Returned values:** An `EventType` listed in the event types list The type of the event. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "9fb282aa-7c7e-462c-9f5c-df5f8714b39f", "Date": 1715350291.0, "errors": { "AfterDate": "Events older than 45 days can not be searched", "BeforeDate": "Events older than 45 days can not be searched" } } ``` ```json 200 [ { "ResourceId": "144085929", "EventType": "UBO_DECLARATION_CREATED", "Date": 1655891453 }, { "ResourceId": "144086566", "EventType": "KYC_CREATED", "Date": 1655891893 } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $response = $api->Events->GetAll(); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) const listEvents = async () => { return await mangopay.Events.getAll() .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listEvents() ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listEvents() begin response = MangoPay::Event.fetch() puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch events: #{error.message}" puts "Error details: #{error.details}" return false end end listEvents() ``` ```java Java import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.FilterEvents; import com.mangopay.core.Pagination; import com.mangopay.entities.Event; import com.mangopay.core.enumerations.EventType; public class ListEvents { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); FilterEvents eventsFilter = new FilterEvents(); eventsFilter.setType(EventType.PAYIN_NORMAL_CREATED); List events = mangopay.getEventApi().get(eventsFilter, new Pagination(1, 100), null); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(events); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Event events = Event.all() for event in events: pprint(event._data) print() ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var events = await api.Events.GetAllAsync(null); string prettyPrint = JsonConvert.SerializeObject(events, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Giropay PayIn POST /v2.01/{ClientId}/payins/payment-methods/giropay **Warning – Giropay no longer available after June 30, 2024** Giropay’s operator Paydirekt has decided to cease the payment method’s services at the end of June, without providing a direct alternative. This decision by Paydirekt impacts the entire industry and is beyond our control. Effective July 1, 2024:  * Pay-ins will fail with the 101101 error * Refunds will be possible for one year  This change affects both the new and legacy integrations. Our team is ready to assist you with your integration of alternatives like Klarna, PayPal, or virtual IBANs for the German market. Please reach out via the Dashboard **Note – Timeout after 1 hour** The payment session lasts for 1 hour, at which point the pay-in fails automatically if no action has been taken by the user. **Note – Minimum amount** The minimum accepted amount for Giropay pay-ins is €1.00 (`100`). \ In Production, pay-ins lower than this amount will fail. ### Body parameters The unique identifier of the user at the source of the transaction. The unique identifier of the credited wallet. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `GIROPAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ```json 200 - Created { "Id": "wt_c80ffe77-7c19-496f-b0f9-a7fb40eae880", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1706098595, "AuthorId": "210513027", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "210514820", "CreditedUserId": "210513027", "PaymentType": "GIROPAY", "ExecutionType": "WEB", "ReturnURL": "https://www.mangopay.com/docs/please-ignore?transactionId=wt_c80ffe77-7c19-496f-b0f9-a7fb40eae880", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=140176566852&rs=X1JJW7Y7LCkRnu30mozSUGFCnijKDsfE&cs=eec29dd3a3007f06d65ba32ee55eed9a536fdaae5258398a9cfd9aafe2846ca1", "StatementDescriptor": "MGP" } ``` ```json REST { "AuthorId": "6672704", "CreditedWalletId": "6672709", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "ReturnURL": "https://www.mangopay.com/docs/please-ignore", "Tag": "Created using the Mangopay API Postman collection", "StatementDescriptor": "MGP" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInExecutionDetailsWeb; import com.mangopay.entities.subentities.PayInPaymentDetailsGiropay; public class CreateGiropayPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; PayIn giropayPayin = new PayIn(); giropayPayin.setAuthorId(userId); giropayPayin.setCreditedWalletId(walletId); giropayPayin.setDebitedFunds(new Money(CurrencyIso.EUR, 5000)); giropayPayin.setFees(new Money(CurrencyIso.EUR, 0)); giropayPayin.setTag("Created using the Mangopay Java SDK"); PayInExecutionDetailsWeb executionDetails = new PayInExecutionDetailsWeb(); executionDetails.setReturnUrl("https://www.mangopay.com/docs/please-ignore"); giropayPayin.setExecutionDetails(executionDetails); PayInPaymentDetailsGiropay paymentDetails = new PayInPaymentDetailsGiropay(); paymentDetails.setStatementDescriptor("Jul2024"); giropayPayin.setPaymentDetails(paymentDetails); giropayPayin.setPaymentType(PayInPaymentType.BLIK); giropayPayin.setExecutionType(PayInExecutionType.WEB); PayIn createGiropayPayin = mangopay.getPayInApi().create(giropayPayin); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createGiropayPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, GiropayPayIn from mangopay.utils import Money natural_user = NaturalUser.get('210513027') giropay_payin = GiropayPayIn( author_id = natural_user.id, credited_wallet_id = '210514820', debited_funds = Money(amount=400, currency='EUR'), fees = Money(amount=0, currency='EUR'), return_url = 'https://www.mangopay.com/docs/please-ignore', tag = 'Created using Mangopay Python SDK' ) create_giropay_payin = giropay_payin.save() pprint(create_giropay_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var returnUrl = "https://www.mangopay.com/docs/please-ignore/"; var payIn = new PayInGiropayWebPostDTO(userId, new Money { Amount = 2000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, returnUrl, "Created using the Mangopay .NET SDK", "MGP" ); var createGiropayPayIn = await api.PayIns.CreateGiropayWebAsync(payIn); string prettyPrint = JsonConvert.SerializeObject(createGiropayPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Giropay PayIn object ### Description **Warning – Giropay no longer available after June 30, 2024** Giropay’s operator Paydirekt has decided to cease the payment method’s services at the end of June, without providing a direct alternative. This decision by Paydirekt impacts the entire industry and is beyond our control. Effective July 1, 2024:  * Pay-ins will fail with the 101101 error * Refunds will be possible for one year  This change affects both the new and legacy integrations. Our team is ready to assist you with your integration of alternatives like Klarna, PayPal, or virtual IBANs for the German market. Please reach out via the Dashboard The Giropay PayIn object allows platforms to process payments made with the Giropay payment method. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `GIROPAY` The type of pay-in. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about Giropay # View a PayIn (Giropay) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `GIROPAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ```json 200 - Succeeded { "Id": "wt_c1339ba7-340a-4aaa-95d4-99ec8761fb59", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1706016964, "AuthorId": "213753890", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1706016990, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "213754077", "CreditedUserId": "213753890", "PaymentType": "GIROPAY", "ExecutionType": "WEB", "ReturnURL": "https://www.mangopay.com/docs/please-ignore?transactionId=wt_c1339ba7-340a-4aaa-95d4-99ec8761fb59", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=2189610513&rs=PgH9CNC9c92i1xyeg8e8bGU8JFvjF5zv&cs=be0e66b86594c1a19c56e78510ffca67d37751d3f38eacff6404bf43c320b3ea", "StatementDescriptor": "MGP" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetGiropayAsync("wt_0ed86eff-9a62-4d71-ada6-2afe387e50cb"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Google Pay PayIn POST /V2.01/{ClientId}/payins/payment-methods/googlepay ### Body parameters The unique identifier of the user at the source of the transaction. The unique identifier of the credited wallet. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). **Allowed values:** `DEFAULT`, `FORCE`, `NO_CHOICE` **Default value:** `DEFAULT` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The data returned by Google Pay containing information about the payment. **Default value:** FirstName, LastName, and Address information of the Shipping object if supplied. Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Required if the parent parameter is sent. Information about the shipping address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `GOOGLE_PAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Whether or not the `SecureMode` was used. **Default value:** FirstName, LastName, and Address information of the Shipping object if supplied. Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `GOOGLE_PAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. **Default value:** FirstName, LastName, and Address information of the Shipping object if supplied. Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `GOOGLE_PAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 - Succeeded - 3DS redirection not required (frictionless flow) { "Id": "wt_7607f14c-2929-431c-a989-ea4f48352ead", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1706097560, "AuthorId": "213407540", "DebitedFunds": { "Currency": "EUR", "Amount": 100 }, "CreditedFunds": { "Currency": "EUR", "Amount": 100 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1706097562, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "213407543", "CreditedUserId": "213407540", "PaymentType": "GOOGLE_PAY", "ExecutionType": "DIRECT", "StatementDescriptor": "Mangopay", "SecureMode": "DEFAULT", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore", "SecureModeRedirectURL": null, "SecureModeNeeded": false, "SecurityInfo": null, "BrowserInfo": { "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<", "JavaEnabled": true, "Language": "fr", "ColorDepth": 32, "ScreenHeight": 667, "ScreenWidth": 375, "TimeZoneOffset": -120, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "ddcd:543d:1cd4:a9e4:7a29:6cd1:93b6:772d", "CardInfo": { "BIN": "555555", "IssuingBank": "CIAGROUP", "IssuerCountryCode": "BR", "Type": "DEBIT", "SubType": "PREPAID", "Brand": "MASTERCARD" } } ``` ```json 200 - Created - 3DS redirection required (challenge flow) { "Id": "wt_794a782f-f6b1-4ba5-8adb-b8004323b31e", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1706097653, "AuthorId": "213407540", "DebitedFunds": { "Currency": "EUR", "Amount": 100 }, "CreditedFunds": { "Currency": "EUR", "Amount": 100 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "213407543", "CreditedUserId": "213407540", "PaymentType": "GOOGLE_PAY", "ExecutionType": "DIRECT", "StatementDescriptor": "Mangopay", "SecureMode": "DEFAULT", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore", "SecureModeRedirectURL": "https://api.sandbox.whenthen.co/payment-gateway/monext/3ds/challenge/3a01e913-64d2-4724-a6f9-64ddc3a08d8a/794a782f-f6b1-4ba5-8adb-b8004323b31e", "SecureModeNeeded": true, "SecurityInfo": null, "BrowserInfo": { "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<", "JavaEnabled": true, "Language": "fr", "ColorDepth": 32, "ScreenHeight": 667, "ScreenWidth": 375, "TimeZoneOffset": -120, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "7579:9817:dac3:76c8:23d4:2fcd:94a3:b5be", "CardInfo": { "BIN": "411111", "IssuingBank": "JPMORGAN CHASE BANK, N.A.", "IssuerCountryCode": "US", "Type": "CREDIT", "SubType": null, "Brand": "VISA" } } ``` ```json 200 - Failed due to invalid PaymentData { "Id": "wt_b409547d-8178-4bcf-bce0-524a4695133a", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1695395521, "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "FAILED", "ResultCode": "105207", "ResultMessage": "Invalid PaymentData", "ExecutionDate": 1695395521, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204089031", "CreditedUserId": "204068024", "PaymentType": "GOOGLE_PAY", "ExecutionType": "DIRECT", "StatementDescriptor": "Mangopay", "SecureMode": "DEFAULT", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore", "SecureModeRedirectURL": null, "SecureModeNeeded": false, "SecurityInfo": null, "BrowserInfo": { "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<", "JavaEnabled": true, "Language": "fr", "ColorDepth": 32, "ScreenHeight": 667, "ScreenWidth": 375, "TimeZoneOffset": -120, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "7124:c18a:0497:4676:f3f0:30c8:ec93:ad89", "CardInfo": { "BIN": "411111", "IssuingBank": "JPMORGAN CHASE BANK, N.A.", "IssuerCountryCode": "US", "Type": "CREDIT", "SubType": null, "Brand": "VISA" } } ``` ```json REST { "AuthorId":"6697855", "CreditedWalletId":"6697856", "DebitedFunds":{ "Currency":"EUR", "Amount":1000 }, "Fees":{ "Currency":"EUR", "Amount":0 }, "StatementDescriptor":"Statement", "Tag":"Google Pay PayIn", "IpAddress":"159.180.248.187", "SecureModeReturnURL":"https://mangopay.com/docs/please-ignore", "SecureMode":"DEFAULT", "ReturnURL":"https://mangopay.com/docs/please-ignore", "BrowserInfo":{ "AcceptHeader":"application/json,text/javascript,*/*;q=0.01<", "JavaEnabled":true, "Language":"fr", "ColorDepth":32, "ScreenHeight":667, "ScreenWidth":375, "TimeZoneOffset":"-120", "UserAgent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled":true }, "PaymentData":"{\"signature\":\"MEUCIQDc49/Bw1lTk8ok2fUe4UT2q955C01N2av40WJ28pMt0QIgBxiXHZbccHuqEQHyNJJw8SM337fxd8A3kJFqhsf4pHo\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8bX5bzBELcoJ1pPhEHtTIhpZQsRgVIMtRf9R5yRyC9c9WH8bvgxIx40qH4aQ+btVM/rwKuDE8cs+dERH2gjUjw\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1688804022772\\\"}\",\"signatures\":[\"MEUCIF2OifAlN5PG+isU+xxX8/OU5MTk81hBulSmp9bu8caDAiEAkdRqb8uo4CUx4kMiA317A1b+5BxRUc/8+QMyc9Ikjfg\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"tsTuUpytOkm8ENo1PpyzsHk6jxGDus/sSNQwqZeoPNw/NMQX2LJxJ6OTS4Yt+iNM7v4iuFC0eUWiy58xCQHKANeO/y66GJWMaDjPW2FBqBksb1WHXxP5KmgglACSqXtOMmjuYxVT6MeO4EfdsT4vGHRP0adP+Lkfj1tfjM1K0HyRWbLcwU9YXU0j83wV3PW28oxdFY5F4DC+Bhk7J5bZhIf5jymRXy3sR0kDoE/Qi4fUIdvgoHzi6MvppxCaEgwCygvfxu+vddP/7dshnL9+OFaDpoAp6is8I4UYbscNHkLosfBPwyUtndLMkDfNKUJ3yus92KSfbcK0iif3kXSMmV6ZrN873S7f27bsCsHhAlywOFpACorBNO8FzX/ediCsSi+n5kWOxe9oewGOeME2RNTsoy8an23be8yTek3YKajIhJRFW/9OtVnNmKOqwgw0F8nPFTjuSVPZbkinYS46Tr+KjOcr5aznEElkmk6OWgX1xSVkHZPpoW8XZdhB6Vs/5eWP6URncDZYN2EWtpWuz1+CAVKEjD95gcQGvzhmlPB0duiV76psDik8ojf2B6QfPJxV\\\",\\\"ephemeralPublicKey\\\":\\\"BJ0QIVwltj1vH2NAmYgUYBRrNymcOtTTP3QJnSc+enFGigIhNS87PZyA0PZ4iT/tifOqBj6barpJMwSQeO3nbJ0\\\\u003d\\\",\\\"tag\\\":\\\"R0iTOk4bogyVkf0STTvdiFq4kebJS7GN5/zxoBuCNNs\\\\u003d\\\"}\"}", "Billing":{ "FirstName":"Arthur", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Shipping":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"2345", "Country":"FR" } } } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.BrowserInfo; import com.mangopay.entities.subentities.PayInExecutionDetailsDirect; import com.mangopay.entities.subentities.PayInPaymentDetailsGooglePayV2; public class CreateGooglePayPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; String paymentData = "{\"signature\":\"MEUCIEMVk9qrfoJ/ku5qvHCZuv9zPC1QVH6NMMrkZ6wLmt8FAiEAjNduo5gvMGE4KgTeTIuwevdvxJdkQP03ru9lp/5rKhk\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEC1gn5CSvw/UxS9+PCVhgPWNTMGxTBUHpenGNWirrNlmi5bJts3FO92DjcUQmLaCmM1hQwtZ9KCzkc0SGh99X4A\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1694758343052\\\"}\",\"signatures\":[\"MEUCIG+oaBGEl63CqCy+C7OwQCFvr/K9cSYWtQ/ku2UejCTKAiEAnhJ1LXd+JMMvueEorp0Kha922H9wRMR6tPvnGIZ6cM4\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"HmCQdP5BOdsv33ACkGyYJYKFHEnxRbe+TTaTI79tJm/v8NP4XH5Iim9H/a1jj2OmZTgQDklZ6pv1v6XNjKkkaEMPW1MZbtZ2P8GcwAWRKKJx8W4ZmDexb564GP8EvLw4dGzlYE8L5nY7khunPZKAfioQGmNSTIBpB1MLRtgArGA9T/w3EcjU1+gdGAce7NpcZeVIrIX4tNLL5TlpGdAHRU5XNlA/q0HcuvKpmgCfpnSJKu1xPO8Xzoa7C7toX6GmmGlkdhH0Y+vK+mKFpI02uGItSPR64vaZYFD7qPMzXOsp7KjyGw1Tr6fx0Qrmc3CeDcZ3Dzc/WVbM0jw1gMz/gjnZ7KILoqMNxcEz1h8rkLp7FHjCNlls0i6VYNINWWl1PMqHTDBsTsHVdYJlAqycoBJTssHy44ASBIF8epBw3oAydhFV4ZkeLPX/x+QlrS+IEi3af8xj//nhtZ5CwwW5IOuMF0sqAa0PcRVpgw9BrQSXNprymtatS3qtwRrL0LHJsIii+xSI5XY4dfy6Z6j1QCvWriCwfbS9TasvbMb6dbh0S6sS5XBHd5wp/FtHfYBAh9iK08DQ8uKcKfnZx4zmvU5TsSTTbrj/SEFJiJ3rBegIweEpYM3m1QifErNAVhBIpm67tg\\\\u003d\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BCr5xXtNJMkCYutxBQi8sQBHllG4RcSrxalvi0bf23Jwvyr46OwNGfMe45518pxNzPC8yPUXrGTbKXoQeJR16Ew\\\\u003d\\\",\\\"tag\\\":\\\"5W+s9OGQTFEojaZ5K3ynKuUVninxOVep9pkmqI/+ed4\\\\u003d\\\"}\"}"; PayInPaymentDetailsGooglePayV2 paymentDetails = new PayInPaymentDetailsGooglePayV2(); paymentDetails.setIpAddress("127.0.0.1"); paymentDetails.setBrowserInfo(new BrowserInfo()); paymentDetails.getBrowserInfo().setAcceptHeader("text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8"); paymentDetails.getBrowserInfo().setJavaEnabled(true); paymentDetails.getBrowserInfo().setLanguage("EN"); paymentDetails.getBrowserInfo().setColorDepth(4); paymentDetails.getBrowserInfo().setScreenHeight(1800); paymentDetails.getBrowserInfo().setScreenWidth(400); paymentDetails.getBrowserInfo().setTimeZoneOffset("60"); paymentDetails.getBrowserInfo().setUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"); paymentDetails.getBrowserInfo().setJavascriptEnabled(true); paymentDetails.setPaymentData(paymentData); PayInExecutionDetailsDirect executionDetails = new PayInExecutionDetailsDirect(); executionDetails.setSecureModeReturnUrl("https://mangopay.com/docs/please-ignore"); PayIn googlePayIn = new PayIn(); googlePayIn.setAuthorId(userId); googlePayIn.setCreditedWalletId(walletId); googlePayIn.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); googlePayIn.setFees(new Money(CurrencyIso.EUR, 0)); googlePayIn.setPaymentType(PayInPaymentType.GOOGLEPAY); googlePayIn.setExecutionType(PayInExecutionType.DIRECT); googlePayIn.setPaymentDetails(paymentDetails); googlePayIn.setExecutionDetails(executionDetails); googlePayIn.setTag("Created using the Mangopay Java SDK"); PayIn createGooglePayPayIn = mangopay.getPayInApi().create(googlePayIn); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createGooglePayPayIn); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, GooglepayPayIn from mangopay.utils import BrowserInfo, Money natural_user = NaturalUser.get('210513027') google_pay_payin = GooglepayPayIn( author_id = natural_user.id, credited_wallet_id = '210514820', debited_funds = Money(amount=200, currency='EUR'), fees = Money(amount=50, currency='EUR'), ip_addres = '159.180.248.187', secure_mode_return_url = 'https://mangopay.com/docs/please-ignore', browser_info = BrowserInfo( user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', screen_width = 375, screen_height = 667, color_depth = 32, language = 'EN', accept_header = 'application/json,text/javascript,*/*;q=0.01<', timezone_offset = '-120', java_enabled = True, javascript_enabled = True ), payment_data = '{\"signature\":\"your-payment-data"}\"}', tag = 'Created using Mangopay Python SDK' ) create_google_pay_payin = google_pay_payin.save() pprint(create_google_pay_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var returnUrl = "https://www.mangopay.com/docs/please-ignore/"; var secureModeReturnUrl = "https://www.mangopay.com/docs/please-ignore/"; var paymentData = "{\"signature\":\"MEUCIQDc49/Bw1lTk8ok2fUe4UT2q955C01N2av40WJ28pMt0QIgBxiXHZbccHuqEQHyNJJw8SM337fxd8A3kJFqhsf4pHo\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8bX5bzBELcoJ1pPhEHtTIhpZQsRgVIMtRf9R5yRyC9c9WH8bvgxIx40qH4aQ+btVM/rwKuDE8cs+dERH2gjUjw\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1688804022772\\\"}\",\"signatures\":[\"MEUCIF2OifAlN5PG+isU+xxX8/OU5MTk81hBulSmp9bu8caDAiEAkdRqb8uo4CUx4kMiA317A1b+5BxRUc/8+QMyc9Ikjfg\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"tsTuUpytOkm8ENo1PpyzsHk6jxGDus/sSNQwqZeoPNw/NMQX2LJxJ6OTS4Yt+iNM7v4iuFC0eUWiy58xCQHKANeO/y66GJWMaDjPW2FBqBksb1WHXxP5KmgglACSqXtOMmjuYxVT6MeO4EfdsT4vGHRP0adP+Lkfj1tfjM1K0HyRWbLcwU9YXU0j83wV3PW28oxdFY5F4DC+Bhk7J5bZhIf5jymRXy3sR0kDoE/Qi4fUIdvgoHzi6MvppxCaEgwCygvfxu+vddP/7dshnL9+OFaDpoAp6is8I4UYbscNHkLosfBPwyUtndLMkDfNKUJ3yus92KSfbcK0iif3kXSMmV6ZrN873S7f27bsCsHhAlywOFpACorBNO8FzX/ediCsSi+n5kWOxe9oewGOeME2RNTsoy8an23be8yTek3YKajIhJRFW/9OtVnNmKOqwgw0F8nPFTjuSVPZbkinYS46Tr+KjOcr5aznEElkmk6OWgX1xSVkHZPpoW8XZdhB6Vs/5eWP6URncDZYN2EWtpWuz1+CAVKEjD95gcQGvzhmlPB0duiV76psDik8ojf2B6QfPJxV\\\",\\\"ephemeralPublicKey\\\":\\\"BJ0QIVwltj1vH2NAmYgUYBRrNymcOtTTP3QJnSc+enFGigIhNS87PZyA0PZ4iT/tifOqBj6barpJMwSQeO3nbJ0\\\\u003d\\\",\\\"tag\\\":\\\"R0iTOk4bogyVkf0STTvdiFq4kebJS7GN5/zxoBuCNNs\\\\u003d\\\"}\"}"; var ipAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C"; var browserInfo = new BrowserInfo { AcceptHeader = "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", JavaEnabled = true, Language = "FR-FR", ColorDepth = 4, ScreenHeight = 1800, ScreenWidth = 400, JavascriptEnabled = true, TimeZoneOffset = "+60", UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" }; var billing = new Billing { FirstName = "Joe", LastName = "Blogs", Address = new Address { AddressLine1 = "1 MangoPay Street", AddressLine2 = "The Loop", City = "Paris", Region = "Ile de France", PostalCode = "75001", Country = CountryIso.FR } }; var shipping = new Shipping { FirstName = "Joe", LastName = "Blogs", Address = new Address { AddressLine1 = "1 MangoPay Street", AddressLine2 = "The Loop", City = "Paris", Region = "Ile de France", PostalCode = "75001", Country = CountryIso.FR } }; var payIn = new PayInGooglePayDirectPostDTO(userId, new Money { Amount = 2000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, returnUrl, secureModeReturnUrl, ipAddress, browserInfo, paymentData, SecureMode.DEFAULT, billing, shipping, "MGP") { Tag = "Created using the Mangopay .NET SDK" }; var createGooglePayPayIn = await api.PayIns.CreateGooglePayDirectV2Async(payIn); string prettyPrint = JsonConvert.SerializeObject(createGooglePayPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Google Pay PayIn object ### Description The Google Pay PayIn object allows platforms to process payments with Google Pay.  **Caution – Prerequisites to using Google Pay** Using Google Pay activation from Mangopay. See How to process an Google Pay payment for more details and contact our teams via the Dashboard. The platform also needs to integrate with Google Pay. For more information, see the Google Pay documentation. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `GOOGLE_PAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Default value:** DEFAULT The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. Whether or not the `SecureMode` was used. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. The data returned by Google Pay containing information about the payment. **Default value:** FirstName, LastName, and Address information of the Shipping object if supplied. Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. **Default values:** FirstName, LastName, and Address information of the Billing object (if supplied). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about Google Pay # View a PayIn (Google Pay) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `GOOGLE_PAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Whether or not the `SecureMode` was used. **Default value:** FirstName, LastName, and Address information of the Shipping object if supplied. Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 - Succeeded { "Id": "wt_794a782f-f6b1-4ba5-8adb-b8004323b31e", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1706097653, "AuthorId": "213407540", "DebitedFunds": { "Currency": "EUR", "Amount": 100 }, "CreditedFunds": { "Currency": "EUR", "Amount": 100 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1706097666, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "213407543", "CreditedUserId": "213407540", "PaymentType": "GOOGLE_PAY", "ExecutionType": "DIRECT", "StatementDescriptor": "Mangopay", "SecureMode": "DEFAULT", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore", "SecureModeRedirectURL": "https://api.sandbox.whenthen.co/payment-gateway/monext/3ds/challenge/3a01e913-64d2-4724-a6f9-64ddc3a08d8a/794a782f-f6b1-4ba5-8adb-b8004323b31e", "SecureModeNeeded": true, "SecurityInfo": null, "BrowserInfo": { "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<", "JavaEnabled": true, "Language": "fr", "ColorDepth": 32, "ScreenHeight": 667, "ScreenWidth": 375, "TimeZoneOffset": -120, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "7579:9817:dac3:76c8:23d4:2fcd:94a3:b5be", "CardInfo": { "BIN": "411111", "IssuingBank": "JPMORGAN CHASE BANK, N.A.", "IssuerCountryCode": "US", "Type": "CREDIT", "SubType": null, "Brand": "VISA" } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetAsync("payin_m_01J334XF2V6751GRG9M2M558HG"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create an iDEAL PayIn POST /v2.01/{ClientId}/payins/payment-methods/ideal **Note – Timeout after 30 minutes** The iDEAL payment session lasts for 30 minutes, at which point the pay-in fails automatically if no action has been taken by the user. ### Body parameters The unique identifier of the user at the source of the transaction. The unique identifier of the credited wallet. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* The URL to which the user is automatically returned after completing the payment. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Allowed values:** The BIC of a bank supported by iDEAL The bank identifier code (BIC) of the user’s bank. If provided, the user is redirected to the bank’s interface to log in and authenticate the payment. If not provided, the user is redirected to an intermediary page where they must choose their bank. **Note:** Parameter not returned – the `BankName` is returned instead. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `IDEAL` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** The bank name corresponding to the `Bic` sent, or `null` if no `Bic` sent. The user’s bank, as defined by the `Bic` parameter sent in the call. ```json 200 - Created { "Id": "wt_00e4bd1b-08f8-40cf-8104-2d91fe270b34", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1701250187, "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204068186", "CreditedUserId": "204068024", "PaymentType": "IDEAL", "ExecutionType": "WEB", "ReturnURL": "https://mangopay.com/docs/please-ignore?transactionId=wt_00e4bd1b-08f8-40cf-8104-2d91fe270b34", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=140149255664&rs=QcZIrtphnfHddyqe3HSu0njaOtjRG4f3&cs=2f1247aa2007ed84a2cb7ab5c941e7ead2f6525996518040b0bad0e3c28bb7db", "StatementDescriptor": "MGP", "BankName": "ING Bank" } ``` ```json REST { "AuthorId": "204068024", "CreditedWalletId": "204068186", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "ReturnURL": "https://mangopay.com/", "Tag": "Created using the Mangopay API Postman collection", "StatementDescriptor": "Mangopay", "Bic": "INGBNL2A" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInExecutionDetailsWeb; import com.mangopay.entities.subentities.PayInPaymentDetailsIdeal; public class CreateIDEALPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; PayIn idealPayin = new PayIn(); idealPayin.setAuthorId(userId); idealPayin.setCreditedWalletId(walletId); idealPayin.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); idealPayin.setFees(new Money(CurrencyIso.EUR, 0)); idealPayin.setTag("Created using the Mangopay Java SDK"); PayInExecutionDetailsWeb executionDetails = new PayInExecutionDetailsWeb(); executionDetails.setReturnUrl("https://www.mangopay.com/docs/please-ignore"); idealPayin.setExecutionDetails(executionDetails); PayInPaymentDetailsIdeal paymentDetails = new PayInPaymentDetailsIdeal(); paymentDetails.setStatementDescriptor("Jul2024"); idealPayin.setPaymentDetails(paymentDetails); idealPayin.setPaymentType(PayInPaymentType.IDEAL); idealPayin.setExecutionType(PayInExecutionType.WEB); PayIn createIdealPayin = mangopay.getPayInApi().create(idealPayin); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createIdealPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, IdealPayIn from mangopay.utils import Money natural_user = NaturalUser.get('210513027') ideal_payin = IdealPayIn( author_id = natural_user.id, credited_wallet_id = '210514820', debited_funds = Money(amount=1000, currency='EUR'), fees = Money(amount=0, currency='EUR'), return_url = 'https://www.mangopay.com/docs/please-ignore', bic = 'INGBNL2A', tag = 'Created using Mangopay Python SDK' ) create_ideal_payin = ideal_payin.save() pprint(create_ideal_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var returnUrl = "https://www.mangopay.com/docs/please-ignore/"; var bic = "RBRBNL21"; var payIn = new PayInIdealWebPostDTO(userId, new Money { Amount = 2000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, returnUrl, bic, "Created using the Mangopay .NET SDK", "MGP"); var createIdealPayIn = await api.PayIns.CreateIdealWebAsync(payIn); string prettyPrint = JsonConvert.SerializeObject(createIdealPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # [Deprecated] Create a Web Card PayIn (iDEAL) POST /v2.01/{ClientId}/payins/card/web **Warning – Deprecated legacy integration** This endpoint is the legacy integration of iDEAL with Mangopay as a Web Card PayIn with the `CardType` `IDEAL`. If you are integrating iDEAL for the first time, use the Create an iDEAL PayIn endpoint. The legacy integration continues to be supported for platforms who had already integrated iDEAL, with no changes required on their side. The `Bic` parameter, enabling bank selection, can be added to legacy integrations. For more information, see the iDEAL article. ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The unique identifier of the credited wallet. **Allowed values:** `IDEAL` The type of card. **Allowed values:** One of the supported languages in the ISO 639-1 format: CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, NL, NO, PL, PT, SK, SV. The language in which the payment page is to be displayed. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. **Allowed values:** The BIC of a bank supported by iDEAL The bank identifier code (BIC) of the user’s bank. If provided, the user is redirected to the bank’s interface to log in and authenticate the payment. If not provided, the user is redirected to an intermediary page where they must choose their bank. **Note:** Parameter not returned – the `BankName` is returned instead. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL used for the payment page template. **Returned values:** `IDEAL` The type of card. **Returned values:** One of the supported languages in the ISO 639-1 format: CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, NL, NO, PL, PT, SK, SV. The language in which the payment page is to be displayed. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** The bank name corresponding to the `Bic` sent, or `null` if no `Bic` sent. The user’s bank, as defined by the `Bic` parameter sent in the call. ```json 200 - Created { "Id": "wt_144da3b7-b6b0-4438-9a7c-75a9695a1816", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1701296081, "AuthorId": "204068024", "CreditedUserId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 12000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 11000 }, "Fees": { "Currency": "EUR", "Amount": 1000 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204068186", "DebitedWalletId": null, "PaymentType": "CARD", "ExecutionType": "WEB", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=140149714181&rs=PyFMwmikCotrnVEf50EQx9jR9Ib38oMG&cs=3d5141c0cf871b4c8a6a53e635a39ebaabbf1e76093fa19bcba331728381b005", "ReturnURL": "https://mangopay.com/docs/please-ignore?transactionId=wt_144da3b7-b6b0-4438-9a7c-75a9695a1816", "TemplateURL": null, "CardType": "IDEAL", "Culture": "EN", "SecureMode": "DEFAULT", "Billing": null, "Shipping": null, "StatementDescriptor": null, "BankName": "Yoursafe" } ``` ```json REST { "Tag": "Created using Mangopay API Postman Collection", "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 12000 }, "Fees": { "Currency": "EUR", "Amount": 1000 }, "CreditedWalletId": "204068186", "ReturnURL": "https://mangopay.com/docs/please-ignore", "CardType": "IDEAL", "Culture": "EN", "Bic": "BITSNL2A" } ``` # The iDEAL PayIn object ### Description The iDEAL PayIn object allows platforms to process payments made with the iDEAL payment method. **Note – Activation required** To activate iDEAL for your platform (including Sandbox), contact Mangopay via the Dashboard. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `IDEAL` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Allowed values:** The BIC of a bank supported by iDEAL The bank identifier code (BIC) of the user’s bank. If provided, the user is redirected to the bank’s interface to log in and authenticate the payment. If not provided, the user is redirected to an intermediary page where they must choose their bank. **Note:** Parameter not returned – the `BankName` is returned instead. **Returned values:** The bank name corresponding to the `Bic` sent, or `null` if no `Bic` sent. The user’s bank, as defined by the `Bic` parameter sent in the call. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about iDEAL # View a PayIn (iDEAL) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `IDEAL` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** The bank name corresponding to the `Bic` sent, or `null` if no `Bic` sent. The user’s bank, as defined by the `Bic` parameter sent in the call. ```json 200 - Succeeded { "Id": "wt_00e4bd1b-08f8-40cf-8104-2d91fe270b34", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1701250187, "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1701250201, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204068186", "CreditedUserId": "204068024", "PaymentType": "IDEAL", "ExecutionType": "WEB", "ReturnURL": "https://mangopay.com/docs/please-ignore?transactionId=wt_00e4bd1b-08f8-40cf-8104-2d91fe270b34", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=140149255664&rs=QcZIrtphnfHddyqe3HSu0njaOtjRG4f3&cs=2f1247aa2007ed84a2cb7ab5c941e7ead2f6525996518040b0bad0e3c28bb7db", "StatementDescriptor": "Mangopay", "BankName": "ING Bank" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetIdealAsync("wt_9ead9366-53ab-4982-93a3-c3a647625f55"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Klarna PayIn POST /v2.01/{ClientId}/payins/payment-methods/klarna **Note – Timeout after 48 hours** The Klarna payment session lasts 48 hours, at which point the pay-in fails automatically if no action has been taken by the user. **Note – Minimum amount in Production** In Production, the minimum accepted `DebitedFunds` amount for Klarna is `1` (regardless of currency). ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. Information about the debited funds. The amount must be equal to the total of all `UnitAmount` and `TaxAmount` of all `LineItems`. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the end user billing address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. The country of the address, which (if sent) must be the same as the `Country` parameter. Information about the end user’s shipping address.\ The shipping address `AddressLine1` must be formatted: * FR, UK, US: \[Number]\[StreetName], for example: 33 Cavendish Square * Rest of EU: \[StreetName]\[Number], for example: De Ruijterkade 7\ Caution: Failure to follow this formatting may result in an error.\ If no shipping address is sent, Klarna considers it to be the same as the billing address. The first name of the user. *Max. length: 100 characters* The last name of the user. Required if the parent parameter is sent. Information about the shipping address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. *object* Information about the items purchased in the transaction. The total of all line items’ `UnitAmount` and `TaxAmount` must equal the `DebitedFunds` amount.  The name of the item. The quantity of the item. The cost of the item, excluding tax. The tax amount applied to the item. *Format: ISO 3166-1 alpha-2 two-letter country code* The country of residence of the user. *Format: ISO 639-1 alpha-2 two-letter language code* The language in which the Klarna payment page is to be displayed. The `Culture` must match the `Country` to show the checkout page in the desired language. If not, or if `Culture` is not sent, EN is the language by default. *Format: A valid email address* The user’s email address. *Format: \[+CC]\[XXXXXXXXX] where +CC is the international dialing code and Xs are the local number, for example: \[+33]\[689854321]* The user's mobile phone number. If the phone matches the user’s Klarna account, their checkout experience involves one less step. *Format: Serialized JSON object* The extra merchant data required by Klarna for the transaction, as described in the Klarna guide. The platform’s order reference for the transaction. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. The amount must be equal to the total of all `UnitAmount` and `TaxAmount` of all `LineItems`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `KLARNA` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the end user billing address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the end user’s shipping address. The shipping address `AddressLine1` must be formatted: * FR, UK, US: \[Number]\[StreetName], for example: 33 Cavendish Square * Rest of EU: \[StreetName]\[Number], for example: De Ruijterkade 7 **Caution:** Failure to follow this formatting may result in an error. If no shipping address is sent, Klarna considers it to be the same as the billing address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *object* Information about the items purchased in the transaction. The total of all line items’ `UnitAmount` and `TaxAmount` must equal the `DebitedFunds` amount.  The name of the item. The quantity of the item. The cost of the item, excluding tax. The tax amount applied to the item. *Format: ISO 3166-1 alpha-2 two-letter country code* The country of residence of the user. *Format: ISO 639-1 alpha-2 two-letter language code* The language in which the Klarna payment page is to be displayed.\ The `Culture` must match the `Country` to show the checkout page in the desired language. If not, or if `Culture` is not sent, EN is the language by default. *Format: A valid email address* The user’s email address. *Format: \[+CC]\[XXXXXXXXX] where +CC is the international dialing code and Xs are the local number, for example: \[+33]\[689854321]* The user's mobile phone number. If the phone matches the user’s Klarna account, their checkout experience involves one less step. *Format: Serialized JSON object* The extra merchant data required by Klarna for the transaction, as described in the Klarna guide. The platform’s order reference for the transaction. ```json { "message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "id": "5c1bd99e-3af9-4ac2-997a-daec27b8a255", "date": 1710162995, "type": "param_error", "errors": { "billing.Country": "The field should equal Country" } } ``` ```json { "message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "id": "34554ec3-e46e-49f2-b29c-12db3e7e1c90", "date": 1706798154, "type": "param_error", "errors": { "additionalData": "The value is not a valid JSON format" } } ``` ```json 200 - Created { "Id": "wt_5a175522-04c3-4115-88ef-3b1b3446c4c6", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1706797249, "AuthorId": "213407540", "DebitedFunds": { "Currency": "EUR", "Amount": 1500 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1200 }, "Fees": { "Currency": "EUR", "Amount": 300 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "213407543", "CreditedUserId": "213407540", "PaymentType": "KLARNA", "ExecutionType": "WEB", "ReturnURL": "http://www.mangopay.com/docs/please-ignore?transactionId=wt_5a175522-04c3-4115-88ef-3b1b3446c4c6", "RedirectURL": "https://pay.playground.klarna.com/eu/hpp/payments/2fuacUE", "StatementDescriptor": "Mangopay", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "île-de-france", "PostalCode": "75003", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "Rue de la Fourche 26", "AddressLine2": "Appartement 3", "City": "Bruxelles", "Region": "Bruxelles-Capitale", "PostalCode": "75003", "Country": "BE" } }, "LineItems": [ { "Name": "Running shoes", "Quantity": 2, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 1" }, { "Name": "Walking shoes", "Quantity": 1, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 2" } ], "Country": "FR", "Culture": "FR", "Email": "alex.smith@example.com", "Phone": "[+33][689854321]", "AdditionalData": "{\"customer_account_info\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"app_id\": \"81363501-3540-494a-8627-33bc6112035d\",\"loyalty_level\": \"high\",\"customer_email\": \"customer@email.com\",\"customer_phone\": \"0611223344\",\"customer_ranking\": 2,\"customer_reviews\": 5,\"last_login_time\": \"2023-10-21T19:11:34Z\",\"account_security\": {\"last_verification_method\": \"2FA TOTP\",\"last_verification_time\": \"2023-10-21T19:11:34Z\",\"device_id\": \"772af5a5-2d55-4a5e-bb79-85969f683810\",\"fraud_behavior\": false,\"devices_linked\": 2,\"phone_verified\": true,\"email_verified\": true,\"failed_transactions_attempts\": 0},\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": \"2022-12-22T18:45:44Z\"}],\"marketplace_seller_info\": [{\"sub_merchant_id\": \"615a0e87-4941-45dc-978d-e6efcbd90ba0\",\"sub_merchant_name\": \"Marketbrick Ltd.\",\"sub_merchant_postal_code\": \"75010\",\"product_category\": \"Computers\",\"product_name\": \"Asus Zenbook 14\",\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2020-06-10T12:02:21Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2020-06-10T12:02:21Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"digital_download\": false,\"seller_rating\": 4.5,\"number_of_trades\": 34,\"volume_of_trades\": 4500}],\"payment_history_full\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 10,\"payment_option\": \"card\",\"total_amount_paid_purchases\": 1000.10,\"date_of_first_paid_purchase\": \"2020-06-10T12:12:34Z\",\"date_of_last_paid_purchase\": \"2023-10-26T18:52:38Z\"},{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 14,\"payment_option\": \"non klarna credit\",\"total_amount_paid_purchases\": 2322.10,\"date_of_first_paid_purchase\": \"2021-10-11T20:31:15Z\",\"date_of_last_paid_purchase\": \"2023-09-22T14:59:22Z\"}],\"marketplace_winner_info\": [{\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2022-12-22T18:45:44Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2023-08-14T08:23:34Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"number_of_trades\": 24,\"volume_of_trades\": 3322}],\"other_delivery_address\": [{\"shipping_method\": \"pick-up point\",\"shipping_type\": \"express\",\"first_name\": \"Test\",\"last_name\": \"Person\",\"street_address\": \"Rue La Fayette\",\"street_number\": \"33\",\"postal_code\": \"75009\",\"city\": \"Paris\",\"country\": \"FR\"}]}", "Reference": "1234" } ``` ```json REST { "Tag": "Created using the Mangopay API Postman collection", "AuthorId": "213407540", "DebitedFunds": { "Currency": "EUR", "Amount": 1500 }, "Fees": { "Currency": "EUR", "Amount": 300 }, "CreditedWalletId": "213407543", "ReturnURL": "http://www.mangopay.com/docs/please-ignore", "StatementDescriptor": "Mangopay", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "île-de-france", "PostalCode": "75003", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "Rue de la Fourche 26", "AddressLine2": "Appartement 3", "City": "Bruxelles", "Region": "Bruxelles-Capitale", "PostalCode": "75003", "Country": "BE" } }, "LineItems": [ { "Name": "Running shoes", "Quantity": 2, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 1" }, { "Name": "Walking shoes", "Quantity": 1, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 2" } ], "Country": "FR", "Culture": "FR", "Email": "alex.smith@example.com", "Phone": "[+33][689854321]", "AdditionalData": "{\"customer_account_info\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"app_id\": \"81363501-3540-494a-8627-33bc6112035d\",\"loyalty_level\": \"high\",\"customer_email\": \"customer@email.com\",\"customer_phone\": \"0611223344\",\"customer_ranking\": 2,\"customer_reviews\": 5,\"last_login_time\": \"2023-10-21T19:11:34Z\",\"account_security\": {\"last_verification_method\": \"2FA TOTP\",\"last_verification_time\": \"2023-10-21T19:11:34Z\",\"device_id\": \"772af5a5-2d55-4a5e-bb79-85969f683810\",\"fraud_behavior\": false,\"devices_linked\": 2,\"phone_verified\": true,\"email_verified\": true,\"failed_transactions_attempts\": 0},\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": \"2022-12-22T18:45:44Z\"}],\"marketplace_seller_info\": [{\"sub_merchant_id\": \"615a0e87-4941-45dc-978d-e6efcbd90ba0\",\"sub_merchant_name\": \"Marketbrick Ltd.\",\"sub_merchant_postal_code\": \"75010\",\"product_category\": \"Computers\",\"product_name\": \"Asus Zenbook 14\",\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2020-06-10T12:02:21Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2020-06-10T12:02:21Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"digital_download\": false,\"seller_rating\": 4.5,\"number_of_trades\": 34,\"volume_of_trades\": 4500}],\"payment_history_full\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 10,\"payment_option\": \"card\",\"total_amount_paid_purchases\": 1000.10,\"date_of_first_paid_purchase\": \"2020-06-10T12:12:34Z\",\"date_of_last_paid_purchase\": \"2023-10-26T18:52:38Z\"},{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 14,\"payment_option\": \"non klarna credit\",\"total_amount_paid_purchases\": 2322.10,\"date_of_first_paid_purchase\": \"2021-10-11T20:31:15Z\",\"date_of_last_paid_purchase\": \"2023-09-22T14:59:22Z\"}],\"marketplace_winner_info\": [{\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2022-12-22T18:45:44Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2023-08-14T08:23:34Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"number_of_trades\": 24,\"volume_of_trades\": 3322}],\"other_delivery_address\": [{\"shipping_method\": \"pick-up point\",\"shipping_type\": \"express\",\"first_name\": \"Test\",\"last_name\": \"Person\",\"street_address\": \"Rue La Fayette\",\"street_number\": \"33\",\"postal_code\": \"75009\",\"city\": \"Paris\",\"country\": \"FR\"}]}", "Reference": "1234" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $user = $api->Users->Get('210513027'); $payIn = new \MangoPay\PayIn(); $payIn->Tag = "Created using Mangopay PHP SDK"; $payIn->CreditedWalletId = "210514820"; $payIn->PaymentType = "KLARNA"; $payIn->AuthorId = $user->Id; $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Currency = 'EUR'; $payIn->DebitedFunds->Amount = 1500; $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Currency = 'EUR'; $payIn->Fees->Amount = 300; $payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsWeb(); $payIn->ExecutionDetails->ReturnURL = "https://mangopay.com/docs/please-ignore"; $payIn->ExecutionDetails->Culture = 'FR'; $payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsKlarna(); $payIn->PaymentDetails->Email = $user->Email; $payIn->PaymentDetails->Phone = '[+33][689854321]'; $payIn->PaymentDetails->Country = $user->Address->Country; $payIn->PaymentDetails->AdditionalData = "your-additional-data" $payIn->PaymentDetails->Reference = '8569'; $payIn->ExecutionDetails->Billing = new \MangoPay\Billing(); $payIn->ExecutionDetails->Billing->FirstName = $user->FirstName; $payIn->ExecutionDetails->Billing->LastName = $user->LastName; $payIn->ExecutionDetails->Billing->Address = new \MangoPay\Address(); $payIn->ExecutionDetails->Billing->Address->AddressLine1 =$user->Address->AddressLine1; $payIn->ExecutionDetails->Billing->Address->AddressLine2 =$user->Address->AddressLine2; $payIn->ExecutionDetails->Billing->Address->Region = $user->Address->Region; $payIn->ExecutionDetails->Billing->Address->City = $user->Address->City; $payIn->ExecutionDetails->Billing->Address->PostalCode = $user->Address->PostalCode; $payIn->ExecutionDetails->Billing->Address->Country = $user->Address->Country; $payIn->PaymentDetails->Shipping = new \MangoPay\Shipping(); $payIn->PaymentDetails->Shipping->FirstName = $user->FirstName; $payIn->PaymentDetails->Shipping->LastName = $user->LastName; $payIn->PaymentDetails->Shipping->Address = new \MangoPay\Address(); $payIn->PaymentDetails->Shipping->Address->AddressLine1 =$user->Address->AddressLine1; $payIn->PaymentDetails->Shipping->Address->AddressLine2 =$user->Address->AddressLine2; $payIn->PaymentDetails->Shipping->Address->Region = $user->Address->Region; $payIn->PaymentDetails->Shipping->Address->City = $user->Address->City; $payIn->PaymentDetails->Shipping->Address->PostalCode = $user->Address->PostalCode; $payIn->PaymentDetails->Shipping->Address->Country = $user->Address->Country; $lineItem1 = new \MangoPay\LineItem(); $lineItem1->Name = 'Running shoes'; $lineItem1->Quantity = 1; $lineItem1->UnitAmount = 400; $lineItem1->TaxAmount = 100; $lineItem1->Description = 'ID of Seller 1'; $lineItem2 = new \MangoPay\LineItem(); $lineItem2->Name = 'Walking shoes'; $lineItem2->Quantity = 2; $lineItem2->UnitAmount = 400; $lineItem2->TaxAmount = 100; $lineItem2->Description = 'ID of Seller 2'; $payIn->PaymentDetails->LineItems = array($lineItem1, $lineItem2); $response = $api->PayIns->Create($payIn); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key", }) let myPayIn = { PaymentType: 'KLARNA', ExecutionType: 'WEB', AuthorId: '210513027', Tag: 'Created with Mangopay Node.js SDK', CreditedUserId: '210513027', DebitedFunds: { Currency: 'EUR', Amount: 400 }, Fees: { Currency: 'EUR', Amount: 10 }, LineItems: [ { Name: "Running shoes", Quantity: 1, UnitAmount: 200, TaxAmount: 0, Description: "seller1 ID" }, { Name: "Running shoes", Quantity: 1, UnitAmount: 200, TaxAmount: 0, Description: "seller2 ID" } ], Country: 'FR', Phone: '33#607080900', Email: 'mango@mangopay.com', CreditedWalletId: '210514820', ReturnURL: 'https://mangopay.com/docs/please-ignore', Culture: 'FR', Billing: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, Shipping: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, AdditionalData: 'your-additional-data', StatementDescriptor: 'Feb2024', Reference: 'afd48-879d-48fg' } const createKlarnaPayIn = async (payin) => { return await mangopay.PayIns.create(payin) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createKlarnaPayIn(myPayIn) ``` ```ruby Ruby require 'mangopay' require 'PP' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end let myPayIn = { PaymentType: 'KLARNA', ExecutionType: 'WEB', AuthorId: '210513027', Tag: 'Created with Mangopay Node.js SDK', CreditedUserId: '210513027', DebitedFunds: { Currency: 'EUR', Amount: 400 }, Fees: { Currency: 'EUR', Amount: 10 }, LineItems: [ { Name: "running shoes", Quantity: 1, UnitAmount: 200, TaxAmount: 0, Description: "seller1 ID" }, { Name: "running shoes", Quantity: 1, UnitAmount: 200, TaxAmount: 0, Description: "seller2 ID" } ], Country: 'FR', Phone: '33#607080900', Email: 'mango@mangopay.com', CreditedWalletId: '210514820', ReturnURL: 'https://mangopay.com/docs/please-ignore', Culture: 'FR', Billing: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, Shipping: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, StatementDescriptor: 'Feb2024', Reference: 'afd48-879d-48fg', AdditionalData: "your-additional-data" } const createKlarnaPayIn = async (payin) => { return await mangopay.PayIns.create(payin) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } pp(createKlarnaPayIn(myPayIn)) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.core.Billing; import com.mangopay.core.LineItem; import com.mangopay.core.Money; import com.mangopay.entities.PayIn; import com.mangopay.entities.User; import com.mangopay.entities.subentities.PayInExecutionDetailsWeb; import com.mangopay.entities.subentities.PayInPaymentDetailsKlarna; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.core.enumerations.CountryIso; import com.mangopay.core.enumerations.CultureCode; import com.mangopay.core.enumerations.CurrencyIso; import java.util.Arrays; import java.util.List; public class CreateKlarnaPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = new PayIn(); User myUser = mangopay.getUserApi().get("user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"); var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; var additionalData = "{\"customer_account_info\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"app_id\": \"81363501-3540-494a-8627-33bc6112035d\",\"loyalty_level\": \"high\",\"customer_email\": \"customer@email.com\",\"customer_phone\": \"0611223344\",\"customer_ranking\": 2,\"customer_reviews\": 5,\"last_login_time\": \"2023-10-21T19:11:34Z\",\"account_security\": {\"last_verification_method\": \"2FA TOTP\",\"last_verification_time\": \"2023-10-21T19:11:34Z\",\"device_id\": \"772af5a5-2d55-4a5e-bb79-85969f683810\",\"fraud_behavior\": false,\"devices_linked\": 2,\"phone_verified\": true,\"email_verified\": true,\"failed_transactions_attempts\": 0},\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": \"2022-12-22T18:45:44Z\"}],\"marketplace_seller_info\": [{\"sub_merchant_id\": \"615a0e87-4941-45dc-978d-e6efcbd90ba0\",\"sub_merchant_name\": \"Marketbrick Ltd.\",\"sub_merchant_postal_code\": \"75010\",\"product_category\": \"Computers\",\"product_name\": \"Asus Zenbook 14\",\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2020-06-10T12:02:21Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2020-06-10T12:02:21Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"digital_download\": false,\"seller_rating\": 4.5,\"number_of_trades\": 34,\"volume_of_trades\": 4500}],\"payment_history_full\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 10,\"payment_option\": \"card\",\"total_amount_paid_purchases\": 1000.10,\"date_of_first_paid_purchase\": \"2020-06-10T12:12:34Z\",\"date_of_last_paid_purchase\": \"2023-10-26T18:52:38Z\"},{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 14,\"payment_option\": \"non klarna credit\",\"total_amount_paid_purchases\": 2322.10,\"date_of_first_paid_purchase\": \"2021-10-11T20:31:15Z\",\"date_of_last_paid_purchase\": \"2023-09-22T14:59:22Z\"}],\"marketplace_winner_info\": [{\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2022-12-22T18:45:44Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2023-08-14T08:23:34Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"number_of_trades\": 24,\"volume_of_trades\": 3322}],\"other_delivery_address\": [{\"shipping_method\": \"pick-up point\",\"shipping_type\": \"express\",\"first_name\": \"Test\",\"last_name\": \"Person\",\"street_address\": \"Rue La Fayette\",\"street_number\": \"33\",\"postal_code\": \"75009\",\"city\": \"Paris\",\"country\": \"FR\"}]}"; Address address = new Address(); address.setAddressLine1("2795 Edgewood Road"); address.setCity("Little Rock"); address.setRegion("Arkansas"); address.setPostalCode("72212"); address.setCountry(CountryIso.FR); LineItem lineItem1 = new LineItem(null, null, null, null, null); lineItem1.setName("Running shoes"); lineItem1.setQuantity(1); lineItem1.setUnitAmount(200); lineItem1.setTaxAmount(0); lineItem1.setDescription("Seller 1 ID"); LineItem lineItem2 = new LineItem(null, null, null, null, null); lineItem2.setName("Running shoes"); lineItem2.setQuantity(1); lineItem2.setUnitAmount(200); lineItem2.setTaxAmount(0); lineItem2.setDescription("Seller 2 ID"); List lineItems = Arrays.asList(lineItem1, lineItem2); PayInExecutionDetailsWeb payinExecutionDetails = new PayInExecutionDetailsWeb(); payinExecutionDetails.setReturnUrl("http://www.mangopay.com/docs/please-ignore"); PayInPaymentDetailsKlarna paymentDetails = new PayInPaymentDetailsKlarna(); paymentDetails.setAdditionalData(additionalData); paymentDetails.setBilling(new Billing()); paymentDetails.getBilling().setFirstName("Alex"); paymentDetails.getBilling().setLastName("Smith"); paymentDetails.getBilling().setAddress(address); paymentDetails.setCountry(CountryIso.FR); paymentDetails.setCulture(CultureCode.FR); paymentDetails.setReference("1234"); paymentDetails.setPhone("[+33][689854321]"); paymentDetails.setEmail(myUser.getEmail()); paymentDetails.setLineItems(lineItems); payin.setPaymentType(PayInPaymentType.KLARNA); payin.setExecutionType(PayInExecutionType.WEB); payin.setCreditedWalletId(walletId); payin.setExecutionDetails(payinExecutionDetails); payin.setPaymentDetails(paymentDetails); payin.setTag("Created with Mangopay Java SDK"); payin.setAuthorId(myUser.getId()); payin.setDebitedFunds(new Money(CurrencyIso.EUR, 400)); payin.setFees(new Money(CurrencyIso.EUR, 100)); PayIn createKlarnaPayin = mangopay.getPayInApi().create(payin); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createKlarnaPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, KlarnaPayIn from mangopay.utils import Money, Billing, Shipping, Address, LineItem natural_user = NaturalUser.get('210513027') klarna_payin = KlarnaPayIn( author = natural_user, credited_wallet_id = '210514820', debited_funds = Money(amount=1500, currency='EUR'), fees = Money(amount=300, currency='EUR'), return_url = 'http://www.mangopay.com/docs/please-ignore', statement_descriptor = 'Feb2024', billing = Billing( first_name = natural_user.first_name, last_name = natural_user.last_name, address = Address( address_line_1 = natural_user.address.address_line_1, address_line_2 = natural_user.address.address_line_2, city = natural_user.address.city, region = natural_user.address.region, postal_code = natural_user.address.postal_code, country = natural_user.address.country ) ), line_items = [ LineItem( name = 'Running shoes', quantity=1, unit_amount=400, tax_amount=100, description='ID of Seller 1'), LineItem( name = 'Walking shoes', quantity=2, unit_amount=400, tax_amount=100, description='ID of Seller 2') ], shipping = Shipping( first_name = natural_user.first_name, last_name = natural_user.last_name, address = Address( address_line_1 = natural_user.address.address_line_1, address_line_2 = natural_user.address.address_line_2, city = natural_user.address.city, region = natural_user.address.region, postal_code = natural_user.address.postal_code, country = natural_user.address.country, ) ), country = natural_user.address.country, email = natural_user.email, phone = '[+33][689854321]', reference = '2345', culture = 'FR', additional_data = 'your-additional-data', tag = 'Created using the Mangopay Python SDK' ) create_klarna_payin = klarna_payin.save() pprint(create_klarna_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var myUser = await api.Users.GetNaturalAsync("210513027"); List LineItems = new List(); var myPayIn = new PayInKlarnaWebPostDTO( authorId: myUser.Id, debitedFunds: new Money { Amount = 1500, Currency = CurrencyIso.EUR }, fees: new Money { Amount = 300, Currency = CurrencyIso.EUR }, creditedWalletId: "210514820", returnUrl: "http://www.mangopay.com/docs/please-ignore", lineItems: new List{ new LineItem { Name = "Running shoes", Quantity = 1, UnitAmount = 400, TaxAmount = 100, Description = "ID of Seller 1" }, new LineItem { Name = "Walking shoes", Quantity = 2, UnitAmount = 400, TaxAmount = 100, Description = "ID of Seller 2" } }, country: "FR", phone: "[+33][689854321]", email: myUser.Email, additionalData: "{\"customer_account_info\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"app_id\": \"81363501-3540-494a-8627-33bc6112035d\",\"loyalty_level\": \"high\",\"customer_email\": \"customer@email.com\",\"customer_phone\": \"0611223344\",\"customer_ranking\": 2,\"customer_reviews\": 5,\"last_login_time\": \"2023-10-21T19:11:34Z\",\"account_security\": {\"last_verification_method\": \"2FA TOTP\",\"last_verification_time\": \"2023-10-21T19:11:34Z\",\"device_id\": \"772af5a5-2d55-4a5e-bb79-85969f683810\",\"fraud_behavior\": false,\"devices_linked\": 2,\"phone_verified\": true,\"email_verified\": true,\"failed_transactions_attempts\": 0},\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": \"2022-12-22T18:45:44Z\"}],\"marketplace_seller_info\": [{\"sub_merchant_id\": \"615a0e87-4941-45dc-978d-e6efcbd90ba0\",\"sub_merchant_name\": \"Marketbrick Ltd.\",\"sub_merchant_postal_code\": \"75010\",\"product_category\": \"Computers\",\"product_name\": \"Asus Zenbook 14\",\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2020-06-10T12:02:21Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2020-06-10T12:02:21Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"digital_download\": false,\"seller_rating\": 4.5,\"number_of_trades\": 34,\"volume_of_trades\": 4500}],\"payment_history_full\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 10,\"payment_option\": \"card\",\"total_amount_paid_purchases\": 1000.10,\"date_of_first_paid_purchase\": \"2020-06-10T12:12:34Z\",\"date_of_last_paid_purchase\": \"2023-10-26T18:52:38Z\"},{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 14,\"payment_option\": \"non klarna credit\",\"total_amount_paid_purchases\": 2322.10,\"date_of_first_paid_purchase\": \"2021-10-11T20:31:15Z\",\"date_of_last_paid_purchase\": \"2023-09-22T14:59:22Z\"}],\"marketplace_winner_info\": [{\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2022-12-22T18:45:44Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2023-08-14T08:23:34Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"number_of_trades\": 24,\"volume_of_trades\": 3322}],\"other_delivery_address\": [{\"shipping_method\": \"pick-up point\",\"shipping_type\": \"express\",\"first_name\": \"Test\",\"last_name\": \"Person\",\"street_address\": \"Rue La Fayette\",\"street_number\": \"33\",\"postal_code\": \"75009\",\"city\": \"Paris\",\"country\": \"FR\"}]}", billing: new Billing{ FirstName = myUser.FirstName, LastName = myUser.LastName, Address = new Address { AddressLine1 = myUser.Address.AddressLine1, AddressLine2 = myUser.Address.AddressLine2, City = myUser.Address.City, Region = myUser.Address.Region, PostalCode = myUser.Address.PostalCode, Country = myUser.Address.Country }, }, reference: "2345", culture: "FR", tag: "Created using the Mangopay .NET SDK" ); var createKlarnaPayIn = await api.PayIns.CreateKlarnaWebAsync(myPayIn); string prettyPrint = JsonConvert.SerializeObject(createKlarnaPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Klarna PayIn object ### Description The Klarna PayIn object allows platforms to process payments made via Klarna. **Note – Prerequisites to using Klarna** In Production and Sandbox: * Your platform must be approved and activated by Klarna. See activation for details. In Sandbox: * You need to use Klarna's sample customer data. See testing payments for details. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. The amount must be equal to the total of all `UnitAmount` and `TaxAmount` of all `LineItems`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `KLARNA` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the end user billing address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. Information about the end user’s shipping address. The shipping address `AddressLine1` must be formatted: * FR, UK, US: \[Number]\[StreetName], for example: 33 Cavendish Square * Rest of EU: \[StreetName]\[Number], for example: De Ruijterkade 7 **Caution:** Failure to follow this formatting may result in an error. If no shipping address is sent, Klarna considers it to be the same as the billing address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. *object* Information about the items purchased in the transaction. The total of all line items’ `UnitAmount` and `TaxAmount` must equal the `DebitedFunds` amount.  The name of the item. The quantity of the item. The cost of the item, excluding tax. The tax amount applied to the item. *Format: ISO 3166-1 alpha-2 two-letter country code* The country of residence of the user. *Format: ISO 639-1 alpha-2 two-letter language code* The language in which the Klarna payment page is to be displayed.\ The `Culture` must match the `Country` to show the checkout page in the desired language. If not, or if `Culture` is not sent, EN is the language by default. *Format: A valid email address* The user’s email address. *Format: \[+CC]\[XXXXXXXXX] where +CC is the international dialing code and Xs are the local number, for example: \[+33]\[689854321]* The user’s mobile phone number. If the phone matches the user’s Klarna account, their checkout experience involves one less step. The payment option chosen by the user: * Pay Now (Card) – Pay now by card. * Pay Now (Direct Bank Transfer) – Pay now by bank wire. * Pay Now (Direct Debit) – Pay now by direct debit. * Pay Now (Klarna Bank Account) – Pay now from Klarna Bank Account (select regions only, e.g. Germany). * Pay in 30 days (by card) – Pay within 30 days by card. * Pay in 30 days – Pay within 30 days against an invoice (select regions only, e.g. Germany). * Slice it (X installments) – Pay in installments, where X is the number of installments (3 or 4 depending on region). * Slice it (Financing - X installments) – Pay via financing plan, where X is the number of monthly installments (6, 12, 24, or 36). The options available to users depend on their region.  **Note:** This parameter is not returned unless the `Status` is `SUCCEEDED`. *Format: Serialized JSON object* The extra merchant data required by Klarna for the transaction, as described in the Klarna guide. The platform’s order reference for the transaction. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about Klarna # View a PayIn (Klarna) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. The amount must be equal to the total of all `UnitAmount` and `TaxAmount` of all `LineItems`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `KLARNA` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the end user billing address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the end user’s shipping address. The shipping address `AddressLine1` must be formatted: * FR, UK, US: \[Number]\[StreetName], for example: 33 Cavendish Square * Rest of EU: \[StreetName]\[Number], for example: De Ruijterkade 7 **Caution:** Failure to follow this formatting may result in an error. If no shipping address is sent, Klarna considers it to be the same as the billing address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *object* Information about the items purchased in the transaction. The total of all line items’ `UnitAmount` and `TaxAmount` must equal the `DebitedFunds` amount.  The name of the item. The quantity of the item. The cost of the item, excluding tax. The tax amount applied to the item. *Format: ISO 3166-1 alpha-2 two-letter country code* The country of residence of the user. *Format: ISO 639-1 alpha-2 two-letter language code* The language in which the Klarna payment page is to be displayed.\ The `Culture` must match the `Country` to show the checkout page in the desired language. If not, or if `Culture` is not sent, EN is the language by default. *Format: A valid email address* The user’s email address. *Format: \[+CC]\[XXXXXXXXX] where +CC is the international dialing code and Xs are the local number, for example: \[+33]\[689854321]* The user's mobile phone number. If the phone matches the user’s Klarna account, their checkout experience involves one less step. The payment option chosen by the user: * Pay Now (Card) – Pay now by card. * Pay Now (Direct Bank Transfer) – Pay now by bank wire. * Pay Now (Direct Debit) – Pay now by direct debit. * Pay Now (Klarna Bank Account) – Pay now from Klarna Bank Account (select regions only, e.g. Germany). * Pay in 30 days (by card) – Pay within 30 days by card. * Pay in 30 days – Pay within 30 days against an invoice (select regions only, e.g. Germany). * Slice it (X installments) – Pay in installments, where X is the number of installments (3 or 4 depending on region). * Slice it (Financing - X installments) – Pay via financing plan, where X is the number of monthly installments (6, 12, 24, or 36). The options available to users depend on their region.  **Note:** This parameter is not returned unless the `Status` is `SUCCEEDED`. *Format: Serialized JSON object* The extra merchant data required by Klarna for the transaction, as described in the Klarna guide. The platform’s order reference for the transaction. ```json 200 - Succeeded { "Id": "wt_5a175522-04c3-4115-88ef-3b1b3446c4c6", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1706797249, "AuthorId": "213407540", "DebitedFunds": { "Currency": "EUR", "Amount": 1500 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1200 }, "Fees": { "Currency": "EUR", "Amount": 300 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1706797396, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "213407543", "CreditedUserId": "213407540", "PaymentType": "KLARNA", "ExecutionType": "WEB", "ReturnURL": "http://www.mangopay.com/docs/please-ignore?transactionId=wt_5a175522-04c3-4115-88ef-3b1b3446c4c6", "RedirectURL": "https://pay.playground.klarna.com/eu/hpp/payments/2fuacUE", "StatementDescriptor": "Mangopay", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "île-de-france", "PostalCode": "75003", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "Rue de la Fourche 26", "AddressLine2": "Appartement 3", "City": "Bruxelles", "Region": "Bruxelles-Capitale", "PostalCode": "75003", "Country": "BE" } }, "LineItems": [ { "Name": "Running shoes", "Quantity": 2, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 1" }, { "Name": "Walking shoes", "Quantity": 1, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 2" } ], "Country": "FR", "Culture": "FR", "Email": "alex.smith@example.com", "Phone": "[+33][689854321]", "PaymentMethod": "Pay in 30 days", "AdditionalData": "{\"customer_account_info\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"app_id\": \"81363501-3540-494a-8627-33bc6112035d\",\"loyalty_level\": \"high\",\"customer_email\": \"customer@email.com\",\"customer_phone\": \"0611223344\",\"customer_ranking\": 2,\"customer_reviews\": 5,\"last_login_time\": \"2023-10-21T19:11:34Z\",\"account_security\": {\"last_verification_method\": \"2FA TOTP\",\"last_verification_time\": \"2023-10-21T19:11:34Z\",\"device_id\": \"772af5a5-2d55-4a5e-bb79-85969f683810\",\"fraud_behavior\": false,\"devices_linked\": 2,\"phone_verified\": true,\"email_verified\": true,\"failed_transactions_attempts\": 0},\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": \"2022-12-22T18:45:44Z\"}],\"marketplace_seller_info\": [{\"sub_merchant_id\": \"615a0e87-4941-45dc-978d-e6efcbd90ba0\",\"sub_merchant_name\": \"Marketbrick Ltd.\",\"sub_merchant_postal_code\": \"75010\",\"product_category\": \"Computers\",\"product_name\": \"Asus Zenbook 14\",\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2020-06-10T12:02:21Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2020-06-10T12:02:21Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"digital_download\": false,\"seller_rating\": 4.5,\"number_of_trades\": 34,\"volume_of_trades\": 4500}],\"payment_history_full\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 10,\"payment_option\": \"card\",\"total_amount_paid_purchases\": 1000.10,\"date_of_first_paid_purchase\": \"2020-06-10T12:12:34Z\",\"date_of_last_paid_purchase\": \"2023-10-26T18:52:38Z\"},{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 14,\"payment_option\": \"non klarna credit\",\"total_amount_paid_purchases\": 2322.10,\"date_of_first_paid_purchase\": \"2021-10-11T20:31:15Z\",\"date_of_last_paid_purchase\": \"2023-09-22T14:59:22Z\"}],\"marketplace_winner_info\": [{\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2022-12-22T18:45:44Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2023-08-14T08:23:34Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"number_of_trades\": 24,\"volume_of_trades\": 3322}],\"other_delivery_address\": [{\"shipping_method\": \"pick-up point\",\"shipping_type\": \"express\",\"first_name\": \"Test\",\"last_name\": \"Person\",\"street_address\": \"Rue La Fayette\",\"street_number\": \"33\",\"postal_code\": \"75009\",\"city\": \"Paris\",\"country\": \"FR\"}]}", "Reference": "1234" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key", }) let myPayIn = { Id: 'wt_3bc9f70c-cc3e-481a-adf0-aff0a8941696', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' require 'PP' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: 'wt_4502fd11-1aca-44ed-9fc5-fec8f41b6b05' } pp(viewPayIn(myPayIn[:Id])) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` # Create a KYC Document POST /v2.01/{ClientId}/users/{UserId}/kyc/documents [Read more about the KYC Document object →](/api-reference/kyc-documents/kyc-document-object) ### Path parameters The unique identifier of the user. ### Body parameters **Allowed values:** `IDENTITY_PROOF`, `REGISTRATION_PROOF`, `ARTICLES_OF_ASSOCIATION`, `SHAREHOLDER_DECLARATION`, `ADDRESS_PROOF` The type of the document for the user verification. *Max. length: 255 characters* Custom data that you can add to this object. ### Responses **Returned values:** `IDENTITY_PROOF`, `REGISTRATION_PROOF`, `ARTICLES_OF_ASSOCIATION`, `SHAREHOLDER_DECLARATION`, `ADDRESS_PROOF` The type of the document for the user verification. The unique identifier of the user. **Returned values:** A code from the Flags list. The series of codes providing more precision regarding the reason why the identity proof document was refused. You can review the explanations for each code in the Flags list. The unique identifier of the KYC Document. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time at which the document was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the document: * `CREATED` – The document is created, but not yet submitted to Mangopay. * `VALIDATION_ASKED` – The document is submitted to Mangopay for validation. * `VALIDATED` – The document is validated by Mangopay’s teams. * `REFUSED` – The document is rejected by Mangopay’s teams and a new KYC Document object needs to be created to resubmit it. You can learn more about the reason why it was refused in the `RefusedReasonType` parameter. * `OUT_OF_DATE` – The document is downgraded and a new KYC Document object needs to be created to resubmit it. **Returned values:** DOCUMENT\_DO\_NOT\_MATCH\_USER\_DATA, DOCUMENT\_FALSIFIED, DOCUMENT\_HAS\_EXPIRED, DOCUMENT\_INCOMPLETE, DOCUMENT\_MISSING, DOCUMENT\_NOT\_ACCEPTED, DOCUMENT\_UNREADABLE, SPECIFIC\_CASE, UNDERAGE\_PERSON Returned `null` unless `Status` is `REFUSED`. The reason for the document refusal. See the refused reason types for more information depending on the document type. *Max. length: 255 characters* **Default value:** null Additional information about why the KYC Document was refused, provided by Mangopay’s team. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "da212cf3-7afb-4a49-9c6d-8fa2753f243c#1727446970", "Date": 1727446971, "errors": { "Type": "REGISTRATION_PROOF cannot be submitted for NATURAL_PERSON user" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "3824ad65-c0da-4da6-824c-697a58a77b2e#1727446982", "Date": 1727446983, "errors": { "Type": "ARTICLES_OF_ASSOCIATION cannot be submitted for NATURAL_PERSON user" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "d91835a1-ce46-4e55-866d-6f1e0de61e75#1727448032", "Date": 1727448034, "errors": { "Type": "SHAREHOLDER_DECLARATION cannot be submitted for NATURAL_PERSON user" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "43cddfad-fad7-4ed5-a9c6-bcc4d4b0ef42#1727447421", "Date": 1727447422, "errors": { "Type": "ADDRESS_PROOF cannot be submitted for BUSINESS user" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "573e126e-800a-42c4-89cd-b78ff10f0327#1727447489", "Date": 1727447490, "errors": { "Type": "ADDRESS_PROOF cannot be submitted for PARTNERSHIP user" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "2fb6cf62-cfb4-4a62-9401-763a53d7f602#1727447342", "Date": 1727447343, "errors": { "Type": "ADDRESS_PROOF cannot be submitted for ORGANIZATION user" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "444f5241-5263-4cc0-9ad2-26c871a6cf44#1727447141", "Date": 1727447142, "errors": { "Type": "ADDRESS_PROOF cannot be submitted for SOLETRADER user" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "fa1adc02-dc72-47be-ab3c-4a0a4ce4ef6b#1727447083", "Date": 1727447084, "errors": { "Type": "ARTICLES_OF_ASSOCIATION cannot be submitted for SOLETRADER user" } } ``` ```json 200 { "Type": "IDENTITY_PROOF", "UserId": "user_m_01J8J0Y9DPNYRA9RB532CCND9Q", "Flags": [], "Id": "kyc_01JA5M2N33ENJHWVPQXVJ6Q51P", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1728913167, "ProcessedDate": null, "Status": "CREATED", "RefusedReasonType": null, "RefusedReasonMessage": null } ``` ```json REST { "Tag": "Created using MANGOPAY API Collection Postman", "Type": "IDENTITY_PROOF" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '198675238'; $kycDocument = new \MangoPay\KycDocument(); $kycDocument->Type = \MangoPay\KycDocumentType::IdentityProof; $kycDocument->Tag = 'Created using Mangopay PHP SDK'; $response = $api->Users->CreateKycDocument($userId, $kycDocument); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key", }); let myUser = { Id: 'your-user-id' } let myKycDocument = { Type: 'IDENTITY_PROOF', Tag: "Created by the NodeJs SDK" } const createKycDocument = async (userId, kycDocument) => { return await mangopay.Users.createKycDocument(userId, kycDocument) .then((response) => { console.info(response) return response }).catch((err) => { console.log(err); return false }); } createKycDocument(myUser.Id, myKycDocument) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createKycDocument(userId, kycDocumentObject) begin response = MangoPay::KycDocument.create(userId, kycDocumentObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create KYC Document: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '194150513' } myKycDocument = { Type: 'IDENTITY_PROOF', Tag: 'Created using Mangopay Ruby SDK' } createKycDocument(myUser[:Id], myKycDocument) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.core.enumerations.KycDocumentType; import com.mangopay.entities.KycDocument; import java.lang.reflect.Field; public class CreateKYCDoc { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HR9SZTXDRY1PCFHSJFAPC0YJ"; KycDocument createKycDoc = mangopay.getUserApi().createKycDocument( userId, KycDocumentType.IDENTITY_PROOF, "Created using the Mangopay Java SDK" ); System.out.println(String.format("id: %s", createKycDoc.getId())); printObjectFields(createKycDoc); } private static void printObjectFields(Object obj) { Class objClass = obj.getClass(); Field[] fields = objClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object value = field.get(obj); if (value instanceof Address) { System.out.println(field.getName() + ": "); printObjectFields(value); } else { System.out.println(field.getName() + ": " + value); } } catch (IllegalAccessException e) { e.printStackTrace(); } } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id = 'your-client-id' mangopay.apikey = 'your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Document, LegalUser legal_user = LegalUser( id = '210760575' ) kyc_document = Document(type='REGISTRATION_PROOF', user=legal_user) create_kyc_document = kyc_document.save() pprint(create_kyc_document) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var tag = "Created using the Mangopay .NET SDK"; var createKycDoc = await api.Users.CreateKycDocumentAsync(userId, KycDocumentType.IDENTITY_PROOF, tag); string prettyPrint = JsonConvert.SerializeObject(createKycDoc, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a KYC Document Page POST /v2.01/{ClientId}/users/{UserId}/kyc/documents/{KycDocumentId}/pages [Read more about the KYC Document object →](/api-reference/kyc-documents/kyc-document-object) The KYC Document Page is a file attached to the KYC Document for Mangopay's teams to review. To be able to create a KYC Document Page: * The corresponding KYC Document `Status` must be `CREATED` * The `File` must be Base64 encoded and abide by the format and size constraints. Only 5 KYC Document Pages can be created for a KYC Document. ### Path parameters The unique identifier of the user. The unique identifier of the KYC Document. ### Body parameters *Format: Base64 encoded file* The encoded file of the document page. ### Responses *No response body parameters* ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "ddcfad41-cd82-432d-91c2-f6486fd40334#1671865352", "Date": 1671865353.0, "errors": { "File": "Invalid length for a Base-64 char array or string." } } ``` ```json { "Message": "Maximum number of pages exceeded. You can only add up to 5 pages to this document", "Type": "max_page_number", "Id": "7a69563a-c528-4428-91f5-d63cbf5855a4", "Date": 1697101828.0, "errors": null } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "716c09fa-6a3b-41ad-87b9-dd8781394192", "Date": 1715773848, "errors": { "File": "The file is too small to be readable" } } ``` {/* */} ```json REST { "File": "iVBORw0KGgoAAAANSUhEUgAAAlgAAAFRCAIAAAAn40TeAAAACXBIWXMAAAsSAAALEgHS3X78AAAgAElEQVR4nOy9eXhc1Xn4f5fZ933RjKTRZkmWZMt2vBvb2Bgwa7EDpIGGtLQJCUl4mjZJ26d8Q5qQ9GmThzRpCKRAgBICGLIQQ8AYDA7GlvdF1r5Lo8VaZl/uzNx7f3+8P91OpJnRnX1snc8fPGZ0l3PP8r7nfc973iNgWRbLFJZlcRyPRCLf/OY33377bY1Gg2EYwzAZPxAgCALDsN7e3h/+8Ief+9znBAIBjuNLluS999574okn+vv7tVotTdMJH3vlypXPfvaz3//+9+GrUz+WYRiCIE6dOrV//36NRiOVShM+NvWHRKNRDMO++tWv/s3f/A08MBgM/vCHP3z11VeFQqFIJMq+urIEqiIWiz388MOf+cxnVCpVuk+A73rmmWe+/OUvr1mzhmXZLD9KKBTOzs4aDIZ/+Id/uOuuu6A/cE32yCOP/PrXv66pqYlEIkt2jCLCsqxIJBobG9PpdH/84x/LyspgvMCfIpHIz372s2984xutra0kSRa9GwBQ5vHx8crKynfeeUcmk3Flzi2BQODVV1/913/9V7PZLBAIspFChQHG/g9+8IObb74ZOjzUjNfrffbZZ59++mmRSCSVSmOxWDbVJRAIAoHA9PT07373u02bNsVXPrz0/Pnze/fu1el0CoUiXXG0AIIgaJr2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8wmhUMjn86VVUSzLkiTJv11KBHZ+z9KlS5eeffbZY8eOTU9Pm0ymtL5CLpe3tbVNT093dXXt37/farXmqh3hHzCijx8/7vV6ZTLZkmUDg0mj0bjd7j/84Q933nmnQqHgvjT16wiCiEQi77//vtvthnct2QdYloXD786ePXvdddfV1tbGlzz1jXDB2bNnX3zxxe7u7rTOeaBpOhKJgE8lrY4qEAh4eu+yFxTFVIQ4jsMyIUVRaWUNwOePldDr9TjvA3I1Gg2k2E93+gATdoVCkZO9E1BahmEOHz584MCBDz/8EMMwg8HAUzmxLCsUCiORyJtvvjkwMHDx4sX777+f5yG6BEHs3bv3xIkTc3NzPN8I8zKtVhsKhZ599tmjR4/SNE1R1P33319XVweZ7bhZLcMwJ0+efPnllz/44AOPxwPL42k160cffTQyMnLx4sV9+/ZVV1dnqQvhdq/Xe+DAgQMHDly6dMlkMkmlUp5aEJufeYhEovLy8vPnz/f39w8NDX3uc59raGjIuFTxZaMo6tixYy+//PL7779PkqROp0urc4JKy+DVV5dvkGvHw4cPv/jii21tbQaDwWq1RqPRtJ4Ti8UqKytHRkZ+/vOfd3R03H///Vu2bMlJCXEcn5ycfOedd44ePdrR0QGHAfBR0rAST1HUU089de7cuZ07d+7evTuF3wV+j0ajJ06cOHToUFtbWzQalUqlPCcE4E86derUY489dt111910002Q6jLFQIM/zc7O/uY3vzl48ODJkyfNZnNaTjWwXDNIYFTIjlpMRUiSJJzkQFEU/7Nz4XqdTsdFyvAUakKhsLW1taOjI925MIh4tVqt0WiyzNwNTxsdHT148ODLL7/c09Njs9lEIlFae0jATKmqqhocHPzxj388MjJy1113bd68mVNLCV8KbvctW7ZYLJaJiYm0HP0wsO12+9zcHHgvY7EY10fBrJmYmHjzzTf/8Ic/nDx50maz2e32dFdxMAxzOBxjY2NPPvlkd3f33XffvXPnzmwSgMVisfb29t/97ne//vWvI5GIw+GIRqPplgqqLhqNlpeXB4PB559/fmRk5O67777++uszPqWI8we8/vrrb7311qVLlyorK0mShFlzWlxd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gMRbn+gwQHZbcL/FVITwfgj/v98DfRwHBcOh++++25wrUfXNwMiRFHUmDFjpkyZAv5J9BuFiQFDI+jcRY/90qwZlMCs2NXVlZqa+uCDDyYlJUW3DyI63Hp7e8vLy1955ZW///3vkUgEVFC85oYMEonE6XRardaHHnropptuivnseREkSZrN5scee2z8+PHd3d2iHot4hf256PnEypt9EUJU/7e//W1eXh5sy4l1pwiCIDQazfz582+77Tb0p3x8HyB7YHAMzCYFYthJnufPnz//4IMPTp8+XTBPo4ughT//+c8LCgrELgl7hV0iLnnssX1VIDhCkuSNN9548803R70z/wezVxgtmrI60gAAAABJRU5ErkJggg==" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $kycDocumentPage = new \MangoPay\KycPage(); $userId = 'user_m_01HQK25M6KVHKDV0S36JY9NRKR'; $kycDocumentId = 'kyc_01HQTV51JVND500S8TWZC86EJ4'; $kycDocumentPage->File = ""; $response = $api->Users->CreateKycPage($userId, $kycDocumentId, $kycDocumentPage); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key", }); let myUser = { Id: 'your-user-id' } let myKycDocument = { Id: 'your-kyc-document-id' } const createKycDocumentPage = async (userId, kycDocumentId, file) => { return await mangopay.Users.createKycPageFromFile(userId, kycDocumentId, file) .then((response) => { console.info(response) return response }).catch((err) => { console.log(err); return false }); } createKycDocument(myUser.Id, myKycDocument.Id, 'your-file') ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createKycDocumentPage(userId, kycDocument, file) begin response = MangoPay::KycDocument.create_page(userId, kycDocument, nil, file) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create KYC Document Page: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: 'your-user-id' } myKycDocument = { Id: 'your-kyc-document-id', } createKycDocumentPage(myUser[:Id], myKycDocument[:Id], "your-file") ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Page legal_user = 'user_m_01J29D5XMKKNPX72AR5HRV804X' kyc_document = 'kyc_01J29FX66B5S85GSY2MG9F9XZM' file_data = "iVBORw0KGgoAAAANSUhEUgAAAlgAAAFRCAIAAAAn40TeAAAACXBIWXMAAAsSAAALEgHS3X78AAAgAElEQVR4nOy9eXhc1Xn4f5fZ933RjKTRZkmWZMt2vBvb2Bgwa7EDpIGGtLQJCUl4mjZJ26d8Q5qQ9GmThzRpCKRAgBICGLIQQ8AYDA7GlvdF1r5Lo8VaZl/uzNx7f3+8P91OpJnRnX1snc8fPGZ0l3PP8r7nfc973iNgWRbLFJZlcRyPRCLf/OY33377bY1Gg2EYwzAZPxAgCALDsN7e3h/+8Ief+9znBAIBjuNLluS999574okn+vv7tVotTdMJH3vlypXPfvaz3//+9+GrUz+WYRiCIE6dOrV//36NRiOVShM+NvWHRKNRDMO++tWv/s3f/A08MBgM/vCHP3z11VeFQqFIJMq+urIEqiIWiz388MOf+cxnVCpVuk+A73rmmWe+/OUvr1mzhmXZLD9KKBTOzs4aDIZ/+Id/uOuuu6A/cE32yCOP/PrXv66pqYlEIkt2jCLCsqxIJBobG9PpdH/84x/LyspgvMCfIpHIz372s2984xutra0kSRa9GwBQ5vHx8crKynfeeUcmk3Flzi2BQODVV1/913/9V7PZLBAIspFChQHG/g9+8IObb74ZOjzUjNfrffbZZ59++mmRSCSVSmOxWDbVJRAIAoHA9PT07373u02bNsVXPrz0/Pnze/fu1el0CoUiXXG0AIIgaJr2+/233nrr9773vcVtDf978eLFH/zgB8eOHTOZTARBlEhHxXEcROs999zz8MMPq9X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5CLpe3tbVNT093dXXt37/farXmqh3hHzCijx8/7vV6ZTLZkmUDg0mj0bjd7j/84Q933nmnQqHgvjT16wiCiEQi77//vtvthnct2QdYloXD786ePXvdddfV1tbGlzz1jXDB2bNnX3zxxe7u7rTOeaBpOhKJgE8lrY4qEAh4eu+yFxTFVIQ4jsMyIUVRaWUNwOePldDr9TjvA3I1Gg2k2E93+gATdoVCkZO9E1BahmEOHz584MCBDz/8EMMwg8HAUzmxLCsUCiORyJtvvjkwMHDx4sX777+f5yG6BEHs3bv3xIkTc3NzPN8I8zKtVhsKhZ599tmjR4/SNE1R1P33319XVweZ7bhZLcMwJ0+efPnllz/44AOPxwPL42k160cffTQyMnLx4sV9+/ZVV1dnqQvhdq/Xe+DAgQMHDly6dMlkMkmlUp5aEJufeYhEovLy8vPnz/f39w8NDX3uc59raGjIuFTxZaMo6tixYy+//PL7779PkqROp0urc4JKy+DVV5dvkGvHw4cPv/jii21tbQaDwWq1RqPRtJ4Ti8UqKytHRkZ+/vOfd3R03H///Vu2bMlJCXEcn5ycfOedd44ePdrR0QGHAfBR0rAST1HUU089de7cuZ07d+7evTuF3wV+j0ajJ06cOHToUFtbWzQalUqlPCcE4E86derUY489dt111910002Q6jLFQIM/zc7O/uY3vzl48ODJkyfNZnNaTjWwXDNIYFTIjlpMRUiSJJzkQFEU/7Nz4XqdTsdFyvAUakKhsLW1taOjI925MIh4tVqt0WiyzNwNTxsdHT148ODLL7/c09Njs9lEIlFae0jATKmqqhocHPzxj388MjJy1113bd68mVNLCV8KbvctW7ZYLJaJiYm0HP0wsO12+9zcHHgvY7EY10fBrJmYmHjzzTf/8Ic/nDx50maz2e32dFdxMAxzOBxjY2NPPvlkd3f33XffvXPnzmwSgMVisfb29t/97ne//vWvI5GIw+GIRqPplgqqLhqNlpeXB4PB559/fmRk5O67777++uszPqWI8we8/vrrb7311qVLlyorK0mShFlzWlxdhl1m4Dje0dHx29/+9s033xwdHXU4HGBkZBAsQ1GU1WqNRCKvv/56X1/f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jpkyZAv5J9BuFiQFDI+jcRY/90qwZlMCs2NXVlZqa+uCDDyYlJUW3DyI63Hp7e8vLy1955ZW///3vkUgEVFC85oYMEonE6XRardaHHnropptuivnseREkSZrN5scee2z8+PHd3d2iHot4hf256PnEypt9EUJU/7e//W1eXh5sy4l1pwiCIDQazfz582+77Tb0p3x8HyB7YHAMzCYFYthJnufPnz//4IMPTp8+XTBPo4ughT//+c8LCgrELgl7hV0iLnnssX1VIDhCkuSNN9548803R70z/wezVxgtmrI60gAAAABJRU5ErkJggg==" page = Page(document=kyc_document, file=file_data, user=legal_user) kyc_page = page.save() pprint(kyc_page) ``` # The KYC Document object ### Description The KYC Document object is a container to store verification document pages before being sent to Mangopay’s teams for validation. One KYC Document object is necessary for each type of document. **Warning – Storage of KYC documents prohibited** You’re not allowed to store verification documents (in any format, even encoded) on your side unless you have permission from the appropriate authorities in your country. [How to submit a KYC Document →](/guides/users/verification/documents/submission/how-to) ### Attributes **Returned values:** `IDENTITY_PROOF`, `REGISTRATION_PROOF`, `ARTICLES_OF_ASSOCIATION`, `SHAREHOLDER_DECLARATION`, `ADDRESS_PROOF` The type of the document for the user verification. The unique identifier of the user. **Returned values:** A code from the Flags list. The series of codes providing more precision regarding the reason why the identity proof document was refused. You can review the explanations for each code in the Flags list. The unique identifier of the KYC Document. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time at which the document was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the document: * `CREATED` – The document is created, but not yet submitted to Mangopay. * `VALIDATION_ASKED` – The document is submitted to Mangopay for validation. * `VALIDATED` – The document is validated by Mangopay’s teams. * `REFUSED` – The document is rejected by Mangopay’s teams and a new KYC Document object needs to be created to resubmit it. You can learn more about the reason why it was refused in the `RefusedReasonType` parameter. * `OUT_OF_DATE` – The document is downgraded and a new KYC Document object needs to be created to resubmit it. **Returned values:** DOCUMENT\_DO\_NOT\_MATCH\_USER\_DATA, DOCUMENT\_FALSIFIED, DOCUMENT\_HAS\_EXPIRED, DOCUMENT\_INCOMPLETE, DOCUMENT\_MISSING, DOCUMENT\_NOT\_ACCEPTED, DOCUMENT\_UNREADABLE, SPECIFIC\_CASE, UNDERAGE\_PERSON Returned `null` unless `Status` is `REFUSED`. The reason for the document refusal. See the refused reason types for more information depending on the document type. *Max. length: 255 characters* **Default value:** null Additional information about why the KYC Document was refused, provided by Mangopay’s team. ### Related resources How to submit a KYC Document Learn about user verification # List all KYC Documents GET /v2.01/{ClientId}/kyc/documents [Read more about the KYC Document object →](/api-reference/kyc-documents/kyc-document-object) ### Query parameters **Allowed values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the KYC Document. You can filter on multiple values by separating them with a comma. **Allowed values:** `IDENTITY_PROOF`, `REGISTRATION_PROOF`, `ARTICLES_OF_ASSOCIATION`, `SHAREHOLDER_DECLARATION`, `ADDRESS_PROOF` The type of the KYC Document. You can filter on multiple values by separating them with a comma. The date before which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. ### Responses The list of KYC documents created by the platform. KYC Document created by the platform. **Returned values:** `IDENTITY_PROOF`, `REGISTRATION_PROOF`, `ARTICLES_OF_ASSOCIATION`, `SHAREHOLDER_DECLARATION`, `ADDRESS_PROOF` The type of the document for the user verification. The unique identifier of the user. **Returned values:** A code from the Flags list. The series of codes providing more precision regarding the reason why the identity proof document was refused. You can review the explanations for each code in the Flags list. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the document: * `CREATED` – The document is created, but not yet submitted to Mangopay. * `VALIDATION_ASKED` – The document is submitted to Mangopay for validation. * `VALIDATED` – The document is validated by Mangopay’s teams. * `REFUSED` – The document is rejected by Mangopay’s teams and a new KYC Document object needs to be created to resubmit it. You can learn more about the reason why it was refused in the `RefusedReasonType` parameter. * `OUT_OF_DATE` – The document is downgraded and a new KYC Document object needs to be created to resubmit it. **Returned values:** DOCUMENT\_DO\_NOT\_MATCH\_USER\_DATA, DOCUMENT\_FALSIFIED, DOCUMENT\_HAS\_EXPIRED, DOCUMENT\_INCOMPLETE, DOCUMENT\_MISSING, DOCUMENT\_NOT\_ACCEPTED, DOCUMENT\_UNREADABLE, SPECIFIC\_CASE, UNDERAGE\_PERSON Returned `null` unless `Status` is `REFUSED`. The reason for the document refusal. See the refused reason types for more information depending on the document type. *Max. length: 255 characters* **Default value:** null Additional information about why the KYC Document was refused, provided by Mangopay’s team. ```json 200 [ { "Type": "REGISTRATION_PROOF", "UserId": "user_m_01J8J0Y9DPNYRA9RB532CCND9Q", "Flags": [], "Id": "kyc_01JA5M25P7D6V54J72ENGMPH9Y", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1728913151, "ProcessedDate": null, "Status": "VALIDATION_ASKED", "RefusedReasonType": null, "RefusedReasonMessage": null }, { "Type": "IDENTITY_PROOF", "UserId": "user_m_01J8J0Y9DPNYRA9RB532CCND9Q", "Flags": [], "Id": "kyc_01JA5M2N33ENJHWVPQXVJ6Q51P", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1728913167, "ProcessedDate": 1728913173, "Status": "VALIDATED", "RefusedReasonType": null, "RefusedReasonMessage": null } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $response = $api->KycDocuments->GetAll(); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) const listKycDocuments = async () => { return await mangopay.KycDocuments.getAll() .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listKycDocuments() ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listAllKycDocuments() begin response = MangoPay::KycDocument.fetch_all() puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch KYC Documents #{error.message}" puts "Error details: #{error.details}" return false end end listAllKycDocuments() ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.entities.KycDocument; import com.mangopay.core.Pagination; import java.lang.reflect.Field; import java.util.List; public class ListAllKycDocs { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Pagination pagination = new Pagination(1, 100); List kycDocs = mangopay.getKycDocumentApi().getAll(pagination, null); for (KycDocument kycDoc : kycDocs) {; System.out.println(""); System.out.println(String.format("id: %s", kycDoc.getId())); printObjectFields(kycDoc); } } private static void printObjectFields(Object obj) { Class objClass = obj.getClass(); Field[] fields = objClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object value = field.get(obj); System.out.println(field.getName() + ": " + value); } catch (IllegalAccessException e) { e.printStackTrace(); } } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import User # Page always needs to be 1. Set per_page to however many users you want displayed. # Set per_page as the minimum number of user you want to see. users = User.all(page=1, per_page=50) for user in users: documents = user.documents.all() for document in documents: pprint(document) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var sort = new Sort(); sort.AddField("CreationDate", SortDirection.desc); var kycDocs = await api.Kyc.GetKycDocumentsAsync(new Pagination(1, 100), null, sort); string prettyPrint = JsonConvert.SerializeObject(kycDocs, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List KYC Documents for a User GET /v2.01/{ClientId}/users/{UserId}/kyc/documents [Read more about the KYC Document object →](/api-reference/kyc-documents/kyc-document-object) ### Query parameters **Allowed values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the KYC Document. You can filter on multiple values by separating them with a comma. **Allowed values:** `IDENTITY_PROOF`, `REGISTRATION_PROOF`, `ARTICLES_OF_ASSOCIATION`, `SHAREHOLDER_DECLARATION`, `ADDRESS_PROOF` The type of the KYC Document. You can filter on multiple values by separating them with a comma. The date before which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. ### Path parameters The unique identifier of the user. ### Responses The list of KYC documents created by the platform. KYC Document created by the platform. **Returned values:** `IDENTITY_PROOF`, `REGISTRATION_PROOF`, `ARTICLES_OF_ASSOCIATION`, `SHAREHOLDER_DECLARATION`, `ADDRESS_PROOF` The type of the document for the user verification. The unique identifier of the user. **Returned values:** A code from the Flags list. The series of codes providing more precision regarding the reason why the identity proof document was refused. You can review the explanations for each code in the Flags list. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the document: * `CREATED` – The document is created, but not yet submitted to Mangopay. * `VALIDATION_ASKED` – The document is submitted to Mangopay for validation. * `VALIDATED` – The document is validated by Mangopay’s teams. * `REFUSED` – The document is rejected by Mangopay’s teams and a new KYC Document object needs to be created to resubmit it. You can learn more about the reason why it was refused in the `RefusedReasonType` parameter. * `OUT_OF_DATE` – The document is downgraded and a new KYC Document object needs to be created to resubmit it. **Returned values:** DOCUMENT\_DO\_NOT\_MATCH\_USER\_DATA, DOCUMENT\_FALSIFIED, DOCUMENT\_HAS\_EXPIRED, DOCUMENT\_INCOMPLETE, DOCUMENT\_MISSING, DOCUMENT\_NOT\_ACCEPTED, DOCUMENT\_UNREADABLE, SPECIFIC\_CASE, UNDERAGE\_PERSON Returned `null` unless `Status` is `REFUSED`. The reason for the document refusal. See the refused reason types for more information depending on the document type. *Max. length: 255 characters* **Default value:** null Additional information about why the KYC Document was refused, provided by Mangopay’s team. ```json 200 [ { "Type": "REGISTRATION_PROOF", "UserId": "user_m_01J8J0Y9DPNYRA9RB532CCND9Q", "Flags": [], "Id": "kyc_01JA5M25P7D6V54J72ENGMPH9Y", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1728913151, "ProcessedDate": null, "Status": "VALIDATION_ASKED", "RefusedReasonType": null, "RefusedReasonMessage": null }, { "Type": "IDENTITY_PROOF", "UserId": "user_m_01J8J0Y9DPNYRA9RB532CCND9Q", "Flags": [], "Id": "kyc_01JA5M2N33ENJHWVPQXVJ6Q51P", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1728913167, "ProcessedDate": 1728913173, "Status": "VALIDATED", "RefusedReasonType": null, "RefusedReasonMessage": null } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId ='146476890'; $response = $api->KycDocuments->GetAll($userId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '146476890', } const listUserKycDocs = async (userId) => { return await mangopay.Users.getKycDocuments(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listUserKycDocs(user.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listKycDocumentsforUser(userId) begin response = MangoPay::KycDocument.fetch_all(userId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch KYC Documents #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '146476890' } listKycDocumentsforUser(myUser[:Id]) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.entities.KycDocument; import com.mangopay.core.Pagination; import java.lang.reflect.Field; import java.util.List; public class ListUserKycDocs { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String userId = "user_m_01HR9SZTXDRY1PCFHSJFAPC0YJ"; Pagination pagination = new Pagination(1, 100); List kycDocs = mangopay.getUserApi().getKycDocuments(userId, pagination, null); for (KycDocument kycDoc : kycDocs) { kycDoc = mangopay.getUserApi().getKycDocument(userId, kycDoc.getId()); System.out.println(""); System.out.println(String.format("id: %s", kycDoc.getId())); printObjectFields(kycDoc); } } private static void printObjectFields(Object obj) { Class objClass = obj.getClass(); Field[] fields = objClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object value = field.get(obj); System.out.println(field.getName() + ": " + value); } catch (IllegalAccessException e) { e.printStackTrace(); } } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id = 'your-client-id' mangopay.apikey = 'your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import LegalUser legal_user = LegalUser( id = '210760575' ) documents = legal_user.documents.all() for document in documents: pprint(vars(document)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var userKycDocs = await api.Users.GetKycDocumentsAsync(userId, null, null); string prettyPrint = JsonConvert.SerializeObject(userKycDocs, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Submit a KYC Document PUT /v2.01/{ClientId}/users/{UserId}/kyc/documents/{KycDocumentId} [Read more about the KYC Document object →](/api-reference/kyc-documents/kyc-document-object) Submitting a KYC Document consists in updating the object `Status` from `CREATED` to `VALIDATION_ASKED`.  Once submitted, MANGOPAY's teams review the document and validate or reject it. This process takes on average 24 hours (on bank working days). We recommend that you set up a hook for the following event types in order to be notified of the outcome: * KYC\_SUCCEEDED * KYC\_FAILED ### Path parameters The unique identifier of the user. The unique identifier of the KYC Document. ### Body parameters **Allowed values:** VALIDATION\_ASKED The status of the document: * `CREATED` – The document is created, but not yet submitted to Mangopay. * `VALIDATION_ASKED` – The document is submitted to Mangopay for validation. * `VALIDATED` – The document is validated by Mangopay’s teams. * `REFUSED` – The document is rejected by Mangopay’s teams and a new KYC Document object needs to be created to resubmit it. You can learn more about the reason why it was refused in the `RefusedReasonType` parameter. * `OUT_OF_DATE` – The document is downgraded and a new KYC Document object needs to be created to resubmit it. ### Responses **Returned values:** `IDENTITY_PROOF`, `REGISTRATION_PROOF`, `ARTICLES_OF_ASSOCIATION`, `SHAREHOLDER_DECLARATION`, `ADDRESS_PROOF` The type of the document for the user verification. The unique identifier of the user. **Returned values:** A code from the Flags list. The series of codes providing more precision regarding the reason why the identity proof document was refused. You can review the explanations for each code in the Flags list. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time at which the document was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the document: * `CREATED` – The document is created, but not yet submitted to Mangopay. * `VALIDATION_ASKED` – The document is submitted to Mangopay for validation. * `VALIDATED` – The document is validated by Mangopay’s teams. * `REFUSED` – The document is rejected by Mangopay’s teams and a new KYC Document object needs to be created to resubmit it. You can learn more about the reason why it was refused in the `RefusedReasonType` parameter. * `OUT_OF_DATE` – The document is downgraded and a new KYC Document object needs to be created to resubmit it. **Returned values:** DOCUMENT\_DO\_NOT\_MATCH\_USER\_DATA, DOCUMENT\_FALSIFIED, DOCUMENT\_HAS\_EXPIRED, DOCUMENT\_INCOMPLETE, DOCUMENT\_MISSING, DOCUMENT\_NOT\_ACCEPTED, DOCUMENT\_UNREADABLE, SPECIFIC\_CASE, UNDERAGE\_PERSON Returned `null` unless `Status` is `REFUSED`. The reason for the document refusal. See the refused reason types for more information depending on the document type. *Max. length: 255 characters* **Default value:** null Additional information about why the KYC Document was refused, provided by Mangopay’s team. ```json 200 { "Type": "IDENTITY_PROOF", "UserId": "user_m_01J8J0Y9DPNYRA9RB532CCND9Q", "Flags": [], "Id": "kyc_01JA5M2N33ENJHWVPQXVJ6Q51P", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1728913167, "ProcessedDate": null, "Status": "VALIDATION_ASKED", "RefusedReasonType": null, "RefusedReasonMessage": null } ``` ```json REST { "Status": "VALIDATION_ASKED" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = '/tmp/'; try { $userId = '195627761'; $kycDocument = new \MangoPay\KycDocument(); $kycDocument->Id = '1234567'; $kycDocument->Status = \MangoPay\KycDocumentStatus::ValidationAsked; $response = $api->Users->UpdateKycDocument($userId, $kycDocument); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: '192591410', } let myKycDocument = { Id: '192611019', Status: 'VALIDATION_ASKED', } const submitKyc = async (userId, kycDocument) => { return await mangopay.Users.updateKycDocument(userId, kycDocument) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } submitKyc(myUser.Id, myKycDocument) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def submitKycDocument(userId, kycDocumentId, kycDocument) begin response = MangoPay::KycDocument.update(userId, kycDocumentId, kycDocument) puts response return response rescue MangoPay::ResponseError => error puts "Failed to submit KYC Document: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '194150513' } myKycDocument = { Id: '194510406', Status: 'VALIDATION_ASKED' } submitKycDocument(myUser[:Id], myKycDocument[:Id], myKycDocument) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.KycStatus; import com.mangopay.entities.KycDocument; public class SubmitKYCDoc { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HR9SZTXDRY1PCFHSJFAPC0YJ"; KycDocument kycDoc = mangopay.getKycDocumentApi().getKycDocument("kyc_01HSB6MMPT9RPDFHSG1BN9BKPP"); kycDoc.setStatus(KycStatus.VALIDATION_ASKED); KycDocument submitKycDoc = mangopay.getUserApi().updateKycDocument(userId, kycDoc); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(submitKycDoc); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id = 'your-client-id' mangopay.apikey = 'your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import (Document, LegalUser) legal_user = LegalUser( id = '210760575' ) kyc_document = Document( id = '211551193', user = legal_user, status = 'VALIDATION_ASKED' ) submit_kyc_document = kyc_document.save() pprint(submit_kyc_document) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var kycDocId = "kyc_01J2V2W9CJKMS9V0SGFWHPQY87"; var kycDoc = new KycDocumentPutDTO { Status = KycStatus.VALIDATION_ASKED }; var submitKycDoc = await api.Users.UpdateKycDocumentAsync(userId, kycDoc, kycDocId); string prettyPrint = JsonConvert.SerializeObject(submitKycDoc, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a KYC Document GET /v2.01/{ClientId}/kyc/documents/{KycDocumentId} [Read more about the KYC Document object →](/api-reference/kyc-documents/kyc-document-object) ### Path parameters The unique identifier of the KYC Document. ### Responses **Returned values:** `IDENTITY_PROOF`, `REGISTRATION_PROOF`, `ARTICLES_OF_ASSOCIATION`, `SHAREHOLDER_DECLARATION`, `ADDRESS_PROOF` The type of the document for the user verification. The unique identifier of the user. **Returned values:** A code from the Flags list. The series of codes providing more precision regarding the reason why the identity proof document was refused. You can review the explanations for each code in the Flags list. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The date and time at which the document was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `VALIDATED`, `REFUSED`, `OUT_OF_DATE` The status of the document: * `CREATED` – The document is created, but not yet submitted to Mangopay. * `VALIDATION_ASKED` – The document is submitted to Mangopay for validation. * `VALIDATED` – The document is validated by Mangopay’s teams. * `REFUSED` – The document is rejected by Mangopay’s teams and a new KYC Document object needs to be created to resubmit it. You can learn more about the reason why it was refused in the `RefusedReasonType` parameter. * `OUT_OF_DATE` – The document is downgraded and a new KYC Document object needs to be created to resubmit it. **Returned values:** DOCUMENT\_DO\_NOT\_MATCH\_USER\_DATA, DOCUMENT\_FALSIFIED, DOCUMENT\_HAS\_EXPIRED, DOCUMENT\_INCOMPLETE, DOCUMENT\_MISSING, DOCUMENT\_NOT\_ACCEPTED, DOCUMENT\_UNREADABLE, SPECIFIC\_CASE, UNDERAGE\_PERSON Returned `null` unless `Status` is `REFUSED`. The reason for the document refusal. See the refused reason types for more information depending on the document type. *Max. length: 255 characters* **Default value:** null Additional information about why the KYC Document was refused, provided by Mangopay’s team. ```json 200 { "Type": "IDENTITY_PROOF", "UserId": "user_m_01J8J0Y9DPNYRA9RB532CCND9Q", "Flags": [], "Id": "kyc_01JA5M2N33ENJHWVPQXVJ6Q51P", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1728913167, "ProcessedDate": 1728913173, "Status": "VALIDATED", "RefusedReasonType": null, "RefusedReasonMessage": null } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $kycDocumentId = '148967714'; $response = $api->KycDocuments->Get($kycDocumentId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '146476890', } let kycDocument = { Id: '148967491', } const getKycDocument = async (userId, kycDocumentId) => { return await mangopay.Users.getKycDocument(userId, kycDocumentId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getKycDocument(user.Id, kycDocument.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewKycDocument(userId, kycDocumentId) begin response = MangoPay::KycDocument.fetch(userId, kycDocumentId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch KYC Document: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '194150513' } myKycDocument = { Id: '194510406', } viewKycDocument(myUser[:Id], myKycDocument[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.KycDocument; public class ViewKycDoc { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String userId = "user_m_01HR9SZTXDRY1PCFHSJFAPC0YJ"; String kycDocId = "kyc_01HSB6MMPT9RPDFHSG1BN9BKPP"; KycDocument viewKycDoc = mangopay.getUserApi().getKycDocument(userId, kycDocId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(submitKycDoc); System.out.println(viewKycDoc); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id = 'your-client-id' mangopay.apikey = 'your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Document kyc_document = Document( id = '211551193' ) try: view_kyc_document = Document.get(kyc_document.id) pprint(vars(view_kyc_document)) except Document.DoesNotExist: print('The KYC document {} does not exist'.format(kyc_document.id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var kycDocId = "kyc_01J2V2W9CJKMS9V0SGFWHPQY87"; var viewKycDoc = await api.Users.GetKycDocumentAsync(userId, kycDocId); string prettyPrint = JsonConvert.SerializeObject(viewKycDoc, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Cancel a Mandate PUT /v2.01/{ClientId}/mandates/{MandateId}/cancel **Warning – Call requires `Content-Length` adjustment** For this call to succeed, you need to define the header `Content-Length` to `0`. ### Path parameters The unique identifier of the mandate. ### Responses The scheme of the mandate, which is available once the mandate is submitted. The value can be one of the following:  * BACS – Covers payments in the UK, in GBP only. * SEPA – Covers payments in the EU. The unique identifier of the bank account. **Warning:** The Bank Account `Type` must be IBAN for the SEPA scheme and GB for the Bacs scheme. The banking reference for the Mandate. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL The language in which the mandate confirmation page is to be displayed. This value only applies to mandates with the SEPA `Scheme`. The URL at which the mandate document can be downloaded. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. The unique identifier of the object. The date and time at which the object was created. **Returned values:** `CREATED`, `SUBMITTED`, `ACTIVE`, `FAILED`, `EXPIRED` The status of the mandate: * `CREATED` – The mandate has been generated but not yet confirmed. * `SUBMITTED` – The mandate has been confirmed and sent to the user's bank, and can be used to request a direct debit pay-in. * `ACTIVE` – The mandate has been accepted by the user's bank or successfully used to process a direct debit direct pay-in. Further pay-ins can be requested. * `FAILED` – The mandate has been canceled or otherwise failed, and can no longer be used for payments. * `EXPIRED` – No payment has been made against the mandate in the last 24 months. It can no longer be used for payments. The unique identifier of the User (natural or legal) who owns the bank account. **Returned values:** `WEB` The execution type of the mandate. The type of the mandate. *Max. length: 255 characters* Custom data that you can add to this object. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. ```json 200 { "Scheme": "SEPA", "BankAccountId": "bankacc_m_01J999AWHFHW2PQ1ADNQ46AYE9", "BankReference": "QYDZMNP", "Culture": "EN", "DocumentURL": "https://api.sandbox.mangopay.com/webhook/eu/public/mandates/e8a73d/dfbdce2a12a442bfae973e56777b3ddb/document?version=2.01", "ReturnURL": "https://docs.mangopay.com/please-ignore?MandateId=mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "RedirectURL": "https://api.sandbox.mangopay.com/mvc/eu/public/mandates/e8a73d/dfbdce2a12a442bfae973e56777b3ddb/confirmation?version=2.01", "Id": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "CreationDate": 1727962392, "Status": "FAILED",, "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "ExecutionType": "WEB", "MandateType": "DIRECT_DEBIT", "Tag": "Created using the Mangopay API Postman collection", "ResultCode": "001806", "ResultMessage": "The client has cancelled the mandate" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $mandateId = '199255586'; $response = $api->Mandates->Cancel($mandateId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myMandate = { Id: '192790303', } const cancelMandate = async (mandateId) => { return await mangopay.Mandates.cancel(mandateId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } cancelMandate(myMandate.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def cancelMandate(mandateId) begin response = MangoPay::Mandate.cancel(mandateId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to cancel mandate: #{error.message}" puts "Error details: #{error.details}" return false end end myMandate = { Id:'194337135' } cancelMandate(myMandate[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Mandate; public class CancelMandate { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Mandate mandate = mangopay.getMandateApi().cancel("mdt_m_01J1YS0HTE11FVT07V5TCZEG4P"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(mandate); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Mandate mandate = Mandate.get('214061194') cancel_mandate = mandate.cancel() pprint(cancel_mandate) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var mandateId = "mdt_m_01J3D0WJZ5TNYX1HE7PVSCETF0"; var cancelMandate = await api.Mandates.CancelAsync(mandateId); string prettyPrint = JsonConvert.SerializeObject(cancelMandate, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Mandate POST /v2.01/{ClientId}/mandates/directdebit/web **Note – Mandate expires after 1 hour** If not confirmed within 1 hour of the `CreationDate`, the Mandate expires with the error 001807 and a new one must be created. ### Body parameters The unique identifier of the bank account. **Warning:** The Bank Account `Type` must be IBAN for the SEPA scheme and GB for the Bacs scheme. **Allowed values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL The language in which the mandate confirmation page is to be displayed. This value only applies to mandates with the SEPA `Scheme`. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 255 characters* Custom data that you can add to this object. ### Responses The scheme of the mandate, which is available once the mandate is submitted. The value can be one of the following:  * BACS – Covers payments in the UK, in GBP only. * SEPA – Covers payments in the EU. The unique identifier of the bank account. **Warning:** The Bank Account `Type` must be IBAN for the SEPA scheme and GB for the Bacs scheme. The banking reference for the Mandate. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL The language in which the mandate confirmation page is to be displayed. This value only applies to mandates with the SEPA `Scheme`. The URL at which the mandate document can be downloaded. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. The unique identifier of the object. The date and time at which the object was created. **Returned values:** `CREATED`, `SUBMITTED`, `ACTIVE`, `FAILED`, `EXPIRED` The status of the mandate: * `CREATED` – The mandate has been generated but not yet confirmed. * `SUBMITTED` – The mandate has been confirmed and sent to the user's bank, and can be used to request a direct debit pay-in. * `ACTIVE` – The mandate has been accepted by the user's bank or successfully used to process a direct debit direct pay-in. Further pay-ins can be requested. * `FAILED` – The mandate has been canceled or otherwise failed, and can no longer be used for payments. * `EXPIRED` – No payment has been made against the mandate in the last 24 months. It can no longer be used for payments. The unique identifier of the User (natural or legal) who owns the bank account. **Returned values:** `WEB` The execution type of the mandate. The type of the mandate. *Max. length: 255 characters* Custom data that you can add to this object. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "277c7c4e-baf1-43f8-ba1d-d9f02d7939e2", "Date": 1727958031.0, "errors": { "Culture": "The requested language is not supported for this bank account" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "9d45b954-4eda-4247-b4e3-91027628ab22", "Date": 1690294898.0, "errors": { "Culture": "The requested language is not supported" } } ``` ```json 200 { "Scheme": null, "BankAccountId": "bankacc_m_01J999AWHFHW2PQ1ADNQ46AYE9", "BankReference": null, "Culture": "EN", "DocumentURL": "https://api.sandbox.mangopay.com/webhook/eu/public/mandates/e8a73d/dfbdce2a12a442bfae973e56777b3ddb/document?version=2.01", "ReturnURL": "https://docs.mangopay.com/please-ignore?MandateId=mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "RedirectURL": "https://api.sandbox.mangopay.com/mvc/eu/public/mandates/e8a73d/dfbdce2a12a442bfae973e56777b3ddb/confirmation?version=2.01", "Id": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "CreationDate": 1727962392, "Status": "CREATED", "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "ExecutionType": "WEB", "MandateType": "DIRECT_DEBIT", "Tag": "Created using the Mangopay API Postman collection", "ResultCode": null, "ResultMessage": null } ``` ```json REST { "BankAccountId": "bankacc_m_01J999AWHFHW2PQ1ADNQ46AYE9", "Culture": "EN", "ReturnURL": "https://docs.mangopay.com/please-ignore", "Tag": "Created using the Mangopay API Postman collection" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $bankAccountId = '198982529'; $mandate = new \MangoPay\Mandate(); $mandate->BankAccountId = $bankAccountId; $mandate->Culture = 'EN'; $mandate->ReturnURL = 'https://mangopay.com/docs/please-ignore'; $mandate->Tag = 'Created using Mangopay PHP SDK'; $response = $api->Mandates->Create($mandate); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myMandate = { BankAccountId: '151467634', Culture: 'EN', ReturnUrl: 'https://mangopay.com/docs/please-ignore', } const createMandate = async (mandate) => { return await mangopay.Mandates.create(mandate) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createMandate(myMandate) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createMandate(mandateObject) begin response = MangoPay::Mandate.create(mandateObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create mandate: #{error.message}" puts "Error details: #{error.details}" return false end end myMandate = { BankAccountId:'151453487', Culture:'EN', ReturnURL:'https://mangopay.com/docs/please-ignore', Tag:'Created using Mangopay Ruby SDK' } createMandate(myMandate) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.CultureCode; import com.mangopay.entities.Mandate; public class CreateMandate { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Mandate mandate = new Mandate(); mandate.setBankAccountId("bankacc_m_01HW2YJFFGYMY4HHHQSZ9YBCQJ"); mandate.setReturnUrl("https://www.mangopay.com/docs/please-ignore"); mandate.setCulture(CultureCode.EN); mandate.setTag("Created using the Mangopay Java SDK"); Mandate createMandate = mangopay.getMandateApi().create(mandate); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createMandate); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Mandate bank_account_id = '214050174' mandate = Mandate( bank_account_id = bank_account_id, culture = 'EN', return_url = 'https://mangopay.com/docs/please-ignore', tag = 'Created using the Mangopay Python SDK' ) create_mandate = mandate.save() pprint(create_mandate) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var bankAccountId = "bankacc_m_01J3D0VAFPEAFA42S9A641M91Z"; var returnUrl = "https://www.mangopay.com/docs/please-ignore/"; var mandate = new MandatePostDTO(bankAccountId, CultureCode.EN, returnUrl); var createMandate = await api.Mandates.CreateAsync(mandate); string prettyPrint = JsonConvert.SerializeObject(createMandate, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List all Mandates GET /v2.01/{ClientId}/mandates ### Query parameters The date before which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. ### Path parameters The unique identifier of the mandate. ### Responses The list of mandates created by the platform. The mandate created by the platform. The unique identifier of the object. The date and time at which the object was created. **Returned values:** `CREATED`, `SUBMITTED`, `ACTIVE`, `FAILED`, `EXPIRED` The status of the mandate: * `CREATED` – The mandate has been generated but not yet confirmed. * `SUBMITTED` – The mandate has been confirmed and sent to the user's bank, and can be used to request a direct debit pay-in. * `ACTIVE` – The mandate has been accepted by the user's bank or successfully used to process a direct debit direct pay-in. Further pay-ins can be requested. * `FAILED` – The mandate has been canceled or otherwise failed, and can no longer be used for payments. * `EXPIRED` – No payment has been made against the mandate in the last 24 months. It can no longer be used for payments. The unique identifier of the User (natural or legal) who owns the bank account. **Returned values:** `WEB` The execution type of the mandate. *Max. length: 255 characters* Custom data that you can add to this object. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. ```json 200 [ { "Id": "mdt_m_01J98YZT8AJBGWX47AA077XMKZ", "CreationDate": 1663244376, "Status": "FAILED", "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "ExecutionType": "WEB", "MandateType": "DIRECT_DEBIT", "Tag": "Created using the Mangopay API Postman collection", "ResultCode": "001807", "ResultMessage": "User has let the mandate session expire without confirming" }, { "Id": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "CreationDate": 1669040333, "Status": "ACTIVE", "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "ExecutionType": "WEB", "MandateType": "DIRECT_DEBIT", "Tag": "Created using the Mangopay API Postman collection", "ResultCode": "000000", "ResultMessage": "Success" } ] ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) const listMandates = async () => { return await mangopay.Mandates.getAll() .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listMandates() ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listMandates() begin response = MangoPay::Mandate.fetch() puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Mandates: #{error.message}" puts "Error details: #{error.details}" return false end end listMandates() ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Mandate; import java.util.List; public class ListMandates { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); List mandates = mangopay.getMandateApi().getAll(null, null, null); for (Mandate mandate : mandates) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(mandate); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Mandate mandates = Mandate.all() for mandate in mandates: pprint(vars(mandate)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewMandate = await api.Mandates.GetAllAsync(new Pagination(1, 100)); string prettyPrint = JsonConvert.SerializeObject(viewMandate, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Mandates for a Bank Account GET /v2.01/{ClientId}/users/{UserId}/bankaccounts/{BankAccountId}/mandates ### Path parameters The unique identifier of the user. The unique identifier of the bank account.\ Warning: The corresponding Bank Account must belong to the BACS network (GB-type Bank Account) or SEPA network (IBAN-type Bank Account). ### Responses The list of mandates created by the platform. The mandate created by the platform. The unique identifier of the object. The date and time at which the object was created. **Returned values:** `CREATED`, `SUBMITTED`, `ACTIVE`, `FAILED`, `EXPIRED` The status of the mandate: * `CREATED` – The mandate has been generated but not yet confirmed. * `SUBMITTED` – The mandate has been confirmed and sent to the user's bank, and can be used to request a direct debit pay-in. * `ACTIVE` – The mandate has been accepted by the user's bank or successfully used to process a direct debit direct pay-in. Further pay-ins can be requested. * `FAILED` – The mandate has been canceled or otherwise failed, and can no longer be used for payments. * `EXPIRED` – No payment has been made against the mandate in the last 24 months. It can no longer be used for payments. The unique identifier of the User (natural or legal) who owns the bank account. **Returned values:** `WEB` The execution type of the mandate. *Max. length: 255 characters* Custom data that you can add to this object. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. ```json 200 [ { "Id": "mdt_m_01J98YZT8AJBGWX47AA077XMKZ", "CreationDate": 1663244376, "Status": "FAILED", "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "ExecutionType": "WEB", "MandateType": "DIRECT_DEBIT", "Tag": "Created using the Mangopay API Postman collection", "ResultCode": "001807", "ResultMessage": "User has let the mandate session expire without confirming" }, { "Id": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "CreationDate": 1669040333, "Status": "ACTIVE", "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "ExecutionType": "WEB", "MandateType": "DIRECT_DEBIT", "Tag": "Created using the Mangopay API Postman collection", "ResultCode": "000000", "ResultMessage": "Success" } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $bankAccountId = '151467634'; $response = $api->Users->GetMandates($bankAccountId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '151452401', } let bankAccount = { Id: '151467634', } const listBankAccountMandates = async (userId, bankAccountId) => { return await mangopay.Mandates.getMandatesForBankAccount( userId, bankAccountId ) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listBankAccountMandates(user.Id, bankAccount.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listMandatesBankAccount(userId, bankAccountId) begin response = MangoPay::Mandate.fetch_for_user_bank_account(userId, bankAccountId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Mandates: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id:'146476890' } myBankAccount = { Id: '194612216' } listMandatesBankAccount(myUser[:Id], myBankAccount[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Mandate; import java.util.List; public class ListBankAccountMandates { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var bankAccountId = "bankacc_m_01HW2YM8ZYJTVHJZENNXK33HYB"; List mandates = mangopay.getMandateApi().getForBankAccount(userId, bankAccountId, null, null, null); for (Mandate mandate : mandates) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(mandate); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import BankAccount natural_user_id = '213753890' bank_account_id = '214050174' bank_account = BankAccount.get(reference = bank_account_id, user_id = natural_user_id) mandates = bank_account.get_mandates() for mandate in mandates: pprint(vars(mandate)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var bankAccountId = "bankacc_m_01J3D0VAFPEAFA42S9A641M91Z"; var viewBankAccountMandates = await api.Mandates.GetForBankAccountAsync(userId, bankAccountId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(viewBankAccountMandates, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Mandates for a User GET /v2.01/{ClientId}/users/{UserId}/mandates ### Path parameters The unique identifier of the user. ### Responses The list of mandates created by the platform. The mandate created by the platform. The unique identifier of the object. The date and time at which the object was created. **Returned values:** `CREATED`, `SUBMITTED`, `ACTIVE`, `FAILED`, `EXPIRED` The status of the mandate: * `CREATED` – The mandate has been generated but not yet confirmed. * `SUBMITTED` – The mandate has been confirmed and sent to the user's bank, and can be used to request a direct debit pay-in. * `ACTIVE` – The mandate has been accepted by the user's bank or successfully used to process a direct debit direct pay-in. Further pay-ins can be requested. * `FAILED` – The mandate has been canceled or otherwise failed, and can no longer be used for payments. * `EXPIRED` – No payment has been made against the mandate in the last 24 months. It can no longer be used for payments. The unique identifier of the User (natural or legal) who owns the bank account. **Returned values:** `WEB` The execution type of the mandate. *Max. length: 255 characters* Custom data that you can add to this object. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. ```json 200 [ { "Id": "mdt_m_01J98YZT8AJBGWX47AA077XMKZ", "CreationDate": 1663244376, "Status": "FAILED", "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "ExecutionType": "WEB", "MandateType": "DIRECT_DEBIT", "Tag": "Created using the Mangopay API Postman collection", "ResultCode": "001807", "ResultMessage": "User has let the mandate session expire without confirming" }, { "Id": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "CreationDate": 1669040333, "Status": "ACTIVE", "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "ExecutionType": "WEB", "MandateType": "DIRECT_DEBIT", "Tag": "Created using the Mangopay API Postman collection", "ResultCode": "000000", "ResultMessage": "Success" } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890 '; $response = $api->Users->GetMandates($userId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '151452401', } const listUserMandates = async (userId) => { return await mangopay.Mandates.getMandatesForUser(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listUserMandates(user.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listMandatesUser(userId) begin response = MangoPay::Mandate.fetch_for_user(userId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Mandates: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id:'146476890' } listMandatesUser(myUser[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Mandate; import java.util.List; public class ListUserMandates { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; List mandates = mangopay.getMandateApi().getForUser(userId, null, null, null); for (Mandate mandate : mandates) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(mandate); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser natural_user = NaturalUser.get('210513027') mandates = natural_user.mandates.all() for mandate in mandates: pprint(vars(mandate)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var viewUserMandates = await api.Mandates.GetForUserAsync(userId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(viewUserMandates, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Mandate object ### Description Mangopay relies on the Mandate object to authorize direct debits to be collected from a use's bank account on behalf of platforms. The direct debit scheme of the Mandate is determined automatically by the `Type`of the Bank Account: `IBAN` for the SEPA scheme and `GB` for the Bacs scheme. Once created, the Mandate's `RedirectURL` hosts a form that the user must confirm to authorize payments. ### Attributes The scheme of the mandate, which is available once the mandate is submitted. The value can be one of the following:  * BACS – Covers payments in the UK, in GBP only. * SEPA – Covers payments in the EU. The unique identifier of the bank account.\ Warning: The corresponding Bank Account must belong to the BACS network (GB-type Bank Account) or SEPA network (IBAN-type Bank Account). The banking reference for the Mandate. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL The language in which the mandate confirmation page is to be displayed. This value only applies to mandates with the SEPA `Scheme`. The URL at which the mandate document can be downloaded. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. The unique identifier of the object. The date and time at which the object was created. **Returned values:** `CREATED`, `SUBMITTED`, `ACTIVE`, `FAILED`, `EXPIRED` The status of the mandate: * `CREATED` – The mandate has been generated but not yet confirmed. * `SUBMITTED` – The mandate has been confirmed and sent to the user's bank, and can be used to request a direct debit pay-in. * `ACTIVE` – The mandate has been accepted by the user's bank or successfully used to process a direct debit direct pay-in. Further pay-ins can be requested. * `FAILED` – The mandate has been canceled or otherwise failed, and can no longer be used for payments. * `EXPIRED` – No payment has been made against the mandate in the last 24 months. It can no longer be used for payments. The unique identifier of the User (natural or legal) who owns the bank account. **Returned values:** `WEB` The execution type of the mandate. *Max. length: 255 characters* Custom data that you can add to this object. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. ### Related resources Learn more about mandates and direct-debit How to process a SEPA Direct Debit payment # View a Mandate GET /v2.01/{ClientId}/mandates/{MandateId} ### Path parameters The unique identifier of the mandate. ### Responses The scheme of the mandate, which is available once the mandate is submitted. The value can be one of the following:  * BACS – Covers payments in the UK, in GBP only. * SEPA – Covers payments in the EU. The unique identifier of the bank account. **Warning:** The Bank Account `Type` must be IBAN for the SEPA scheme and GB for the Bacs scheme. The banking reference for the Mandate. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL The language in which the mandate confirmation page is to be displayed. This value only applies to mandates with the SEPA `Scheme`. The URL at which the mandate document can be downloaded. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. The unique identifier of the object. The date and time at which the object was created. **Returned values:** `CREATED`, `SUBMITTED`, `ACTIVE`, `FAILED`, `EXPIRED` The status of the mandate: * `CREATED` – The mandate has been generated but not yet confirmed. * `SUBMITTED` – The mandate has been confirmed and sent to the user's bank, and can be used to request a direct debit pay-in. * `ACTIVE` – The mandate has been accepted by the user's bank or successfully used to process a direct debit direct pay-in. Further pay-ins can be requested. * `FAILED` – The mandate has been canceled or otherwise failed, and can no longer be used for payments. * `EXPIRED` – No payment has been made against the mandate in the last 24 months. It can no longer be used for payments. The unique identifier of the user. **Returned values:** `WEB` The execution type of the mandate. The type of the mandate. *Max. length: 255 characters* Custom data that you can add to this object. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. ```json 200 { "Scheme": "SEPA", "BankAccountId": "bankacc_m_01J999AWHFHW2PQ1ADNQ46AYE9", "BankReference": "QYDZMNP", "Culture": "EN", "DocumentURL": "https://api.sandbox.mangopay.com/webhook/eu/public/mandates/e8a73d/dfbdce2a12a442bfae973e56777b3ddb/document?version=2.01", "ReturnURL": "https://docs.mangopay.com/please-ignore?MandateId=mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "RedirectURL": "https://api.sandbox.mangopay.com/mvc/eu/public/mandates/e8a73d/dfbdce2a12a442bfae973e56777b3ddb/confirmation?version=2.01", "Id": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ", "CreationDate": 1727962392, "Status": "SUBMITTED", "UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T", "ExecutionType": "WEB", "MandateType": "DIRECT_DEBIT", "Tag": "Created using the Mangopay API Postman collection", "ResultCode": null, "ResultMessage": null } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $mandateId = '194612261'; $response = $api->Mandates->Get($mandateId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myMandate = { Id: '169718609', } const getMandate = async (mandateId) => { return await mangopay.Mandates.get(mandateId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getMandate(myMandate.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewMandate(mandateId) begin response = MangoPay::Mandate.fetch(mandateId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch mandate: #{error.message}" puts "Error details: #{error.details}" return false end end myMandate = { Id:'194337135' } viewMandate(myMandate[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Mandate; public class ViewMandate { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Mandate mandate = mangopay.getMandateApi().get("mdt_m_01HW2Z09A391QW5EPWTSEKDWTR"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(mandate); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Mandate mandate_id = '214058486' try: view_mandate = Mandate.get(mandate_id) pprint(vars(view_mandate)) except Mandate.DoesNotExist: print('The Mandate {} does not exist.'.format(view_mandate.id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var mandateId = "mdt_m_01J3D1C35QZHHAT7XJ4WXTHRTJ"; var viewMandate = await api.Mandates.GetAsync(mandateId); string prettyPrint = JsonConvert.SerializeObject(viewMandate, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create an MB WAY PayIn POST /v2.01/{ClientId}/payins/payment-methods/mbway **Note – Timeout after 4 minutes** The payment session lasts for 4 minutes, at which point the pay-in fails automatically if no action has been taken by the user. **Caution – No phone number validation** If the phone number provided is of an accepted format but not valid or not attributed to the corresponding MB WAY user, then the pay-in is created but will fail because the user will not receive a push notification from the MB WAY app. ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. *Format: Country code without plus symbol, followed by hash symbol (#), followed by the number; only numeric characters and hash symbol* The phone number of the end user to which the MB WAY push notification is sent to authenticate the transaction. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `MBWAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. *Format: Country code without plus symbol, followed by hash symbol (#), followed by the number; only numeric characters and hash symbol* The phone number of the end user to which the MB WAY push notification is sent to authenticate the transaction. ```json { "message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "id": "401918a7-aab9-4b55-b09d-45007b96523d", "date": 1696931925, "type": "param_error", "errors": { "phone": "The field must match the regular expression '^\\d{1,5}#\\d{4,11}$'." } } ``` ```json 200 - Created { "Id": "wt_9fb9e538-7a0b-417e-af6e-196d2a7ffb5b", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1696930998, "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 5000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 5000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204089031", "CreditedUserId": "204068024", "PaymentType": "MBWAY", "ExecutionType": "WEB", "StatementDescriptor": "Mangopay", "Phone": "33#652317567" } ``` ```json REST { "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 5000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "CreditedWalletId": "204089031", "StatementDescriptor": "Mangopay", "Tag": "Created using the Mangopay API Postman collection", "Phone": "33#652317567" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInPaymentDetailsMbway; public class CreateMBWayPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; PayIn mbWayPayin = new PayIn(); mbWayPayin.setPaymentType(PayInPaymentType.MBWAY); mbWayPayin.setExecutionType(PayInExecutionType.WEB); mbWayPayin.setAuthorId(userId); mbWayPayin.setCreditedWalletId(walletId); mbWayPayin.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); mbWayPayin.setFees(new Money(CurrencyIso.EUR, 0)); mbWayPayin.setTag("Created using the Mangopay Java SDK"); PayInPaymentDetailsMbway paymentDetails = new PayInPaymentDetailsMbway(); paymentDetails.setStatementDescriptor("Jul2024"); paymentDetails.setPhone("33#652317567"); mbWayPayin.setPaymentDetails(paymentDetails); PayIn createMbWayPayin = mangopay.getPayInApi().create(mbWayPayin); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createMbWayPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, MbwayPayIn from mangopay.utils import Money natural_user = NaturalUser.get('210513027') mbway_payin = MbwayPayIn( author_id = natural_user.id, credited_wallet_id = '210514820', debited_funds = Money(amount=5000, currency='EUR'), fees = Money(amount=0, currency='EUR'), return_url = 'https://www.mangopay.com/docs/please-ignore', statement_descriptor = 'MGP', tag = 'Created using Mangopay Python SDK', phone = '33#654417453' ) create_mbway_payin = mbway_payin.save() pprint(create_mbway_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var payIn = new PayInMbwayWebPostDTO(userId, new Money { Amount = 3000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, "351#269458236", "MGP", "Created using the Mangopay .NET SDK"); var createMbWayPayIn = await api.PayIns.CreateMbwayWebAsync(payIn); string prettyPrint = JsonConvert.SerializeObject(createMbWayPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The MB WAY PayIn object ### Description The MB WAY PayIn object allows platforms to process payments made with the MB WAY payment method. **Note – Prerequisites for using MB WAY** MB WAY requires activation. To activate MB WAY for your platform, contact Mangopay via the Dashboard. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `MBWAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. *Format: Country code without plus symbol, followed by hash symbol (#), followed by the number; only numeric characters and hash symbol* The phone number of the end user to which the MB WAY push notification is sent to authenticate the transaction. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about MB WAY # View a PayIn (MB WAY) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `MBWAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. *Format: Country code without plus symbol, followed by hash symbol (#), followed by the number; only numeric characters and hash symbol* The phone number of the end user to which the MB WAY push notification is sent to authenticate the transaction. ```json 200 - Succeeded { "Id": "wt_9fb9e538-7a0b-417e-af6e-196d2a7ffb5b", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1696930998, "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 5000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 5000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1696931187, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204089031", "CreditedUserId": "204068024", "PaymentType": "MBWAY", "ExecutionType": "WEB", "StatementDescriptor": "Mangopay", "Phone": "33#652317452" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetMbwayAsync("wt_731255c1-ebab-431e-94e5-d865e4943125"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create an Multibanco PayIn POST /v2.01/{ClientId}/payins/payment-methods/multibanco **Note – Timeout after 7 days** The payment session lasts for 7 days, at which point the pay-in fails automatically if no action has been taken by the user. ### Body parameters The unique identifier of the user at the source of the transaction. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. *Max. length: 255 characters* The URL to which the user is automatically returned after indicating that they have noted their Multibanco payment reference. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `MULTIBANCO` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is automatically returned after indicating that they have noted their Multibanco payment reference. The URL to which to redirect the user to obtain their Multibanco payment reference. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ```json 200 - Created { "Id": "wt_6a417de9-5f14-4fed-a8f5-abd7faab21a1", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1696942514, "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204089031", "CreditedUserId": "204068024", "PaymentType": "MULTIBANCO", "ExecutionType": "WEB", "ReturnURL": "http://www.mangopay.com/docs/please-ignore?transactionId=wt_6a417de9-5f14-4fed-a8f5-abd7faab21a1", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=2137942516&rs=gsc5nItfY1gGGgcNnp1DsiioN90OC23j&cs=198796349738e9ee004aa2e45f3a0e3ee1b49f83927253c15080e8ac1120c207", "StatementDescriptor": "Mangopay" } ``` ```json REST { "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "CreditedWalletId": "204089031", "ReturnURL": "http://www.mangopay.com/docs/please-ignore", "Tag": "Created using the Mangopay API Postman collection", "StatementDescriptor": "Mangopay" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInExecutionDetailsWeb; import com.mangopay.entities.subentities.PayInPaymentDetailsMultibanco; public class CreateMultibancoPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; PayIn multibancoPayin = new PayIn(); multibancoPayin.setPaymentType(PayInPaymentType.MULTIBANCO); multibancoPayin.setExecutionType(PayInExecutionType.WEB); multibancoPayin.setAuthorId(userId); multibancoPayin.setCreditedWalletId(walletId); multibancoPayin.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); multibancoPayin.setFees(new Money(CurrencyIso.EUR, 0)); multibancoPayin.setTag("Created using the Mangopay Java SDK"); PayInPaymentDetailsMultibanco paymentDetails = new PayInPaymentDetailsMultibanco(); paymentDetails.setStatementDescriptor("Jul2024"); multibancoPayin.setPaymentDetails(paymentDetails); PayInExecutionDetailsWeb executionDetails = new PayInExecutionDetailsWeb(); executionDetails.setReturnUrl("https://www.mangopay.com/docs/please-ignore"); multibancoPayin.setExecutionDetails(executionDetails); PayIn createMultibancoPayin = mangopay.getPayInApi().create(multibancoPayin); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createMultibancoPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Money, MultibancoPayIn natural_user = NaturalUser.get('210513027') multibanco_payin = MultibancoPayIn( author_id = natural_user.id, credited_wallet_id = '210514820', debited_funds = Money(amount=1000, currency='EUR'), fees = Money(amount=0, currency='EUR'), return_url = 'https://www.mangopay.com/docs/please-ignore', statement_descriptor = 'MGP', tag = 'Created using Mangopay Python SDK' ) create_multibanco_payin = multibanco_payin.save() pprint(create_multibanco_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var returnUrl = "https://www.mangopay.com/docs/please-ignore/"; var payIn = new PayInMultibancoWebPostDTO(userId, new Money { Amount = 100, Currency = CurrencyIso.EUR }, new Money { Amount = 20, Currency = CurrencyIso.EUR }, walletId, returnUrl, "Created using the Mangopay .NET SDK", "MGP"); var createMultibancoPayIn = await api.PayIns.CreateMultibancoWebAsync(payIn); string prettyPrint = JsonConvert.SerializeObject(createMultibancoPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Multibanco PayIn object ### Description The Multibanco PayIn object allows platforms to process payments made with the Multibanco payment method. **Note – Prerequisites for using Multibanco** Multibanco requires activation. To activate Multibanco for your platform, contact Mangopay via the Dashboard. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `MULTIBANCO` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is automatically returned after indicating that they have noted their Multibanco payment reference. The URL to which to redirect the user to obtain their Multibanco payment reference. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about Multibanco # View a PayIn (Multibanco) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `MULTIBANCO` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is automatically returned after indicating that they have noted their Multibanco payment reference. The URL to which to redirect the user to obtain their Multibanco payment reference. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ```json 200 - Succeeded { "Id": "wt_6a417de9-5f14-4fed-a8f5-abd7faab21a1", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1696942514, "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1696942536, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204089031", "CreditedUserId": "204068024", "PaymentType": "MULTIBANCO", "ExecutionType": "WEB", "ReturnURL": "http://www.mangopay.com/docs/please-ignore?transactionId=wt_6a417de9-5f14-4fed-a8f5-abd7faab21a1", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=2137942516&rs=gsc5nItfY1gGGgcNnp1DsiioN90OC23j&cs=198796349738e9ee004aa2e45f3a0e3ee1b49f83927253c15080e8ac1120c207", "StatementDescriptor": "Mangopay" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetMultibancoAsync("wt_b17e7b79-d0ab-43cf-9885-8da6d03ff61f"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Authentication ## Introduction The Mangopay REST API uses the OAuth 2.0 authentication protocol to provide secure access to resources.  **Note – SDKs handle authentication automatically** For SDKs, the authentication is handled automatically after the initialization, relying on the OAuth 2.0 protocol. See the SDK authentication section for more details. **Caution – API security practices** * HTTPS is mandatory for production environments * You must call the API from your server. Calling the API from the browser is a security risk and is not supported by Mangopay. ## OAuth 2.0 authentication The OAuth 2.0 method of authentication consists in generating a temporary authentication token, called a Bearer token. This can then be used as tokenized credentials until it expires, at which point a new token must be generated. The logic is as follows: * Generate a Bearer token * Use the Bearer token until it expires * Generate a new one before expiry Since you only send your API key to generate the token, this industry-standard method ensures a high level of security. You need a `ClientId` and an API key – you can create these in the Mangopay Dashboard (or else contact Sales to get started). ### 1. Generate a Bearer token To generate your authentication token, call the endpoint below using Basic Access authentication as follows: #### A. Combine your `ClientId` and API key into a string separated by a colon > `ClientId`:`ApiKey` #### B. Encode the string in Base64 Once encoded, the string looks something like this: > RXhhbXBsZUNsaWVudElkOlBFQkIwVkRoRkVOZkVoWFRVeW9yVFlqNmhDVm1xTDBIUmJ3WTRnNU4xN3J1aVBqbVFu #### C. Call the OAuth token endpoint Use the encoded string, preceded by “Basic” and a space, as your Authorization header. Unlike most other calls to the API, this endpoint supports Basic Access authentication and accepts the `x-www-form-urlencoded` Content-Type.
Endpoint POST `/v2.01/oauth/token`
Authorization Basic RXhhbXBsZU...J1aVBqbVFu
Content-Type application/x-www-form-urlencoded
Request body grant\_type=client\_credentials
```json API response { "access_token": "094696b3724d4aa5a182eac360dcd537", "token_type": "bearer", "expires_in": 1199 } ```
Property Description
`access_token` The access token to use to authenticate.
`token_type` The type of token: Bearer.
`expires_in` The number of seconds until the `access_token` expires and a new token will need to be generated. **Default values:** 3600 (in Production), 1200 (in Sandbox) **Note:** The value may differ from the default values, therefore you should not rely on hard-coded defaults but on the `expires_in` value returned.
### 2. Use your Bearer token until it expires Now that you have your Bearer `access_token`, you can use it to access Mangopay API resources until it expires. Use the token, preceded by “Bearer” and a space, as the Authorization header in your requests:
**Authorization** Bearer 094696b3724d4aa5a182eac360dcd537
### 3. Generate a new token before expiry Before your token expires, generate a new one with the OAuth token endpoint as described above.  **Best practice – Only generate new tokens when the last one expires** There is no need to generate a different token for every call you make – only before the previous one expires. Once the token expires (that is, the `expires_in` seconds value elapses), then it is no longer valid and calls made with it will return the following HTTP 401 error:  ```json 401 - Authorization credentials not valid { "Message": "The authorization credentials are not valid", "Type": "invalid_credentials", "Id": "9e1f5654-2957-408b-a198-e921ca6830b7", "Date": 1700772361.0, "errors": null } ``` If your authentication is misconfigured and causes repeated access attempts with invalid credentials, it may result in a temporary blockage on your IP address: ```json 400 - Account temporarily blocked { "error": "unauthorized_client", "error_description": "This account has been temporarily locked for security reasons. Please try again later." } ``` ## SDK authentication With our official SDKs, you don’t have to worry about the logic behind the authentication to Mangopay: you just need to set your credentials after the SDK initialization. The authentication is then handled automatically, relying on OAuth 2.0 to provide a secure connection to Mangopay. Please find below examples of how to set your credentials after the SDK initialization to authenticate: ```php $api = new MangoPay\MangoPayApi(); $api->Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-client-api-key; ``` ```nodejs const mangopay = require('mangopay2-nodejs-sdk'); let mangopayApi = new mangopay({ clientId: 'your_client_id', clientApiKey: 'your_client_api_key', baseUrl: 'https://api.sandbox.mangopay.com' }); ``` ```ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end ``` ```java import com.mangopay.MangoPayApi; MangoPayApi api = new MangoPayApi(); api.getConfig().setClientId("your-client-id"); api.getConfig().setClientPassword("your-api-key"); ``` ```.net MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-client-api-key"; api.Config.BaseUrl = "https://api.sandbox.mangopay.com"; ``` # Data availability periods ## Transactions The Mangopay API retains live transaction data for 13 months. This means that any transaction object can be retrieved via the API for 13 months after its `CreationDate`. This limitation applies:  * To transactions of every `Type` (`PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT`) and `Nature` (`REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT`)  * On all relevant GET endpoints, both to retrieve by Object ID (e.g. GET View a Payout) and to list transactions (e.g. GET List Transactions for a User) * In both the Production and Sandbox environments Past the 13-month period, transaction data is archived. Once archived: * A GET call on the archived Transaction ID (e.g. GET View a PayIn, GET View a Refund, etc.) returns 404 Not Found * A GET call to list transactions call (e.g. for a User) doesn’t return the archived transaction For example, here is a 404 response on GET View a PayIn: ```json Example - 404 Not Found { "Message": "The ressource does not exist", "Type": "ressource_not_found", "Id": "5ca01f7f-99f4-4ba4-82a1-3af3b702f727#1718224387", "Date": 1718224388, "errors": { "RessourceNotFound": "Cannot found the ressource PayIn with the id=158250465 " } } ``` This limitation does not apply to resources that enable a user to make payments, such as Cards, Recurring PayIn Registrations, Bank Accounts, and Mandates. However, Preauthorizations and Deposit Preauthorizations, given their limited validity and use, are also limited to 13 months. Limiting the duration of data retention is essential to maintain performance. The retention period is sufficient for operational usage (such as refunds, fraud investigations, and user experience) and most auditing purposes. All data is archived securely and provisions are in place to ensure we address any legal or business requirements that may arise. ## Reports The POST Create a Transactions Report endpoint can be used to create a report containing transactions whose `CreationDate` is up to 36 months in the past. To do so, use the `AfterDate` child parameter of the `Filters` parameter. For more information about generating reports, see the Reports article. ## Events GET List all Events returns events up to 45 days after the `Date` they occur. ## API responses If an API call contains an idempotency key, it can be retrieved up to 24 hours after the `Date` it was sent, using the GET View an API Response endpoint. # Data formats The Mangopay API follows the standards below regarding the data formats it returns and accepts. 
**Dates** Dates and times are returned as **timestamps**, which are integers representing the number of seconds since the Unix Epoch (January 1, 1970, 00:00:00 UTC).
**Object IDs** The unique identifier returned for an object (its `Id`) is a **string** and should be handled as such. The maximum length that will be returned is **128 characters**. Several variants exist for the value of this string. The most recently adopted variant is a ULID (universally unique lexicographically sortable identifier) with one or more prefixes separated by an underscore: * `cvr_01HN0FR5371TCNEF305P97D8Q9` * `user_m_01J82SPSKW53XZM936PDVN76W0` * `po_b_02HMVJH4ZJWX9E5K66KTN9H118` Other variants are also in use depending on the API feature and when the object was created: * `cardreg_wt_287afe02-498a-4076-b022-42e8997a172f` – prefixed UUID (universally unique identifier, also called a globally unique identifier or GUID) * `2774fac1-d33f-4c5a-8e21-88b772ec2943` – UUID without prefix * `card_m_vHrtUIVelDzkPmdL`– prefixed alphanumeric string * `4659626451` – string containing only digits
**Amounts** All monetary amounts are integers of the currency’s **minor unit** (the smallest sub-division). So for example: * EUR 12.60 is represented as `1260` * JPY 12 is represented as `12`
**Currencies** Currency codes follow the three-letter ISO 4217 format. The full list of possible supported values across all API features is: `AED`, `AUD`, `CAD`, `CHF`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `JPY`, `NOK`, `PLN`, `SEK`, `USD`, `ZAR`. The available currencies vary across payment methods, cards, wallets, and payouts, and according to your contract. For more information, see the Currencies article.
**Countries** Country codes follow the ISO 3166-1 alpha-2 format (two letters, e.g. US, GB, FR). The three-letter format is used exceptionally. Accepted values are the following: AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW.
**Languages** Language codes follow the ISO 639-1 alpha-2 format (two letters, e.g. EN, FR).
# Filtering and sorting Some of Mangopay’s endpoints support filtering and sorting features based on a given object’s parameters. This can prove useful to look for specific information and to improve performance. You can use query parameters to define the values by which to filter or sort information returned by the API. **Filtering query string example:** > …/users/154876/transactions?Status=Succeeded\&Status=Failed\&Type=Payin\&Type=Payout **Sorting query string example:** > …/users?Sort=CreationDate:ASC # Idempotency ## Introduction The Mangopay API supports idempotency for all POST calls, which means that a request can be retried several times without performing the same operation. This avoids unwanted duplicated calls that can have detrimental consequences, for example in case of a network error. You can make calls idempotent by including the `Idempotency-Key` header in your request. The unique value that you generate for each idempotency key allows Mangopay to recognize subsequent retries of the same request. The idempotency key must contain between 16 and 36 alphanumeric characters or dashes (-). **Best practice – Use GUID** We strongly recommend generating a globally unique identifier (GUID) as your idempotency key. Using an idempotency key is optional; the API will function normally without it. **Note – Idempotency key required for some features** The idempotency key is required to accept two subsequent pay-ins of the same amount within 24 hours if they rely on the same preauthorization (including for multi-capture). ## Benefits By using an idempotency key, you’ll be able to avoid duplicated calls and retrieve missed API responses. ### Blocking duplicated calls If you use the same idempotency key within 24 hours Mangopay will block all but the first request. This means you are able to rerun the same request knowing that it is only going to be processed once. When an idempotent request is blocked, the 409 HTTP response code is returned. ```json 409 response example { "Message": "A resource has already been created with this Idempotency Key", "Type": "idempotent_creation_conflict", "Id": "bf6cce22-4c12-454f-ac05-ca20c8683735#1452723935", "Date": 1452723944, "errors": null } ``` Idempotent requests are blocked regardless of the HTTP response code of the first API call. This means you can't re-use an idempotency key that was used on a failed call. ### Retrieving missed API responses In the event of a timeout or a loss of connection, the idempotency key can be used to retrieve the missed API responses using the GET View an API Response endpoint. **Caution – Limited to within 24 hours** This only works within 24 hours after the initial use of the idempotency key. # Introduction The Mangopay API is based on REST principles, providing a simple and secure way to process payment flows. To work with our API, you can: * Use the HTTP/REST endpoints * Take advantage of our SDKs * Make use of our official integrations ## Environments Mangopay provides two environments:
Production Sandbox
https://api.mangopay.com https://api.sandbox.mangopay.com
The Mangopay API accepts and returns:
**Content-Type** application/json
**Encoding** UTF-8 JSON
**Note – Endpoints requiring a different Content-Type** There are two endpoints that require the **application/x-www-form-urlencoded** Content-Type: * The OAuth token endpoint – see OAuth 2.0 authentication * The Tokenize the card endpoint, which is a URL returned by the API ## UK platforms Platforms that have contracted with Mangopay’s UK entity must include the following header in all requests in Production:
Key Value
x-tenant-id uk
There is no equivalent for platforms contracting with other Mangopay entities. If you’re using an SDK, you need to change the configuration during initialization by setting the UK header flag value to true. ```php PHP Config->ClientId = 'your-mangopay-client-id'; $api->Config->ClientPassword = 'your-mangopay-api-key'; $api->Config->TemporaryFolder = 'tmp/'; $api->Config->UKHeaderFlag = true; ``` ```javascript NodeJS const mangopay = require('mangopay2-nodejs-sdk'); const paymentApi = new mangopay({ clientId: 'your-mangopay-client-id', clientApiKey: 'your-mangopay-api-key', baseUrl: 'https://api.sandbox.mangopay.com', ukHeaderFlag: true }); ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |c| c.preproduction = true c.client_id = 'your-mangopay-client-id' c.client_apiKey = 'your-mangopay-api-key' c.http_timeout = 30000 c.Http_open_timeout = 60000 c.Log_file = File.join('mypath', 'mangopay.log') c.uk_header_flag = true end ``` ```java Java import com.mangopay.MangoPayApi; public class Main { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-mangopay-client-id"); mangopay.getConfig().setClientPassword("your-mangopay-api-key"); mangoapy.getConfig().setUkHeaderFlag(true); } } ``` ```python Python import mangopay mangopay.client_id='your-mangopay-client-id' mangopay.apikey='your-mangopay-api-key' mangopay.uk_header_flag= True from mangopay.api import APIRequest handler = APIRequest(sandbox=True) ``` ```csharp .Net using MangoPay.SDK; using MangoPay.SDK.Entities; using System.Reflection; class Program { static void Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-mangopay-client-id"; api.Config.ClientPassword = "your-mangopay-api-key"; api.Config.UKHeaderFlag = true; } } ``` # Pagination Pagination is supported for all the lists returned by the Mangopay API. Pagination consists in breaking down returned results in pages, hence improving the performance when a lot of information is returned. ## Pagination query parameters The following associations of query parameters and values are used to define the pagination:
Parameter Values
`page` Indicates the index of the page. Start value: 1 Default value: 1
`per_page` Indicates the number of items returned in each page. Maximum value: 100 Default value: 10
Pagination query example: `users/154876/bank-details?page=2&per_page=10` ## Pagination header information The following pagination-related information is always available in the response header: * `x-number-of-pages` indicates the total number of pages the entire list has been divided into. * `x-number-of-items` indicates the total number of items in the entire list. * `link` provides links to easily navigate in the pagination (to the first, previous, next, and last pages). **Returned link examples:**
Link to Example
First page \://api.mangopay.com/v2/`ClientId`/users/`UserId`/bank-details?page=1\&per\_page=10>; rel="first"
Previous page \://api.mangopay.com/v2/`ClientId`/users/`UserId`/bank-details?page=1\&per\_page=10>; rel="prev"
Next page \://api.mangopay.com/v2/`ClientId`/users/`UserId`/bank-details?page=1\&per\_page=10>; rel="next"
Last page \://api.mangopay.com/v2/`ClientId`/users/`UserId`/bank-details?page=1\&per\_page=10>; rel="last"
# Rate limiting Rate limiting is the controlling of requests received and processed in a given time period. The Mangopay API relies on rate limiting to ensure stable and reliable behavior for all clients, in both the Production and Sandbox environments. ## Limits per time period Rate limits apply to all endpoints. The maximum number of calls allowed in a given period is as follows:
Time period Maximum number of API calls allowed
15 minutes 2,300
30 minutes 4,500
1 hour 8,800
24 hours 105,600
If you exceed the rate limits, you receive a 429 HTTP response code with the following response body: ```json Rate limit reached – Response example { "Message": "Rate limit exceeded. Please contact support for more assistance", "Type": "rate_limit", "Id": *, "Date": *, "errors": null } ``` **Note** If you frequently encounter issues related to rate limiting, please contact the Support team via the Dashboard to make sure your integration is appropriate, or to increase your rate limits. ## Response header information The response header of all API calls provides useful information regarding the rate limit: * `x-ratelimit` indicates the number of API calls you have made. * `x-ratelimit-remaining` indicates the number of API calls you have left before reaching the limit. * `x-ratelimit-reset` indicates how long you have to wait until reset (in timestamp format). In the header, the returned values represent rate limits for intervals of 15 minutes, 30 minutes, 1 hour, and 24 hours, respectively. For example: * X-RateLimit: 63015, 121914, 228534, 7103921. * X-RateLimit-Remaining: 436985, 878086, 1771466, 40896079. * X-RateLimit-Reset: 1715241060, 1715241960, 1715243760, 1715326500 The header information can prove particularly useful if you plan on making a lot of API requests in a short period of time (such as batch payouts or transfers for instance).  The rate limit information can allow you to: * Automatically stop sending requests once the limit has been reached and then start making requests again at the `x-ratelimit-reset` time * Automatically set pauses in between calls to ensure you don’t go over the limit ## API implementation best practices An implementation can be optimized to avoid reaching the rate limits. The following oversights commonly increase the risk of exceeding the rate limit: * Failed requests being indefinitely retried * Systematic GET requests without the platform storing or caching the corresponding information * GET requests made daily while they could be made at a larger interval (weekly, monthly) * Requests triggered on a fixed interval while they could be triggered after the corresponding POST request has been made instead ## Leaky bucket algorithm The API rate limiting relies on what’s known as a leaky bucket algorithm. The bucket collects requests up to a maximum capacity and processes them at a set rate. Once the maximum capacity is reached, additional requests are discarded. This algorithm makes it possible to store up bursts of requests while processing them at a steady rate. In addition, the bucket allowance slides for each window rather than being reset at a specific interval in the hour. For example, with a 15-minute bucket, if you reach the limit of 10 calls, you’ll need to wait 15 minutes to release those 10 calls from your allowance (as opposed to waiting until 15 minutes past the hour). # Create a Payconiq PayIn POST /v2.01/{ClientId}/payins/payment-methods/payconiq **Note – Timeout after 1 hour** The Payconiq payment session lasts for 1 hour, at which point the pay-in fails automatically if no action has been taken by the user. ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. **Allowed values:** BE, LU The country of residence of the user. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `PAYCONIQ` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment on a hosted page showing the QR code and Payconiq by Bancontact branding and instructions. **Note:** In Sandbox, this value redirects to Mangopay’s web-based simulator. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** BE, LU The country of residence of the user. The mobile URL to which to redirect the user to complete the payment in an app-to-app flow. **Note:** In Sandbox, this value is a placeholder: the `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. The URL of a page containing only the QR code which you can use in your payment experience. You can lightly customize the QR code’s format, size, and color by adding query parameters to the `QRCodeURL` before redirecting the user. See the Payconiq guide for details. **Note:** In Sandbox, this value is a placeholder. The `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. ```json 200 - Created { "Id": "wt_706087f1-d1df-48a9-9d15-e8c603457d64", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1720095972, "AuthorId": "user_m_01J18HZSACR1EMYNY1TBS8KTJD", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01J18J1SQGG6KXNM3F8GD674TP", "CreditedUserId": "user_m_01J18HZSACR1EMYNY1TBS8KTJD", "PaymentType": "PAYCONIQ", "ExecutionType": "WEB", "ReturnURL": "https://mangopay.com/docs/please-ignore?transactionId=wt_706087f1-d1df-48a9-9d15-e8c603457d64", "RedirectURL": "https://r2.girogate.de/payconiq/T1146/I?tx=1207176177&rs=8OHbVocjQQa4OIcB4o31BgQBw7c45bXK&cs=76745cafd862d134ce7be068a029c71368ff5e22339379d72780845cee02a10f", "StatementDescriptor": "Example123", "Country": "BE", "DeepLinkURL": "https://PAYCONIQ.COM/PAY/2/F8B4348C390A925F00D0682C?returnUrl=https%3A%2F%2Fr2.giro[…]436a10f4077908aa014795ba528a622315b2bada9f1ddc33e097c2fe5d9f5b", "QRCodeURL": "https://portal.payconiq.com/qrcode?c=https%3A%2F%2Fpayconiq.com%2Fpay%2F2%2Ff8b4348c390a925f00d0682c" } ``` ```json REST { "AuthorId": "user_m_01J18HZSACR1EMYNY1TBS8KTJD", "CreditedWalletId": "wlt_m_01J18J1SQGG6KXNM3F8GD674TP", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Country": "BE", "StatementDescriptor": "Example123", "Tag": "Created using the Mangopay API Postman collection", "ReturnURL": "https://mangopay.com/docs/please-ignore" } ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var payIn = new PayInPayconiqPostDTO { AuthorId = userId, CreditedWalletId = walletId, DebitedFunds = new Money { Amount = 2000, Currency = CurrencyIso.EUR }, Fees = new Money { Amount = 50, Currency = CurrencyIso.EUR }, Country = "BE", ReturnURL = "http://www.mangopay.com/docs/please-ignore/", Tag = "Created using the Mangopay .NET SDK" }; var createPayconiqPayIn = await api.PayIns.CreatePayconiqAsync(payIn); string prettyPrint = JsonConvert.SerializeObject(createPayconiqPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Payconiq PayIn object ### Description The Payconiq PayIn object allows platforms to process payments made with their Payconiq mobile app, or via banking apps that support Payconiq. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `PAYCONIQ` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment on a hosted page showing the QR code and Payconiq by Bancontact branding and instructions. **Note:** In Sandbox, this value redirects to Mangopay’s web-based simulator. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Allowed values:** BE, LU The country of residence of the user. The mobile URL to which to redirect the user to complete the payment in an app-to-app flow. **Note:** In Sandbox, this value is a placeholder: the `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. The URL of a page containing only the QR code which you can use in your payment experience. You can lightly customize the QR code’s format, size, and color by adding query parameters to the `QRCodeURL` before redirecting the user. See the Payconiq guide for details. **Note:** In Sandbox, this value is a placeholder. The `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. ### Related resources Learn more about Payconiq Learn about testing Payconiq # View a PayIn (Payconiq) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `PAYCONIQ` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment on a hosted page showing the QR code and Payconiq by Bancontact branding and instructions. **Note:** In Sandbox, this value redirects to Mangopay’s web-based simulator. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** BE, LU The country of residence of the user. The mobile URL to which to redirect the user to complete the payment in an app-to-app flow. **Note:** In Sandbox, this value is a placeholder: the `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. The URL of a page containing only the QR code which you can use in your payment experience. You can lightly customize the QR code’s format, size, and color by adding query parameters to the `QRCodeURL` before redirecting the user. See the Payconiq guide for details. **Note:** In Sandbox, this value is a placeholder. The `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. ```json 200 - Succeeded { "Id": "wt_706087f1-d1df-48a9-9d15-e8c603457d64", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1720095972, "AuthorId": "user_m_01J18HZSACR1EMYNY1TBS8KTJD", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1720096077, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01J18J1SQGG6KXNM3F8GD674TP", "CreditedUserId": "user_m_01J18HZSACR1EMYNY1TBS8KTJD", "PaymentType": "PAYCONIQ", "ExecutionType": "WEB", "ReturnURL": "https://mangopay.com/docs/please-ignore?transactionId=wt_706087f1-d1df-48a9-9d15-e8c603457d64", "RedirectURL": "https://r2.girogate.de/payconiq/T1146/I?tx=1207176177&rs=8OHbVocjQQa4OIcB4o31BgQBw7c45bXK&cs=76745cafd862d134ce7be068a029c71368ff5e22339379d72780845cee02a10f", "StatementDescriptor": "Example123", "Country": "BE", "DeepLinkURL": "https://PAYCONIQ.COM/PAY/2/F8B4348C390A925F00D0682C?returnUrl=https%3A%2F%2Fr2.giro[…]436a10f4077908aa014795ba528a622315b2bada9f1ddc33e097c2fe5d9f5b", "QRCodeURL": "https://portal.payconiq.com/qrcode?c=https%3A%2F%2Fpayconiq.com%2Fpay%2F2%2Ff8b4348c390a925f00d0682c" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetMultibancoAsync("wt_b17e7b79-d0ab-43cf-9885-8da6d03ff61f"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Look up metadata for a payment method POST /v2.01/{ClientId}/payment-methods/metadata ### Body parameters **Allowed values:** `BIN`, `GOOGLE_PAY` The type of metadata. *6 or 8 digits* Required if the `Type` is `BIN`. The bank identification number (BIN). Required if the `Type` is `GOOGLE_PAY`. The tokenized payment data provided by the third-party payment method. ### Responses The type of metadata. *6 or 8 digits* The bank identification number (BIN). *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. The name of the card issuer. *object* Additional data about the card based on the BIN. In the case of co-branded card products, two objects are returned. **Returned values:** `CREDIT`, `DEBIT`, `CHARGE CARD` The type of the card. **Returned values:** `PERSONAL`, `COMMERCIAL` Whether the card is held in a personal or commercial capacity. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The type of metadata. *6 or 8 digits* The bank identification number (BIN). *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. The name of the card issuer. *object* Additional data about the card based on the BIN. In the case of co-branded card products, two objects are returned. **Returned values:** `CREDIT`, `DEBIT`, `CHARGE CARD` The type of the card. **Returned values:** `PERSONAL`, `COMMERCIAL` Whether the card is held in a personal or commercial capacity. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The type of metadata. *6 or 8 digits* The bank identification number (BIN). *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. The name of the card issuer. *object* Additional data about the card based on the BIN. In the case of co-branded card products, two objects are returned. **Returned values:** `CREDIT`, `DEBIT`, `CHARGE CARD` The type of the card. **Returned values:** `PERSONAL`, `COMMERCIAL` Whether the card is held in a personal or commercial capacity. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The type of metadata. **Returned values:** `PAN_ONLY`, `CRYPTOGRAM_3DS` In the case of Google Pay, the format of the `Token`. * `PAN_ONLY` – The card is registered in the Google account and requires 3DS authentication. * `CRYPTOGRAM_3DS` – The card is enrolled in the customer’s Google Wallet and authentication is handled by the Android device. *6 or 8 digits* The bank identification number (BIN). *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. The name of the card issuer. *object* Additional data about the card based on the BIN. In the case of co-branded card products, two objects are returned. **Returned values:** `CREDIT`, `DEBIT`, `CHARGE CARD` The type of the card. **Returned values:** `PERSONAL`, `COMMERCIAL` Whether the card is held in a personal or commercial capacity. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 - BIN: 6 digits { "Type": "BIN", "Bin": "540006", "IssuerCountryCode": "US", "IssuingBank": "FIRST NATIONAL BANK OF OMAHA", "BinData": [ { "CardType": "CREDIT", "CommercialIndicator": "PERSONAL", "Subtype": "MIXED PRODUCT", "Brand": "MASTERCARD" } ] } ``` ```json 200 - BIN: 8 digits { "Type": "BIN", "Bin": "47929300", "IssuerCountryCode": "GB", "IssuingBank": "SANTANDER UK PLC", "BinData": [ { "CardType": "CREDIT", "CommercialIndicator": "COMMERCIAL", "Subtype": "B2B", "Brand": "VISA" } ] } ``` ```json 200 - Co-branded { "Type": "BIN", "Bin": "49735591", "IssuerCountryCode": "FR", "IssuingBank": "SOCIETE GENERALE, S.A.", "BinData": [ { "CardType": null, "CommercialIndicator": null, "SubType": null, "Brand": "CB" }, { "CardType": "DEBIT", "CommercialIndicator": "PERSONAL", "SubType": "CLASSIC", "Brand": "VISA" } ] } ``` ```json 200 - Google Pay { "Type": "GOOGLE_PAY", "TokenFormat": "PAN_ONLY", "Bin": "555555", "CardType": "DEBIT", "IssuerCountryCode": "BR", "IssuingBank": "CIAGROUP", "CommercialIndicator": "PERSONAL", "BinData": [ { "Subtype": "PREPAID", "Brand": "MASTERCARD" } ] } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key", }) let paymentMethod = { Type: 'BIN', Bin: '540006' } const getMetadata = async (paymentMethod) => { return await mangopay.PayIns.getPaymentMethodMetadata(paymentMethod) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getMetadata(paymentMethod) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PaymentMethodMetadata; public class LookUpMetadata { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PaymentMethodMetadata metadata = new PaymentMethodMetadata(); metadata.setType("BIN"); metadata.setBin("540006"); PaymentMethodMetadata getMetadata = mangopay.getPayInApi().getPaymentMethodMetadata(metadata); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(getMetadata); System.out.println(prettyJson); } } ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var metadata = new PaymentMethodMetadataPostDTO { Type = "BIN", Bin = "47929300" }; var getMetadata = await api.PayIns.GetPaymentMethodMetadataAsync(metadata); string prettyPrint = JsonConvert.SerializeObject(getMetadata, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Payment Method Metadata object export const Bin = ({content}) => {content} ; ### Description The Payment Method Metadata object allows you to obtain additional information about a specific payment method used for a transaction.  The following inputs are available, indicated by the `Type`: * `BIN` – The of a card. The BIN is available in the `CardInfo` parameter returned on transactions with a registered card: direct card pay-in, recurring pay-in (CIT), preauthorization, deposit preauthorization, card validation. It is also available in the Card object in the first 6 digits of the `Alias` parameter. * `GOOGLE_PAY` – The temporary token returned by the Google Pay API, as submitted in the `PaymentData` parameter in the Google Pay pay-in. ### Attributes **Allowed values:** `BIN`, `GOOGLE_PAY` The type of metadata. *6 or 8 digits* The bank identification number (BIN). The tokenized payment data provided by the third-party payment method. **Allowed values:** `PAN_ONLY`, `CRYPTOGRAM_3DS` In the case of Google Pay, the format of the `Token`. * `PAN_ONLY` – The card is registered in the Google account and requires 3DS authentication. * `CRYPTOGRAM_3DS` – The card is enrolled in the customer’s Google Wallet and authentication is handled by the Android device. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. The name of the card issuer. *object* Additional data about the card based on the BIN. In the case of co-branded card products, two objects are returned. **Returned values:** `CREDIT`, `DEBIT`, `CHARGE CARD` The type of the card. **Returned values:** `PERSONAL`, `COMMERCIAL` Whether the card is held in a personal or commercial capacity. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. # Check Instant Payout eligibility POST /v2.01/{ClientId}/payouts/reachability This call is used to check whether or not the destination bank is eligible for instant payout. ### Body parameters **Allowed values:** `INSTANT_PAYMENT` The mode of payout. When checking the instant payout eligibility of the destination bank, this value must be `INSTANT_PAYMENT`. The unique identifier of the user at the source of the transaction.\ Best practice: When the payout author is different from the bank account owner, the Payout `AuthorId` value must be different from the Bank Account `UserId` value as well. Otherwise, Mangopay’s Compliance team will reject the payout. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the debited wallet. The unique identifier of the bank account. *Max. length: 255 characters (\< 12 recommended)* Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. For the full structure of the string, see the Customizing bank statement references article. ### Responses Whether or not the bank is reachable. Information regarding why the bank is unreachable. The error code for the reason why the bank is not reachable. The reason why the bank is not reachable. Whether or not the bank is reachable. Information regarding why the bank is unreachable. The error code for the reason why the bank is not reachable. The reason why the bank is not reachable. ```json { "Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type":"param_error", "Id":"33e27bba-bb56-4d64-8574-cc1916a684c7#1661933575", "Date":1661933576.0, "errors":{ "PayoutModeRequested":"InstantPayment is disabled" } } ``` ```json 200 - Bank is reachable { "InstantPayout": { "IsReachable": true, "UnreachableReason": null } } ``` ```json 200 - Bank is unreachable { "InstantPayout":{ "IsReachable":false, "UnreachableReason":{ "Code":"130010", "Message":"Generic operation error" } } } ``` ```json REST { "PayoutModeRequested":"INSTANT_PAYMENT", "AuthorId":"142036728", "DebitedFunds":{ "Currency":"EUR", "Amount":1200 }, "Fees":{ "Currency":"EUR", "Amount":12 }, "DebitedWalletId":"145389978", "BankAccountId":"54682154", "BankWireRef":"invoice 7282" } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: 'user_m_01J2TZ261WZNDM0ZDRWGDYA4GN', WalletId: 'wlt_m_01J3D02K6ETV3BDP88C7PD2NDB', } let myBankAccount = { Id: 'bankacc_m_01J534QNZZSRCXXAJ1VXP58DDH', } let myPayout = { DebitedWalletId: myUser.WalletId, PaymentType: 'BANK_WIRE', BankAccountId: myBankAccount.Id, BankWireRef: 'Mangopay Ref', PayoutModeRequested: 'INSTANT_PAYMENT', AuthorId: myUser.Id, DebitedFunds: { Currency: 'EUR', Amount: 12, }, Fees: { Currency: 'EUR', Amount: 0, }, Tag: 'Created using Mangopay NodeJS SDK', } const checkInstantPayoutEligibility = async (payout) => { return await mangopay.PayOuts.checkEligibility(payout) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } checkInstantPayoutEligibility(myPayout) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayoutMode; import com.mangopay.entities.PayOutEligibility; import com.mangopay.entities.PayOutEligibilityResult; public class CheckEligibility { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR"; var bankAccountId = "bankacc_m_01HTJ7P7Y8K9DS5SZ08MDQRHHE"; PayOutEligibility eligibility = new PayOutEligibility(); eligibility.setAuthorId(userId); eligibility.setDebitedFunds(new Money(CurrencyIso.EUR, 500)); eligibility.setPayoutModeRequested(PayoutMode.INSTANT_PAYMENT); eligibility.setBankAccountId(bankAccountId); PayOutEligibilityResult result = mangopay.getPayOutApi().checkInstantPayoutEligibility(null, eligibility); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(result); System.out.println(prettyJson); } } ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def checkReachability(payoutObject) begin response = MangoPay::PayOut::InstantPayoutEligibility::Reachability.create(payoutObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to check reachability: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '146476890', WalletId: '148968396' } myBankAccount = { Id: '154876798' } myPayout = { DebitedWalletId: myUser[:WalletId], PaymentType: 'BANK_WIRE', BankAccountId: myBankAccount[:Id], BankWireRef: 'Mangopay Ref', PayoutModeRequested: 'INSTANT_PAYMENT', AuthorId: myUser[:Id], DebitedFunds: { Currency: 'EUR', Amount: 1200, }, Fees: { Currency: 'EUR', Amount: 0, }, Tag: 'Created using Mangopay Ruby SDK' } checkReachability(myPayout) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using MangoPay.SDK.Core.Enumerations; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var payout = new PayOutEligibilityPostDTO { AuthorId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN", DebitedFunds = new Money { Amount = 1200, Currency = CurrencyIso.EUR }, Fees = new Money { Amount = 12, Currency = CurrencyIso.EUR }, PayoutModeRequested = PayoutModeRequested.INSTANT_PAYMENT, BankAccountId = "bankacc_m_01J534QNZZSRCXXAJ1VXP58DDH", DebitedWalletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3" }; var checkEligibility = await api.PayOuts.CheckInstantPayoutEligibility(payout); string prettyPrint = JsonConvert.SerializeObject(checkEligibility, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Payout POST /v2.01/{ClientId}/payouts/bankwire ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object. The unique identifier of the user at the source of the transaction.\ Best practice: When the payout author is different from the bank account owner, the Payout `AuthorId` value must be different from the Bank Account `UserId` value as well. Otherwise, Mangopay’s Compliance team will reject the payout. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the debited wallet. The unique identifier of the bank account. *Max. length: 255 characters (\< 12 recommended)* Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. For the full structure of the string, see the Customizing bank statement references article. **Allowed values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY` **Default value:** `STANDARD` The mode of the payout: * `STANDARD` – A standard bank wire is requested and the processing time of the funds is up to 48 hours. * `INSTANT_PAYMENT` – An instant payment bank wire is requested and the processing time is within 25 seconds. The payment will fall back to the `STANDARD` mode if any of the prerequisites are not met or if another problem occurs. * `INSTANT_PAYMENT_ONLY` – An instant payment bank wire is requested and the processing time is within 25 seconds. There is no fallback if the prerequisites are not met or another problem occurs: the wallet is automatically refunded and the payout is not completed. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction.\ Best practice: When the payout author is different from the bank account owner, the Payout `AuthorId` value must be different from the Bank Account `UserId` value as well. Otherwise, Mangopay’s Compliance team will reject the payout. The unique identifier of the user whose wallet is credited.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the funds being credited to the target of the transaction (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. The unique identifier of the debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. The unique identifier of the bank account. *Max. length: 255 characters (\< 12 recommended)* Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. For the full structure of the string, see the Customizing bank statement references article. **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY` The value set for the `PayoutModeRequested` parameter when making the request. **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY`, `PENDING_RESPONSE` The payout mode actually applied for the transaction. The payout mode can revert to standard if some of the prerequisites for an instant payment are not met. * `STANDARD` – A standard bank wire is requested and the processing time of the funds is about 48 hours. * `INSTANT_PAYMENT` – An instant payment bank wire is requested and the processing time is within 25 seconds (subject to prerequisites); if the prerequisites are not met, then the payment will fall back to the `STANDARD` mode. * `INSTANT_PAYMENT_ONLY` – An instant payment bank wire is requested and the processing time is within 25 seconds, but if any prerequisite is not met or another problem occurs, there is no fallback: the wallet is automatically refunded and the payout is not completed. * `PENDING_RESPONSE` – Temporary state to accommodate the short latency between the moment the request is sent and the moment the mode is applied (or a fallback occurs). Information regarding the reason for the refusal of the instant payout request. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of a bank wire for tracking purposes only. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction.\ Best practice: When the payout author is different from the bank account owner, the Payout `AuthorId` value must be different from the Bank Account `UserId` value as well. Otherwise, Mangopay’s Compliance team will reject the payout. The unique identifier of the user whose wallet is credited.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the funds being credited to the target of the transaction (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. The unique identifier of the debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. The unique identifier of the bank account. *Max. length: 255 characters (\< 12 recommended)* Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. For the full structure of the string, see the Customizing bank statement references article. **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY` The value set for the `PayoutModeRequested` parameter when making the request. **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY`, `PENDING_RESPONSE` The payout mode actually applied for the transaction. The payout mode can revert to standard if some of the prerequisites for an instant payment are not met. * `STANDARD` – A standard bank wire is requested and the processing time of the funds is about 48 hours. * `INSTANT_PAYMENT` – An instant payment bank wire is requested and the processing time is within 25 seconds (subject to prerequisites); if the prerequisites are not met, then the payment will fall back to the `STANDARD` mode. * `INSTANT_PAYMENT_ONLY` – An instant payment bank wire is requested and the processing time is within 25 seconds, but if any prerequisite is not met or another problem occurs, there is no fallback: the wallet is automatically refunded and the payout is not completed. * `PENDING_RESPONSE` – Temporary state to accommodate the short latency between the moment the request is sent and the moment the mode is applied (or a fallback occurs). Information regarding the reason for the refusal of the instant payout request. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of a bank wire for tracking purposes only. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "e1606a91-e563-45f3-a337-acdd933ab80b#1673533663", "Date": 1673533664.0, "errors": { "PayoutModeRequested": "InstantPayment is disabled" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "b5a1b347-9b21-4077-bd41-d41ea4b07be4#1676883139", "Date": 1676883140.0, "errors": { "PayoutModeRequested": "InstantPayment was explicitly requested but this feature is not activated on your configuration" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "c2a051f4-b4d2-4097-9a03-b4b3a67bb9e1#1676883693", "Date": 1676883694.0, "errors": { "PayoutModeRequested": "The request for instant payment cannot be successful due to ineligibility " } } ``` ```json 200 - Standard: Created { "Id": "po_m_01HQMZSGSQPPXC51TZHDAYFAJF", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1709027672, "AuthorId": "204069570", "CreditedUserId": null, "DebitedFunds": { "Currency": "EUR", "Amount": 5792 }, "CreditedFunds": { "Currency": "EUR", "Amount": 5213 }, "Fees": { "Currency": "EUR", "Amount": 579 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYOUT", "Nature": "REGULAR", "CreditedWalletId": null, "DebitedWalletId": "204069727", "PaymentType": "BANK_WIRE", "BankAccountId": "204070675", "BankWireRef": "ExampleInvoice1234", "ModeRequested": null, "ModeApplied": "PENDING_RESPONSE", "FallbackReason": null, "EndToEndId": "2c2184396eef4e5da90ab48a2feeb51d" } ``` ```json 200 - Instant payment: Created { "Id": "po_m_01HQMZZV376RRXYQGQAHZ4TN9K", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1709027880, "AuthorId": "204069570", "CreditedUserId": null, "DebitedFunds": { "Currency": "EUR", "Amount": 3387 }, "CreditedFunds": { "Currency": "EUR", "Amount": 3048 }, "Fees": { "Currency": "EUR", "Amount": 339 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYOUT", "Nature": "REGULAR", "CreditedWalletId": null, "DebitedWalletId": "204069727", "PaymentType": "BANK_WIRE", "BankAccountId": "204070675", "BankWireRef": "ExampleInvoice1234", "ModeRequested": "INSTANT_PAYMENT", "ModeApplied": "PENDING_RESPONSE", "FallbackReason": null, "EndToEndId": "e8052ae4729f4abe9355442020f411a9" } ``` ```json REST { "AuthorId": "204069570", "Tag": "Created using Mangopay API Postman Collection", "DebitedFunds": { "Currency": "EUR", "Amount": 5792 }, "Fees": { "Currency": "EUR", "Amount": 579 }, "BankAccountId": "204070675", "DebitedWalletId": "204069727", "BankWireRef": "ExampleInvoice1234" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payout = new \MangoPay\PayOut(); $payout->Tag = 'Created with Mangopay PHP SDK'; $payout->AuthorId = '146476890'; $payout->DebitedFunds = new \MangoPay\Money(); $payout->DebitedFunds->Currency = 'EUR'; $payout->DebitedFunds->Amount = 1000; $payout->Fees = new \MangoPay\Money(); $payout->Fees->Currency = 'EUR'; $payout->Fees->Amount = 0; $payout->DebitedWalletId = '148968396'; $payout->PayoutPaymentDetails = new \MangoPay\PayOutPaymentDetailsBankWire(); $payout->PayoutPaymentDetails->BankAccountId = '198982485'; $payout->PayoutPaymentDetails->BankWireRef = 'MangopayPHP'; $payout->MeanOfPaymentDetails = $payout->PayoutPaymentDetails; $payout->PaymentType = \MangoPay\PayOutPaymentType::BankWire; $payout->PayoutModeRequested = 'STANDARD'; $response = $api->PayOuts->Create($payout); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: '146476890', WalletId: '148968396', } let myBankAccount = { Id: '154876798', } let myPayout = { DebitedWalletId: myUser.WalletId, PaymentType: 'BANK_WIRE', BankAccountId: myBankAccount.Id, BankWireRef: 'Mangopay Ref', PayoutModeRequested: 'STANDARD', AuthorId: myUser.Id, DebitedFunds: { Currency: 'EUR', Amount: 12, }, Fees: { Currency: 'EUR', Amount: 0, }, Tag: 'Created using Mangopay NodeJS SDK', } const createPayout = async (payout) => { return await mangopay.PayOuts.create(payout) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createPayout(myPayout) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createPayout(payoutObject) begin response = MangoPay::PayOut::BankWire.create(payoutObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create payout: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '146476890', WalletId: '148968396' } myBankAccount = { Id: '154876798' } myPayout = { DebitedWalletId: myUser[:WalletId], PaymentType: 'BANK_WIRE', BankAccountId: myBankAccount[:Id], BankWireRef: 'Mangopay Ref', PayoutModeRequested: 'STANDARD', AuthorId: myUser[:Id], DebitedFunds: { Currency: 'EUR', Amount: 1200, }, Fees: { Currency: 'EUR', Amount: 0, }, Tag: 'Created using Mangopay Ruby SDK' } createPayout(myPayout) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayoutMode; import com.mangopay.entities.PayOut; import com.mangopay.entities.subentities.PayOutPaymentDetailsBankWire; public class CreatePayout { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR"; var walletId = "wlt_m_01HQT6422EER2N7FPRXWTSDCSV"; var bankAccountId = "bankacc_m_01HTJ7P7Y8K9DS5SZ08MDQRHHE"; PayOut payout = new PayOut(); payout.setAuthorId(userId); payout.setDebitedWalletId(walletId); payout.setDebitedFunds(new Money(CurrencyIso.EUR, 500)); payout.setFees(new Money(CurrencyIso.EUR, 0)); PayOutPaymentDetailsBankWire paymentDetails = new PayOutPaymentDetailsBankWire(); paymentDetails.setBankAccountId(bankAccountId); paymentDetails.setPayoutModeRequested(PayoutMode.STANDARD); payout.setMeanOfPaymentDetails(paymentDetails); PayOut createPayout = mangopay.getPayOutApi().create(payout); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPayout); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import BankWirePayOut from mangopay.utils import Money natural_user_id = '213753890' natural_user_wallet_id = '213754077' payout = BankWirePayOut( author_id = natural_user_id, debited_funds = Money(amount=200, currency='EUR'), fees = Money(amount=0, currency='EUR'), debited_wallet_id = natural_user_wallet_id, bank_account_id = '214651521', tag = 'Created using Mangopay Python SDK' ) create_payout = payout.save() pprint(create_payout) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using MangoPay.SDK.Core.Enumerations; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var bankAccountId = "bankacc_m_01J534QNZZSRCXXAJ1VXP58DDH"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var debitedFunds = new Money { Amount = 2000, Currency = CurrencyIso.EUR }; var fees = new Money { Amount = 50, Currency = CurrencyIso.EUR }; var bankWireRef = "ExampleInvoice1234"; var payout = new PayOutBankWirePostDTO( userId, walletId, debitedFunds, fees, bankAccountId, bankWireRef, PayoutModeRequested.STANDARD ) { Tag = "Created using the Mangopay .NET SDK" }; var createPayout = await api.PayOuts.CreateBankWireAsync(payout); string prettyPrint = JsonConvert.SerializeObject(createPayout, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Payout object ### Description Mangopay relies on the Payout object to transfer funds from a Wallet to an external bank account (which means you need to have created the Bank Account object first). Mangopay provides two modes to wire funds outside Mangopay: * Standard – A bank wire with a processing time of up to 48 hours. * Instant Payout – A bank wire with a processing time of about 25 seconds ### Attributes **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY` **Default value:** `STANDARD` The mode of the payout: * `STANDARD` – A standard bank wire is requested and the processing time of the funds is up to 48 hours. * `INSTANT_PAYMENT` – An instant payment bank wire is requested and the processing time is within 25 seconds. The payment will fall back to the `STANDARD` mode if any of the prerequisites are not met or if another problem occurs. * `INSTANT_PAYMENT_ONLY` – An instant payment bank wire is requested and the processing time is within 25 seconds. There is no fallback if the prerequisites are not met or another problem occurs: the wallet is automatically refunded and the payout is not completed. **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY` The value set for the `PayoutModeRequested` parameter when making the request. **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY`, `PENDING_RESPONSE` The payout mode actually applied for the transaction. The payout mode can revert to standard if some of the prerequisites for an instant payment are not met. * `STANDARD` – A standard bank wire is requested and the processing time of the funds is about 48 hours. * `INSTANT_PAYMENT` – An instant payment bank wire is requested and the processing time is within 25 seconds (subject to prerequisites); if the prerequisites are not met, then the payment will fall back to the `STANDARD` mode. * `INSTANT_PAYMENT_ONLY` – An instant payment bank wire is requested and the processing time is within 25 seconds, but if any prerequisite is not met or another problem occurs, there is no fallback: the wallet is automatically refunded and the payout is not completed. * `PENDING_RESPONSE` – Temporary state to accommodate the short latency between the moment the request is sent and the moment the mode is applied (or a fallback occurs). Information regarding the reason for the refusal of the instant payout request. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction.\ Best practice: When the payout author is different from the bank account owner, the Payout `AuthorId` value must be different from the Bank Account `UserId` value as well. Otherwise, Mangopay’s Compliance team will reject the payout. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the funds being credited to the target of the transaction (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. The unique identifier of the debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. The unique identifier of the bank account. *Max. length: 255 characters (\< 12 recommended)* Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. For the full structure of the string, see the Customizing bank statement references article. ### Related resources Learn more about payouts # View a Payout GET /v2.01/{ClientId}/payouts/{PayoutId} This call returns the information about a payout without any information about the payout mode. **Note – Payout data retained for 13 months** An API call to retrieve a payout whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the payout. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction.\ Best practice: When the payout author is different from the bank account owner, the Payout `AuthorId` value must be different from the Bank Account `UserId` value as well. Otherwise, Mangopay’s Compliance team will reject the payout. The unique identifier of the user whose wallet is credited.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the funds being credited to the target of the transaction (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. The unique identifier of the debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. The unique identifier of the bank account. *Max. length: 255 characters (\< 12 recommended)* Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. For the full structure of the string, see the Customizing bank statement references article. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction.\ Best practice: When the payout author is different from the bank account owner, the Payout `AuthorId` value must be different from the Bank Account `UserId` value as well. Otherwise, Mangopay’s Compliance team will reject the payout. The unique identifier of the user whose wallet is credited.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the funds being credited to the target of the transaction (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. The unique identifier of the debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. The unique identifier of the bank account. *Max. length: 255 characters (\< 12 recommended)* Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. For the full structure of the string, see the Customizing bank statement references article. ```json 200 - Standard: Succeeded { "Id": "po_m_01HQMZSGSQPPXC51TZHDAYFAJF", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1709027672, "AuthorId": "204069570", "CreditedUserId": null, "DebitedFunds": { "Currency": "EUR", "Amount": 5792 }, "CreditedFunds": { "Currency": "EUR", "Amount": 5213 }, "Fees": { "Currency": "EUR", "Amount": 579 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1709027738, "Type": "PAYOUT", "Nature": "REGULAR", "CreditedWalletId": null, "DebitedWalletId": "204069727", "PaymentType": "BANK_WIRE", "BankAccountId": "204070675", "BankWireRef": "ExampleInvoice1234" } ``` ```json 200 - Standard: Succeeded 1 second after creation (GBP Faster Payment) { "Id": "po_b_01HPM8PX3KJV245H409Q3XD0Z7", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1707929728, "AuthorId": "204069570", "CreditedUserId": null, "DebitedFunds": { "Currency": "GBP", "Amount": 4682 }, "CreditedFunds": { "Currency": "GBP", "Amount": 4635 }, "Fees": { "Currency": "GBP", "Amount": 47 }, "Status": "SUCCEEDED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": 1707929729, "Type": "PAYOUT", "Nature": "REGULAR", "CreditedWalletId": null, "DebitedWalletId": "204079063", "PaymentType": "BANK_WIRE", "BankAccountId": "204073517", "BankWireRef": "Created using the Mangopay API Postman collection" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payoutId = '199128145'; $response = $api->PayOuts->Get($payoutId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayout = { Id: '174860560', } const viewPayout = async (payoutId) => { return await mangopay.PayOuts.get(payoutId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayout(myPayout.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayout(payoutid) begin response = MangoPay::PayOut::BankWire.get_bankwire(payoutid) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch payout: #{error.message}" puts "Error details: #{error.details}" return false end end myPayout = { Id: '194252007' } viewPayout(myPayout[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayOut; public class ViewPayout { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var payoutId = "po_m_01J2BWBKPG2ZCQXV2QNX6H08NG"; PayOut viewPayout = mangopay.getPayOutApi().get(payoutId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewPayout); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import BankWirePayOut payout_id = '214655329' try: view_payout = BankWirePayOut.get(payout_id) pprint(vars(view_payout)) except BankWirePayOut.DoesNotExist: print('The PayOut {} does not exist.'.format(payout_id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var payoutId = "po_m_01J53HF2TD1ZQ4GB7K1DXQGHME"; var viewPayout = await api.PayOuts.GetAsync(payoutId); string prettyPrint = JsonConvert.SerializeObject(viewPayout, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Payout and check mode applied GET /v2.01/{ClientId}/payouts/bankwire/{PayOutId} This call returns the information about a payout with additional information about the payout mode (`ModeRequested`, `ModeApplied`, and `FallbackReason` parameters). **Note – Payout data retained for 13 months** An API call to retrieve a payout whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the payout. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction.\ Best practice: When the payout author is different from the bank account owner, the Payout `AuthorId` value must be different from the Bank Account `UserId` value as well. Otherwise, Mangopay’s Compliance team will reject the payout. The unique identifier of the user whose wallet is credited.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the funds being credited to the target of the transaction (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. The unique identifier of the debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. The unique identifier of the bank account. *Max. length: 255 characters (\< 12 recommended)* Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. For the full structure of the string, see the Customizing bank statement references article. **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY` The value set for the `PayoutModeRequested` parameter when making the request. **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY`, `PENDING_RESPONSE` The payout mode actually applied for the transaction. The payout mode can revert to standard if some of the prerequisites for an instant payment are not met. * `STANDARD` – A standard bank wire is requested and the processing time of the funds is about 48 hours. * `INSTANT_PAYMENT` – An instant payment bank wire is requested and the processing time is within 25 seconds (subject to prerequisites); if the prerequisites are not met, then the payment will fall back to the `STANDARD` mode. * `INSTANT_PAYMENT_ONLY` – An instant payment bank wire is requested and the processing time is within 25 seconds, but if any prerequisite is not met or another problem occurs, there is no fallback: the wallet is automatically refunded and the payout is not completed. * `PENDING_RESPONSE` – Temporary state to accommodate the short latency between the moment the request is sent and the moment the mode is applied (or a fallback occurs). Information regarding the reason for the refusal of the instant payout request. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of a bank wire for tracking purposes only. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction.\ Best practice: When the payout author is different from the bank account owner, the Payout `AuthorId` value must be different from the Bank Account `UserId` value as well. Otherwise, Mangopay’s Compliance team will reject the payout. The unique identifier of the user whose wallet is credited.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the funds being credited to the target of the transaction (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. The unique identifier of the debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. The unique identifier of the bank account. *Max. length: 255 characters (\< 12 recommended)* Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. For the full structure of the string, see the Customizing bank statement references article. **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY` The value set for the `PayoutModeRequested` parameter when making the request. **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY`, `PENDING_RESPONSE` The payout mode actually applied for the transaction. The payout mode can revert to standard if some of the prerequisites for an instant payment are not met. * `STANDARD` – A standard bank wire is requested and the processing time of the funds is about 48 hours. * `INSTANT_PAYMENT` – An instant payment bank wire is requested and the processing time is within 25 seconds (subject to prerequisites); if the prerequisites are not met, then the payment will fall back to the `STANDARD` mode. * `INSTANT_PAYMENT_ONLY` – An instant payment bank wire is requested and the processing time is within 25 seconds, but if any prerequisite is not met or another problem occurs, there is no fallback: the wallet is automatically refunded and the payout is not completed. * `PENDING_RESPONSE` – Temporary state to accommodate the short latency between the moment the request is sent and the moment the mode is applied (or a fallback occurs). Information regarding the reason for the refusal of the instant payout request. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of a bank wire for tracking purposes only. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction.\ Best practice: When the payout author is different from the bank account owner, the Payout `AuthorId` value must be different from the Bank Account `UserId` value as well. Otherwise, Mangopay’s Compliance team will reject the payout. The unique identifier of the user whose wallet is credited.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the funds being credited to the target of the transaction (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. The unique identifier of the debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. The unique identifier of the bank account. *Max. length: 255 characters (\< 12 recommended)* Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. For the full structure of the string, see the Customizing bank statement references article. **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY` The value set for the `PayoutModeRequested` parameter when making the request. **Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY`, `PENDING_RESPONSE` The payout mode actually applied for the transaction. The payout mode can revert to standard if some of the prerequisites for an instant payment are not met. * `STANDARD` – A standard bank wire is requested and the processing time of the funds is about 48 hours. * `INSTANT_PAYMENT` – An instant payment bank wire is requested and the processing time is within 25 seconds (subject to prerequisites); if the prerequisites are not met, then the payment will fall back to the `STANDARD` mode. * `INSTANT_PAYMENT_ONLY` – An instant payment bank wire is requested and the processing time is within 25 seconds, but if any prerequisite is not met or another problem occurs, there is no fallback: the wallet is automatically refunded and the payout is not completed. * `PENDING_RESPONSE` – Temporary state to accommodate the short latency between the moment the request is sent and the moment the mode is applied (or a fallback occurs). Information regarding the reason for the refusal of the instant payout request. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of a bank wire for tracking purposes only. ```json 200 - Standard: Succeeded { "Id": "po_m_01HQMZSGSQPPXC51TZHDAYFAJF", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1709027672, "AuthorId": "204069570", "CreditedUserId": null, "DebitedFunds": { "Currency": "EUR", "Amount": 5792 }, "CreditedFunds": { "Currency": "EUR", "Amount": 5213 }, "Fees": { "Currency": "EUR", "Amount": 579 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1709027738, "Type": "PAYOUT", "Nature": "REGULAR", "CreditedWalletId": null, "DebitedWalletId": "204069727", "PaymentType": "BANK_WIRE", "BankAccountId": "204070675", "BankWireRef": "ExampleInvoice1234", "ModeRequested": null, "ModeApplied": "STANDARD", "FallbackReason": null, "EndToEndId": "2c2184396eef4e5da90ab48a2feeb51d" } ``` ```json 200 - Standard: Succeeded 1 second after creation (GBP Faster Payment) { "Id": "po_b_01HPM8PX3KJV245H409Q3XD0Z7", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1707929728, "AuthorId": "204069570", "CreditedUserId": null, "DebitedFunds": { "Currency": "GBP", "Amount": 4682 }, "CreditedFunds": { "Currency": "GBP", "Amount": 4635 }, "Fees": { "Currency": "GBP", "Amount": 47 }, "Status": "SUCCEEDED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": 1707929729, "Type": "PAYOUT", "Nature": "REGULAR", "CreditedWalletId": null, "DebitedWalletId": "204079063", "PaymentType": "BANK_WIRE", "BankAccountId": "204073517", "BankWireRef": "Created using the Mangopay API Postman collection", "ModeRequested": null, "ModeApplied": "STANDARD", "FallbackReason": null, "EndToEndId": "58810b9cf8c745b2a45f17f5d06a151f" } ``` ```json 200 - Instant payment: Succeeded { "Id": "po_m_01HQMZZV376RRXYQGQAHZ4TN9K", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1709027880, "AuthorId": "204069570", "CreditedUserId": null, "DebitedFunds": { "Currency": "EUR", "Amount": 3387 }, "CreditedFunds": { "Currency": "EUR", "Amount": 3048 }, "Fees": { "Currency": "EUR", "Amount": 339 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1709027880, "Type": "PAYOUT", "Nature": "REGULAR", "CreditedWalletId": null, "DebitedWalletId": "204069727", "PaymentType": "BANK_WIRE", "BankAccountId": "204070675", "BankWireRef": "ExampleInvoice1234", "ModeRequested": "INSTANT_PAYMENT", "ModeApplied": "INSTANT_PAYMENT", "FallbackReason": null, "EndToEndId": "e8052ae4729f4abe9355442020f411a9" } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayout = { Id: '174860560', } const getPayoutCheckMode = async (payoutId) => { return await mangopay.PayOuts.getBankwire(payoutId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getPayoutCheckMode(myPayout.Id) ``` # Add tracking information to a PayPal PayIn PUT /v2.01/{ClientId}/payins/{PayInId}/trackings You can use this call to add the tracking number and carrier for `LineItems` shipments. **Caution – Tracking information cannot be edited** You can’t modify the `TrackingNumber`, `Carrier`, or `NotifyBuyer` once added.\ You can only send a unique tracking number once. There is no link between the line items and the tracking numbers.  If adding multiple tracking numbers for the same transaction, it is recommended to set `NotifyBuyer` to `true` on only one of them. ### Path parameters The unique identifier of the pay-in. ### Body parameters The shipment’s tracking number provided by the carrier. The carrier for the shipment. Use the country-specific version of the carrier if it exists, otherwise use its global version. **Default value:** false If `true`, sends an email notification to the `PaypalBuyerAccountEmail` containing the `TrackingNumber` and `Carrier`, which allows the end user to track their shipment with the carrier. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. The amount must be equal to the total of all `UnitAmount` and `TaxAmount` of all `LineItems`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `PAYPAL` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the end user’s shipping address, managed by `ShippingPreference`. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *object* Information about the items purchased in the transaction. The total of all line items’ `UnitAmount` and `TaxAmount` must equal the `DebitedFunds` amount (negative amounts not allowed). *Max. length: 127 characters (truncated after)* The name of the item. The quantity of the item. The cost of the item, excluding tax. The tax amount applied to the item. *Max. length: 127 characters (truncated after)* The platform’s unique reference for the seller. This value must be consistently used for the given seller. You can use, for example, the Mangopay `UserId` or the seller’s business name or first name and last name.\ Caution: Failure to use a unique seller identifier may result in PayPal restricting your service. **Allowed values:** PHYSICAL\_GOODS, DIGITAL\_GOODS, DONATION The category of the item: * `PHYSICAL_GOODS` – Tangible items that can be physically shipped and received with proof of delivery upon arrival. * `DIGITAL_GOODS` – Products or services that are distributed and consumed via digital platforms or devices.  * `DONATION` – Voluntary contribution made without any goods or services received in return. Multiple line items can be categorized as `DONATION` within a single transaction, however it is not possible to combine `DONATION` other line item categories within the same transaction. **Returned values:** One of the supported languages in the ISO 639-1 format: AT, BR, CA, CH, CN, DE, DK, ES, FR, GB, ID, IL, IT, JK, JP, NL, NO, PL, PT, RU, SE, TH, TR, TW, US. The language in which the PayPal payment page is to be displayed. **Returned values:** `SET_PROVIDED_ADDRESS`, `GET_FROM_FILE`, `NO_SHIPPING` Information about the shipping address behavior on the PayPal payment page: * `SET_PROVIDED_ADDRESS` - The address provided in the `Shipping` parameter is displayed and is not editable. If this value is sent, the `Shipping` parameter is required. * `GET_FROM_FILE` – The `Shipping` parameter is ignored and the end user can choose from registered addresses. * `NO_SHIPPING` – No shipping address section is displayed. The email address registered on the PayPal account used to make the payment. *Max. length: 127 characters (truncated after)* The platform’s order reference for the transaction. *object* Shipping information of the `LineItems` added to the pay-in object. The shipment’s tracking number provided by the carrier. The carrier for the shipment. Use the country-specific version of the carrier if it exists, otherwise use its global version. **Default value:** false If `true`, sends an email notification to the `PaypalBuyerAccountEmail` containing the `TrackingNumber` and `Carrier`, which allows the end user to track their shipment with the carrier. The URL to which the user is returned after canceling the payment. If not provided, the Cancel button returns the user to the RedirectURL. PayPal's unique identifier for the order. The country of the buyer. The first name of the buyer. The mobile phone number of the buyer. The last name of the buyer. The PayPal identifier of the buyer. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. The amount must be equal to the total of all `UnitAmount` and `TaxAmount` of all `LineItems`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `PAYPAL` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the end user’s shipping address, managed by `ShippingPreference`. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *object* Information about the items purchased in the transaction. The total of all line items’ `UnitAmount` and `TaxAmount` must equal the `DebitedFunds` amount (negative amounts not allowed). *Max. length: 127 characters (truncated after)* The name of the item. The quantity of the item. The cost of the item, excluding tax. The tax amount applied to the item. *Max. length: 127 characters (truncated after)* The platform’s unique reference for the seller. This value must be consistently used for the given seller. You can use, for example, the Mangopay `UserId` or the seller’s business name or first name and last name.\ Caution: Failure to use a unique seller identifier may result in PayPal restricting your service. **Allowed values:** PHYSICAL\_GOODS, DIGITAL\_GOODS, DONATION The category of the item: * `PHYSICAL_GOODS` – Tangible items that can be physically shipped and received with proof of delivery upon arrival. * `DIGITAL_GOODS` – Products or services that are distributed and consumed via digital platforms or devices.  * `DONATION` – Voluntary contribution made without any goods or services received in return. Multiple line items can be categorized as `DONATION` within a single transaction, however it is not possible to combine `DONATION` other line item categories within the same transaction. **Returned values:** One of the supported languages in the ISO 639-1 format: AT, BR, CA, CH, CN, DE, DK, ES, FR, GB, ID, IL, IT, JK, JP, NL, NO, PL, PT, RU, SE, TH, TR, TW, US. The language in which the PayPal payment page is to be displayed. **Returned values:** `SET_PROVIDED_ADDRESS`, `GET_FROM_FILE`, `NO_SHIPPING` Information about the shipping address behavior on the PayPal payment page: * `SET_PROVIDED_ADDRESS` - The address provided in the `Shipping` parameter is displayed and is not editable. If this value is sent, the `Shipping` parameter is required. * `GET_FROM_FILE` – The `Shipping` parameter is ignored and the end user can choose from registered addresses. * `NO_SHIPPING` – No shipping address section is displayed. The email address registered on the PayPal account used to make the payment. *Max. length: 127 characters (truncated after)* The platform’s order reference for the transaction. *object* Shipping information of the `LineItems` added to the pay-in object. The shipment’s tracking number provided by the carrier. The carrier for the shipment. Use the country-specific version of the carrier if it exists, otherwise use its global version. **Default value:** false If `true`, sends an email notification to the `PaypalBuyerAccountEmail` containing the `TrackingNumber` and `Carrier`, which allows the end user to track their shipment with the carrier. The URL to which the user is returned after canceling the payment. If not provided, the Cancel button returns the user to the RedirectURL. PayPal's unique identifier for the order. The country of the buyer. The first name of the buyer. The mobile phone number of the buyer. The last name of the buyer. The PayPal identifier of the buyer. ```json 200 - First tracking number { "Id": "wt_00a046e2-cc5c-46ba-91e0-1feca23922e4", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1699367848, "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 1500 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1200 }, "Fees": { "Currency": "EUR", "Amount": 300 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1699368834, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204089031", "CreditedUserId": "204068024", "PaymentType": "PAYPAL", "ExecutionType": "WEB", "ReturnURL": "http://www.mangopay.com/docs/please-ignore?transactionId=wt_00a046e2-cc5c-46ba-91e0-1feca23922e4", "RedirectURL": "https://www.sandbox.paypal.com/checkoutnow?token=48X37022FD879043B", "StatementDescriptor": "Mangopay", "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "île-de-france", "PostalCode": "75003", "Country": "FR" } }, "LineItems": [ { "Name": "Running shoes", "Quantity": 2, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 1", "Category": "PHYSICAL_GOODS" }, { "Name": "Walking shoes", "Quantity": 1, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 2", "Category": "PHYSICAL_GOODS" } ], "Culture": "FR", "ShippingPreference": "SET_PROVIDED_ADDRESS", "PaypalBuyerAccountEmail": "alex.smith@example.com", "Reference": "1234", "Trackings": [ { "TrackingNumber": "123456789", "Carrier": "DHL", "NotifyBuyer": true } ], "CancelURL": "http://www.example.com/?transactionId=wt_f79a219d-c952-41a0-9bc4-e575f8f1ef7a", "PaypalPayerID": null, "BuyerCountry": null, "BuyerFirstname": null, "BuyerLastname": null, "BuyerPhone": null, "PaypalOrderID": "6MH08891XC585490F" } ``` ```json 200 - Second tracking number { "Id": "wt_00a046e2-cc5c-46ba-91e0-1feca23922e4", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1699367848, "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 1500 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1200 }, "Fees": { "Currency": "EUR", "Amount": 300 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1699368834, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204089031", "CreditedUserId": "204068024", "PaymentType": "PAYPAL", "ExecutionType": "WEB", "ReturnURL": "http://www.mangopay.com/docs/please-ignore?transactionId=wt_00a046e2-cc5c-46ba-91e0-1feca23922e4", "RedirectURL": "https://www.sandbox.paypal.com/checkoutnow?token=48X37022FD879043B", "StatementDescriptor": "Mangopay", "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "île-de-france", "PostalCode": "75003", "Country": "FR" } }, "LineItems": [ { "Name": "Running shoes", "Quantity": 2, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 1", "Category": "PHYSICAL_GOODS" }, { "Name": "Walking shoes", "Quantity": 1, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 2", "Category": "PHYSICAL_GOODS" } ], "Culture": "FR", "ShippingPreference": "SET_PROVIDED_ADDRESS", "PaypalBuyerAccountEmail": "alex.smith@example.com", "Reference": "1234", "Trackings": [ { "TrackingNumber": "123456789", "Carrier": "DHL", "NotifyBuyer": true }, { "TrackingNumber": "987654321", "Carrier": "DPD", "NotifyBuyer": false } ], "CancelURL": "http://www.example.com/?transactionId=wt_f79a219d-c952-41a0-9bc4-e575f8f1ef7a", "PaypalPayerID": null, "BuyerCountry": null, "BuyerFirstname": null, "BuyerLastname": null, "BuyerPhone": null, "PaypalOrderID": "6MH08891XC585490F" } ``` ```json REST { "TrackingNumber": "123456789", "Carrier": "DHL", "NotifyBuyer": true } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayPalWebTracking; public class AddTrackingInformation { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var payInId = "wt_5aaccd9f-6129-4689-90b0-1ef0496c5233"; PayPalWebTracking trackingInfo = new PayPalWebTracking(); trackingInfo.setCarrier("DHL"); trackingInfo.setTrackingNumber("562341568"); trackingInfo.setNotifyBuyer(true); PayIn createPaypalPayin = mangopay.getPayInApi().addPayPalTrackingInformation(payInId, trackingInfo); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPaypalPayin); System.out.println(prettyJson); } } ``` # Create a PayPal PayIn POST /v2.01/{ClientId}/payins/payment-methods/paypal ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. Information about the debited funds. The amount must be equal to the total of all `UnitAmount` and `TaxAmount` of all `LineItems`. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Required if `ShippingPreference` is `SET_PROVIDED_ADDRESS`. Information about the end user’s shipping address, managed by `ShippingPreference`. The first name of the user. *Max. length: 100 characters* The last name of the user. Required if the parent parameter is sent. Information about the shipping address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. *object* Information about the items purchased in the transaction. The total of all line items’ `UnitAmount` and `TaxAmount` must equal the `DebitedFunds` amount (negative amounts not allowed). *Max. length: 127 characters (truncated after)* The name of the item. The quantity of the item. The cost of the item, excluding tax. The tax amount applied to the item. *Max. length: 127 characters (truncated after)* The platform’s unique reference for the seller. This value must be consistently used for the given seller. You can use, for example, the Mangopay `UserId` or the seller’s business name or first name and last name.\ Caution: Failure to use a unique seller identifier may result in PayPal restricting your service. **Allowed values:** PHYSICAL\_GOODS, DIGITAL\_GOODS, DONATION The category of the item: * `PHYSICAL_GOODS` – Tangible items that can be physically shipped and received with proof of delivery upon arrival. * `DIGITAL_GOODS` – Products or services that are distributed and consumed via digital platforms or devices.  * `DONATION` – Voluntary contribution made without any goods or services received in return. Multiple line items can be categorized as `DONATION` within a single transaction, however it is not possible to combine `DONATION` other line item categories within the same transaction. **Allowed values:** One of the supported languages in the ISO 639-1 format: AT, BR, CA, CH, CN, DE, DK, ES, FR, GB, ID, IL, IT, JK, JP, NL, NO, PL, PT, RU, SE, TH, TR, TW, US. The language in which the PayPal payment page is to be displayed. **Allowed values:** `SET_PROVIDED_ADDRESS`, `GET_FROM_FILE`, `NO_SHIPPING` Information about the shipping address behavior on the PayPal payment page: * `SET_PROVIDED_ADDRESS` - The address provided in the `Shipping` parameter is displayed and is not editable. If this value is sent, the `Shipping` parameter is required. * `GET_FROM_FILE` – The `Shipping` parameter is ignored and the end user can choose from registered addresses. * `NO_SHIPPING` – No shipping address section is displayed. *Max. length: 127 characters (truncated after)* The platform’s order reference for the transaction. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. The amount must be equal to the total of all `UnitAmount` and `TaxAmount` of all `LineItems`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `PAYPAL` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the end user’s shipping address, managed by `ShippingPreference`. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *object* Information about the items purchased in the transaction. The total of all line items’ `UnitAmount` and `TaxAmount` must equal the `DebitedFunds` amount (negative amounts not allowed). *Max. length: 127 characters (truncated after)* The name of the item. The quantity of the item. The cost of the item, excluding tax. The tax amount applied to the item. *Max. length: 127 characters (truncated after)* The platform’s unique reference for the seller. This value must be consistently used for the given seller. You can use, for example, the Mangopay `UserId` or the seller’s business name or first name and last name.\ Caution: Failure to use a unique seller identifier may result in PayPal restricting your service. **Allowed values:** PHYSICAL\_GOODS, DIGITAL\_GOODS, DONATION The category of the item: * `PHYSICAL_GOODS` – Tangible items that can be physically shipped and received with proof of delivery upon arrival. * `DIGITAL_GOODS` – Products or services that are distributed and consumed via digital platforms or devices.  * `DONATION` – Voluntary contribution made without any goods or services received in return. Multiple line items can be categorized as `DONATION` within a single transaction, however it is not possible to combine `DONATION` other line item categories within the same transaction. **Returned values:** One of the supported languages in the ISO 639-1 format: AT, BR, CA, CH, CN, DE, DK, ES, FR, GB, ID, IL, IT, JK, JP, NL, NO, PL, PT, RU, SE, TH, TR, TW, US. The language in which the PayPal payment page is to be displayed. **Returned values:** `SET_PROVIDED_ADDRESS`, `GET_FROM_FILE`, `NO_SHIPPING` Information about the shipping address behavior on the PayPal payment page: * `SET_PROVIDED_ADDRESS` - The address provided in the `Shipping` parameter is displayed and is not editable. If this value is sent, the `Shipping` parameter is required. * `GET_FROM_FILE` – The `Shipping` parameter is ignored and the end user can choose from registered addresses. * `NO_SHIPPING` – No shipping address section is displayed. The email address registered on the PayPal account used to make the payment. *Max. length: 127 characters (truncated after)* The platform’s order reference for the transaction. *object* Shipping information of the `LineItems` added to the pay-in object. The shipment’s tracking number provided by the carrier. The carrier for the shipment. Use the country-specific version of the carrier if it exists, otherwise use its global version. **Default value:** false If `true`, sends an email notification to the `PaypalBuyerAccountEmail` containing the `TrackingNumber` and `Carrier`, which allows the end user to track their shipment with the carrier. The URL to which the user is returned after canceling the payment. If not provided, the Cancel button returns the user to the RedirectURL. PayPal's unique identifier for the order. The country of the buyer. The first name of the buyer. The mobile phone number of the buyer. The last name of the buyer. The PayPal identifier of the buyer. ```json { "message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "id": "ec5265c3-4c41-47fe-a7f5-5f6bfc6cc34c", "date": 1694613912, "type": "param_error", "errors": { "shipping": "The shipping address is required when `ShippingPreference=SET_PROVIDED_ADDRESS`" } } ``` ```json { "message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "id": "58bf1a12-65e0-4298-a1cb-62dc800bcf84", "date": 1699366251, "type": "param_error", "errors": { "debitedAmount": "DebitedAmount has to be equal to the total amount of all the line items." } } ``` ```json 200 - Created { "Id": "wt_f79a219d-c952-41a0-9bc4-e575f8f1ef7a", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1711032499, "AuthorId": "user_m_01HS10X7WCFSVMAZTBVYY0HPXF", "DebitedFunds": { "Currency": "EUR", "Amount": 1500 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1200 }, "Fees": { "Currency": "EUR", "Amount": 300 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01HS10XBZQHDWSX10WW6RTMRA6", "CreditedUserId": "user_m_01HS10X7WCFSVMAZTBVYY0HPXF", "PaymentType": "PAYPAL", "ExecutionType": "WEB", "ReturnURL": "http://www.mangopay.com/docs/please-ignore?transactionId=wt_f79a219d-c952-41a0-9bc4-e575f8f1ef7a", "RedirectURL": "https://www.sandbox.paypal.com/checkoutnow?token=6MH08891XC585490F", "StatementDescriptor": "Mangopay", "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "île-de-france", "PostalCode": "75003", "Country": "FR" } }, "LineItems": [ { "Name": "Running shoes", "Quantity": 2, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 1", "Category": "PHYSICAL_GOODS" }, { "Name": "Walking shoes", "Quantity": 1, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 2", "Category": "PHYSICAL_GOODS" } ], "Culture": "FR", "ShippingPreference": "SET_PROVIDED_ADDRESS", "PaypalBuyerAccountEmail": null, "Reference": "1234", "Trackings": null, "CancelURL": "http://www.example.com/?transactionId=wt_f79a219d-c952-41a0-9bc4-e575f8f1ef7a", "PaypalPayerID": null, "BuyerCountry": null, "BuyerFirstname": null, "BuyerLastname": null, "BuyerPhone": null, "PaypalOrderID": "6MH08891XC585490F" } ``` ```json REST { "Tag": "Created using the Mangopay API Postman collection", "AuthorId": "user_m_01HS10X7WCFSVMAZTBVYY0HPXF", "DebitedFunds": { "Currency": "EUR", "Amount": 1500 }, "Fees": { "Currency": "EUR", "Amount": 300 }, "CreditedWalletId": "wlt_m_01HS10XBZQHDWSX10WW6RTMRA6", "ReturnURL": "http://www.mangopay.com/docs/please-ignore", "CancelURL": "http://www.example.com/", "StatementDescriptor": "MGP", "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "île-de-france", "PostalCode": "75003", "Country": "FR" } }, "LineItems": [ { "Name": "Running shoes", "Quantity": 2, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 1", "Category": "PHYSICAL_GOODS" }, { "Name": "Walking shoes", "Quantity": 1, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 2", "Category": "PHYSICAL_GOODS" } ], "Culture": "FR", "ShippingPreference": "SET_PROVIDED_ADDRESS", "Reference": "1234" } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key" }) let myPayIn = { PaymentType: 'PAYPAL', ExecutionType: 'WEB', AuthorId: 'user_m_01J84RCFJ0Q9RVQZ13618FSNWN', DebitedFunds: { Currency: 'EUR', Amount: 1000, }, Fees: { Currency: 'EUR', Amount: 0, }, CreditedWalletId: 'wlt_m_01HWAR863HPA3FAVEXA9J6JSYD', ReturnURL: 'https://mangopay.com/docs/please-ignore', StatementDescriptor: "MGP24", Shipping: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'Ile-de-France', PostalCode: '75000', Country: 'FR', }, }, LineItems: [ { Name: "running shoes", Quantity: 1, UnitAmount: 500, TaxAmount: 0, Description: "Red" }, { Name: "running shoes", Quantity: 1, UnitAmount: 500, TaxAmount: 0, Description: "Black" } ], ShippingPreference: "SET_PROVIDED_ADDRESS", Reference: "Ref24", Tag: 'Created with Mangopay NodeJS SDK' } const createPayPalPayIn = async (payin) => { return await mangopay.PayIns.createPayPal(payin) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createPayPalPayIn(myPayIn) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.core.LineItem; import com.mangopay.core.Money; import com.mangopay.core.Shipping; import com.mangopay.core.enumerations.CountryIso; import com.mangopay.core.enumerations.CultureCode; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.ShippingPreference; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInExecutionDetailsWeb; import com.mangopay.entities.subentities.PayInPaymentDetailsPayPal; import java.util.List; import java.util.ArrayList; public class CreatePaypalPayin { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; Address address = new Address(); address.setAddressLine1("2795 Edgewood Road"); address.setCity("Little Rock"); address.setRegion("Arkansas"); address.setPostalCode("72212"); address.setCountry(CountryIso.FR); PayIn payIn = new PayIn(); payIn.setAuthorId(userId); payIn.setDebitedFunds(new Money()); payIn.getDebitedFunds().setAmount(1000); payIn.getDebitedFunds().setCurrency(CurrencyIso.EUR); payIn.setFees(new Money()); payIn.getFees().setAmount(5); payIn.getFees().setCurrency(CurrencyIso.EUR); payIn.setCreditedWalletId(walletId); PayInPaymentDetailsPayPal paymentDetails = new PayInPaymentDetailsPayPal(); paymentDetails.setShipping(new Shipping()); paymentDetails.getShipping().setFirstName("Alessandra"); paymentDetails.getShipping().setLastName("Wilderman"); paymentDetails.getShipping().setAddress(address); List lineItems = new ArrayList<>(); lineItems.add(new LineItem( "Item 1", 1, 1000, 0, "Item description" ) .setCategory("PHYSICAL_GOODS")); paymentDetails.setLineItems(lineItems); paymentDetails.setShippingPreference(ShippingPreference.GET_FROM_FILE); paymentDetails.setReference("Reference"); paymentDetails.setStatementDescriptor("Jul2024"); payIn.setPaymentDetails(paymentDetails); PayInExecutionDetailsWeb executionDetails = new PayInExecutionDetailsWeb(); executionDetails.setReturnUrl("http://mangopay.com"); executionDetails.setCulture(CultureCode.FR); payIn.setExecutionDetails(executionDetails); payIn.setTag("Create using the Mangopay Java SDK"); PayIn createPaypalPayin = mangopay.getPayInApi().createPayPal(payIn); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPaypalPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, PayPalWebPayIn from mangopay.utils import Money, LineItem, Shipping, Address natural_user = NaturalUser.get('210513027') paypal_payin = PayPalWebPayIn( author_id = natural_user.id, credited_wallet_id = '210514820', debited_funds = Money(amount=1500, currency='EUR'), fees = Money(amount=300, currency='EUR'), culture = 'FR', return_url = 'https://www.mangopay.com/docs/please-ignore', line_items = [ LineItem( name = 'Running shoes', quantity=1, unit_amount=400, tax_amount=100, description='ID of Seller 1'), LineItem( name = 'Walking shoes', quantity=2, unit_amount=400, tax_amount=100, description='ID of Seller 2') ], shipping = Shipping( first_name = natural_user.first_name, last_name = natural_user.last_name, address = Address( address_line_1 = natural_user.address.address_line_1, address_line_2 = natural_user.address.address_line_2, city = natural_user.address.city, region = natural_user.address.region, postal_code = natural_user.address.postal_code, country = natural_user.address.country, ) ), shipping_preference = 'SET_PROVIDED_ADDRESS', reference = '1234', statement_descriptor = 'MGP', tag = 'Created using the Mangopay Python SDK' ) create_paypal_payin = paypal_payin.save() pprint(create_paypal_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var returnUrl = "https://www.mangopay.com/docs/please-ignore/"; List lineItems = new List() { new LineItem { Name = "running shoes", Quantity = 2, UnitAmount = 500, TaxAmount = 0, Description = "seller ID" } }; Shipping shipping = new Shipping { Address = new Address { AddressLine1 = "Address line 1", AddressLine2 = "Address line 2", City = "City", Country = CountryIso.FR, PostalCode = "11222", Region = "Region" }, FirstName = "Dolly", LastName = "Nelson" }; var payIn = new PayInPayPalWebPostDTO(userId, new Money { Amount = 1000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, returnUrl, lineItems, shipping, "MGP", CultureCode.FR, ShippingPreference.SET_PROVIDED_ADDRESS, "3214" ) { Tag = "Created using the Mangopay .NET SDK" }; var createPayPalPayIn = await api.PayIns.CreatePayPalWebAsync(payIn); string prettyPrint = JsonConvert.SerializeObject(createPayPalPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The PayPal PayIn object ### Description The PayPal PayIn object allows platforms to process payments made via PayPal. **Note – Prerequisites to using PayPal** Using PayPal (including Sandbox testing) requires approval and activation from PayPal. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. The amount must be equal to the total of all `UnitAmount` and `TaxAmount` of all `LineItems`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `PAYPAL` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the end user’s shipping address, managed by `ShippingPreference`. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. *object* Information about the items purchased in the transaction. The total of all line items’ `UnitAmount` and `TaxAmount` must equal the `DebitedFunds` amount (negative amounts not allowed). *Max. length: 127 characters (truncated after)* The name of the item. The quantity of the item. The cost of the item, excluding tax. The tax amount applied to the item. *Max. length: 127 characters (truncated after)* The platform’s unique reference for the seller. This value must be consistently used for the given seller. You can use, for example, the Mangopay `UserId` or the seller’s business name or first name and last name.\ Caution: Failure to use a unique seller identifier may result in PayPal restricting your service. **Allowed values:** PHYSICAL\_GOODS, DIGITAL\_GOODS, DONATION The category of the item: * `PHYSICAL_GOODS` – Tangible items that can be physically shipped and received with proof of delivery upon arrival. * `DIGITAL_GOODS` – Products or services that are distributed and consumed via digital platforms or devices.  * `DONATION` – Voluntary contribution made without any goods or services received in return. Multiple line items can be categorized as `DONATION` within a single transaction, however it is not possible to combine `DONATION` other line item categories within the same transaction. **Allowed values:** One of the supported languages in the ISO 639-1 format: AT, BR, CA, CH, CN, DE, DK, ES, FR, GB, ID, IL, IT, JK, JP, NL, NO, PL, PT, RU, SE, TH, TR, TW, US. The language in which the PayPal payment page is to be displayed. **Returned values:** `SET_PROVIDED_ADDRESS`, `GET_FROM_FILE`, `NO_SHIPPING` Information about the shipping address behavior on the PayPal payment page: * `SET_PROVIDED_ADDRESS` - The address provided in the `Shipping` parameter is displayed and is not editable. If this value is sent, the `Shipping` parameter is required. * `GET_FROM_FILE` – The `Shipping` parameter is ignored and the end user can choose from registered addresses. * `NO_SHIPPING` – No shipping address section is displayed. *Max. length: 127 characters (truncated after)* The platform’s order reference for the transaction. The email address registered on the PayPal account used to make the payment. *object* Shipping information of the `LineItems` added to the pay-in object. The shipment’s tracking number provided by the carrier. The carrier for the shipment. Use the country-specific version of the carrier if it exists, otherwise use its global version. **Default value:** false If `true`, sends an email notification to the `PaypalBuyerAccountEmail` containing the `TrackingNumber` and `Carrier`, which allows the end user to track their shipment with the carrier. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about PayPal # View a PayIn (PayPal) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. The amount must be equal to the total of all `UnitAmount` and `TaxAmount` of all `LineItems`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Returned values:** `PAYPAL` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the end user’s shipping address, managed by `ShippingPreference`. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *object* Information about the items purchased in the transaction. The total of all line items’ `UnitAmount` and `TaxAmount` must equal the `DebitedFunds` amount (negative amounts not allowed). *Max. length: 127 characters (truncated after)* The name of the item. The quantity of the item. The cost of the item, excluding tax. The tax amount applied to the item. *Max. length: 127 characters (truncated after)* The platform’s unique reference for the seller. This value must be consistently used for the given seller. You can use, for example, the Mangopay `UserId` or the seller’s business name or first name and last name.\ Caution: Failure to use a unique seller identifier may result in PayPal restricting your service. **Allowed values:** PHYSICAL\_GOODS, DIGITAL\_GOODS, DONATION The category of the item: * `PHYSICAL_GOODS` – Tangible items that can be physically shipped and received with proof of delivery upon arrival. * `DIGITAL_GOODS` – Products or services that are distributed and consumed via digital platforms or devices.  * `DONATION` – Voluntary contribution made without any goods or services received in return. Multiple line items can be categorized as `DONATION` within a single transaction, however it is not possible to combine `DONATION` other line item categories within the same transaction. **Returned values:** One of the supported languages in the ISO 639-1 format: AT, BR, CA, CH, CN, DE, DK, ES, FR, GB, ID, IL, IT, JK, JP, NL, NO, PL, PT, RU, SE, TH, TR, TW, US. The language in which the PayPal payment page is to be displayed. **Returned values:** `SET_PROVIDED_ADDRESS`, `GET_FROM_FILE`, `NO_SHIPPING` Information about the shipping address behavior on the PayPal payment page: * `SET_PROVIDED_ADDRESS` - The address provided in the `Shipping` parameter is displayed and is not editable. If this value is sent, the `Shipping` parameter is required. * `GET_FROM_FILE` – The `Shipping` parameter is ignored and the end user can choose from registered addresses. * `NO_SHIPPING` – No shipping address section is displayed. The email address registered on the PayPal account used to make the payment. *Max. length: 127 characters (truncated after)* The platform’s order reference for the transaction. *object* Shipping information of the `LineItems` added to the pay-in object. The shipment’s tracking number provided by the carrier. The carrier for the shipment. Use the country-specific version of the carrier if it exists, otherwise use its global version. **Default value:** false If `true`, sends an email notification to the `PaypalBuyerAccountEmail` containing the `TrackingNumber` and `Carrier`, which allows the end user to track their shipment with the carrier. The URL to which the user is returned after canceling the payment. If not provided, the Cancel button returns the user to the RedirectURL. PayPal's unique identifier for the order. The country of the buyer. The first name of the buyer. The mobile phone number of the buyer. The last name of the buyer. The PayPal identifier of the buyer. ```json 200 - Succeeded { "Id": "wt_00a046e2-cc5c-46ba-91e0-1feca23922e4", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1699367848, "AuthorId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 1500 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1200 }, "Fees": { "Currency": "EUR", "Amount": 300 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1699368834, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204089031", "CreditedUserId": "204068024", "PaymentType": "PAYPAL", "ExecutionType": "WEB", "ReturnURL": "http://www.mangopay.com/docs/please-ignore?transactionId=wt_00a046e2-cc5c-46ba-91e0-1feca23922e4", "RedirectURL": "https://www.sandbox.paypal.com/checkoutnow?token=48X37022FD879043B", "StatementDescriptor": "Mangopay", "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "île-de-france", "PostalCode": "75003", "Country": "FR" } }, "LineItems": [ { "Name": "Running shoes", "Quantity": 2, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 1" }, { "Name": "Walking shoes", "Quantity": 1, "UnitAmount": 400, "TaxAmount": 100, "Description": "ID of Seller 2" } ], "Culture": "FR", "ShippingPreference": "SET_PROVIDED_ADDRESS", "PaypalBuyerAccountEmail": "alex.smith@example.com", "Reference": "1234", "Trackings": null } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetPayPalWebAsync("wt_2bd24e45-7b9d-4095-87a7-516a418d4c81"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Permission Group POST /v2.01/{ClientId}/clients/permissiongroups ### Body parameters The name of the permission group. *Max. length: 255 characters* Custom data that you can add to this object. The detailed permissions for the permission group. Permissions for SSO-related endpoints When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Permission Groups. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Wallets. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Transactions. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Bank Accounts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Payouts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client PayIns. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Logo. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Users. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Wallets. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Cards. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Preauthorizations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Pay-ins. Permissions for all endpoints related to Transfers. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Refunds. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Bank Account. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Payouts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to KYC Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Disputes. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Repudiations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Mandates. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Reporting. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to API Responses. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Events. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Hooks. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Transactions. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Banking aliases. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to UBO Declarations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-in registrations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-ins. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to KYB Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Token. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. ### Responses The unique identifier of the object. The name of the permission group. *Max. length: 255 characters* Custom data that you can add to this object. **Returned values:** `DEFAULT`, `CUSTOM` The type of permissions which can either be: * `DEFAULT` – One of the default groups provided by Mangopay (ADMIN, WRITE, READ). These permission groups cannot be modified. * `CUSTOM` – Editable permission groups created by the platform. The date and time at which the object was created. The detailed permissions for the permission group. Permissions for SSO-related endpoints When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Permission Groups. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Wallets. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Transactions. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Bank Accounts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Payouts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client PayIns. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Logo. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Users. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Wallets. Permissions for all endpoints related to Cards. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Preauthorizations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Pay-ins. Permissions for all endpoints related to Transfers. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Refunds. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Bank Account. Permissions for all endpoints related to Payouts. Permissions for all endpoints related to KYC Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Disputes. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Repudiations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Mandates. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Reporting. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to API Responses. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Events. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Hooks. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Transactions. Permissions for all endpoints related to Banking aliases. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to UBO Declarations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-in registrations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-ins. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to KYB Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Token. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. ```json 200 { "Id": "192852350", "Name": "Platform", "Tag": "Custom meta", "Type": "CUSTOM", "CreationDate": 1686040369, "Scopes": { "SSOs": { "Read": true, "Create": true, "Edit": true }, "PermissionGroups": { "Read": true, "Create": true, "Edit": true }, "ClientDetails": { "Read": true, "Create": true, "Edit": true }, "ClientWallets": { "Read": false, "Create": false, "Edit": false }, "ClientTransactions": { "Read": false, "Create": false, "Edit": false }, "ClientBankAccounts": { "Read": false, "Create": false, "Edit": false }, "ClientPayouts": { "Read": false, "Create": false, "Edit": false }, "ClientPayins": { "Read": false, "Create": false, "Edit": false }, "ClientLogo": { "Read": false, "Create": false, "Edit": false }, "Users": { "Read": false, "Create": false, "Edit": false }, "Wallets": { "Read": false, "Create": false, "Edit": false }, "Cards": { "Read": false, "Create": false, "Edit": false }, "PreAuthorizations": { "Read": false, "Create": false, "Edit": false }, "Payins": { "Read": false, "Create": false, "Edit": false }, "Transfers": { "Read": false, "Create": false, "Edit": false }, "Refunds": { "Read": false, "Create": false, "Edit": false }, "BankAccounts": { "Read": false, "Create": false, "Edit": false }, "Payouts": { "Read": false, "Create": false, "Edit": false }, "KYCDocuments": { "Read": false, "Create": false, "Edit": false }, "Disputes": { "Read": false, "Create": false, "Edit": false }, "Repudiations": { "Read": false, "Create": false, "Edit": false }, "Mandates": { "Read": false, "Create": false, "Edit": false }, "Reporting": { "Read": false, "Create": false, "Edit": false }, "Responses": { "Read": false, "Create": false, "Edit": false }, "Events": { "Read": false, "Create": false, "Edit": false }, "Hooks": { "Read": false, "Create": false, "Edit": false }, "Transactions": { "Read": false, "Create": false, "Edit": false }, "BankingAliases": { "Read": false, "Create": false, "Edit": false }, "UboDeclarations": { "Read": false, "Create": false, "Edit": false }, "RecurringPayinsRegistrations": { "Read": false, "Create": false, "Edit": false }, "RecurringPayins": { "Read": false, "Create": false, "Edit": false }, "KYBDocuments": { "Read": false, "Create": false, "Edit": false }, "Token": { "Read": false, "Create": false, "Edit": false } } } ``` ```json REST { "Name": "Platform", "Tag": "Custom meta", "Scopes": { "SSOs": { "Read": true, "Create": true, "Edit": true }, "PermissionGroups": { "Read": true, "Create": true, "Edit": true }, "ClientDetails": { "Read": true, "Create": true, "Edit": true }, "ClientWallets": { "Read": false, "Create": false, "Edit": false }, "ClientTransactions": { "Read": false, "Create": false, "Edit": false }, "ClientBankAccounts": { "Read": false, "Create": false, "Edit": false }, "ClientPayouts": { "Read": false, "Create": false, "Edit": false }, "ClientPayins": { "Read": false, "Create": false, "Edit": false }, "ClientLogo": { "Read": false, "Create": false, "Edit": false }, "Users": { "Read": false, "Create": false, "Edit": false }, "Wallets": { "Read": false, "Create": false, "Edit": false }, "Cards": { "Read": false, "Create": false, "Edit": false }, "PreAuthorizations": { "Read": false, "Create": false, "Edit": false }, "Payins": { "Read": false, "Create": false, "Edit": false }, "Transfers": { "Read": false, "Create": false, "Edit": false }, "Refunds": { "Read": false, "Create": false, "Edit": false }, "BankAccounts": { "Read": false, "Create": false, "Edit": false }, "Payouts": { "Read": false, "Create": false, "Edit": false }, "KYCDocuments": { "Read": false, "Create": false, "Edit": false }, "Disputes": { "Read": false, "Create": false, "Edit": false }, "Repudiations": { "Read": false, "Create": false, "Edit": false }, "Mandates": { "Read": false, "Create": false, "Edit": false }, "Reporting": { "Read": false, "Create": false, "Edit": false }, "Responses": { "Read": false, "Create": false, "Edit": false }, "Events": { "Read": false, "Create": false, "Edit": false }, "Hooks": { "Read": false, "Create": false, "Edit": false }, "Transactions": { "Read": false, "Create": false, "Edit": false }, "BankingAliases": { "Read": false, "Create": false, "Edit": false }, "UboDeclarations": { "Read": false, "Create": false, "Edit": false }, "RecurringPayinsRegistrations": { "Read": false, "Create": false, "Edit": false }, "RecurringPayins": { "Read": false, "Create": false, "Edit": false }, "KYBDocuments": { "Read": false, "Create": false, "Edit": false }, "Token": { "Read": false, "Create": false, "Edit": false } } } ``` # List all Permission Groups GET /v2.01/{ClientId}/clients/permissiongroups ### Responses The list of permission groups created by the platform. The permission group created by the platform. *Max. length: 255 characters* The name of the permission group. *Max. length: 255 characters* Custom data that you can add to this object. **Returned values:** `DEFAULT`, `CUSTOM` The type of permissions which can either be: * `DEFAULT` – One of the default groups provided by Mangopay (ADMIN, WRITE, READ). These permission groups cannot be modified. * `CUSTOM` – Editable permission groups created by the platform. The date and time at which the object was created. The detailed permissions for the permission group. Permissions for SSO-related endpoints When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Permission Groups. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Wallets. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Transactions. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Bank Accounts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Payouts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client PayIns. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Logo. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Users. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Wallets. Permissions for all endpoints related to Cards. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Preauthorizations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Pay-ins. Permissions for all endpoints related to Transfers. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Refunds. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Bank Account. Permissions for all endpoints related to Payouts. Permissions for all endpoints related to KYC Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Disputes. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Repudiations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Mandates. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Reporting. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to API Responses. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Events. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Hooks. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Transactions. Permissions for all endpoints related to Banking aliases. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to UBO Declarations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-in registrations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-ins. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to KYB Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Token. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. ```json 200 [ { "Id": "ADMIN", "Name": "Admin", "Tag": null, "Type": "DEFAULT", "CreationDate": 1646232842, "Scopes": { "SSOs": { "Read": true, "Create": true, "Edit": true }, "PermissionGroups": { "Read": true, "Create": true, "Edit": true }, "ClientDetails": { "Read": true, "Create": true, "Edit": true }, "ClientWallets": { "Read": true, "Create": true, "Edit": true }, "ClientTransactions": { "Read": true, "Create": true, "Edit": true }, "ClientBankAccounts": { "Read": true, "Create": true, "Edit": true }, "ClientPayouts": { "Read": true, "Create": true, "Edit": true }, "ClientPayins": { "Read": true, "Create": true, "Edit": true }, "ClientLogo": { "Read": true, "Create": true, "Edit": true }, "Users": { "Read": true, "Create": true, "Edit": true }, "Wallets": { "Read": true, "Create": true, "Edit": true }, "Cards": { "Read": true, "Create": true, "Edit": true }, "PreAuthorizations": { "Read": true, "Create": true, "Edit": true }, "Payins": { "Read": true, "Create": true, "Edit": true }, "Transfers": { "Read": true, "Create": true, "Edit": true }, "Refunds": { "Read": true, "Create": true, "Edit": true }, "BankAccounts": { "Read": true, "Create": true, "Edit": true }, "Payouts": { "Read": true, "Create": true, "Edit": true }, "KYCDocuments": { "Read": true, "Create": true, "Edit": true }, "Disputes": { "Read": true, "Create": true, "Edit": true }, "Repudiations": { "Read": true, "Create": true, "Edit": true }, "Mandates": { "Read": true, "Create": true, "Edit": true }, "Reporting": { "Read": true, "Create": true, "Edit": true }, "Responses": { "Read": true, "Create": true, "Edit": true }, "Events": { "Read": true, "Create": true, "Edit": true }, "Hooks": { "Read": true, "Create": true, "Edit": true }, "Transactions": { "Read": true, "Create": true, "Edit": true }, "BankingAliases": { "Read": true, "Create": true, "Edit": true }, "UboDeclarations": { "Read": true, "Create": true, "Edit": true }, "RecurringPayinsRegistrations": { "Read": false, "Create": false, "Edit": false }, "RecurringPayins": { "Read": false, "Create": false, "Edit": false }, "KYBDocuments": { "Read": false, "Create": false, "Edit": false }, "Token": { "Read": false, "Create": false, "Edit": false } } } ] ``` # The Permission Group object ### Description The Permission Group object sets a specific level of permissions for Dashboard users. Each SSO is assigned a Permission Group that defines which API elements the user is allowed to view, edit, and create in the Dashboard. By default, Mangopay provides 3 Permission Groups: * `READ` – Allows the Dashboard user to view operational data relating to users, payments, and compliance, but not platform settings. * `WRITE` – Allows the Dashboard user to view (like READ) and edit operational data relating to users, payments, and compliance, but not platform settings. * `ADMIN` – Allows the Dashboard user to view and edit operational data (like WRITE), as well as view and edit the platform settings (Client, SSO, and Permission Group objects). ### Attributes The unique identifier of the object. The name of the permission group. *Max. length: 255 characters* Custom data that you can add to this object. **Returned values:** `DEFAULT`, `CUSTOM` The type of permissions which can either be: * `DEFAULT` – One of the default groups provided by Mangopay (ADMIN, WRITE, READ). These permission groups cannot be modified. * `CUSTOM` – Editable permission groups created by the platform. The date and time at which the object was created. The detailed permissions for the permission group. Permissions for SSO-related endpoints When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Permission Groups. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Wallets. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Transactions. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Bank Accounts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Payouts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client PayIns. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Logo. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Users. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Wallets. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Cards. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Preauthorizations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Pay-ins. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Transfers. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Refunds. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Bank Account. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Payouts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to KYC Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Disputes. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Repudiations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Mandates. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Reporting. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to API Responses. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Events. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Hooks. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Transactions. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Banking aliases. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to UBO Declarations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-in registrations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-ins. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to KYB Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Token. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. # Update a Permission Group PUT /v2.01/{ClientId}/clients/permissiongroups/{PermissionGroupId} ### Path parameters The unique identifier of the permission group. Identifiers for default permission groups are ADMIN, WRITE, and READ (these are not editable). ### Body parameters The name of the permission group. *Max. length: 255 characters* Custom data that you can add to this object. The detailed permissions for the permission group. Permissions for SSO-related endpoints When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Permission Groups. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Wallets. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Transactions. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Bank Accounts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Payouts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client PayIns. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Logo. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Users. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Wallets. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Cards. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Preauthorizations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Pay-ins. Permissions for all endpoints related to Transfers. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Refunds. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Bank Account. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Payouts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to KYC Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Disputes. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Repudiations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Mandates. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Reporting. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to API Responses. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Events. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Hooks. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Transactions. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Banking aliases. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to UBO Declarations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-in registrations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-ins. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to KYB Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Token. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. ### Responses The unique identifier of the object. The name of the permission group. *Max. length: 255 characters* Custom data that you can add to this object. **Returned values:** `DEFAULT`, `CUSTOM` The type of permissions which can either be: * `DEFAULT` – One of the default groups provided by Mangopay (ADMIN, WRITE, READ). These permission groups cannot be modified. * `CUSTOM` – Editable permission groups created by the platform. The date and time at which the object was created. The detailed permissions for the permission group. Permissions for SSO-related endpoints When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Permission Groups. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Wallets. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Transactions. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Bank Accounts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Payouts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client PayIns. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Logo. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Users. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Wallets. Permissions for all endpoints related to Cards. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Preauthorizations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Pay-ins. Permissions for all endpoints related to Transfers. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Refunds. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Bank Account. Permissions for all endpoints related to Payouts. Permissions for all endpoints related to KYC Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Disputes. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Repudiations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Mandates. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Reporting. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to API Responses. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Events. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Hooks. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Transactions. Permissions for all endpoints related to Banking aliases. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to UBO Declarations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-in registrations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-ins. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to KYB Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Token. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. ```json 200 { "Id": "192852350", "Name": "Platform", "Tag": "Custom meta", "Type": "CUSTOM", "CreationDate": 1686040369, "Scopes": { "SSOs": { "Read": true, "Create": true, "Edit": true }, "PermissionGroups": { "Read": true, "Create": true, "Edit": true }, "ClientDetails": { "Read": true, "Create": true, "Edit": true }, "ClientWallets": { "Read": false, "Create": false, "Edit": false }, "ClientTransactions": { "Read": false, "Create": false, "Edit": false }, "ClientBankAccounts": { "Read": false, "Create": false, "Edit": false }, "ClientPayouts": { "Read": false, "Create": false, "Edit": false }, "ClientPayins": { "Read": false, "Create": false, "Edit": false }, "ClientLogo": { "Read": false, "Create": false, "Edit": false }, "Users": { "Read": false, "Create": false, "Edit": false }, "Wallets": { "Read": false, "Create": false, "Edit": false }, "Cards": { "Read": false, "Create": false, "Edit": false }, "PreAuthorizations": { "Read": false, "Create": false, "Edit": false }, "Payins": { "Read": false, "Create": false, "Edit": false }, "Transfers": { "Read": false, "Create": false, "Edit": false }, "Refunds": { "Read": false, "Create": false, "Edit": false }, "BankAccounts": { "Read": false, "Create": false, "Edit": false }, "Payouts": { "Read": false, "Create": false, "Edit": false }, "KYCDocuments": { "Read": false, "Create": false, "Edit": false }, "Disputes": { "Read": false, "Create": false, "Edit": false }, "Repudiations": { "Read": false, "Create": false, "Edit": false }, "Mandates": { "Read": false, "Create": false, "Edit": false }, "Reporting": { "Read": false, "Create": false, "Edit": false }, "Responses": { "Read": false, "Create": false, "Edit": false }, "Events": { "Read": false, "Create": false, "Edit": false }, "Hooks": { "Read": false, "Create": false, "Edit": false }, "Transactions": { "Read": false, "Create": false, "Edit": false }, "BankingAliases": { "Read": false, "Create": false, "Edit": false }, "UboDeclarations": { "Read": false, "Create": false, "Edit": false }, "RecurringPayinsRegistrations": { "Read": false, "Create": false, "Edit": false }, "RecurringPayins": { "Read": false, "Create": false, "Edit": false }, "KYBDocuments": { "Read": false, "Create": false, "Edit": false }, "Token": { "Read": false, "Create": false, "Edit": false } } } ``` ```json REST { "Name": "Platform", "Tag": "Custom meta", "Scopes": { "SSOs": { "Read": true, "Create": true, "Edit": true }, "PermissionGroups": { "Read": true, "Create": true, "Edit": true }, "ClientDetails": { "Read": true, "Create": true, "Edit": true }, "ClientWallets": { "Read": false, "Create": false, "Edit": false }, "ClientTransactions": { "Read": false, "Create": false, "Edit": false }, "ClientBankAccounts": { "Read": false, "Create": false, "Edit": false }, "ClientPayouts": { "Read": false, "Create": false, "Edit": false }, "ClientPayins": { "Read": false, "Create": false, "Edit": false }, "ClientLogo": { "Read": false, "Create": false, "Edit": false }, "Users": { "Read": false, "Create": false, "Edit": false }, "Wallets": { "Read": false, "Create": false, "Edit": false }, "Cards": { "Read": false, "Create": false, "Edit": false }, "PreAuthorizations": { "Read": false, "Create": false, "Edit": false }, "Payins": { "Read": false, "Create": false, "Edit": false }, "Transfers": { "Read": false, "Create": false, "Edit": false }, "Refunds": { "Read": false, "Create": false, "Edit": false }, "BankAccounts": { "Read": false, "Create": false, "Edit": false }, "Payouts": { "Read": false, "Create": false, "Edit": false }, "KYCDocuments": { "Read": false, "Create": false, "Edit": false }, "Disputes": { "Read": false, "Create": false, "Edit": false }, "Repudiations": { "Read": false, "Create": false, "Edit": false }, "Mandates": { "Read": false, "Create": false, "Edit": false }, "Reporting": { "Read": false, "Create": false, "Edit": false }, "Responses": { "Read": false, "Create": false, "Edit": false }, "Events": { "Read": false, "Create": false, "Edit": false }, "Hooks": { "Read": false, "Create": false, "Edit": false }, "Transactions": { "Read": false, "Create": false, "Edit": false }, "BankingAliases": { "Read": false, "Create": false, "Edit": false }, "UboDeclarations": { "Read": false, "Create": false, "Edit": false }, "RecurringPayinsRegistrations": { "Read": false, "Create": false, "Edit": false }, "RecurringPayins": { "Read": false, "Create": false, "Edit": false }, "KYBDocuments": { "Read": false, "Create": false, "Edit": false }, "Token": { "Read": false, "Create": false, "Edit": false } } } ``` # View a Permission Group GET /v2.01/{ClientId}/clients/permissiongroups/{PermissionGroupId} ### Path parameters The unique identifier of the permission group. Identifiers for default permission groups are ADMIN, WRITE, and READ (these are not editable). ### Responses The unique identifier of the object. The name of the permission group. *Max. length: 255 characters* Custom data that you can add to this object. **Returned values:** `DEFAULT`, `CUSTOM` The type of permissions which can either be: * `DEFAULT` – One of the default groups provided by Mangopay (ADMIN, WRITE, READ). These permission groups cannot be modified. * `CUSTOM` – Editable permission groups created by the platform. The date and time at which the object was created. The detailed permissions for the permission group. Permissions for SSO-related endpoints When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Permission Groups. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Wallets. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Transactions. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Bank Accounts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Payouts. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client PayIns. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to the platform Client Logo. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Users. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Wallets. Permissions for all endpoints related to Cards. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Preauthorizations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Pay-ins. Permissions for all endpoints related to Transfers. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Refunds. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Bank Account. Permissions for all endpoints related to Payouts. Permissions for all endpoints related to KYC Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Disputes. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Repudiations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Mandates. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Reporting. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to API Responses. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Events. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Hooks. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Transactions. Permissions for all endpoints related to Banking aliases. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to UBO Declarations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-in registrations. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to recurring pay-ins. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to KYB Documents. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. Permissions for all endpoints related to Token. When set to true, users can make GET requests on the related endpoints. When set to true, users can make PUT requests on the related endpoints. When set to true, users can make POST requests on the related endpoints. ```json 200 { "Id": "192852350", "Name": "Platform", "Tag": "Custom meta", "Type": "CUSTOM", "CreationDate": 1686040369, "Scopes": { "SSOs": { "Read": true, "Create": true, "Edit": true }, "PermissionGroups": { "Read": true, "Create": true, "Edit": true }, "ClientDetails": { "Read": true, "Create": true, "Edit": true }, "ClientWallets": { "Read": false, "Create": false, "Edit": false }, "ClientTransactions": { "Read": false, "Create": false, "Edit": false }, "ClientBankAccounts": { "Read": false, "Create": false, "Edit": false }, "ClientPayouts": { "Read": false, "Create": false, "Edit": false }, "ClientPayins": { "Read": false, "Create": false, "Edit": false }, "ClientLogo": { "Read": false, "Create": false, "Edit": false }, "Users": { "Read": false, "Create": false, "Edit": false }, "Wallets": { "Read": false, "Create": false, "Edit": false }, "Cards": { "Read": false, "Create": false, "Edit": false }, "PreAuthorizations": { "Read": false, "Create": false, "Edit": false }, "Payins": { "Read": false, "Create": false, "Edit": false }, "Transfers": { "Read": false, "Create": false, "Edit": false }, "Refunds": { "Read": false, "Create": false, "Edit": false }, "BankAccounts": { "Read": false, "Create": false, "Edit": false }, "Payouts": { "Read": false, "Create": false, "Edit": false }, "KYCDocuments": { "Read": false, "Create": false, "Edit": false }, "Disputes": { "Read": false, "Create": false, "Edit": false }, "Repudiations": { "Read": false, "Create": false, "Edit": false }, "Mandates": { "Read": false, "Create": false, "Edit": false }, "Reporting": { "Read": false, "Create": false, "Edit": false }, "Responses": { "Read": false, "Create": false, "Edit": false }, "Events": { "Read": false, "Create": false, "Edit": false }, "Hooks": { "Read": false, "Create": false, "Edit": false }, "Transactions": { "Read": false, "Create": false, "Edit": false }, "BankingAliases": { "Read": false, "Create": false, "Edit": false }, "UboDeclarations": { "Read": false, "Create": false, "Edit": false }, "RecurringPayinsRegistrations": { "Read": false, "Create": false, "Edit": false }, "RecurringPayins": { "Read": false, "Create": false, "Edit": false }, "KYBDocuments": { "Read": false, "Create": false, "Edit": false }, "Token": { "Read": false, "Create": false, "Edit": false } } } ``` # Cancel or validate a Preauthorization PUT /v2.01/{ClientId}/preauthorizations/{PreauthorizationId} This call is used to manually close the preauthorization hold period before the `ExpirationDate`, thereby releasing the preauthorized funds.  The `PaymentStatus` can be set to: * `CANCELED` when no preauthorized pay-ins have been made to capture funds. Trying to cancel a used preauthorization returns an error. * `VALIDATED` when at least one preauthorized pay-in has been made to capture funds. Trying to validate an unused preauthorization returns an error. **Caution – Canceling or validating a preauthorization is irreversible** A preauthorization with the `CANCELED` or `VALIDATED` status can’t be reused. ### Path parameters The unique identifier of the preauthorization. ### Body parameters **Allowed values:** `CANCELED`, `VALIDATED` The status of the preauthorization object: * `WAITING` – The remaining preauthorized funds can be captured by making one or several preauthorized pay-ins. Pay-ins can only be made against a preauthorization with the `WAITING` status. * `CANCELED` – The preauthorization was canceled manually before any preauthorized pay-ins were made, or it was canceled automatically because the authorization failed. * `EXPIRED` – The hold period on the preauthorized funds has ended without any preauthorized pay-ins taking place. * `VALIDATED` – During the hold period: Indicates that all the preauthorized funds have been captured (`RemainingFunds` is zero) and no more preauthorized pay-ins can be made. After the hold period: Indicates that at least one capture was made during the hold period. ### Responses *Max. length: 255 characters* The unique identifier of the preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the remaining preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The date and time at which successful authorization occurred. If authorization failed, the value is `null`. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `EXPIRED`, `VALIDATED` The status of the preauthorization object: * `WAITING` – The remaining preauthorized funds can be captured by making one or several preauthorized pay-ins. Pay-ins can only be made against a preauthorization with the `WAITING` status. * `CANCELED` – The preauthorization was canceled manually before any preauthorized pay-ins were made, or it was canceled automatically because the authorization failed. * `EXPIRED` – The hold period on the preauthorized funds has ended without any preauthorized pay-ins taking place. * `VALIDATED` – During the hold period: Indicates that all the preauthorized funds have been captured (`RemainingFunds` is zero) and no more preauthorized pay-ins can be made. After the hold period: Indicates that at least one capture was made during the hold period. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made or `VALIDATED` if at least one capture was made. The unique identifier of the pay-in. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). **Default value:** true Whether multiple captures are activated for the preauthorization. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. *Max. length: 255 characters* The unique identifier of the preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the remaining preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The date and time at which successful authorization occurred. If authorization failed, the value is `null`. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `EXPIRED`, `VALIDATED` The status of the preauthorization object: * `WAITING` – The remaining preauthorized funds can be captured by making one or several preauthorized pay-ins. Pay-ins can only be made against a preauthorization with the `WAITING` status. * `CANCELED` – The preauthorization was canceled manually before any preauthorized pay-ins were made, or it was canceled automatically because the authorization failed. * `EXPIRED` – The hold period on the preauthorized funds has ended without any preauthorized pay-ins taking place. * `VALIDATED` – During the hold period: Indicates that all the preauthorized funds have been captured (`RemainingFunds` is zero) and no more preauthorized pay-ins can be made. After the hold period: Indicates that at least one capture was made during the hold period. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made or `VALIDATED` if at least one capture was made. The unique identifier of the pay-in. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). **Default value:** true Whether multiple captures are activated for the preauthorization. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json { "Message": "The Payment Status of the preauthorization does not allow for it to be edited", "Type": "preauthorization_payment_status_can_not_be_canceled", "Id": "a682bfc5-7dd6-4884-abee-9a6ff74fa21c#1669115406", "Date": 1669115407, "errors": null } ``` ```json { "Message": "Can't validate a preauthorization with no successful payin.", "Type": "invalid_action", "Id": "ebe43430-6a43-4ef5-9e97-06b2a7e075f9#1669114162", "Date": 1669114163, "errors": null } ``` ```json 200 - Canceled (no captures) { "Id": "156686431", "Tag": null, "CreationDate": 1669116461, "AuthorId": "156671912", "DebitedFunds": { "Currency": "EUR", "Amount": 500 }, "RemainingFunds": { "Currency": "EUR", "Amount": 0 }, "AuthorizationDate": 1669116472, "Status": "SUCCEEDED", "PaymentStatus": "CANCELED", "ExpirationDate": 1669678072, "PayInId": null, "ResultCode": "000000", "ResultMessage": "Success", "SecureMode": "FORCE", "CardId": "156674899", "SecureModeReturnURL": "https://docs.mangopay.com/please-ignore?preAuthorizationId=156686431", "SecureModeRedirectURL": null, "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "SecurityInfo": { "AVSResult": "NO_CHECK" }, "MultiCapture": true, "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "80.236.38.245", "Billing": { "FirstName": "Joe", "LastName": "Bloggs", "Address": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null } }, "Shipping": { "FirstName": "Joe", "LastName": "Bloggs", "Address": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "PreferredCardNetwork": null, "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json 200 - Validated following successful capture { "Id": "156686696", "Tag": null, "CreationDate": 1669116896, "AuthorId": "156671912", "DebitedFunds": { "Currency": "EUR", "Amount": 500 }, "RemainingFunds": { "Currency": "EUR", "Amount": 0 }, "AuthorizationDate": 1669116904, "Status": "SUCCEEDED", "PaymentStatus": "VALIDATED", "ExpirationDate": 1669678504, "PayInId": "156686722", "ResultCode": "000000", "ResultMessage": "Success", "SecureMode": "FORCE", "CardId": "156674899", "SecureModeReturnURL": "https://docs.mangopay.com/please-ignore?preAuthorizationId=156686696", "SecureModeRedirectURL": null, "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "SecurityInfo": { "AVSResult": "NO_CHECK" }, "MultiCapture": true, "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "80.236.38.245", "Billing": { "FirstName": "Joe", "LastName": "Bloggs", "Address": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null } }, "Shipping": { "FirstName": "Joe", "LastName": "Bloggs", "Address": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "PreferredCardNetwork": null, "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json REST { "PaymentStatus": "CANCELED" } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) // To cancel a preauthorization when no preauthorized pay-ins have been made to capture funds let myPreauthorization = { Id: '192870038', PaymentStatus: 'CANCELED', } const cancelPreauthorization = async (preauthorization) => { return await mangopay.CardPreAuthorizations.update(preauthorization) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } cancelPreauthorization(myPreauthorization) // To validate a preauthorization when at least one preauthorized pay-in has been made to capture funds. let myPreauthorization = { Id: '192870038', PaymentStatus: 'VALIDATED', } const validatePreauthorization = async (preauthorization) => { return await mangopay.CardPreAuthorizations.update(preauthorization) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } validatePreauthorization(myPreauthorization) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end # To validate a preauthorization when at least one preauthorized pay-in has been made to capture funds. def validatePreauthorization(preauthorizationId, preauthorizationObject) begin response = MangoPay::PreAuthorization.update(preauthorizationId, preauthorizationObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to update preauthorization: #{error.message}" puts "Error details: #{error.details}" return false end end myPreauthorization = { Id: '195059241', PaymentStatus: 'VALIDATED' } validatePreauthorization(myPreauthorization[:Id], myPreauthorization) # To cancel a preauthorization when no preauthorized pay-ins have been made to capture funds def cancelPreauthorization(preauthorizationId, preauthorizationObject) begin response = MangoPay::PreAuthorization.update(preauthorizationId, preauthorizationObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to update preauthorization: #{error.message}" puts "Error details: #{error.details}" return false end end myPreauthorization = { Id: '198156939', PaymentStatus: 'CANCELED' } cancelPreauthorization(myPreauthorization[:Id], myPreauthorization) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.PaymentStatus; import com.mangopay.entities.CardPreAuthorization; public class CancelPreauthorization { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); CardPreAuthorization preauthorization = mangopay.getCardPreAuthorizationApi().get("preauth_m_01J1Z336RKEZ0MF2YR26JPZCC5"); preauthorization.setPaymentStatus(PaymentStatus.CANCELED); CardPreAuthorization cancelPreauthorization = mangopay.getCardPreAuthorizationApi().update(preauthorization); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(cancelPreauthorization); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PreAuthorization # To validate a preauthorization when at least one preauthorized pay-in has been made to capture funds. card_preauthorization = PreAuthorization( id = 'preauth_m_01HPHJDFSZWD7BN2MRF0YTHM40', payment_status = 'VALIDATED' ) validate_preauthorization = card_preauthorization.save() pprint(validate_preauthorization) # To cancel a preauthorization when no preauthorized pay-ins have been made to capture funds card_preauthorization = PreAuthorization( id = 'preauth_m_01HPHJDFSZWD7BN2MRF0YTHM40', payment_status = 'CANCEL' ) cancel_preauthorization = card_preauthorization.save() pprint(cancel_preauthorization) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var preauthorizationId = "preauth_m_01J30N3GJ8WK0C7DSGR6BKHARE"; var preauthorization = await api.CardPreAuthorizations.GetAsync(preauthorizationId); var preauthorizationPut = new CardPreAuthorizationPutDTO { PaymentStatus = PaymentStatus.CANCELED, Tag = "Updated using the Mangopay .NET SDK" }; var cancelPreauthorization = await api.CardPreAuthorizations.UpdateAsync(preauthorizationPut, preauthorizationId); string prettyPrint = JsonConvert.SerializeObject(cancelPreauthorization, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Preauthorization POST /v2.01/{ClientId}/preauthorizations/card/direct ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Allowed values:** `DEFAULT`, `FORCE`, `NO_CHOICE` **Default value:** `DEFAULT` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Allowed values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Required if the parent parameter is sent. Information about the shipping address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. **Allowed values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses *Max. length: 255 characters* The unique identifier of the preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the remaining preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The date and time at which successful authorization occurred. If authorization failed, the value is `null`. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `EXPIRED`, `VALIDATED` The status of the preauthorization object: * `WAITING` – The remaining preauthorized funds can be captured by making one or several preauthorized pay-ins. Pay-ins can only be made against a preauthorization with the `WAITING` status. * `CANCELED` – The preauthorization was canceled manually before any preauthorized pay-ins were made, or it was canceled automatically because the authorization failed. * `EXPIRED` – The hold period on the preauthorized funds has ended without any preauthorized pay-ins taking place. * `VALIDATED` – During the hold period: Indicates that all the preauthorized funds have been captured (`RemainingFunds` is zero) and no more preauthorized pay-ins can be made. After the hold period: Indicates that at least one capture was made during the hold period. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made or `VALIDATED` if at least one capture was made. The unique identifier of the pay-in. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). **Default value:** true Whether multiple captures are activated for the preauthorization. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 { "Id": "preauth_m_01HYG88W1QWJNNBGJJG0KQGX42", "Tag": null, "CreationDate": 1716384985, "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "RemainingFunds": { "Currency": "EUR", "Amount": 10000 }, "AuthorizationDate": null, "Status": "CREATED", "PaymentStatus": "WAITING", "ExpirationDate": null, "PayInId": null, "ResultCode": null, "ResultMessage": null, "SecureMode": "DEFAULT", "CardId": "card_m_01HW8BJ2MS5PBV5EB1ZQG5E8T9", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore?preAuthorizationId=preauth_m_01HYG88W1QWJNNBGJJG0KQGX42", "SecureModeRedirectURL": "https://api.sandbox.mangopay.com/mvc/eu/Redirect/ACSWithoutValidation?token=f8b4c9fd8b504937a8dd36d570f6d14b&mgpsecureid=f8b4c9fd8b504937a8dd36d570f6d14b", "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "SecurityInfo": { "AVSResult": "NO_CHECK" }, "MultiCapture": true, "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "5bc6:3672:3bef:2eb5:e707:2a98:5494:b861", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Île-de-France", "PostalCode": "75004", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Île-de-France", "PostalCode": "75004", "Country": "FR" } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "PreferredCardNetwork": null, "PaymentCategory": "ECommerce", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json REST { "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "Culture": "EN", "CardId": "card_m_01HW8BJ2MS5PBV5EB1ZQG5E8T9", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore", "IpAddress": "5bc6:3672:3bef:2eb5:e707:2a98:5494:b861", "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $cardPreauthorization = new \MangoPay\CardPreAuthorization(); $cardPreauthorization->AuthorId = '146476890'; $cardPreauthorization->DebitedFunds = new \MangoPay\Money(); $cardPreauthorization->DebitedFunds->Currency = 'EUR'; $cardPreauthorization->DebitedFunds->Amount = 1000; $cardPreauthorization->SecureMode = 'DEFAULT'; $cardPreauthorization->CardId = '193935874'; $cardPreauthorization->SecureModeReturnURL = 'https://mangopay.com/docs/please-ignore'; $cardPreauthorization->Tag = 'Created using Mangopay PHP SDK'; $cardPreauthorization->StatementDescriptor = 'Mangopay'; $cardPreauthorization->BrowserInfo = new \MangoPay\BrowserInfo(); $cardPreauthorization->BrowserInfo->AcceptHeader = "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8";; $cardPreauthorization->BrowserInfo->JavaEnabled = true; $cardPreauthorization->BrowserInfo->Language = "FR-FR"; $cardPreauthorization->BrowserInfo->ColorDepth = 4; $cardPreauthorization->BrowserInfo->ScreenHeight = 1800; $cardPreauthorization->BrowserInfo->ScreenWidth = 400; $cardPreauthorization->BrowserInfo->TimeZoneOffset = 60; $cardPreauthorization->BrowserInfo->UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"; $cardPreauthorization->BrowserInfo->JavascriptEnabled = true; $cardPreauthorization->Culture = 'EN'; $cardPreauthorization->IpAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C"; $address = new \MangoPay\Address(); $address->AddressLine1 = '4 rue des Plantes'; $address->City = 'Paris'; $address->Country = 'FR'; $address->PostalCode = '75009'; $address->Region = 'IDF'; $shipping = new \MangoPay\Shipping(); $shipping->FirstName = 'Alex'; $shipping->LastName = 'Smith'; $shipping->Address = $address; $billing = new \MangoPay\Billing(); $billing->FirstName = 'Alex'; $billing->LastName = 'Smith'; $billing->Address = $address; $response = $api->CardPreAuthorizations->Create($cardPreauthorization); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPreauthorization = { PaymentType: 'CARD', ExecutionType: 'DIRECT', AuthorId: '192822811', Tag: 'Created with Mangopay Node.js SDK', CreditedUserId: '192822811', DebitedFunds: { Currency: 'EUR', Amount: 1000, }, Fees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '192822814', CardId: '192822826', CardType: 'CB_VISA_MASTERCARD', Culture: 'EN', SecureMode: 'FORCE', SecureModeReturnURL: 'https://mangopay.com/docs/please-ignore', BrowserInfo: { AcceptHeader: 'text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8', JavaEnabled: true, Language: 'FR-FR', ColorDepth: 4, ScreenHeight: 1800, ScreenWidth: 400, TimeZoneOffset: 60, UserAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', JavascriptEnabled: true, }, IpAddress: '2d1b:f91a:075a:7fc8:0cb7:b471:cd55:017e', Billing: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, Shipping: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, StatementDescriptor: 'Nov2023', } const createPreauthorization = async (preauthorization) => { return await mangopay.CardPreAuthorizations.create(preauthorization) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createPreauthorization(myPreauthorization) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createPreauthorization(preauthorizationObject) begin response = MangoPay::PreAuthorization.create(preauthorizationObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create preauthorization: #{error.message}" puts "Error details: #{error.details}" return false end end myPreauthorization = { PaymentType: 'CARD', ExecutionType: 'DIRECT', AuthorId: '192822811', Tag: 'Created with Mangopay Ruby SDK', CreditedUserId: '192822811', DebitedFunds: { Currency: 'EUR', Amount: 1000, }, Fees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '192822814', CardId: '192822826', CardType: 'CB_VISA_MASTERCARD', Culture: 'EN', SecureMode: 'FORCE', SecureModeReturnURL: 'https://mangopay.com/docs/please-ignore', BrowserInfo: { AcceptHeader: 'text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8', JavaEnabled: true, Language: 'FR-FR', ColorDepth: 4, ScreenHeight: 1800, ScreenWidth: 400, TimeZoneOffset: 60, UserAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', JavascriptEnabled: true, }, IpAddress: '2d1b:f91a:075a:7fc8:0cb7:b471:cd55:017e', Billing: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, Shipping: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, StatementDescriptor: 'Nov2023', } createPreauthorization(myPreauthorization) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CultureCode; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.SecureMode; import com.mangopay.entities.CardPreAuthorization; import com.mangopay.entities.subentities.BrowserInfo; public class CreatePreauthorization { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); CardPreAuthorization preauthorization = new CardPreAuthorization(); String userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; String cardId = "card_m_01HZ6YAQF4MR0VRQ06YG06SD99"; BrowserInfo browserInfo = new BrowserInfo(); browserInfo.setAcceptHeader("application/json,text/javascript,*/*;q=0.01<"); browserInfo.setJavaEnabled(true); browserInfo.setLanguage("fr"); browserInfo.setColorDepth(32); browserInfo.setScreenHeight(667); browserInfo.setScreenWidth(375); browserInfo.setTimeZoneOffset("-120"); browserInfo.setUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"); browserInfo.setJavascriptEnabled(true); preauthorization.setAuthorId(userId); preauthorization.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); preauthorization.setCulture(CultureCode.EN); preauthorization.setSecureMode(SecureMode.DEFAULT); preauthorization.setSecureModeReturnUrl("https://mangopay.com/docs/please-ignore"); preauthorization.setCardId(cardId); preauthorization.setBrowserInfo(browserInfo); preauthorization.setIpAddress("658e:1b88:7f7a:a60b:32af:0b7f:56e1:2e9a"); CardPreAuthorization createPreauthorization = mangopay.getCardPreAuthorizationApi().create(preauthorization); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPreauthorization); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, PreAuthorization from mangopay.utils import Money, BrowserInfo natural_user = NaturalUser.get('213600749') card_preauthorization = PreAuthorization( author = natural_user, debited_funds = Money(amount=100, currency='GBP'), card_id = '213635147', secure_mode_return_url = 'https://mangopay.com/docs/please-ignore', browser_info = BrowserInfo( user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', screen_width = 375, screen_height = 667, color_depth = 32, language = 'EN', accept_header = 'application/json,text/javascript,*/*;q=0.01<', timezone_offset = '-120', java_enabled = True, javascript_enabled = True ), ip_address = '159.180.248.187', tag = 'Created using the Mangopay Python SDK' ) create_card_preauthorization = card_preauthorization.save() pprint(create_card_preauthorization) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var cardId = "card_m_01J3049JBA2XPA7GC7GEFJRQG4"; var cardPreAuthorization = new CardPreAuthorizationPostDTO ( userId, new Money { Amount = 5000, Currency = CurrencyIso.EUR }, SecureMode.DEFAULT, cardId, "https://www.mangopay.com/please-ignore/", "MGP" ) { IpAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C", BrowserInfo = new BrowserInfo { AcceptHeader = "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", JavaEnabled = true, Language = "FR-FR", ColorDepth = 4, ScreenHeight = 1800, ScreenWidth = 400, JavascriptEnabled = true, TimeZoneOffset = "+60", UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" } }; var createPreauthorization = await api.CardPreAuthorizations.CreateAsync(cardPreAuthorization); string prettyPrint = JsonConvert.SerializeObject(createPreauthorization, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Preauthorized PayIn POST /v2.01/{ClientId}/payins/preauthorized/direct ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. The unique identifier of the preauthorization. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The unique identifier of the preauthorization. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The unique identifier of the preauthorization. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "b6a5ae0d-7dc9-479a-86bd-55b0d40dccec#1669116785", "Date": 1669116786, "errors": { "Status": "The PreAuthorization Status value has to be up to SUCCEEDED" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "2a6b5503-551b-4a66-a7f4-3ae4d6efc91f", "Date": 1716385561.0, "errors": { "PaymentStatus": "The PreAuthorization PaymentStatus value has to be WAITING" } } ``` ```json 200 - Successful capture { "Id": "payin_m_01HYG8DRT5FHT1FV44MV9KR1BS", "Tag": null, "CreationDate": 1716385145, "ResultCode": "000000", "ResultMessage": "Success", "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "CreditedUserId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 2000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1800 }, "Fees": { "Currency": "EUR", "Amount": 200 }, "Status": "SUCCEEDED", "ExecutionDate": 1716385146, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204089031", "DebitedWalletId": null, "PaymentType": "PREAUTHORIZED", "ExecutionType": "DIRECT", "PreauthorizationId": "preauth_m_01HYG88W1QWJNNBGJJG0KQGX42" } ``` ```json 200 - Failed: Amount greater than remaining funds { "Id": "5ca9a5a3-8db0-4184-9322-acf521a4e210", "Tag": "capture attempt", "CreationDate": 1669115134, "ResultCode": "001505", "ResultMessage": "The PayIn DebitedFunds can't be higher than the PreAuthorization remaining amount", "AuthorId": "user_m_01HQK25M6KVHKDV0S36JY9NRKR", "CreditedUserId": "user_m_01HQK25M6KVHKDV0S36JY9NRKR", "DebitedFunds": { "Currency": "EUR", "Amount": 700 }, "CreditedFunds": { "Currency": "EUR", "Amount": 700 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "FAILED", "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01HT2J9Q2M6GMFW4Z7GYBAFJ4T", "DebitedWalletId": null, "PaymentType": "PREAUTHORIZED", "ExecutionType": "DIRECT", "PreauthorizationId": "preauth_m_01HYG88W1QWJNNBGJJG0KQGX42" } ``` ```json REST { "CreditedWalletId": "204089031", "DebitedFunds": { "Currency": "EUR", "Amount": 2000 }, "Fees": { "Currency": "EUR", "Amount": 200 }, "PreauthorizationId": "preauth_m_01HYG88W1QWJNNBGJJG0KQGX42" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $preauthorizationId = 'preauth_wt_a1f70323-115c-44b6-ae8d-2a3e36e3bb33199480485'; $cardPreAuthorization = $api->CardPreAuthorizations->Get($preauthorizationId); $payIn = new \MangoPay\PayIn(); $payIn->Tag = 'Created using Mangopay PHP SDK'; $payIn->CreditedWalletId = 'wlt_m_01J3D02K6ETV3BDP88C7PD2NDB148968396'; $payIn->PaymentType = 'CARD'; $payIn->AuthorId = 'user_m_01J2TZ261WZNDM0ZDRWGDYA4GN146476890'; $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = 'EUR'; $payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsPreAuthorized(); $payIn->PaymentDetails->PreauthorizationId = $cardPreAuthorization->Id; $payIn->ExecutionType = 'DIRECT'; $payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); $payIn->ExecutionDetails->SecureModeReturnURL = 'https://mangopay.com/docs/please-ignore'; $payIn->ExecutionDetails->Culture = 'EN'; $response = $api->PayIns->Create($payIn); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPreauthorizedPayIn = { PaymentType: 'PREAUTHORIZED', ExecutionType: 'DIRECT', AuthorId: '192822811', Tag: 'Created with Mangopay Node.js SDK', CreditedUserId: '192822811', DebitedFunds: { Currency: 'EUR', Amount: 1000, }, Fees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '192822814', PreauthorizationId: '192823192', } const createPreauthorizedPayin = async (payin) => { return await mangopay.PayIns.create(payin) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createPreauthorizedPayin(myPreauthorizedPayIn) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createPreauthorizedPayIn(payInObject) begin response = MangoPay::PayIn::PreAuthorized::Direct.create(payInObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create preauthorized payin: #{error.message}" puts "Error details: #{error.details}" return false end end myPreauthorizedPayIn = { AuthorId: '192822811', Tag: 'Created with Mangopay Ruby SDK', CreditedUserId: '192822811', DebitedFunds: { Currency: 'EUR', Amount: 900, }, Fees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '192822814', PreauthorizationId: '195059241' } createPreauthorizedPayIn(myPreauthorizedPayIn) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInExecutionDetailsDirect; import com.mangopay.entities.subentities.PayInPaymentDetailsPreAuthorized; public class CreatePreauthPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var preauthId = "preauth_m_01J218VW84JAKDZS516PPTQWFW"; var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HWAR863HPA3FAVEXA9J6JSYD"; PayIn payIn = new PayIn(); payIn.setCreditedWalletId(walletId); payIn.setAuthorId(userId); payIn.setTag("Created using the Mangopay Java SDK"); payIn.setDebitedFunds(new Money()); payIn.getDebitedFunds().setAmount(100); payIn.getDebitedFunds().setCurrency(CurrencyIso.EUR); payIn.setFees(new Money()); payIn.getFees().setAmount(0); payIn.getFees().setCurrency(CurrencyIso.EUR); payIn.setPaymentDetails(new PayInPaymentDetailsPreAuthorized()); ((PayInPaymentDetailsPreAuthorized) payIn.getPaymentDetails()).setPreauthorizationId(preauthId); payIn.setExecutionDetails(new PayInExecutionDetailsDirect()); ((PayInExecutionDetailsDirect) payIn.getExecutionDetails()).setSecureModeReturnUrl("https://mangopay.com/docs/please-ignore"); PayIn createPayIn = mangopay.getPayInApi().create(payIn); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPayIn); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, PreAuthorizedPayIn from mangopay.utils import Money natural_user = NaturalUser.get('213753890') preauthorization_payin = PreAuthorizedPayIn( author_id = natural_user.id, debited_funds = Money(amount=1000, currency='GBP'), fees = Money(amount=0, currency='GBP'), credited_wallet_id = '213754077', preauthorization_id = '213944840', tag='Created using the Mangopay Python SDK' ) create_preauthorization_payin = preauthorization_payin.save() pprint(create_preauthorization_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var preauthorizationId = "preauth_m_01J30NHM7E0TQ9W5NRQ964W7WF"; var preauthorizedPayIn = new PayInPreauthorizedDirectPostDTO ( userId, new Money { Amount = 1000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, preauthorizationId) { SecureModeReturnURL = "http://www.mangopay.com/please-ignore" }; var createPreauthorizedPayIn = await api.PayIns.CreatePreauthorizedDirectAsync(preauthorizedPayIn); string prettyPrint = JsonConvert.SerializeObject(createPreauthorizedPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Preauthorizations for a Card GET /v2.01/{ClientId}/cards/{CardId}/preauthorizations ### Path parameters The unique identifier of the Card object, obtained during the card registration process. ### Responses The list of preauthorizations created by the platform. The preauthorization created by the platform. *Max. length: 255 characters* The unique identifier of the preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the remaining preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The date and time at which successful authorization occurred. If authorization failed, the value is `null`. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made or `VALIDATED` if at least one capture was made. The unique identifier of the first preauthorized pay-in made against the preauthorization. The explanation of the result code. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). Whether or not the `SecureMode` was used. **Returned values:** `APPLEPAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). **Default value:** true Whether multiple captures are activated for the preauthorization. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 [ { "Id": "156686696", "Tag": null, "CreationDate": 1669116896, "AuthorId": "156671912", "DebitedFunds": { "Currency": "EUR", "Amount": 500 }, "RemainingFunds": { "Currency": "EUR", "Amount": 0 }, "AuthorizationDate": 1669116904, "Status": "SUCCEEDED", "PaymentStatus": "VALIDATED", "ExpirationDate": 1669678504, "PayInId": "156686722", "ResultCode": "000000", "ResultMessage": "Success", "SecureMode": "FORCE", "CardId": "156674899", "SecureModeReturnURL": null, "SecureModeRedirectURL": null, "SecureModeNeeded": false, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "SecurityInfo": null, "MultiCapture": true, "BrowserInfo": null, "IpAddress": null, "Billing": null, "Shipping": null, "Requested3DSVersion": null, "Applied3DSVersion": null, "PreferredCardNetwork": null, "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ] ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myCard = { Id: '169687329', } const listPreauthorizationsforCard = async (cardId) => { return await mangopay.Cards.getPreAuthorizations(cardId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listPreauthorizationsforCard(myCard.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listPreauthorizationsCard(cardId) begin response = MangoPay::Card.get_pre_authorizations(cardId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch preauthorizations: #{error.message}" puts "Error details: #{error.details}" return false end end myCard = { Id: '192822826' } listPreauthorizationsCard(myCard[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.CardPreAuthorization; import java.util.List; public class ListCardPreauthorization { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var cardId = "card_m_01HZ6YAQF4MR0VRQ06YG06SD99"; List preauths = mangopay.getCardApi().getCardPreAuthorizations(cardId); for (CardPreAuthorization preauth : preauths) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(preauth); System.out.println(prettyJson); } } } ``` ```python Python import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Card user_card = Card.get('213944219') preauthorizations = user_card.preauthorization_set.all() for preauthorization in preauthorizations: pprint(vars(preauthorization)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var cardId = "card_m_01J3049JBA2XPA7GC7GEFJRQG4"; var cardPreauthorizations = await api.CardPreAuthorizations.GetPreAuthorizationsForCardAsync(cardId, new Pagination(1, 50), null); string prettyPrint = JsonConvert.SerializeObject(cardPreauthorizations, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Preauthorizations for a User GET /v2.01/{ClientId}/users/{UserId}/preauthorizations ### Path parameters The unique identifier of the user. ### Responses The list of preauthorizations created by the platform. The preauthorization created by the platform. *Max. length: 255 characters* The unique identifier of the preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the remaining preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The date and time at which successful authorization occurred. If authorization failed, the value is `null`. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `TO_BE_COMPLETED`, `NO_SHOW_REQUESTED`, `NO_SHOW`, `VALIDATED`, `FAILED` The payment status of the deposit preauthorization object: * `WAITING` – The deposit preauthorization can be used: the preauthorized funds can be captured (without or prior to complement); a no-show can be declared; or the preauthorization can be canceled manually. * `CANCELED` – Value to pass to manually cancel the deposit preauthorization before use (whether for capture or no-show); indicates that the deposit preauthorization was canceled manually. * `CANCEL_REQUESTED` – The cancellation of the deposit preauthorization has been requested but not yet processed. * `EXPIRED` – The hold period on the preauthorized funds has ended without it being used (whether for capture or no-show). * `TO_BE_COMPLETED` – The preauthorized funds were captured (prior to complement) but the complement has not yet been captured. * `NO_SHOW_REQUESTED` – Value to pass to request a no-show, signaling no capture of the preauthorized funds but the intent to capture a complement. * `NO_SHOW` – A no-show was requested but a complement not yet been captured. * `VALIDATED` – Indicates either (i) that the preauthorized funds were captured without complement; (ii) that the preauthorized funds and a complement were captured; or (iii) that a no-show was declared and a complement was captured. * `FAILED` – The action against the preauthorization has failed (whether capture without complement, capture prior to complement, no-show request, complement), but a retry may be possible. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made or `VALIDATED` if at least one capture was made. The unique identifier of the first preauthorized pay-in made against the preauthorization. The explanation of the result code. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). Whether or not the `SecureMode` was used. **Returned values:** `APPLEPAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). **Default value:** true Whether multiple captures are activated for the preauthorization. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 [ { "Id": "156686696", "Tag": null, "CreationDate": 1669116896, "AuthorId": "156671912", "DebitedFunds": { "Currency": "EUR", "Amount": 500 }, "RemainingFunds": { "Currency": "EUR", "Amount": 0 }, "AuthorizationDate": 1669116904, "Status": "SUCCEEDED", "PaymentStatus": "VALIDATED", "ExpirationDate": 1669678504, "PayInId": "156686722", "ResultCode": "000000", "ResultMessage": "Success", "SecureMode": "FORCE", "CardId": "156674899", "SecureModeReturnURL": null, "SecureModeRedirectURL": null, "SecureModeNeeded": false, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "SecurityInfo": null, "MultiCapture": true, "BrowserInfo": null, "IpAddress": null, "Billing": null, "Shipping": null, "Requested3DSVersion": null, "Applied3DSVersion": null, "PreferredCardNetwork": null, "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $response = $api->Users->GetPreAuthorizations($userId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '146476890', } const listUserPreauthorizations = async (userId) => { return await mangopay.Users.getPreAuthorizations(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listUserPreauthorizations(user.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listPreauthorizationsUser(userId) begin response = MangoPay::User.pre_authorizations(userId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch preauthorizations: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '146476890' } listPreauthorizationsUser(myUser[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.CardPreAuthorization; import java.util.List; public class ListUserPreauthorization { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; List preauths = mangopay.getUserApi().getPreAuthorizations(userId); for (CardPreAuthorization preauth : preauths) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(preauth); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser natural_user = NaturalUser.get('213600749') preauthorizations = natural_user.get_pre_authorizations() for preauthorization in preauthorizations: pprint(vars(preauthorization)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var userPreauthorizations = await api.CardPreAuthorizations.GetPreAuthorizationsForUserAsync(userId, new Pagination(1, 50), null); string prettyPrint = JsonConvert.SerializeObject(userPreauthorizations, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Preauthorization object ### Description The Preauthorization object enables you to reserve funds on a card so they can be captured later. A preauthorization thus has two parts: * Authorization of the transaction, handled by the Preauthorization object * Capture of the funds, handled by the Preauthorized PayIn object The preauthorized funds can be captured within 6.5 days of a successful authorization. If you require a hold period of longer than 6.5 days, see the Deposit Preauthorization object. Note that preauthorizations may not be permitted by some issuers and for some card types. **Caution – Multi-capture only available with CB, Visa, and Mastercard** Multiple partial captures of the preauthorized amount is only possible on cards of type `CB_VISA_MASTERCARD`. Further captures of the `RemainingFunds` can be made if the `PaymentStatus` is `WAITING`. There is no limit to the number of captures that can be made if each is valid. ### Attributes *Max. length: 255 characters* The unique identifier of the preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the remaining preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The date and time at which successful authorization occurred. If authorization failed, the value is `null`. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `EXPIRED`, `VALIDATED` The status of the preauthorization object: * `WAITING` – The remaining preauthorized funds can be captured by making one or several preauthorized pay-ins. Pay-ins can only be made against a preauthorization with the `WAITING` status. * `CANCELED` – The preauthorization was canceled manually before any preauthorized pay-ins were made, or it was canceled automatically because the authorization failed. * `EXPIRED` – The hold period on the preauthorized funds has ended without any preauthorized pay-ins taking place. * `VALIDATED` – During the hold period: Indicates that all the preauthorized funds have been captured (`RemainingFunds` is zero) and no more preauthorized pay-ins can be made. After the hold period: Indicates that at least one capture was made during the hold period. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made or `VALIDATED` if at least one capture was made. The unique identifier of the first preauthorized pay-in made against the preauthorization. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Default value:** DEFAULT The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). **Default value:** true Whether multiple captures are activated for the preauthorization. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). Information about the card used for the transaction. \ If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about 7-day preauthorization # The Preauthorized PayIn object ### Description The Preauthorized PayIn object represents a request to capture funds previously authorized with a Preauthorization object.  The preauthorized pay-in must be: * Of an amount equal to or less than the preauthorized amount * Done within 6.5 days of a successful authorization **Caution – Idempotency key required for multi-capture** You must use an idempotency key if making multiple captures (only available with CB, Visa and Mastercard). Unless accompanied by an idempotency key, two pay-ins are considered as duplicate if they are made:\ within 24 hours\ for the same amount and currency\ with the same `CardId` ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The unique identifier of the preauthorization. ### Related resources How to process a 7-day card preauthorization # View a PayIn (Preauthorized Card) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The unique identifier of the preauthorization. ```json 200 { "Id": "payin_m_01HYG8DRT5FHT1FV44MV9KR1BS", "Tag": null, "CreationDate": 1716385145, "ResultCode": "000000", "ResultMessage": "Success", "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "CreditedUserId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 2000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1800 }, "Fees": { "Currency": "EUR", "Amount": 200 }, "Status": "SUCCEEDED", "ExecutionDate": 1716385146, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204089031", "DebitedWalletId": null, "PaymentType": "PREAUTHORIZED", "ExecutionType": "DIRECT", "PreauthorizationId": "preauth_m_01HYG88W1QWJNNBGJJG0KQGX42" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetAsync("payin_m_01J334XF2V6751GRG9M2M558HG"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Preauthorization GET /v2.01/{ClientId}/preauthorizations/{PreauthorizationId}/ ### Path parameters The unique identifier of the preauthorization. ### Responses *Max. length: 255 characters* The unique identifier of the preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the remaining preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The date and time at which successful authorization occurred. If authorization failed, the value is `null`. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `EXPIRED`, `VALIDATED` The status of the preauthorization object: * `WAITING` – The remaining preauthorized funds can be captured by making one or several preauthorized pay-ins. Pay-ins can only be made against a preauthorization with the `WAITING` status. * `CANCELED` – The preauthorization was canceled manually before any preauthorized pay-ins were made, or it was canceled automatically because the authorization failed. * `EXPIRED` – The hold period on the preauthorized funds has ended without any preauthorized pay-ins taking place. * `VALIDATED` – During the hold period: Indicates that all the preauthorized funds have been captured (`RemainingFunds` is zero) and no more preauthorized pay-ins can be made. After the hold period: Indicates that at least one capture was made during the hold period. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made or `VALIDATED` if at least one capture was made. The unique identifier of the pay-in. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). **Default value:** true Whether multiple captures are activated for the preauthorization. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. *Max. length: 255 characters* The unique identifier of the preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the remaining preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The date and time at which successful authorization occurred. If authorization failed, the value is `null`. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `EXPIRED`, `VALIDATED` The status of the preauthorization object: * `WAITING` – The remaining preauthorized funds can be captured by making one or several preauthorized pay-ins. Pay-ins can only be made against a preauthorization with the `WAITING` status. * `CANCELED` – The preauthorization was canceled manually before any preauthorized pay-ins were made, or it was canceled automatically because the authorization failed. * `EXPIRED` – The hold period on the preauthorized funds has ended without any preauthorized pay-ins taking place. * `VALIDATED` – During the hold period: Indicates that all the preauthorized funds have been captured (`RemainingFunds` is zero) and no more preauthorized pay-ins can be made. After the hold period: Indicates that at least one capture was made during the hold period. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made or `VALIDATED` if at least one capture was made. The unique identifier of the pay-in. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). **Default value:** true Whether multiple captures are activated for the preauthorization. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. *Max. length: 255 characters* The unique identifier of the preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the remaining preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The date and time at which successful authorization occurred. If authorization failed, the value is `null`. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `EXPIRED`, `VALIDATED` The status of the preauthorization object: * `WAITING` – The remaining preauthorized funds can be captured by making one or several preauthorized pay-ins. Pay-ins can only be made against a preauthorization with the `WAITING` status. * `CANCELED` – The preauthorization was canceled manually before any preauthorized pay-ins were made, or it was canceled automatically because the authorization failed. * `EXPIRED` – The hold period on the preauthorized funds has ended without any preauthorized pay-ins taking place. * `VALIDATED` – During the hold period: Indicates that all the preauthorized funds have been captured (`RemainingFunds` is zero) and no more preauthorized pay-ins can be made. After the hold period: Indicates that at least one capture was made during the hold period. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made or `VALIDATED` if at least one capture was made. The unique identifier of the first preauthorized pay-in made against the preauthorization. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). **Default value:** true Whether multiple captures are activated for the preauthorization. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. *Max. length: 255 characters* The unique identifier of the preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the remaining preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The date and time at which successful authorization occurred. If authorization failed, the value is `null`. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `EXPIRED`, `VALIDATED` The status of the preauthorization object: * `WAITING` – The remaining preauthorized funds can be captured by making one or several preauthorized pay-ins. Pay-ins can only be made against a preauthorization with the `WAITING` status. * `CANCELED` – The preauthorization was canceled manually before any preauthorized pay-ins were made, or it was canceled automatically because the authorization failed. * `EXPIRED` – The hold period on the preauthorized funds has ended without any preauthorized pay-ins taking place. * `VALIDATED` – During the hold period: Indicates that all the preauthorized funds have been captured (`RemainingFunds` is zero) and no more preauthorized pay-ins can be made. After the hold period: Indicates that at least one capture was made during the hold period. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made or `VALIDATED` if at least one capture was made. The unique identifier of the first preauthorized pay-in made against the preauthorization. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). **Default value:** true Whether multiple captures are activated for the preauthorization. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. *Max. length: 255 characters* The unique identifier of the preauthorization. *Max. length: 255 characters* Custom data that you can add to this object.\ For preauthorizations, you can use this parameter to identify corresponding information regarding the user or transaction on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the remaining preauthorized funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the preauthorized funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The date and time at which successful authorization occurred. If authorization failed, the value is `null`. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization. **Returned values:** `WAITING`, `CANCELED`, `EXPIRED`, `VALIDATED` The status of the preauthorization object: * `WAITING` – The remaining preauthorized funds can be captured by making one or several preauthorized pay-ins. Pay-ins can only be made against a preauthorization with the `WAITING` status. * `CANCELED` – The preauthorization was canceled manually before any preauthorized pay-ins were made, or it was canceled automatically because the authorization failed. * `EXPIRED` – The hold period on the preauthorized funds has ended without any preauthorized pay-ins taking place. * `VALIDATED` – During the hold period: Indicates that all the preauthorized funds have been captured (`RemainingFunds` is zero) and no more preauthorized pay-ins can be made. After the hold period: Indicates that at least one capture was made during the hold period. The date and time at which the hold period ends and the preauthorized funds are released.\ At the expiration date, the preauthorization’s `PaymentStatus` changes to `EXPIRED` if no captures were made or `VALIDATED` if at least one capture was made. The unique identifier of the first preauthorized pay-in made against the preauthorization. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). **Default value:** true Whether multiple captures are activated for the preauthorization. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. **Default value:** `ECommerce` **Allowed values:** `ECommerce`, `TelephoneOrder` The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments: * `ECommerce` – Payment received online. * `TelephoneOrder` – Payment received via mail order or telephone order (MOTO). Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 - Before capture { "Id": "preauth_m_01HYG88W1QWJNNBGJJG0KQGX42", "Tag": null, "CreationDate": 1716384985, "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "RemainingFunds": { "Currency": "EUR", "Amount": 10000 }, "AuthorizationDate": 1716385002, "Status": "SUCCEEDED", "PaymentStatus": "WAITING", "ExpirationDate": 1716946602, "PayInId": null, "ResultCode": "000000", "ResultMessage": "Success", "SecureMode": "DEFAULT", "CardId": "card_m_01HW8BJ2MS5PBV5EB1ZQG5E8T9", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore?preAuthorizationId=preauth_m_01HYG88W1QWJNNBGJJG0KQGX42", "SecureModeRedirectURL": null, "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "SecurityInfo": { "AVSResult": "NO_CHECK" }, "MultiCapture": true, "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "5bc6:3672:3bef:2eb5:e707:2a98:5494:b861", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Île-de-France", "PostalCode": "75004", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Île-de-France", "PostalCode": "75004", "Country": "FR" } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "PreferredCardNetwork": null, "PaymentCategory": "ECommerce", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json 200 - After first capture { "Id": "preauth_m_01HYG88W1QWJNNBGJJG0KQGX42", "Tag": null, "CreationDate": 1716384985, "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "RemainingFunds": { "Currency": "EUR", "Amount": 8000 }, "AuthorizationDate": 1716385002, "Status": "SUCCEEDED", "PaymentStatus": "WAITING", "ExpirationDate": 1716946602, "PayInId": "payin_m_01HYG8DRT5FHT1FV44MV9KR1BS", "ResultCode": "000000", "ResultMessage": "Success", "SecureMode": "DEFAULT", "CardId": "card_m_01HW8BJ2MS5PBV5EB1ZQG5E8T9", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore?preAuthorizationId=preauth_m_01HYG88W1QWJNNBGJJG0KQGX42", "SecureModeRedirectURL": null, "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "SecurityInfo": { "AVSResult": "NO_CHECK" }, "MultiCapture": true, "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "5bc6:3672:3bef:2eb5:e707:2a98:5494:b861", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Île-de-France", "PostalCode": "75004", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Île-de-France", "PostalCode": "75004", "Country": "FR" } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "PreferredCardNetwork": null, "PaymentCategory": "ECommerce", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json 200 - After second capture { "Id": "preauth_m_01HYG88W1QWJNNBGJJG0KQGX42", "Tag": null, "CreationDate": 1716384985, "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "RemainingFunds": { "Currency": "EUR", "Amount": 6000 }, "AuthorizationDate": 1716385002, "Status": "SUCCEEDED", "PaymentStatus": "WAITING", "ExpirationDate": 1716946602, "PayInId": "payin_m_01HYG8DRT5FHT1FV44MV9KR1BS", "ResultCode": "000000", "ResultMessage": "Success", "SecureMode": "DEFAULT", "CardId": "card_m_01HW8BJ2MS5PBV5EB1ZQG5E8T9", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore?preAuthorizationId=preauth_m_01HYG88W1QWJNNBGJJG0KQGX42", "SecureModeRedirectURL": null, "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "SecurityInfo": { "AVSResult": "NO_CHECK" }, "MultiCapture": true, "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "5bc6:3672:3bef:2eb5:e707:2a98:5494:b861", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Île-de-France", "PostalCode": "75004", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Île-de-France", "PostalCode": "75004", "Country": "FR" } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "PreferredCardNetwork": null, "PaymentCategory": "ECommerce", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json 200 - Remaining funds captured { "Id": "preauth_m_01HYG88W1QWJNNBGJJG0KQGX42", "Tag": null, "CreationDate": 1716384985, "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "RemainingFunds": { "Currency": "EUR", "Amount": 0 }, "AuthorizationDate": 1716385002, "Status": "SUCCEEDED", "PaymentStatus": "VALIDATED", "ExpirationDate": 1716946602, "PayInId": "payin_m_01HYG8DRT5FHT1FV44MV9KR1BS", "ResultCode": "000000", "ResultMessage": "Success", "SecureMode": "DEFAULT", "CardId": "card_m_01HW8BJ2MS5PBV5EB1ZQG5E8T9", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore?preAuthorizationId=preauth_m_01HYG88W1QWJNNBGJJG0KQGX42", "SecureModeRedirectURL": null, "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "SecurityInfo": { "AVSResult": "NO_CHECK" }, "MultiCapture": true, "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "5bc6:3672:3bef:2eb5:e707:2a98:5494:b861", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Île-de-France", "PostalCode": "75004", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Île-de-France", "PostalCode": "75004", "Country": "FR" } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "PreferredCardNetwork": null, "PaymentCategory": "ECommerce", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```json 200 - Authorization failed { "Id": "preauth_m_01HYG8S96P7P37GRKTG8RSTQK7", "Tag": null, "CreationDate": 1716385523, "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "RemainingFunds": { "Currency": "EUR", "Amount": 0 }, "AuthorizationDate": null, "Status": "FAILED", "PaymentStatus": "CANCELED", "ExpirationDate": null, "PayInId": null, "ResultCode": "101301", "ResultMessage": "Secure mode: The 3DSecure authentication has failed", "SecureMode": "DEFAULT", "CardId": "card_m_01HW8BJ2MS5PBV5EB1ZQG5E8T9", "SecureModeReturnURL": "https://mangopay.com/docs/please-ignore?preAuthorizationId=preauth_m_01HYG8S96P7P37GRKTG8RSTQK7", "SecureModeRedirectURL": null, "SecureModeNeeded": true, "PaymentType": "CARD", "ExecutionType": "DIRECT", "StatementDescriptor": null, "Culture": "EN", "SecurityInfo": { "AVSResult": "NO_CHECK" }, "MultiCapture": true, "BrowserInfo": { "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled": true, "Language": "FR-FR", "ColorDepth": 4, "ScreenHeight": 1800, "ScreenWidth": 400, "TimeZoneOffset": 60, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "dbb7:6c85:8ce4:5f02:c670:1acc:9014:5691", "Billing": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Île-de-France", "PostalCode": "75004", "Country": "FR" } }, "Shipping": { "FirstName": "Alex", "LastName": "Smith", "Address": { "AddressLine1": "6 rue de la Cité", "AddressLine2": "Appartement 3", "City": "Paris", "Region": "Île-de-France", "PostalCode": "75004", "Country": "FR" } }, "Requested3DSVersion": null, "Applied3DSVersion": "V2_1", "PreferredCardNetwork": null, "PaymentCategory": "ECommerce", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "VISA", "SubType": null } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $preauthorizationId = '169687442'; $response = $api->CardPreAuthorizations->Get($preauthorizationId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPreauthorization = { Id: '169687442', } const viewPreauthorization = async (preauthorizationId) => { return await mangopay.CardPreAuthorizations.get(preauthorizationId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPreauthorization(myPreauthorization.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPreauthorization(preauthorizationId) begin response = MangoPay::PreAuthorization.fetch(preauthorizationId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch preauthorization: #{error.message}" puts "Error details: #{error.details}" return false end end myPreauthorization = { Id:'195059241' } viewPreauthorization(myPreauthorization[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.CardPreAuthorization; public class ViewPreauthorization { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var preauthId = "preauth_m_01J1Z3AD7VQKRXS67B5CR733T7"; CardPreAuthorization viewCardValidation = mangopay.getCardPreAuthorizationApi().get(preauthId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewCardValidation); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PreAuthorization card_preauthorization = PreAuthorization( id = '213944840' ) try: view_card_preauthorization = PreAuthorization.get(card_preauthorization.id) pprint(vars(view_card_preauthorization)) pprint(vars(view_card_preauthorization.billing)) pprint(vars(view_card_preauthorization.browser_info)) pprint(vars(view_card_preauthorization.security_info)) pprint(vars(view_card_preauthorization.shipping)) except PreAuthorization.DoesNotExist: print('The PreAuthorization {} does not exist'.format(card_preauthorization.id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var preauthorizationId = "preauth_m_01J30NHM7E0TQ9W5NRQ964W7WF"; var viewPreauthorization = await api.CardPreAuthorizations.GetAsync(preauthorizationId); string prettyPrint = JsonConvert.SerializeObject(viewPreauthorization, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Quote POST /v2.01/{ClientId}/conversions/quote This call guarantees a conversion rate to let you Create a Quoted Conversion. ### Body parameters Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). Required if `CreditedFunds.Amount` is `null` An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). Required if `CreditedFunds.Amount` is `null` An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Note:** For conversions between client wallets, the quote cannot have `Fees` specified. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). Required if `Fees` is sent. The currency of the fees. Required if `Fees` is sent. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. **Allowed values:** `300`, `3600` The time in seconds during which the quote is active and can be used for conversions. By default, quotes are available for a duration of 5 or 60 minutes, as agreed between Mangopay and the platform. ### Responses The unique identifier of the object. The date and time at which the object was created. The date and time at which the quote expires and can no longer be used. **Returned values:** `ACTIVE`, `EXPIRED` The status of the quote: * `ACTIVE` – The quote can be used to execute a quoted conversion. * `EXPIRED` – The quote can’t be used because the `ExpirationDate` is passed. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, `CreditedFunds.Amount` = (`DebitedFunds.Amount` - `Fees`) \* `MarketRate`.  Information about the conversion rate used during the transaction. *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. ```json { "Message": "Duration 90 is not in the allowed list: 300, 3600", "Type": "forbidden_ressource", "Id": "3af49cbd-d68c-403c-8a37-b1ef40c224a6", "Date": 1707299786, "errors": null } ``` ```json { "Message": "The currency JPY is not enabled for Forex. Contact your support to activate this feature.", "Type": "forbidden_ressource", "Id": "0dbb7cbc-da22-4b67-8685-b1aea8c4551e", "Date": 1707315388, "errors": null } ``` ```json { "Message": "Quoted conversion is not enabled. Contact your support to activate this feature.", "Type": "forbidden_ressource", "Id": "cb1a7c79-4ece-4930-9996-9c43b35df3b7", "Date": 1707315678, "errors": null } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "c1407e47-9146-486d-81b0-54cf9142f2c3", "Date": 1720793416.0, "errors": { "Quote.Amount": "Debited amount or credited amount is required" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "bd657a7e-7250-4d35-a49b-eddd24126e7b", "Date": 1720793433.0, "errors": { "Quote.Amount": "Only one of these fields is required: debited amount or credited amount" } } ``` ```json 200 - Active { "Id": "cvrquote_01J3G082JEQRQ4WGJPSVF5GPS7", "CreationDate": 1721745279, "ExpirationDate": 1721745579, "Status": "ACTIVE", "DebitedFunds": { "Currency": "GBP", "Amount": 1000 }, "CreditedFunds": { "Currency": "USD", "Amount": 1163 }, "Fees": { "Currency": "GBP", "Amount": 100 }, "ConversionRateResponse": { "ClientRate": 1.2793195, "MarketRate": 1.29172 }, "Tag": "Created using the Mangopay API Postman collection" } ``` ```json REST { "DebitedFunds": { "Currency": "GBP", "Amount": 1000 }, "CreditedFunds": { "Currency": "USD" }, "Fees": { "Currency": "GBP", "Amount": 100 }, "Duration": 300, "Tag": "Created using the Mangopay API Postman collection" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.ConversionQuote; import com.mangopay.entities.CreateConversionQuote; public class CreateQuote { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); CreateConversionQuote quote = new CreateConversionQuote(); Money debitedFunds = new Money(); debitedFunds.setCurrency(CurrencyIso.GBP); Money creditedFunds = new Money(); creditedFunds.setCurrency(CurrencyIso.USD); creditedFunds.setAmount(1000); quote.setDebitedFunds(debitedFunds); quote.setCreditedFunds(creditedFunds); quote.setDuration(300); quote.setTag("Created using the Mangopay Java SDK"); ConversionQuote createQuote = mangopay.getConversionsApi().createConversionQuote(quote, null); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createQuote); System.out.println(prettyJson); } } ``` # The Quote object (Guaranteed FX) ### Description The Quote object represents an agreement to freeze a conversion rate, for a given currency pair, for a duration of time.  Before it expires, an active quote can be used to create a quoted conversion at the quoted rate: * Between user wallets, using POST Create a Quoted Conversion between user Wallets * Between client wallets, using POST Create a Quoted Conversion between Client Wallets A quote is not required to create an instant conversion. ### Attributes The unique identifier of the object. The date and time at which the object was created. The date and time at which the quote expires and can no longer be used. **Returned values:** `ACTIVE`, `EXPIRED` The status of the quote: * `ACTIVE` – The quote can be used to execute a quoted conversion. * `EXPIRED` – The quote can’t be used because the `ExpirationDate` is passed. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Note:** The fees currency must match the debited funds currency. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the conversion rate used during the transaction. *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. **Allowed values:** `300`, `3600` The time in seconds during which the quote is active and can be used for conversions. By default, quotes are available for a duration of 5 or 60 minutes, as agreed between Mangopay and the platform. ### Related resources Learn more about FX # View a Quote GET /v2.01/{ClientId}/conversions/quote/{QuoteId} ### Responses The unique identifier of the object. The date and time at which the object was created. The date and time at which the quote expires and can no longer be used. **Returned values:** `ACTIVE`, `EXPIRED` The status of the quote: * `ACTIVE` – The quote can be used to execute a quoted conversion. * `EXPIRED` – The quote can’t be used because the `ExpirationDate` is passed. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, `CreditedFunds.Amount` = (`DebitedFunds.Amount` - `Fees`) \* `MarketRate`.  Information about the conversion rate used during the transaction. *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the object. The date and time at which the object was created. The date and time at which the quote expires and can no longer be used. **Returned values:** `ACTIVE`, `EXPIRED` The status of the quote: * `ACTIVE` – The quote can be used to execute a quoted conversion. * `EXPIRED` – The quote can’t be used because the `ExpirationDate` is passed. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds (the buy currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, `CreditedFunds.Amount` = (`DebitedFunds.Amount` - `Fees`) \* `MarketRate`.  Information about the conversion rate used during the transaction. *Max. 7 decimal places* The rate including Mangopay’s markup, indicative of the rate invoiced during the billing cycle: `ClientRate` = `MarketRate` \* (1 - markup).  The `ClientRate` fluctuates in line with the `MarketRate`. *Max. 7 decimal places* The rate used to convert funds during a conversion: (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`. The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. ```json 200 - Active { "Id": "cvrquote_01J3G082JEQRQ4WGJPSVF5GPS7", "CreationDate": 1721745279, "ExpirationDate": 1721745579, "Status": "ACTIVE", "DebitedFunds": { "Currency": "GBP", "Amount": 1000 }, "CreditedFunds": { "Currency": "USD", "Amount": 1163 }, "Fees": { "Currency": "GBP", "Amount": 100 }, "ConversionRateResponse": { "ClientRate": 1.2793195, "MarketRate": 1.29172 }, "Tag": "Created using the Mangopay API Postman collection" } ``` ```json 200 - Expired { "Id": "cvrquote_01J3G082JEQRQ4WGJPSVF5GPS7", "CreationDate": 1721745279, "ExpirationDate": 1721745579, "Status": "EXPIRED", "DebitedFunds": { "Currency": "GBP", "Amount": 1000 }, "CreditedFunds": { "Currency": "USD", "Amount": 1163 }, "Fees": { "Currency": "GBP", "Amount": 100 }, "ConversionRateResponse": { "ClientRate": 1.2793195, "MarketRate": 1.29172 }, "Tag": "Created using the Mangopay API Postman collection" } ``` ```java Java import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.ConversionQuote; public class ViewQuote { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); ConversionQuote quote = mangopay.getConversionsApi().getConversionQuote("cvrquote_01HTFARNTMH993KYYNC8MZ2KH8"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(quote); System.out.println(prettyJson); } } ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var quoteId = "cvrquote_01J53JS92WDW6D0VY5136YTGJ7"; var viewQuote = await api.Conversions.GetConversionQuote(quoteId); string prettyPrint = JsonConvert.SerializeObject(viewQuote, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Recurring PayIn (CIT) POST /v2.01/{ClientId}/payins/recurring/card/direct [Read more about the Recurring Card PayIn object](/api-reference/recurring-card-payins/recurring-payin-object) **→** ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. Required if the registration’s `NextTransactionDebitedFunds` is empty. The amount of the subsequent recurring pay-in. If this field is empty, the amount entered in the `NextTransactionDebitedFunds` of the Recurring PayIn Registration is taken into account. **Caution:** An amount must be transmitted during either the recurring registration or pay-in (if it’s different from the registration one). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Required if the registration’s `NextTransactionFees` is empty. The amount of the subsequent fees. If this field is empty, the amount entered in the `NextTransactionFees` of the Recurring PayIn Registration is taken into account. **Caution:** An amount must be transmitted during either the recurring registration or pay-in (if it’s different from the registration one). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). The language in which the payment page is to be displayed. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. The unique identifier of the recurring pay-in registration. **Allowed values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The amount of the subsequent recurring pay-in. If this field is empty, the amount entered in the `NextTransactionDebitedFunds` of the Recurring PayIn Registration is taken into account. **Caution:** An amount must be transmitted during either the recurring registration or pay-in (if it’s different from the registration one). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The amount of the subsequent fees. If this field is empty, the amount entered in the `NextTransactionFees` of the Recurring PayIn Registration is taken into account. **Caution:** An amount must be transmitted during either the recurring registration or pay-in (if it’s different from the registration one). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The unique identifier of the recurring pay-in registration. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 { "Id":"156285688", "Tag":"Created using MANGOPAY API Collection Postman", "CreationDate":1668601301, "AuthorId":"146476890", "CreditedUserId":"146476890", "DebitedFunds":{ "Currency":"EUR", "Amount":900 }, "CreditedFunds":{ "Currency":"EUR", "Amount":890 }, "Fees":{ "Currency":"EUR", "Amount":10 }, "Status":"SUCCEEDED", "ResultCode":"000000", "ResultMessage":"Success", "ExecutionDate":1668601302, "Type":"PAYIN", "Nature":"REGULAR", "CreditedWalletId":"148968396", "DebitedWalletId":null, "PaymentType":"CARD", "ExecutionType":"DIRECT", "SecureMode":null, "CardId":"156285393", "SecureModeReturnURL":"http://www.my-site.com/returnURL?transactionId=156285688", "SecureModeRedirectURL":null, "SecureModeNeeded":false, "Culture":"EN", "SecurityInfo":{ "AVSResult":"NO_CHECK" }, "StatementDescriptor":"POSTMAN", "BrowserInfo":{ "AcceptHeader":"text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled":true, "Language":"FR-FR", "ColorDepth":4, "ScreenHeight":1800, "ScreenWidth":400, "TimeZoneOffset":60, "UserAgent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled":true }, "IpAddress":"2001:0620:0000:0000:0211:24FF:FE80:C12C", "Billing":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Shipping":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Requested3DSVersion":null, "Applied3DSVersion":"V2_1", "RecurringPayinRegistrationId":"156285527", "PreferredCardNetwork":"MASTERCARD", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "MASTERCARD", "SubType": null } } ``` ```json REST { "Tag":"custom meta", "DebitedFunds":{ "Currency":"EUR", "Amount":900 }, "Fees":{ "Currency":"EUR", "Amount":10 }, "SecureModeReturnURL":"https://docs.mangopay.com/please-ignore", "Culture":"EN", "StatementDescriptor":"POSTMAN", "BrowserInfo":{ "AcceptHeader":"text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled":true, "Language":"FR-FR", "ColorDepth":4, "ScreenHeight":1800, "ScreenWidth":400, "TimeZoneOffset":60, "UserAgent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled":true }, "IpAddress":"2001:0620:0000:0000:0211:24FF:FE80:C12C", "RecurringPayinRegistrationId":"156285527", "PreferredCardNetwork": "MASTERCARD" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $cit = new \MangoPay\RecurringPayInCIT(); $cit->RecurringPayinRegistrationId = 'recpayinreg_m_01J2EA0TAVQPNY4JGGF1J7RD97'; $cit->SecureModeReturnURL = "https://docs.mangopay.com/please-ignore"; $cit->StatementDescriptor = "MGP TEST"; $cit->Tag = "Generated using Mangopay documentation"; $cit->IpAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C"; $browserInfo = new \MangoPay\BrowserInfo(); $browserInfo->AcceptHeader = "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8"; $browserInfo->JavaEnabled = true; $browserInfo->Language = "FR-FR"; $browserInfo->ColorDepth = 4; $browserInfo->ScreenHeight = 1800; $browserInfo->ScreenWidth = 400; $browserInfo->TimeZoneOffset = 60; $browserInfo->UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"; $browserInfo->JavascriptEnabled = true; $cit->BrowserInfo = $browserInfo; // Required if the registration’s NextTransactionDebitedFunds is empty. $cit->DebitedFunds = new \MangoPay\Money(); $cit->DebitedFunds->Amount = 10; $cit->DebitedFunds->Currency = 'EUR'; $cit->Fees = new \MangoPay\Money(); $cit->Fees->Amount = 1; $cit->Fees->Currency = 'EUR'; $response = $api->PayIns->CreateRecurringPayInRegistrationCIT($cit); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myRecurringPayinCIT = { Tag: 'Created with Mangopay Nodejs SDK', DebitedFunds: { Currency: 'EUR', Amount: 1000, }, Fees: { Currency: 'EUR', Amount: 10, }, SecureModeReturnURL: 'https://mangopay.com/docs/please-ignore', StatementDescriptor: 'Mangopay', BrowserInfo: { AcceptHeader: 'text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8', JavaEnabled: true, Language: 'FR-FR', ColorDepth: 4, ScreenHeight: 1800, ScreenWidth: 400, TimeZoneOffset: 60, UserAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', JavascriptEnabled: true, }, IpAddress: '2d1b:f91a:075a:7fc8:0cb7:b471:cd55:017e', RecurringPayiNRegistrationId: '192912686', } const createRecurringPayIn = async (recurringPayin) => { return await mangopay.PayIns.createRecurringPayInRegistrationCIT(recurringPayin) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createRecurringPayIn(myRecurringPayinCIT) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def CreateRecurringPayInCIT(recurringPayinCITObject) begin response = MangoPay::PayIn::RecurringPayments::CIT.create(recurringPayinCITObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed : #{error.message}" puts "Error details: #{error.details}" return false end end my_cit_object = { "Tag":"custom meta", # "DebitedFunds":{ # "Currency":"EUR", # "Amount":900 # }, # "Fees":{ # "Currency":"EUR", # "Amount":10 # }, "SecureModeReturnURL":"https://docs.mangopay.com/please-ignore", "StatementDescriptor":"POSTMAN", "BrowserInfo":{ "AcceptHeader":"text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", "JavaEnabled":true, "Language":"FR-FR", "ColorDepth":4, "ScreenHeight":1800, "ScreenWidth":400, "TimeZoneOffset":60, "UserAgent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled":true }, "IpAddress":"2001:0620:0000:0000:0211:24FF:FE80:C12C", "RecurringPayinRegistrationId":"recpayinreg_m_01J2EG8FD7TD6R3HGPZ8ZM917Y", "PreferredCardNetwork": "MASTERCARD" } CreateRecurringPayInCIT(my_cit_object) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.RecurringPayIn; import com.mangopay.entities.RecurringPayInCIT; import com.mangopay.entities.subentities.BrowserInfo; public class CreateCITRecurringPayin { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var recurringPayinRegistrationId = "recpayinreg_m_01J28W33B63S26WP9GA9YWJ5N2"; RecurringPayInCIT citPayin = new RecurringPayInCIT(); citPayin.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); citPayin.setFees(new Money(CurrencyIso.EUR, 0)); citPayin.setSecureModeReturnURL("https://mangopay.com/docs/please-ignore"); citPayin.setIpAddress("192.158.1.38"); citPayin.setRecurringPayInRegistrationId(recurringPayinRegistrationId); citPayin.setBrowserInfo(new BrowserInfo()); citPayin.getBrowserInfo().setAcceptHeader("text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8"); citPayin.getBrowserInfo().setJavaEnabled(true); citPayin.getBrowserInfo().setLanguage("EN"); citPayin.getBrowserInfo().setColorDepth(4); citPayin.getBrowserInfo().setScreenHeight(1800); citPayin.getBrowserInfo().setScreenWidth(400); citPayin.getBrowserInfo().setTimeZoneOffset("60"); citPayin.getBrowserInfo().setUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"); citPayin.getBrowserInfo().setJavascriptEnabled(true); RecurringPayIn createCitPayin = mangopay.getPayInApi().createRecurringPayInCIT(null, citPayin); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createCitPayin); System.out.println(prettyJson); } } ``` ```python Python import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, RecurringPayInCIT from mangopay.utils import Money, BrowserInfo natural_user = NaturalUser.get('210513027') recurring_payin_cit = RecurringPayInCIT( debited_funds = Money(amount=1000, currency='EUR'), fees = Money(amount=0, currency='EUR'), secure_mode_return_url = 'https://mangopay.com/docs/please-ignore', browser_info = BrowserInfo( user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', screen_width = 375, screen_height = 667, color_depth = 32, language = 'EN', accept_header = 'application/json,text/javascript,*/*;q=0.01<', timezone_offset = '-120', java_enabled = True, javascript_enabled = True ), ip_address = '159.180.248.187', recurring_payin_registration_id = '213879771', tag = 'Created using Mangopay Python SDK' ) create_recurring_payin_cit = recurring_payin_cit.save() pprint(create_recurring_payin_cit) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var registrationId = "recpayinreg_m_01J30K243KTJSRXHWJ03MMEE7A"; var citPayIn = new RecurringPayInCITPostDTO { RecurringPayinRegistrationId = registrationId, BrowserInfo = new BrowserInfo { AcceptHeader = "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", JavaEnabled = true, Language = "FR-FR", ColorDepth = 4, ScreenHeight = 1800, ScreenWidth = 400, JavascriptEnabled = true, TimeZoneOffset = "+60", UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" }, IpAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C", SecureModeReturnURL = "http://www.mangopay.com/please-ignore", StatementDescriptor = "MGP", Tag = "Created using the Mangopay .NET SDK", DebitedFunds = new Money { Amount = 500, Currency = CurrencyIso.EUR }, Fees = new Money { Amount = 0, Currency = CurrencyIso.EUR } }; var createRecurringCitPayIn = await api.PayIns.CreateRecurringPayInRegistrationCIT(citPayIn); string prettyPrint = JsonConvert.SerializeObject(createRecurringCitPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Recurring PayIn (MIT) POST /v2.01/{ClientId}/payins/recurring/card/direct [Read more about the Recurring Card PayIn object](/api-reference/recurring-card-payins/recurring-payin-object) **→** ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. Required if the registration’s `NextTransactionDebitedFunds` is empty. The amount of the subsequent recurring pay-in. If this field is empty, the amount entered in the `NextTransactionDebitedFunds` of the Recurring PayIn Registration is taken into account. **Caution:** An amount must be transmitted during either the recurring registration or pay-in (if it’s different from the registration one). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Required if the registration’s `NextTransactionFees` is empty. The amount of the subsequent fees. If this field is empty, the amount entered in the `NextTransactionFees` of the Recurring PayIn Registration is taken into account. **Caution:** An amount must be transmitted during either the recurring registration or pay-in (if it’s different from the registration one). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The unique identifier of the recurring pay-in registration. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The amount of the subsequent recurring pay-in. If this field is empty, the amount entered in the `NextTransactionDebitedFunds` of the Recurring PayIn Registration is taken into account. **Caution:** An amount must be transmitted during either the recurring registration or pay-in (if it’s different from the registration one). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The amount of the subsequent fees. If this field is empty, the amount entered in the `NextTransactionFees` of the Recurring PayIn Registration is taken into account. **Caution:** An amount must be transmitted during either the recurring registration or pay-in (if it’s different from the registration one). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The unique identifier of the recurring pay-in registration. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 { "Id":"156288494", "Tag":"Created using MANGOPAY API Collection Postman", "CreationDate":1668603610, "AuthorId":"146476890", "CreditedUserId":"146476890", "DebitedFunds":{ "Currency":"EUR", "Amount":900 }, "CreditedFunds":{ "Currency":"EUR", "Amount":890 }, "Fees":{ "Currency":"EUR", "Amount":10 }, "Status":"SUCCEEDED", "ResultCode":"000000", "ResultMessage":"Success", "ExecutionDate":1668603612, "Type":"PAYIN", "Nature":"REGULAR", "CreditedWalletId":"148968396", "DebitedWalletId":null, "PaymentType":"CARD", "ExecutionType":"DIRECT", "SecureMode":null, "CardId":"156285393", "SecureModeReturnURL":null, "SecureModeRedirectURL":null, "SecureModeNeeded":false, "Culture":"EN", "SecurityInfo":{ "AVSResult":"NO_CHECK" }, "StatementDescriptor":"POSTMAN", "BrowserInfo":null, "IpAddress":null, "Billing":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Shipping":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Requested3DSVersion":null, "Applied3DSVersion":null, "RecurringPayinRegistrationId":"156285527", "PreferredCardNetwork":"MASTERCARD", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "MASTERCARD", "SubType": null } } ``` ```json REST { "Tag":"Custom meta", "DebitedFunds":{ "Currency":"EUR", "Amount":900 }, "Fees":{ "Currency":"EUR", "Amount":10 }, "StatementDescriptor":"Mar2022", "RecurringPayinRegistrationId":"156285527" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $mit = new \MangoPay\RecurringPayInMIT(); $mit->RecurringPayinRegistrationId = 'recpayinreg_m_01J2EG8FD7TD6R3HGPZ8ZM917Y'; $mit->StatementDescriptor = "MGP TEST"; $mit->Tag = "Generated using Mangopay documentation"; // Required if the registration’s NextTransactionDebitedFunds is empty. $mit->DebitedFunds = new \MangoPay\Money(); $mit->DebitedFunds->Amount = 10; $mit->DebitedFunds->Currency = 'EUR'; $mit->Fees = new \MangoPay\Money(); $mit->Fees->Amount = 1; $mit->Fees->Currency = 'EUR'; $response = $api->PayIns->CreateRecurringPayInRegistrationMIT($mit); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myRecurringPayinMIT = { Tag: 'Created with Mangopay Nodejs SDK', DebitedFunds: { Currency: 'EUR', Amount: 1000, }, Fees: { Currency: 'EUR', Amount: 10, }, StatementDescriptor: 'Mangopay', RecurringPayiNRegistrationId: '192912686', } const createRecurringPayIn = async (recurringPayin) => { return await mangopay.PayIns.createRecurringPayInRegistrationMIT(recurringPayin) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createRecurringPayIn(myRecurringPayinMIT) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def CreateRecurringPayInMIT(recurringPayinMITObject) begin response = MangoPay::PayIn::RecurringPayments::MIT.create(recurringPayinMITObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed : #{error.message}" puts "Error details: #{error.details}" return false end end my_mit_object = { "Tag":"custom meta", # "DebitedFunds":{ # "Currency":"EUR", # "Amount":900 # }, # "Fees":{ # "Currency":"EUR", # "Amount":10 # }, "StatementDescriptor":"POSTMAN", "RecurringPayinRegistrationId":"recpayinreg_m_01J2EG8FD7TD6R3HGPZ8ZM917Y", } CreateRecurringPayInMIT(my_mit_object) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.RecurringPayIn; import com.mangopay.entities.RecurringPayInMIT; public class CreateMITRecurringPayin { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var recurringPayinRegistrationId = "recpayinreg_m_01J28W33B63S26WP9GA9YWJ5N2"; RecurringPayInMIT mitPayin = new RecurringPayInMIT(); mitPayin.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); mitPayin.setFees(new Money(CurrencyIso.EUR, 0)); mitPayin.setRecurringPayInRegistrationId(recurringPayinRegistrationId); RecurringPayIn createMitPayin = mangopay.getPayInApi().createRecurringPayInMIT(null, mitPayin); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createMitPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Money, RecurringPayInMIT from mangopay.utils import BrowserInfo natural_user = NaturalUser.get('210513027') recurring_payin_mit = RecurringPayInMIT( debited_funds = Money(amount=1000, currency='EUR'), secure_mode_return_url = 'https://mangopay.com/docs/please-ignore', browser_info = BrowserInfo( # Missing from doc, but needed here user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 _1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', screen_width = 375, screen_height = 667, color_depth = 32, language = 'EN', accept_header = 'application/json,text/javascript,*/*;q=0.01<', timezone_offset = '-120', java_enabled = True, javascript_enabled = True ), fees = Money(amount=0, currency='EUR'), ip_address = '159.180.248.187', recurring_payin_registration_id = '213879771', statement_descriptor = 'Jan2024', tag = 'Created using Mangopay Python SDK' ) create_recurring_payin_mit = recurring_payin_mit.save() pprint(create_recurring_payin_mit) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var registrationId = "recpayinreg_m_01J30K243KTJSRXHWJ03MMEE7A"; var mitPayIn = new RecurringPayInMITPostDTO { RecurringPayinRegistrationId = registrationId, StatementDescriptor = "MGP", Tag = "Created using the Mangopay .NET SDK", DebitedFunds = new Money { Amount = 1000, Currency = CurrencyIso.EUR }, Fees = new Money { Amount = 10, Currency = CurrencyIso.EUR } }; var createRecurringMitPayIn = await api.PayIns.CreateRecurringPayInRegistrationMIT(mitPayIn); string prettyPrint = JsonConvert.SerializeObject(createRecurringMitPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Recurring PayIn object ### Description The Recurring PayIn object represents a card pay-in linked to a Recurring PayIn Registration object.  There are two types of recurring pay-ins: * Customer-initiated transaction (CIT) – First pay-in of the series, which requires the cardholder to authenticate via the 3DS protocol. * Merchant-initiated transaction (MIT) – All the pay-ins occurring after a successful CIT, which are executed in the absence of the cardholder. **Note – Max. 99 pay-ins possible against each registration** A maximum of 99 pay-ins, CIT and MIT included, can be made against each Recurring PayIn Registration. Once you reach this limit, the 100th pay-in will fail with the error 205001. You need to create a new registration object to restart the recurrence (with a CIT). ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. The amount of the subsequent recurring pay-in. If this field is empty, the amount entered in the `NextTransactionDebitedFunds` of the Recurring PayIn Registration is taken into account. **Caution:** An amount must be transmitted during either the recurring registration or pay-in (if it’s different from the registration one). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The amount of the subsequent fees. If this field is empty, the amount entered in the `NextTransactionFees` of the Recurring PayIn Registration is taken into account. **Caution:** An amount must be transmitted during either the recurring registration or pay-in (if it’s different from the registration one). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. **Default value:** DEFAULT The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. Whether or not the `SecureMode` was used. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The unique identifier of the recurring pay-in registration. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. Information about the card used for the transaction. \ If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ### Related resources Learn more about recurring card payments # View a PayIn (Recurring Card) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. The unique identifier of the Card object, obtained during the card registration process. *Max. length: 255 characters* The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). *Max. length: 255 characters* The URL to which to redirect the user to proceed to 3DS2 validation. Whether or not the `SecureMode` was used. **Returned values:** One of the supported languages in the ISO 639-1 format: DE, EN, ES, FR, IT, NL, PL, PT. The language in which the payment page is to be displayed. Information regarding security and anti-fraud tools. The result of the Address Verification System check (only available for UK, US, and Canada). *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. Information about the browser used by the end user (author) to perform the payment. The exact content of the HTTP accept headers as sent to the platform from the end user’s browser. Whether or not the end user’s browser has the ability to execute Java. *Max. length: 6 characters* The browser language, made up of the language code and the country (e.g., “en-US”). The value representing the depth of the screen’s color palette for displaying images, in bits per pixel. *Max. length: 6 characters* The height of the screen in pixels. *Max. length: 6 characters* The width of the screen in pixels. The difference in minutes between the browser’s timezone and UTC. *Max. length: 255 characters* The exact content of the HTTP User-Agent header. Whether or not the end user’s browser has the ability to execute JavaScript. The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Returned values:** `V1`, `V2_1` The 3DS protocol version to be applied to the transaction. **Returned values:** `V1`, `V2_1` The 3DS protocol version applied to the transaction. The unique identifier of the recurring pay-in registration. **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO` The card network to use, as chosen by the cardholder, in case of co-branded card products. Information about the card used for the transaction. If the information or data is not available, `null` is returned. The 6-digit bank identification number (BIN) of the card issuer. The name of the card issuer. *Format: ISO 3166-1 alpha-2 two-letter country code* The country where the card was issued. **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`. The type of card product. The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc. **Note:** The possible returned values are numerous and liable to evolve over time. ```json 200 { "Id":"156288494", "Tag":"Created using MANGOPAY API Collection Postman", "CreationDate":1668603610, "AuthorId":"146476890", "CreditedUserId":"146476890", "DebitedFunds":{ "Currency":"EUR", "Amount":900 }, "CreditedFunds":{ "Currency":"EUR", "Amount":890 }, "Fees":{ "Currency":"EUR", "Amount":10 }, "Status":"SUCCEEDED", "ResultCode":"000000", "ResultMessage":"Success", "ExecutionDate":1668603612, "Type":"PAYIN", "Nature":"REGULAR", "CreditedWalletId":"148968396", "DebitedWalletId":null, "PaymentType":"CARD", "ExecutionType":"DIRECT", "SecureMode":null, "CardId":"156285393", "SecureModeReturnURL":null, "SecureModeRedirectURL":null, "SecureModeNeeded":false, "Culture":"EN", "SecurityInfo":{ "AVSResult":"NO_CHECK" }, "StatementDescriptor":"POSTMAN", "BrowserInfo":null, "IpAddress":null, "Billing":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Shipping":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Requested3DSVersion":null, "Applied3DSVersion":null, "RecurringPayinRegistrationId":"156285527", "PreferredCardNetwork":"MASTERCARD", "CardInfo": { "BIN": "497010", "IssuingBank": "LA BANQUE POSTALE", "IssuerCountryCode": "MA", "Type": "CREDIT", "Brand": "MASTERCARD", "SubType": null } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetAsync("payin_m_01J334XF2V6751GRG9M2M558HG"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Recurring PayIn Registration POST /v2.01/{ClientId}/recurringpayinregistrations ### Body parameters The unique identifier of the user at the source of the transaction. The unique identifier of the Card object, obtained during the card registration process. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the credited wallet. The amount of the first recurring pay-in.\ This value can be different from the `NextTransactionDebitedFunds` **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The fees of the first recurring pay-in.\ This amount can be different from the `NextTransactionDebitedFunds`. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Required if the parent parameter is sent. Information about the shipping address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. The date and time at which the recurring pay-ins will end. This value has no impact on the recurring registration `Status`.\ Caution: If the `EndDate` is left unspecified, please bear in mind that one could be defined by default and be displayed to your end users (not taken into account in the payment recurrence). **Allowed values:** `Daily`, `Weekly`, `TwiceAMonth`, `Monthly`, `Bimonthly`, `Quarterly`, `Semiannual`, `Annual`, `Biannual` The frequency at which the recurring pay-ins will occur: * `Daily` – 1 transaction per day. * `Weekly` – 1 transaction every 7 days. * `TwiceAMonth` – 2 transactions per month. * `Monthly` – 1 transaction per month. * `Bimonthly` – 1 transaction every 2 months. * `Quarterly` – 1 transaction every 3 months. * `Semiannual` – 1 transaction every 6 months. * `Annual` – 1 transaction per year. * `Biannual` – 1 transaction every 2 years. Whether or not the recurring pay-ins’ debited amounts remain the same for all the pay-ins linked to the recurring registration object. Whether or not the recurring pay-ins are being made to split a payment in several installments. The number of initial consecutive pay-ins where there will be no debited funds nor fees.\ This value cannot exceed the `CycleNumber` value (for recurring objects with an `EndDate`, `FixedNextAmount`, and `Frequency`).\ Note: When creating a recurring pay-in (MIT) for a pay-in subject to a free cycle, the `DebitedFunds` and `Fees` parameters should be ignored. Otherwise, the pay-in will fail with the corresponding error returned. Whether or not to attempt the first recurring pay-in as a merchant-initiated transaction (MIT). **Caution:** Migration is no longer supported and any object with `Migration` set to `true` must not be used for re-authentication of the user. You must create a new recurring pay-in registration without the `Migration` parameter (`false` by default) and restart the recurrence (see the how-to guide for details). Existing objects with `Migration` set to `true` are likely to fail or no longer be usable. This may be indicated by the `Status` changing to `AUTHENTICATION_NEEDED` or by errors on the pay-in request, for example: non-existent card account (008008), soft decline (101305), expired card (101105), or stolen card (008003). The amount of the subsequent recurring pay-ins. If this field is empty and either `FixedNextAmount` or `FractionedPayment` are `true`, the subsequent amount will be the same as `FirstTransactionDebitedFunds` amount. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The fees of the subsequent recurring pay-ins. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. **Returned values:** `CREATED`, `AUTHENTICATION_NEEDED`, `IN_PROGRESS`, `ENDED` The status of the recurring registration: * `CREATED` – The recurring registration was created, but no recurring pay-in has yet been made. * `AUTHENTICATION_NEEDED` – The latest recurring pay-in linked to the registration object was refused. The registration object can still be used, but you need to execute a new customer-initiated transaction (CIT) for the end user to reauthenticate. * `IN_PROGRESS` – The recurring registration object is in use and the subsequent corresponding recurring pay-ins can be made. * `ENDED` – The recurrence ended: the registration can no longer be modified nor reused. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. Information about the recurring pay-ins related to the registration object. **Note:** If the `LastPayinId` references a transaction older than 13 months, it may have been archived. The number of recurring pay-ins already made for the registration object. The sum of the `DebitedFunds` amounts of the recurring pay-ins made for the registration. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The sum of the `Fees` amounts of the recurring pay-ins made for the registration. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the last recurring pay-in made for the registration. **Returned values:** `CLASSIC_SUBSCRIPTION`, `FRACTIONED_PAYMENT`, `CUSTOM` The type of recurrence, which can be one of the following: * `CLASSIC_SUBSCRIPTION` – For fixed-amount subscriptions. The `Amount` of each pay-in and the subscription’s `EndDate` are known, and these values cannot be modified during the recurrence. * `FRACTIONED_PAYMENT` – For payments in 3 or 4 times. The `Amount` of each pay-in and the registration’s `EndDate` are known, and these values cannot be modified during the recurrence. * `CUSTOM` – For recurring registrations where the `Amount` and `EndDate` are unknown. The total amount in the registration.\ This value is automatically calculated based on the `EndDate`, `FixedNextAmount`, and `Frequency` parameters (if defined). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The number of cycles in the registration (and therefore the number of payments).\ This value is automatically calculated based on the `EndDate`, `FixedNextAmount`, and `Frequency` parameters (if defined). The unique identifier of the user at the source of the transaction. The unique identifier of the Card object, obtained during the card registration process. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the credited wallet. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. The date and time at which the recurring pay-ins will end. This value has no impact on the recurring registration `Status`.\ Caution: If the `EndDate` is left unspecified, please bear in mind that one could be defined by default and be displayed to your end users (not taken into account in the payment recurrence). **Returned values:** `Daily`, `Weekly`, `TwiceAMonth`, `Monthly`, `Bimonthly`, `Quarterly`, `Semiannual`, `Annual`, `Biannual` The frequency at which the recurring pay-ins will occur: * `Daily` – 1 transaction per day. * `Weekly` – 1 transaction every 7 days. * `TwiceAMonth` – 2 transactions per month. * `Monthly` – 1 transaction per month. * `Bimonthly` – 1 transaction every 2 months. * `Quarterly` – 1 transaction every 3 months. * `Semiannual` – 1 transaction every 6 months. * `Annual` – 1 transaction per year. * `Biannual` – 1 transaction every 2 years. Whether or not the recurring pay-ins’ debited amounts remain the same for all the pay-ins linked to the recurring registration object. Whether or not the recurring pay-ins are being made to split a payment in several installments. The number of initial consecutive pay-ins where there will be no debited funds nor fees.\ This value cannot exceed the `CycleNumber` value (for recurring objects with an `EndDate`, `FixedNextAmount`, and `Frequency`).\ Note: When creating a recurring pay-in (MIT) for a pay-in subject to a free cycle, the `DebitedFunds` and `Fees` parameters should be ignored. Otherwise, the pay-in will fail with the corresponding error returned. The amount of the first recurring pay-in.\ This value can be different from the `NextTransactionDebitedFunds` **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The fees of the first recurring pay-in.\ This amount can be different from the `NextTransactionDebitedFunds`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The amount of the subsequent recurring pay-ins. If this field is empty and either `FixedNextAmount` or `FractionedPayment` are `true`, the subsequent amount will be the same as `FirstTransactionDebitedFunds` amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The fees of the subsequent recurring pay-ins. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Whether or not to attempt the first recurring pay-in as a merchant-initiated transaction (MIT). **Caution:** Migration is no longer supported and any object with `Migration` set to `true` must not be used for re-authentication of the user. You must create a new recurring pay-in registration without the `Migration` parameter (`false` by default) and restart the recurrence (see the how-to guide for details). Existing objects with `Migration` set to `true` are likely to fail or no longer be usable. This may be indicated by the `Status` changing to `AUTHENTICATION_NEEDED` or by errors on the pay-in request, for example: non-existent card account (008008), soft decline (101305), expired card (101105), or stolen card (008003). The unique identifier of the object. **Returned values:** `CREATED`, `AUTHENTICATION_NEEDED`, `IN_PROGRESS`, `ENDED` The status of the recurring registration: * `CREATED` – The recurring registration was created, but no recurring pay-in has yet been made. * `AUTHENTICATION_NEEDED` – The latest recurring pay-in linked to the registration object was refused. The registration object can still be used, but you need to execute a new customer-initiated transaction (CIT) for the end user to reauthenticate. * `IN_PROGRESS` – The recurring registration object is in use and the subsequent corresponding recurring pay-ins can be made. * `ENDED` – The recurrence ended: the registration can no longer be modified nor reused. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. Information about the recurring pay-ins related to the registration object. **Note:** If the `LastPayinId` references a transaction older than 13 months, it may have been archived. The number of recurring pay-ins already made for the registration object. The sum of the `DebitedFunds` amounts of the recurring pay-ins made for the registration. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The sum of the `Fees` amounts of the recurring pay-ins made for the registration. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the last recurring pay-in made for the registration. **Returned values:** `CLASSIC_SUBSCRIPTION`, `FRACTIONED_PAYMENT`, `CUSTOM` The type of recurrence, which can be one of the following: * `CLASSIC_SUBSCRIPTION` – For fixed-amount subscriptions. The `Amount` of each pay-in and the subscription’s `EndDate` are known, and these values cannot be modified during the recurrence. * `FRACTIONED_PAYMENT` – For payments in 3 or 4 times. The `Amount` of each pay-in and the registration’s `EndDate` are known, and these values cannot be modified during the recurrence. * `CUSTOM` – For recurring registrations where the `Amount` and `EndDate` are unknown. The total amount in the registration.\ This value is automatically calculated based on the `EndDate`, `FixedNextAmount`, and `Frequency` parameters (if defined). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The number of cycles in the registration (and therefore the number of payments).\ This value is automatically calculated based on the `EndDate`, `FixedNextAmount`, and `Frequency` parameters (if defined). The unique identifier of the user at the source of the transaction. The unique identifier of the Card object, obtained during the card registration process. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the credited wallet. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. The date and time at which the recurring pay-ins will end. This value has no impact on the recurring registration `Status`.\ Caution: If the `EndDate` is left unspecified, please bear in mind that one could be defined by default and be displayed to your end users (not taken into account in the payment recurrence). **Returned values:** `Daily`, `Weekly`, `TwiceAMonth`, `Monthly`, `Bimonthly`, `Quarterly`, `Semiannual`, `Annual`, `Biannual` The frequency at which the recurring pay-ins will occur: * `Daily` – 1 transaction per day. * `Weekly` – 1 transaction every 7 days. * `TwiceAMonth` – 2 transactions per month. * `Monthly` – 1 transaction per month. * `Bimonthly` – 1 transaction every 2 months. * `Quarterly` – 1 transaction every 3 months. * `Semiannual` – 1 transaction every 6 months. * `Annual` – 1 transaction per year. * `Biannual` – 1 transaction every 2 years. Whether or not the recurring pay-ins’ debited amounts remain the same for all the pay-ins linked to the recurring registration object. Whether or not the recurring pay-ins are being made to split a payment in several installments. The number of initial consecutive pay-ins where there will be no debited funds nor fees.\ This value cannot exceed the `CycleNumber` value (for recurring objects with an `EndDate`, `FixedNextAmount`, and `Frequency`).\ Note: When creating a recurring pay-in (MIT) for a pay-in subject to a free cycle, the `DebitedFunds` and `Fees` parameters should be ignored. Otherwise, the pay-in will fail with the corresponding error returned. The amount of the first recurring pay-in.\ This value can be different from the `NextTransactionDebitedFunds` **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The fees of the first recurring pay-in.\ This amount can be different from the `NextTransactionDebitedFunds`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The amount of the subsequent recurring pay-ins. If this field is empty and either `FixedNextAmount` or `FractionedPayment` are `true`, the subsequent amount will be the same as `FirstTransactionDebitedFunds` amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The fees of the subsequent recurring pay-ins. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Whether or not to attempt the first recurring pay-in as a merchant-initiated transaction (MIT). **Caution:** Migration is no longer supported and any object with `Migration` set to `true` must not be used for re-authentication of the user. You must create a new recurring pay-in registration without the `Migration` parameter (`false` by default) and restart the recurrence (see the how-to guide for details). Existing objects with `Migration` set to `true` are likely to fail or no longer be usable. This may be indicated by the `Status` changing to `AUTHENTICATION_NEEDED` or by errors on the pay-in request, for example: non-existent card account (008008), soft decline (101305), expired card (101105), or stolen card (008003). ```json 200 { "Id":"155172881", "Status":"CREATED", "ResultCode": null, "ResultMessage": null, "CurrentState":{ "PayinsLinked":0, "CumulatedDebitedAmount":{ "Currency":"EUR", "Amount":0 }, "CumulatedFeesAmount":{ "Currency":"EUR", "Amount":0 }, "LastPayinId":null }, "RecurringType":"CUSTOM", "TotalAmount":null, "CycleNumber":null, "AuthorId":"146476890", "CardId":"155155221", "CreditedUserId":"142036728", "CreditedWalletId":"145389978", "Billing":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Shipping":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "EndDate":1698923634, "Frequency":"Monthly", "FixedNextAmount":true, "FractionedPayment":true, "FreeCycles":0, "FirstTransactionDebitedFunds":null, "FirstTransactionFees":null, "NextTransactionDebitedFunds":null, "NextTransactionFees":null, "Migration":true } ``` ```json 200 - Transaction blocked by fraud policy { "Id": "payin_m_01HPHHMCN6WDH7NH1C63005DK5", "Status": "ENDED", "ResultCode": "008500", "ResultMessage": "Transaction blocked by Fraud Policy", "CurrentState": { "PayinsLinked": 0, "CumulatedDebitedAmount": { "Currency": "EUR", "Amount": 0 }, "CumulatedFeesAmount": { "Currency": "EUR", "Amount": 0 }, "LastPayinId": null }, "RecurringType": "CUSTOM", "TotalAmount": null, "CycleNumber": null, "AuthorId": "206433201", "CardId": "card_m_01HPHHKEEND3HN0DR4XS4RST2E", "CreditedUserId": "213407540", "CreditedWalletId": "214818911", "Billing": { "FirstName": "Tristin", "LastName": "Towne", "Address": { "AddressLine1": "18758 Hermiston Mall", "AddressLine2": "Wilford Cliff", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" } }, "Shipping": { "FirstName": "Kaia", "LastName": "Wilkinson", "Address": { "AddressLine1": "69241 Chaya Ports", "AddressLine2": "Ebert Ports", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" } }, "EndDate": null, "Frequency": "Monthly", "FixedNextAmount": true, "FractionedPayment": false, "FreeCycles": 0, "FirstTransactionDebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "FirstTransactionFees": { "Currency": "EUR", "Amount": 1000 }, "NextTransactionDebitedFunds": null, "NextTransactionFees": null, "Migration": false } ``` ```json REST { "AuthorId":"146476890", "CardId":"155155221", "CreditedUserId":"142036728", "CreditedWalletId":"145389978", "FirstTransactionDebitedFunds":{ "Currency":"EUR", "Amount":1200 }, "FirstTransactionFees":{ "Currency":"EUR", "Amount":12 }, "Billing":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Shipping":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "EndDate":1698923634, "Frequency":"Monthly", "FixedNextAmount":true, "FractionedPayment":true, "FreeCycles":0, "Migration":true, "NextTransactionDebitedFunds":null, "NextTransactionFees":null } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payIn = new \MangoPay\PayInRecurringRegistration(); $payIn->AuthorId = "user_m_01J2CBKKMQJ95BGHCW0A2F9DE1"; $payIn->CardId = "card_m_01J2CBM93A3R36V2T2HFC2RRW4"; $payIn->CreditedUserId = "user_m_01J2CBPBE80P5Z8BTY9GJWQTVM"; $payIn->CreditedWalletId = "wlt_m_01J2CBPWWRKK4G65X4MTBVNWPS"; $payIn->FirstTransactionDebitedFunds = new \MangoPay\Money(); $payIn->FirstTransactionDebitedFunds->Amount = 12; $payIn->FirstTransactionDebitedFunds->Currency = 'EUR'; $payIn->FirstTransactionFees = new \MangoPay\Money(); $payIn->FirstTransactionFees->Amount = 1; $payIn->FirstTransactionFees->Currency = 'EUR'; $adress = new \MangoPay\Address(); $adress->AddressLine1 = '4 rue de la Tour des Dames'; $adress->AddressLine2 = 'Mangopay office'; $adress->City = 'Paris'; $adress->Country = 'FR'; $adress->PostalCode = '75009'; $adress->Region = 'Ile-de-France'; $billing = new \MangoPay\Billing(); $billing->FirstName = 'John'; $billing->LastName = 'Doe'; $billing->Address = $adress; $shipping = new \MangoPay\Shipping(); $shipping->FirstName = 'John'; $shipping->LastName = 'Doe'; $shipping->Address = $adress; $payIn->Shipping = $shipping; $payIn->Billing = $billing; $payIn->FreeCycles = 0; $response = $api->PayIns->CreateRecurringRegistration($payIn); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myRecurringRegistration = { PaymentType: 'CARD', ExecutionType: 'DIRECT', AuthorId: '146476890', CardId: '169687329', CreditedUserId: '146476890', CreditedWalletId: '148968396', FirstTransactionDebitedFunds: { Currency: 'EUR', Amount: 1000, }, FirstTransactionFees: { Currency: 'EUR', Amount: 10, }, Billing: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, Shipping: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, EndDate: 1698923634, Frequency: 'Monthly', FixedNextAmount: false, FractionedPayment: false, FreeCycles: 0, NextTransactionDebitedFunds: { Currency: 'EUR', Amount: 1000, }, NextTransactionFees: { Currency: 'EUR', Amount: 10, }, } const createRecurringRegistration = async (recurringRegistration) => { return await mangopay.PayIns.createRecurringPayment(recurringRegistration) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createRecurringRegistration(myRecurringRegistration) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createRecurringRegistration(recurringRegistrationObject) begin response = MangoPay::PayIn::RecurringPayments::Recurring.create(recurringRegistrationObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create recurring registration: #{error.message}" puts "Error details: #{error.details}" return false end end my_recurring_registration = { AuthorId: '146476890', CardId: '169687329', CreditedUserId: '146476890', CreditedWalletId: '148968396', FirstTransactionDebitedFunds: { Currency: 'EUR', Amount: 1000, }, FirstTransactionFees: { Currency: 'EUR', Amount: 10, }, Billing: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, Shipping: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, EndDate: 1698923634, Frequency: 'Monthly', FixedNextAmount: false, FractionedPayment: false, FreeCycles: 0, NextTransactionDebitedFunds: { Currency: 'EUR', Amount: 1000, }, NextTransactionFees: { Currency: 'EUR', Amount: 10, }, } createRecurringRegistration(my_recurring_registration) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.RecurringPayment; public class CreateRecurringPayinRegistration { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var cardId = "card_m_01HZ6YAQF4MR0VRQ06YG06SD99"; var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; RecurringPayment recurringPayinRegistration = new RecurringPayment(); recurringPayinRegistration.setAuthorId(userId); recurringPayinRegistration.setCardId(cardId); recurringPayinRegistration.setCreditedWalletId(walletId); recurringPayinRegistration.setFirstTransactionDebitedFunds(new Money()); recurringPayinRegistration.getFirstTransactionDebitedFunds().setAmount(1000); recurringPayinRegistration.getFirstTransactionDebitedFunds().setCurrency(CurrencyIso.EUR); recurringPayinRegistration.setFirstTransactionFees(new Money()); recurringPayinRegistration.getFirstTransactionFees().setAmount(0); recurringPayinRegistration.getFirstTransactionFees().setCurrency(CurrencyIso.EUR); RecurringPayment createRecurringPayinRegistration = mangopay.getPayInApi().createRecurringPayment(null, recurringPayinRegistration); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createRecurringPayinRegistration); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, RecurringPayInRegistration from mangopay.utils import Money natural_user = NaturalUser.get('210513027') recurring_payin_registration = RecurringPayInRegistration( author_id = natural_user.id, card_id = '213857548', credited_wallet_id = '210514820', first_transaction_debited_funds = Money(amount=1000, currency='EUR'), first_transaction_fees = Money(amount=10, currency='EUR'), tag = 'Created using Mangopay Python SDK' ) create_recurring_payin_registration = recurring_payin_registration.save() pprint(create_recurring_payin_registration) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var cardId = "card_m_01J3049JBA2XPA7GC7GEFJRQG4"; var recurringPayInRegistration = new RecurringPayInRegistrationPostDTO { AuthorId = userId, CardId = cardId, CreditedUserId = userId, CreditedWalletId = walletId, FirstTransactionDebitedFunds = new Money { Amount = 5000, Currency = CurrencyIso.EUR }, FirstTransactionFees = new Money { Amount = 50, Currency = CurrencyIso.EUR }, Billing = new Billing { FirstName = "Joe", LastName = "Blogs", Address = new Address { AddressLine1 = "1 MangoPay Street", AddressLine2 = "The Loop", City = "Paris", Region = "Ile de France", PostalCode = "75001", Country = CountryIso.FR } }, Shipping = new Shipping { FirstName = "Joe", LastName = "Blogs", Address = new Address { AddressLine1 = "1 MangoPay Street", AddressLine2 = "The Loop", City = "Paris", Region = "Ile de France", PostalCode = "75001", Country = CountryIso.FR } }, EndDate = DateTime.Now.AddDays(365), Migration = true, NextTransactionDebitedFunds = new Money { Amount = 1000, Currency = CurrencyIso.EUR }, NextTransactionFees = new Money { Amount = 10, Currency = CurrencyIso.EUR }, Frequency = "Monthly", FixedNextAmount = true, FractionedPayment = false }; var createRecurringPayInRegistration = await api.PayIns.CreateRecurringPayInRegistration(recurringPayInRegistration); string prettyPrint = JsonConvert.SerializeObject(createRecurringPayInRegistration, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Recurring PayIn Registration object ### Description Mangopay relies on the Recurring PayIn Registration object to store all the relevant information about a series of recurring card pay-ins, such as the frequency, the end date, and the amount. For more information about the flows and setup of recurring card pay-ins, refer to the recurring card processing guide. ### Attributes The unique identifier of the object. **Returned values:** `CREATED`, `AUTHENTICATION_NEEDED`, `IN_PROGRESS`, `ENDED` The status of the recurring registration: * `CREATED` – The recurring registration was created, but no recurring pay-in has yet been made. * `AUTHENTICATION_NEEDED` – The latest recurring pay-in linked to the registration object was refused. The registration object can still be used, but you need to execute a new customer-initiated transaction (CIT) for the end user to reauthenticate. * `IN_PROGRESS` – The recurring registration object is in use and the subsequent corresponding recurring pay-ins can be made. * `ENDED` – The recurrence ended: the registration can no longer be modified nor reused. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. Information about the recurring pay-ins related to the registration object. **Note:** If the `LastPayinId` references a transaction older than 13 months, it may have been archived. The number of recurring pay-ins already made for the registration object. The sum of the `DebitedFunds` amounts of the recurring pay-ins made for the registration. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The sum of the `Fees` amounts of the recurring pay-ins made for the registration. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the last recurring pay-in made for the registration. **Returned values:** `CLASSIC_SUBSCRIPTION`, `FRACTIONED_PAYMENT`, `CUSTOM` The type of recurrence, which can be one of the following: * `CLASSIC_SUBSCRIPTION` – For fixed-amount subscriptions. The `Amount` of each pay-in and the subscription’s `EndDate` are known, and these values cannot be modified during the recurrence. * `FRACTIONED_PAYMENT` – For payments in 3 or 4 times. The `Amount` of each pay-in and the registration’s `EndDate` are known, and these values cannot be modified during the recurrence. * `CUSTOM` – For recurring registrations where the `Amount` and `EndDate` are unknown. The total amount in the registration.\ This value is automatically calculated based on the `EndDate`, `FixedNextAmount`, and `Frequency` parameters (if defined). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The number of cycles in the registration (and therefore the number of payments).\ This value is automatically calculated based on the `EndDate`, `FixedNextAmount`, and `Frequency` parameters (if defined). The unique identifier of the user at the source of the transaction. The unique identifier of the Card object, obtained during the card registration process. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the credited wallet. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. The date and time at which the recurring pay-ins will end. This value has no impact on the recurring registration `Status`.\ Caution: If the `EndDate` is left unspecified, please bear in mind that one could be defined by default and be displayed to your end users (not taken into account in the payment recurrence). **Returned values:** `Daily`, `Weekly`, `TwiceAMonth`, `Monthly`, `Bimonthly`, `Quarterly`, `Semiannual`, `Annual`, `Biannual` The frequency at which the recurring pay-ins will occur: * `Daily` – 1 transaction per day. * `Weekly` – 1 transaction every 7 days. * `TwiceAMonth` – 2 transactions per month. * `Monthly` – 1 transaction per month. * `Bimonthly` – 1 transaction every 2 months. * `Quarterly` – 1 transaction every 3 months. * `Semiannual` – 1 transaction every 6 months. * `Annual` – 1 transaction per year. * `Biannual` – 1 transaction every 2 years. Whether or not the recurring pay-ins’ debited amounts remain the same for all the pay-ins linked to the recurring registration object. Whether or not the recurring pay-ins are being made to split a payment in several installments. The number of initial consecutive pay-ins where there will be no debited funds nor fees.\ This value cannot exceed the `CycleNumber` value (for recurring objects with an `EndDate`, `FixedNextAmount`, and `Frequency`).\ Note: When creating a recurring pay-in (MIT) for a pay-in subject to a free cycle, the `DebitedFunds` and `Fees` parameters should be ignored. Otherwise, the pay-in will fail with the corresponding error returned. The amount of the first recurring pay-in.\ This value can be different from the `NextTransactionDebitedFunds` **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The fees of the first recurring pay-in.\ This amount can be different from the `NextTransactionDebitedFunds`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The amount of the subsequent recurring pay-ins. If this field is empty and either `FixedNextAmount` or `FractionedPayment` are `true`, the subsequent amount will be the same as `FirstTransactionDebitedFunds` amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The fees of the subsequent recurring pay-ins. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Whether or not to attempt the first recurring pay-in as a merchant-initiated transaction (MIT). **Caution:** Migration is no longer supported and any object with `Migration` set to `true` must not be used for re-authentication of the user. You must create a new recurring pay-in registration without the `Migration` parameter (`false` by default) and restart the recurrence (see the how-to guide for details). Existing objects with `Migration` set to `true` are likely to fail or no longer be usable. This may be indicated by the `Status` changing to `AUTHENTICATION_NEEDED` or by errors on the pay-in request, for example: non-existent card account (008008), soft decline (101305), expired card (101105), or stolen card (008003). The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about recurring card payments # Update a Recurring PayIn Registration PUT /v2.01/{ClientId}/recurringpayinregistrations/{RecurringPayinRegistrationId} This call can be used to change the following parameters: * `Status` – To manually close the recurring pay-in registration with the `ENDED` status. When doing so, no recurring pay-in can be created based on the registration anymore. * `CardId` – To modify the card to use for recurring pay-ins. When doing so, a new CIT is required (with SCA). * `Billing` and `Shipping` – To change information about billing and shipping. ### Body parameters The unique identifier of the Card object, obtained during the card registration process. **Allowed values:** `ENDED` The status of the recurring registration: * `CREATED` – The recurring registration was created, but no recurring pay-in has yet been made. * `AUTHENTICATION_NEEDED` – The latest recurring pay-in linked to the registration object was refused. The registration object can still be used, but you need to execute a new customer-initiated transaction (CIT) for the end user to reauthenticate. * `IN_PROGRESS` – The recurring registration object is in use and the subsequent corresponding recurring pay-ins can be made. * `ENDED` – The recurrence ended: the registration can no longer be modified nor reused. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Required if the parent parameter is sent. Information about the shipping address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. ### Responses The unique identifier of the object. **Returned values:** `CREATED`, `AUTHENTICATION_NEEDED`, `IN_PROGRESS`, `ENDED` The status of the recurring registration: * `CREATED` – The recurring registration was created, but no recurring pay-in has yet been made. * `AUTHENTICATION_NEEDED` – The latest recurring pay-in linked to the registration object was refused. The registration object can still be used, but you need to execute a new customer-initiated transaction (CIT) for the end user to reauthenticate. * `IN_PROGRESS` – The recurring registration object is in use and the subsequent corresponding recurring pay-ins can be made. * `ENDED` – The recurrence ended: the registration can no longer be modified nor reused. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. Information about the recurring pay-ins related to the registration object. **Note:** If the `LastPayinId` references a transaction older than 13 months, it may have been archived. The number of recurring pay-ins already made for the registration object. The sum of the `DebitedFunds` amounts of the recurring pay-ins made for the registration. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The sum of the `Fees` amounts of the recurring pay-ins made for the registration. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the last recurring pay-in made for the registration. **Returned values:** `CLASSIC_SUBSCRIPTION`, `FRACTIONED_PAYMENT`, `CUSTOM` The type of recurrence, which can be one of the following: * `CLASSIC_SUBSCRIPTION` – For fixed-amount subscriptions. The `Amount` of each pay-in and the subscription’s `EndDate` are known, and these values cannot be modified during the recurrence. * `FRACTIONED_PAYMENT` – For payments in 3 or 4 times. The `Amount` of each pay-in and the registration’s `EndDate` are known, and these values cannot be modified during the recurrence. * `CUSTOM` – For recurring registrations where the `Amount` and `EndDate` are unknown. The total amount in the registration.\ This value is automatically calculated based on the `EndDate`, `FixedNextAmount`, and `Frequency` parameters (if defined). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The number of cycles in the registration (and therefore the number of payments).\ This value is automatically calculated based on the `EndDate`, `FixedNextAmount`, and `Frequency` parameters (if defined). The unique identifier of the user at the source of the transaction. The unique identifier of the Card object, obtained during the card registration process. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the credited wallet. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. The date and time at which the recurring pay-ins will end. This value has no impact on the recurring registration `Status`.\ Caution: If the `EndDate` is left unspecified, please bear in mind that one could be defined by default and be displayed to your end users (not taken into account in the payment recurrence). **Returned values:** `Daily`, `Weekly`, `TwiceAMonth`, `Monthly`, `Bimonthly`, `Quarterly`, `Semiannual`, `Annual`, `Biannual` The frequency at which the recurring pay-ins will occur: * `Daily` – 1 transaction per day. * `Weekly` – 1 transaction every 7 days. * `TwiceAMonth` – 2 transactions per month. * `Monthly` – 1 transaction per month. * `Bimonthly` – 1 transaction every 2 months. * `Quarterly` – 1 transaction every 3 months. * `Semiannual` – 1 transaction every 6 months. * `Annual` – 1 transaction per year. * `Biannual` – 1 transaction every 2 years. Whether or not the recurring pay-ins’ debited amounts remain the same for all the pay-ins linked to the recurring registration object. Whether or not the recurring pay-ins are being made to split a payment in several installments. The number of initial consecutive pay-ins where there will be no debited funds nor fees.\ This value cannot exceed the `CycleNumber` value (for recurring objects with an `EndDate`, `FixedNextAmount`, and `Frequency`).\ Note: When creating a recurring pay-in (MIT) for a pay-in subject to a free cycle, the `DebitedFunds` and `Fees` parameters should be ignored. Otherwise, the pay-in will fail with the corresponding error returned. The amount of the first recurring pay-in.\ This value can be different from the `NextTransactionDebitedFunds` **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The fees of the first recurring pay-in.\ This amount can be different from the `NextTransactionDebitedFunds`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The amount of the subsequent recurring pay-ins. If this field is empty and either `FixedNextAmount` or `FractionedPayment` are `true`, the subsequent amount will be the same as `FirstTransactionDebitedFunds` amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The fees of the subsequent recurring pay-ins. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Whether or not to attempt the first recurring pay-in as a merchant-initiated transaction (MIT). **Caution:** Migration is no longer supported and any object with `Migration` set to `true` must not be used for re-authentication of the user. You must create a new recurring pay-in registration without the `Migration` parameter (`false` by default) and restart the recurrence (see the how-to guide for details). Existing objects with `Migration` set to `true` are likely to fail or no longer be usable. This may be indicated by the `Status` changing to `AUTHENTICATION_NEEDED` or by errors on the pay-in request, for example: non-existent card account (008008), soft decline (101305), expired card (101105), or stolen card (008003). ```json 200 { "Id":"155172881", "Status":"ENDED", "ResultCode": null, "ResultMessage": null, "CurrentState":{ "PayinsLinked":0, "CumulatedDebitedAmount":{ "Currency":"EUR", "Amount":0 }, "CumulatedFeesAmount":{ "Currency":"EUR", "Amount":0 }, "LastPayinId":null }, "RecurringType":"CUSTOM", "TotalAmount":null, "CycleNumber":null, "AuthorId":"146476890", "CardId":"155155221", "CreditedUserId":"142036728", "CreditedWalletId":"145389978", "Billing":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Shipping":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "EndDate":1698923634, "Frequency":"Monthly", "FixedNextAmount":true, "FractionedPayment":true, "FreeCycles":0, "FirstTransactionDebitedFunds":null, "FirstTransactionFees":null, "NextTransactionDebitedFunds":null, "NextTransactionFees":null, "Migration":true } ``` ```json REST { "Status":"ENDED", "CardId":"155155221", "Billing":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Shipping":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $update = new \MangoPay\PayInRecurringRegistrationUpdate(); $update->Id = "recpayinreg_m_01J2EA0TAVQPNY4JGGF1J7RD97"; // To update user information $adress = new \MangoPay\Address(); $adress->AddressLine1 = '4 rue de la Tour des Dames'; $adress->AddressLine2 = 'Mangopay office'; $adress->City = 'Paris'; $adress->Country = 'FR'; $adress->PostalCode = '75009'; $adress->Region = 'Ile-de-France'; $shipping = new \MangoPay\Shipping(); $shipping->FirstName = 'Arthur'; $shipping->LastName = 'Doe'; $shipping->Address = $adress; $update->Shipping = $shipping; $billing = new \MangoPay\Billing(); $billing->FirstName = 'Arthur'; $billing->LastName = 'Doe'; $billing->Address = $adress; $update->Billing = $billing; // To end the recurring payin $update->Status = "ENDED"; $response = $api->PayIns->UpdateRecurringRegistration($update); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myRecurringRegistration = { Id: '192912686', CardId: '169687329', Status: '', Billing: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des grandes plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, Shipping: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des grandes plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, } const updateRecurringRegistration = async (recurringRegistrationId,recurringRegistration) => { return await mangopay.PayIns.updateRecurringPayin(recurringRegistrationId, recurringRegistration) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } updateRecurringRegistration(myRecurringRegistration.Id, myRecurringRegistration) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def updateRecurringRegistration(recurringRegistrationId, recurringRegistrationObject) begin response = MangoPay::PayIn::RecurringPayments::Recurring.update(recurringRegistrationId, recurringRegistrationObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create recurring registration: #{error.message}" puts "Error details: #{error.details}" return false end end myRecurringRegistration = { Id: '195097427', CardId: '169687329', Status: '', Billing: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des très grandes plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR' }, }, Shipping: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des très grandes plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR' } } } updateRecurringRegistration(myRecurringRegistration[:Id], myRecurringRegistration) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.RecurringPayment; import com.mangopay.entities.RecurringPaymentUpdate; public class UpdateRecurringPayinRegistration { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var recurringPayinRegistrationId = "recpayinreg_m_01J28V158ZTMVNRHWVXSWJ7G2F"; RecurringPaymentUpdate recurringPayinRegistration = new RecurringPaymentUpdate(); recurringPayinRegistration.setStatus("ENDED"); RecurringPayment updateRecurringPayinRegistration = mangopay.getPayInApi().updateRecurringPayment(recurringPayinRegistrationId, recurringPayinRegistration); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(updateRecurringPayinRegistration); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import RecurringPayInRegistration recurring_payin_registration = RecurringPayInRegistration( id = '213857583', status = 'ENDED' ) update_recurring_payin_registration = recurring_payin_registration.save() pprint(update_recurring_payin_registration) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using MangoPay.SDK.Core.Enumerations; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var registrationId = "recpayinreg_m_01J30DF65MVCRBB020YGJ82XM9"; var registration = await api.PayIns.GetRecurringPayInRegistration(registrationId); var registrationPut = new RecurringPayInPutDTO { Status = RecurringPaymentStatus.ENDED }; var updateRegistration = await api.PayIns.UpdateRecurringPayInRegistration(registrationId, registrationPut); string prettyPrint = JsonConvert.SerializeObject(updateRegistration, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Recurring PayIn Registration GET /v2.01/{ClientId}/recurringpayinregistrations/{RecurringPayinRegistrationId} ### Query parameters The unique identifier of the recurring pay-in registration. ### Responses The unique identifier of the object. **Returned values:** `CREATED`, `AUTHENTICATION_NEEDED`, `IN_PROGRESS`, `ENDED` The status of the recurring registration: * `CREATED` – The recurring registration was created, but no recurring pay-in has yet been made. * `AUTHENTICATION_NEEDED` – The latest recurring pay-in linked to the registration object was refused. The registration object can still be used, but you need to execute a new customer-initiated transaction (CIT) for the end user to reauthenticate. * `IN_PROGRESS` – The recurring registration object is in use and the subsequent corresponding recurring pay-ins can be made. * `ENDED` – The recurrence ended: the registration can no longer be modified nor reused. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. Information about the recurring pay-ins related to the registration object. **Note:** If the `LastPayinId` references a transaction older than 13 months, it may have been archived. The number of recurring pay-ins already made for the registration object. The sum of the `DebitedFunds` amounts of the recurring pay-ins made for the registration. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The sum of the `Fees` amounts of the recurring pay-ins made for the registration. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the last recurring pay-in made for the registration. **Returned values:** `CLASSIC_SUBSCRIPTION`, `FRACTIONED_PAYMENT`, `CUSTOM` The type of recurrence, which can be one of the following: * `CLASSIC_SUBSCRIPTION` – For fixed-amount subscriptions. The `Amount` of each pay-in and the subscription’s `EndDate` are known, and these values cannot be modified during the recurrence. * `FRACTIONED_PAYMENT` – For payments in 3 or 4 times. The `Amount` of each pay-in and the registration’s `EndDate` are known, and these values cannot be modified during the recurrence. * `CUSTOM` – For recurring registrations where the `Amount` and `EndDate` are unknown. The total amount in the registration.\ This value is automatically calculated based on the `EndDate`, `FixedNextAmount`, and `Frequency` parameters (if defined). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The number of cycles in the registration (and therefore the number of payments).\ This value is automatically calculated based on the `EndDate`, `FixedNextAmount`, and `Frequency` parameters (if defined). The unique identifier of the user at the source of the transaction. The unique identifier of the Card object, obtained during the card registration process. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the credited wallet. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. The date and time at which the recurring pay-ins will end. This value has no impact on the recurring registration `Status`.\ Caution: If the `EndDate` is left unspecified, please bear in mind that one could be defined by default and be displayed to your end users (not taken into account in the payment recurrence). **Returned values:** `Daily`, `Weekly`, `TwiceAMonth`, `Monthly`, `Bimonthly`, `Quarterly`, `Semiannual`, `Annual`, `Biannual` The frequency at which the recurring pay-ins will occur: * `Daily` – 1 transaction per day. * `Weekly` – 1 transaction every 7 days. * `TwiceAMonth` – 2 transactions per month. * `Monthly` – 1 transaction per month. * `Bimonthly` – 1 transaction every 2 months. * `Quarterly` – 1 transaction every 3 months. * `Semiannual` – 1 transaction every 6 months. * `Annual` – 1 transaction per year. * `Biannual` – 1 transaction every 2 years. Whether or not the recurring pay-ins’ debited amounts remain the same for all the pay-ins linked to the recurring registration object. Whether or not the recurring pay-ins are being made to split a payment in several installments. The number of initial consecutive pay-ins where there will be no debited funds nor fees.\ This value cannot exceed the `CycleNumber` value (for recurring objects with an `EndDate`, `FixedNextAmount`, and `Frequency`).\ Note: When creating a recurring pay-in (MIT) for a pay-in subject to a free cycle, the `DebitedFunds` and `Fees` parameters should be ignored. Otherwise, the pay-in will fail with the corresponding error returned. The amount of the first recurring pay-in.\ This value can be different from the `NextTransactionDebitedFunds` **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The fees of the first recurring pay-in.\ This amount can be different from the `NextTransactionDebitedFunds`. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The amount of the subsequent recurring pay-ins. If this field is empty and either `FixedNextAmount` or `FractionedPayment` are `true`, the subsequent amount will be the same as `FirstTransactionDebitedFunds` amount. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The fees of the subsequent recurring pay-ins. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Whether or not to attempt the first recurring pay-in as a merchant-initiated transaction (MIT). **Caution:** Migration is no longer supported and any object with `Migration` set to `true` must not be used for re-authentication of the user. You must create a new recurring pay-in registration without the `Migration` parameter (`false` by default) and restart the recurrence (see the how-to guide for details). Existing objects with `Migration` set to `true` are likely to fail or no longer be usable. This may be indicated by the `Status` changing to `AUTHENTICATION_NEEDED` or by errors on the pay-in request, for example: non-existent card account (008008), soft decline (101305), expired card (101105), or stolen card (008003). ```json 200 { "Id":"155172881", "Status":"ENDED", "ResultCode": null, "ResultMessage": null, "CurrentState":{ "PayinsLinked":0, "CumulatedDebitedAmount":{ "Currency":"EUR", "Amount":0 }, "CumulatedFeesAmount":{ "Currency":"EUR", "Amount":0 }, "LastPayinId":null }, "RecurringType":"CUSTOM", "TotalAmount":null, "CycleNumber":null, "AuthorId":"146476890", "CardId":"155155221", "CreditedUserId":"142036728", "CreditedWalletId":"145389978", "Billing":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "Shipping":{ "FirstName":"John", "LastName":"Doe", "Address":{ "AddressLine1":"The Oasis", "AddressLine2":"Rue des Plantes", "City":"Paris", "Region":"Ile de France", "PostalCode":"75001", "Country":"FR" } }, "EndDate":1698923634, "Frequency":"Monthly", "FixedNextAmount":true, "FractionedPayment":true, "FreeCycles":0, "FirstTransactionDebitedFunds":null, "FirstTransactionFees":null, "NextTransactionDebitedFunds":null, "NextTransactionFees":null, "Migration":true } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $recurringRegistrationId = "recpayinreg_m_01J2EA0TAVQPNY4JGGF1J7RD97"; $response = $api->PayIns->GetRecurringRegistration($recurringRegistrationId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myRecurringRegistration = { Id: '192912686', } const viewRecurringRegistration = async (recurringRegistrationId) => { return await mangopay.PayIns.getRecurringPayin(recurringRegistrationId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewRecurringRegistration(myRecurringRegistration.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewRecurringRegistration(recurringRegistrationId) begin response = MangoPay::PayIn::RecurringPayments::Recurring.fetch(recurringRegistrationId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch recurring registration: #{error.message}" puts "Error details: #{error.details}" return false end end myRecurringRegistration = { Id: '192912686', } viewRecurringRegistration(myRecurringRegistration[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.RecurringPayment; public class ViewRecurringPayinRegistration { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var recurringPayinRegistrationId = "recpayinreg_m_01J28V158ZTMVNRHWVXSWJ7G2F"; RecurringPayment viewRecurringPayinRegistration = mangopay.getPayInApi().getRecurringPayment(recurringPayinRegistrationId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewRecurringPayinRegistration); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import RecurringPayInRegistration recurring_payin_registration_id = '213857583' try: view_recurring_payin_registration = RecurringPayInRegistration.get(recurring_payin_registration_id) pprint(vars(view_recurring_payin_registration)) except RecurringPayInRegistration.DoesNotExist: print('The Recurring PayIn Registration {} does not exist.'.format(recurring_payin_registration_id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var registrationId = "recpayinreg_m_01J30DF65MVCRBB020YGJ82XM9"; var viewRegistration = await api.PayIns.GetRecurringPayInRegistration(registrationId); string prettyPrint = JsonConvert.SerializeObject(viewRegistration, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Refund for a PayIn POST /v2.01/{ClientId}/payins/{PayInId}/refunds The pay-in refund is a request to reimburse a pay-in and is supported for most payment methods. You can make partial refunds by providing a debited funds `Amount` value lower than the initial transaction amount. **Note – Conditions for pay-in Refund** * The amount value is 1 or above, regardless of the currency. * The initial transaction was made less than 11 months ago. * The initial transaction status is `SUCCEEDED`. * The initial transaction hasn’t been disputed. ### Path parameters The unique identifier of the pay-in. ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the initial transaction. **Default value:** The amount and currency values of the debited funds of the initial transaction. Required if the `Fees` parameter is included in the call. Information about the debited funds. Debited funds: * Takes by default the amount and currency values of the initial transaction when left empty. * Must be entered manually to perform a partial refund. * Cannot exceed the initial transaction `CreditedFunds` value when entered manually. This also applies to the sum of debited funds when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Default value:** The amount and currency values of the fees of the initial transaction. Required if the `DebitedFunds` parameter is included in the call. Information about the fees. This value: * Should be preceded by a minus sign (-) to refund the fees, otherwise more fees will be taken. * Takes by default the amount and currency values of the fees of the initial transaction when left empty (preceded by a -). * Cannot exceed the initial transaction fees amount when entered manually. This also applies to the sum of the amount of the fees when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Note:** On refunds, the `StatementDescriptor` is only available for SEPA and BACS direct debit pay-ins (no other payment methods nor transfers). ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the initial transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Default value:** The amount and currency values of the debited funds of the initial transaction. Information about the debited funds. Debited funds: * Takes by default the amount and currency values of the initial transaction when left empty. * Must be entered manually to perform a partial refund. * Cannot exceed the initial transaction `CreditedFunds` value when entered manually. This also applies to the sum of debited funds when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. Information about the funds being credited to the target of the transaction (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Default value:** The amount and currency values of the fees of the initial transaction. Information about the fees. This value: * Should be preceded by a minus sign (-) to refund the fees, otherwise more fees will be taken. * Takes by default the amount and currency values of the fees of the initial transaction when left empty (preceded by a -). * Cannot exceed the initial transaction fees amount when entered manually. This also applies to the sum of the amount of the fees when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the initial transaction being refunded. **Returned values:** `PAYIN`, `TRANSFER`, `PAYOUT` The type of the initial transaction being refunded. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the initial transaction being refunded, providing more information about the context in which the transaction occurred: * REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * REPUDIATION – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user requested a chargeback). * REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle the credit from a repudiation following a lost dispute. The unique identifier of the debited wallet. The unique identifier of the credited wallet. Information about the reasons for the refund. *Max. length: 255 characters* Message explaining the reason for the refusal. **Returned values:** `INITIALIZED_BY_CLIENT`, `BANKACCOUNT_INCORRECT`, `OWNER_DO_NOT_MATCH_BANKACCOUNT`, `BANKACCOUNT_HAS_BEEN_CLOSED`, `WITHDRAWAL_IMPOSSIBLE_ON_SAVINGS_ACCOUNTS`, `OTHER` The type of reason for the refund. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Note:** On refunds, the `StatementDescriptor` is only available for SEPA and BACS direct debit pay-ins (no other payment methods nor transfers). ```json { "Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type":"param_error", "Id":"9712a945-c96a-4e70-b3de-06529534a9de#1667200884", "Date":1667200885.0, "errors":{ "Fees":"if DebitedFunds are defined, Fees must be defined" } } ``` ```json { "Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type":"param_error", "Id":"a2af2b8b-506c-4b5b-b607-7441a58c0a66#1667201846", "Date":1667201847.0, "errors":{ "AuthorId":"Author of the refund is not the author of the initial payin" } } ``` ```json { "Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type":"param_error", "Id":"5eebf638-efd9-4a02-9854-f476c16c0262#1667809509", "Date":1667809510.0, "errors":{ "DebitedFunds":"DebitedFunds cannot be superior the CreditedFunds of the initial PayIn" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "34989f04-25db-4246-a926-6fadbf1d53e1#1673521386", "Date": 1673521387.0, "errors": { "DebitedFunds": "Due to repudiations against this transaction, you can not refund this amount" } } ``` ```json 200 - Direct debit pay-in refund with StatementDescriptor { "Id": "refund_m_01HW8A130S4SBVDZ70V809SS2X", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1713970908, "AuthorId": "204071581", "CreditedUserId": null, "DebitedFunds": { "Currency": "EUR", "Amount": 2500 }, "CreditedFunds": { "Currency": "EUR", "Amount": 2750 }, "Fees": { "Currency": "EUR", "Amount": -250 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1713970908, "Type": "PAYOUT", "Nature": "REFUND", "InitialTransactionId": "204844475", "InitialTransactionType": "PAYIN", "InitialTransactionNature": "REGULAR", "DebitedWalletId": "204844308", "CreditedWalletId": null, "RefundReason": { "RefundReasonMessage": null, "RefundReasonType": "INITIALIZED_BY_CLIENT" }, "StatementDescriptor": "Example123" } ``` ```json REST { "Tag": "Created using Mangopay API Postman Collection", "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "DebitedFunds": { "Currency": "EUR", "Amount": 2000 }, "Fees": { "Currency": "EUR", "Amount": -100 } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = '199478487'; $refund = new \MangoPay\Refund(); $refund->AuthorId = '146476890'; $refund->DebitedFunds = new \MangoPay\Money(); $refund->DebitedFunds->Amount = 1000; $refund->DebitedFunds->Currency = 'EUR'; $refund->Fees = new \MangoPay\Money(); $refund->Fees->Amount = 0; $refund->Fees->Currency = 'EUR'; $refund->Tag = 'Created using Mangopay PHP SDK'; $response = $api->PayIns->CreateRefund($payinId, $refund); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '192870720', } let myRefund = { AuthorId: '192822811', Tag: 'Created with Mangopay Nodejs SDK', DebitedFunds: { Currency: 'EUR', Amount: 250, }, Fees: { Currency: 'EUR', Amount: 0, }, } const createPayInRefund = async (payInId, refund) => { return await mangopay.PayIns.createRefund(payInId, refund) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createPayInRefund(myPayIn.Id, myRefund) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createPayInRefund(payInId, refundObject) begin response = MangoPay::PayIn.refund(payInId, refundObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create Refund: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '193930143' } myRefund = { AuthorId: '193930097', Tag: 'Created with Mangopay Ruby SDK', DebitedFunds: { Currency: 'EUR', Amount: 1188 }, Fees: { Currency: 'EUR', Amount: -12 } } createPayInRefund(myPayIn[:Id], myRefund) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.Refund; public class CreatePayinRefund { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var authorId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var payInId = "payin_m_01J28XNRJXNQKEQ3GK3WBVQK8B"; Refund refund = new Refund(); refund.setAuthorId(authorId); refund.setDebitedFunds(new Money(CurrencyIso.EUR, 200)); refund.setFees(new Money(CurrencyIso.EUR, 0)); refund.setTag("Created using the Mangopay Java SDK"); Refund createPayinRefund = mangopay.getPayInApi().createRefund(payInId, refund); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPayinRefund); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, PayInRefund, DirectDebitDirectPayIn from mangopay.utils import Money natural_user = NaturalUser.get('213753890') natural_user_wallet_id = '213754077' user_payin = DirectDebitDirectPayIn.get('214568733') payin_refund = PayInRefund( author = natural_user, payin = user_payin ) create_payin_refund = payin_refund.save() pprint(create_payin_refund) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var payInId = "payin_m_01J3ZJ2SC199VC64SFTTZ71VPC"; var refund = new RefundPayInPostDTO(userId, new Money { Amount=0, Currency = CurrencyIso.EUR}, new Money { Amount=1000, Currency = CurrencyIso.EUR} ); var createRefund = await api.PayIns.CreateRefundAsync(payInId, refund); string prettyPrint = JsonConvert.SerializeObject(createRefund, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Refund for a Transfer POST /v2.01/{ClientId}/transfers/{TransferId}/refunds You can do a partial refund by providing a debited funds `Amount` value lower than the initial transaction amount. The debited funds amount must be 1 or more, if it is included. ### Path parameters The unique identifier of the transfer. ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the initial transaction. **Default value:** The amount and currency values of the debited funds of the initial transaction. Required if the `Fees` parameter is included in the call. Information about the debited funds. Debited funds: * Takes by default the amount and currency values of the initial transaction when left empty. * Must be entered manually to perform a partial refund. * Cannot exceed the initial transaction `CreditedFunds` value when entered manually. This also applies to the sum of debited funds when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Default value:** The amount and currency values of the fees of the initial transaction. Required if the `DebitedFunds` parameter is included in the call. Information about the fees. This value: * Should be preceded by a minus sign (-) to refund the fees, otherwise more fees will be taken. * Takes by default the amount and currency values of the fees of the initial transaction when left empty (preceded by a -). * Cannot exceed the initial transaction fees amount when entered manually. This also applies to the sum of the amount of the fees when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the initial transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Default value:** The amount and currency values of the debited funds of the initial transaction. Information about the debited funds. Debited funds: * Takes by default the amount and currency values of the initial transaction when left empty. * Must be entered manually to perform a partial refund. * Cannot exceed the initial transaction `CreditedFunds` value when entered manually. This also applies to the sum of debited funds when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Default value:** The amount and currency values of the fees of the initial transaction. Information about the fees. This value: * Should be preceded by a minus sign (-) to refund the fees, otherwise more fees will be taken. * Takes by default the amount and currency values of the fees of the initial transaction when left empty (preceded by a -). * Cannot exceed the initial transaction fees amount when entered manually. This also applies to the sum of the amount of the fees when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the initial transaction being refunded. **Returned values:** `PAYIN`, `TRANSFER`, `PAYOUT` The type of the initial transaction being refunded. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the initial transaction being refunded, providing more information about the context in which the transaction occurred: * REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * REPUDIATION – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user requested a chargeback). * REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle the credit from a repudiation following a lost dispute. The unique identifier of the debited wallet. The unique identifier of the credited wallet. Information about the reasons for the refund. *Max. length: 255 characters* Message explaining the reason for the refusal. **Returned values:** `INITIALIZED_BY_CLIENT`, `BANKACCOUNT_INCORRECT`, `OWNER_DO_NOT_MATCH_BANKACCOUNT`, `BANKACCOUNT_HAS_BEEN_CLOSED`, `WITHDRAWAL_IMPOSSIBLE_ON_SAVINGS_ACCOUNTS`, `OTHER` The type of reason for the refund. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "7daa662f-0fe0-4ddf-8865-450fe0217798", "Date": 1690287917.0, "errors": { "AuthorId": "Author of the refund is not the author of the initial transfer" } } ``` ```json 200 { "Id":"155586343", "Tag":"custom meta", "CreationDate":1667916816, "AuthorId":"146476890", "CreditedUserId":null, "DebitedFunds":{ "Currency":"EUR", "Amount":1100 }, "CreditedFunds":{ "Currency":"EUR", "Amount":1120 }, "Fees":{ "Currency":"EUR", "Amount":-20 }, "Status":"SUCCEEDED", "ResultCode":"000000", "ResultMessage":"Success", "ExecutionDate":1667916816, "Type":"TRANSFER", "Nature":"REFUND", "InitialTransactionId":"155585643", "InitialTransactionType":"TRANSFER", "InitialTransactionNature":"REGULAR", "DebitedWalletId":"152161320", "CreditedWalletId":"148968396", "RefundReason":{ "RefundReasonMessage":null, "RefundReasonType":"OTHER" } } ``` ```json REST { "Tag":"custom meta", "AuthorId":"146476890" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $transferId = '199132726'; $refund = new \MangoPay\Refund(); $refund->AuthorId = '146476890'; $refund->DebitedFunds = new \MangoPay\Money(); $refund->DebitedFunds->Amount = 500; $refund->DebitedFunds->Currency = 'EUR'; $refund->Fees = new \MangoPay\Money(); $refund->Fees->Amount = 0; $refund->Fees->Currency = 'EUR'; $refund->Tag = 'Created using Mangopay PHP SDK'; $response = $api->Transfers->CreateRefund($transferId, $refund); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myTransfer = { Id: '180974208', } let myRefund = { AuthorId: '170853400', Tag: 'Created using Mangopay Node.js SDK', } const createRefund = async (transferId, refund) => { return await mangopay.Transfers.createRefund(transferId, refund) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createRefund(myTransfer.Id, myRefund) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createTransferRefund(transferId, refundObject) begin response = MangoPay::Transfer.refund(transferId, refundObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create Refund: #{error.message}" puts "Error details: #{error.details}" return false end end myTransfer = { Id: '194579950' } myRefund = { AuthorId: '194579896', Tag: 'Created with Mangopay Ruby SDK' } createTransferRefund(myTransfer[:Id], myRefund) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.Refund; public class CreateTransferRefund { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var authorId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR"; var transferId = "xfer_m_01J1WJCSBG0S4637BR54YYJX0Z"; Refund refund = new Refund(); refund.setAuthorId(authorId); refund.setDebitedFunds(new Money(CurrencyIso.EUR, 500)); refund.setFees(new Money(CurrencyIso.EUR, 0)); refund.setTag("Created using the Mangopay Java SDK"); Refund createPayinRefund = mangopay.getTransferApi().createRefund(transferId, refund); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPayinRefund); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, TransferRefund, Transfer natural_user = NaturalUser.get('211918806') user_transfer = Transfer.get('214568995') transfer_refund = TransferRefund( author = natural_user, transfer = user_transfer ) create_transfer_refund = transfer_refund.save() pprint(create_transfer_refund) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var transferId = "xfer_m_01J3ZG49W215VVZRJS394DKM00"; var refund = new RefundTransferPostDTO(userId); var createRefund = await api.Transfers.CreateRefundAsync(transferId, refund); string prettyPrint = JsonConvert.SerializeObject(createRefund, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Refunds for a PayIn GET /v2.01/{ClientId}/payins/{PayInId}/refunds ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. ### Path parameters The unique identifier of the pay-in. ### Responses The list of refunds created by the platform. The refund created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the initial transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Default value:** The amount and currency values of the debited funds of the initial transaction. Information about the debited funds. Debited funds: * Takes by default the amount and currency values of the initial transaction when left empty. * Must be entered manually to perform a partial refund. * Cannot exceed the initial transaction `CreditedFunds` value when entered manually. This also applies to the sum of debited funds when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Default value:** The amount and currency values of the fees of the initial transaction. Information about the fees. This value: * Should be preceded by a minus sign (-) to refund the fees, otherwise more fees will be taken. * Takes by default the amount and currency values of the fees of the initial transaction when left empty (preceded by a -). * Cannot exceed the initial transaction fees amount when entered manually. This also applies to the sum of the amount of the fees when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the debited wallet. The unique identifier of the credited wallet. ```json 200 { "Id":"154987535", "Tag":null, "CreationDate":1667200967, "AuthorId":"146476890", "CreditedUserId":null, "DebitedFunds":{ "Currency":"EUR", "Amount":1400 }, "CreditedFunds":{ "Currency":"EUR", "Amount":1400 }, "Fees":{ "Currency":"EUR", "Amount":0 }, "Status":"SUCCEEDED", "ResultCode":"000000", "ResultMessage":"Success", "ExecutionDate":1667200967, "Type":"PAYOUT", "Nature":"REFUND", "InitialTransactionId":"154987477", "InitialTransactionType":"PAYIN", "InitialTransactionNature":"REGULAR", "DebitedWalletId":"148968396", "CreditedWalletId":null, "RefundReason":{ "RefundReasonMessage":null, "RefundReasonType":"INITIALIZED_BY_CLIENT" } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = '163093582'; $response = $api->PayIns->GetRefunds($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '192870720', } const listRefunds = async (payInId) => { return await mangopay.PayIns.getRefunds(payInId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listRefunds(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listPayInRefunds(payInId) begin response = MangoPay::PayIn.refunds(payInId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch refunds: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '192870720' } listPayInRefunds(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Refund; import java.util.List; public class ListPayInRefunds { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var payInId = "payin_m_01J28XNRJXNQKEQ3GK3WBVQK8B"; List refunds = mangopay.getPayInApi().getRefunds(payInId); for (Refund refund : refunds) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(refund); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.resources import NaturalUser, PayInRefund, DirectDebitDirectPayIn natural_user = NaturalUser.get('213753890') natural_user_wallet_id = '213754077' payin = DirectDebitDirectPayIn.get('214230862') payin_refund = PayInRefund( id = payin.id, author = natural_user, payin = payin ) payin_refunds = DirectDebitDirectPayIn.get_refunds(self = payin_refund) for payin_refund in payin_refunds: pprint(vars(payin_refund)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var payInId = "payin_m_01J3ZJ2SC199VC64SFTTZ71VPC"; var viewPayInRefunds = await api.Refunds.GetRefundsForPayInAsync(payInId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(viewPayInRefunds, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Refunds for a Payout GET /v2.01/{ClientId}/payouts/{PayoutId}/refunds This call returns the refund for a given payout.  A payout refund, also known as a return of funds, is a request only generated by Mangopay and is made at the end user’s request or if a fraud case has been detected. Payout refunds may also occur automatically when the end user’s bank account is closed or if the acquiring bank refuses the funds. ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. ### Path parameters The unique identifier of the payout. ### Responses The list of payout refunds created for the platform. The refund created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the initial transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Default value:** The amount and currency values of the debited funds of the initial transaction. Information about the debited funds. Debited funds: * Takes by default the amount and currency values of the initial transaction when left empty. * Must be entered manually to perform a partial refund. * Cannot exceed the initial transaction `CreditedFunds` value when entered manually. This also applies to the sum of debited funds when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Default value:** The amount and currency values of the fees of the initial transaction. Information about the fees. This value: * Should be preceded by a minus sign (-) to refund the fees, otherwise more fees will be taken. * Takes by default the amount and currency values of the fees of the initial transaction when left empty (preceded by a -). * Cannot exceed the initial transaction fees amount when entered manually. This also applies to the sum of the amount of the fees when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the debited wallet. The unique identifier of the credited wallet. ```json 200 [ { "Id": "151981490", "Tag": null, "CreationDate": 1663749078, "AuthorId": "142036728", "CreditedUserId": null, "DebitedFunds": { "Currency": "EUR", "Amount": 1500 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1500 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1663749078, "Type": "PAYIN", "Nature": "REFUND", "CreditedWalletId": "145389978", "DebitedWalletId": null } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payoutId = '180926177'; $response = $api->PayOuts->GetRefunds($payoutId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayout = { Id: '174860560', } const getPayoutRefunds = async (payoutId) => { return await mangopay.PayOuts.getRefunds(payoutId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getPayoutRefunds(myPayout.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listPayoutRefunds(payoutId) begin response = MangoPay::PayOut.refunds(payoutId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch refunds: #{error.message}" puts "Error details: #{error.details}" return false end end myPayout = { Id: '151981274' } listPayoutRefunds(myPayout[:Id]) ``` ```java Java iimport com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Refund; import java.util.List; public class ListPayoutRefunds { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var payOutId = "po_m_01J2BX08NQ1G7CBS28NZ71YGQT"; List refunds = mangopay.getPayOutApi().getRefunds(payOutId); for (Refund refund : refunds) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(refund); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.resources import NaturalUser, Refund, BankWirePayOut natural_user = NaturalUser.get('213753890') natural_user_wallet_id = '213754077' payout = BankWirePayOut.get('214681617') payout_refund = Refund( id = payout.id, author = natural_user, payout = payout ) payout_refunds = BankWirePayOut.get_refunds(self = payout_refund) for payout_refund in payout_refunds: pprint(vars(payout_refund)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var payoutId = "po_m_01J3ZJYJQ4JSDP393YGKAAYT7F"; var viewPayoutRefunds = await api.Refunds.GetRefundsForPayOutAsync(payoutId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(viewPayoutRefunds, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Refunds for a Repudiation GET /v2.01/{ClientId}/repudiations/{RepudiationId}/refunds Repudiations are refunded when a dispute is won. ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. ### Path parameters The unique identifier of the repudiation. ### Responses The list of refunds created by the platform. The refund created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the initial transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Default value:** The amount and currency values of the debited funds of the initial transaction. Information about the debited funds. Debited funds: * Takes by default the amount and currency values of the initial transaction when left empty. * Must be entered manually to perform a partial refund. * Cannot exceed the initial transaction `CreditedFunds` value when entered manually. This also applies to the sum of debited funds when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Default value:** The amount and currency values of the fees of the initial transaction. Information about the fees. This value: * Should be preceded by a minus sign (-) to refund the fees, otherwise more fees will be taken. * Takes by default the amount and currency values of the fees of the initial transaction when left empty (preceded by a -). * Cannot exceed the initial transaction fees amount when entered manually. This also applies to the sum of the amount of the fees when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the debited wallet. The unique identifier of the credited wallet. ```json 200 [ { "Id":"155536343", "Tag":"custom meta", "CreationDate":1667916816, "AuthorId":"146476890", "CreditedUserId":null, "DebitedFunds":{ "Currency":"EUR", "Amount":1100 }, "CreditedFunds":{ "Currency":"EUR", "Amount":1120 }, "Fees":{ "Currency":"EUR", "Amount":-20 }, "Status":"SUCCEEDED", "ResultCode":"000000", "ResultMessage":"Success", "ExecutionDate":1667916816, "Type":"TRANSFER", "Nature":"REFUND", "InitialTransactionId":"155585643", "InitialTransactionType":"TRANSFER", "InitialTransactionNature":"REPUDIATION", "DebitedWalletId":"152161320", "CreditedWalletId":"148968396", "RefundReason":{ "RefundReasonMessage":null, "RefundReasonType":"OTHER" } } ] ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myRepudiation = { Id: '192775715', } const listRefunds = async (repudiationId) => { return await mangopay.Repudiations.getRefunds(repudiationId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listRefunds(myRepudiation.Id) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Refund; import java.util.List; public class ListRepudiationRefunds { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var repudiationId = "repud_m_01J2KVEDBG9ABZZAWRXFHAJ97H"; List refunds = mangopay.getRepudiationApi().getRefunds(repudiationId); for (Refund refund : refunds) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(refund); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Refund, Repudiation, NaturalUser natural_user = NaturalUser.get('213753890') natural_user_wallet_id = '215029593' my_repudition = Repudiation.get('215101203') payin_refund = Refund( id = my_repudition.id, author = natural_user ) payin_refunds = Repudiation.get_refunds(self = payin_refund) for payin_refund in payin_refunds: pprint(vars(payin_refund)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var repudiationId = "repud_m_01J2KVEDBG9ABZZAWRXFHAJ97H"; var viewRepudiationRefunds = await api.Refunds.GetRefundsForRepudiationAsync(repudiationId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(viewRepudiationRefunds, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Refunds for a Transfer GET /v2.01/{ClientId}/transfers/{TransferId}/refunds ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. ### Path parameters The unique identifier of the transfer. ### Responses The list of refunds created by the platform. The refund created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the initial transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Default value:** The amount and currency values of the debited funds of the initial transaction. Information about the debited funds. Debited funds: * Takes by default the amount and currency values of the initial transaction when left empty. * Must be entered manually to perform a partial refund. * Cannot exceed the initial transaction `CreditedFunds` value when entered manually. This also applies to the sum of debited funds when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Default value:** The amount and currency values of the fees of the initial transaction. Information about the fees. This value: * Should be preceded by a minus sign (-) to refund the fees, otherwise more fees will be taken. * Takes by default the amount and currency values of the fees of the initial transaction when left empty (preceded by a -). * Cannot exceed the initial transaction fees amount when entered manually. This also applies to the sum of the amount of the fees when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the debited wallet. The unique identifier of the credited wallet. ```json 200 [ { "Id":"155586343", "Tag":"custom meta", "CreationDate":1667916816, "AuthorId":"146476890", "CreditedUserId":null, "DebitedFunds":{ "Currency":"EUR", "Amount":1100 }, "CreditedFunds":{ "Currency":"EUR", "Amount":1120 }, "Fees":{ "Currency":"EUR", "Amount":-20 }, "Status":"SUCCEEDED", "ResultCode":"000000", "ResultMessage":"Success", "ExecutionDate":1667916816, "Type":"TRANSFER", "Nature":"REFUND", "InitialTransactionId":"155585643", "InitialTransactionType":"TRANSFER", "InitialTransactionNature":"REGULAR", "DebitedWalletId":"152161320", "CreditedWalletId":"148968396", "RefundReason":{ "RefundReasonMessage":null, "RefundReasonType":"OTHER" } } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $transferId = '155585643'; $response = $api->Transfers->GetRefunds($transferId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myTransfer = { Id: '180974208', } const listRefunds = async (transferId) => { return await mangopay.Transfers.getRefunds(transferId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listRefunds(myTransfer.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listTransferRefunds(transferId) begin response = MangoPay::Transfer.refunds(transferId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch refunds: #{error.message}" puts "Error details: #{error.details}" return false end end myTransfer = { Id: '180974208' } listTransferRefunds(myTransfer[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Refund; import java.util.List; public class ListTransferRefunds { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var transferId = "xfer_m_01J1WJCSBG0S4637BR54YYJX0Z"; List refunds = mangopay.getTransferApi().getRefunds(transferId); for (Refund refund : refunds) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(refund); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.resources import LegalUser, Transfer, TransferRefund legal_user = LegalUser.get('211918806') legal_user_wallet_id = '213754077' transfer = Transfer.get('214568995') transfer_refund = TransferRefund( id = transfer.id, author = legal_user, transfer = transfer ) transfer_refunds = Transfer.get_refunds(self = transfer_refund) for transfer_refund in transfer_refunds: pprint(vars(transfer_refund)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var transferId = "xfer_m_01J3ZG49W215VVZRJS394DKM00"; var viewTransferRefunds = await api.Refunds.GetRefundsForTransferAsync(transferId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(viewTransferRefunds, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Refund object ### Description Mangopay relies on the Refund object to manage the reimbursement of a past transaction. There is a refund method for each transaction `Type`: * Pay-in Refund – Request to reimburse a pay-in. * Transfer Refund – Request to reimburse a transfer (i.e., a transaction from one wallet to another). * Payout Refund – Request only generated by Mangopay when, for instance, the end user’s bank account is closed or if the acquiring bank refuses the funds. **Note – Transaction data retained for 13 months** The API retains all transaction objects for 13 months from `CreationDate`. This applies to refunds and the initial transaction linked to a refund. A call to retrieve the initial transaction of a refund, based on the refund’s `InitialTransactionId`, may return a 404 Not Found if it occurred more than 13 months ago. For more information, see the Data availability periods article. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the initial transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Default value:** The amount and currency values of the debited funds of the initial transaction. Information about the debited funds. Debited funds: * Takes by default the amount and currency values of the initial transaction when left empty. * Must be entered manually to perform a partial refund. * Cannot exceed the initial transaction `CreditedFunds` value when entered manually. This also applies to the sum of debited funds when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Default value:** The amount and currency values of the fees of the initial transaction. Information about the fees. This value: * Should be preceded by a minus sign (-) to refund the fees, otherwise more fees will be taken. * Takes by default the amount and currency values of the fees of the initial transaction when left empty (preceded by a -). * Cannot exceed the initial transaction fees amount when entered manually. This also applies to the sum of the amount of the fees when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the initial transaction being refunded. **Returned values:** `PAYIN`, `TRANSFER`, `PAYOUT` The type of the initial transaction being refunded. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the initial transaction being refunded, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle the credit from a repudiation following a lost dispute. The unique identifier of the debited wallet. The unique identifier of the credited wallet. Information about the reasons for the refund. *Max. length: 255 characters* Message explaining the reason for the refusal. **Returned values:** `INITIALIZED_BY_CLIENT`, `BANKACCOUNT_INCORRECT`, `OWNER_DO_NOT_MATCH_BANKACCOUNT`, `BANKACCOUNT_HAS_BEEN_CLOSED`, `WITHDRAWAL_IMPOSSIBLE_ON_SAVINGS_ACCOUNTS`, `OTHER` The type of reason for the refund. ### Related resources Learn more about refunds # View a Refund GET /v2.01/{ClientId}/refunds/{RefundId} **Note – Refund data retained for 13 months** The API retains all transaction objects for 13 months from `CreationDate`. This applies to refunds and the initial transaction linked to a refund. A call to retrieve the initial transaction of a refund, based on the refund’s `InitialTransactionId`, may return a 404 Not Found if it occurred more than 13 months ago. For more information, see the Data availability periods article. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the initial transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Default value:** The amount and currency values of the debited funds of the initial transaction. Information about the debited funds. Debited funds: * Takes by default the amount and currency values of the initial transaction when left empty. * Must be entered manually to perform a partial refund. * Cannot exceed the initial transaction `CreditedFunds` value when entered manually. This also applies to the sum of debited funds when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Default value:** The amount and currency values of the fees of the initial transaction. Information about the fees. This value: * Should be preceded by a minus sign (-) to refund the fees, otherwise more fees will be taken. * Takes by default the amount and currency values of the fees of the initial transaction when left empty (preceded by a -). * Cannot exceed the initial transaction fees amount when entered manually. This also applies to the sum of the amount of the fees when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the initial transaction being refunded. **Returned values:** `PAYIN`, `TRANSFER`, `PAYOUT` The type of the initial transaction being refunded. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the initial transaction being refunded, providing more information about the context in which the transaction occurred: * REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * REPUDIATION – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user requested a chargeback). * REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle the credit from a repudiation following a lost dispute. The unique identifier of the debited wallet. The unique identifier of the credited wallet. Information about the reasons for the refund. *Max. length: 255 characters* Message explaining the reason for the refusal. **Returned values:** `INITIALIZED_BY_CLIENT`, `BANKACCOUNT_INCORRECT`, `OWNER_DO_NOT_MATCH_BANKACCOUNT`, `BANKACCOUNT_HAS_BEEN_CLOSED`, `WITHDRAWAL_IMPOSSIBLE_ON_SAVINGS_ACCOUNTS`, `OTHER` The type of reason for the refund. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. **Note:** On refunds, the `StatementDescriptor` is only available for SEPA and BACS direct debit pay-ins (no other payment methods nor transfers). ```json 200 { "Id":"151981490", "Tag":null, "CreationDate":1663749078, "AuthorId":"142036728", "CreditedUserId":null, "DebitedFunds":{ "Currency":"EUR", "Amount":1500 }, "CreditedFunds":{ "Currency":"EUR", "Amount":1500 }, "Fees":{ "Currency":"EUR", "Amount":0 }, "Status":"SUCCEEDED", "ResultCode":"000000", "ResultMessage":"Success", "ExecutionDate":1663749078, "Type":"PAYIN", "Nature":"REFUND", "InitialTransactionId":"151981274", "InitialTransactionType":"PAYOUT", "InitialTransactionNature":"REGULAR", "DebitedWalletId":null, "CreditedWalletId":"145389978", "RefundReason":{ "RefundReasonMessage":"OTHER", "RefundReasonType":"OTHER" } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $refundId = '180925566'; $response = $api->Refunds->Get($refundId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myRefund = { Id: '180925566', } const viewRefund = async (refundId) => { return await mangopay.Refunds.get(refundId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewRefund(myRefund.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewRefund(refundId) begin response = MangoPay::Refund.fetch(refundId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Refund: #{error.message}" puts "Error details: #{error.details}" return false end end myRefund = { Id: '180925566' } viewRefund(myRefund[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Refund; public class ViewRefund { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var refundId = "refund_m_01J2BZ8BBT3GV20FZES1B5Z7TM"; Refund viewRefund = mangopay.getRefundApi().get(refundId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewRefund); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Refund refund_id = '214572035' try: view_refund = Refund.get(refund_id) pprint(vars(view_refund)) except Refund.DoesNotExist: print('The Refund {} does not exist.'.format(view_refund.id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewRefund = await api.Refunds.GetAsync("refund_m_01J3ZJ85JAQBYTJ8SBD8ZYNBV2"); string prettyPrint = JsonConvert.SerializeObject(viewRefund, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Transactions Report POST /v2.01/{ClientId}/reports/transactions **Note – Report expiration date** A report expires after 24 hours (i.e., you can no longer download it after this period). You can still generate a new report with the same filters and information easily. **Note – `BeforeDate` value restriction** To ensure that data provided on each report are up-to-date, the `BeforeDate` parameter cannot be greater than the report creation date minus 5 minutes. If it is, `BeforeDate` will be automatically set according to this constraint. ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object. \ For reports, this parameter can be useful to give the report a name. **Allowed values:** `CSV` The format in which the report is going to be downloaded. *Max. length: 255 characters* The URL to which the notification indicating that the report is ready to be downloaded will be sent. **Allowed values:** `CreationDate:ASC`, `CreationDate:DESC` The sorting direction of the CreationDate column. By default, the generated report is sorted by ascending creation date. Whether the report is limited to the first 10 lines (and therefore quicker to generate). The filtering parameters to optimize the report. **Allowed values:** Any date between today’s date and 36 months in the past. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). **Caution:** The time range between the `BeforeDate` and the `AfterDate` cannot exceed 6 months. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter).\ Caution: The time range between the `BeforeDate` and the `AfterDate` cannot exceed 6 months. **Allowed values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The transaction types to be taken into account. The transaction result codes to be taken into account. The transaction statuses to be taken into account. **Allowed values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The transaction natures to be taken into account. * REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * REPUDIATION – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the wallet that is to be taken into account. The unique identifier of the user at the source of the transaction. The debited funds amount above which the transactions are taken into account. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MinDebitedFundsAmount` value. The debited funds amount below which the transactions are taken into account. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MaxDebitedFundsAmount` value. The fees amount below which the transactions are taken into account. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MinFeesAmount` value. The fees amount above which the transactions are taken into account. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MaxFeesAmount` value. **Allowed values:** The `Columns` listed in the Reports article, which differ according to the report type. The information to be included in the report. ### Responses The unique identifier of the object. The date and time at which the object was created. *Max. length: 255 characters* Custom data that you can add to this object. \ For reports, this parameter can be useful to give the report a name. The date and time at which the report was generated (i.e., when its `Status` is no longer `PENDING`). **Returned values:** `PENDING`, `READY_FOR_DOWNLOAD`, `FAILED`, `EXPIRED` The status of the report: * `PENDING` – The report is being generated. * `READY_FOR_DOWNLOAD` – The report has been created, and can be downloaded. * `FAILED` – The report cannot be generated. * `EXPIRED` – The report was created, but is no longer available for download (it can be re-run to be downloaded again with fresh data). **Returned values:** `CSV` The format in which the report is going to be downloaded. The URL at which the file can be downloaded. *Max. length: 255 characters* The URL to which the notification indicating that the report is ready to be downloaded will be sent. The type of the report, indicating whether it lists transactions or wallets. The sorting direction of the CreationDate column. By default, the generated report is sorted by ascending creation date. Whether the report is limited to the first 10 lines (and therefore quicker to generate). The filtering parameters to optimize the report. **Returned values:** Any date between today’s date and 36 months in the past. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). **Caution:** The time range between the `BeforeDate` and the `AfterDate` cannot exceed 6 months. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter).\ Caution: The time range between the `BeforeDate` and the `AfterDate` cannot exceed 6 months. The transaction types to be taken into account. The transaction result codes to be taken into account. The transaction statuses to be taken into account. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The transaction natures to be taken into account. * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the wallet that is to be taken into account. The unique identifier of the user at the source of the transaction. The debited funds amount above which the transactions are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MinDebitedFundsAmount` value. The debited funds amount below which the transactions are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MaxDebitedFundsAmount` value. The fees amount below which the transactions are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MinFeesAmount` value. The fees amount above which the transactions are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MaxFeesAmount` value. **Returned values:** The `Columns` listed in the Reports article, which differ according to the report type. The information to be included in the report. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "3b84cf5d-1195-4753-9ae2-0922e35dbfd4", "Date": 1716558597.0, "errors": { "Filters.AfterDate": "This report type can only be done for the last 36 months." } } ``` ```json 200 { "Id": "146642145", "CreationDate": 1658317704, "Tag": "test doc july 2022", "ReportDate": null, "Status": "PENDING", "DownloadFormat": "CSV", "DownloadURL": null, "CallbackURL": null, "ReportType": "TRANSACTIONS", "Sort": "CreationDate:ASC", "Preview": false, "Filters": { "BeforeDate": 1658317644, "AfterDate": 1655725644, "Type": [], "ResultCode": [], "Status": [], "Nature": [], "WalletId": null, "AuthorId": null, "MinDebitedFundsAmount": null, "MinDebitedFundsCurrency": null, "MaxDebitedFundsAmount": null, "MaxDebitedFundsCurrency": null, "MinFeesAmount": null, "MinFeesCurrency": null, "MaxFeesAmount": null, "MaxFeesCurrency": null }, "Columns": [ "Id", "Tag", "CreationDate", "ExecutionDate", "AuthorId", "CreditedUserId", "DebitedFundsAmount", "DebitedFundsCurrency", "CreditedFundsAmount", "CreditedFundsCurrency", "FeesAmount", "FeesCurrency", "Status", "ResultCode", "ResultMessage", "Type", "Nature", "CreditedWalletId", "DebitedWalletId" ], "ResultCode": null, "ResultMessage": null } ``` ```json REST { "Tag": "custom meta", "DownloadFormat": "CSV", "CallbackURL": null, "Sort": "CreationDate:ASC", "Preview": false, "Filters": { "BeforeDate": 1658317644, "AfterDate": 1655725644, "Type": [], "ResultCode": [], "Status": [], "Nature": [], "WalletId": null, "AuthorId": null, "MinDebitedFundsAmount": null, "MinDebitedFundsCurrency": null, "MaxDebitedFundsAmount": null, "MaxDebitedFundsCurrency": null, "MinFeesAmount": null, "MinFeesCurrency": null, "MaxFeesAmount": null, "MaxFeesCurrency": null }, "Columns": [ "Id", "Tag", "CreationDate", "ExecutionDate", "AuthorId", "CreditedUserId", "DebitedFundsAmount", "DebitedFundsCurrency", "CreditedFundsAmount", "CreditedFundsCurrency", "FeesAmount", "FeesCurrency", "Status", "ResultCode", "ResultMessage", "Type", "Nature", "CreditedWalletId", "DebitedWalletId" ], } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $reportRequest = new \MangoPay\ReportRequest(); $reportRequest->ReportType = \MangoPay\ReportType::Transactions; $reportRequest->CallbackURL = 'https://mangopay.com/docs/please-ignore'; $reportRequest->Tag = 'Created using Mangopay PHP SDK'; $reportRequest->Filters = [ 'BeforeDate' => 1658838931, 'AfterDate' => 1656246931, 'Type' => ['PAYIN', 'PAYOUT'], 'ResultCode' => ['000000'], 'Status' => ['SUCCEEDED'], 'Nature' => ['REGULAR'], 'MinDebitedFundsAmount' => null, 'MinDebitedFundsCurrency' => 'EUR', 'MaxDebitedFundsAmount' => null, 'MaxDebitedFundsCurrency' => 'EUR', 'MinFeesAmount' => 0, 'MinFeesCurrency' => 'EUR', 'MaxFeesAmount' => 100000, 'MaxFeesCurrency' => 'EUR', ]; $reportRequest->Columns = [ 'Id', 'Tag', 'CreationDate', 'ExecutionDate', 'AuthorId', 'CreditedUserId', 'DebitedFundsAmount', 'DebitedFundsCurrency', 'CreditedFundsAmount', 'CreditedFundsCurrency', 'FeesAmount', 'FeesCurrency', 'Status', 'ResultCode', 'ResultMessage', 'Type', 'Nature', 'CreditedWalletId', 'DebitedWalletId', ]; $response = $api->Reports->Create($reportRequest); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end myReport = { ReportType: 'transactions', Tag: 'Created using Mangopay Ruby SDK', DownloadFormat: 'CSV', CallbackURL: 'https://mangopay.com/docs/please-ignore', Sort: 'CreationDate: ASC', Preview: false, Filters: { BeforeDate: 1658838931, AfterDate: 1656246931, Type: ['PAYIN', 'PAYOUT'], ResultCode: ['000000'], Status: ['SUCCEEDED'], Nature: ['REGULAR'], WalletId: nil, AuthorId: nil, MinDebitedFundsAmount: nil, MinDebitedFundsCurrency: 'EUR', MaxDebitedFundsAmount: nil, MaxDebitedFundsCurrency: 'EUR', MinFeesAmount: 0, MinFeesCurrency: 'EUR', MaxFeesAmount: 100000, MaxFeesCurrency: 'EUR' }, Columns: [ 'Id', 'Tag', 'CreationDate', 'ExecutionDate', 'AuthorId', 'CreditedUserId', 'DebitedFundsAmount', 'DebitedFundsCurrency', 'CreditedFundsAmount', 'CreditedFundsCurrency', 'FeesAmount', 'FeesCurrency', 'Status', 'ResultCode', 'ResultMessage', 'Type', 'Nature', 'CreditedWalletId', 'DebitedWalletId' ] } createTransactionsReport(myReport) ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import ReportTransactions from mangopay.utils import ReportTransactionsFilters transactions_report = ReportTransactions( tag = 'Created using Mangopay Python SDK', download_format = 'CSV', callback_url = 'https://mangopay.com/docs/please-ignore', sort = 'CreationDate: ASC', preview = False, filters = ReportTransactionsFilters( status = ['SUCCEEDED'], nature = ['REGULAR'], wallet_id = None, author_id = None, min_debited_funds_amount = 0, min_debited_funds_currency = 'EUR', max_debited_funds_amount = 1000000, max_debited_funds_currency = 'EUR', ), columns = [ 'Id', 'Tag', 'CreationDate', 'ExecutionDate', 'AuthorId', 'CreditedUserId', 'DebitedFundsAmount', 'DebitedFundsCurrency', 'CreditedFundsAmount', 'CreditedFundsCurrency', 'FeesAmount', 'FeesCurrency', 'Status', 'ResultCode', 'ResultMessage', 'Type', 'Nature', 'CreditedWalletId', 'DebitedWalletId' ] ) create_report = transactions_report.create() pprint(create_report._data) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var report = new ReportRequestPostDTO(ReportType.TRANSACTIONS) { Filters = { AuthorId = userId, WalletId = walletId, MinDebitedFundsAmount = 500, MinDebitedFundsCurrency = CurrencyIso.EUR, MaxDebitedFundsAmount = 50000, MaxDebitedFundsCurrency = CurrencyIso.EUR }, Columns = [ "Id", "Tag", "CreationDate", "ExecutionDate", "AuthorId", "CreditedUserId", "DebitedFundsAmount", "DebitedFundsCurrency", "CreditedFundsAmount", "CreditedFundsCurrency", "FeesAmount", "FeesCurrency", "Status", "ResultCode", "ResultMessage", "Type", "Nature", "CreditedWalletId", "DebitedWalletId" ], CallbackURL = "https://mangopay.com/docs/please-ignore", Tag = "Created using the Mangopay .NET SDK" }; var createReport = await api.Reports.CreateAsync(report); string prettyPrint = JsonConvert.SerializeObject(createReport, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Wallets Report POST /v2.01/{ClientId}/reports/wallets **Note – Report expiration date** A report expires after 24 hours (i.e., you can no longer download it after this delay). You can still generate a new report with the same filters and information easily. ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object. \ For reports, this parameter can be useful to give the report a name. **Allowed values:** `CSV` The format in which the report is going to be downloaded. *Max. length: 255 characters* The URL to which the notification indicating that the report is ready to be downloaded will be sent. **Allowed values:** `CreationDate:ASC`, `CreationDate:DESC` The sorting direction of the CreationDate column. By default, the generated report is sorted by ascending creation date. Whether the report is limited to the first 10 lines (and therefore quicker to generate). The filtering parameters to optimize the report. The date before which the wallet was created (based on the wallet’s `CreationDate` parameter). **Caution:** The time range between the `BeforeDate` and the `AfterDate` cannot exceed 24 months. The date after which the wallet was created (based on the wallet's `CreationDate` parameter). Caution: The time range between the `BeforeDate` and the `AfterDate` cannot exceed 24 months. The unique identifier of the user owning the wallet. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallets to take into account. The balance amount above which the wallets are taken into account. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MinBalanceAmount` value. The balance amount below which the wallets are taken into account. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MaxBalanceAmount` value. **Allowed values:** The `Columns` listed in the Reports article, which differ according to the report type. The information to be included in the report. ### Responses The unique identifier of the object. The date and time at which the object was created. *Max. length: 255 characters* Custom data that you can add to this object. \ For reports, this parameter can be useful to give the report a name. The date and time at which the report was generated (i.e., when its `Status` is no longer `PENDING`). **Returned values:** `PENDING`, `READY_FOR_DOWNLOAD`, `FAILED`, `EXPIRED` The status of the report: * `PENDING` – The report is being generated. * `READY_FOR_DOWNLOAD` – The report has been created, and can be downloaded. * `FAILED` – The report cannot be generated. * `EXPIRED` – The report was created, but is no longer available for download (it can be re-run to be downloaded again with fresh data). **Returned values:** `CSV` The format in which the report is going to be downloaded. The URL at which the file can be downloaded. *Max. length: 255 characters* The URL to which the notification indicating that the report is ready to be downloaded will be sent. The type of the report, indicating whether it lists transactions or wallets. The sorting direction of the CreationDate column. By default, the generated report is sorted by ascending creation date. Whether the report is limited to the first 10 lines (and therefore quicker to generate). The filtering parameters to optimize the report. The date before which the wallet was created (based on the wallet’s `CreationDate` parameter). **Caution:** The time range between the `BeforeDate` and the `AfterDate` cannot exceed 24 months. The date after which the wallet was created (based on the wallet's `CreationDate` parameter). Caution: The time range between the `BeforeDate` and the `AfterDate` cannot exceed 24 months. The unique identifier of the user owning the wallet. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallets to take into account. The balance amount above which the wallets are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MinBalanceAmount` value. The balance amount below which the wallets are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MaxBalanceAmount` value. **Allowed values:** The `Columns` listed in the Reports article, which differ according to the report type. The information to be included in the report. The transaction result codes to be taken into account. The explanation of the result code. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "23ca4f5b-6d35-45d0-8bde-c8424885a2e9", "Date": 1715353491.0, "errors": { "Filters.AfterDate": "This report type can only be done for a date range of a maximum of 24 months." } } ``` ```json 200 { "Id": "147284953", "CreationDate": 1658838991, "Tag": "This is my tag", "ReportDate": null, "Status": "PENDING", "DownloadFormat": "CSV", "DownloadURL": null, "CallbackURL": null, "ReportType": "WALLETS", "Sort": "CreationDate:ASC", "Preview": false, "Filters": { "BeforeDate": 1658838931, "AfterDate": 1656246931, "OwnerId": null, "Currency": null, "MinBalanceAmount": null, "MinBalanceCurrency": null, "MaxBalanceAmount": null, "MaxBalanceCurrency": null }, "Columns": [ "Id", "Tag", "CreationDate", "Owners", "Description", "BalanceAmount", "BalanceCurrency", "Currency", "FundsType" ], "ResultCode": null, } ``` ```json REST { "Tag": "custom meta", "DownloadFormat": "CSV", "CallbackURL": null, "Sort": "CreationDate:ASC", "Preview": false, "Filters": { "BeforeDate": 1658838931, "AfterDate": 1656246931, "OwnerId": null, "Currency": null, "MinBalanceAmount": null, "MinBalanceCurrency": null, "MaxBalanceAmount": null, "MaxBalanceCurrency": null }, "Columns": [ "Id", "Tag", "CreationDate", "Owners", "Description", "BalanceAmount", "BalanceCurrency", "Currency", "FundsType" ], } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $reportRequest = new \MangoPay\ReportRequest(); $reportRequest->ReportType = \MangoPay\ReportType::Wallets; $reportRequest->CallbackURL = 'https://mangopay.com/docs/please-ignore'; $reportRequest->Tag = 'Created using Mangopay PHP SDK'; $reportRequest->Filters = [ 'Currency' => 'EUR', 'BalanceAmount' => [ 'Min' => 1, 'Max' => 1000000 ], 'BeforeDate' => 1658838931, 'AfterDate' => 1656246931, 'OwnerId' => null, 'MinBalanceAmount' => 1, 'MinBalanceCurrency' => 'EUR', 'MaxBalanceAmount' => 100000000, 'MaxBalanceCurrency' => 'EUR', ]; $reportRequest->Columns = [ 'Id', 'CreationDate', 'Tag', 'Owners', 'Description', 'BalanceAmount', 'BalanceCurrency', 'Currency', 'FundsType', ]; $response = $api->Reports->Create($reportRequest); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myWalletsReport = { ReportType: 'WALLET', Tag: 'Created with Mangopay NodeJs SDK', DownloadFormat: 'CSV', CallbackURL: 'https://mangopay.com/docs/please-ignore', Sort: 'CreationDate:ASC', Preview: false, Filters: { BeforeDate: 1658838931, AfterDate: 1656246931, OwnerId: null, Currency: 'EUR', MinBalanceAmount: 1, MinBalanceCurrency: 'EUR', MaxBalanceAmount: 1000000, MaxBalanceCurrency: 'EUR', }, Columns: [ 'Id', 'Tag', 'CreationDate', 'Owners', 'Description', 'BalanceAmount', 'BalanceCurrency', 'Currency', 'FundsType', ], } const createWalletsReport = async (report) => { return await mangopay.Reports.create(report) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createWalletsReport(myWalletsReport) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end myReport = { ReportType: 'wallets', Tag: 'Created with Mangopay Ruby SDK', DownloadFormat: 'CSV', CallbackURL: 'https://mangopay.com/docs/please-ignore', Sort: 'CreationDate:ASC', Preview: false, Filters: { BeforeDate: 1658838931, AfterDate: 1656246931, OwnerId: nil, Currency: 'EUR', MinBalanceAmount: 1, MinBalanceCurrency: 'EUR', MaxBalanceAmount: 1000000, MaxBalanceCurrency: 'EUR' }, Columns: [ 'Id', 'Tag', 'CreationDate', 'Owners', 'Description', 'BalanceAmount', 'BalanceCurrency', 'Currency', 'FundsType' ] } createWalletsReport(myReport) ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import ReportWallets from mangopay.utils import ReportWalletsFilters wallets_report = ReportWallets( tag = 'Created using Mangopay Python SDK', download_format = 'CSV', callback_url = 'https://mangopay.com/docs/please-ignore', sort = 'CreationDate: ASC', preview = False, filters = ReportWalletsFilters( currency = 'GBP', min_balance_amount = 1, min_balance_currency = 'GBP', max_balance_amount = 100000, max_balance_currency = 'GBP' ), columns = [ 'Id', 'Tag', 'CreationDate', 'Owners', 'Description', 'BalanceAmount', 'BalanceCurrency', 'Currency', 'FundsType' ] ) create_report = wallets_report.create() pprint(create_report._data) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var report = new ReportRequestPostDTO(ReportType.WALLETS) { Filters = { MinBalanceAmount = 500, MinBalanceCurrency = CurrencyIso.EUR, MaxBalanceAmount = 50000, MaxBalanceCurrency = CurrencyIso.EUR }, Columns = [ "Id", "CreationDate", "Tag", "Owners", "Description", "BalanceAmount", "BalanceCurrency", "Currency", "FundsType", ], CallbackURL = "https://mangopay.com/docs/please-ignore", Tag = "Created using the Mangopay .NET SDK" }; var createReport = await api.Reports.CreateAsync(report); string prettyPrint = JsonConvert.SerializeObject(createReport, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List all Reports GET /v2.01/{ClientId}/reports ### Query parameters The date before which the report was created (based on the report’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the report was created (based on the report's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. ### Responses The list of reports created by the platform. The Report object created by the platform. The unique identifier of the object. The date and time at which the object was created. *Max. length: 255 characters* Custom data that you can add to this object. \ For reports, this parameter can be useful to give the report a name. The date and time at which the report was generated (i.e., when its `Status` is no longer `PENDING`). **Returned values:** `PENDING`, `READY_FOR_DOWNLOAD`, `FAILED`, `EXPIRED` The status of the report: * `PENDING` – The report is being generated. * `READY_FOR_DOWNLOAD` – The report has been created, and can be downloaded. * `FAILED` – The report cannot be generated. * `EXPIRED` – The report was created, but is no longer available for download (it can be re-run to be downloaded again with fresh data). **Returned values:** `CSV` The format in which the report is going to be downloaded. *Max. length: 255 characters* The URL to which the notification indicating that the report is ready to be downloaded will be sent. The type of the report, indicating whether it lists transactions or wallets. The sorting direction of the CreationDate column. By default, the generated report is sorted by ascending creation date. The filtering parameters to optimize the report. **Returned values:** Any date between today’s date and 36 months in the past. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). **Caution:** The time range between the `BeforeDate` and the `AfterDate` cannot exceed 6 months. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter).\ Caution: The time range between the `BeforeDate` and the `AfterDate` cannot exceed 6 months. The transaction types to be taken into account. The transaction result codes to be taken into account. The transaction statuses to be taken into account. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The transaction natures to be taken into account. * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the wallet that is to be taken into account. The unique identifier of the user at the source of the transaction. The debited funds amount above which the transactions are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MinDebitedFundsAmount` value. The debited funds amount below which the transactions are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MaxDebitedFundsAmount` value. The fees amount below which the transactions are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MinFeesAmount` value. The fees amount above which the transactions are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MaxFeesAmount` value. **Returned values:** The `Columns` listed in the Reports article, which differ according to the report type. The information to be included in the report. The transaction result codes to be taken into account. The explanation of the result code. ```json 200 [ { "Id": "146642145", "CreationDate": 1658317704, "Tag": "test doc july 2022", "ReportDate": null, "Status": "PENDING", "DownloadFormat": "CSV", "DownloadURL": null, "CallbackURL": null, "ReportType": "TRANSACTIONS", "Sort": "CreationDate:ASC", "Preview": false, "Filters": { "BeforeDate": 1658317644, "AfterDate": 1655725644, "Type": [], "ResultCode": [], "Status": [], "Nature": [], "WalletId": null, "AuthorId": null, "MinDebitedFundsAmount": null, "MinDebitedFundsCurrency": null, "MaxDebitedFundsAmount": null, "MaxDebitedFundsCurrency": null, "MinFeesAmount": null, "MinFeesCurrency": null, "MaxFeesAmount": null, "MaxFeesCurrency": null }, "Columns": [ "Id", "Tag", "CreationDate", "ExecutionDate", "AuthorId", "CreditedUserId", "DebitedFundsAmount", "DebitedFundsCurrency", "CreditedFundsAmount", "CreditedFundsCurrency", "FeesAmount", "FeesCurrency", "Status", "ResultCode", "ResultMessage", "Type", "Nature", "CreditedWalletId", "DebitedWalletId" ], "ResultCode": null, "ResultMessage": null } { "Id": "147284953", "CreationDate": 1658838991, "Tag": "This is my tag", "ReportDate": null, "Status": "PENDING", "DownloadFormat": "CSV", "DownloadURL": null, "CallbackURL": null, "ReportType": "WALLETS", "Sort": "CreationDate:ASC", "Preview": false, "Filters": { "BeforeDate": 1658838931, "AfterDate": 1656246931, "OwnerId": null, "Currency": null, "MinBalanceAmount": null, "MinBalanceCurrency": null, "MaxBalanceAmount": null, "MaxBalanceCurrency": null }, "Columns": [ "Id", "Tag", "CreationDate", "Owners", "Description", "BalanceAmount", "BalanceCurrency", "Currency", "FundsType" ], "ResultCode": null, } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $response = $api->Reports->GetAll(); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) const listReports = async () => { return await mangopay.Reports.getAll() .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listReports() ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listAllReports() begin begin response = MangoPay::Report.fetch() puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Reports: #{error.message}" puts "Error details: #{error.details}" return false end end end listAllReports() ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Report reports = Report.all() for report in reports: pprint(report._data) print() ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var reports = await api.Reports.GetAllAsync(); string prettyPrint = JsonConvert.SerializeObject(reports, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Report object ### Description The Report object is a tool that enables you to download a large amount of data in CSV format for accounting or analysis purposes. Reports are available for transactions and wallets. ### Attributes The unique identifier of the object. The date and time at which the object was created. *Max. length: 255 characters* Custom data that you can add to this object. \ For reports, this parameter can be useful to give the report a name. The date and time at which the report was generated (i.e., when its `Status` is no longer `PENDING`). **Returned values:** `PENDING`, `READY_FOR_DOWNLOAD`, `FAILED`, `EXPIRED` The status of the report: * `PENDING` – The report is being generated. * `READY_FOR_DOWNLOAD` – The report has been created, and can be downloaded. * `FAILED` – The report cannot be generated. * `EXPIRED` – The report was created, but is no longer available for download (it can be re-run to be downloaded again with fresh data). **Allowed values:** `CSV` The format in which the report is going to be downloaded. The URL at which the file can be downloaded. *Max. length: 255 characters* The URL to which the notification indicating that the report is ready to be downloaded will be sent. The type of the report, indicating whether it lists transactions or wallets. **Returned values:** `CreationDate:ASC`, `CreationDate:DESC` Indicates the direction in which to sort the list. Whether the report is limited to the first 10 lines (and therefore quicker to generate). The filtering parameters to optimize the report. The available filters differ depending on the value set for the `ReportType` parameter. **Returned values:** The `Columns` listed in the Reports article, which differ according to the report type. The information to be included in the report. The transaction result codes to be taken into account. The explanation of the result code. ### Related resources Learn more about reporting # View a Report GET /v2.01/{ClientId}/reports/{ReportId} ### Path parameters The unique identifier of the report. ### Responses The unique identifier of the object. The date and time at which the object was created. *Max. length: 255 characters* Custom data that you can add to this object. \ For reports, this parameter can be useful to give the report a name. The date and time at which the report was generated (i.e., when its `Status` is no longer `PENDING`). **Returned values:** `PENDING`, `READY_FOR_DOWNLOAD`, `FAILED`, `EXPIRED` The status of the report: * `PENDING` – The report is being generated. * `READY_FOR_DOWNLOAD` – The report has been created, and can be downloaded. * `FAILED` – The report cannot be generated. * `EXPIRED` – The report was created, but is no longer available for download (it can be re-run to be downloaded again with fresh data). **Returned values:** `CSV` The format in which the report is going to be downloaded. The URL at which the file can be downloaded. *Max. length: 255 characters* The URL to which the notification indicating that the report is ready to be downloaded will be sent. The type of the report, indicating whether it lists transactions or wallets. The sorting direction of the CreationDate column. By default, the generated report is sorted by ascending creation date. Whether the report is limited to the first 10 lines (and therefore quicker to generate). The filtering parameters to optimize the report. **Returned values:** Any date between today’s date and 36 months in the past. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). **Caution:** The time range between the `BeforeDate` and the `AfterDate` cannot exceed 6 months. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter).\ Caution: The time range between the `BeforeDate` and the `AfterDate` cannot exceed 6 months. The transaction types to be taken into account. The transaction result codes to be taken into account. The transaction statuses to be taken into account. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The transaction natures to be taken into account. * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the wallet that is to be taken into account. The unique identifier of the user at the source of the transaction. The debited funds amount above which the transactions are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MinDebitedFundsAmount` value. The debited funds amount below which the transactions are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MaxDebitedFundsAmount` value. The fees amount below which the transactions are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MinFeesAmount` value. The fees amount above which the transactions are taken into account. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the `MaxFeesAmount` value. **Returned values:** The `Columns` listed in the Reports article, which differ according to the report type. The information to be included in the report. The transaction result codes to be taken into account. The explanation of the result code. ```json 200 { "Id": "146642145", "CreationDate": 1658317704, "Tag": "test doc july 2022", "ReportDate": null, "Status": "PENDING", "DownloadFormat": "CSV", "DownloadURL": null, "CallbackURL": null, "ReportType": "TRANSACTIONS", "Sort": "CreationDate:ASC", "Preview": false, "Filters": { "BeforeDate": 1658317644, "AfterDate": 1655725644, "Type": [], "ResultCode": [], "Status": [], "Nature": [], "WalletId": null, "AuthorId": null, "MinDebitedFundsAmount": null, "MinDebitedFundsCurrency": null, "MaxDebitedFundsAmount": null, "MaxDebitedFundsCurrency": null, "MinFeesAmount": null, "MinFeesCurrency": null, "MaxFeesAmount": null, "MaxFeesCurrency": null }, "Columns": [ "Id", "Tag", "CreationDate", "ExecutionDate", "AuthorId", "CreditedUserId", "DebitedFundsAmount", "DebitedFundsCurrency", "CreditedFundsAmount", "CreditedFundsCurrency", "FeesAmount", "FeesCurrency", "Status", "ResultCode", "ResultMessage", "Type", "Nature", "CreditedWalletId", "DebitedWalletId" ], "ResultCode": null, "ResultMessage": null } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $reportId = '192900155'; $response = $api->Reports->Get($reportId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myReport = { Id: '192900155', } const viewReport = async (reportId) => { return await mangopay.Reports.get(reportId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewReport(myReport.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewReport(reportId) begin response = MangoPay::Report.fetch(reportId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Report: #{error.message}" puts "Error details: #{error.details}" return false end end myReport = { Id: '195000676' } viewReport(myReport[:Id]) ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Report report_id = 'report_m_01HR4RQ4KX66A4K52AJC3C1Z2R' try: view_report = Report.get(report_id) pprint(view_report._data) except Report.DoesNotExist: print('Report {} does not exist.'.format(report_id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var reportId = "report_m_01J55Z0TCA6998ZRGR2Y9AKDTZ"; var viewReport = await api.Reports.GetAsync(reportId); string prettyPrint = JsonConvert.SerializeObject(viewReport, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Repudiation object ### Description The Repudiation object represents the funds withdrawn by Mangopay from the platform's Repudiation Wallet to the user who made the pay-in following a corresponding chargeback. The Repudiation object is always created at the creation of a Dispute. **Note – Repudiation data retained for 13 months** An API call to retrieve a repudiation whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Attributes The unique identifier of the user at the source of the initial transaction. The unique identifier of the user whose wallet is credited.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. Information about the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the initial pay-in being disputed. **Returned values:** `PAYIN` The type of the initial transaction being disputed. The nature of the initial transaction being disputed. # View a Repudiation GET /v2.01/{ClientId}/repudiations/{RepudiationId} ### Path parameters The unique identifier of the repudiation. ### Responses The unique identifier of the user at the source of the initial transaction. The unique identifier of the user whose wallet is credited.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet.\ In the specific case of the Payout object, this value is always `null` since there is no credited wallet. **Default value:** The amount and currency values of the debited funds of the initial transaction. Information about the debited funds. Debited funds: * Takes by default the amount and currency values of the initial transaction when left empty. * Must be entered manually to perform a partial refund. * Cannot exceed the initial transaction `CreditedFunds` value when entered manually. This also applies to the sum of debited funds when making multiple partial refunds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the initial transaction being refunded. **Returned values:** `PAYIN`, `TRANSFER`, `PAYOUT` The type of the initial transaction being refunded. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the initial transaction being refunded, providing more information about the context in which the transaction occurred: * REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * REPUDIATION – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user requested a chargeback). * REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle the credit from a repudiation following a lost dispute. ```json 200 { "AuthorId": "146476890", "CreditedUserId": null, "CreditedFunds": { "Currency": "EUR", "Amount": 1000 }, "Status": "SUCCEEDED", "ExecutionDate": 1672662591, "Type": "PAYOUT", "Nature": "REPUDIATION", "CreditedWalletId": null, "DebitedWalletId": "CREDIT_EUR", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "ResultCode": "000000", "ResultMessage": "Success", "Id": "159196330", "Tag": null, "CreationDate": 1672662590, "InitialTransactionId": "159196283", "InitialTransactionType": "PAYIN", "InitialTransactionNature": "REGULAR" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $repudiationId = '199385843'; $response = $api->Disputes->GetRepudiation($repudiationId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myRepudiation = { Id: '192775715', } const viewRedpudiation = async (repudiationId) => { return await mangopay.Disputes.getRepudiation(repudiationId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewRedpudiation(myRepudiation.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewRepudiation(repudiationId) begin response = MangoPay::Dispute.fetch_repudiation(repudiationId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Repudiation: #{error.message}" puts "Error details: #{error.details}" return false end end myRepudiation = { Id:'192775715' } viewRepudiation(myRepudiation[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Repudiation; public class ViewRepudiation { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var repudiationId = "repud_m_01J2KVEDBG9ABZZAWRXFHAJ97H"; Repudiation viewDisputeDoc = mangopay.getRepudiationApi().getRepudiation(repudiationId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewDisputeDoc); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Repudiation try: repudiation = Repudiation.get('repud_m_01HQT6XRGWQWKCGF4GYRVTAKC1') pprint(repudiation._data) except Repudiation.DoesNotExist: print('Repudiation {} does not exist.'.format(repudiation)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var repudiationId = "repud_m_01HQT8ZRDVYBVT7T8240AWZD3D"; var viewRepudiation = await api.Disputes.GetRepudiationAsync(repudiationId); string prettyPrint = JsonConvert.SerializeObject(viewRepudiation, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Satispay PayIn POST /v2.01/{ClientId}/payins/payment-methods/satispay **Note – Timeout after 30 minutes** The payment session lasts for 30 minutes, at which point the pay-in fails automatically if no action has been taken by the user. ### Body parameters The unique identifier of the user at the source of the transaction. The unique identifier of the credited wallet. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. *Format: ISO 3166-1 alpha-2 two-letter country code* The country of residence of the user, which can be those of the EEA plus CH, GB, and TR. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `SATISPAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. *Format: ISO 3166-1 alpha-2 two-letter country code* The country of residence of the user, which can be those of the EEA plus CH, GB, and TR. ```json 200 - Created { "Id": "wt_e7a7e499-ed07-4086-a8f1-73207e497b3c", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1707772706, "AuthorId": "213407540", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "214818911", "CreditedUserId": "213407540", "PaymentType": "SATISPAY", "ExecutionType": "WEB", "ReturnURL": "https://www.mangopay.com/docs/please-ignore?transactionId=wt_e7a7e499-ed07-4086-a8f1-73207e497b3c", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=140186246851&rs=pJm8rdr5445tSOGD5vWL5HPkSDbt7wYR&cs=3726012989f6fc7cbefca757f6f109dc4b06fdf17c29a48c9c88abf1ab5c22f7", "StatementDescriptor": "MGP", "Country": "FR" } ``` ```json REST { "AuthorId": "213407540", "CreditedWalletId": "214818911", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "ReturnURL": "https://www.mangopay.com/docs/please-ignore", "Tag": "Created using the Mangopay API Postman collection", "StatementDescriptor": "MGP", "Country": "FR" } ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInExecutionDetailsWeb; import com.mangopay.entities.subentities.PayInPaymentDetailsSatispay; public class CreateSatispayPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; PayIn satispayPayin = new PayIn(); satispayPayin.setPaymentType(PayInPaymentType.SATISPAY); satispayPayin.setExecutionType(PayInExecutionType.WEB); satispayPayin.setAuthorId(userId); satispayPayin.setCreditedWalletId(walletId); satispayPayin.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); satispayPayin.setFees(new Money(CurrencyIso.EUR, 0)); satispayPayin.setTag("Created using the Mangopay Java SDK"); PayInExecutionDetailsWeb executionDetails = new PayInExecutionDetailsWeb(); executionDetails.setReturnUrl("https://www.mangopay.com/docs/please-ignore"); satispayPayin.setExecutionDetails(executionDetails); PayInPaymentDetailsSatispay paymentDetails = new PayInPaymentDetailsSatispay(); paymentDetails.setCountry("FR"); paymentDetails.setStatementDescriptor("Jul2024"); satispayPayin.setPaymentDetails(paymentDetails); PayIn createSatispayPayin = mangopay.getPayInApi().create(satispayPayin); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createSatispayPayin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, SatispayPayIn from mangopay.utils import Money natural_user = NaturalUser.get('210513027') satispay_payin = SatispayPayIn( author_id = natural_user.id, credited_wallet_id = '210514820', debited_funds = Money(amount=1000, currency='EUR'), fees = Money(amount=0, currency='EUR'), return_url = 'https://www.mangopay.com/docs/please-ignore', country = 'FR', statement_descriptor = 'MGP', tag = 'Created using the Mangopay Python SDK', ) create_satispay_payin = satispay_payin.save() pprint(create_satispay_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var returnUrl = "https://www.mangopay.com/docs/please-ignore/"; var payIn = new PayInSatispayWebPostDTO (userId, new Money { Amount = 1000, Currency = CurrencyIso.EUR}, new Money { Amount = 0, Currency = CurrencyIso.EUR}, walletId, returnUrl, "FR", "MGP", "Created using the Mangopay .NET SDK" ); PayInDTO createSatispayPayIn = await api.PayIns.CreateSatispayWebAsync(payIn); string prettyPrint = JsonConvert.SerializeObject(createSatispayPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Satispay PayIn object ### Description The Satispay PayIn object allows platforms to process payments made with the Satispay payment method. **Note – Activation required** To activate Satispay for your platform (including Sandbox), contact Mangopay via the Dashboard. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `SATISPAY` The type of pay-in. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. *Format: ISO 3166-1 alpha-2 two-letter country code* The country of residence of the user, which can be those of the EEA plus CH, GB, and TR. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Related resources Learn more about Satispay # View a PayIn (Satispay) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `SATISPAY` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. *Format: ISO 3166-1 alpha-2 two-letter country code* The country of residence of the user, which can be those of the EEA plus CH, GB, and TR. ```json 200 - Succeeded { "Id": "wt_e7a7e499-ed07-4086-a8f1-73207e497b3c", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1707772706, "AuthorId": "213407540", "DebitedFunds": { "Currency": "EUR", "Amount": 1000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1707772720, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "214818911", "CreditedUserId": "213407540", "PaymentType": "SATISPAY", "ExecutionType": "WEB", "ReturnURL": "https://www.mangopay.com/docs/please-ignore?transactionId=wt_e7a7e499-ed07-4086-a8f1-73207e497b3c", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=140186246851&rs=pJm8rdr5445tSOGD5vWL5HPkSDbt7wYR&cs=3726012989f6fc7cbefca757f6f109dc4b06fdf17c29a48c9c88abf1ab5c22f7", "StatementDescriptor": "MGP", "Country": "FR" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetAsync("payin_m_01J334XF2V6751GRG9M2M558HG"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create an SSO POST /v2.01/{ClientId}/clients/ssos ### Body parameters *Max. length: 100 characters* The first name of the Dashboard user. *Max. length: 100 characters* The last name of the Dashboard user. *Max. length: 255 characters* Custom data that you can add to this object. *Max. length: 255 characters* The email address of the Dashboard user. Must be a valid email that is not already used for another SSO. Once the SSO is created, this email address cannot be changed.\ Note: A maximum of 12 consecutive digits are allowed. The `Id` of the Permission Group object associated with the Dashboard user. Identifiers for default permission groups are ADMIN, WRITE, and READ. ### Responses The unique identifier of the object. *Max. length: 100 characters* The first name of the Dashboard user. *Max. length: 100 characters* The last name of the Dashboard user. *Max. length: 255 characters* Custom data that you can add to this object. Whether or not the SSO is active. *Max. length: 255 characters* The email address of the Dashboard user. Must be a valid email that is not already used for another SSO. Once the SSO is created, this email address cannot be changed.\ Note: A maximum of 12 consecutive digits are allowed. The unique identifier associated with the API key, giving access to either the Sandbox or Production environment. The status of the invitation sent by email to the Dashboard user to confirm the SSO activation. Values may be one of the following: * `ACCEPTED` – The invitation was accepted by the user, and the corresponding SSO is activated. * `SENT` – The invitation was sent to the user, but not yet accepted. * `EXPIRED` –The invitation was sent but the user didn’t complete the registration in the 30-minute limit. The `Id` of the Permission Group object associated with the Dashboard user. Identifiers for default permission groups are ADMIN, WRITE, and READ. The date and time at which the Dashboard user was last logged in. The date and time at which the Dashboard user was created. ```json 200 { "Id": "14446007", "FirstName": "Alex", "LastName": "Smith", "Tag": "Custom meta", "Active": true, "Email": "alex.smith@example.com", "ClientId": "sandboxalex", "InvitationStatus": "SENT", "PermissionGroupId": "WRITE", "LastLoginDate": null, "CreationDate": 1646232844 } ``` ```json REST { "FirstName": "Alex", "LastName": "Smith", "Tag": "Custom meta", "Email": "alex.smith@example.com", "PermissionGroupId": "WRITE" } ``` # Extend an SSO invitation PUT /v2.01/{ClientId}/clients/ssos/{SsoId}/extendinvitation This endpoint allows you to resend an invitation for a created SSO access with an `InvitationStatus` of `EXPIRED`. ### Path parameters The unique identifier of the SSO object. ### Responses The unique identifier of the object. *Max. length: 100 characters* The first name of the Dashboard user. *Max. length: 100 characters* The last name of the Dashboard user. *Max. length: 255 characters* Custom data that you can add to this object. Whether or not the SSO is active. *Max. length: 255 characters* The email address of the Dashboard user. Must be a valid email that is not already used for another SSO. Once the SSO is created, this email address cannot be changed.\ Note: A maximum of 12 consecutive digits are allowed. The unique identifier associated with the API key, giving access to either the Sandbox or Production environment. The status of the invitation sent by email to the Dashboard user to confirm the SSO activation. Values may be one of the following: * `ACCEPTED` – The invitation was accepted by the user, and the corresponding SSO is activated. * `SENT` – The invitation was sent to the user, but not yet accepted. * `EXPIRED` –The invitation was sent but the user didn’t complete the registration in the 30-minute limit. The `Id` of the Permission Group object associated with the Dashboard user. Identifiers for default permission groups are ADMIN, WRITE, and READ. The date and time at which the Dashboard user was last logged in. The date and time at which the Dashboard user was created. ```json { "Message": "method doesn’t support that content type ", "Type": "content_type_not_supported", "Id": "3d10ecf2-ec35-4af5-9961-1a89d37eea43#1685680956", "Date": 1685680957.0, "errors": null } ``` ```json 200 { "Id": "192546892", "FirstName": "Alex", "LastName": "Smith", "Tag": "Custom meta", "Active": true, "Email": "melodie.frayssens+asmith@mangopay.com", "ClientId": "sandboxmelodie", "InvitationStatus": "SENT", "PermissionGroupId": "WRITE", "LastLoginDate": null, "CreationDate": 1685625698 } ``` # List all SSOs GET /v2.01/{ClientId}/clients/ssos ### Responses The list of SSO objects created by the platform. The SSO object created by the platform. *Max. length: 255 characters* *Max. length: 100 characters* The first name of the Dashboard user. *Max. length: 100 characters* The last name of the Dashboard user. *Max. length: 255 characters* Custom data that you can add to this object. Whether or not the SSO is active. *Max. length: 255 characters* The email address of the Dashboard user. Must be a valid email that is not already used for another SSO. Once the SSO is created, this email address cannot be changed.\ Note: A maximum of 12 consecutive digits are allowed. The unique identifier associated with the API key, giving access to either the Sandbox or Production environment. The status of the invitation sent by email to the Dashboard user to confirm the SSO activation. Values may be one of the following: * `ACCEPTED` – The invitation was accepted by the user, and the corresponding SSO is activated. * `SENT` – The invitation was sent to the user, but not yet accepted. * `EXPIRED` –The invitation was sent but the user didn’t complete the registration in the 30-minute limit. The `Id` of the Permission Group object associated with the Dashboard user. Identifiers for default permission groups are ADMIN, WRITE, and READ. The date and time at which the Dashboard user was last logged in. The date and time at which the Dashboard user was created. ```json 200 [ { "Id": "134446007", "FirstName": "Alex", "LastName": "Smith", "Tag": "", "Active": true, "Email": "alex.smith@example.com", "ClientId": "sandboxalex", "InvitationStatus": "EXPIRED", "PermissionGroupId": "ADMIN", "LastLoginDate": null, "CreationDate": 1646232844 } ] ``` # List SSOs for a Permission Group GET /v2.01/{ClientId}/clients/permissiongroups/{PermissionGroupId}/sso ### Path parameters The `Id` of the Permission Group object associated with the Dashboard user. Identifiers for default permission groups are ADMIN, WRITE, and READ. ### Responses The list of SSO objects created by the platform. The SSO object created by the platform. *Max. length: 255 characters* *Max. length: 100 characters* The first name of the Dashboard user. *Max. length: 100 characters* The last name of the Dashboard user. *Max. length: 255 characters* Custom data that you can add to this object. Whether or not the SSO is active. *Max. length: 255 characters* The email address of the Dashboard user. Must be a valid email that is not already used for another SSO. Once the SSO is created, this email address cannot be changed.\ Note: A maximum of 12 consecutive digits are allowed. The unique identifier associated with the API key, giving access to either the Sandbox or Production environment. The status of the invitation sent by email to the Dashboard user to confirm the SSO activation. Values may be one of the following: * `ACCEPTED` – The invitation was accepted by the user, and the corresponding SSO is activated. * `SENT` – The invitation was sent to the user, but not yet accepted. * `EXPIRED` –The invitation was sent but the user didn’t complete the registration in the 30-minute limit. The `Id` of the Permission Group object associated with the Dashboard user. Identifiers for default permission groups are ADMIN, WRITE, and READ. The date and time at which the Dashboard user was last logged in. The date and time at which the Dashboard user was created. ```json 200 [ { "Id": "134446007", "FirstName": "Alex", "LastName": "Smith", "Tag": "", "Active": true, "Email": "alex.smith@example.com", "ClientId": "sandboxalex", "InvitationStatus": "EXPIRED", "PermissionGroupId": "ADMIN", "LastLoginDate": null, "CreationDate": 1646232844 } ] ``` # The SSO object ### Description SSO (single sign-on) object allows you to provide your team members with access to your Mangopay environment and corresponding Dashboard. Accesses come with personal credentials and specific permissions. ### Attributes The unique identifier of the object. *Max. length: 100 characters* The first name of the Dashboard user. *Max. length: 100 characters* The last name of the Dashboard user. *Max. length: 255 characters* Custom data that you can add to this object. Whether or not the SSO is active. *Max. length: 255 characters* The email address of the Dashboard user. Must be a valid email that is not already used for another SSO. Once the SSO is created, this email address cannot be changed.\ Note: A maximum of 12 consecutive digits are allowed. The unique identifier associated with the API key, giving access to either the Sandbox or Production environment. The status of the invitation sent by email to the Dashboard user to confirm the SSO activation. Values may be one of the following: * `ACCEPTED` – The invitation was accepted by the user, and the corresponding SSO is activated. * `SENT` – The invitation was sent to the user, but not yet accepted. * `EXPIRED` –The invitation was sent but the user didn’t complete the registration in the 30-minute limit. The `Id` of the Permission Group object associated with the Dashboard user. Identifiers for default permission groups are ADMIN, WRITE, and READ. The date and time at which the Dashboard user was last logged in. The date and time at which the Dashboard user was created. # Update an SSO PUT /v2.01/{ClientId}/clients/ssos/{SsoId} This call may be used to deactivate an SSO access by updating the `Active` parameter to `false`. ### Path parameters The unique identifier of the SSO object. ### Body parameters *Max. length: 100 characters* The first name of the Dashboard user. *Max. length: 100 characters* The last name of the Dashboard user. *Max. length: 255 characters* Custom data that you can add to this object. The `Id` of the Permission Group object associated with the Dashboard user. Identifiers for default permission groups are ADMIN, WRITE, and READ. Whether or not the SSO is active. ### Responses The unique identifier of the object. *Max. length: 100 characters* The first name of the Dashboard user. *Max. length: 100 characters* The last name of the Dashboard user. *Max. length: 255 characters* Custom data that you can add to this object. Whether or not the SSO is active. *Max. length: 255 characters* The email address of the Dashboard user. Must be a valid email that is not already used for another SSO. Once the SSO is created, this email address cannot be changed.\ Note: A maximum of 12 consecutive digits are allowed. The unique identifier associated with the API key, giving access to either the Sandbox or Production environment. The status of the invitation sent by email to the Dashboard user to confirm the SSO activation. Values may be one of the following: * `ACCEPTED` – The invitation was accepted by the user, and the corresponding SSO is activated. * `SENT` – The invitation was sent to the user, but not yet accepted. * `EXPIRED` –The invitation was sent but the user didn’t complete the registration in the 30-minute limit. The `Id` of the Permission Group object associated with the Dashboard user. Identifiers for default permission groups are ADMIN, WRITE, and READ. The date and time at which the Dashboard user was last logged in. The date and time at which the Dashboard user was created. ```json 200 { "Id": "14446007", "FirstName": "Alex", "LastName": "Smith", "Tag": "Custom meta", "Active": true, "Email": "alex.smith@example.com", "ClientId": "sandboxalex", "InvitationStatus": "SENT", "PermissionGroupId": "WRITE", "LastLoginDate": null, "CreationDate": 1646232844 } ``` ```json REST { "FirstName": "Alex", "LastName": "Smith", "Tag": "Custom meta", "Email": "alex.smith@example.com", "PermissionGroupId": "WRITE" } ``` # View an SSO GET /v2.01/{ClientId}/clients/ssos/{SsoId} ### Path parameters The unique identifier of the SSO object. ### Responses The unique identifier of the object. *Max. length: 100 characters* The first name of the Dashboard user. *Max. length: 100 characters* The last name of the Dashboard user. *Max. length: 255 characters* Custom data that you can add to this object. Whether or not the SSO is active. *Max. length: 255 characters* The email address of the Dashboard user. Must be a valid email that is not already used for another SSO. Once the SSO is created, this email address cannot be changed.\ Note: A maximum of 12 consecutive digits are allowed. The unique identifier associated with the API key, giving access to either the Sandbox or Production environment. The status of the invitation sent by email to the Dashboard user to confirm the SSO activation. Values may be one of the following: * `ACCEPTED` – The invitation was accepted by the user, and the corresponding SSO is activated. * `SENT` – The invitation was sent to the user, but not yet accepted. * `EXPIRED` –The invitation was sent but the user didn’t complete the registration in the 30-minute limit. The `Id` of the Permission Group object associated with the Dashboard user. Identifiers for default permission groups are ADMIN, WRITE, and READ. The date and time at which the Dashboard user was last logged in. The date and time at which the Dashboard user was created. ```json 200 { "Id": "14446007", "FirstName": "Alex", "LastName": "Smith", "Tag": "Custom meta", "Active": true, "Email": "alex.smith@example.com", "ClientId": "sandboxalex", "InvitationStatus": "SENT", "PermissionGroupId": "WRITE", "LastLoginDate": null, "CreationDate": 1646232844 } ``` # Create a Swish PayIn POST /v2.01/{ClientId}/payins/payment-methods/swish **Note – Session timeout** The Swish payment session lasts for 3 minutes, at which point the pay-in fails automatically if no action has been taken by the user. **Note – Minimum amount 0.01 SEK** On Swish pay-ins, the minimum amount is 0.01 SEK (`DebitedFunds.Amount` value `1`). ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Allowed values:** `SEK` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** `SEK` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** `SEK` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** `SEK` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** `SEK` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `SWISH` The type of pay-in. **Returned values:** `WEB` The execution type of the mandate. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The mobile URL to which to redirect the user to complete the payment in an app-to-app flow. **Note:** In Sandbox, this parameter is not returned: the `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. The PNG file of the Swish QR code as a Base64-encoded string. **Note:** In Sandbox, this parameter is not returned. The `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. ```json 200 - Created { "Id": "wt_b78f1b78-336f-46ad-9009-1c7336da0af0", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1729601412, "AuthorId": "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN", "DebitedFunds": { "Currency": "SEK", "Amount": 5000 }, "CreditedFunds": { "Currency": "SEK", "Amount": 5000 }, "Fees": { "Currency": "SEK", "Amount": 0 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01J9Y372QHA9J6F9TC8MKQFK9K", "CreditedUserId": "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN", "PaymentType": "SWISH", "ExecutionType": "WEB", "ReturnURL": "https://mangopay.com/docs/please-ignore?transactionId=wt_5cc1e327-d766-450e-9794-3a1a079bc6b6", "RedirectURL": "https://r2.girogate.de/swish/H709/I?tx=2338766490&rs=NuyyUfdpJhGIY3ANnwg7OPtrB99TPxDM&cs=a81cae5e1e050b5c1ce63a57ea70ac5e43fb23afec22809a8acc7746af383cbd", "StatementDescriptor": "Example123", "DeepLinkURL": "swish://paymentrequest?token=AAAAAAAAAAAAAAAjOHZkkCUVxOU7jxLm&callbackurl=https%3A%2F%2Fapi.sandbox.whenthen.co%2Fpayments%2Fapm%2Fpayment-gateway-ppro%3Afb8712d4-66bd-4d75-a1a8-50a53be73de2%3Famount%3D5000%26currency%3DSEK", "QRCodeURL": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAshklEQVR4Xu2d+ZudZZnn/VPmt+lrRlkvlKVFRBmvdmlRUAQkhF02QdaGBrVd2sGWGdsFephWWx17hB5tFwZFUcAFkG3YF9khkKSqEpJKZalKVd1z3lNZPznnzjcvz/2e56k8H66viae+9/Lcb9V9vefk5ORNVqlUKoXwJj5QqVQquVIXVqVSKYa6sCqVSjHUhVWpVIqhLqxKpVIMdWFVKpViqAurUqkUQ11YlUqlGOrCqlQqxVAXVqVSKYa6sCqVSjHUhVWpVIqhLqxKpVIMdWFVKpViqAurUqkUQ11YlUqlGOrCqlQqxVAXVqVSKYa6sCqVSjHUhVWpVIqhLqxKpVIMdWFVKpViqAurUqkUQ11YlUqlGOrCqlQqxVA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g56U0RF6G2MM8oc9Krqi3Mk2vOrsmmUw6wRLWFedSc9KaIi1BbmGeUOelV1RbmyTVn12TTKQdYotrCPGpOelPERagtzDPKnPSqagvz5Jqza7LplAMsUW1hHjUnvSniItQW5hllTnpVtYV5cs3ZNdl0ygGWqLYwj5qT3hRxEWoL84wyJ72q2sI8uebsmmw65QBLVFuYR81Jb4q4CLWFeUaZk15VbWGeXHN2TTmdViqVvZ66sCqVSjHUhVWpVIqhLqxKpVIMdWFVKpViqAurUqkUQ11YlUqlGOrCqlQqxVAXVqVSKYa6sCqVSjHUhVWpVIqhLqxKpVIMdWFVKpViqAurUqkUQ11YlUqlGOrCqlQqxVAXVqVSKYa6sCqVSjHUhVWpVIqhLqxKpVIMdWFVKpViqAurUqkUQ11YlUqlGOrCqlQqxVAXVqVSKYa6sCqVSjHUhVWpVIqhLqxKpVIMdWFVKpViqAurUqkUQ11YlUqlGOrCqlQqxVAXVqVSKYa6sCqVSjHUhVWpVIrh/wPvCR/VHw+LOQAAAABJRU5ErkJggg==" } ``` ```json REST { "AuthorId": "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN", "CreditedWalletId": "wlt_m_01J9Y372QHA9J6F9TC8MKQFK9K", "DebitedFunds": { "Currency": "SEK", "Amount": 5000 }, "Fees": { "Currency": "SEK", "Amount": 0 }, "ReturnURL": "https://docs.mangopay.com/please-ignore", "StatementDescriptor": "Example123", "Tag": "Created using the Mangopay API Postman collection" } ``` # The Swish PayIn object ### Description The Swish PayIn object allows platforms to process payments with Swish, where the user uses the Swish app to scan a QR code and confirm the payment. Learn more **→** ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** `SEK` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** `SEK` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** `SEK` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `SWISH` The type of pay-in. **Returned values:** `WEB` The execution type of the mandate. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The mobile URL to which to redirect the user to complete the payment in an app-to-app flow. **Note:** In Sandbox, this parameter is not returned: the `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. The PNG file of the Swish QR code as a Base64-encoded string. **Note:** In Sandbox, this parameter is not returned. The `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. ### Related resources Learn more about Swish Learn about testing Swish # View a PayIn (Swish) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** `SEK` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** `SEK` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** `SEK` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `SWISH` The type of pay-in. **Returned values:** `WEB` The execution type of the mandate. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The mobile URL to which to redirect the user to complete the payment in an app-to-app flow. **Note:** In Sandbox, this parameter is not returned: the `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. The PNG file of the Swish QR code as a Base64-encoded string. **Note:** In Sandbox, this parameter is not returned. The `RedirectURL` must be used to complete the payment using Mangopay’s web-based simulator. ```json 200 - Succeeded { "Id": "wt_b78f1b78-336f-46ad-9009-1c7336da0af0", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1729590764, "AuthorId": "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN", "DebitedFunds": { "Currency": "SEK", "Amount": 5000 }, "CreditedFunds": { "Currency": "SEK", "Amount": 5000 }, "Fees": { "Currency": "SEK", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1729590892, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01J9Y372QHA9J6F9TC8MKQFK9K", "CreditedUserId": "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN", "PaymentType": "SWISH", "ExecutionType": "WEB", "ReturnURL": "https://mangopay.com/docs/please-ignore?transactionId=wt_b78f1b78-336f-46ad-9009-1c7336da0af0", "RedirectURL": "https://r2.girogate.de/swish/H709/I?tx=2338709140&rs=OzbGDu7VRJo2uskhrkYZ0pkw5vE4U6z3&cs=50cc9a8984116452763ece37084717ccaac5fff84ded48b4d0882159673fd02b", "StatementDescriptor": "Example123", "DeepLinkURL": "swish://paymentrequest?token=AAAAAAAAAAAAAAAjOHCRQNQoyuWLAhTm&callbackurl=https%3A%2F%2Fapi.sandbox.whenthen.co%2Fpayments%2Fapm%2Fpayment-gateway-ppro%3Afb8712d4-66bd-4d75-a1a8-50a53be73de2%3Famount%3D5000%26currency%3DSEK", "QRCodeURL": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAsMElEQVR4Xu2d+ZueZZXn+VPmt+mrR9lyoSwtIsh4tUuLAiIgIexLQJBAaGhQ26UdbJmxXaCHabXV0RF6tF0YFEUBQYhA6LCEfSchSS2h9qQqVe+Z53mrklQ+eevk5M65n+e+q+6P17ehK9/vOec5bzjXW0VROUgKhUIhEw7iBwqFQiFVysEqFArZUA5WoVDIhnKwCoVCNpSDVSgUsqEcrEKhkA3lYBUKhWwoB6tQKGRDOViFQiEbysEqFArZUA5WoVDIhnKwCoVCNpSDVSgUsqEcrEKhkA3lYBUKhWwoB6tQKGRDOViFQiEbysEqFArZUA5WoVDIhnKwCoVCNpSDVSgUsqEcrEKhkA3lYBUKhWwoB6tQKGRDOViFQiEbysEqFArZUA5WoVDIhnKwCoVCNpSDVSgUsqEcrEKhkA3lYBUKhWwoB6tQKGRDOViFQiEbkjlYBx10UPbSoDe2NOj1yGmKAXtY1TTsn6NSIplpuKQcpUFvbGnQ65HTFAP2sKpp2D9HpUQy03BJOUqD3tjSoNcjpykG7GFV07B/jkqJZKbhknKUBr2xpUGvR05TDNjDqqZh/xyVEslMwyXlKA16Y0uDXo+cphiwh1VNw/45KiWSmYZLylEa9MaWBr0eOU0xYA+rmob9c1RKJDMNl5SjNOiNLQ16PXKaYsAeVjUN++eolEhmGi4p2YX1mM8yJ72xcxqsY61Jr1WhsI61Jr3WXAzYv81ZNDhbsnPyA23BJS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FQiEbysEqFArZUA5WoVDIhnKwCoVCNpSDVSgUsqEcrEKhkA3lYBUKhWwoB6tQKGRDOViFQiEbysEqFArZUA5WoVDIhnKwCoVCNpSDVSgUsqEcrEKhkA3lYBUKhWwoB6tQKGRDOViFQiEbysEqFArZUA5WoVDIhnKwCoVCNpSDVSgUsqEcrEKhkA3lYBUKhWwoB6tQKGRDOViFQiEbysEqFArZ8P8BLsJJ1SkDPzwAAAAASUVORK5CYII=" } ``` ```json REST // GET has no body parameters ``` # List Transactions for a Bank Account GET /v2.01/{ClientId}/bankaccounts/{BankAccountId}/transactions This call returns all the transactions of a given bank account, whether the bank account is the source (pay-in) or the target (payout) of the transaction. ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. **Allowed values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. You can filter on multiple values by separating them with a comma. **Allowed values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred. You can filter on multiple values by separating them with a comma. ### Path parameters The unique identifier of the bank account. ### Responses The list of transactions created by the platform. The transaction created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. ```json 200 - Payouts-only example [ { "Id":"155249846", "Tag":"Created using MANGOPAY API Collection Postman", "CreationDate":1667471665, "AuthorId":"146476890", "CreditedUserId":null, "DebitedFunds":{ "Currency":"EUR", "Amount":1000 }, "CreditedFunds":{ "Currency":"EUR", "Amount":990 }, "Fees":{ "Currency":"EUR", "Amount":10 }, "Status":"SUCCEEDED", "ResultCode":"000000", "ResultMessage":"Success", "ExecutionDate":1667471665, "Type":"PAYOUT", "Nature":"REGULAR", "CreditedWalletId":null, "DebitedWalletId":"148968396" }, { "Id":"155250949", "Tag":"Created using MANGOPAY API Collection Postman", "CreationDate":1667471872, "AuthorId":"146476890", "CreditedUserId":null, "DebitedFunds":{ "Currency":"EUR", "Amount":16000 }, "CreditedFunds":{ "Currency":"EUR", "Amount":15990 }, "Fees":{ "Currency":"EUR", "Amount":10 }, "Status":"FAILED", "ResultCode":"001001", "ResultMessage":"Unsufficient wallet balance", "ExecutionDate":null, "Type":"PAYOUT", "Nature":"REGULAR", "CreditedWalletId":null, "DebitedWalletId":"148968396" } ] ``` ```json REST // GET has no body parameters ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $bankAccountId = '198982485'; $response = $api->BankAccounts->GetTransactions($bankAccountId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let bankAccount = { Id: '154876798', } const getBankAccountTransactions = async (bankAccountId) => { return await mangopay.BankAccounts.getTransactions(bankAccountId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getBankAccountTransactions(bankAccount.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listTransactionsBankAccount(bankAccountId) begin response = MangoPay::BankAccount.transactions(bankAccountId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Transactions: #{error.message}" puts "Error details: #{error.details}" return false end end myBankAccount = { Id: '154876798' } listTransactionsBankAccount(myBankAccount[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Transaction; import java.util.List; public class ListBankAccountTransactions { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var bankAccountId = "bankacc_m_01HTJ7P7Y8K9DS5SZ08MDQRHHE"; List transactions = mangopay.getUserApi().getBankAccountTransactions(bankAccountId); for (Transaction transaction : transactions) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(transaction); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, BankAccount natural_user = NaturalUser.get('213753890') bank_account = BankAccount( user_id = natural_user.id, id = '214651521' ) transactions = BankAccount.get_transactions(self = bank_account) print('=== Transactions for Bank Account {} ==='.format(bank_account.id)) for transaction in transactions: print() pprint(transaction._data) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var bankAccountId = "bankacc_m_01HTJ7P7Y8K9DS5SZ08MDQRHHE"; var viewTransactions = await api.Users.GetTransactionsForBankAccountAsync(bankAccountId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(viewTransactions, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Transactions for a Card GET /v2.01/{ClientId}/cards/{CardId}/transactions This call returns all the transactions of a given card. ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. **Allowed values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. You can filter on multiple values by separating them with a comma. **Allowed values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred. You can filter on multiple values by separating them with a comma. ### Path parameters The unique identifier of the Card object, obtained during the card registration process. ### Responses The list of transactions created by the platform. The transaction created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. ```json 200 [ { "Id":"145498191", "Tag":"Custom meta", "CreationDate":1657175185, "AuthorId":"145494935", "CreditedUserId":"145397183", "DebitedFunds":{ "Currency":"EUR", "Amount":1200 }, "CreditedFunds":{ "Currency":"EUR", "Amount":1100 }, "Fees":{ "Currency":"EUR", "Amount":10 }, "Status":"SUCCEEDED", "ResultCode":"000000", "ResultMessage":"Success", "ExecutionDate":1661859994, "Type":"PAYIN", "Nature":"REGULAR", "CreditedWalletId":"145397873", "DebitedWalletId":null } ] ``` ```json REST // GET has no body parameters ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $cardId = '156285393'; $response = $api->Cards->GetTransactions($cardId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myCard = { Id: '169687329', } const listTransactionsCard = async (cardId) => { return await mangopay.Cards.getTransactions(cardId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listTransactionsCard(myCard.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listCardTransactions(cardId) begin response = MangoPay::Card.transactions(cardId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch transactions for the Card: #{error.message}" puts "Error details: #{error.details}" return false end end myCard = { Id: '194579926' } listCardTransactions(myCard[:Id]) ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Card card = Card.get('213944219') transactions = Card.get_transactions(self = card) print('=== Transactions for Card {} ==='.format(card.id)) for transaction in transactions: print() pprint(transaction._data) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var cardId = "card_m_01HT2C9KB8A6NZCN2X4PRMHHRX"; var viewTransactions = await api.Cards.GetTransactionsForCardAsync(cardId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(viewTransactions, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Transactions for a Card Fingerprint GET /v2.01/{ClientId}/cards/fingerprints/{Fingerprint}/transactions This call returns all the transactions made with cards with the same `Fingerprint` value. **Note – Web card pay-ins not returned** This endpoint doesn't return transactions processed via the web card pay-in endpoint. ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. ### Path parameters The unique representation of the card number. This string can be used to track the card behavior while keeping the card information confidential. ### Responses The list of transactions created by the platform. The transaction created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. ```json 200 [ { "Id":"148786887", "Tag":"Custom description for this specific PayIn", "CreationDate":1660119203, "AuthorId":"142036728", "CreditedUserId":"145397183", "DebitedFunds":{ "Currency":"EUR", "Amount":12000 }, "CreditedFunds":{ "Currency":"EUR", "Amount":12000 }, "Fees":{ "Currency":"EUR", "Amount":0 }, "Status":"FAILED", "ResultCode":"009199", "ResultMessage":"PSP technical error", "ExecutionDate":null, "Type":"PAYIN", "Nature":"REGULAR", "CreditedWalletId":"145397873", "DebitedWalletId":null } ] ``` ```json REST // GET has no body parameters ``` # List Transactions for a Client Wallet GET /v2.01/{ClientId}/clients/wallets/{FundsType}/{Currency}/transactions This call returns all the transactions targeting or emitted from a Client Wallet, for example: * Fees payouts made from the Fees Wallet (`FEES_CCY`) * Repudiations and settlements made from or to the Repudiation Wallet (`CREDIT_CCY`) * Conversions between Client Wallets ### Path parameters **Allowed values:** `FEES`, `CREDIT` The type of funds in the Client Wallet: * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallet. ### Responses The list of transactions created by the platform. The transaction created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. ```json 200 [ { "Id": "po_m_01HY343CF0KFEPKFJ0QZ4HZ2VK", "Tag": "Custom data", "CreationDate": 1715944403, "AuthorId": "ExampleClientId", "CreditedUserId": null, "DebitedFunds": { "Currency": "EUR", "Amount": 7836 }, "CreditedFunds": { "Currency": "EUR", "Amount": 7836 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1715944624, "Type": "PAYOUT", "Nature": "REGULAR", "CreditedWalletId": null, "DebitedWalletId": "FEES_EUR", "DepositId": null }, { "Id": "cvr_01J2BS3XE0JE9F05MM5B6VCT15", "Tag": "Custom data", "CreationDate": 1720529843, "AuthorId": "ExampleClientId", "CreditedUserId": "ExampleClientId", "DebitedFunds": { "Currency": "EUR", "Amount": 2617 }, "CreditedFunds": { "Currency": "USD", "Amount": 2830 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1720529845, "Type": "CONVERSION", "Nature": "REGULAR", "CreditedWalletId": "FEES_USD", "DebitedWalletId": "FEES_EUR", "DepositId": null } ] ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myWallet = { FundsType: 'FEES', Currency: 'EUR', } const listTransactionsClientWallet = async (fundsType, currency) => { return await mangopay.Clients.getClientWalletTransactions(fundsType, currency) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listTransactionsClientWallet(myWallet.FundsType, myWallet.Currency) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listClientWalletTransactions(fundsType, currency) begin response = MangoPay::Client.fetch_wallet_transactions(fundsType, currency) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch wallet transactions: #{error.message}" puts "Error details: #{error.details}" return false end end myClientWallet = { FundsType: 'FEES', Currency: 'EUR' } listClientWalletTransactions(myClientWallet[:FundsType], myClientWallet[:Currency]) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.Pagination; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.FundsType; import com.mangopay.entities.Wallet; public class ListClientWalletTransactions { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); List clientTransactions = mangopay.getClientApi().getWalletTransactions(FundsType.CREDIT, CurrencyIso.EUR, new Pagination(1, 100), null, null); for (Transaction clientTransaction : clientTransactions) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(updateUbo); System.out.println(clientTransaction); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import ClientWallet, Transaction client_wallet = ClientWallet.get(funds_type = 'FEES', currency = 'GBP') transactions = Transaction.all(user_id = mangopay.client_id, wallet_id = client_wallet.id) for transaction in transactions: pprint(vars(transaction)) ``` # List Transactions for a Deposit Preauthorization GET /v2.01/{ClientId}/deposit-preauthorizations/{DepositId}/transactions This call returns all preauthorized pay-ins, both captures and complements, made against a given 30-day preauthorization, whether they were successful or not. ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. ### Path parameters The unique identifier of the deposit preauthorization. ### Responses The list of transactions created by the platform. The transaction created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. ```json 200 [ { "Id": "1d703749-8b07-4d82-8473-528e9b0322cc", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1721742582, "AuthorId": "user_m_01J18HZSACR1EMYNY1TBS8KTJD", "CreditedUserId": "user_m_01J18HZSACR1EMYNY1TBS8KTJD", "DebitedFunds": { "Currency": "EUR", "Amount": 20000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 19000 }, "Fees": { "Currency": "EUR", "Amount": 1000 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1721742583, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01J18J1SQGG6KXNM3F8GD674TP", "DebitedWalletId": null, "DepositId": "deposit_m_01J3FXN0PAAYJCYMWMM8DRGY5A" }, { "Id": "05cb5843-1207-4382-aa04-25b5dc994847", "Tag": "Created using the Mangopay API Collection postman", "CreationDate": 1721742590, "AuthorId": "user_m_01J18HZSACR1EMYNY1TBS8KTJD", "CreditedUserId": "user_m_01J18HZSACR1EMYNY1TBS8KTJD", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 9000 }, "Fees": { "Currency": "EUR", "Amount": 1000 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1721742591, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01J18J1SQGG6KXNM3F8GD674TP", "DebitedWalletId": null, "DepositId": "deposit_m_01J3FXN0PAAYJCYMWMM8DRGY5A" } ] ``` ```json REST // GET has no body parameters ``` # List Transactions for a Dispute GET /v2.01/{ClientId}/disputes/{DisputeId}/transactions This call returns the transactions following the creation of a given dispute, in other words, the repudiation transfer, and the settlement (if any). ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. **Allowed values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. You can filter on multiple values by separating them with a comma. **Allowed values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred. You can filter on multiple values by separating them with a comma. ### Path parameters The unique identifier of the dispute. ### Responses The list of transactions created by the platform. The transaction created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. ```json 200 Dispute WON [ { "Id": "repud_m_01HYZCXBG91VY24FYXXSBT2C31", "Tag": null, "CreationDate": 1716893167, "AuthorId": "user_m_01HYZC2PNRVW5NDTNG6KHXE31Z", "CreditedUserId": null, "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 10000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1716893167, "Type": "PAYOUT", "Nature": "REPUDIATION", "CreditedWalletId": null, "DebitedWalletId": "CREDIT_EUR", "DepositId": null }, { "Id": "refund_m_01HYZD0XV5NDG5196BNG1NZRFV", "Tag": null, "CreationDate": 1716893284, "AuthorId": "user_m_01HYZC2PNRVW5NDTNG6KHXE31Z", "CreditedUserId": "150427320", "DebitedFunds": { "Currency": "EUR", "Amount": 10000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 10000 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1716893284, "Type": "PAYIN", "Nature": "REFUND", "CreditedWalletId": "CREDIT_EUR", "DebitedWalletId": null, "DepositId": null } ] ``` ```json 200 Dispute LOST [ { "Id": "repud_m_01HXXVF35PTKA1YPHS11XD9PJB", "Tag": null, "CreationDate": 1715767577, "AuthorId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T", "CreditedUserId": null, "DebitedFunds": { "Currency": "EUR", "Amount": 25638 }, "CreditedFunds": { "Currency": "EUR", "Amount": 25638 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1715767577, "Type": "PAYOUT", "Nature": "REPUDIATION", "CreditedWalletId": null, "DebitedWalletId": "CREDIT_EUR", "DepositId": null }, { "Id": "repudstl_m_01HY2TWX9ZE32AHQX9QARKA5NM", "Tag": null, "CreationDate": 1715934754, "AuthorId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T", "CreditedUserId": null, "DebitedFunds": { "Currency": "EUR", "Amount": 25638 }, "CreditedFunds": { "Currency": "EUR", "Amount": 25638 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1715934754, "Type": "TRANSFER", "Nature": "SETTLEMENT", "CreditedWalletId": "CREDIT_EUR", "DebitedWalletId": "wlt_m_01HV3Y0FPWFWCX86AD437SN11B", "DepositId": null } ] ``` ```json REST // GET has no body parameters ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $disputeId = '159763014'; $response = $api->Disputes->GetTransactions($disputeId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myDispute = { Id: '159763014', } const listTransactionsForDisputes = async (disputeId) => { return await mangopay.Disputes.getTransactions(disputeId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listTransactionsForDisputes(myDispute.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listTransactionsDispute(disputeId) begin response = MangoPay::Dispute.transactions(disputeId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Transactions: #{error.message}" puts "Error details: #{error.details}" return false end end myDispute = { Id: '194413022' } listTransactionsDispute(myDispute[:Id]) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var disputeId = "dispute_m_01HQT8ZRCWP0HBT8QGRFMBA97B"; var viewTransactions = await api.Disputes.GetTransactionsAsync(disputeId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(viewTransactions, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Transactions for a Mandate GET /v2.01/{ClientId}/mandates/{MandateId}/transactions This call returns direct-debit pay-ins made against a given mandate. ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. **Allowed values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. You can filter on multiple values by separating them with a comma. **Allowed values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred. You can filter on multiple values by separating them with a comma. ### Path parameters The unique identifier of the mandate. ### Responses The list of transactions created by the platform. The transaction created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. ```json 200 [ { "Id": "payin_m_01J0KQ8GCM7SQ9HXQ5N94BDEMK", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1718648848, "AuthorId": "user_m_01HSB23417BFG7YXR7E371JSEA", "CreditedUserId": "user_m_01HSB23417BFG7YXR7E371JSEA", "DebitedFunds": { "Currency": "GBP", "Amount": 2671 }, "CreditedFunds": { "Currency": "GBP", "Amount": 2359 }, "Fees": { "Currency": "GBP", "Amount": 312 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1719219718, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01HSJTVB0JKMMHXBEJBV6TMF96", "DebitedWalletId": null, "DepositId": null } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $mandateId = '194338515'; $response = $api->Mandates->GetTransactions($mandateId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myMandate = { Id: '169726351', } const listMandateTransactions = async (mandateId) => { return await mangopay.Mandates.getTransactions(mandateId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listMandateTransactions(myMandate.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listMandateTransactions(mandateId) begin response = MangoPay::Mandate.transactions(mandateId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to list transactions for mandate: #{error.message}" puts "Error details: #{error.details}" return false end end myMandate = { Id:'194338515' } listMandateTransactions(myMandate[:Id]) ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Mandate mandate = Mandate.get('214224837') transactions = Mandate.get_transactions(self = mandate) print('=== Transactions for Mandate {} ==='.format(mandate.id)) for transaction in transactions: print() pprint(transaction._data) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var mandateId = "mdt_m_01HT2GPPV15HACN8CGV3SCNQQV"; var viewTransactions = await api.Mandates.GetTransactionsForMandateAsync(mandateId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(viewTransactions, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Transactions for a Preauthorization GET /v2.01/{ClientId}/preauthorizations/{PreauthorizationId}/transactions This call returns all preauthorized pay-ins made against a given preauthorization, whether they were successful or not. ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. **Allowed values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. You can filter on multiple values by separating them with a comma. **Allowed values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred. You can filter on multiple values by separating them with a comma. ### Path parameters The unique identifier of the preauthorization. ### Responses The list of transactions created by the platform. The transaction created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. ```json 200 [ { "Id": "payin_m_01HYP75VGJDCNSBRXKP8FQ1098", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1716585164, "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "CreditedUserId": "204068024", "DebitedFunds": { "Currency": "EUR", "Amount": 6315 }, "CreditedFunds": { "Currency": "EUR", "Amount": 5683 }, "Fees": { "Currency": "EUR", "Amount": 632 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1716585165, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "204089031", "DebitedWalletId": null, "DepositId": null } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $preauthorizationId = '192823192'; $response = $api->CardPreAuthorizations->GetTransactions($preauthorizationId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPreauthorization = { Id: '192823192', } const listTransactionsPreauthorization = async (preauthorizationId) => { return await mangopay.CardPreAuthorizations.getTransactions(preauthorizationId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listTransactionsPreauthorization(myPreauthorization.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listTransactionsPreauthorization(preauthorizationId) begin response = MangoPay::PreAuthorization.transactions(preauthorizationId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Transactions: #{error.message}" puts "Error details: #{error.details}" return false end end myPreauthorization = { Id: '192823192' } listTransactionsPreauthorization(myPreauthorization[:Id]) ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PreAuthorization preauth = PreAuthorization.get('preauth_m_01HPHN0G8236VVKDSF9SX87HE6') transactions = PreAuthorization.get_transactions(self = preauth) print('=== Transactions for PreAuthorization {} ==='.format(preauth.id)) for transaction in transactions: print() pprint(transaction._data) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var preauthorizationId = "preauth_m_01J30NHM7E0TQ9W5NRQ964W7WF"; var viewTransactions = await api.CardPreAuthorizations.GetTransactionsAsync(preauthorizationId, new Pagination(1, 100)); string prettyPrint = JsonConvert.SerializeObject(viewTransactions, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Transactions for a User GET /v2.01/{ClientId}/users/{UserId}/transactions This call returns all the transactions with the same `AuthorId`. ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. **Allowed values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. You can filter on multiple values by separating them with a comma. **Allowed values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred. You can filter on multiple values by separating them with a comma. ### Path parameters The unique identifier of the user. ### Responses The list of transactions created by the platform. The transaction created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. ```json 200 [ { "Id": "payin_m_01HSJVEP9KCCQK6FKC7973B3TZ", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1711103498, "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "CreditedUserId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "DebitedFunds": { "Currency": "EUR", "Amount": 6732 }, "CreditedFunds": { "Currency": "EUR", "Amount": 6732 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1711103498, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01HSDQGSRYK3CXPA5RBJ08R2XJ", "DebitedWalletId": null, "DepositId": null } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $response = $api->Users->GetTransactions($userId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '146476890', } const listUserTransactions = async (userId) => { return await mangopay.Users.getTransactions(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listUserTransactions(user.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listTransactionsUser(userId) begin response = MangoPay::User.transactions(userId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Transactions: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '146476890' } listTransactionsUser(myUser[:Id]) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var viewTransactions = await api.Users.GetTransactionsAsync(userId, new Pagination(1, 100), new FilterTransactions(), new Sort()); string prettyPrint = JsonConvert.SerializeObject(viewTransactions, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Transactions for a Wallet GET /v2.01/{ClientId}/wallets/{WalletId}/transactions This call returns all the transactions (pay-in, transfers, and payouts) of a given wallet. ### Query parameters **Allowed values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. You can filter on multiple values by separating them with a comma. The code indicating the result of the operation. You can filter on multiple values by separating them with a comma. The date before which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. The date after which the transaction was created (based on the transaction’s `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. **Allowed values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. You can filter on multiple values by separating them with a comma. **Allowed values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred. You can filter on multiple values by separating them with a comma. ### Path parameters The unique identifier of the wallet. ### Responses The list of transactions created by the platform. The transaction created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds (the sell currency). An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. The type of transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. ```json 200 [ { "Id": "xfer_m_01J8F1J0KBFTRP5CMYMFFTG4W4", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1727081808, "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "CreditedUserId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "DebitedFunds": { "Currency": "EUR", "Amount": 500 }, "CreditedFunds": { "Currency": "EUR", "Amount": 490 }, "Fees": { "Currency": "EUR", "Amount": 10 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1727081809, "Type": "TRANSFER", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01HT03YR6YRBT1EGK1FYDDBZM9", "DebitedWalletId": "wlt_m_01HW8AS48VH6MRXVT44RKK5RW1", "DepositId": null }, { "Id": "refund_m_01J8F1JZ6XCEFCZ71W34N9DWRR", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1727081839, "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "CreditedUserId": null, "DebitedFunds": { "Currency": "EUR", "Amount": 490 }, "CreditedFunds": { "Currency": "EUR", "Amount": 500 }, "Fees": { "Currency": "EUR", "Amount": -10 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1727081840, "Type": "TRANSFER", "Nature": "REFUND", "CreditedWalletId": "wlt_m_01HW8AS48VH6MRXVT44RKK5RW1", "DebitedWalletId": "wlt_m_01HT03YR6YRBT1EGK1FYDDBZM9", "DepositId": null } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $walletId = '148968396'; $response = $api->Wallets->GetTransactions($walletId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myWallet = { Id: '168935920', } const listWalletTransactions = async (walletId) => { return await mangopay.Wallets.getTransactions(walletId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listWalletTransactions(myWallet.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listWalletTransactions(walletId) begin response = MangoPay::Wallet.transactions(walletId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch wallet transactions: #{error.message}" puts "Error details: #{error.details}" return false end end myWallet = { Id: '148968396' } listWalletTransactions(myWallet[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.entities.Wallet; public class ListWalletTransactions { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var walletId = "wlt_m_01HQT6422EER2N7FPRXWTSDCSV"; List transactions = mangopay.getWalletApi().getTransactions(walletId); for (Transaction transaction : transactions) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(transaction); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Wallet, Transaction natural_user = NaturalUser.get('213753890') user_wallet = Wallet.get('213754077') transactions = Transaction.all(user_id = natural_user.id, wallet_id = user_wallet.id) print('=== Transactions for Wallet {} ==='.format(user_wallet.id)) for transaction in transactions: print() pprint(transaction._data) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var viewTransactions = await api.Wallets.GetTransactionsAsync(walletId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(viewTransactions, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Transaction object ### Description A Transaction represents any kind of money movement to and/or from a wallet (pay-ins, payouts, transfers) in the Mangopay ecosystem. **Note – Transaction data retained for 13 months** The API retains all transaction objects for 13 months from `CreationDate`. This applies to lists of transactions as well as An API call to retrieve an individual pay-in, transfer, conversion, or payout by its `Id`. For more information, see the Data availability periods article. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. # Create a Transfer POST /v2.01/{ClientId}/transfers ### Body parameters The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. The unique identifier of the credited wallet. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. The unique identifier of the debited wallet. *Max. length: 255 characters* Custom data that you can add to this object. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the debited wallet. The unique identifier of the credited wallet. ```json { "Message": "Error: multi-currency usage is not authorized", "Type": "currency_incompatibility", "Id": "0c23333c-a0ef-468a-8d33-7bd7ced6e7d4#1661495038", "Date": 1661495039.0, "errors": { "currency": "The Debited Wallet's currency EUR and the Credited Wallet's currency GBP must be the same" } } ``` ```json 200 { "Id": "147418844", "Tag": "custom meta", "CreationDate": 1658928911, "AuthorId": "145397183", "CreditedUserId": "142036728", "DebitedFunds": { "Currency": "EUR", "Amount": 1600 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1582 }, "Fees": { "Currency": "EUR", "Amount": 18 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1658928911, "Type": "TRANSFER", "Nature": "REGULAR", "DebitedWalletId": "145397873", "CreditedWalletId": "145389978" } ``` ```json REST { "Tag": "custom meta", "AuthorId": "145397183", "CreditedUserId": "142036728", "DebitedFunds": { "Currency": "EUR", "Amount": 1600 }, "Fees": { "Currency": "EUR", "Amount": 18 }, "DebitedWalletId": "145397873", "CreditedWalletId": "145389978" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $transfer = new \MangoPay\Transfer(); $transfer->AuthorId = '146476890'; $transfer->CreditedUserId = '174796429 '; $transfer->Tag = 'Created using Mangopay PHP SDK'; $transfer->DebitedFunds = new \MangoPay\Money(); $transfer->DebitedFunds->Currency = "EUR"; $transfer->DebitedFunds->Amount = 1000; $transfer->Fees = new \MangoPay\Money(); $transfer->Fees->Currency = "EUR"; $transfer->Fees->Amount = 0; $transfer->CreditedWalletId = '174796439'; $transfer->DebitedWalletId = '148968396'; $response = $api->Transfers->Create($transfer); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: '146476890', WalletId: '148968396', } let myCreditedUser = { Id: '174796429 ', WalletId: '174796439', } let myTransfer = { AuthorId: myUser.Id, Tag: 'Created using Mangopay NodeJS SDK', CreditedUserId: myCreditedUser.Id, DebitedFunds: { Currency: 'EUR', Amount: 12, }, Fees: { Currency: 'EUR', Amount: 0, }, DebitedWalletId: myUser.WalletId, CreditedWalletId: myCreditedUser.WalletId, } const createTransfer = async (transfer) => { return await mangopay.Transfers.create(transfer) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createTransfer(myTransfer) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createTransfer(transferObject) begin response = MangoPay::Transfer.create(transferObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create transfer: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '146476890', WalletId: '148968396' } myCreditedUser = { Id: '174796429 ', WalletId: '174796439' } myTransfer = { AuthorId: myUser[:Id], Tag: 'Created using Mangopay NodeJS SDK', CreditedUserId: myCreditedUser[:Id], DebitedFunds: { Currency: 'EUR', Amount: 12 }, Fees: { Currency: 'EUR', Amount: 0 }, DebitedWalletId: myUser[:WalletId], CreditedWalletId: myCreditedUser[:WalletId] } createTransfer(myTransfer) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.Transfer; public class CreateTransfer { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var debitedUserId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR"; var debitedrWalletId = "wlt_m_01HQT6422EER2N7FPRXWTSDCSV"; var creditedUserId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var creditedWalletId = "wlt_m_01HTF5S9MG0XXBZ8A0550MED3Z"; Transfer transfer = new Transfer(); transfer.setAuthorId(debitedUserId); transfer.setDebitedWalletId(debitedrWalletId); transfer.setCreditedUserId(creditedUserId); transfer.setCreditedWalletId(creditedWalletId); transfer.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); transfer.setFees(new Money(CurrencyIso.EUR, 0)); transfer.setTag("Created using the Mangopay Java SDK"); Transfer createTransfer = mangopay.getTransferApi().create(transfer); Gson pprint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = pprint.toJson(createTransfer); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Wallet, Transfer from mangopay.utils import Money credited_natural_user = NaturalUser.get('213753890') credited_natural_user_wallet = Wallet.get('213754077') debited_natural_user = NaturalUser.get('210513027') debited_natural_user_wallet = Wallet.get('210514820') transfer = Transfer( author = debited_natural_user, credited_user = credited_natural_user, debited_funds = Money(amount=1000, currency='EUR'), fees = Money(amount=0, currency='EUR'), debited_wallet=debited_natural_user_wallet, credited_wallet=credited_natural_user_wallet ) create_transfer = transfer.save() pprint(create_transfer) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var debitedWalletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var creditedWalletId = "wlt_m_01J3D02K6ETV3BDP88C7PD2NDB"; var transfer = new TransferPostDTO(userId, userId, new Money { Amount = 1000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, debitedWalletId, creditedWalletId ) { Tag = "Created using the Mangopay .NET SDK" }; var createTransfer = await api.Transfers.CreateAsync(transfer); string prettyPrint = JsonConvert.SerializeObject(createTransfer, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Transfer object ### Description A transfer is a request to relocate funds from one wallet to another. **Note – Multi-currency transfers not allowed** Transfers can only be made between wallets using the same currency. To convert funds between wallets of different currencies, see Conversions. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the debited wallet. The unique identifier of the credited wallet. # View a Transfer GET /v2.01/{ClientId}/transfers/{TransferId} **Note – Transfer data retained for 13 months** An API call to retrieve a transfer whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the transfer. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the debited wallet. The unique identifier of the credited wallet. ```json 200 { "Id": "147418644", "Tag": "custom meta", "CreationDate": 1658928843, "AuthorId": "142036728", "CreditedUserId": "145397183", "DebitedFunds": { "Currency": "EUR", "Amount": 1200 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1188 }, "Fees": { "Currency": "EUR", "Amount": 12 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1658928843, "Type": "TRANSFER", "Nature": "REGULAR", "DebitedWalletId": "145389978", "CreditedWalletId": "145397873" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $transferId = '155585643'; $response = $api->Transfers->Get($transferId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myTransfer = { Id: '174877749', } const viewTransfer = async (transferId) => { return await mangopay.Transfers.get(transferId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewTransfer(myTransfer.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewTransfer(transferId) begin response = MangoPay::Transfer.fetch(transferId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch transfer: #{error.message}" puts "Error details: #{error.details}" return false end end myTransfer = { Id: '194342401' } viewTransfer(myTransfer[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Transfer; public class ViewTransfer { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-client-password"); Transfer transfer = mangopay.getTransferApi().get("xfer_m_01HTF8FNN1E4N332ZBVEVHRMD2"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(transfer); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Transfer try: view_transfer = Transfer.get('214568995') pprint(vars(view_transfer)) except Transfer.DoesNotExist: print('Transfer {} does not exist'.format(view_transfer.id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var transferId = "xfer_m_01J3ZG49W215VVZRJS394DKM00"; var viewTransfer = await api.Transfers.GetAsync(transferId); string prettyPrint = JsonConvert.SerializeObject(viewTransfer, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a TWINT PayIn POST /v2.01/{ClientId}/payins/payment-methods/twint **Note – Session timeout** The TWINT session times out after: * 15 minutes for the hosted webpage * 3 minutes once the user scans the QR code **Note – Minimum amount 0.01 CHF** On TWINT pay-ins, the minimum amount is 0.01 CHF (`DebitedFunds.Amount` value `1`). ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Allowed values:** `CHF` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Allowed values:** `CHF` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** `CHF` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** `CHF` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** `CHF` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `TWINT` The type of pay-in. **Returned values:** `WEB` The execution type of the mandate. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ```json 200 - Created { "Id": "wt_c84feed5-6a5e-4a58-b1f5-3433aac9a699", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1729065886, "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "DebitedFunds": { "Currency": "CHF", "Amount": 1267 }, "CreditedFunds": { "Currency": "CHF", "Amount": 895 }, "Fees": { "Currency": "CHF", "Amount": 372 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01JAA5Q2ZY72H0PNWPK1Z3DX74", "CreditedUserId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "PaymentType": "TWINT", "ExecutionType": "WEB", "ReturnURL": "http://docs.mangopay.com/please-ignore?transactionId=wt_c84feed5-6a5e-4a58-b1f5-3433aac9a699", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=140301405018&rs=Ff5U3DihmCenOh5x3pS1HYmeITxf7dtz&cs=cd782c761b30125b86bc9727b5fb32a988248ae0eafbcae62ab9cec05a27c2f1", "StatementDescriptor": "Example123" } ``` ```json REST { "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "CreditedWalletId": "wlt_m_01JAA5Q2ZY72H0PNWPK1Z3DX74", "DebitedFunds": { "Currency": "CHF", "Amount": 1267 }, "Fees": { "Currency": "CHF", "Amount": 372 }, "ReturnURL": "http://docs.mangopay.com/please-ignore", "Tag": "Created using the Mangopay API Postman collection", "StatementDescriptor": "Example123" } ``` # The TWINT PayIn object ### Description The TWINT PayIn object allows platforms to process payments with TWINT, where the user uses a QR or numerical code to validate the payment on their mobile app. Learn more **→** ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** `CHF` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** `CHF` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). During a conversion, (`DebitedFunds.Amount` - `Fees`) \* `MarketRate` = `CreditedFunds.Amount`.  Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** `CHF` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `TWINT` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ### Related resources Learn more about TWINT Learn about testing TWINT # View a PayIn (TWINT) GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. Information about the debited funds. **Returned values:** `CHF` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** `CHF` The currency of the funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees. **Returned values:** `CHF` The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. **Returned values:** `TWINT` The type of pay-in. **Returned values:** `WEB` The execution type of the mandate. *Max. length: 255 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. ```json 200 - Succeeded { "Id": "wt_c84feed5-6a5e-4a58-b1f5-3433aac9a699", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1729065886, "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "DebitedFunds": { "Currency": "CHF", "Amount": 1267 }, "CreditedFunds": { "Currency": "CHF", "Amount": 895 }, "Fees": { "Currency": "CHF", "Amount": 372 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1729065905, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "wlt_m_01JAA5Q2ZY72H0PNWPK1Z3DX74", "CreditedUserId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY", "PaymentType": "TWINT", "ExecutionType": "WEB", "ReturnURL": "http://docs.mangopay.com/please-ignore?transactionId=wt_c84feed5-6a5e-4a58-b1f5-3433aac9a699", "RedirectURL": "https://r3.girogate.de/ti/dumbdummy?tx=140301405018&rs=Ff5U3DihmCenOh5x3pS1HYmeITxf7dtz&cs=cd782c761b30125b86bc9727b5fb32a988248ae0eafbcae62ab9cec05a27c2f1", "StatementDescriptor": "Example123" } ``` ```json REST // GET has no body parameters ``` # Create a UBO POST /v2.01/{ClientId}/users/{UserId}/kyc/ubodeclarations/{UboDeclarationId}/ubos [Read more about the UBO object →](/api-reference/ubo-declarations/ubo-object) ### Path parameters The unique identifier of the user. The unique identifier of the UBO Declaration. ### Body parameters *Max. length: 100 characters* The last name of the beneficial owner. *Max. length: 100 characters* The first name of the beneficial owner. The date of birth of the beneficial owner. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. **Allowed values:** Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats)). The nationality of the beneficial owner. The postal address of the beneficial owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. Information about the beneficial owner's place of birth. The city in which the beneficial owner was born. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the beneficial owner was born. ### Responses The unique identifier of the object. The date and time at which the object was created. *Max. length: 100 characters* The last name of the beneficial owner. *Max. length: 100 characters* The first name of the beneficial owner. The date of birth of the beneficial owner. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. The nationality of the beneficial owner. The postal address of the beneficial owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the beneficial owner's place of birth. The city in which the beneficial owner was born. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the beneficial owner was born. Whether or not the UBO is considered in the declaration. To disregard a UBO, this parameter must be set to `false`. This action is irreversible. ```json { "Message": "You can not create more than 15 UBO for a declaration", "Type": "invalid_action", "Id": "f5c1f9c7-bafa-4fe9-b5b1-2b005d0e6f8a", "Date": 1698759679.0, "errors": null } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "2951739b-416e-43a4-a40b-8e8d6ba52719", "Date": 1717664987.0, "errors": { "Region": "The Region is a required field for this Country" } } ``` ```json 200 { "Id": "158947898", "CreationDate": 1672153693, "LastName": "Wiza", "FirstName": "Jess", "Birthday": 652117514, "Nationality": "FR", "Address": { "AddressLine1": "669 Ratke Forge", "AddressLine2": "Schamberger Walk", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Birthplace": { "City": "Paris", "Country": "FR" }, "IsActive": true } ``` ```json REST { "LastName": "Wiza", "FirstName": "Jess", "Birthday": 652117514, "Nationality": "FR", "Address": { "AddressLine1": "669 Ratke Forge", "AddressLine2": "Schamberger Walk", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Birthplace": { "City": "Paris", "Country": "FR" } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '198557165'; $uboDeclarationId = '198692872'; $ubo = new \MangoPay\Ubo(); $address = new \MangoPay\Address(); $address->AddressLine1 = 'Address line 1'; $address->AddressLine2 = 'Address line 2'; $address->City = 'Paris'; $address->Country = 'FR'; $address->PostalCode = '75000'; $address->Region = 'Region'; $ubo->Address = $address; $ubo->FirstName = 'John'; $ubo->LastName = 'Doe'; $ubo->Nationality = 'FR'; $ubo->Birthday = mktime(0, 0, 0, 12, 21, 1975); $Birthplace = new \MangoPay\Birthplace(); $Birthplace->City = 'Paris'; $Birthplace->Country = 'FR'; $ubo->Birthplace = $Birthplace; $response = $api->UboDeclarations->CreateUbo($userId, $uboDeclarationId, $ubo); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: '170853400', } let myUboDeclaration = { Id: '180932134', } let myUbo = { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: '669 Ratke Forge', AddressLine2: 'Schamberger Walk', City: 'Paris', Region: 'Ile-de-France', PostalCode: '75001', Country: 'FR', }, Nationality: 'FR', Birthday: 652117514, Birthplace: { City: 'Paris', Country: 'FR', }, } const createUbo = async (userId, uboDeclarationId, ubo) => { return await mangopay.UboDeclarations.createUbo(userId, uboDeclarationId, ubo) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createUbo(myUser.Id, myUboDeclaration.Id, myUbo) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createUbo(legalUserId, uboDeclarationId, uboObject) begin response = MangoPay::Ubo.create(legalUserId, uboDeclarationId, uboObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create UBO: #{error.message}" puts "Error details: #{error.details}" return false end end myLegalUser = { Id: '194338122' } myUboDeclaration = { Id: '194511216' } myUbo = { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: '669 Ratke Forge', AddressLine2: 'Schamberger Walk', City: 'Paris', Region: 'Ile-de-France', PostalCode: '75001', Country: 'FR' }, Nationality: 'FR', Birthday: 652117514, Birthplace: { City: 'Paris', Country: 'FR' } } createUbo(myLegalUser[:Id], myUboDeclaration[:Id], myUbo) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.core.enumerations.CountryIso; import com.mangopay.entities.Birthplace; import com.mangopay.entities.Ubo; import com.mangopay.entities.UboDeclaration; import com.mangopay.entities.UserLegal; import java.lang.reflect.Field; public class CreateUBO { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); UserLegal myUser = mangopay.getUserApi().getLegal("user_m_01HQK53VP687RBSH2Q5TJZRR3S"); UboDeclaration myUboDeclaration = mangopay.getUboDeclarationApi().get("ubo_m_01HRYRPZDB3KXF0QZ6QZ5C95A8"); Ubo myUbo = new Ubo(); Address address = new Address(); Birthplace birthplace = new Birthplace(); address.setAddressLine1(myUser.getHeadquartersAddress().getAddressLine1()); address.setAddressLine2(myUser.getHeadquartersAddress().getAddressLine2()); address.setCity(myUser.getHeadquartersAddress().getCity()); address.setCountry(myUser.getHeadquartersAddress().getCountry()); address.setRegion(myUser.getHeadquartersAddress().getRegion()); address.setPostalCode(myUser.getHeadquartersAddress().getPostalCode()); birthplace.setCity("Paris"); birthplace.setCountry(CountryIso.FR); myUbo.setFirstName(myUser.getLegalRepresentativeFirstName()); myUbo.setLastName(myUser.getLegalRepresentativeLastName()); myUbo.setAddress(address); myUbo.setNationality(CountryIso.FR); myUbo.setBirthday(336879600); myUbo.setBirthplace(birthplace); myUbo.setActive(true); myUbo.setTag("Created using the Mangopay Java SDK"); Ubo createMyUbo = mangopay.getUboDeclarationApi().createUbo(myUser.getId(), myUboDeclaration.getId(), myUbo); System.out.println(String.format("id: %s", createMyUbo.getId())); printObjectFields(createMyUbo); } private static void printObjectFields(Object obj) { Class objClass = obj.getClass(); Field[] fields = objClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object value = field.get(obj); if (value instanceof Address || value instanceof Birthplace) { System.out.println(field.getName() + ": "); printObjectFields(value); } else { System.out.println(field.getName() + ": " + value); } } catch (IllegalAccessException e) { e.printStackTrace(); } } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Ubo, UboDeclaration, LegalUser from mangopay.utils import Address, Birthplace legal_user = LegalUser( id = '210760575' ) user_ubo_declaration = UboDeclaration( id = '210863422' ) user_ubo = Ubo( first_name = “Ellie”, last_name = “Adams”, address = Address( address_line_1 = ’23 Brook Road’, city = 'London', postal_code = 'NE1 0AA', country = 'GB', ), nationality = 'GB', birthday = 336672000, birthplace = Birthplace( city = 'London', country = 'GB' ), user = legal_user, ubo_declaration = user_ubo_declaration, isActive = True ) create_ubo = user_ubo.save() pprint(create_ubo) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01HYJVHY77NDDM97TQP57W87MH"; var uboDeclarationId = "ubo_m_01J2XHAXK7VCMMNX6MVGCGAE60"; var ubo = new UboPostDTO ( "Best", "best", new Address { AddressLine1 = "12032 Wiza Way", City = "Paris", Region = "Ile-de-France", PostalCode = "75001", Country = CountryIso.FR, }, CountryIso.FR, new DateTime(1980, 3, 15), new Birthplace { City = "Paris", Country = CountryIso.FR } ); var createUbo = await api.UboDeclarations.CreateUboAsync(ubo, userId, uboDeclarationId); string prettyPrint = JsonConvert.SerializeObject(createUbo, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a UBO Declaration POST /v2.01/{ClientId}/users/{UserId}/kyc/ubodeclarations [Read more about the UBO Declaration object →](/api-reference/ubo-declarations/ubo-declaration-object) ### Path parameters The unique identifier of the user. ### Responses The unique identifier of the object. The unique identifier of the user. The date and time at which the object was created. The date and time at which the UBO Declaration was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `INCOMPLETE`, `VALIDATED`, `REFUSED` The status of the declaration: * `CREATED` – The UBO Declaration is created, but not submitted yet. * `VALIDATION_ASKED` – The UBO Declaration is submitted for validation. * `INCOMPLETE` – The UBO Declaration is deemed incomplete by Mangopay teams. * `VALIDATED` – The UBO Declaration is validated by Mangopay’s team. * `REFUSED` – The UBO Declaration is rejected by Mangopay’s team. You can learn more about the reasons for refusal in the `Reason` and  `Message` fields. The reason for which the UBO Declaration was `REFUSED` or considered as `INCOMPLETE`. Additional information about why the UBO Declaration was refused or marked as incomplete, provided by Mangopay’s team. The list of UBOs attached to the UBO Declaration. The UBO object created by the platform. The unique identifier of the object. The date and time at which the object was created. *Max. length: 100 characters* The last name of the beneficial owner. The nationality of the beneficial owner. The postal address of the beneficial owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the beneficial owner's place of birth. The city in which the beneficial owner was born. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the beneficial owner was born. Whether or not the UBO is considered in the declaration. To disregard a UBO, this parameter must be set to `false`. This action is irreversible. ```json { "Message": "You can not request validation for a declaration which has no ubo", "Type": "invalid_action", "Id": "96ee403c-1a23-46c9-8b2e-1e56c7e80325#1672326575", "Date": 1672326576.0, "errors": null } ``` ```json { "Message": "You can not create a declaration because you already have a declaration in progress", "Type": "invalid_action", "Id": "5b9c158f-2a55-44c0-b14b-e3cf62a5f2c4#1672326207", "Date": 1672326208.0, "errors": null } ``` ```json { "Message": "Cannot create an UBO for a LegalUser of type SOLETRADER", "Type": "invalid_action", "Id": "f2da32db-43cd-405b-b7c2-d50ab14f41d8#1672326440", "Date": 1672326441.0, "errors": null } ``` ```json 200 { "Id": "158947737", "UserId": "158947634", "CreationDate": 1672153298, "ProcessedDate": null, "Status": "CREATED", "Reason": null, "Message": null, "Ubos": [] } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '199463368'; $response = $api->UboDeclarations->Create($userId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: 'your-user-id' } const createUboDeclaration = async (userId) => { return await mangopay.UboDeclarations.create(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createUboDeclaration(myUser.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createUboDeclaration(legalUserId) begin response = MangoPay::UboDeclaration.create(legalUserId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create UBO Declaration: #{error.message}" puts "Error details: #{error.details}" return false end end myLegalUser = { Id: '194338122' } createUboDeclaration(myLegalUser[:Id]) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.entities.UboDeclaration; import com.mangopay.entities.UserLegal; import java.lang.reflect.Field; public class CreateUBODeclaraction { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); UserLegal myUser = mangopay.getUserApi().getLegal("user_m_01HQK53VP687RBSH2Q5TJZRR3S"); UboDeclaration createUboDeclaration = mangopay.getUboDeclarationApi().create(myUser.getId()); System.out.println(String.format("id: %s", createUboDeclaration.getId())); printObjectFields(createUboDeclaration); } private static void printObjectFields(Object obj) { Class objClass = obj.getClass(); Field[] fields = objClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object value = field.get(obj); System.out.println(field.getName() + ": " + value); } catch (IllegalAccessException e) { e.printStackTrace(); } } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import UboDeclaration, LegalUser legal_user = LegalUser( id = '210760575' ) ubo_declaration = UboDeclaration(user=legal_user) create_ubo_declaration = ubo_declaration.save() pprint(create_ubo_declaration) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2V0P9B1WCX46GEBDWCTXNQ0"; var createUboDeclaration = await api.UboDeclarations.CreateUboDeclarationAsync(userId); string prettyPrint = JsonConvert.SerializeObject(createUboDeclaration, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List UBO Declarations for a User GET /v2.01/{ClientId}/users/{UserId}/kyc/ubodeclarations [Read more about the UBO Declaration object →](/api-reference/ubo-declarations/ubo-declaration-object) ### Query parameters *Start value: 1* **Default value:** 1 Indicates the index of the page for the pagination. *Max. value: 100* **Default value:** 10 Indicates the number of items returned for each page of the pagination. **Allowed values:** `CreationDate:ASC`, `CreationDate:DESC` Indicates the direction in which to sort the list. ### Path parameters The unique identifier of the user. ### Responses The unique identifier of the object. The unique identifier of the user. The date and time at which the object was created. The date and time at which the UBO Declaration was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `INCOMPLETE`, `VALIDATED`, `REFUSED` The status of the declaration: * `CREATED` – The UBO Declaration is created, but not submitted yet. * `VALIDATION_ASKED` – The UBO Declaration is submitted for validation. * `INCOMPLETE` – The UBO Declaration is deemed incomplete by Mangopay teams. * `VALIDATED` – The UBO Declaration is validated by Mangopay’s team. * `REFUSED` – The UBO Declaration is rejected by Mangopay’s team. You can learn more about the reasons for refusal in the `Reason` and  `Message` fields. The reason for which the UBO Declaration was `REFUSED` or considered as `INCOMPLETE`. Additional information about why the UBO Declaration was refused or marked as incomplete, provided by Mangopay’s team. The list of UBOs attached to the UBO Declaration. The UBO object created by the platform. The unique identifier of the object. The date and time at which the object was created. *Max. length: 100 characters* The last name of the beneficial owner. The nationality of the beneficial owner. The postal address of the beneficial owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the beneficial owner's place of birth. The city in which the beneficial owner was born. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the beneficial owner was born. Whether or not the UBO is considered in the declaration. To disregard a UBO, this parameter must be set to `false`. This action is irreversible. ```json 200 [ { "Id": "158947737", "UserId": "158947634", "CreationDate": 1672153298, "ProcessedDate": null, "Status": "CREATED", "Reason": null, "Message": null, "Ubos": [ { "Id": "158947898", "CreationDate": 1672153693, "LastName": "Wiza", "FirstName": "Jess", "Birthday": 652117514, "Nationality": "FR", "Address": { "AddressLine1": "669 Ratke Forge", "AddressLine2": "Schamberger Walk", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Birthplace": { "City": "Paris", "Country": "FR" }, "IsActive": true } ] } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '170853400'; $response = $api->UboDeclarations->GetAll($userId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: '170853400', } const listUboDeclarations = async (userId) => { return await mangopay.UboDeclarations.getAll(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listUboDeclarations(myUser.Id) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.entities.UboDeclaration; import com.mangopay.core.Pagination; import java.lang.reflect.Field; import java.util.List; public class ListUserUboDeclarations { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String userId = "user_m_01HRS7PQEGE4YGCM1AZK1ENTGE"; Pagination pagination = new Pagination(1, 100); List uboDeclaractions = mangopay.getUboDeclarationApi().getAll(userId, pagination, null); var i = 1; for (UboDeclaration uboDeclaraction : uboDeclaractions) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(uboDeclaraction); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import UboDeclaration, LegalUser legal_user = LegalUser( id = '210760575' ) ubo_declarations = UboDeclaration.all(user_id = legal_user.id) for ubo_declaration in ubo_declarations: pprint(vars(ubo_declaration)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2V0P9B1WCX46GEBDWCTXNQ0"; var userUboDeclarations = await api.UboDeclarations.GetUboDeclarationByUserIdAsync(userId, new Pagination(1, 100)); string prettyPrint = JsonConvert.SerializeObject(userUboDeclarations, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Submit a UBO Declaration PUT /v2.01/{ClientId}/users/{UserId}/kyc/ubodeclarations/{UboDeclarationId} [Read more about the UBO Declaration object →](/api-reference/ubo-declarations/ubo-declaration-object) Submitting a UBO Declaration consists in updating the object `Status` parameter value to `VALIDATION_ASKED`. From there, Mangopay Compliance team will validate, indicate as incomplete, or reject the declaration. ### Path parameters The unique identifier of the user. The unique identifier of the UBO Declaration. ### Body parameters **Allowed values:** `VALIDATION_ASKED` The status of the declaration: * `CREATED` – The UBO Declaration is created, but not submitted yet. * `VALIDATION_ASKED` – The UBO Declaration is submitted for validation. * `INCOMPLETE` – The UBO Declaration is deemed incomplete by Mangopay teams. * `VALIDATED` – The UBO Declaration is validated by Mangopay’s team. * `REFUSED` – The UBO Declaration is rejected by Mangopay’s team. You can learn more about the reasons for refusal in the `Reason` and  `Message` fields. ### Responses The unique identifier of the object. The unique identifier of the user. The date and time at which the object was created. The date and time at which the UBO Declaration was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `INCOMPLETE`, `VALIDATED`, `REFUSED` The status of the declaration: * `CREATED` – The UBO Declaration is created, but not submitted yet. * `VALIDATION_ASKED` – The UBO Declaration is submitted for validation. * `INCOMPLETE` – The UBO Declaration is deemed incomplete by Mangopay teams. * `VALIDATED` – The UBO Declaration is validated by Mangopay’s team. * `REFUSED` – The UBO Declaration is rejected by Mangopay’s team. You can learn more about the reasons for refusal in the `Reason` and  `Message` fields. The reason for which the UBO Declaration was `REFUSED` or considered as `INCOMPLETE`. Additional information about why the UBO Declaration was refused or marked as incomplete, provided by Mangopay’s team. The list of UBOs attached to the UBO Declaration. The UBO object created by the platform. The unique identifier of the object. The date and time at which the object was created. *Max. length: 100 characters* The last name of the beneficial owner. The nationality of the beneficial owner. The postal address of the beneficial owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the beneficial owner's place of birth. The city in which the beneficial owner was born. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the beneficial owner was born. Whether or not the UBO is considered in the declaration. To disregard a UBO, this parameter must be set to `false`. This action is irreversible. ```json 200 { "Id": "158947737", "UserId": "158947634", "CreationDate": 1672153298, "ProcessedDate": null, "Status": "VALIDATION_ASKED", "Reason": null, "Message": null, "Ubos": [ { "Id": "158947898", "CreationDate": 1672153693, "LastName": "Wiza", "FirstName": "Jess", "Birthday": 652117514, "Nationality": "FR", "Address": { "AddressLine1": "669 Ratke Forge", "AddressLine2": "Schamberger Walk", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Birthplace": { "City": "Paris", "Country": "FR" }, "IsActive": true } ] } ``` ```json REST { "Status": "VALIDATION_ASKED", } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '199385330'; $uboDeclarationId = '199461371'; $response = $api->UboDeclarations->SubmitForValidation($userId, $uboDeclarationId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-mangopay-client-id', clientApiKey: 'your-mangopay-api-key', }) let myUser = { Id: '170853400', } let myUboDeclaration = { Id: '180932134', Status: 'VALIDATION_ASKED', } const updateUboDeclaration = async (userId, uboDeclaration) => { return await mangopay.UboDeclarations.update(userId, uboDeclaration) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } updateUboDeclaration(myUser.Id, myUboDeclaration) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def submitUboDeclaration(user_id, ubo_declaration_id, params) begin response = MangoPay::UboDeclaration.update(user_id, ubo_declaration_id, params) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create UBO: #{error.message}" puts "Error details: #{error.details}" return false end end my_user = { Id: 'user_m_01J2BGH2PGWC4NNWGADT75ATB6' } my_ubo_declaration = { Id: 'ubo_m_01J29G0RXSSJXG34ZSPHRE955C' } params = { 'Status' => 'VALIDATION_ASKED' } submitUboDeclaration(my_user[:Id], my_ubo_declaration[:Id], params) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.UboDeclaration; import com.mangopay.entities.UserLegal; public class SubmitUBODeclaraction { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); UboDeclaration uboDeclaration = mangopay.getUboDeclarationApi().get("ubo_m_01HRYRPZDB3KXF0QZ6QZ5C95A8"); UserLegal myUser = mangopay.getUserApi().getLegal("user_m_01HQK53VP687RBSH2Q5TJZRR3S"); UboDeclaration submitUboDeclaration = mangopay.getUboDeclarationApi().submitForValidation(myUser.getId(), uboDeclaration.getId()); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(submitUboDeclaration); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import UboDeclaration, LegalUser legal_user = LegalUser( id = '211158266' ) ubo_declaration = UboDeclaration( id = '211651591', user = legal_user, status = 'VALIDATION_ASKED' ) submit_ubo_declaration = ubo_declaration.save() pprint(submit_ubo_declaration) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2V0P9B1WCX46GEBDWCTXNQ0"; var uboDeclarationId = "ubo_m_01J2XHK2DKA52EA6B6AWTF4Y1K"; var uboDeclaration = new UboDeclarationPutDTO(null, UboDeclarationType.VALIDATION_ASKED); var submitUboDeclaration = await api.UboDeclarations.UpdateUboDeclarationAsync(uboDeclaration, userId, uboDeclarationId); string prettyPrint = JsonConvert.SerializeObject(submitUboDeclaration, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The UBO Declaration object export const BeneficialOwner = ({content}) => {content} ; ### Description The UBO Declaration object is a container to provide information regarding the ultimate of a legal entity. It is mandatory for legal users with `LegalPersonType` of `BUSINESS` or `PARTNERSHIP`. See the glossary for details on the criteria defining beneficial owners. ### Attributes The unique identifier of the object. The unique identifier of the user. The date and time at which the object was created. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `INCOMPLETE`, `VALIDATED`, `REFUSED` The status of the declaration: * `CREATED` – The UBO Declaration is created, but not submitted yet. * `VALIDATION_ASKED` – The UBO Declaration is submitted for validation. * `INCOMPLETE` – The UBO Declaration is deemed incomplete by Mangopay teams. * `VALIDATED` – The UBO Declaration is validated by Mangopay’s team. * `REFUSED` – The UBO Declaration is rejected by Mangopay’s team. You can learn more about the reasons for refusal in the `Reason` and  `Message` fields. The reason for which the UBO Declaration was `REFUSED` or considered as `INCOMPLETE`. Additional information about why the UBO Declaration was refused or marked as incomplete, provided by Mangopay’s team. The list of UBOs attached to the UBO Declaration. The UBO object created by the platform. The unique identifier of the object. The date and time at which the object was created. *Max. length: 100 characters* The last name of the Dashboard user. The date of birth of the user. Returned `null` if `UserCategory` is `PAYER`. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. The nationality of the user.  Returned `null` if `UserCategory` is `PAYER`. The postal address of the user. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. Information about the beneficial owner's place of birth. The city in which the beneficial owner was born. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the beneficial owner was born. Whether or not the UBO is considered in the declaration. To disregard a UBO, this parameter must be set to `false`. This action is irreversible. ### Related resources How to submit a UBO Declaration Learn more about beneficial owners # The UBO object ### Description The UBO object represents one beneficial owner. Please note that: * The `Status` of the UBO Declaration must be `CREATED` to create a UBO. * The UBO Declaration can contain up to 15 UBOs. ### Attributes The unique identifier of the object. The date and time at which the object was created. *Max. length: 100 characters* The last name of the beneficial owner. *Max. length: 100 characters* The first name of the beneficial owner. The date of birth of the beneficial owner. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. The nationality of the beneficial owner. The postal address of the beneficial owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the beneficial owner's place of birth. The city in which the beneficial owner was born. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the beneficial owner was born. Whether or not the UBO is considered in the declaration. To disregard a UBO, this parameter must be set to `false`. This action is irreversible. ### Related resources How to submit a UBO Declaration Learn more about beneficial owners # Update a UBO PUT /v2.01/{ClientId}/users/{UserId}/kyc/ubodeclarations/{UboDeclarationId}/ubos/{UboId} [Read more about the UBO object →](/api-reference/ubo-declarations/ubo-object) ### Path parameters The unique identifier of the UBO Declaration. The unique identifier of the UBO. ### Body parameters *Max. length: 100 characters* The last name of the beneficial owner. *Max. length: 100 characters* The first name of the beneficial owner. The date of birth of the beneficial owner. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. **Allowed values:** Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats)). The nationality of the beneficial owner. The postal address of the beneficial owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. Information about the beneficial owner's place of birth. The city in which the beneficial owner was born. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the beneficial owner was born. ### Responses The unique identifier of the object. The date and time at which the object was created. *Max. length: 100 characters* The last name of the beneficial owner. *Max. length: 100 characters* The first name of the beneficial owner. The date of birth of the beneficial owner. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. The nationality of the beneficial owner. The postal address of the beneficial owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the beneficial owner's place of birth. The city in which the beneficial owner was born. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the beneficial owner was born. Whether or not the UBO is considered in the declaration. To disregard a UBO, this parameter must be set to `false`. This action is irreversible. ```json 200 { "Id": "158947898", "CreationDate": 1672153693, "LastName": "Wiza", "FirstName": "Jess", "Birthday": 652117514, "Nationality": "FR", "Address": { "AddressLine1": "669 Ratke Forge", "AddressLine2": "Schamberger Walk", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Birthplace": { "City": "Paris", "Country": "FR" }, "IsActive": true } ``` ```json REST { "LastName": "Wiza", "FirstName": "Jess", "Birthday": 652117514, "Nationality": "FR", "Address": { "AddressLine1": "669 Ratke Forge", "AddressLine2": "Schamberger Walk", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Birthplace": { "City": "Paris", "Country": "FR" } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '199385330'; $uboDeclarationId = '199461371'; $uboId = '199461374'; $ubo = $api->UboDeclarations->GetUbo($userId, $uboDeclarationId, $uboId); $address = new \MangoPay\Address(); $address->AddressLine1 = 'Address line 1'; $address->AddressLine2 = 'Address line 2'; $address->City = 'Paris'; $address->Country = 'FR'; $address->PostalCode = '75000'; $address->Region = 'Region'; $ubo->Address = $address; $ubo->FirstName = 'Alex'; $ubo->LastName = 'Smith'; $ubo->Nationality = 'FR'; $ubo->Birthday = mktime(0, 0, 0, 12, 21, 1975); $Birthplace = new \MangoPay\Birthplace(); $Birthplace->City = 'Paris'; $Birthplace->Country = 'FR'; $ubo->Birthplace = $Birthplace; $response = $api->UboDeclarations->UpdateUbo($userId, $uboDeclarationId, $ubo); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: '174796429', } let myUboDeclaration = { Id: '192604617', } let myUbo = { Id: '192607656', FirstName: 'Alexis', LastName: 'Smith', Address: { AddressLine1: '669 Ratke Forge', AddressLine2: 'Schamberger Walk', City: 'Paris', Region: 'Ile-de-France', PostalCode: '75001', Country: 'FR', }, Nationality: 'FR', Birthday: 652117514, Birthplace: { City: 'Paris', Country: 'FR', }, } const updateUbo = async (userId, uboDeclarationId, ubo) => { return await mangopay.UboDeclarations.updateUbo(userId, uboDeclarationId, ubo) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } updateUbo(myUser.Id, myUboDeclaration.Id, myUbo) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end myLegalUser = { Id: '194338122' } myUboDeclaration = { Id: '194511216' } myUbo = { Id: '194511740', FirstName: 'Alexa', LastName: 'Smith', Address: { AddressLine1: '669 Ratke Forge', AddressLine2: 'Schamberger Walk', City: 'Paris', Region: 'Ile-de-France', PostalCode: '75001', Country: 'FR' }, Nationality: 'FR', Birthday: 652117514, Birthplace: { City: 'Paris', Country: 'FR' } } updateUbo(myLegalUser[:Id], myUboDeclaration[:Id], myUbo[:Id], myUbo) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.CountryIso; import com.mangopay.entities.Birthplace; import com.mangopay.entities.Ubo; public class UpdateUbo { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String userId = "user_m_01HRS7PQEGE4YGCM1AZK1ENTGE"; String uboDeclarationId = "ubo_m_01HRYRKZN51BFXDWD6CCE22PHN"; String uboId = "ubo_m_01HRYTZJS07SP4GAMKYMB9YPCG"; Ubo ubo = mangopay.getUboDeclarationApi().getUbo(userId, uboDeclarationId, uboId); Birthplace birthplace = new Birthplace(); birthplace.setCity("Lyon"); birthplace.setCountry(CountryIso.FR); ubo.setBirthplace(birthplace); Ubo updateUbo = mangopay.getUboDeclarationApi().updateUbo(userId, uboDeclarationId, ubo); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(updateUbo); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Ubo, UboDeclaration, LegalUser from mangopay.utils import Address, Birthplace legal_user = LegalUser( id = '210602889' ) user_ubo_declaration = UboDeclaration( id = '210896999' ) user_ubo = Ubo( id = '210897219', # ID of UBO we want to update # List ALL details and change what's needed first_name = "Robbie", last_name = "Adams", address = Address( address_line_1 = '223 Winchester Street', city = 'Bolton', postal_code = 'BL1 3GA', country = 'GB', ), nationality = 'GB', birthday = 336873600, birthplace = Birthplace( city = 'London', country='GB' ), user = legal_user, ubo_declaration = user_ubo_declaration, isActive = True ) update_ubo = user_ubo.save() pprint(update_ubo) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.PUT; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2V0P9B1WCX46GEBDWCTXNQ0"; var uboDeclarationId = "ubo_m_01J2XHVDCVBB9N2J5ANN04RR88"; var uboId = "ubo_m_01J2XJVEGZT9WJGPN1E23AKB9H"; var ubo = new UboPutDTO("Alice", "Smith", new Address { AddressLine1 = "17 Rue de la République", City = "Paris", PostalCode = "75001", Country = CountryIso.FR }, CountryIso.FR, new DateTime(1985, 3, 15), new Birthplace { City = "Paris", Country = CountryIso.FR }) { IsActive = true }; var updateUbo = await api.UboDeclarations.UpdateUboAsync(ubo, userId, uboDeclarationId, uboId); string prettyPrint = JsonConvert.SerializeObject(updateUbo, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a UBO GET /v2.01/{ClientId}/users/{UserId}/kyc/ubodeclarations/{UboDeclarationId}/ubos/{UboId} [Read more about the UBO object →](/api-reference/ubo-declarations/ubo-object) ### Path parameters The unique identifier of the user. The unique identifier of the UBO Declaration. The unique identifier of the UBO. ### Responses The unique identifier of the object. The date and time at which the object was created. *Max. length: 100 characters* The last name of the beneficial owner. *Max. length: 100 characters* The first name of the beneficial owner. The date of birth of the beneficial owner. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. The nationality of the beneficial owner. The postal address of the beneficial owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the beneficial owner's place of birth. The city in which the beneficial owner was born. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the beneficial owner was born. Whether or not the UBO is considered in the declaration. To disregard a UBO, this parameter must be set to `false`. This action is irreversible. ```json 200 { "Id": "158947898", "CreationDate": 1672153693, "LastName": "Wiza", "FirstName": "Jess", "Birthday": 652117514, "Nationality": "FR", "Address": { "AddressLine1": "669 Ratke Forge", "AddressLine2": "Schamberger Walk", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Birthplace": { "City": "Paris", "Country": "FR" }, "IsActive": true } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '198557165'; $uboDeclarationId = '198692872'; $uboId = '198693429'; $response = $api->UboDeclarations->GetUbo($userId, $uboDeclarationId, $uboId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: '170853400', } let myUboDeclaration = { Id: '180932134', } let myUbo = { Id: '180945113', } const getUbo = async (userId, uboDeclarationId, uboId) => { return await mangopay.UboDeclarations.getUbo(userId, uboDeclarationId, uboId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getUbo(myUser.Id, myUboDeclaration.Id, myUbo.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewUbo(legalUserId, uboDeclarationId, uboId) begin response = MangoPay::Ubo.fetch(legalUserId, uboDeclarationId, uboId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch UBO: #{error.message}" puts "Error details: #{error.details}" return false end end myLegalUser = { Id: '194338122' } myUboDeclaration = { Id: '194511216' } myUbo = { Id: '194511740' } viewUbo(myLegalUser[:Id], myUboDeclaration[:Id], myUbo[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Ubo; public class ViewUbo { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); String userId = "user_m_01HRS7PQEGE4YGCM1AZK1ENTGE"; String uboDeclarationId = "ubo_m_01HRYRKZN51BFXDWD6CCE22PHN"; String uboId = "ubo_m_01HRYTZJS07SP4GAMKYMB9YPCG"; Ubo viewUbo = mangopay.getUboDeclarationApi().getUbo(userId, uboDeclarationId, uboId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewUbo); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.resources import Ubo, UboDeclaration, LegalUser legal_user = LegalUser( id = '210602889' ) user_ubo_declaration = UboDeclaration( id = '210896999' ) user_ubo = Ubo( id = '210898223' ) try: view_ubo = Ubo.get(reference = user_ubo.id, user_id = legal_user.id, ubo_declaration_id = user_ubo_declaration.id) pprint(vars(view_ubo)) except Ubo.DoesNotExist: print('The UBO {} does not exist.'.format(user_ubo_declaration)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2V0P9B1WCX46GEBDWCTXNQ0"; var uboDeclarationId = "ubo_m_01J2V64AD2C8G7PYACCP16ZS74"; var uboId = "ubo_m_01J2VBGYNQY07HYJQHKAS00VF8"; var viewUbo = await api.UboDeclarations.GetUboAsync(userId, uboDeclarationId, uboId); string prettyPrint = JsonConvert.SerializeObject(viewUbo, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a UBO Declaration GET /v2.01/{ClientId}/kyc/ubodeclarations/{UboDeclarationId} [Read more about the UBO Declaration object →](/api-reference/ubo-declarations/ubo-declaration-object) ### Path parameters The unique identifier of the UBO Declaration. ### Responses The unique identifier of the object. The unique identifier of the user. The date and time at which the object was created. The date and time at which the UBO Declaration was processed by Mangopay’s team. **Returned values:** `CREATED`, `VALIDATION_ASKED`, `INCOMPLETE`, `VALIDATED`, `REFUSED` The status of the declaration: * `CREATED` – The UBO Declaration is created, but not submitted yet. * `VALIDATION_ASKED` – The UBO Declaration is submitted for validation. * `INCOMPLETE` – The UBO Declaration is deemed incomplete by Mangopay teams. * `VALIDATED` – The UBO Declaration is validated by Mangopay’s team. * `REFUSED` – The UBO Declaration is rejected by Mangopay’s team. You can learn more about the reasons for refusal in the `Reason` and  `Message` fields. The reason for which the UBO Declaration was `REFUSED` or considered as `INCOMPLETE`. Additional information about why the UBO Declaration was refused or marked as incomplete, provided by Mangopay’s team. The list of UBOs attached to the UBO Declaration. The UBO object created by the platform. The unique identifier of the object. The date and time at which the object was created. *Max. length: 100 characters* The last name of the beneficial owner. The nationality of the beneficial owner. The postal address of the beneficial owner. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. Information about the beneficial owner's place of birth. The city in which the beneficial owner was born. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country in which the beneficial owner was born. Whether or not the UBO is considered in the declaration. To disregard a UBO, this parameter must be set to `false`. This action is irreversible. ```json 200 { "Id": "158947737", "UserId": "158947634", "CreationDate": 1672153298, "ProcessedDate": null, "Status": "CREATED", "Reason": null, "Message": null, "Ubos": [ { "Id": "158947898", "CreationDate": 1672153693, "LastName": "Wiza", "FirstName": "Jess", "Birthday": 652117514, "Nationality": "FR", "Address": { "AddressLine1": "669 Ratke Forge", "AddressLine2": "Schamberger Walk", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Birthplace": { "City": "Paris", "Country": "FR" }, "IsActive": true } ] } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '198557165'; $uboDeclarationId = '198692872'; $response = $api->UboDeclarations->Get($userId, $uboDeclarationId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: '170853400', } let myUboDeclaration = { Id: '180932134', } const getUboDeclaration = async (userId, uboDeclarationId) => { return await mangopay.UboDeclarations.get(userId, uboDeclarationId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getUboDeclaration(myUser.Id, myUboDeclaration.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewUboDeclaration(legalUserId, uboDeclarationId) begin response = MangoPay::UboDeclaration.fetch(legalUserId, uboDeclarationId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to update UBO: #{error.message}" puts "Error details: #{error.details}" return false end end myLegalUser = { Id: '194338122' } myUboDeclaration = { Id: '194511216' } viewUboDeclaration(myLegalUser[:Id], myUboDeclaration[:Id]) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.entities.UboDeclaration; import java.lang.reflect.Field; public class ViewUboDeclaration { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); UboDeclaration uboDeclaration = mangopay.getUboDeclarationApi().get("ubo_m_01HRYRKZN51BFXDWD6CCE22PHN"); System.out.println(String.format("id: %s", uboDeclaration.getId())); printObjectFields(uboDeclaration); } private static void printObjectFields(Object obj) { Class objClass = obj.getClass(); Field[] fields = objClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object value = field.get(obj); System.out.println(field.getName() + ": " + value); } catch (IllegalAccessException e) { e.printStackTrace(); } } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import UboDeclaration, LegalUser ubo_declaration = UboDeclaration( id = '210896999' ) legal_user = LegalUser( id = '210602889' ) try: view_ubo_declaration = UboDeclaration.get(reference = ubo_declaration.id, user_id = legal_user.id) pprint(vars(view_ubo_declaration)) except UboDeclaration.DoesNotExist: print('The UBO declaration {} does not exist for User n.{}'.format(ubo_declaration, legal_user.id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var uboDeclarationId = "ubo_m_01J2V64AD2C8G7PYACCP16ZS74"; var viewUboDeclaration = await api.UboDeclarations.GetUboDeclarationByIdAsync(uboDeclarationId); string prettyPrint = JsonConvert.SerializeObject(viewUboDeclaration, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The User Data Format object ### Description The User Data Format object describes a piece of user data and the validation rules applied to its format. For more details on the information that must be declared by users at the different stages of the [user lifecycle](/guides/users/user-life-cycle), see the [verification requirements](/guides/users/verification/requirements). ### Attributes Information about the registration number of a legal entity. For details, see the [Company number](/guides/users/verification/company-number) article. The registration number of a legal entity, assigned by the relevant national authority. **Note:** Any non-alphanumeric characters, like dashes or spaces, are removed before applying the validation rules. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the registration of the legal entity, against which the company number format is validated. Whether the format of the value is valid for the country. The list of regular expressions applicable to the country. Rules only exist for countries listed in the [Company number](/guides/users/verification/company-number) article. **Note:** Any non-alphanumeric characters, like dashes or spaces, are removed before applying the validation rules. ### Related resources Categories # Validate the format of User data POST /v2.01/{ClientId}/users/data-formats/validation This call allows you to check the validity of the format of a piece of user data, and to retrieve the validation rules applied to it. **Caution – Veracity of data checked during verification** This endpoint only checks that the format of the data corresponds to that which is expected. Whether or not the data is true and correct for the specific User is checked during the user verification process when documents are submitted. ### Body parameters Information about the registration number of a legal entity. For details, see the [Company number](/guides/users/verification/company-number) article. The registration number of a legal entity, assigned by the relevant national authority. **Note:** Any non-alphanumeric characters, like dashes or spaces, are removed before applying the validation rules. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the registration of the legal entity, against which the company number format is validated. ### Responses Information about the registration number of a legal entity. For details, see the [Company number](/guides/users/verification/company-number) article. The registration number of a legal entity, assigned by the relevant national authority. **Note:** Any non-alphanumeric characters, like dashes or spaces, are removed before applying the validation rules. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the registration of the legal entity, against which the company number format is validated. Whether the format of the value is valid for the country. The list of regular expressions applicable to the country. Rules only exist for countries listed in the [Company number](/guides/users/verification/company-number) article. **Note:** Any non-alphanumeric characters, like dashes or spaces, are removed before applying the validation rules. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "0421656b-5f32-4475-874c-561449f9ffbf", "Date": 1697101284.0, "errors": { "CompanyNumber.CountryCode": "The requested value is not an ISO 3166-1 alpha-2 code which is expected." } } ``` ```json 200 - Valid format for the country { "CompanyNumber": { "CompanyNumber": "AB123456", "CountryCode": "IT", "IsValid": true, "ValidationRules": [ "^[0-9]{11}$|^[a-z]{2}[0-9]{7}$|^[a-z]{2}[0-9]{6}$" ] } } ``` ```json REST { "CompanyNumber": { "CompanyNumber": "AB123456", "CountryCode": "IT" } } ``` ```python Python import re import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import LegalUser legal_user = LegalUser( id = '210602889' ) company_number = str(legal_user.company_number) validation_regex = re.compile(r"^[0-9]{11}$|^[a-z]{2}[0-9]{7}$|^[a-z]{2}[0-9]{6}$") validate_it = validation_regex.match(company_number) print(bool(validate_it)) ``` # The User EMoney object ### Description The User EMoney object stores, for wallets owned by a given user:  * E-money credits, meaning pay-ins and transfers into wallets * E-money debits, meaning payouts ### Attributes The unique identifier of the user. Information about the pay-ins and transfers credited to wallets owned by the user. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the payouts debited from wallets owned by the user. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). ### Related resources Mangopay e-wallet system # View User EMoney GET /v2.01/{ClientId}/users/{UserId}/emoney/{Year}/{Month} The path parameters `Month` and `Year` are optional. If not given, this call returns all the credited and debited e-money since the user was created. ### Path parameters The unique identifier of the user. *Format: "YYYY" (e.g., "2019")* The year by which to filter the returned values. *Format: “MM” (e.g., “03”)* The month by which to filter the returned values. ### Body parameters **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallets for which to return the values for credited and debited e-money. ### Responses The unique identifier of the user. Information about the pay-ins and transfers credited to wallets owned by the user. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the payouts debited from wallets owned by the user. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). ```json 200 { "UserId": "156671912", "CreditedEMoney": { "Currency": "EUR", "Amount": 2900 }, "DebitedEMoney": { "Currency": "EUR", "Amount": 1000 } } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId ='146476890'; $year = 2023; $month = 6; $response = $api->Users->GetEMoney($userId, $year, $month); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: '146476890', } // timeframe is optional, if not given, returns all the credited and debited e-money since the user was created. let timeframe = { Year: '2023', Month: '04', } const viewClientWallet = async (userId, year, month) => { return await mangopay.Users.getEMoney(userId, year, month) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewClientWallet(myUser.Id, timeframe.Year, timeframe.Month) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewUserEmoney(userId, year, month) begin response = MangoPay::User.emoney(userId, year, month) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch emoney: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '194338122' } # timeframe is optional, if not given, returns all the credited and debited e-money since the user was created. timeFrame = { year: 2023, month: 06 } viewUserEmoney(myUser[:Id], timeFrame[:year], timeFrame[:month]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.entities.EMoney; public class ViewUserEMoney { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HRS7PQEGE4YGCM1AZK1ENTGE"; EMoney viewEMoney = mangopay.getUserApi().getEMoney(userId, "2023"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewEMoney); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, EMoney natural_user = NaturalUser.get('213753890') view_user_emoney = natural_user.get_emoney() view_user_emoney = view_user_emoney.data[0] pprint(vars(view_user_emoney)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR"; var viewUserEMoney = await api.Users.GetEmoneyAsync(userId); string prettyPrint = JsonConvert.SerializeObject(viewUserEMoney, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The User Regulatory Status object ### Description Mangopay teams can block a user's ability to initiate transactions (pay-ins, transfers, and payouts) when fraudulent behavior or a compliance risk is suspected.  The User Regulatory Status object provides information about the blocked inflows and/or outflows for a given user. ### Attributes **Returned values:** One of the action codes available in the Blocked users article. Code indicating the reason for blocking the user, and steps you can take to get them unblocked. Information about which payment flows are blocked for the user. Whether or not the user is blocked from making pay-ins or sending or receiving transfers. Whether or not the user is blocked from making payouts or sending or receiving transfers. The unique identifier of the user. ### Related resources Learn more about blocked users # View a User Regulatory Status GET /v2.01/{ClientId}/users/{UserId}/regulatory ### Path parameters The unique identifier of the user. ### Responses **Returned values:** One of the action codes available in the Blocked users article. Code indicating the reason for blocking the user, and steps you can take to get them unblocked. Information about which payment flows are blocked for the user. Whether or not the user is blocked from making pay-ins or sending or receiving transfers. Whether or not the user is blocked from making payouts or sending or receiving transfers. The unique identifier of the user. ```json 200 { "ActionCode": "008701", "ScopeBlocked": { "Inflows": true, "Outflows": false }, "Id": "146476890" } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '146476890', } const getRegulatoryStatus = async (userId) => { return await mangopay.Users.getRegulatory(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getRegulatoryStatus(user.Id) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.UserBlockStatus; public class ViewUserRegulatory { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HRS7PQEGE4YGCM1AZK1ENTGE"; UserBlockStatus viewRegulatoryStatus = mangopay.getUserApi().getRegulatory(userId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewRegulatoryStatus); System.out.println(prettyJson); } } ``` ```python Python import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import LegalUser legal_user = LegalUser( id = '210760575' ) user_regulatory_status = LegalUser.get_regulatory(legal_user) pprint(vars(user_regulatory_status)) pprint(vars(user_regulatory_status.scope_blocked)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var viewUserRegulatoryStatus = await api.Users.GetUserRegulatoryAsync(userId); string prettyPrint = JsonConvert.SerializeObject(viewUserRegulatoryStatus, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Legal User POST /v2.01/{ClientId}/users/legal export const Aml = ({content}) => {content} ; [Read more about the Legal User object →](/api-reference/users/legal-user-object) **Note – Country-based restrictions apply to users** Due to Mangopay's , it is not possible to create or modify users using blocked countries. For Legal Users, the following parameters are concerned: * `Country` of the `HeadquartersAddress` * `LegalRepresentativeNationality` * `LegalRepresentativeCountryOfResidence` * `Country` of the `LegalRepresentativeAddress` For more information, see the Country restrictions article. ### Body parameters Required if `UserCategory` is `OWNER`. Child parameters returned `null` if `UserCategory` is `PAYER`. The legally registered address of the entity’s administrative center. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* Required if the `Address` parameter is sent. The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. The country of the address. The address of the entity’s legal representative. *Max. length: 255 characters* Required if `LegalRepresentativeAddress` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* Required if `LegalRepresentativeAddress` is sent. The city of the address. *Max. length: 255 characters* Required if `LegalRepresentativeAddress` is sent and `Country` is US, CA, or MX. The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* Required if `LegalRepresentativeAddress` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. Required if `LegalRepresentativeAddress` is sent. The country of the address. *Max. length: 255 characters* The registered legal name of the entity. The `Name` value should be the one registered with the relevant national authority. **Allowed values:** BUSINESS, PARTNERSHIP, ORGANIZATION, SOLETRADER The type of legal user. For information on which `LegalPersonType` to use for a particular local legal structure, see the verification requirements. **Caution:** Modification of the `LegalPersonType` may result in a verification downgrade. *Max. length: 100 characters* The first name of the entity’s legal representative. *Max. length: 100 characters* The last name of the entity’s legal representative. *Format: A valid email address* The email address of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`. The date of birth of the entity’s legal representative. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`. The nationality of the entity’s legal representative. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`. The country of residence of the entity’s legal representative. Required if `UserCategory` is `OWNER` and `LegalPersonType` is `BUSINESS`. Returned `null` if `UserCategory` is `PAYER`. The registration number of the entity, assigned by the relevant national authority. For information on the expected format for a specific country, see the [Company number](/guides/users/verification/company-number) guide. To validate the format of a number before submitting documents for verification, use [POST Validate the format of User data](/api-reference/user-data-format/validate-user-data-format). *Max. length: 255 characters* Custom data that you can add to this object. *Format: A valid email address* The email address for the entity. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. **Default value:** PAYER **Allowed values:** PAYER, OWNER The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. ### Responses The legally registered address of the entity’s administrative center.\ This object’s sub-parameters are `null` if the `UserCategory` is `PAYER`. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. The address of the entity’s legal representative. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Max. length: 255 characters* The registered legal name of the entity. The `Name` value should be the one registered with the relevant national authority. **Returned values:** BUSINESS, PARTNERSHIP, ORGANIZATION, SOLETRADER The type of legal user. For information on which `LegalPersonType` to use for a particular local legal structure, see the verification requirements. **Caution:** Modification of the `LegalPersonType` may result in a verification downgrade. *Max. length: 100 characters* The first name of the entity’s legal representative. *Max. length: 100 characters* The last name of the entity’s legal representative. *Format: A valid email address* The email address of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. The date of birth of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. Returned `null` if `UserCategory` is `PAYER`. The nationality of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. The country of residence of the entity’s legal representative. The `Id` of the KYC Document whose `Type` is `REGISTRATION_PROOF` if validated for the user. If no registration proof is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `SHAREHOLDERS_DECLARATION` if validated for the user. If no Shareholder Declaration is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `ARTICLES_OF_ASSOCIATION` if validated for the user. If no articles of association document is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `IDENTITY_PROOF` if validated for the user. If no identity proof is validated, then this value is `null`. Required if `UserCategory` is `OWNER` and `LegalPersonType` is `BUSINESS`. Returned `null` if `UserCategory` is `PAYER`. The registration number of the entity, assigned by the relevant national authority. For information on the expected format for a specific country, see the [Company number](/guides/users/verification/company-number) guide. To validate the format of a number before submitting documents for verification, use [POST Validate the format of User data](/api-reference/user-data-format/validate-user-data-format). The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. **Returned values:** NATURAL, LEGAL The type of the user: * `NATURAL` – Natural users are individuals (natural persons). * `LEGAL` – Legal users are legal entities (legal persons) like companies, non-profits, and sole proprietors. The `PersonType` is defined by the endpoint used to create the user and can’t be modified. *Format: A valid email address* The email address for the entity. **Default value:** `LIGHT` **Returned values:** `LIGHT`, `REGULAR` The verification status of the user set by Mangopay: * `LIGHT` – Unverified, assigned by default to all users. * `REGULAR` – Verified, meaning the user has successfully completed the verification process and had the necessary documents validated by Mangopay. Only users whose `UserCategory` is `OWNER` can submit verification documents for validation. Only users whose `KYCLevel` is `REGULAR` can request payouts. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. The date and time at which the `TermsAndConditionsAccepted` value was set to `true`. Returned `null` if `UserCategory` is `PAYER`. **Default value:** PAYER **Returned values:** PAYER, OWNER, PLATFORM The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. **Returned values:** ACTIVE, CLOSED Internal use only. This field can only be used and updated by Mangopay teams. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "864a164a-cbb9-4e9d-b140-2b83c720e729", "Date": 1690291065.0, "errors": { "Email": "The field Email must match the regular expression '([a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*)@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?'." } } ``` ```json { "Message": "User must accept the terms and conditions before account creation or modification.", "Type": "user_hasnt_accepted_terms_and_conditions", "Id": "dbbc752b-6f9f-4248-a4bb-04ee0ba7b4b7", "Date": 1730810728, "errors": null } ``` ```json 200 - Payer { "HeadquartersAddress": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null }, "LegalRepresentativeAddress": { "AddressLine1": "34 rue des Entreprises", "AddressLine2": "Appartement 14", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Name": "Best Business", "LegalPersonType": "BUSINESS", "LegalRepresentativeFirstName": "Richard", "LegalRepresentativeLastName": "Moulin", "LegalRepresentativeEmail": null, "LegalRepresentativeBirthday": null, "LegalRepresentativeNationality": null, "LegalRepresentativeCountryOfResidence": null, "ProofOfRegistration": null, "ShareholderDeclaration": null, "Statute": null, "LegalRepresentativeProofOfIdentity": null, "CompanyNumber": null, "Id": "158026537", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670863988, "PersonType": "LEGAL", "Email": "richard.moulin@email.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": false, "TermsAndConditionsAcceptedDate": null, "UserCategory": "PAYER", "UserStatus": "ACTIVE" } ``` ```json 200 - Owner { "HeadquartersAddress": { "AddressLine1": "34 rue des Entreprises", "AddressLine2": "Batiment B", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "LegalRepresentativeAddress": { "AddressLine1": "12032 Wiza Way", "AddressLine2": "Mitchell Drive", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Name": "Best Business", "LegalPersonType": "BUSINESS", "LegalRepresentativeFirstName": "Cedrick", "LegalRepresentativeLastName": "Dickinson", "LegalRepresentativeEmail": "Agustin.Ullrich@yahoo.com", "LegalRepresentativeBirthday": 652117514, "LegalRepresentativeNationality": "FR", "LegalRepresentativeCountryOfResidence": "FR", "ProofOfRegistration": null, "ShareholderDeclaration": null, "Statute": null, "LegalRepresentativeProofOfIdentity": null, "CompanyNumber": "123456789", "Id": "158026721", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670864174, "PersonType": "LEGAL", "Email": "cortney_douglas@yahoo.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": true, "TermsAndConditionsAcceptedDate": 1670864174, "UserCategory": "OWNER", "UserStatus": "ACTIVE" } ``` ```json REST { "HeadquartersAddress": { "AddressLine1": "34 rue des Entreprises", "AddressLine2": "Batiment B", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "LegalRepresentativeAddress": { "AddressLine1": "12032 Wiza Way", "AddressLine2": "Mitchell Drive", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Name": "Best Business", "LegalPersonType": "BUSINESS", "LegalRepresentativeFirstName": "Cedrick", "LegalRepresentativeLastName": "Dickinson", "LegalRepresentativeEmail": "Agustin.Ullrich@yahoo.com", "LegalRepresentativeBirthday": 652117514, "LegalRepresentativeNationality": "FR", "LegalRepresentativeCountryOfResidence": "FR", "CompanyNumber": "123456789", "Tag": "Created using MANGOPAY API Collection Postman", "Email": "cortney_douglas@yahoo.com", "TermsAndConditionsAccepted": true, "UserCategory": "OWNER" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $user = new \MangoPay\UserLegal(); $user->Name = 'Smith corp'; $user->Email = 'smith@example.com'; $user->LegalPersonType = \MangoPay\LegalPersonType::Business; $address = new \MangoPay\Address(); $address->AddressLine1 = 'Rue des plantes'; $address->AddressLine2 = '2nd floor'; $address->City = 'Paris'; $address->Country = 'FR'; $address->PostalCode = '75000'; $address->Region = 'IDF'; $user->HeadquartersAddress = $address; $user->LegalRepresentativeAddress = $address; $user->LegalRepresentativeFirstName = 'Alex'; $user->LegalRepresentativeLastName = 'Smith'; $user->LegalRepresentativeEmail = 'asmith@example.com'; $user->LegalRepresentativeBirthday = mktime(0, 0, 0, 12, 21, 1975); $user->LegalRepresentativeNationality = 'FR'; $user->LegalRepresentativeCountryOfResidence = 'FR'; $user->CompanyNumber = 'LU123456'; $user->Tag = 'Created using Mangopay PHP SDK'; $user->TermsAndConditionsAccepted = true; $user->UserCategory = 'Owner'; $response = $api->Users->Create($user); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-mangopay-client-id', clientApiKey: 'your-mangopay-api-key', }) let myLegalUser = { HeadquartersAddress: { AddressLine1: '45 Main Road', AddressLine2: null, City: 'London', PostalCode: 'NW1 4RG', Country: 'GB', }, LegalRepresentativeAddress: { AddressLine1: '35 London Road', AddressLine2: null, City: 'London', PostalCode: 'NW1 0AA', Country: 'GB', }, Name: 'Executive Consulting', LegalPersonType: 'BUSINESS', LegalRepresentativeFirstName: 'Juliana', LegalRepresentativeLastName: 'Dunn', LegalRepresentativeEmail: 'juliana.dunn@example.com', LegalRepresentativeBirthday: 188301600, LegalRepresentativeNationality: 'GB', LegalRepresentativeCountryOfResidence: 'GB', CompanyNumber: '12345678', Tag: 'Created using the Mangopay NodeJS SDK', Email: 'executive.consulting@example.com', TermsAndConditionsAccepted: true, UserCategory: 'OWNER', PersonType: 'LEGAL', } const createLegalUser = async (legalUser) => { return await mangopay.Users.create(legalUser) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createLegalUser(myLegalUser) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createLegalUser(legalUserObject) begin response = MangoPay::LegalUser.create(legalUserObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create User: #{error.message}" puts "Error details: #{error.details}" return false end end myLegalUser = { HeadquartersAddress: { AddressLine1: '59 Main Road', AddressLine2: 'PB 456', City: 'London', PostalCode: 'NW1 4RG', Country: 'GB', }, LegalRepresentativeAddress: { AddressLine1: '35 London Road', City: 'London', PostalCode: 'NW1 0AA', Country: 'GB', }, Name: 'Executive Consulting', LegalPersonType: 'BUSINESS', LegalRepresentativeFirstName: 'Juliana', LegalRepresentativeLastName: 'Dunn', LegalRepresentativeEmail: 'juliana.dunn@example.com', LegalRepresentativeBirthday: 188301600, LegalRepresentativeNationality: 'GB', LegalRepresentativeCountryOfResidence: 'GB', CompanyNumber: '12345678', Tag: 'Updated using the Mangopay Ruby SDK', Email: 'executive.consulting@example.com', TermsAndConditionsAccepted: true, UserCategory: 'OWNER', PersonType: 'LEGAL' } createLegalUser(myLegalUser) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.entities.User; import com.mangopay.entities.UserLegal; import com.mangopay.core.enumerations.UserCategory; import com.mangopay.core.enumerations.CountryIso; import com.mangopay.core.enumerations.LegalPersonType; import java.lang.reflect.Field; public class CreateLegalUser { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); UserLegal user = new UserLegal(); Address headquartersAddress = new Address(); Address legalRepAddress = new Address(); headquartersAddress.setAddressLine1("34 rue des Entreprises"); headquartersAddress.setAddressLine2("Batiment B"); headquartersAddress.setCity("Paris"); headquartersAddress.setRegion("Île-de-France"); headquartersAddress.setPostalCode("75001"); headquartersAddress.setCountry(CountryIso.FR); legalRepAddress.setAddressLine1("12032 Wiza Way"); legalRepAddress.setAddressLine2("Mitchell Drive"); legalRepAddress.setCity("Paris"); legalRepAddress.setRegion("Île-de-France"); legalRepAddress.setPostalCode("75001"); legalRepAddress.setCountry(CountryIso.FR); user.setName("Best Business"); user.setLegalPersonType(LegalPersonType.BUSINESS); user.setLegalRepresentativeFirstName("Cedrik"); user.setLegalRepresentativeLastName("Dickinson"); user.setLegalRepresentativeEmail("cedrik.dickinson@example.com"); user.setLegalRepresentativeBirthday((long) 652117514); user.setLegalRepresentativeNationality(CountryIso.FR); user.setLegalRepresentativeCountryOfResidence(CountryIso.FR); user.setHeadquartersAddress(headquartersAddress); user.setLegalRepresentativeAddress(legalRepAddress); user.setCompanyNumber("652398741"); user.setEmail("best.business@best.com"); user.setTermsAndConditionsAccepted(true); user.setTag("Created with the Mangopay Java SDK"); user.setUserCategory(UserCategory.OWNER); User createUser = mangopay.getUserApi().create(user); System.out.println(String.format("id: %s", createUser.getId())); printObjectFields(createUser); } private static void printObjectFields(Object obj) { Class objClass = obj.getClass(); Field[] fields = objClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object value = field.get(obj); if (value instanceof Address) { System.out.println(field.getName() + ": "); printObjectFields(value); } else { System.out.println(field.getName() + ": " + value); } } catch (IllegalAccessException e) { e.printStackTrace(); } } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id = 'your-client-id' mangopay.apikey = 'your-api-key' from mangopay.api import APIRequest handler=APIRequest(sandbox=True) from mangopay.resources import LegalUser from mangopay.utils import Address legal_user = LegalUser( headquarters_address = Address( address_line_1 = '45 Main Road', city = 'London', postal_code = 'NW1 4RG', country = 'GB' ), legal_representative_address = Address( address_line_1 = '35 London Road', city = 'London', postal_code = 'NW1 0AA', country = 'GB' ), name = 'Executive Consulting', legal_person_type = 'BUSINESS', legal_representative_first_name = 'Juliana', legal_representative_last_name = 'Dunn', legal_representative_email = 'juliana.dunn@example.com', legal_representative_birthday = 188301600, legal_representative_nationality = 'GB', legal_representative_country_of_residence = 'GB', company_number = '12345678', tag = 'Created with Mangopay Python SDK', email = 'executive.consulting@example.com', terms_and_conditions_accepted = True, user_category = 'OWNER' ) create_legal_user=legal_user.save() pprint(create_legal_user) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var myUser = new UserLegalOwnerPostDTO { HeadquartersAddress = new Address { AddressLine1 = "17 Rue de la République", City = "Paris", Region = "Ile-de-France", PostalCode = "75001", Country = CountryIso.FR }, LegalRepresentativeAddress = new Address { AddressLine1 = "12032 Wiza Way", City = "Paris", Region = "Ile-de-France", PostalCode = "75001", Country = CountryIso.FR }, Name = "Dedicated Notion", LegalPersonType = LegalPersonType.BUSINESS, LegalRepresentativeFirstName = "Derek", LegalRepresentativeLastName = "Nelson", LegalRepresentativeEmail = "derek.nelson@dedicatednotion.com", LegalRepresentativeBirthday = new DateTime(1980, 3, 15), LegalRepresentativeNationality = CountryIso.FR, LegalRepresentativeCountryOfResidence = CountryIso.FR, CompanyNumber = "325698745", Email = "dedicatednotion@dedicatednotion.com", Tag = "Created using the Mangopay .NET SDK" }; var createLegalUser = await api.Users.CreateOwnerAsync(myUser); string prettyPrint = JsonConvert.SerializeObject(createLegalUser, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Natural User POST /v2.01/{ClientId}/users/natural export const Aml = ({content}) => {content} ; [Read more about the Natural User object →](/api-reference/users/natural-user-object) **Note – Country-based restrictions apply to users** Due to Mangopay's , it is not possible to create or modify users using blocked countries. For Natural Users, the following parameters are concerned: * `Nationality` * `CountryOfResidence` * `Country` of the `Address` For more information, see the Country restrictions article. ### Body parameters The postal address of the user. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. Required if `Address` is sent. The country of the address. *Max. length: 100 characters* The first name of the user. *Max. length: 100 characters* The last name of the user. Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`. The date of birth of the user. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. **Allowed values:** Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats)). Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`. The nationality of the user. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`. The country of residence of the user. *Max. length: 255 characters* The occupation of the user. Returned `null` if `UserCategory` is `PAYER`. **Allowed values:** 1, 2, 3, 4, 5, 6 The bracket indicating the income of the user. The brackets are: * 1: \< 18K * 2: 18K - 30K * 3: 30K - 50K * 4: 50K - 80K * 5: 80K - 120K * 6: > 120K Returned `null` if `UserCategory` is `PAYER`. *Max. length: 255 characters* Custom data that you can add to this object. *Format: A valid email address* The email address of the user. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. **Default value:** PAYER **Allowed values:** PAYER, OWNER The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. ### Responses The postal address of the user. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Max. length: 100 characters* The first name of the user. *Max. length: 100 characters* The last name of the user. The date of birth of the user. Returned `null` if `UserCategory` is `PAYER`. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. Returned `null` if `UserCategory` is `PAYER`. The nationality of the user. Returned `null` if `UserCategory` is `PAYER`. The country of residence of the user. *Max. length: 255 characters* The occupation of the user. Returned `null` if `UserCategory` is `PAYER`. The bracket indicating the income of the user. The brackets are: * 1: \< 18K * 2: 18K - 30K * 3: 30K - 50K * 4: 50K - 80K * 5: 80K - 120K * 6: > 120K Returned `null` if `UserCategory` is `PAYER`. The `Id` of the KYC Document whose `Type` is `IDENTITY_PROOF` if validated for the user. If no identity proof is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `ADDRESS_PROOF` if validated for the user. If no address proof is validated, then this value is `null`. This is a deprecated parameter. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. **Returned values:** NATURAL, LEGAL The type of the user: * `NATURAL` – Natural users are individuals (natural persons). * `LEGAL` – Legal users are legal entities (legal persons) like companies, non-profits, and sole proprietors. The `PersonType` is defined by the endpoint used to create the user and can’t be modified. *Format: A valid email address* The email address of the user. **Default value:** `LIGHT` **Returned values:** `LIGHT`, `REGULAR` The verification status of the user set by Mangopay: * `LIGHT` – Unverified, assigned by default to all users. * `REGULAR` – Verified, meaning the user has successfully completed the verification process and had the necessary documents validated by Mangopay. Only users whose `UserCategory` is `OWNER` can submit verification documents for validation. Only users whose `KYCLevel` is `REGULAR` can request payouts. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. The date and time at which the `TermsAndConditionsAccepted` value was set to `true`. Returned `null` if `UserCategory` is `PAYER`. **Default value:** PAYER **Returned values:** PAYER, OWNER, PLATFORM The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. **Returned values:** ACTIVE, CLOSED Internal use only. This field can only be used and updated by Mangopay teams. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "49616dff-19d6-4bec-b82e-0daf09529f52#1676551648", "Date": 1676551649.0, "errors": { "Nationality": "The Nationality used is blocked" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "864a164a-cbb9-4e9d-b140-2b83c720e729", "Date": 1690291065.0, "errors": { "Email": "The field Email must match the regular expression '([a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*)@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?'." } } ``` ```json { "Message": "User must accept the terms and conditions before account creation or modification.", "Type": "user_hasnt_accepted_terms_and_conditions", "Id": "dbbc752b-6f9f-4248-a4bb-04ee0ba7b4b7", "Date": 1730810728, "errors": null } ``` ```json 200 - Payer { "Address": { "AddressLine1": "3 rue des Plantes", "AddressLine2": "Appartement 7", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "FirstName": "Hugo", "LastName": "Garnier", "Birthday": null, "Nationality": null, "CountryOfResidence": null, "Occupation": null, "IncomeRange": null, "ProofOfIdentity": null, "ProofOfAddress": null, "Capacity": "NORMAL", "Id": "user_m_01J87ZBSP8FCVDSCB8PGWQHZPF", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670861869, "PersonType": "NATURAL", "Email": "email@test.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": false, "TermsAndConditionsAcceptedDate": null, "UserCategory": "PAYER", "UserStatus": "ACTIVE" } ``` ```json 200 - Owner { "Address": { "AddressLine1": "3 rue des Plantes", "AddressLine2": "Appartement 7", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "FirstName": "Sophia", "LastName": "Garnier", "Birthday": 652117514, "Nationality": "FR", "CountryOfResidence": "FR", "Occupation": null, "IncomeRange": null, "ProofOfIdentity": null, "ProofOfAddress": null, "Capacity": "NORMAL", "Id": "user_m_01J87ZBSP8FCVDSCB8PGWQHZPF", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670862022, "PersonType": "NATURAL", "Email": "email@test.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": true, "TermsAndConditionsAcceptedDate": 1670862022, "UserCategory": "OWNER", "UserStatus": "ACTIVE" } ``` ```json REST { "Address":{ "AddressLine1":"3 rue des Plantes", "AddressLine2":"Appartement 7", "City":"Paris", "Region":"Ile-de-France", "PostalCode":"75001", "Country":"FR" }, "FirstName":"Hugo", "LastName":"Garnier", "Birthday":652117514, "Nationality":"FR", "CountryOfResidence":"FR", "Occupation":null, "IncomeRange":null, "Tag":"Created using MANGOPAY API Collection Postman", "Email":"email@test.com", "TermsAndConditionsAccepted":false, "UserCategory":"PAYER" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $user = new \MangoPay\UserNatural(); $user->FirstName = 'Alex'; $user->LastName = 'Smith'; $user->Email = "asmith@example.com"; $user->Address = new \MangoPay\Address(); $user->Address->AddressLine1 = 'Rue des plantes'; $user->Address->AddressLine2 = 'Building A'; $user->Address->City = 'Paris'; $user->Address->Country = 'FR'; $user->Address->PostalCode = '75000'; $user->Address->Region = 'IDF'; $user->Tag = 'Created using Mangopay PHP SDK'; $user->TermsAndConditionsAccepted = true; $user->UserCategory = 'Payer'; $response = $api->Users->Create($user); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk'); const mangopay = new mangopayInstance({ clientId: "your-client-id", clientApiKey: "your-api-key", }) let naturalUser = { Address: { AddressLine1: '2795 Edgewood Road', AddressLine2: null, City: 'Little Rock', Region: 'Arkansas', PostalCode: '72212', Country: 'US', }, FirstName: 'John', LastName: 'Doe', Birthday: 655772400, Nationality: 'FR', CountryOfResidence: 'US', Tag: 'My first user', Email: 'john.doe@mangopay.com', TermsAndConditionsAccepted: true, UserCategory: 'OWNER', PersonType: 'NATURAL', } const createUser = async (userObject) => { return await mangopay.Users.create(userObject) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createUser(naturalUser) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createNaturalUser(naturalUserObject) begin response = MangoPay::NaturalUser.create(naturalUserObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create User: #{error.message}" puts "Error details: #{error.details}" return false end end myNaturalUser = { Tag: 'Created using Mangopay Ruby SDK', Email: 'john.ruby@test.com', FirstName: 'John', LastName: 'Doe', Address: { AddressLine1: '2795 Edgewood Road', City: 'Little Rock', Region: 'Arkansas', PostalCode: '72212', Country: 'US' }, Birthday: 655772400, Nationality: 'FR', CountryOfResidence: 'US', TermsAndConditionsAccepted: true, UserCategory: 'OWNER' } createNaturalUser(myNaturalUser) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.entities.User; import com.mangopay.entities.UserNatural; import com.mangopay.core.enumerations.UserCategory; import com.mangopay.core.enumerations.CountryIso; import java.lang.reflect.Field; public class CreateNaturalUser { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); UserNatural user = new UserNatural(); Address address = new Address(); address.setAddressLine1("27 Rue de Rivoli"); address.setCity("Paris"); address.setRegion("Île-de-France"); address.setPostalCode("75001"); address.setCountry(CountryIso.FR); user.setFirstName("Alex"); user.setLastName("Smith"); user.setEmail("alex.smith@mgp.com"); user.setAddress(address); user.setBirthday(655772400); user.setNationality(CountryIso.FR); user.setCountryOfResidence(CountryIso.FR); user.setTermsAndConditionsAccepted(true); user.setTag("Created using the Mangopay Java SDK"); user.setUserCategory(UserCategory.PAYER); User createUser = mangopay.getUserApi().create(user); System.out.println(String.format("id: %s", createUser.getId())); printObjectFields(createUser); } private static void printObjectFields(Object obj) { Class objClass = obj.getClass(); Field[] fields = objClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object value = field.get(obj); if (value instanceof Address) { System.out.println(field.getName() + ": "); printObjectFields(value); } else { System.out.println(field.getName() + ": " + value); } } catch (IllegalAccessException e) { e.printStackTrace(); } } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id = 'your-client-id' mangopay.apikey = 'your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser from mangopay.utils import Address natural_user = NaturalUser( address = Address( address_line_1 = '42 Maple Road', city = 'London', postal_code = 'WC1X 0AA', country = 'GB' ), first_name = 'Olivia', last_name = 'Turner', birthday = 655772400, nationality = 'GB', country_of_residence = 'GB', person_type = 'NATURAL', tag = 'Created with Mangopay Python SDK', email = 'olivia.turner@test.com', terms_and_conditions_accepted = True, user_category = 'OWNER' ) create_natural_user = natural_user.save() pprint(create_natural_user) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var myUser = new UserNaturalOwnerPostDTO { FirstName = "Dolly", LastName = "Tester", Email = "dolly.nelson@example.com", Address = new Address { AddressLine1 = "17 Rue de la République", City = "Paris", PostalCode = "75001", Country = CountryIso.FR }, Birthday = new DateTime(1985, 3, 15), Nationality = CountryIso.FR, CountryOfResidence = CountryIso.FR, Tag = "Created using the Mangopay .NET SDK" }; var createNaturalUser = await api.Users.CreateOwnerAsync(myUser); string prettyPrint = JsonConvert.SerializeObject(createNaturalUser, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Legal User object ### Description The Legal User object represents a legal entity (legal person) like a company, non-profit or sole proprietor. The actions a user can take are defined by the `UserCategory` and `KYCLevel`. For more information, see the [Categories article](/guides/users/categories). ### Attributes The legally registered address of the entity’s administrative center.\ This object’s sub-parameters are `null` if the `UserCategory` is `PAYER`. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. The address of the entity’s legal representative. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. *Max. length: 255 characters* The registered legal name of the entity. The `Name` value should be the one registered with the relevant national authority. **Returned values:** BUSINESS, PARTNERSHIP, ORGANIZATION, SOLETRADER The type of legal user. For information on which `LegalPersonType` to use for a particular local legal structure, see the verification requirements. **Caution:** Modification of the `LegalPersonType` may result in a verification downgrade. *Max. length: 100 characters* The first name of the entity’s legal representative. *Max. length: 100 characters* The last name of the entity’s legal representative. *Format: A valid email address* The email address of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. The date of birth of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. Returned `null` if `UserCategory` is `PAYER`. The nationality of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. The country of residence of the entity’s legal representative.  The `Id` of the KYC Document whose `Type` is `REGISTRATION_PROOF` if validated for the user. If no registration proof is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `SHAREHOLDERS_DECLARATION` if validated for the user. If no Shareholder Declaration is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `ARTICLES_OF_ASSOCIATION` if validated for the user. If no articles of association document is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `IDENTITY_PROOF` if validated for the user. If no identity proof is validated, then this value is `null`. The registration number of the entity, assigned by the relevant national authority. For information on the expected format for a specific country, see the [Company number](/guides/users/verification/company-number) guide. To validate the format of a number before submitting documents for verification, use [POST Validate the format of User data](/api-reference/user-data-format/validate-user-data-format). Returned `null` if `UserCategory` is `PAYER`. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. **Returned values:** NATURAL, LEGAL The type of the user: * `NATURAL` – Natural users are individuals (natural persons). * `LEGAL` – Legal users are legal entities (legal persons) like companies, non-profits, and sole proprietors. The `PersonType` is defined by the endpoint used to create the user and can’t be modified. *Format: A valid email address* The email address for the entity. **Default value:** `LIGHT` **Returned values:** `LIGHT`, `REGULAR` The verification status of the user set by Mangopay: * `LIGHT` – Unverified, assigned by default to all users. * `REGULAR` – Verified, meaning the user has successfully completed the verification process and had the necessary documents validated by Mangopay. Only users whose `UserCategory` is `OWNER` can submit verification documents for validation. Only users whose `KYCLevel` is `REGULAR` can request payouts. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. The date and time at which the `TermsAndConditionsAccepted` value was set to `true`. Returned `null` if `UserCategory` is `PAYER`. **Default value:** PAYER **Returned values:** PAYER, OWNER, PLATFORM The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. **Returned values:** ACTIVE, CLOSED Internal use only. This field can only be used and updated by Mangopay teams. ### Related resources Users : Introduction and types Users : Categories User life cycle # List all Users GET /v2.01/{ClientId}/users This endpoint returns key information for each user created by the platform. ### Query parameters *Start value: 1* **Default value:** 1 Indicates the index of the page for the pagination. *Max. value: 100* **Default value:** 10 Indicates the number of items returned for each page of the pagination. **Allowed values:** `CreationDate:ASC`, `CreationDate:DESC` Indicates the direction in which to sort the list. ### Responses The list of users created by the platform. The key information on the user created by the platform. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. **Returned values:** NATURAL, LEGAL The type of the user: * `NATURAL` – Natural users are individuals (natural persons). * `LEGAL` – Legal users are legal entities (legal persons) like companies, non-profits, and sole proprietors. The `PersonType` is defined by the endpoint used to create the user and can’t be modified. *Format: A valid email address* The email address of the user. **Default value:** `LIGHT` **Returned values:** `LIGHT`, `REGULAR` The verification status of the user set by Mangopay: * `LIGHT` – Unverified, assigned by default to all users. * `REGULAR` – Verified, meaning the user has successfully completed the verification process and had the necessary documents validated by Mangopay. Only users whose `UserCategory` is `OWNER` can submit verification documents for validation. Only users whose `KYCLevel` is `REGULAR` can request payouts. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. The date and time at which the `TermsAndConditionsAccepted` value was set to `true`. Returned `null` if `UserCategory` is `PAYER`. **Default value:** PAYER **Returned values:** PAYER, OWNER, PLATFORM The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. **Returned values:** ACTIVE, CLOSED Internal use only. This field can only be used and updated by Mangopay teams. ```json 200 [ { "Id": "158026537", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670863988, "PersonType": "LEGAL", "Email": "richard.moulin@email.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": false, "TermsAndConditionsAcceptedDate": null, "UserCategory": "PAYER", "UserStatus": "ACTIVE" }, { "Id": "158025445", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670862022, "PersonType": "NATURAL", "Email": "email@test.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": true, "TermsAndConditionsAcceptedDate": 1670862022, "UserCategory": "OWNER", "UserStatus": "ACTIVE" }, { "Id": "158026721", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670864174, "PersonType": "LEGAL", "Email": "cortney_douglas@yahoo.com", "KYCLevel": "REGULAR", "TermsAndConditionsAccepted": true, "TermsAndConditionsAcceptedDate": 1670864174, "UserCategory": "OWNER", "UserStatus": "ACTIVE" } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $response = $api->Users->GetAll(); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-mangopay-client-id', clientApiKey: 'your-mangopay-api-key', }) const listUsers = async () => { return await mangopay.Users.getAll() .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listUsers() ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listAllUsers() begin response = MangoPay::User.fetch() puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Users #{error.message}" puts "Error details: #{error.details}" return false end end listAllUsers() ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.core.Pagination; import com.mangopay.core.Sorting; import com.mangopay.core.enumerations.SortDirection; import com.mangopay.entities.User; import java.lang.reflect.Field; import java.util.List; public class ListAllUsers { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Pagination pagination = new Pagination(1, 100); Sorting sort = new Sorting(); sort.addField("CreationDate", SortDirection.desc); List users = mangopay.getUserApi().getAll(pagination, sort); for (User user : users) { user = mangopay.getUserApi().get(user.getId()); System.out.println("\nid: " + user.getId()); printObjectFields(user); } } private static void printObjectFields(Object obj) { Class objClass = obj.getClass(); Field[] fields = objClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object value = field.get(obj); if (value instanceof Address) { System.out.println(field.getName() + ": "); printObjectFields(value); } else { System.out.println(field.getName() + ": " + value); } } catch (IllegalAccessException e) { e.printStackTrace(); } } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id = 'your-client-id' mangopay.apikey = 'your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import User users = User.all(page=1, per_page=50) for user in users: pprint(vars(user)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var users = await api.Users.GetAllAsync(new Pagination(1, 100)); string prettyPrint = JsonConvert.SerializeObject(users, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Natural User object ### Description The Natural User object represents an individual (natural person). The actions a user can take are defined by the `UserCategory` and `KYCLevel`. For more information, see the [Categories article](/guides/users/categories). ### Attributes The postal address of the user. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. *Max. length: 100 characters* The first name of the user. *Max. length: 100 characters* The last name of the user. The date of birth of the user. Returned `null` if `UserCategory` is `PAYER`. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. The nationality of the user.  Returned `null` if `UserCategory` is `PAYER`. Returned `null` if `UserCategory` is `PAYER`. The country of residence of the user. *Max. length: 255 characters* The occupation of the user. Returned `null` if `UserCategory` is `PAYER`. The bracket indicating the income of the user. The brackets are: * 1: \< 18K * 2: 18K - 30K * 3: 30K - 50K * 4: 50K - 80K * 5: 80K - 120K * 6: > 120K Returned `null` if `UserCategory` is `PAYER`. The `Id` of the KYC Document whose `Type` is `IDENTITY_PROOF` if validated for the user. If no identity proof is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `ADDRESS_PROOF` if validated for the user. If no address proof is validated, then this value is `null`. This is a deprecated parameter. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. **Returned values:** NATURAL, LEGAL The type of the user: * `NATURAL` – Natural users are individuals (natural persons). * `LEGAL` – Legal users are legal entities (legal persons) like companies, non-profits, and sole proprietors. The `PersonType` is defined by the endpoint used to create the user and can’t be modified. *Format: A valid email address* The email address of the user. **Default value:** `LIGHT` **Returned values:** `LIGHT`, `REGULAR` The verification status of the user set by Mangopay: * `LIGHT` – Unverified, assigned by default to all users. * `REGULAR` – Verified, meaning the user has successfully completed the verification process and had the necessary documents validated by Mangopay. Only users whose `UserCategory` is `OWNER` can submit verification documents for validation. Only users whose `KYCLevel` is `REGULAR` can request payouts. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. The date and time at which the `TermsAndConditionsAccepted` value was set to `true`. Returned `null` if `UserCategory` is `PAYER`. **Default value:** PAYER **Returned values:** PAYER, OWNER, PLATFORM The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. **Returned values:** ACTIVE, CLOSED Internal use only. This field can only be used and updated by Mangopay teams. ### Related resources Users : Introduction and types Users : Categories User life cycle # Update a Legal User PUT /v2.01/{ClientId}/users/legal/{UserId} export const Aml = ({content}) => {content} ; [Read more about the Legal User object →](/api-reference/users/legal-user-object) **Caution – Modification may cause verification downgrade** Modification of some values may cause an Owner user to have a verification document marked as outdated, which may lead to their `KYCLevel` being downgraded from `REGULAR` to `LIGHT`.  The impacted parameters are: * `LegalRepresentativeFirstName` * `LegalRepresentativeLastName` * `LegalRepresentativeBirthday` * `LegalRepresentativeNationality` * `LegalPersonType` For more information, see the Verification downgrade article. **Note – Country-based restrictions apply to users** Due to Mangopay's , it is not possible to create or modify users using blocked countries. For Legal Users, the following parameters are concerned: * `Country` of the `HeadquartersAddress` * `LegalRepresentativeNationality` * `LegalRepresentativeCountryOfResidence` * `Country` of the `LegalRepresentativeAddress` For more information, see the Country restrictions article. ### Path parameters The unique identifier of the user. ### Body parameters Required if `UserCategory` is `OWNER`. Child parameters returned `null` if `UserCategory` is `PAYER`. The legally registered address of the entity’s administrative center. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* Required if the `Address` parameter is sent. The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. The country of the address. The address of the entity’s legal representative. *Max. length: 255 characters* Required if `LegalRepresentativeAddress` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* Required if `LegalRepresentativeAddress` is sent. The city of the address. *Max. length: 255 characters* Required if `LegalRepresentativeAddress` is sent and `Country` is US, CA, or MX. The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* Required if `LegalRepresentativeAddress` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. Required if `LegalRepresentativeAddress` is sent. The country of the address. *Max. length: 255 characters* The registered legal name of the entity. The `Name` value should be the one registered with the relevant national authority. **Allowed values:** BUSINESS, PARTNERSHIP, ORGANIZATION, SOLETRADER The type of legal user. For information on which `LegalPersonType` to use for a particular local legal structure, see the verification requirements. **Caution:** Modification of the `LegalPersonType` may result in a verification downgrade. *Max. length: 100 characters* The first name of the entity’s legal representative. *Max. length: 100 characters* The last name of the entity’s legal representative. *Format: A valid email address* The email address of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`. The date of birth of the entity’s legal representative. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`. The nationality of the entity’s legal representative. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`. The country of residence of the entity’s legal representative. Required if `UserCategory` is `OWNER` and `LegalPersonType` is `BUSINESS`. Returned `null` if `UserCategory` is `PAYER`. The registration number of the entity, assigned by the relevant national authority. For information on the expected format for a specific country, see the [Company number](/guides/users/verification/company-number) guide. To validate the format of a number before submitting documents for verification, use [POST Validate the format of User data](/api-reference/user-data-format/validate-user-data-format). *Max. length: 255 characters* Custom data that you can add to this object. *Format: A valid email address* The email address for the entity. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. **Default value:** PAYER **Allowed values:** PAYER, OWNER The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. ### Responses The legally registered address of the entity’s administrative center.\ This object’s sub-parameters are `null` if the `UserCategory` is `PAYER`. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. The address of the entity’s legal representative. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Max. length: 255 characters* The registered legal name of the entity. The `Name` value should be the one registered with the relevant national authority. **Returned values:** BUSINESS, PARTNERSHIP, ORGANIZATION, SOLETRADER The type of legal user. For information on which `LegalPersonType` to use for a particular local legal structure, see the verification requirements. **Caution:** Modification of the `LegalPersonType` may result in a verification downgrade. *Max. length: 100 characters* The first name of the entity’s legal representative. *Max. length: 100 characters* The last name of the entity’s legal representative. *Format: A valid email address* The email address of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. The date of birth of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. Returned `null` if `UserCategory` is `PAYER`. The nationality of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. The country of residence of the entity’s legal representative. The `Id` of the KYC Document whose `Type` is `REGISTRATION_PROOF` if validated for the user. If no registration proof is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `SHAREHOLDERS_DECLARATION` if validated for the user. If no Shareholder Declaration is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `ARTICLES_OF_ASSOCIATION` if validated for the user. If no articles of association document is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `IDENTITY_PROOF` if validated for the user. If no identity proof is validated, then this value is `null`. Required if `UserCategory` is `OWNER` and `LegalPersonType` is `BUSINESS`. Returned `null` if `UserCategory` is `PAYER`. The registration number of the entity, assigned by the relevant national authority. For information on the expected format for a specific country, see the [Company number](/guides/users/verification/company-number) guide. To validate the format of a number before submitting documents for verification, use [POST Validate the format of User data](/api-reference/user-data-format/validate-user-data-format). The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. **Returned values:** NATURAL, LEGAL The type of the user: * `NATURAL` – Natural users are individuals (natural persons). * `LEGAL` – Legal users are legal entities (legal persons) like companies, non-profits, and sole proprietors. The `PersonType` is defined by the endpoint used to create the user and can’t be modified. *Format: A valid email address* The email address for the entity. **Default value:** `LIGHT` **Returned values:** `LIGHT`, `REGULAR` The verification status of the user set by Mangopay: * `LIGHT` – Unverified, assigned by default to all users. * `REGULAR` – Verified, meaning the user has successfully completed the verification process and had the necessary documents validated by Mangopay. Only users whose `UserCategory` is `OWNER` can submit verification documents for validation. Only users whose `KYCLevel` is `REGULAR` can request payouts. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. The date and time at which the `TermsAndConditionsAccepted` value was set to `true`. Returned `null` if `UserCategory` is `PAYER`. **Default value:** PAYER **Returned values:** PAYER, OWNER, PLATFORM The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. **Returned values:** ACTIVE, CLOSED Internal use only. This field can only be used and updated by Mangopay teams. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "2633f582-b269-499f-bef0-8ae378b3be35", "Date": 1707907057.0, "errors": { "UserCategory": "A User OWNER can't be modified to a user PAYER" } } ``` ```json { "Message": "The user cannot revoke the terms and conditions acceptance", "Type": "invalid_action", "Id": "5d0f2332-3808-4235-ab62-2ebac79f213c", "Date": 1690290952.0, "errors": null } ``` ```json { "Message": "User must accept the terms and conditions before account creation or modification.", "Type": "user_hasnt_accepted_terms_and_conditions", "Id": "dbbc752b-6f9f-4248-a4bb-04ee0ba7b4b7", "Date": 1730810728, "errors": null } ``` ```json 200 - Payer { "HeadquartersAddress": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null }, "LegalRepresentativeAddress": { "AddressLine1": "34 rue des Entreprises", "AddressLine2": "Appartement 14", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Name": "Best Business", "LegalPersonType": "BUSINESS", "LegalRepresentativeFirstName": "Richard", "LegalRepresentativeLastName": "Moulin", "LegalRepresentativeEmail": null, "LegalRepresentativeBirthday": null, "LegalRepresentativeNationality": null, "LegalRepresentativeCountryOfResidence": null, "ProofOfRegistration": null, "ShareholderDeclaration": null, "Statute": null, "LegalRepresentativeProofOfIdentity": null, "CompanyNumber": null, "Id": "158026537", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670863988, "PersonType": "LEGAL", "Email": "richard.moulin@email.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": false, "TermsAndConditionsAcceptedDate": null, "UserCategory": "PAYER", "UserStatus": "ACTIVE" } ``` ```json 200 - Owner { "HeadquartersAddress": { "AddressLine1": "34 rue des Entreprises", "AddressLine2": "Batiment B", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "LegalRepresentativeAddress": { "AddressLine1": "12032 Wiza Way", "AddressLine2": "Mitchell Drive", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Name": "Best Business", "LegalPersonType": "BUSINESS", "LegalRepresentativeFirstName": "Cedrick", "LegalRepresentativeLastName": "Dickinson", "LegalRepresentativeEmail": "Agustin.Ullrich@yahoo.com", "LegalRepresentativeBirthday": 652117514, "LegalRepresentativeNationality": "FR", "LegalRepresentativeCountryOfResidence": "FR", "ProofOfRegistration": null, "ShareholderDeclaration": null, "Statute": null, "LegalRepresentativeProofOfIdentity": null, "CompanyNumber": "123456789", "Id": "158026721", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670864174, "PersonType": "LEGAL", "Email": "cortney_douglas@yahoo.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": true, "TermsAndConditionsAcceptedDate": 1670864174, "UserCategory": "OWNER", "UserStatus": "ACTIVE" } ``` ```json REST { "HeadquartersAddress": { "AddressLine1": "34 rue des Entreprises", "AddressLine2": "Batiment B", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "LegalRepresentativeAddress": { "AddressLine1": "12032 Wiza Way", "AddressLine2": "Mitchell Drive", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Name": "Best Business", "LegalPersonType": "BUSINESS", "LegalRepresentativeFirstName": "Cedrick", "LegalRepresentativeLastName": "Dickinson", "LegalRepresentativeEmail": "Agustin.Ullrich@yahoo.com", "LegalRepresentativeBirthday": 652117514, "LegalRepresentativeNationality": "FR", "LegalRepresentativeCountryOfResidence": "FR", "CompanyNumber": "123456789", "Tag": "Created using MANGOPAY API Collection Postman", "Email": "cortney_douglas@yahoo.com", "TermsAndConditionsAccepted": true, "UserCategory": "OWNER" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '198675834'; $user = $api->Users->Get($userId); $user->Name = 'Smith corp'; $user->Email = 'smithupdated@example.com'; $user->LegalPersonType = \MangoPay\LegalPersonType::Business; $address = new \MangoPay\Address(); $address->AddressLine1 = 'Rue des plantes'; $address->AddressLine2 = '2nd floor'; $address->City = 'Paris'; $address->Country = 'FR'; $address->PostalCode = '75000'; $address->Region = 'IDF'; $user->HeadquartersAddress = $address; $user->LegalRepresentativeAddress = $address; $user->LegalRepresentativeFirstName = 'Alex'; $user->LegalRepresentativeLastName = 'Smith'; $user->LegalRepresentativeEmail = 'asmith@example.com'; $user->LegalRepresentativeBirthday = mktime(0, 0, 0, 12, 21, 1975); $user->LegalRepresentativeNationality = 'FR'; $user->LegalRepresentativeCountryOfResidence = 'FR'; $user->CompanyNumber = 'LU123456'; $user->Tag = 'Updated using Mangopay PHP SDK'; $user->TermsAndConditionsAccepted = true; $user->UserCategory = 'Owner'; $response = $api->Users->Update($user); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myLegalUser = { Id: '175370690', HeadquartersAddress: { AddressLine1: '57 Main Road', AddressLine2: null, City: 'London', PostalCode: 'NW1 4RG', Country: 'GB', }, LegalRepresentativeAddress: { AddressLine1: '35 London Road', AddressLine2: null, City: 'London', PostalCode: 'NW1 0AA', Country: 'GB', }, Name: 'Executive Consulting', LegalPersonType: 'BUSINESS', LegalRepresentativeFirstName: 'Juliana', LegalRepresentativeLastName: 'Dunn', LegalRepresentativeEmail: 'juliana.dunn@example.com', LegalRepresentativeBirthday: 188301600, LegalRepresentativeNationality: 'GB', LegalRepresentativeCountryOfResidence: 'GB', CompanyNumber: '12345678', Tag: 'Created using the Mangopay NodeJS SDK', Email: 'executive.consulting@example.com', TermsAndConditionsAccepted: true, UserCategory: 'OWNER', PersonType: 'LEGAL', } const updateLegalUser = async (legalUser) => { return await mangopay.Users.update(legalUser) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } updateLegalUser(myLegalUser) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def updateLegalUser(legalUserId, legalUserObject) begin response = MangoPay::LegalUser.update(legalUserId, legalUserObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to update User: #{error.message}" puts "Error details: #{error.details}" return false end end myLegalUser = { Id: '194338122', HeadquartersAddress: { AddressLine1: '57 Main Road', AddressLine2: 'PB 456', City: 'London', PostalCode: 'NW1 4RG', Country: 'GB', }, LegalRepresentativeAddress: { AddressLine1: '35 London Road', City: 'London', PostalCode: 'NW1 0AA', Country: 'GB', }, Name: 'Executive Consulting', LegalPersonType: 'BUSINESS', LegalRepresentativeFirstName: 'Juliana', LegalRepresentativeLastName: 'Dunn', LegalRepresentativeEmail: 'juliana.dunn@example.com', LegalRepresentativeBirthday: 188301600, LegalRepresentativeNationality: 'GB', LegalRepresentativeCountryOfResidence: 'GB', CompanyNumber: '12345678', Tag: 'Updated using the Mangopay Ruby SDK', Email: 'executive.consulting@example.com', TermsAndConditionsAccepted: true, UserCategory: 'OWNER', PersonType: 'LEGAL' } updateLegalUser(myLegalUser[:Id], myLegalUser) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.entities.User; import com.mangopay.entities.UserLegal; import java.lang.reflect.Field; public class UpdateLegalUser { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); UserLegal myUser = mangopay.getUserApi().getLegal("user_m_01HRS7PQEGE4YGCM1AZK1ENTGE"); myUser.setName("C. Dickinson"); myUser.setEmail("best@dickinson.com"); User updateUser = mangopay.getUserApi().update(myUser); System.out.println(String.format("id: %s", updateUser.getId())); printObjectFields(updateUser); } private static void printObjectFields(Object obj) { Class objClass = obj.getClass(); Field[] fields = objClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object value = field.get(obj); if (value instanceof Address) { System.out.println(field.getName() + ": "); printObjectFields(value); } else { System.out.println(field.getName() + ": " + value); } } catch (IllegalAccessException e) { e.printStackTrace(); } } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id = 'your-client-id' mangopay.apikey = 'your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import LegalUser legal_user = LegalUser( id = '210602889', # ID of legal user to update legal_person_type = 'SOLETRADER' # Add elements with update details ) update_legal_user = legal_user.save() pprint(update_legal_user) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2V0P9B1WCX46GEBDWCTXNQ0"; var myUser = new UserLegalPutDTO { TermsAndConditionsAccepted = true, Tag = "Updated using the Mangopay .NET SDK" }; var updateNaturalUser = await api.Users.UpdateLegalAsync(myUser, userId); string prettyPrint = JsonConvert.SerializeObject(updateNaturalUser, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Update a Natural User PUT /v2.01/{ClientId}/users/natural/{UserId} export const Aml = ({content}) => {content} ; [Read more about the Natural User object →](/api-reference/users/natural-user-object) **Caution – Modification may cause verification downgrade** Modification of some values may cause an Owner user to have a verification document marked as outdated, which may lead to their `KYCLevel` being downgraded from `REGULAR` to `LIGHT`.  The impacted parameters are: * `FirstName` * `LastName` * `Birthday` * `Nationality` For more information, see the Verification downgrade article. **Note – Country-based restrictions apply to users** Due to Mangopay's , it is not possible to create or modify users using blocked countries. For Natural Users, the following parameters are concerned: * `Nationality` * `CountryOfResidence` * `Country` of the `Address` For more information, see the Country restrictions article. ### Path parameters The unique identifier of the user. ### Body parameters The postal address of the user. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. Required if `Address` is sent. The country of the address. *Max. length: 100 characters* The first name of the user. *Max. length: 100 characters* The last name of the user. Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`. The date of birth of the user. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. **Allowed values:** Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats)). Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`. The nationality of the user. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`. The country of residence of the user. *Max. length: 255 characters* The occupation of the user. Returned `null` if `UserCategory` is `PAYER`. **Allowed values:** 1, 2, 3, 4, 5, 6 The bracket indicating the income of the user. The brackets are: * 1: \< 18K * 2: 18K - 30K * 3: 30K - 50K * 4: 50K - 80K * 5: 80K - 120K * 6: > 120K Returned `null` if `UserCategory` is `PAYER`. *Max. length: 255 characters* Custom data that you can add to this object. *Format: A valid email address* The email address of the user. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. **Default value:** PAYER **Allowed values:** PAYER, OWNER The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. ### Responses The postal address of the user. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Max. length: 100 characters* The first name of the user. *Max. length: 100 characters* The last name of the user. The date of birth of the user. Returned `null` if `UserCategory` is `PAYER`. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. Returned `null` if `UserCategory` is `PAYER`. The nationality of the user. Returned `null` if `UserCategory` is `PAYER`. The country of residence of the user. *Max. length: 255 characters* The occupation of the user. Returned `null` if `UserCategory` is `PAYER`. The bracket indicating the income of the user. The brackets are: * 1: \< 18K * 2: 18K - 30K * 3: 30K - 50K * 4: 50K - 80K * 5: 80K - 120K * 6: > 120K Returned `null` if `UserCategory` is `PAYER`. The `Id` of the KYC Document whose `Type` is `IDENTITY_PROOF` if validated for the user. If no identity proof is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `ADDRESS_PROOF` if validated for the user. If no address proof is validated, then this value is `null`. This is a deprecated parameter. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. **Returned values:** NATURAL, LEGAL The type of the user: * `NATURAL` – Natural users are individuals (natural persons). * `LEGAL` – Legal users are legal entities (legal persons) like companies, non-profits, and sole proprietors. The `PersonType` is defined by the endpoint used to create the user and can’t be modified. *Format: A valid email address* The email address of the user. **Default value:** `LIGHT` **Returned values:** `LIGHT`, `REGULAR` The verification status of the user set by Mangopay: * `LIGHT` – Unverified, assigned by default to all users. * `REGULAR` – Verified, meaning the user has successfully completed the verification process and had the necessary documents validated by Mangopay. Only users whose `UserCategory` is `OWNER` can submit verification documents for validation. Only users whose `KYCLevel` is `REGULAR` can request payouts. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. The date and time at which the `TermsAndConditionsAccepted` value was set to `true`. Returned `null` if `UserCategory` is `PAYER`. **Default value:** PAYER **Returned values:** PAYER, OWNER, PLATFORM The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. **Returned values:** ACTIVE, CLOSED Internal use only. This field can only be used and updated by Mangopay teams. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "2633f582-b269-499f-bef0-8ae378b3be35", "Date": 1707907057.0, "errors": { "UserCategory": "A User OWNER can't be modified to a user PAYER" } } ``` ```json { "Message": "The user cannot revoke the terms and conditions acceptance", "Type": "invalid_action", "Id": "f3126c80-1e1f-4f89-a031-237bf997759f", "Date": 1690290675.0, "errors": null } ``` ```json { "Message": "User must accept the terms and conditions before account creation or modification.", "Type": "user_hasnt_accepted_terms_and_conditions", "Id": "dbbc752b-6f9f-4248-a4bb-04ee0ba7b4b7", "Date": 1730810728, "errors": null } ``` ```json 200 - Payer { "Address": { "AddressLine1": "3 rue des Plantes", "AddressLine2": "Appartement 7", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "FirstName": "Hugo", "LastName": "Garnier", "Birthday": null, "Nationality": null, "CountryOfResidence": null, "Occupation": null, "IncomeRange": null, "ProofOfIdentity": null, "ProofOfAddress": null, "Capacity": "NORMAL", "Id": "user_m_01J87ZBSP8FCVDSCB8PGWQHZPF", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670861869, "PersonType": "NATURAL", "Email": "email@test.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": false, "TermsAndConditionsAcceptedDate": null, "UserCategory": "PAYER", "UserStatus": "ACTIVE" } ``` ```json 200 - Owner { "Address": { "AddressLine1": "3 rue des Plantes", "AddressLine2": "Appartement 7", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "FirstName": "Sophia", "LastName": "Garnier", "Birthday": 652117514, "Nationality": "FR", "CountryOfResidence": "FR", "Occupation": null, "IncomeRange": null, "ProofOfIdentity": null, "ProofOfAddress": null, "Capacity": "NORMAL", "Id": "user_m_01J87ZBSP8FCVDSCB8PGWQHZPF", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670862022, "PersonType": "NATURAL", "Email": "email@test.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": true, "TermsAndConditionsAcceptedDate": 1670862022, "UserCategory": "OWNER", "UserStatus": "ACTIVE" } ``` ```json REST { "Address":{ "AddressLine1":"3 rue des Plantes", "AddressLine2":"Appartement 7", "City":"Paris", "Region":"Ile-de-France", "PostalCode":"75001", "Country":"FR" }, "FirstName":"Hugo", "LastName":"Garnier", "Birthday":652117514, "Nationality":"FR", "CountryOfResidence":"FR", "Occupation":null, "IncomeRange":null, "Tag":"Created using MANGOPAY API Collection Postman", "Email":"email@test.com", "TermsAndConditionsAccepted":false, "UserCategory":"PAYER" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '199260628'; $user = $api->Users->Get($userId); $user->FirstName = 'Alex'; $user->LastName = 'Smith'; $user->Email = 'smithupdated@example.com'; $address = new \MangoPay\Address(); $address->AddressLine1 = 'Rue des plantes'; $address->AddressLine2 = '2nd floor'; $address->City = 'Paris'; $address->Country = 'FR'; $address->PostalCode = '75000'; $address->Region = 'IDF'; $user->Address = $address; $user->Birthday = mktime(0, 0, 0, 12, 21, 1975); $user->Nationality = 'FR'; $user->CountryOfResidence = 'FR'; $user->Tag = 'Updated using Mangopay PHP SDK'; $user->TermsAndConditionsAccepted = true; $user->UserCategory = 'Owner'; $response = $api->Users->Update($user); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myNaturalUser = { Id: '171666652', Address: { AddressLine1: '15 Edgeware Road', AddressLine2: null, City: 'Manchester', Region: null, PostalCode: 'M1 4HG', Country: 'GB', }, FirstName: 'Rupert', LastName: 'Bear', Birthday: 656640000, Nationality: 'GB', CountryOfResidence: 'GB', Tag: 'Created using the Mangopay NodeJS SDK', Email: 'rupert.bear@example.com', TermsAndConditionsAccepted: true, UserCategory: 'OWNER', PersonType: 'NATURAL', } const updateNaturalUser = async (user) => { return await mangopay.Users.update(user) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } updateNaturalUser(myNaturalUser) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def updateNaturalUser(naturalUserId, naturalUserObject) begin response = MangoPay::NaturalUser.update(naturalUserId, naturalUserObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to update User: #{error.message}" puts "Error details: #{error.details}" return false end end myNaturalUser = { Id: '194554499', Tag: 'Updated using Mangopay Ruby SDK', Email: 'john.ruby@test.com', FirstName: 'John', LastName: 'Doe', Address: { AddressLine1: '2795 Edgewood Road', City: 'Little Rock', Region: 'Arkansas', PostalCode: '72212', Country: 'US' }, Birthday: 655772400, Nationality: 'FR', CountryOfResidence: 'US', TermsAndConditionsAccepted: true, UserCategory: 'OWNER' } updateNaturalUser(myNaturalUser[:Id], myNaturalUser) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.entities.User; import com.mangopay.entities.UserNatural; import java.lang.reflect.Field; public class UpdateNaturalUser { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); UserNatural myUser = mangopay.getUserApi().getNatural("user_m_01HR9SZTXDRY1PCFHSJFAPC0YJ"); myUser.setFirstName("Jasmine"); myUser.setLastName("Patel"); myUser.setEmail("jasmine.patel@example.com"); User updateUser = mangopay.getUserApi().update(myUser); System.out.println(String.format("id: %s", updateUser.getId())); printObjectFields(updateUser); } private static void printObjectFields(Object obj) { Class objClass = obj.getClass(); Field[] fields = objClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object value = field.get(obj); if (value instanceof Address) { System.out.println(field.getName() + ": "); printObjectFields(value); } else { System.out.println(field.getName() + ": " + value); } } catch (IllegalAccessException e) { e.printStackTrace(); } } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id = 'your-client-id' mangopay.apikey = 'your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser from mangopay.utils import Address natural_user = NaturalUser( id = '210602976', # ID of natural user to update address = Address( # Add elements with update details address_line_1 = '2 Prince Street', city = 'Leeds', postal_code = 'LS1 3CA', country = 'GB' ) ) update_natural_user = natural_user.save() pprint(update_natural_user) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var myUser = new UserNaturalPutDTO { TermsAndConditionsAccepted = true }; var updateNaturalUser = await api.Users.UpdateNaturalAsync(myUser, userId); string prettyPrint = JsonConvert.SerializeObject(updateNaturalUser, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a User GET /v2.01/{ClientId}/users/{UserId} ### Path parameters The unique identifier of the user. ### Responses The postal address of the user. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Max. length: 100 characters* The first name of the user. *Max. length: 100 characters* The last name of the user. The date of birth of the user. Returned `null` if `UserCategory` is `PAYER`. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. Returned `null` if `UserCategory` is `PAYER`. The nationality of the user. Returned `null` if `UserCategory` is `PAYER`. The country of residence of the user. *Max. length: 255 characters* The occupation of the user. Returned `null` if `UserCategory` is `PAYER`. The bracket indicating the income of the user. The brackets are: * 1: \< 18K * 2: 18K - 30K * 3: 30K - 50K * 4: 50K - 80K * 5: 80K - 120K * 6: > 120K Returned `null` if `UserCategory` is `PAYER`. The `Id` of the KYC Document whose `Type` is `IDENTITY_PROOF` if validated for the user. If no identity proof is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `ADDRESS_PROOF` if validated for the user. If no address proof is validated, then this value is `null`. This is a deprecated parameter. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. **Returned values:** NATURAL, LEGAL The type of the user: * `NATURAL` – Natural users are individuals (natural persons). * `LEGAL` – Legal users are legal entities (legal persons) like companies, non-profits, and sole proprietors. The `PersonType` is defined by the endpoint used to create the user and can’t be modified. *Format: A valid email address* The email address of the user. **Default value:** `LIGHT` **Returned values:** `LIGHT`, `REGULAR` The verification status of the user set by Mangopay: * `LIGHT` – Unverified, assigned by default to all users. * `REGULAR` – Verified, meaning the user has successfully completed the verification process and had the necessary documents validated by Mangopay. Only users whose `UserCategory` is `OWNER` can submit verification documents for validation. Only users whose `KYCLevel` is `REGULAR` can request payouts. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. The date and time at which the `TermsAndConditionsAccepted` value was set to `true`. Returned `null` if `UserCategory` is `PAYER`. **Default value:** PAYER **Returned values:** PAYER, OWNER, PLATFORM The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. **Returned values:** ACTIVE, CLOSED Internal use only. This field can only be used and updated by Mangopay teams. The legally registered address of the entity’s administrative center.\ This object’s sub-parameters are `null` if the `UserCategory` is `PAYER`. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. The address of the entity’s legal representative. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Max. length: 255 characters* The registered legal name of the entity. The `Name` value should be the one registered with the relevant national authority. **Returned values:** BUSINESS, PARTNERSHIP, ORGANIZATION, SOLETRADER The type of legal user. For information on which `LegalPersonType` to use for a particular local legal structure, see the verification requirements. **Caution:** Modification of the `LegalPersonType` may result in a verification downgrade. *Max. length: 100 characters* The first name of the entity’s legal representative. *Max. length: 100 characters* The last name of the entity’s legal representative. *Format: A valid email address* The email address of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. The date of birth of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. **Note:** Ensure this Unix timestamp accounts for your timezone to avoid midnight being interpreted as the day before. Returned `null` if `UserCategory` is `PAYER`. The nationality of the entity’s legal representative. Returned `null` if `UserCategory` is `PAYER`. The country of residence of the entity’s legal representative. The `Id` of the KYC Document whose `Type` is `REGISTRATION_PROOF` if validated for the user. If no registration proof is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `SHAREHOLDERS_DECLARATION` if validated for the user. If no Shareholder Declaration is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `ARTICLES_OF_ASSOCIATION` if validated for the user. If no articles of association document is validated, then this value is `null`. The `Id` of the KYC Document whose `Type` is `IDENTITY_PROOF` if validated for the user. If no identity proof is validated, then this value is `null`. Required if `UserCategory` is `OWNER` and `LegalPersonType` is `BUSINESS`. Returned `null` if `UserCategory` is `PAYER`. The registration number of the entity, assigned by the relevant national authority. For information on the expected format for a specific country, see the [Company number](/guides/users/verification/company-number) guide. To validate the format of a number before submitting documents for verification, use [POST Validate the format of User data](/api-reference/user-data-format/validate-user-data-format). The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. **Returned values:** NATURAL, LEGAL The type of the user: * `NATURAL` – Natural users are individuals (natural persons). * `LEGAL` – Legal users are legal entities (legal persons) like companies, non-profits, and sole proprietors. The `PersonType` is defined by the endpoint used to create the user and can’t be modified. *Format: A valid email address* The email address for the entity. **Default value:** `LIGHT` **Returned values:** `LIGHT`, `REGULAR` The verification status of the user set by Mangopay: * `LIGHT` – Unverified, assigned by default to all users. * `REGULAR` – Verified, meaning the user has successfully completed the verification process and had the necessary documents validated by Mangopay. Only users whose `UserCategory` is `OWNER` can submit verification documents for validation. Only users whose `KYCLevel` is `REGULAR` can request payouts. **Default value:** false Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract).\ If this value is not `true`, Owners will be limited in their use of Mangopay. The date and time at which the `TermsAndConditionsAccepted` value was set to `true`. Returned `null` if `UserCategory` is `PAYER`. **Default value:** PAYER **Returned values:** PAYER, OWNER, PLATFORM The category of the user: * `PAYER` – User who can only make pay-ins to their wallet and transfers to other wallets. * `OWNER` – User who can do everything a Payer can, plus receive transfers to their wallet. To request payouts, an Owner user’s `KYCLevel` must be `REGULAR`. For more information, see the Verification section. **Returned values:** ACTIVE, CLOSED Internal use only. This field can only be used and updated by Mangopay teams. ```json 200 - Natural Payer { "Address": { "AddressLine1": "3 rue des Plantes", "AddressLine2": "Appartement 7", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "FirstName": "Sophia", "LastName": "Garnier", "Birthday": null, "Nationality": null, "CountryOfResidence": null, "Occupation": null, "IncomeRange": null, "ProofOfIdentity": null, "ProofOfAddress": null, "Capacity": "NORMAL", "Id": "user_m_01J87ZBSP8FCVDSCB8PGWQHZPF", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670861981, "PersonType": "NATURAL", "Email": "sophia.garnier@test.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": false, "TermsAndConditionsAcceptedDate": null, "UserCategory": "PAYER", "UserStatus": "ACTIVE" } ``` ```json 200 - Natural Owner { "Address": { "AddressLine1": "3 rue des Plantes", "AddressLine2": "Appartement 7", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "FirstName": "Sophia", "LastName": "Garnier", "Birthday": 652117514, "Nationality": "FR", "CountryOfResidence": "FR", "Occupation": null, "IncomeRange": null, "ProofOfIdentity": null, "ProofOfAddress": null, "Capacity": "NORMAL", "PhoneNumber": null, "PhoneNumberCountry": null, "Id": "user_m_01J87ZBSP8FCVDSCB8PGWQHZPF", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1726844626, "PersonType": "NATURAL", "Email": "sophia.garnier@test.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": true, "TermsAndConditionsAcceptedDate": 1726844626, "UserCategory": "OWNER", "UserStatus": "ACTIVE" } ``` ```json 200 - Legal Payer { "HeadquartersAddress": { "AddressLine1": null, "AddressLine2": null, "City": null, "Region": null, "PostalCode": null, "Country": null }, "LegalRepresentativeAddress": { "AddressLine1": "34 rue des Entreprises", "AddressLine2": "Appartement 14", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Name": "Best Business", "LegalPersonType": "BUSINESS", "LegalRepresentativeFirstName": "Richard", "LegalRepresentativeLastName": "Moulin", "LegalRepresentativeEmail": null, "LegalRepresentativeBirthday": null, "LegalRepresentativeNationality": null, "LegalRepresentativeCountryOfResidence": null, "ProofOfRegistration": null, "ShareholderDeclaration": null, "Statute": null, "LegalRepresentativeProofOfIdentity": null, "CompanyNumber": null, "Id": "user_m_01J87ZBSP8FCVDSCB8PGWQHZPF", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670863988, "PersonType": "LEGAL", "Email": "richard.moulin@email.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": false, "TermsAndConditionsAcceptedDate": null, "UserCategory": "PAYER", "UserStatus": "ACTIVE" } ``` ```json 200 - Legal Owner { "HeadquartersAddress": { "AddressLine1": "34 rue des Entreprises", "AddressLine2": "Batiment B", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "LegalRepresentativeAddress": { "AddressLine1": "12032 Wiza Way", "AddressLine2": "Mitchell Drive", "City": "Paris", "Region": "Ile-de-France", "PostalCode": "75001", "Country": "FR" }, "Name": "Best Business", "LegalPersonType": "BUSINESS", "LegalRepresentativeFirstName": "Cedrick", "LegalRepresentativeLastName": "Dickinson", "LegalRepresentativeEmail": "Agustin.Ullrich@yahoo.com", "LegalRepresentativeBirthday": 652117514, "LegalRepresentativeNationality": "FR", "LegalRepresentativeCountryOfResidence": "FR", "ProofOfRegistration": null, "ShareholderDeclaration": null, "Statute": null, "LegalRepresentativeProofOfIdentity": null, "CompanyNumber": "123456789", "Id": "user_m_01J87ZBSP8FCVDSCB8PGWQHZPF", "Tag": "Created using MANGOPAY API Collection Postman", "CreationDate": 1670864174, "PersonType": "LEGAL", "Email": "cortney_douglas@yahoo.com", "KYCLevel": "LIGHT", "TermsAndConditionsAccepted": true, "TermsAndConditionsAcceptedDate": 1670864174, "UserCategory": "OWNER", "UserStatus": "ACTIVE" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '198675834'; $response = $user = $api->Users->Get($userId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '146476890', } const getUser = async (userId) => { return await mangopay.Users.get(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getUser(user.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewUser(userId) begin response = MangoPay::User.fetch(userId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch User: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '146476890' } viewUser(myUser[:Id]) ``` ```java Java import com.mangopay.MangoPayApi; import com.mangopay.core.Address; import com.mangopay.entities.User; import java.lang.reflect.Field; public class ViewUser { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); User user = mangopay.getUserApi().get("user_m_01HRS7PQEGE4YGCM1AZK1ENTGE"); System.out.println(String.format("id: %s", user.getId())); printObjectFields(user); } private static void printObjectFields(Object obj) { Class objClass = obj.getClass(); Field[] fields = objClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object value = field.get(obj); if (value instanceof Address) { System.out.println(field.getName() + ": "); printObjectFields(value); } else { System.out.println(field.getName() + ": " + value); } } catch (IllegalAccessException e) { e.printStackTrace(); } } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id = 'your-client-id' mangopay.apikey = 'your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser natural_user = NaturalUser( id = '210679673' ) try: view_natural_user = NaturalUser.get(natural_user.id) pprint(vars(view_natural_user)) except NaturalUser.DoesNotExist: print('The user {} does not exist'.format(natural_user.id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var viewUser = await api.Users.GetAsync(userId); string prettyPrint = JsonConvert.SerializeObject(viewUser, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Create a Wallet POST /v2.01/{ClientId}/wallets **Best practice – Create one wallet per user and currency** While Mangopay authorizes you to create as many wallets as required, we recommend you create one wallet per user and currency. **Caution – Currency not updatable** The `Currency` of a created wallet cannot be changed. ### Body parameters *Max. length: 255 characters* The description of the wallet. It can be a name, the type, or anything else that can help you clearly identify the wallet on the platform (and for your end users). *string* The unique identifier of the user owning the wallet. **Note:** Only one owner can be defined; this array accepts only one string. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallet. *Max. length: 255 characters* Custom data that you can add to this object.\ For wallets, you can use this parameter to identify the corresponding end user in your platform. ### Responses *Max. length: 255 characters* The description of the wallet. It can be a name, the type, or anything else that can help you clearly identify the wallet on the platform (and for your end users). *string* The unique identifier of the user owning the wallet. **Note:** Only one owner can be defined; this array accepts only one string. The unique identifier of the object. The current balance of the wallet. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the balance. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallet. **Returned values:** `DEFAULT`, `FEES`, `CREDIT` The type of funds in the wallet: * `DEFAULT` – Regular funds for user-owned wallets. Wallets with this `FundsType` cannot have a negative balance. * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. *Max. length: 255 characters* Custom data that you can add to this object.\ For wallets, you can use this parameter to identify the corresponding end user in your platform. The date and time at which the wallet was created. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "c09ebc81-24d6-47ef-8cef-d491209faee8", "Date": 1702037849.0, "errors": { "Owners": "Owners doesn't support multiple values for the moment" } } ``` ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "d3370a5b-af3c-4b99-9e6e-6c7dea052e19", "Date": 1690284549.0, "errors": { "Currency": "Currency: The currency AZN is not available" } } ``` ```json 200 { "Description": "Description of the user's wallet", "Owners": [ "user_m_01J18HZSACR1EMYNY1TBS8KTJD" ], "Id": "wlt_m_01J6EN9X1Q0PGM0CJ9QD197CRG", "Balance": { "Currency": "EUR", "Amount": 0 }, "Currency": "EUR", "FundsType": "DEFAULT", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1724921476 } ``` ```json REST { "Description": "Description of the user's wallet", "Owners": [ "user_m_01J18HZSACR1EMYNY1TBS8KTJD" ], "Currency": "EUR", "Tag": "Created using Mangopay API Postman Collection", } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $wallet = new \MangoPay\Wallet(); $wallet->Owners = ['198675238']; $wallet->Currency = 'EUR'; $wallet->Description = 'EUR Wallet'; $wallet->Tag = 'Created with Mangopay PHP SDK'; $response = $api->Wallets->Create($wallet); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key' }) let userId = '165863393' let wallet = { Owners: [userId], Currency: 'EUR', Description: 'Wallet in EUR', Tag: 'Created using Mangopay NodeJS SDK' } const createWallet = async (walletObject) => { return await mangopay.Wallets.create(wallet) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createWallet(wallet) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createWallet(walletObject) begin response = MangoPay::Wallet.create(walletObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create wallet: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '146476890', } myWallet = { Owners: [myUser[:Id]], Currency: 'EUR', Description: 'Wallet in EUR', Tag: 'Created using Mangopay Ruby SDK' } createWallet(myWallet) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.Wallet; public class CreateWallet { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); ArrayList owner = new ArrayList(); owner.add("user_m_01HSAVT2J0REPGV5ZRPNK079K9"); Wallet wallet = new Wallet(); wallet.setOwners(owner); wallet.setCurrency(CurrencyIso.EUR); wallet.setDescription("EUR Wallet"); wallet.setTag("Created using the Mangopay Java SDK"); Wallet createWallet = mangopay.getWalletApi().create(wallet); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(updateUbo); System.out.println(createWallet); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Wallet natural_user = NaturalUser.get('213753890') user_wallet = Wallet( owners=[natural_user], description='Wallet of Rhoda Keeling', currency='EUR', tag="Created using the Mangopay Python SDK" ) create_wallet = user_wallet.save() pprint(create_wallet) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var wallet = new WalletPostDTO( [userId], "Wallet in GBP", CurrencyIso.GBP ); var createWallet = await api.Wallets.CreateAsync(wallet); string prettyPrint = JsonConvert.SerializeObject(createWallet, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # List Wallets for a User GET /v2.01/{ClientId}/users/{UserId}/wallets ### Path parameters The unique identifier of the user. ### Responses The list of wallets created by the platform. The Wallet object created by the platform. *Max. length: 255 characters* The description of the wallet. It can be a name, the type, or anything else that can help you clearly identify the wallet on the platform (and for your end users). *string* The unique identifier of the user owning the wallet. **Note:** Only one owner can be defined; this array accepts only one string. The current balance of the wallet. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the balance. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallet. **Returned values:** `DEFAULT`, `FEES`, `CREDIT` The type of funds in the wallet: * `DEFAULT` – Regular funds for user-owned wallets. Wallets with this `FundsType` cannot have a negative balance. * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For wallets, you can use this parameter to identify the corresponding end user in your platform. The date and time at which the wallet was created. ```json 200 [ { "Description": "Description of the user's wallet", "Owners": [ "user_m_01J18HZSACR1EMYNY1TBS8KTJD" ], "Id": "wlt_m_01J18J1SQGG6KXNM3F8GD674TP", "Balance": { "Currency": "EUR", "Amount": 99800 }, "Currency": "EUR", "FundsType": "DEFAULT", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1719348029 }, { "Description": "Description of the user's wallet", "Owners": [ "user_m_01J18HZSACR1EMYNY1TBS8KTJD" ], "Id": "wlt_m_01J6EN9X1Q0PGM0CJ9QD197CRG", "Balance": { "Currency": "GBP", "Amount": 0 }, "Currency": "GBP", "FundsType": "DEFAULT", "Tag": "Created using Mangopay API Postman Collection", "CreationDate": 1724921476 } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $response = $api->Users->GetWallets($userId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let user = { Id: '146476890', } const listUserWallets = async (userId) => { return await mangopay.Users.getWallets(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listUserWallets(user.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listUserWallets(userId) begin response = MangoPay::User.wallets(userId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch wallets for the user: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '146476890', } listUserWallets(myUser[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.entities.Wallet; public class ListUserWallets { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-clientid"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HSAVT2J0REPGV5ZRPNK079K9"; List wallets = mangopay.getUserApi().getWallets(userId); for (Wallet wallet : wallets) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(wallet); System.out.println(prettyJson); } } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser natural_user = NaturalUser.get('213753890') wallets = natural_user.wallets for wallet in wallets: pprint(vars(wallet)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var wallets = await api.Users.GetWalletsAsync(userId, new Pagination(1, 10)); string prettyPrint = JsonConvert.SerializeObject(wallets, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Update a Wallet PUT /v2.01/{ClientId}/wallets/{WalletId} ### Path parameters The unique identifier of the wallet. ### Body parameters *Max. length: 255 characters* The description of the wallet. It can be a name, the type, or anything else that can help you clearly identify the wallet on the platform (and for your end users). *Max. length: 255 characters* Custom data that you can add to this object.\ For wallets, you can use this parameter to identify the corresponding end user in your platform. ### Responses *Max. length: 255 characters* The description of the wallet. It can be a name, the type, or anything else that can help you clearly identify the wallet on the platform (and for your end users). *string* The unique identifier of the user owning the wallet. **Note:** Only one owner can be defined; this array accepts only one string. The unique identifier of the object. The current balance of the wallet. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the balance. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallet. **Returned values:** `DEFAULT`, `FEES`, `CREDIT` The type of funds in the wallet: * `DEFAULT` – Regular funds for user-owned wallets. Wallets with this `FundsType` cannot have a negative balance. * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. *Max. length: 255 characters* Custom data that you can add to this object.\ For wallets, you can use this parameter to identify the corresponding end user in your platform. The date and time at which the wallet was created. ```json 200 { "Description": "New description of the wallet", "Owners": [ "user_m_01J18HZSACR1EMYNY1TBS8KTJD" ], "Id": "wlt_m_01J6EN9X1Q0PGM0CJ9QD197CRG", "Balance": { "Currency": "EUR", "Amount": 0 }, "Currency": "EUR", "FundsType": "DEFAULT", "Tag": "Updated using Mangopay API Postman collection", "CreationDate": 1724921476 } ``` ```json REST { "Description": "New description of the wallet", "Tag": "Updated using Mangopay API Postman collection" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $walletId = '148968396'; $wallet = $api->Wallets->Get($walletId); $wallet->Description = 'Updated again EUR Wallet'; $wallet->Tag = 'Updated using Mangopay PHP SDK'; $response = $api->Wallets->Update($wallet); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key' }) let myWallet = { Id: '174796439', Description: 'updated description', Tag: 'updated tag', } const updateWallet = async (wallet) => { return await mangopay.Wallets.update(wallet) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } updateWallet(myWallet) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def updateWallet(walletId, params) begin response = MangoPay::Wallet.update(walletId, params) puts response return response rescue MangoPay::ResponseError => error puts "Failed to update wallet: #{error.message}" puts "Error details: #{error.details}" return false end end myWallet = { Id: '194311640' } myParams = { Description: 'Updated description', Tag: 'Updated tag' } updateWallet(myWallet[:Id], myParams) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.entities.Wallet; public class UpdateWallet { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Wallet wallet = mangopay.getWalletApi().get("wlt_m_01HSV2W1JYHZQMW24EWREKEN62"); wallet.setTag("Updated using the Mangopay Java SDK"); Wallet updateWallet = mangopay.getWalletApi().update(wallet); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(updateUbo); System.out.println(updateWallet); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Wallet natural_user = NaturalUser.get('213753890') user_wallet = Wallet( id = '215029593', owners=[natural_user], description='EUR Wallet of Rhoda Keeling' ) update_wallet = user_wallet.save() pprint(update_wallet) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J2Y06CEN8J3K19KP0F7YJVNT"; var wallet = new WalletPutDTO { Owners = [userId], Description = "BLIK Wallet", Tag = "Updated using Mangopay .NET SDK" }; var updateWallet = await api.Wallets.UpdateAsync(wallet, walletId); string prettyPrint = JsonConvert.SerializeObject(updateWallet, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Wallet GET /v2.01/{ClientId}/wallets/{WalletId} ### Path parameters The unique identifier of the wallet. ### Responses *Max. length: 255 characters* The description of the wallet. It can be a name, the type, or anything else that can help you clearly identify the wallet on the platform (and for your end users). *string* The unique identifier of the user owning the wallet. **Note:** Only one owner can be defined; this array accepts only one string. The unique identifier of the object. The current balance of the wallet. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the balance. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallet. **Returned values:** `DEFAULT`, `FEES`, `CREDIT` The type of funds in the wallet: * `DEFAULT` – Regular funds for user-owned wallets. Wallets with this `FundsType` cannot have a negative balance. * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. *Max. length: 255 characters* Custom data that you can add to this object.\ For wallets, you can use this parameter to identify the corresponding end user in your platform. The date and time at which the wallet was created. ```json 200 { "Description": "Description of the user's wallet", "Owners": [ "user_m_01J18HZSACR1EMYNY1TBS8KTJD" ], "Id": "wlt_m_01J18J1SQGG6KXNM3F8GD674TP", "Balance": { "Currency": "EUR", "Amount": 99800 }, "Currency": "EUR", "FundsType": "DEFAULT", "Tag": "Created using Mangopay API Postman collection", "CreationDate": 1719348029 } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $walletId = '193572861'; $response = $api->Wallets->Get($walletId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myWallet = { Id: '148968396', } const viewWallet = async (walletId) => { return await mangopay.Wallets.get(walletId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewWallet(myWallet.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewWallet(walletId) begin response = MangoPay::Wallet.fetch(walletId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch wallet: #{error.message}" puts "Error details: #{error.details}" return false end end myWallet = { Id: '194311640', } viewWallet(myWallet[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.entities.Wallet; import java.lang.reflect.Field; public class ViewWallet { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Wallet wallet = mangopay.getWalletApi().get("wlt_m_01HSV2W1JYHZQMW24EWREKEN62"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(wallet); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Wallet natural_user = NaturalUser.get('213753890') user_wallet = Wallet.get('215029593') try: view_wallet = Wallet.get(user_wallet.id) pprint(vars(view_wallet)) except Wallet.DoesNotExist: print('The wallet {} does not exist'.format(user_wallet.id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var walletId = "wlt_m_01J2Y06CEN8J3K19KP0F7YJVNT"; var viewWallet = await api.Wallets.GetAsync(walletId); string prettyPrint = JsonConvert.SerializeObject(viewWallet, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Wallet object ### Description The Wallet object is the digital e-wallet on which funds are stored in the Mangopay environment. A wallet can be used in the following ways: * Make payments into a wallet (pay-in) * Move funds from one wallet to another (transfer) * Convert funds between wallets of different currencies (conversion) * Withdraw funds from a wallet to a bank account (payout) ### Attributes *Max. length: 255 characters* The description of the wallet. It can be a name, the type, or anything else that can help you clearly identify the wallet on the platform (and for your end users). *string* The unique identifier of the user owning the wallet. **Note:** Only one owner can be defined; this array accepts only one string. The current balance of the wallet. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the balance. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the wallet. **Returned values:** `DEFAULT`, `FEES`, `CREDIT` The type of funds in the wallet: * `DEFAULT` – Regular funds for user-owned wallets. Wallets with this `FundsType` cannot have a negative balance. * `FEES` – Fees Wallet, for fees collected by the platform, specific to the Client Wallet object. * `CREDIT` – Repudiation Wallet, for funds for the platform's dispute management, specific to the Client Wallet object. **Note:** The Fees Wallet and Repudiation Wallet are created automatically by Mangopay for each currency. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For wallets, you can use this parameter to identify the corresponding end user in your platform. The date and time at which the object was created. ### Related resources Learn more about the wallet system # Create a Web Card PayIn POST /v2.01/{ClientId}/payins/card/web **Note – Tracking the payment status** Once the pay-in is created, the object status will be `CREATED` until the end user completes the payment. To be notified of a change in status, set up webhook notifications. ### Body parameters *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL of the SSL page of your customized payment page. The page must be in the array format ("PAYLINE"=>"https\://...") and meet all the specifications listed here. Only a template for Payline is currently available.  Required if the `TemplateURLOptions` is sent. The URL of the corresponding V2 template with the Payline Javascript Widget. **Allowed values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. **Allowed values:** One of the supported languages in the ISO 639-1 format: CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, NL, NO, PL, PT, SK, SV. The language in which the payment page is to be displayed. **Allowed values:** `DEFAULT`, `FORCE`, `NO_CHOICE` **Default value:** `DEFAULT` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Required if the parent parameter is sent. Information about the shipping address. *Max. length: 255 characters* Required if the `Address` is sent. The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Address` is sent and if `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* Required if the `Address` is sent. The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Two-letter country code (ISO 3166-1 alpha-2 format). Required if `Address` is sent. The country of the address. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The unique identifier of the object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL used for the payment page template. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. **Returned values:** One of the supported languages in the ISO 639-1 format: CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, NL, NO, PL, PT, SK, SV. The language in which the payment page is to be displayed. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The user’s bank, if the `CardType` is `IDEAL`, as defined by the `Bic` parameter sent in the call. This parameter is `null` for other card types or if the BIC was not sent on the legacy iDEAL implementation. See Create a Web Card PayIn (iDEAL) for more information.  The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL used for the payment page template. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. **Returned values:** One of the supported languages in the ISO 639-1 format: CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, NL, NO, PL, PT, SK, SV. The language in which the payment page is to be displayed. **Returned values:** `DEFAULT`, `FORCE`, `NO_CHOICE` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* The region of the address. This field is optional except if the `Country` is US, CA, or MX. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Returned values:** Two-letter country code (ISO 3166-1 alpha-2 format). The country of the address. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The user’s bank, if the `CardType` is `IDEAL`, as defined by the `Bic` parameter sent in the call. This parameter is `null` for other card types or if the BIC was not sent on the legacy iDEAL implementation. See Create a Web Card PayIn (iDEAL) for more information.  ```json 200 - Default payment page { "Id": "150592918", "Tag": "Example with default payment page", "CreationDate": 1662108348, "AuthorId": "150429004", "CreditedUserId": "150429004", "DebitedFunds": { "Currency": "EUR", "Amount": 2000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1900 }, "Fees": { "Currency": "EUR", "Amount": 100 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "150523186", "DebitedWalletId": null, "PaymentType": "CARD", "ExecutionType": "WEB", "RedirectURL": "https://api.sandbox.mangopay.com/Content/PaylineTemplateWidget?rp=f40de6033b7847659387970d98477848&transactionId=150592918&token=161eekDgqtEVMXbhR3431662108348469", "ReturnURL": "http://www.my-site.com/returnURL/?transactionId=150592918", "TemplateURL": "https://api.sandbox.mangopay.com/Content/PaylineTemplateWidget?rp=f40de6033b7847659387970d98477848&transactionId=150592918", "CardType": "CB_VISA_MASTERCARD", "Culture": "EN", "SecureMode": "DEFAULT", "Billing": { "FirstName": "Joe", "LastName": "Blogs", "Address": { "AddressLine1": "1 Mangopay Street", "AddressLine2": "The Loop", "City": "Paris", "Region": "Ile de France", "PostalCode": "75001", "Country": "FR" } }, "Shipping": { "FirstName": "Joe", "LastName": "Blogs", "Address": { "AddressLine1": "1 Mangopay Street", "AddressLine2": "The Loop", "City": "Paris", "Region": "Ile de France", "PostalCode": "75001", "Country": "FR" } }, "StatementDescriptor": "Platform", "BankName": null } ``` ```json 200 - Customized payment page { "Id": "150828002", "Tag": "Example with customized payment page", "CreationDate": 1662454775, "AuthorId": "150429004", "CreditedUserId": "150429004", "DebitedFunds": { "Currency": "EUR", "Amount": 2000 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1900 }, "Fees": { "Currency": "EUR", "Amount": 100 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "150523186", "DebitedWalletId": null, "PaymentType": "CARD", "ExecutionType": "WEB", "RedirectURL": "https://www.mysite.com/template/?transactionId=150828002&token=1jLXHAjyfjxGiJJQv2971662454776237", "ReturnURL": "http://www.my-site.com/returnURL/?transactionId=150828002", "TemplateURL": "https://www.mysite.com/template/?transactionId=150828002", "CardType": "CB_VISA_MASTERCARD", "Culture": "EN", "SecureMode": "DEFAULT", "Billing": { "FirstName": "Joe", "LastName": "Blogs", "Address": { "AddressLine1": "1 Mangopay Street", "AddressLine2": "The Loop", "City": "Paris", "Region": "Ile de France", "PostalCode": "75001", "Country": "FR" } }, "Shipping": { "FirstName": "Joe", "LastName": "Blogs", "Address": { "AddressLine1": "1 Mangopay Street", "AddressLine2": "The Loop", "City": "Paris", "Region": "Ile de France", "PostalCode": "75001", "Country": "FR" } }, "StatementDescriptor": "Platform", "BankName": null } ``` ```json REST { "Tag": "Example with default payment page", "AuthorId": "150429004", "CreditedUserId": "150429004", "DebitedFunds": { "Currency": "EUR", "Amount": 2000 }, "Fees": { "Currency": "EUR", "Amount": 100 }, "CreditedWalletId": "150523186", "ReturnURL": "https://docs.mangopay.com/please-ignore", "TemplateURLOptions": ""PAYLINE"=>"https://...", "CardType": "CB_VISA_MASTERCARD", "Culture": "EN", "SecureMode": "DEFAULT", "Billing": { "FirstName": "Joe", "LastName": "Blogs", "Address": { "AddressLine1": "15 Rue des plantes", "AddressLine2": "The Oasis", "City": "Paris", "Region": "Ile de France", "PostalCode": "75001", "Country": "FR" } }, "Shipping": { "FirstName": "Joe", "LastName": "Blogs", "Address": { "AddressLine1": "16 rue des plantes", "AddressLine2": "The Oasis", "City": "Paris", "Region": "Ile de France", "PostalCode": "75001", "Country": "FR" } }, "StatementDescriptor": "Platform" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payIn = new \MangoPay\PayIn(); $payIn->Tag = 'Created using Mangopay PHP SDK'; $payIn->CreditedWalletId = '148968396'; $payIn->PaymentType = 'CARD'; $payIn->AuthorId = '146476890'; $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = 'EUR'; $payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsCard(); $payIn->PaymentDetails->CardType = 'CB_VISA_MASTERCARD'; $payIn->ExecutionType = 'WEB'; $payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsWeb(); $payIn->ExecutionDetails->ReturnURL = 'https://mangopay.com/docs/please-ignore'; $payIn->ExecutionDetails->Culture = 'FR'; $response = $api->PayIns->Create($payIn); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { PaymentType: 'CARD', ExecutionType: 'WEB', AuthorId: '146476890', Tag: 'Created with Mangopay Node.js SDK', CreditedUserId: '146476890', DebitedFunds: { Currency: 'EUR', Amount: 1000, }, Fees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '148968396', ReturnURL: 'https://mangopay.com/docs/please-ignore', CardType: 'CB_VISA_MASTERCARD', Culture: 'EN', SecureMode: 'DEFAULT', Billing: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, Shipping: { FirstName: 'Alex', LastName: 'Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, StatementDescriptor: 'Nov2023', } const createWebCardPayIn = async (payin) => { return await mangopay.PayIns.create(payin) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createWebCardPayIn(myPayIn) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createPayPalPayIn(payInObject) begin response = MangoPay::PayIn::PayPal::Web.create(payInObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create pay-in: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { AuthorId: '192822811', Tag: 'Created with Mangopay Ruby SDK', CreditedUserId: '192822811', DebitedFunds: { Currency: 'EUR', Amount: 1500, }, Fees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '192822814', ReturnURL: 'https://mangopay.com/docs/please-ignore', Culture: 'EN', ShippingAddress: { RecipientName: 'Alex Smith', Address: { AddressLine1: 'Rue des plantes', AddressLine2: 'The Oasis', City: 'Paris', Region: 'IDF', PostalCode: '75000', Country: 'FR', }, }, StatementDescriptor: 'Nov2023', } createPayPalPayIn(myPayIn) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CardType; import com.mangopay.core.enumerations.CultureCode; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInExecutionDetailsWeb; import com.mangopay.entities.subentities.PayInPaymentDetailsCard; public class CreateWebCardPayin { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; PayIn webCardPayin = new PayIn(); webCardPayin.setAuthorId(userId); webCardPayin.setCreditedUserId(userId); webCardPayin.setCreditedWalletId(walletId); webCardPayin.setPaymentType(PayInPaymentType.CARD); webCardPayin.setExecutionType(PayInExecutionType.WEB); webCardPayin.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); webCardPayin.setFees(new Money(CurrencyIso.EUR, 0)); webCardPayin.setTag("Created using the Mangopay Java SDK"); PayInExecutionDetailsWeb executionDetails = new PayInExecutionDetailsWeb(); executionDetails.setReturnUrl("https://www.mangopay.com/docs/please-ignore"); executionDetails.setCulture(CultureCode.FR); webCardPayin.setExecutionDetails(executionDetails); PayInPaymentDetailsCard paymentDetails = new PayInPaymentDetailsCard(); paymentDetails.setCardType(CardType.CB_VISA_MASTERCARD); webCardPayin.setPaymentDetails(paymentDetails); PayIn createwebCardPayIn = mangopay.getPayInApi().create(webCardPayin); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createwebCardPayIn); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Wallet, Money, CardWebPayIn natural_user = NaturalUser.get('210513027') natural_user_wallet = Wallet.get('210514820') web_card_payin = CardWebPayIn( author_id = natural_user.id, debited_funds = Money(amount=1000, currency='EUR'), fees = Money(amount=0, currency='EUR'), credited_wallet_id = natural_user_wallet.id, return_url = 'https://mangopay.com/docs/please-ignore', culture = 'EN', card_type = 'CB_VISA_MASTERCARD', tag = 'Created using Mangopay Python SDK' ) create_web_card_payin = web_card_payin.save() pprint(create_web_card_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var webCardPayIn = new PayInCardWebPostDTO ( userId, new Money { Amount = 5000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, "http://www.mangopay.com/docs/please-ignore", CultureCode.FR, CardType.CB_VISA_MASTERCARD, "MGP", "BINAADADXXX" ) { Tag = "Created using the Mangopay .NET SDK" }; var createWebCardPayIn = await api.PayIns.CreateCardWebAsync(webCardPayIn); string prettyPrint = JsonConvert.SerializeObject(createWebCardPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Extended Web Card PayIn object ### Description The Extended Web Card PayIn object stores information about the card used for a Web Card PayIn. ### Attributes The unique identifier of the object. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Format: “MMYY”* The expiration date of the card. The card number, partially obfuscated. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`, `P24` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. *Format: ISO-3166-1 alpha-3 three-letter country code (e.g., “FRA”)* The country of the card (which is the same as the country of the issuer). The unique representation of the card number. This string can be used to track the card behavior while keeping the card information confidential. # View card details for a Web Card PayIn GET /v2.01/{ClientId}/payins/card/web/{PayInId}/extended ### Path parameters The unique identifier of the pay-in. ### Responses The unique identifier of the object. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. *Format: “MMYY”* The expiration date of the card. The card number, partially obfuscated. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. *Format: ISO-3166-1 alpha-3 three-letter country code (e.g., “FRA”)* The country of the card (which is the same as the country of the issuer). The unique representation of the card number. This string can be used to track the card behavior while keeping the card information confidential. ```json 200 { "Id": "150523529", "PaymentType": "CARD", "ExecutionType": "WEB", "ExpirationDate": "0323", "Alias": "497010XXXXXX6588", "CardType": "CB_VISA_MASTERCARD", "Country": "FRA", "Fingerprint": "586d14a7ee9244dd8a7a51bb79aafc24" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payInId = '200015365'; $response = $api->PayIns->GetExtendedCardView($payInId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewCardDetailsWebCardPayIn(payInId) begin response = MangoPay::PayIn::Card::Web.extended(payInId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch card details: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '195073631' } viewCardDetailsWebCardPayIn(myPayIn[:Id]) ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import CardWebPayIn payin_id = '213979861' try: view_web_payin_card = CardWebPayIn.get(payin_id) pprint(vars(view_web_payin_card)) except CardWebPayIn.DoesNotExist: print('The Web Card PayIn {} does not exist.'.format(payin_id)) ``` # The Web Card PayIn object ### Description The Web Card PayIn object enables you to process a card payment via a web-based payment interface, without registering the user’s card details. **Best practice – Pay-in to the author’s wallet** Funds should be credited in two steps: * Pay-in to the author’s wallet. * Transfer to the credited user’s wallet. **Warning – Deprecation of P24** The P24 payment method (CardType of P24) is deprecated and service will be stopped as of March 1st, 2024. Platforms using P24 are invited to integrate BLIK, a popular local payment method in Poland. ### Attributes The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL of the SSL page of your customized payment page. The page must be in the array format ("PAYLINE"=>"https\://...") and meet all the specifications listed here. Only a template for Payline is currently available.  The URL of the corresponding V2 template with the Payline Javascript Widget. The URL used for the payment page template. **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`, `P24` **Default value:** `CB_VISA_MASTERCARD` The type of the card. If not supplied, the default value will be taken into account. The language in which the payment page is to be displayed. **Default value:** DEFAULT The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. * `FORCE` – Requests SCA. * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. **Default value:** FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). Information about the end user billing address. If left empty, the default values will be automatically taken into account. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the billing address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. **Default value:** FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). Information about the end user’s shipping address. The first name of the user. *Max. length: 100 characters* The last name of the user. Information about the shipping address. *Max. length: 255 characters* The first line of the address. *Max. length: 255 characters* The second line of the address. *Max. length: 255 characters* The city of the address. *Max. length: 255 characters* Required if the `Country` is US, CA, or MX. The region of the address. *Max. length: 255 characters* The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. **Allowed values:** Country code in the ISO 3166-1 alpha-2 format. The country of the address. *Max. length: 10 characters; only alphanumeric and spaces* Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. The user’s bank, if the `CardType` is `IDEAL`, as defined by the `Bic` parameter sent in the call. This parameter is `null` for other card types or if the BIC was not sent on the legacy iDEAL implementation. See Create a Web Card PayIn (iDEAL) for more information.  The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. # Create a Web Direct-Debit PayIn POST /v2.01/{ClientId}/payins/directdebit/web **Warning – Giropay no longer available after June 30, 2024** Giropay’s operator Paydirekt has decided to cease the payment method’s services at the end of June, without providing a direct alternative. This decision by Paydirekt impacts the entire industry and is beyond our control. Effective July 1, 2024:  * Pay-ins will fail with the 101101 error * Refunds will be possible for one year  This change affects both the new integration and this legacy one. Our team is ready to assist you with your integration of alternatives like Klarna, PayPal, or virtual IBANs for the German market. Please reach out via the Dashboard ### Body parameters The type of direct debit. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). The unique identifier of the credited wallet. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL of the SSL page of your customized payment page. The page must be in the array format ("PAYLINE"=>"https\://...") and meet all the specifications listed here. Only a template for Payline is currently available.  Required if the `TemplateURLOptions` is sent. The URL of the corresponding V2 template with the Payline Javascript Widget. **Allowed values:** One of the supported languages in the ISO 639-1 format: CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, NL, NO, PL, PT, SK, SV. The language in which the payment page is to be displayed. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ### Responses The type of direct debit. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL used for the payment page template. **Returned values:** One of the supported languages in the ISO 639-1 format: CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, NL, NO, PL, PT, SK, SV. The language in which the payment page is to be displayed. ```json 200 { "DirectDebitType": "SOFORT", "Id": "158596153", "Tag": "custom meta", "CreationDate": 1671609130, "ResultCode": null, "ResultMessage": null, "AuthorId": "146476890", "CreditedUserId": "146476890", "DebitedFunds": { "Currency": "EUR", "Amount": 1200 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1188 }, "Fees": { "Currency": "EUR", "Amount": 12 }, "Status": "CREATED", "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "148968396", "DebitedWalletId": null, "PaymentType": "DIRECT_DEBIT", "ExecutionType": "WEB", "RedirectURL": "https://api.sandbox.mangopay.com/Content/PaylineTemplateWidget?rp=7012a35bacc94224887444a6befdcabc&transactionId=158596153&token=14gpfysmDhsVLpjlL2451671609131187", "ReturnURL": "http://www.my-site.com/returnURL/?transactionId=158596153", "TemplateURL": "https://api.sandbox.mangopay.com/Content/PaylineTemplateWidget?rp=7012a35bacc94224887444a6befdcabc&transactionId=158596153", "Culture": "EN" } ``` ```json REST { "DirectDebitType": "SOFORT", "Tag": "custom meta", "AuthorId": "146476890", "CreditedUserId": "146476890", "DebitedFunds": { "Currency": "EUR", "Amount": 1200 }, "Fees": { "Currency": "EUR", "Amount": 12 }, "CreditedWalletId": "148968396", "ReturnURL": "https://docs.mangopay.com/please-ignore", "TemplateURLOptions": ""PAYLINE"=>"https://...", "Culture": "EN" } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { PaymentType: 'DIRECT_DEBIT', ExecutionType: 'WEB', DirectDebitType: 'SOFORT', AuthorId: '146476890', Tag: 'Created with Mangopay Node.js SDK', CreditedUserId: '146476890', DebitedFunds: { Currency: 'EUR', Amount: 1000, }, Fees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '148968396', ReturnURL: 'https://mangopay.com/docs/please-ignore', TemplateURL: 'https://mangopay.com/docs/please-ignore', Culture: 'EN', } const createWebDirectDebitPayIn = async (payin) => { return await mangopay.PayIns.create(payin) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createWebDirectDebitPayIn(myPayIn) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createWebDirectDebitPayIn(payInObject) begin response = MangoPay::PayIn::DirectDebit::Web.create(payInObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create pay-in: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { DirectDebitType: 'SOFORT', AuthorId: '146476890', Tag: 'Created with Mangopay Node.js SDK', CreditedUserId: '146476890', DebitedFunds: { Currency: 'EUR', Amount: 1000, }, Fees: { Currency: 'EUR', Amount: 100, }, CreditedWalletId: '148968396', ReturnURL: 'https://mangopay.com/docs/please-ignore', TemplateURL: 'https://mangopay.com/docs/please-ignore', Culture: 'EN', } createWebDirectDebitPayIn(myPayIn) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CultureCode; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.DirectDebitType; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.PayInExecutionDetailsWeb; import com.mangopay.entities.subentities.PayInPaymentDetailsDirectDebit; import com.mangopay.entities.subentities.PayInTemplateURLOptions; public class CreateWebDirectDebitPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTF5S9MG0XXBZ8A0550MED3Z"; PayIn payIn = new PayIn(); Money debitedFunds = new Money(); debitedFunds.setAmount(1000); debitedFunds.setCurrency(CurrencyIso.EUR); Money fees = new Money(); fees.setAmount(0); fees.setCurrency(CurrencyIso.EUR); PayInPaymentDetailsDirectDebit paymentDetails = new PayInPaymentDetailsDirectDebit(); paymentDetails.setDirectDebitType(DirectDebitType.GIROPAY); paymentDetails.setStatementDescriptor("Apr2024"); PayInExecutionDetailsWeb executionDetails = new PayInExecutionDetailsWeb(); executionDetails.setReturnUrl("https://www.mangopay.com/docs/please-ignore"); executionDetails.setCulture(CultureCode.FR); executionDetails.setTemplateURLOptions(new PayInTemplateURLOptions()); executionDetails.getTemplateURLOptions().PAYLINE = "https://www.maysite.com/payline_template/"; payIn.setAuthorId(userId); payIn.setCreditedWalletId(walletId); payIn.setDebitedFunds(debitedFunds); payIn.setFees(fees); payIn.setPaymentDetails(paymentDetails); payIn.setExecutionDetails(executionDetails); PayIn createPayIn = mangopay.getPayInApi().create(payIn); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createPayIn); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, DirectDebitWebPayIn from mangopay.utils import Money natural_user = NaturalUser.get('213753890') direct_debit_web_payin = DirectDebitWebPayIn( direct_debit_type = 'GIROPAY', author_id = natural_user.id, debited_funds = Money(amount='1000', currency='EUR'), fees = Money(amount='0', currency='EUR'), credited_wallet_id = '213754077', return_url = 'https://mangopay.com/docs/please-ignore', culture = 'EN', tag = 'Created using the Mangopay Python SDK', ) create_direct_debit_web_payin = direct_debit_web_payin.save() pprint(create_direct_debit_web_payin) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var returnUrl = "https://www.mangopay.com/docs/please-ignore/"; var payIn = new PayInDirectDebitPostDTO( userId, new Money { Amount = 100, Currency = CurrencyIso.EUR }, new Money { Amount = 10, Currency = CurrencyIso.EUR }, walletId, returnUrl, CultureCode.FR, DirectDebitType.SOFORT ) { TemplateURLOptions = new TemplateURLOptions { PAYLINE = "https://www.maysite.com/payline_template/" }, Tag = "Created using the Mangopay .NET SDK" }; var createWebDirectDebitPayIn = await api.PayIns.CreateDirectDebitAsync(payIn); string prettyPrint = JsonConvert.SerializeObject(createWebDirectDebitPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a PayIn GET /v2.01/{ClientId}/payins/{PayInId} **Note – Pay-in data retained for 13 months** An API call to retrieve a pay-in whose `CreationDate` is older than 13 months may return 404 Not Found. For more information, see the Data availability periods article. ### Path parameters The unique identifier of the pay-in. ### Responses The type of direct debit. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL used for the payment page template. **Returned values:** One of the supported languages in the ISO 639-1 format: CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, NL, NO, PL, PT, SK, SV. The language in which the payment page is to be displayed. ```json 200 { "DirectDebitType": "SOFORT", "Id": "158596153", "Tag": "custom meta", "CreationDate": 1671609130, "ResultCode": null, "ResultMessage": null, "AuthorId": "146476890", "CreditedUserId": "146476890", "DebitedFunds": { "Currency": "EUR", "Amount": 1200 }, "CreditedFunds": { "Currency": "EUR", "Amount": 1188 }, "Fees": { "Currency": "EUR", "Amount": 12 }, "Status": "CREATED", "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "148968396", "DebitedWalletId": null, "PaymentType": "DIRECT_DEBIT", "ExecutionType": "WEB", "RedirectURL": "https://api.sandbox.mangopay.com/Content/PaylineTemplateWidget?rp=7012a35bacc94224887444a6befdcabc&transactionId=158596153&token=14gpfysmDhsVLpjlL2451671609131187", "ReturnURL": "http://www.my-site.com/returnURL/?transactionId=158596153", "TemplateURL": "https://api.sandbox.mangopay.com/Content/PaylineTemplateWidget?rp=7012a35bacc94224887444a6befdcabc&transactionId=158596153", "Culture": "EN" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $payinId = 'wt_ec4590a3-3ef0-40ef-a6df-945c84729726'; $response = $api->PayIns->Get($payinId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myPayIn = { Id: '156279887', } const viewPayIn = async (payinId) => { return await mangopay.PayIns.get(payinId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } viewPayIn(myPayIn.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewPayIn(payinId) begin response = MangoPay::PayIn.fetch(payinId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch PayIn: #{error.message}" puts "Error details: #{error.details}" return false end end myPayIn = { Id: '156279887' } viewPayIn(myPayIn[:Id]) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.PayIn; public class ViewPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); PayIn payin = mangopay.getPayInApi().get("your-payin-id"); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(payin); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import PayIn payin_id = 'wt_4fdf7754-6213-4016-be88-84587f093623' try: view_payin = PayIn.get(payin_id) pprint(view_payin._data) except PayIn.DoesNotExist: print('PayIn {} does not exist.'.format(payin_id)) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var viewPayIn = await api.PayIns.GetDirectDebitAsync("payin_m_01J3D2NPHD12DRGSVP330QPZMH"); string prettyPrint = JsonConvert.SerializeObject(viewPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Web Direct-Debit PayIn object ### Description Mangopay relies on the Web Direct-Debit PayIn object to process pay-in transactions made directly from the user’s bank account to a Wallet through an online payment method.   **Warning – Giropay no longer available after June 30, 2024** Giropay’s operator Paydirekt has decided to cease the payment method’s services at the end of June, without providing a direct alternative. This decision by Paydirekt impacts the entire industry and is beyond our control. Effective July 1, 2024:  * Pay-ins will fail with the 101101 error * Refunds will be possible for one year  This change affects both the new integration and this legacy one. Our team is ready to assist you with your integration of alternatives like Klarna, PayPal, or virtual IBANs for the German market. Please reach out via the Dashboard **Caution – Sofort deprecation** These endpoints are the legacy integration of Sofort with Mangopay (`DirectDebitType` is `SOFORT`). Klarna is deprecating the Sofort brand and technical solution. Platforms using Sofort are invited to integrate Klarna. For a limited period, platforms can continue using Mangopay’s legacy integration of Sofort in both Production and Sandbox. For more information, see the Klarna article. ### Attributes The type of direct debit. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object.\ For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform. The date and time at which the object was created. The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. The explanation of the result code. The unique identifier of the user at the source of the transaction. **Default value:** The unique identifier of the owner of the credited wallet. The unique identifier of the user whose wallet is credited. Information about the debited funds. **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the debited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the credited funds. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). **Returned values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the fees. An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`). **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback). * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. The unique identifier of the credited wallet. The unique identifier of the debited wallet. In the case of a pay-in, this value is always `null` since there is no debited wallet. **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE` The type of pay-in. **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION` The type of execution for the pay-in. The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it. *Max. length: 220 characters* The URL to which the user is returned after the payment, whether the transaction is successful or not. The URL of the SSL page of your customized payment page. The page must be in the array format ("PAYLINE"=>"https\://...") and meet all the specifications listed here. Only a template for Payline is currently available.  The URL of the corresponding V2 template with the Payline Javascript Widget. The URL used for the payment page template. The language in which the payment page is to be displayed. The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. # Create a Hook POST /v2.01/{ClientId}/hooks **Note** You can only create one Hook for each `EventType`. ### Body parameters **Allowed values:** An `EventType` listed in the event types list The type of the event. *Max. length: 255 characters* The URL (http or https) to which the notification is sent. *Max. length: 255 characters* Custom data that you can add to this object. ### Responses *Max. length: 255 characters* The URL (http or https) to which the notification is sent. **Returned values:** `DISABLED`, `ENABLED` Whether the hook is enabled or not. **Returned values:** `VALID`, `INVALID` Whether the hook is valid or not. Once `INVALID` (following unsuccessful retries) the hook must be disabled and re-enabled. **Returned values:** An `EventType` listed in the event types list The type of the event. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. ```json { "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.", "Type": "param_error", "Id": "829f2782-85a9-45b1-a2bd-993b0978c5bc", "Date": 1690295313.0, "errors": { "EventType": "A hook has already been registered for this EventType" } } ``` ```json 200 { "Url": "https://example.com", "Status": "ENABLED", "Validity": "VALID", "EventType": "PAYIN_REFUND_SUCCEEDED", "Id": "hook_m_01J8F5RK4R43AYWD8XVG9RSYDT", "Tag": "Created using the Mangopay API Postman Collection", "CreationDate": 1727086218 } ``` ```json REST { "Url": "https://example.com", "EventType" : "PAYIN_REFUND_SUCCEEDED", "Tag": "Created using the Mangopay API Postman Collection" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $hook = new \MangoPay\Hook(); $hook->EventType = \MangoPay\EventType::MandateFailed; $hook->Url = 'https://mangopay.com/docs/please-ignore'; $hook->Tag = 'Created using Mangopay PHP SDK'; $response = $api->Hooks->Create($hook); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myHook = { EventType: 'TRANSFER_SETTLEMENT_CREATED', Url: 'https://mangopay.com/docs/please-ignore', Tag: 'Created using Mangopay NodeJS SDK', } const createHook = async (hook) => { return await mangopay.Hooks.create(hook) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } createHook(myHook) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def createHook(hookObject) begin response = MangoPay::Hook.create(hookObject) puts response return response rescue MangoPay::ResponseError => error puts "Failed to create Hook: #{error.message}" puts "Error details: #{error.details}" return false end end myHook = { EventType: 'PAYOUT_NORMAL_SUCCEEDED', Url: 'https://mangopay.com/docs/please-ignore', Tag: 'Created using Mangopay Ruby SDK' } createHook(myHook) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.EventType; import com.mangopay.entities.Hook; public class CreateHook { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Hook hook = new Hook(); hook.setEventType(EventType.USER_KYC_LIGHT); hook.setUrl("https://mangopay.com/docs/please-ignore"); hook.setTag("Create using the Mangopay Java SDK"); Hook createHook = mangopay.getHookApi().create(hook); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createHook); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Notification hook = Notification( event_type = 'USER_KYC_REGULAR', url = 'https://mangopay.com/docs/please-ignore', tag = 'Create using the Mangopay Python SDK' ) create_hook = hook.save() pprint(create_hook) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var eventType = EventType.DISPUTE_CREATED; var url = "https://www.example.com/"; var hook = new HookPostDTO(url, eventType) { Tag = "Created using the Mangopay .NET SDK" }; var createHook = await api.Hooks.CreateAsync(hook); string prettyPrint = JsonConvert.SerializeObject(createHook, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # The Hook object ### Description A webhook is a technical approach that allows Mangopay to submit a notification to other applications whenever a specific event occurs. The Hook object allows you to receive notifications, to a URL you define, that are triggered by a specific event type. You can set up only one URL for each event type. **Best practice – Idempotent hook processing** The retry feature (i.e., new notification if your app was unreachable) can set the hook to `INVALID`. We strongly recommend you make your event processing idempotent to avoid receiving duplicate notifications for the same events. ### Attributes *Max. length: 255 characters* The URL (http or https) to which the notification is sent. **Returned values:** `DISABLED`, `ENABLED` Whether the hook is enabled or not. **Returned values:** `VALID`, `INVALID` Whether the hook is valid or not. Once `INVALID` (following unsuccessful retries) the hook must be disabled and re-enabled. **Returned values:** An `EventType` listed in the event types list The type of the event. ### Related resources Learn more about hook notifications # List all Hooks GET /v2.01/{CliendId}/hooks This call returns all the Hooks that have been created for the platform. It includes both enabled and disabled hooks. ### Responses The list of hooks created by the platform. The hook object created by the platform. *Max. length: 255 characters* The URL (http or https) to which the notification is sent. **Returned values:** `DISABLED`, `ENABLED` Whether the hook is enabled or not. **Returned values:** `VALID`, `INVALID` Whether the hook is valid or not. Once `INVALID` (following unsuccessful retries) the hook must be disabled and re-enabled. **Returned values:** An `EventType` listed in the event types list The type of the event. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. ```json 200 [ { "Url": "https://mangopay.com/docs/please-ignore", "Status": "ENABLED", "Validity": "VALID", "EventType": "PAYIN_NORMAL_CREATED", "Id": "144086866", "Tag": null, "CreationDate": 1655892104 }, { "Url": "https://mangopay.com/docs/please-ignore", "Status": "ENABLED", "Validity": "VALID", "EventType": "UBO_DECLARATION_VALIDATION_ASKED", "Id": "144246103", "Tag": "Custom meta", "CreationDate": 1655991027 } ] ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $response = $api->Hooks->GetAll(); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) const listHooks = async () => { return await mangopay.Hooks.getAll() .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listHooks() ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listHooks() begin response = MangoPay::Hook.fetch() puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Hooks: #{error.message}" puts "Error details: #{error.details}" return false end end listHooks() ``` ```java Java import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Pagination; import com.mangopay.entities.Hook; public class ListHooks { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); List hooks = mangopay.getHookApi().getAll(new Pagination(1, 100), null); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(hooks); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Notification hooks = Notification.all() for hook in hooks: pprint(hook._data) print() ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var hooks = await api.Hooks.GetAllAsync(new Pagination(1, 100)); string prettyPrint = JsonConvert.SerializeObject(hooks, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # Update a Hook PUT /v.2.01/{ClientId}/hooks/{HookId} ### Path parameters The unique identifier of the hook. ### Body parameters *Max. length: 255 characters* The URL (http or https) to which the notification is sent. **Allowed values:** `DISABLED`, `ENABLED` Whether the hook is enabled or not. *Max. length: 255 characters* Custom data that you can add to this object. ### Responses *Max. length: 255 characters* The URL (http or https) to which the notification is sent. **Returned values:** `DISABLED`, `ENABLED` Whether the hook is enabled or not. **Returned values:** `VALID`, `INVALID` Whether the hook is valid or not. Once `INVALID` (following unsuccessful retries) the hook must be disabled and re-enabled. **Returned values:** An `EventType` listed in the event types list The type of the event. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. ```json 200 { "Url": "https://mangopay.com/docs/please-ignore", "Status": "DISABLED", "Validity": "VALID", "EventType": "UBO_DECLARATION_VALIDATION_ASKED", "Id": "144246103", "Tag": "Custom meta", "CreationDate": 1655991027 } ``` ```json REST { "Url": "https://mangopay.com/docs/please-ignore", "Status": "DISABLED", "Tag": "Custom meta" } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $hookId = '198685419'; $hook = $api->Hooks->Get($hookId); $hook->Url = 'https://mangopay.com/docs/please-ignore'; $hook->Status = 'ENABLED'; $hook->Tag = 'Updated using Mangopay PHP SDK'; $response = $api->Hooks->Update($hook); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myHook = { Id: '144086866', Url: 'https://mangopay.com/docs/please-ignore2', Tag: 'Created using Mangopay NodeJS SDK', Status: 'ENABLED', } const updateHook = async (hook) => { return await mangopay.Hooks.update(hook) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } updateHook(myHook) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def updateHook(hookId, params) begin response = MangoPay::Hook.update(hookId, params) puts response return response rescue MangoPay::ResponseError => error puts "Failed to update Hook: #{error.message}" puts "Error details: #{error.details}" return false end end myHook = { Id: '194445815' } myParams = { Url: 'https://mangopay.com/docs/please-ignore', Tag: 'Updated using Mangopay Ruby SDK' } updateHook(myHook[:Id], myParams) ``` ```java Java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.enumerations.HookStatus; import com.mangopay.entities.Hook; public class UpdateHook { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); Hook hook = new Hook(); hook.setId("hook_m_01J3JQ13F0M5NY83M1GZKVNS95"); hook.setStatus(HookStatus.DISABLED); hook.setTag("Updated using the Mangopay Java SDK"); Hook updateHook = mangopay.getHookApi().update(hook); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(updateHook); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Notification hook = Notification( id = 'hook_m_01HR4KJ27QBRPNZG351R3SBA0B', status = 'DISABLED' ) update_hook = hook.save() pprint(update_hook) ``` ```csharp .NET using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities.PUT; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var hookId = "hook_m_01J55XNB6X4A0VJJ8W8CP9V51D"; var hook = new HookPutDTO { Status = HookStatus.DISABLED, Tag = "Updated using the Mangopay .NET SDK" }; var updateHook = await api.Hooks.UpdateAsync(hook, hookId); string prettyPrint = JsonConvert.SerializeObject(updateHook, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # View a Hook GET /v2.01/{ClientId}/hooks/{HookId} ### Path parameters The unique identifier of the hook. ### Responses *Max. length: 255 characters* The URL (http or https) to which the notification is sent. **Returned values:** `DISABLED`, `ENABLED` Whether the hook is enabled or not. **Returned values:** `VALID`, `INVALID` Whether the hook is valid or not. Once `INVALID` (following unsuccessful retries) the hook must be disabled and re-enabled. **Returned values:** An `EventType` listed in the event types list The type of the event. The unique identifier of the object. *Max. length: 255 characters* Custom data that you can add to this object. The date and time at which the object was created. ```json 200 { "Url": "https://mangopay.com/docs/please-ignore", "Status": "ENABLED", "Validity": "VALID", "EventType": "UBO_DECLARATION_VALIDATION_ASKED", "Id": "144246103", "Tag": "Custom meta", "CreationDate": 1655991027 } ``` ```php PHP Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $hookId = '198685419'; $response = $api->Hooks->Get($hookId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```javascript NodeJS const mangopayInstance = require('mangopay2-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let hook = { Id: '144086866', } const getHook = async (hookId) => { return await mangopay.Hooks.get(hookId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getHook(hook.Id) ``` ```ruby Ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def viewHook(hookId) begin response = MangoPay::Hook.fetch(hookId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Hook: #{error.message}" puts "Error details: #{error.details}" return false end end myHook = { Id: '194445815' } viewHook(myHook[:Id]) ``` ```java Java package com.samples.Helpers.Webhooks; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Hook; public class ViewHook { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var hookId = "hook_m_01J3JQ13F0M5NY83M1GZKVNS95"; Hook viewHook = mangopay.getHookApi().get(hookId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewHook); System.out.println(prettyJson); } } ``` ```python Python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Notification hook_id = 'hook_m_01HR4KJ27QBRPNZG351R3SBA0B' try: view_hook = Notification.get(hook_id) pprint(view_hook._data) except Notification.DoesNotExist: print('Hook {} does not exist.'.format(hook_id)) ``` ```csharp .NET using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var hookId = "hook_m_01J55XNB6X4A0VJJ8W8CP9V51D"; var viewHook = await api.Hooks.GetAsync(hookId); string prettyPrint = JsonConvert.SerializeObject(viewHook, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` # API status # Customizing bank statement references The Mangopay API allows you to customize the text that appears on the bank statement of an end user. You can do this by sending custom text in specific parameters of the API (depending on the transaction and payment method). This is entirely optional, but it can help your end users to identify a transaction made on your platform. ## Components The string of text that appears on the bank statement to describe a transaction contains, in order: * A reference to Mangopay (e.g., MGP) * Your platform’s trading name (as opposed to the legal registered name) * Additional custom text that you can define Because the 3 elements appear on one line of the bank statement, space is very limited and the custom text may be truncated. It is possible for your platform to change its trading name to make it shorter, but this is controlled by Mangopay’s teams as part of its verification obligations. **Note – Banks have ultimate control of the text displayed** Mangopay can supply a string of text for the bank statement but ultimately it is the user’s bank that decides if and how much of that information is displayed. ## Pay-ins On pay-ins, platforms can use the `StatementDescriptor` parameter to send custom text (only alphanumeric characters or spaces). The structure of the complete string sent is: > MGP\* `TradingName` `StatementDescriptor` On the following endpoints, the `StatementDescriptor` length is limited to **10 characters**: * Create a Direct Card PayIn * Create a Web Card PayIn * Create a Recurring PayIn (CIT) * Create a Recurring PayIn (MIT) * Create a Preauthorization * Create a Deposit Preauthorization * Create an Apple Pay PayIn * Create a BLIK PayIn * Create a Giropay PayIn * Create a Google Pay PayIn * Create an iDEAL PayIn * Create a Klarna PayIn * Create an MB WAY PayIn * Create a Multibanco PayIn * Create a PayPal PayIn * Create a Satispay PayIn For direct debits (on the Create a Direct Debit PayIn) the `StatementDescriptor` constraints differ depending on the Mandate scheme: * BACS – The length is truncated after 10 characters * SEPA – The length is limited to 100 characters For SEPA Direct Debit pay-ins, the structure of the string sent is different: > `StatementDescriptor` `TradingName` ### Pay-in refunds For refunds, the `StatementDescriptor` is only available on the direct debit payment method, both SEPA and BACS. The length is limited to 10 characters (alphanumeric or spaces). The string sent is only the parameter: > `StatementDescriptor` ## Payouts On payouts, platforms can use the `BankWireRef` parameter to send custom text, including special characters. The structure of the complete string sent is: > MGP\* `TradingName` `BankWireRef` On payouts, the recommended length is 12 characters. Strings longer than this may be truncated depending on the bank. The technical limit is 255 characters. * Create a Payout # Mirakl connector ## Official connector for Mirakl Modular payment infrastructure for your Mirakl marketplace * No hosting required – Go live fast and without impacting your roadmap with our hosted connector * Compliance – The Mangopay Connector for Mirakl is certified by Mirakl, and trusted by leading marketplaces across Europe * Flexibility – Built with flexibility in mind, it allows you to choose what payment scenario best fits your needs, granularly * Automation – From order processing to payouts, key tasks are automated ## One connector, multiple use cases The Mangopay Connector for Mirakl adapts to the way you want to do business. Not the other way around.
Pay-in with Mangopay Simplify your payment integration and use Mangopay’s payment methods with the Connector to automate captures and refunds. * Pay by card (preauth), direct debit, virtual IBAN, bank wire * Supports all Mirakl Payment Workflows * Automate capture, refund, and transfers * Payment Matching and reconciliation of bank wires made to virtual IBAN
Pay-in with third party PSPs Acquire the funds with your existing PSP for pay-ins, in part or entirely. * Direct settlement or Marketplace Payment Extension * 1P/3P: Mixed basket management by the marketplace
Seller onboarding Manage the onboarding of your sellers in your Mirakl Dashboard or your custom seller dashboard. * User creation and updates * Wallet creation * Bank Account creation * KYB Document & KYB management * Display of KYB status (including errors) to sellers
Payout Manage the split payout for the marketplace and sellers after each billing cycle. * Daily invoice synchronization (including manual invoices) * Transfer management * Split payout management * Commission management (optional) * Isolation of VAT in dedicated wallets (optional)
## Getting started Contact Sales → # Demo platform # All error codes This page lists the functional errors returned by the API as a `ResultCode` and its `ResultMessage`. For KYC document refusals (`RefusedReasonType`, `RefusedReasonMessage`, and `Flag`), see the [Dealing with refusals](/guides/users/verification/documents/submission/refusals) article. **Note - Categories are indicative** The categories presented on this page are not exhaustive and errors may be returned on multiple features and endpoints. ## Generic **The client API access is not active**\ The API access of the platform is not active. **Generic Operation error**\ An incident or connection issue has occurred and closed all transactions. **Technical error**\ Technical error. ## User limits ### User category **Refused due to author’s UserCategory: PAYER**\ The action was refused because the user is a Payer, not an Owner. ### User verification **Blocked due to User Balance limitations (maximum owned amount reached)**\ The payout was blocked due to user balance limitations. **Blocked due to KYC limitations (maximum debited or credited amount reached)**\ The payout was blocked due to KYC limitations in terms of credited or debited amount. **Blocked due to the Bank Account User's KYC limitations (maximum debited or credited amount reached)**\ The payout has been refused refused because the bank account owner is not verified. **Blocked due to a Debited User's KYC limitations (maximum debited or credited amount reached)**\ The payout was blocked due to KYC limitations in terms of credited or debited amount. ## Card input and registration **Token processing error**\ The token for the card wasn't created. **Invalid card number**\ The given card number doesn’t match the real number of the card. **Invalid cardholder name**\ The given card holder’s name doesn’t match the name of the owner of the card. **Invalid PIN code**\ The PIN (”personal identification number”) is invalid. **Invalid PIN format**\ The format of the personal identification number is not valid. **Card number: invalid format**\ The card number’s format provided for the card registration is invalid. **Expiry date: missing or invalid format**\ The card’s expiry date information provided for the card registration is either invalid or missing. **CVV: missing or invalid format**\ The card verification code information provided for the card registration is either invalid or missing. **Callback URL: Invalid format**\ The ReturnURL parameter value is invalid in the card registration. **Registration data : Invalid format**\ The RegistrationData provided for the card registration is invalid. **Token input Error**\ An error occurred when submitting the token to the bank. **CardRegistration error**\ The card registration failed. ## Generic transaction errors **Unsufficient wallet balance**\ The wallet does not contain enough funds to process the transaction. **Author is not the wallet owner**\ The user Id used as Author has to be the wallet owner **Unsufficient balance for this emoney owner**\ The transaction failed due to insufficient balance for the e-money owner. **Transaction amount is higher than maximum permitted amount**\ The pay-in cannot be processed because the amount is higher than the maximum permitted amount. **Transaction amount is lower than minimum permitted amount**\ The transaction cannot be performed because the amount is lower than the minimum permitted amount. **Invalid transaction amount**\ The end user's bank has rejected the transaction. **Transaction refused: the Debited Wallet and the Credited Wallet must be different**\ Funds cannot be transferred to the same wallet. ## Pay-ins **PSP timeout please try later**\ PSP timeout please try later. **PSP configuration error**\ PSP configuration error **PSP technical error**\ The pay-in failed due to a technical error linked to the PSP. **Bank technical error**\ The Bank has denied the payment for unknown reasons. **Transaction refused by the bank (Do not honor)**\ The transaction has been refused due to restrictions on the issuing bank side. **Maximum number of attempts reached**\ The pay-in is blocked due to too many attempts for the same transaction. **Transaction refused**\ The transaction has been refused by the bank. ### Card payments **Author is not the card owner**\ The pay-in failed because the author is different from the card owner. **Transaction refused by the bank (Amount limit)**\ The card has reached the amount limit set by the issuing bank. **Transaction refused by the terminal**\ Transaction refused by the terminal. **Transaction refused by the bank (card limit reached)**\ The card limit has been reached. **The card has expired**\ The pay-in failed because the card has expired. **The card is inactive**\ The pay-in failed because the card is inactive according to the issuing bank. **Maximum amount exceeded**\ The card has reached the amount limit set by the issuing bank. **Maximum amount exceeded**\ The card has reached the amount limit set by the issuing bank. **Debit limit exceeded**\ The spent amount limit set by the bank has been reached. **Debit transaction frequency exceeded**\ The maximum number of authorized daily transactions has been exceeded. **An initial transaction with the same card is still pending**\ The pay-in failed because another transaction with the same card is still pending. **The card is not active**\ The card has been disabled on Mangopay and can no longer be used. ### 3D Secure **The 3DS authentification has failed due to supplementary security checks**\ The pay-in failed due to supplementary security checks preventing 3DS authentication. **Authentication not available: do not benefit from liability shift**\ 3DSecure is not available on this transaction. Liability shift has been rejected by the issuing bank. **SecureMode: 3DSecure authentication has failed**\ The 3DSecure authentication has failed. **Secure mode: The card is not enrolled with 3DSecure**\ The 3DSecure feature is not enabled for this card. **Secure mode: The card is not compatible with 3DSecure**\ The 3DSecure feature is not supported for this card. **Secure mode: The 3DSecure authentication session has expired**\ The 3DSecure authentication session has expired. **SecureMode: Soft decline**\ Strong customer authentication is required in order to be able to proceed to the payment due to soft decline. **Secure mode: 3DSecure authentication is not available**\ The 3DSecure feature is not available. ### Card preauthorization **The PayIn DebitedFunds can't be higher than the PreAuthorization remaining amount**\ The captured funds amount cannot be higher than the preauthorization remaining amount. ### Web card pay-ins **User has not been redirected**\ The pay-in failed because the user has not been redirected to the payment page. **User canceled the payment**\ The pay-in failed because the user canceled the payment. **User is filling in the payment card details**\ The user is still on the payment page. **User has not been redirected then the payment session has expired**\ The pay-in failed because the user wasn’t redirected to the payment page. **User has let the payment session expire without paying**\ The user has let the payment session expire. **The user does not complete transaction**\ The user didn't provide all the information. **The transaction has been cancelled by the user**\ The transaction has been canceled by the end user. ### Bank wire **The payment period has expired**\ The bank wire pay-in has expired. **The payment has been refused**\ The bank transfer has been declined or canceled due to a bank wire issue. ### Virtual IBAN **The banking alias is not active**\ The pay-in to the ibanized wallet failed because the Banking Alias is not active. ### Direct debit **Author is not the Mandate owner**\ The pay-in failed because the author is not the mandate owner. **The bank account has been closed**\ The bank account for the mandate has been closed. **The bank details supplied were incorrect**\ The mandate cannot be created because the bank account is incorrect. **Direct debit is not enabled for this bank account**\ The mandate cannot be created because direct debit is not supported for this bank account. **The user has disputed the authorisation of the mandate**\ The pay-in failed because the user has contested the authorization of the mandate. **The user has cancelled the mandate**\ The mandate has been canceled by the end user. **The client has cancelled the mandate**\ The mandate has been canceled by the platform. **User has let the mandate session expire without confirming**\ The mandate wasn’t confirmed and has expired **There are insufficient funds in the bank account**\ The pay-in failed due to insufficient funds in the bank account. **Contact the user**\ The pay-in failed for an unknown reason. The end user should be contacted. **The payment has been cancelled**\ The pay-in failed because the end user canceled it. **The Status of this Mandate does not allow for payments**\ The pay-in failed due to the status of the corresponding mandate. **The user has disputed the payment**\ The user requested a chargeback for this payment. **The mandate has expired**\ The pay-in failed because the corresponding mandate is expired. **The mandate has been submitted to the user’s bank**\ The mandate has been submitted to the user’s bank. ### Google Pay **Invalid PaymentData**\ The PaymentData provided for the Google Pay pay-in is not valid ### Klarna **AdditionalData format error**\ The AdditionalData value is not the expected format, not complete, or not present. ### PayPal **PayPal account balance insufficient**\ The pay-in failed due to insufficient funds in the PayPal account. **PayPal related payment instrument declined**\ PayPal related payment instrument declined. **PayPal transaction approval has expired**\ The pay-in failed because the PayPal account owner did not confirm the payment. **PayPal account's owner has not approved payment**\ The pay-in failed because the PayPal account owner rejected the payment. **Shipping address is invalid**\ The shipping address is not valid. **This transaction has been refused by PayPal risk**\ The transaction has been refused by PayPal risk. **PayPal account is restricted**\ The PayPal account is restricted. **PayPal account locked or closed**\ The PayPal account is locked or closed. **Data validation error**\ One of the required parameters may be missing or invalid. ## Refunds **Transaction has already been successfully refunded**\ The transaction has already been successfully refunded. **The transaction cannot be refunded (max 11 months)**\ The initial transaction occurred more than 11 months ago **No more refunds can be created against this transaction**\ No more refunds can be created against this transaction. **The refund cannot exceed initial transaction amount**\ The amount of the refund exceeds the amount of the initial transaction. **The refunded fees cannot exceed initial fee amount**\ The refund fees amount exceeds the initial transaction fees. **Balance of client fee wallet unsufficient**\ The refund failed because the fees exceeds the balance of the Fees Wallet. **Another refund for this transaction is still pending.**\ Another refund for this transaction is still pending. **Duplicated operation: you cannot reimburse the same amount more than once for a transaction during the same day.**\ The refund failed because the same amount as already been refunded in the last 24 hours for the initial transaction. **Due to repudiations against this transaction, you can not refund this amount.**\ The refund failed because the pay-in is already being disputed. ## Dispute settlement transfers **The total DebitedFunds settled cannot exceed the initial transaction DebitedFunds available for settlement**\ The settlement transfer failed due to a debited funds Amount exceeding the debited funds of the initial transaction. **The total Fees settled cannot exceed the initial transaction Fees available for settlement**\ The settlement transfer failed due to a fees Amount exceeding the fees of the initial transaction. **The repudiation has already been successfully settled**\ The settlement transfer failed because the repudiation has already been settled. ## FX conversions **Conversion could not be debited from wallet**\ The funds could not be withdrawn from the debited wallet. **Conversion failed during conversion operation**\ The funds could not be converted. ## Risk management **Transaction blocked by Fraud Policy**\ This payment does not comply with Mangopay’s anti-fraud rules. **Transaction refused due to blocked Country**\ The payout cannot be performed because the target country is not authorized. **Transaction refused due to blocked IBAN**\ The payout cannot be performed because the target IBAN bank account is blocked. **Transaction refused due to blocked BIC**\ The payout cannot be performed because the target bank is not authorized. **Amount of the transaction exceeded the amount permitted**\ The transaction amount exceeds the permitted amount. **Number of accepted transactions exceeded the velocity limit set**\ Credit/debit cards are limited to 10 payments per day for security reasons. **Unauthorized IP address country**\ The pay-in failed because the IP address is located in an unauthorized country. **Cumulative value of transactions exceeded**\ The pay-in failed because the cumulative value of transactions is exceeded. **Wallet blocked by Fraud policy**\ The wallet has been blocked because it doesn’t comply with Mangopay’s anti-fraud rules. **User blocked by Fraud policy**\ The user has been blocked because of Mangopay’s anti-fraud rules. **Suspicion of fraud**\ The transaction failed due to a suspicion of fraud. ### Card-related **Counterfeit Card**\ The pay-in failed because the issuing bank declared the card as a counterfeit. **Lost Card**\ The pay-in failed because the issuing bank declared the card as lost. **Stolen Card**\ The pay-in failed because the issuing bank declared the card as stolen. **Card bin not authorized**\ This card has been blocked by Mangopay’s Fraud team. **Security violation**\ The card has been blocked due to abnormal behavior. **Fraud suspected by the bank**\ The card has been blocked by the issuing bank due to abnormal behavior. **Opposition on bank account (Temporary)**\ The card has temporarily been blocked on Mangopay’s side. **Pay-in failed: the issuing bank reports that the bank account linked to this card does not exist.**\ The issuer indicates the account linked to this card no longer exists, perhaps because it has been closed. **Unauthorized Card issuer country**\ The card issuer is domiciled in an unauthorized country. **Number of bank cards allowed is exceeded**\ The number of cards allowed is exceeded. **Number of clients per card is exceeded**\ The number of clients per card is exceeded. **IP location different than card issuer country**\ The IP location is different from the country the card issuer is domiciled in. **Number of device fingerprints allowed is exceeded**\ The pay-in failed because the number of cards for this fingerprint is exceeded. **Unauthorized Card BIN**\ The card BIN is not authorized. ### Bank-related **Transaction refused due to blocked GB account**\ The payout cannot be performed because the target GB bank account is blocked. **Transaction refused due to blocked US account**\ The payout cannot be performed because the target US bank account is blocked. **Transaction refused due to blocked CA account**\ The payout cannot be performed because the target CA bank account is blocked. **Transaction refused due to blocked OTHER account**\ The payout cannot be performed because the target OTHER bank account is blocked. ## Payouts **Invalid or missing bank details**\ The payout cannot be performed due to missing or invalid banking information. **The bank wire has been refused**\ The bank wire has been refused by Mangopay or canceled by the end user. **The author is not the wallet owner**\ The payout author is not the corresponding wallet owner. **Insufficient wallet balance**\ The wallet does not contain enough funds to process the payout. **Specific case: please contact our Finance Team**\ The payout failed due to a specific issue. **Refused due to the Fraud Policy**\ The payout failed because it didn’t comply with Mangopay anti-fraud rules. **The associated bank account is not active**\ The bank account targeted by the payout is inactive. **The author is not the bank account owner**\ The payout author is not the corresponding bank account owner. **Payout expired before processing**\ The payout request expired before it could be processed. **Remitter or beneficiary identified as requiring further analysis**\ The payout was refused because further analysis of the payout author or bank account owner is required following routine screening. **Inapproriate bank account type used** The payout has been rejected by Mangopay’s team because the bank account is not of the correct type. **Generic withdrawal error**\ Generic withdrawal error. ### Instant payments **The client's settings are incorrectly configured for instant payout**\ The Instant Payment feature is not activated for the platform. **The amount requested is greater than the authorised amount**\ The payout failed because the requested amount is higher than the authorized amount. **The user is not KYC-validated**\ The Instant Payment has been refused because the user is not verified. **The user is blocked by Fraud policy**\ The instant payment is refused because the user has been blocked by Mangopay's policy. **One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.**\ One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error. **technical error, please try again later**\ A technical error occurred. **Destination Bank is not reachable**\ The bank to which the payout is made is not reachable. **Duplicate transaction identified**\ An instant payment has already been made to the same bank account for the same amount in the last 24 hours. **The destination IBAN is not valid**\ The payout failed because the IBAN of the bank account is not valid. **Generic operation error**\ Generic operation error **Manual review required - not compatible with payout mode requested**\ A manual review is required for this payout, so the `INSTANT_PAYMENT_ONLY` value for `PayoutModeRequested` cannot be processed. ## Reports **There was an error validating your report request**\ The report couldn’t be validated. **There was an error executing your report request**\ The report couldn't be executed. # Error report When an HTTP error occurs, an error report is returned with the following information:
**Property** **Type** **Description and value**
`Message` string The description of the error.
`Type` string The type of the error (e.g., param\_error, resource\_not\_found, etc.)
`Id` string The unique identifier of the error. This information may be requested by our Support team when investigating an issue.
`Date` timestamp The date and time at which the error occurred.
`errors` array The list of issues that triggered the HTTP error.
```json Error report example (JSON) { "Message":"A resource has already been created with this Idempotency Key", "Type":"idempotent_creation_conflict", "Id":"13c824a3-06b9-465f-90a7-3d7262d35b66#1658230707", "Date":1658230708.0, "errors":null } ``` # HTTP response codes The Mangopay API uses the following HTTP response codes to indicate the success or failure of a request.
**Response code** **Status** **Description**
200 OK Request successful.
204 No content Request successful with no information returned.
400 Bad request Request impossible to process due to a logical error (e.g., missing parameter, invalid operation, constraint violation, etc.)
401 Unauthorized Access to the API resource is not authorized due to an authentication failure (e.g., incorrect client ID, API Key, or URL).
403 Forbidden Access to the API resource is forbidden, due to an authorization failure (e.g., deactivation of the account or a permission issue regarding a specific feature).
404 Not Found The requested resource cannot be found.
405 Method Not Allowed HTTP method is not allowed (e.g., trying a GET instead of a POST).
409 Conflict The request is not processed due to an identical [idempotency key](/api-reference/overview/idempotency).
411 Length Required The Content-Length header field is not defined and the server requires it.
413 Payload Too Large The request entity is larger than the server is able to process (e.g., KYC document file larger than 10MB).
415 Unsupported Media Type The format of the media sent is not supported by the server (e.g., wrong file format for KYC document file).
422 Unprocessable Entity The request cannot be fulfilled due to semantic errors.
429 Too Many Requests Too many requests have been sent in a given period of time ([rate limiting](/api-reference/overview/rate-limiting)).
500 Internal Server Error We invite you to try again later or to contact Support [via the Dashboard](https://hub.mangopay.com/) if the problem persists.
# Currencies Summary of Mangopay features by currency export const IconGrayCross = ; export const IconGreenCheck = ; {/* When updating currencies, be sure to check the payment method guide! */} This page gives an overview of the currencies supported by Mangopay across different features. * Payment methods – Describes currencies currently supported across all card, banking, and APM payment methods, including planned coverage. * Wallets, FX, and payouts – Describes currencies currently supported across wallet features and payouts, including planned coverage. Mangopay's planned currency coverage is subject to change and is influenced by platform demand. Contact us via the Dashboard or the Sales contact form to discuss your interest. **Note - Activation may be required** This page describes the availability of a given currency in Production. For payment methods, the availability of features and currencies depends on the platform's contract. In Sandbox, currencies for payment methods and features may require activation in your platform's Sandbox environment. Contact the Support team via the Dashboard for more information. Currencies are expressed using the the three-letter ISO 4217 format. Amounts are expressed in the currency's minor unit – see data formats for details. The full list of possible supported values across all API features is: `AED`, `AUD`, `CAD`, `CHF`, `CNH`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HUF`, `ISL`, `JPY`, `MXN`, `NOK`, `NZD`, `PLN`, `RON`, `SAR`, `SEK`, `SGD`, `TRY`, `USD`, `ZAR`. ## Payment methods
Currency Card pay-ins Banking pay-ins APM pay-ins
Mastercard, Visa AMEX CB, Maestro Bank wire 
- Intl.
Bank wire
- Local
Virtual IBAN Direct debit Apple Pay BLIK Giropay Google Pay iDEAL Klarna MB WAY Multibanco PayPal Satispay
**AED**
UAE dirham
{IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**AUD**
Australian dollar
{IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**CAD**
Canadian dollar
{IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} Planned Planned {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**CHF**
Swiss franc
{IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross}
**CNH**
Chinese yuan renminbi
{IconGrayCross} {IconGrayCross} {IconGrayCross} Planned {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**CZK**
Czech koruna
{IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**DKK**
Danish kroner
{IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} Planned Planned {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**EUR**
Euro
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck}
**GBP**
Pound sterling
{IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGreenCheck} Planned {IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross}
**HKD**
Hong kong dollar
{IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**HUF**
Hungarian forint
{IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**ISL**
Israeli new shekel
{IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**JPY**
Japanese yen
{IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**MXN**
Mexican peso
{IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**NOK**
Norwegian kroner
{IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**NZD**
New Zealand dollar
{IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**PLN**
Polish zloty
{IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} Planned Planned {IconGrayCross} {IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**RON**
Romanian leu
{IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**SAR**
Saudi riyal
{IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**SEK**
Swedish kroner
{IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} Planned {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**SGD**
Singapore dollar
{IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**TRY**
Turkish lira
{IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
**USD**
US dollar
{IconGreenCheck} {IconGreenCheck} {IconGrayCross} {IconGreenCheck} Planned Planned {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross}
**ZAR**
South African rand
{IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGreenCheck} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross} {IconGrayCross}
## Wallets, FX, and payouts
Currency Wallets FX Payouts
International Local
**AED**
UAE dirham
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} Planned
**AUD**
Australian dollar
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} Planned
**CAD**
Canadian dollar
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck}
**CHF**
Swiss franc
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck}
**CNH**
Chinese yuan renminbi
{IconGreenCheck} {IconGreenCheck} Planned {IconGrayCross}
**CZK**
Czech koruna
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck}
**DKK**
Danish kroner
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck}
**EUR**
Euro
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck}
**GBP**
Pound sterling
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck}
**HKD**
Hong Kong dollar
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} Planned
**HUF**
Hungarian forint
{IconGreenCheck} {IconGreenCheck} Planned {IconGrayCross}
**ISL**
Israeli new shekel
{IconGreenCheck} {IconGreenCheck} Planned {IconGrayCross}
**JPY**
Japanese yen
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGrayCross}
**MXN**
Mexican peso
{IconGreenCheck} {IconGreenCheck} Planned {IconGrayCross}
**NOK**
Norwegian kroner
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} Planned
**NZD**
New Zealand dollar
{IconGreenCheck} {IconGreenCheck} Planned {IconGrayCross}
**PLN**
Polish zloty
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck}
**RON**
Romanian leu
{IconGreenCheck} {IconGreenCheck} Planned Planned
**SAR**
Saudi riyal
{IconGreenCheck} {IconGreenCheck} Planned Planned
**SEK**
Swedish kroner
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck}
**SGD**
Singapore dollar
{IconGreenCheck} {IconGreenCheck} Planned Planned
**TRY**
Turkish lira
{IconGreenCheck} {IconGreenCheck} Planned {IconGrayCross}
**USD**
US dollar
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGreenCheck}
**ZAR**
South African rand
{IconGreenCheck} {IconGreenCheck} {IconGreenCheck} {IconGrayCross}
## Related resources See all supported payment methods # Disputes export const RepudiationWallet = ({content}) => {content} ; export const Chargeback = ({content}) => {content} ; ## Introduction Customers may question the validity of a transaction registered to their account and ask for a . The issuing bank then withdraws the corresponding funds from Mangopay. The platform may have the opportunity to contest the chargeback by providing proof prior to being requested to settle their credit to Mangopay. Mangopay automatically creates a Dispute object when a chargeback occurs to handle proof submissions and settlement. Chargebacks can be requested for various reasons, whether it is about fraudulent transactions, disagreements between the merchant and the consumer, or processing issues. Here are a few examples: * Unauthorized or excessive charges * Failure by the merchant to deliver merchandise * Defective merchandise * Dissatisfaction with the product(s) or service(s) received * Billing errors ## Type of disputes Mangopay offers three types of disputes depending on the kind of chargeback that occurred.
Contestable Dispute for which the chargeback can be contested by providing proof (i.e., Dispute Documents) justifying the original transaction.
Not‑contestable Dispute that is automatically closed after its creation, without any action possible for the platform.
Retrieval Dispute that is actually a chargeback warning issued by the bank. The platform is required to provide documents, but no funds will be taken from the Repudiation Wallet.
**Note - Disputes and Refunds** Disputes cannot be created if a Refund already occurred on the transaction. In the same way, you cannot create a Refund for a transaction subject to a Dispute. See the Refunds article to learn more. ### Late failures For transactions by direct debit, a dispute can be created due to a late failure. These disputes are non-contestable. See the direct debit article for more details: Direct debit - Late failures and chargebacks ## Dispute process The dispute process varies depending on the type of dispute and the outcome (whether the platform wins or loses the dispute). For contestable disputes, the process can be broken down into the following steps: A user asks for a chargeback: the issuing bank orders the reversal of a pay-in. Mangopay creates a dispute and debits the disputed funds from the platform’s . If the dispute is contestable, the platform sends proofs to justify the legitimacy of the transaction. Depending on the issuing bank’s response, the platform either wins or loses the dispute. In case of a win, the funds are put back into the repudiation wallet (refund). If the dispute is lost, the platform needs to make a Settlement Transfer from the user's wallet (or a direct bank wire pay-in) to the Repudiation Wallet. **Best practice - Set up hooks for disputes** Due to the deadline to contest disputes, we strongly advise you to set up hooks to be notified as soon as a dispute is created. See the Dispute event types for the set of hooks allowing you to stay up to date throughout the process. ### New dispute and repudiation When a chargeback occurs, two objects are created on Mangopay’s side: * Dispute - You can view the dispute by using the GET View a Dispute endpoint. * Repudiation - Refers to the withdrawal of funds from the platform’s Repudiation Wallet, resulting in a negative balance. You can view the Repudiation by using the GET View a Repudiation endpoint. If the dispute is contestable, the next step is creating the Dispute Documents and submitting them before the `ContestDeadline` by using the following endpoints: * POST Create a Dispute Document and POST Create a Dispute Document Page * PUT Submit a Dispute Document * PUT Submit a Dispute If the dispute is not contestable, the next step is to settle the dispute by using the following endpoint: * POST Create a Settlement Transfer **Note - Settling several disputes** You also have the opportunity to settle disputes via bank wire, using the POST Create a Direct Bank Wire PayIn to the Repudiation Wallet endpoint. ### Contesting the dispute When the dispute type is `CONTESTABLE` or `RETRIEVAL`, you can choose to either close it directly, or to contest it. **Note - Contesting partially the dispute** Mangopay allows you to handle cases where the platform would want to contest only part of the dispute (e.g., only one of several goods were damaged). You can do so by taking advantage of the `ContestedFunds` parameter. In order to contest a dispute, you need to complete the following steps before the `ContestDeadlineDate`: * Create the Dispute Documents to submit as evidence of the legitimacy of the transaction. * Submit the dispute to Mangopay teams so that they can relay the proofs to the issuing bank. **Caution - Contesting multiple disputes for the same credit card** If the platform has multiple disputes for the same card, the platform needs to send proofs to justify the legitimacy of all the disputed transactions. If only some of the transactions are contested, then banks will reject all of them, and all the disputes will be set as `LOST`. While documents might vary depending on the dispute reason, documents must always include the following information: * The amount debited to the end user * The date of the payment * The nature of the payment (the name of the platform must be visible) If the documents submitted are not in English, please include a simple translation of the main elements in English. * Invoices * Signed proofs of delivery * Certificates of authenticity * Terms and conditions on refund policy More information on which evidence to provide is available in the Dispute reasons section of this article. **Caution - Deadline set by the issuing bank** The `ContestDeadlineDate` is set by the issuing bank of the initial transaction and may usually vary between 7 to 18 days. Once the deadline passes, the dispute `Status` is automatically set to `CLOSED`. ### Settling the dispute When losing disputes, platforms need to settle their debt towards Mangopay by resetting their Repudiation Wallet balance to zero. They need to use the dedicated Settlement Transfer endpoint to wire funds to the Repudiation Wallet. ## Dispute reasons Each dispute created is associated with a reason that determines which forms of compelling evidence the platform should submit. This information can be found in the `DisputeReasonType` parameter of the Dispute object.
DisputeReasonType Action
AUTHORISATION\_DISPUTED **Evidence to provide** A document with: * The amount debited * The date * The nature of the payment (here the name of the platform must be visible) * The proof that the product was received or service provided
AUTHORISATION\_DISPUTED **What to do** Contact the Mangopay Fraud team through the Dashboard for more information.
DUPLICATE **What to do** Prove that the two transactions are both legitimate, and that you didn’t charge the customer twice for the same goods or service. **Evidence to provide** Two separate invoices must therefore be provided.
FRAUD **What to do** Prove that the transaction was initiated by the cardholder. **Evidence to provide** * Invoice or any document with the name of the user, the amount paid, and the details of the purchase. * Optionally, screenshots of the exchanges between the buyer and the platform or the buyer and the seller. If there are two or more transactions for the same user that were not contested nor reported as fraudulent in the past 120 to 365 days before the contested payment, you also need to provide at least two of the following elements about the user who initiated the chargeback: * The IP address * The shipping address * The device ID (for the phone, computer, etc. used for the payment). One of the two pieces of information provided must be the IP address or the device ID.
OTHER **What to do** Contact the Mangopay Fraud team through the Dashboard for more information.
PRODUCT\_NOT\_PROVIDED **What to do** Prove that the product was delivered. **Evidence to provide** * Invoice * Signed proof of delivery
PRODUCT\_UNACCEPTABLE **What to do** Prove that the product is not a counterfeit. **Evidence to provide** * The certificate of authenticity * The Terms and Conditions that highlight the return policy. * A screenshot of a good review, if the customer writes one after receiving the good or service. Also, if the cardholder has been reimbursed or compensated, then proof must be provided.
REFUND\_CONVERSION\_RATE **What to do** Prove that the charged amount was the right one, regardless of the currency exchange rate applied. **Evidence to provide** The Terms and Conditions that highlight the refund policy mentioning that foreign currency exchange rates are subject to fluctuations.
REFUND\_NOT\_PROCESSED **What to do** Prove that the cardholder has been reimbursed or compensated, or that the refund doesn’t apply. **Evidence to provide** * Proof of the refund transaction. * Clear cancellation or return policy, with proof that it has been communicated to the customer prior to the purchase.
TRANSACTION\_NOT\_RECOGNIZED **What to do** Prove that the transaction was initiated by the cardholder. **Evidence to provide** * Invoice, or any document with the name of the user, the amount paid and the details of the purchase. * Optionally, screenshots of the exchanges between the buyer and the platform or the buyer and the seller.
UNKNOWN **Evidence to provide** A document with: * The amount debited * The date * The nature of the payment (here the name of the platform must be visible) * The proof that the product was received or service provided
## Related resources The Dispute object # Mangopay e-wallet system export const Psp = ({content}) => {content} ; export const Emi = ({content}) => {content} ; export const Chargeback = ({content}) => {content} ; export const Aml = ({content}) => {content} ; Mangopay’s payments solution relies on electronic wallets. These wallets hold the funds processed by Mangopay on behalf of platforms and their users. Mangopay is the only partner a platform needs to handle all payments from beginning to end. We specialize in third-party payments, which means that platforms using our services are intermediaries between two groups. For example, they could be buyers and sellers on a marketplace, or project owners and contributors on a crowdfunding platform. ## Value chain Your end users are using your platform to make payments. Mangopay handles these payments via our API, which is integrated into your app or website. Our API acts as a payment gateway and we deal with everything needed to make payments happen: card issuers and networks, banks, payment methods, technical protocols, and so on. In a typical integration, Mangopay takes the role of a **payment processor** and **acquirer** (so called due to the acquisition of the funds from the end user). As a licensed , Mangopay places the acquired funds on an e-wallet for the paying user. Once the funds arrive on an e-wallet, they are inside what we call the Mangopay environment. This digital space is where your platform can unlock the power of our e-wallet system. ## The Mangopay environment Payments handled by Mangopay can be understood along three basic stages:
Pay-in Funds arrive in the Mangopay environment in what we call a pay-in. The funds might be acquired by us or another third-party (in some models). There are different pay-ins for different payment methods. Mangopay offers a wide range of international and local payment methods so your users can enjoy the experience they expect.
Wallet The pay-in arrives on a user’s wallet. Funds can then be moved around according to your business model, flexibly from wallet to wallet (we call these transfers). You can take fees, split funds between users, convert currencies, and integrate other service partners. Platforms can create an unlimited number of wallets to hold funds as long as needed. Mangopay's virtual IBANs and currency conversion services supercharge wallet capabilities.
Payout To get the money from their Mangopay wallet to their bank account, the user needs to make a payout. Strict govern this stage and so the user’s identity must be verified. Mangopay provides worldwide payout coverage and real-time payment schemes, plus fast verification checks for individuals and businesses.
## Understanding wallets Mangopay e-wallets hold funds inside the Mangopay environment. Each wallet (as they are called in the API) is attached to one user and holds funds in one currency. Currencies can be converted between wallets using Mangopay's FX offerings. All users need to have at least one wallet, whether they’re only making pay-ins to it, also receiving funds from other wallets, or looking to make a payout to their bank account. Mangopay’s system of user types and categories simplifies registration and verification. When a platform creates an API account, there are two specific types of wallets that are created automatically by Mangopay:
Fees Wallet Repudiation Wallet
The platform’s Fees Wallet is where any fees taken are sent. You can collect fees on any pay-in, transfer, or payout. Your fees are automatically wired to your bank account every month. Learn more → When an end user contests a pay-in with their bank (known as a ), the Repudiation Wallet comes into play. The funds are automatically deducted from this wallet and sent back to the user. A dispute is created which can be contested by the platform in some cases. Learn more →
# Fees and billing export const WorkingDay = ({content}) => {content} ; ## Fees Platforms use Mangopay to collect fees from their users during transactions. Mangopay’s flexible e-wallet system allows platforms to choose exactly when during their payment workflow to take fees. For each currency, Mangopay automatically creates a dedicated fees wallet for the purpose of collecting fees. To collect fees, platforms enter an amount in the transaction’s `Fees` parameter, which is then deducted from the `DebitedFunds` and directed to the fees wallet. The remaining funds are the `CreditedFunds` that arrive on the recipient’s wallet (indicated by the `CreditedWalletId`). Transactions follow this sum: > `DebitedFunds` - `Fees` = `CreditedFunds` Note that as fees is a required parameter, if you don't wish to collect fees on a transaction, you need to set the value to zero. You can collect fees at each stage of your payment workflow. ### When to collect fees #### Pay-in Collecting fees on pay-ins usually means you are charging the payer for services, because the fees are deducted from the amount they are paying. The `Fees` parameter can be used to specify fees on all payment methods, except: * Bank wire: The `DeclaredFees` parameter is used to declare the amount in advance (like the debited funds). If the transaction is successful, the `Fees` parameter is updated with the declared amount. * Virtual IBAN: There is no way to take fees on this payment method. The funds are registered automatically when they arrive on the IBAN of the wallet, so there is no way to indicate and divert fees. In case of a chargeback, fees are also reverted. For more information on managing fees during refunds, see Refunds - Handling fees. #### Transfer (recommended) Collecting fees on transfers gives you more flexibility because the funds are already inside the Mangopay environment and can therefore be managed more easily. The transfer stage also involves both sides of your platform, Payers and Owners, which gives you flexibility to modify your business model over time. #### Payout Collecting fees on payouts usually means you are charging the recipient for services, because the fees are deducted from the amount they pay out to their bank account. In case of pay-in refunds (to the buyer), taking fees on the payout makes managing the full refund flow and reconciliation more complex. ## Billing Mangopay charges platforms commission for its payment services (for more details on charges, see the Pricing page). This commission is managed separately from the payment activity of your users. Within the first 5 of the month, Mangopay generates an invoice for the previous month based on the pricing in the platform’s contract. There is one invoice generated per currency (like there is one fees wallet per currency). The balance of the platform’s fees wallet for each currency is used by Mangopay during invoicing. On the 5th of the month, the sum of the fees collected during the previous month is paid out. There are two possible cases:
Collected fees > Mangopay commission Collected fees ≤ Mangopay commission
If the sum of the collected fees is greater than the amount due to Mangopay, then: * Mangopay withdraws its commission from the collected fees and pays the remainder to the platform’s bank account If the sum of the collected fees is less than (or equal to) the amount due to Mangopay, then: * Mangopay uses the entirety of the collected fees towards the payable invoice * On the 20th of the month, the remaining amount due on the invoice is debited automatically from the platform’s bank account via direct debit
The platform’s bank account is set up, for both credit transfers and direct debits, during initial onboarding or during activation of a new currency. For fees payouts, the payment is made in the currency of the fees wallet. ForMangopay’s invoices, payments are collected as follows: * EUR invoices via SEPA Direct Debit (SDD) * GBP invoices via BACS Direct Debit * Invoices in other currencies are converted to EUR before payment via SDD For any queries related to billing processes, contact the Support team via the Dashboard. ## Related resources The Client Wallet object # Overview export const Signal = ({content}) => {content} ; ## Introduction Mangopay’s fraud prevention solution lets you define custom logic to detect and mitigate fraudulent attempts on your platform. On the **Essential** plan, you can use the solution without additional integration from within the [Mangopay Dashboard](https://hub.mangopay.com/) to monitor transactions, create and test your rules, and leverage network-wide insights from Mangopay. In this case, the solution relies only on information already available in the transaction data (such as IP address, user and payment details, etc). On the **Advanced** plan, you can also integrate the profiler in your user-facing pages to collect additional data from their browsing session which can enhance your fraud-detection capabilities thanks to proprietary technology. This option leverages a wide range of data signals that can help detect bots, VPNs, and abnormal network settings or user behavior. See a full feature comparison on our [pricing page](https://mangopay.com/pricing#fraud-prevention). #### Safeguard your platform Enjoy a 30-day free trial of our Advanced fraud prevention plan and see our solution in action. No charges apply, subscribe when ready. [Sign up from the Dashboard](https://hub.mangopay.com/) ## How it works Mangopay’s fraud prevention solution safeguards your platform by screening events. The solution analyzes data of events screened and, based on your custom rules, generates recommendations. The diagram below shows the example of pay-in fraud prevention: