# The API Response object
Source: https://docs.mangopay.com/api-reference/api-responses/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
Source: https://docs.mangopay.com/api-reference/api-responses/view-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
Source: https://docs.mangopay.com/api-reference/apple-pay/apple-pay-payin-object
### Description
The Apple Pay PayIn object allows platforms to process payments with Apple Pay.
**Note – Prerequisites to using Apple Pay**
Using Apple Pay requires and activation from Mangopay, and your platform also needs to integrate with Apple Pay directly. See the [Apple Pay guide](/guides/payment-methods/apple-pay) for more information.
### 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 about testing Apple Pay
# Create an Apple Pay PayIn
Source: https://docs.mangopay.com/api-reference/apple-pay/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
For PayPal recurring registrations, this value is returned `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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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\":\"MIAGCSqGSIb3DQEHAqCAMIACAQExDTALBglghkgBZQMEAgEwgAYJKoZIhvcNAQcBAACggDCCA+MwggOIoAMCAQICCEwwQUlRnVQ2MAoGCCqGSM49BAMCMHoxLjAsBgNVBAMMJUFwcGxlIEFwcGxpY2F0aW9uIEludGVncmF0aW9uIENBIC0gRzMxJjAkBgNVBAsMHUFwcGxlIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRMwEQYDVQQKDApBcHBsZSBJbmMuMQswCQYDVQQGEwJVUzAeFw0xOTA1MTgwMTMyNTdaFw0yNDA1MTYwMTMyNTdaMF8xJTAjBgNVBAMMHGVjYy1zbXAtYnJva2VyLXNpZ25fVUM0LVBST0QxFDASBgNVBAsMC2lPUyBTeXN0ZW1zMRMwEQYDVQQKDApBcHBsZSBJbmMuMQswCQYDVQQGEwJVUzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABMIVd+3r1seyIY9o3XCQoSGNx7C9bywoPYRgldlK9KVBG4NCDtgR80B+gzMfHFTD9+syINa61dTv9JKJiT58DxOjggIRMIICDTAMBgNVHRMBAf8EAjAAMB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MRswGTALBglghkgBZQMEAgGhCgYIKoZIzj0EAwIwLwYJKoZIhvcNAQkEMSIEICNPuucWpap0huG1HkZR1liLCfnUyPRFKc3BMuYYfb/1MAoGCCqGSM49BAMCBEcwRQIhAJSGdxshD9TsTvVniHsRx1Jez6j/5cv+1HFeJCjQxpXPAiBXBwBFqfvNpeUuEGHIJATVLN4kGQaxAunVG6aZ36e0CwAAAAAAAA==\",\"header\":{\"publicKeyHash\":\"xUyeFb75d359bfPEiq2JJMQj694UAxtTuBsaTWMOJxQ=\",\"ephemeralPublicKey\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEkeuICjZ7x15b7hPEBEBT5Zp43l95wCmJCU3QNxBvOCusG9w9sJMULuXlT4K8LOlPgaZzAcyWlfNwnLivVdOPfg==\",\"transactionId\":\"97e64d87f13a89ff6443cdcc205d5ccf7e15368b0d64126a8a2e0888a3a5c2a0\"},\"version\":\"EC_v1\"}"
}
}
```
```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\\/oyFLWDuKGvhbJwZqWh1d1o9JT29QVmvy3Oq2JEjq3c3NutYut4rwDEP4owqI40Nb7mP2ebmdNgnYyWfPmkRfDCRHIWtbMC35IPg5313B1dgXZ2BmyZRXD5p+mr67vAk7iFfjEpu3GieFqwZrTl3\\/pI5V8Sxe3SIYKgT5Hr7ow==\"," +
"\"signature\":\"MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID5jCCA4ugAwIBAgIIaGD2mdnMpw8wCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTE2MDYwMzE4MTY0MFoXDTIxMDYwMjE4MTY0MFowYjEoMCYGA1UEAwwfZWNjLXNtcC1icm9rZXItc2lnbl9VQzQtU0FOREJPWDEUMBIGA1UECwwLaU9TIFN5c3RlbXMxEzARBgNVBA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GUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTAghoYPaZ2cynDzANBglghkgBZQMEAgEFAKCBlTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xOTA1MjMxMTA1MDdaMCoGCSqGSIb3DQEJNDEdMBswDQYJYIZIAWUDBAIBBQChCgYIKoZIzj0EAwIwLwYJKoZIhvcNAQkEMSIEIIvfGVQYBeOilcB7GNI8m8+FBVZ28QfA6BIXaggBja2PMAoGCCqGSM49BAMCBEYwRAIgU01yYfjlx9bvGeC5CU2RS5KBEG+15HH9tz\\/sg3qmQ14CID4F4ZJwAz+tXAUcAIzoMpYSnM8YBlnGJSTSp+LhspenAAAAAAAA\"," +
"\"header\":" +
"{\"ephemeralPublicKey\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE0rs3wRpirXjPbFDQfPRdfEzRIZDWm0qn7Y0HB0PNzV1DDKfpYrnhRb4GEhBF\\/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 = "97e64d87f13a89ff6443cdcc205d5ccf7e15368b0d64126a8a2e0888a3a5c2a0",
TokenData = "{\"data\":\"2TihgKbmyPje02jYvkB6P+a6LCNmvKTFi4b7UN32sP4FJkllQP8CXIUPdv71xpIpBHetQ6TL7ON3Yex3L0Sc9hm15pME46/5fehwUxmgiumiK1eTupckAST6Zc0IYy2f9iJB9XpX+6dnKqTj7di12bo/iDXW4g2rbenNiDI0caiWebDaUG9DHSFjDxipQWx3Z8rf+zDiMGuDwO41LVh2SA1hRVbdINLpPpLtpxvyDeDkPQVohakcE+sK83QCHx0cEahAUKj6gAv6QuOLtWTsTtad04/ct3G0GnGeRp9p0fE0yJ+s4ybPj4WuV8lKNm6Lsg/WS9TqzT3RFgdjDjGdZ8W1CaEb/deG+Hh4MCebVJBP7iEdyfkB1afjJa0AqfbOBW2SIKXULtjP84QP\",\"signature\":\"MIAGCSqGSIb3DQEHAqCAMIACAQExDTALBglghkgBZQMEAgEwgA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HBsZXJvb3RjYWczLmNybDAOBgNVHQ8BAf8EBAMCAQYwEAYKKoZIhvdjZAYCDgQCBQAwCgYIKoZIzj0EAwIDZwAwZAIwOs9yg1EWmbGG+zXDVspiv/QX7dkPdU2ijr7xnIFeQreJ+Jj3m1mfmNVBDY+d6cL+AjAyLdVEIbCjBXdsXfM4O5Bn/Rd8LCFtlk/GcmmCEm9U+Hp9G5nLmwmJIWEGmQ8Jkh0AADGCAYgwggGEAgEBMIGGMHoxLjAsBgNVBAMMJUFwcGxlIEFwcGxpY2F0aW9uIEludGVncmF0aW9uIENBIC0gRzMxJjAkBgNVBAsMHUFwcGxlIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRMwEQYDVQQKDApBcHBsZSBJbmMuMQswCQYDVQQGEwJVUwIITDBBSVGdVDYwCwYJYIZIAWUDBAIBoIGTMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTIzMTAwNDE0MjczMlowKAYJKoZIhvcNAQk0MRswGTALBglghkgBZQMEAgGhCgYIKoZIzj0EAwIwLwYJKoZIhvcNAQkEMSIEICNPuucWpap0huG1HkZR1liLCfnUyPRFKc3BMuYYfb/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)
Source: https://docs.mangopay.com/api-reference/apple-pay/view-payin-apple-pay
GET /v2.01/{ClientId}/payins/{PayInId}
### Path parameters
The unique identifier of the pay-in.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
For PayPal recurring registrations, this value is returned `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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/bancontact/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
Source: https://docs.mangopay.com/api-reference/bancontact/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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)
Source: https://docs.mangopay.com/api-reference/bancontact/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/bank-accounts/bank-account-object
### Description
**Caution – Replaced by Recipients feature**
The Bank Account object and endpoints have been replaced by the Recipients feature, which all platforms should integrate instead.
Legacy active Bank Accounts (`Active` is `true`) have been migrated to the new feature and their data is retrievable via the [GET View a Recipient](/api-reference/recipients/view-recipient) endpoint using the same `BankAccountId`. Read more about [legacy bank account migration](/guides/payouts#migration-of-legacy-bank-accounts).
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 (including the UK when the payout currency is **not** GBP)
* `US` – For accounts registered in the United States
* `CA` – For accounts registered in Canada
* `GB` – For accounts registered in the United Kingdom **only when** the payout currency is GBP (for other payout currencies, use the `IBAN` type)
* `OTHER` – For accounts registered in countries that do not use IBAN (and are not the US, Canada, or the UK)
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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).
Max. length: 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.
Format: 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 registered.
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
Source: https://docs.mangopay.com/api-reference/bank-accounts/create-ca-bank-account
POST /v2.01/{ClientId}/users/{UserId}/bankaccounts/ca
**Caution – Replaced by Recipients feature**
The Bank Account object and endpoints have been replaced by the Recipients feature, which all platforms should integrate instead.
Legacy active Bank Accounts (`Active` is `true`) have been migrated to the new feature and their data is retrievable via the [GET View a Recipient](/api-reference/recipients/view-recipient) endpoint using the same `BankAccountId`. Read more about [legacy bank account migration](/guides/payouts#migration-of-legacy-bank-accounts).
### 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
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.
Format: 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Format: 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)
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/bank-accounts/create-gb-bank-account
POST /v2.01/{ClientId}/users/{UserId}/bankaccounts/gb
**Caution – Replaced by Recipients feature**
The Bank Account object and endpoints have been replaced by the Recipients feature, which all platforms should integrate instead.
Legacy active Bank Accounts (`Active` is `true`) have been migrated to the new feature and their data is retrievable via the [GET View a Recipient](/api-reference/recipients/view-recipient) endpoint using the same `BankAccountId`. Read more about [legacy bank account migration](/guides/payouts#migration-of-legacy-bank-accounts).
### 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
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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)
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/bank-accounts/create-iban-bank-account
POST /v2.01/{ClientId}/users/{UserId}/bankaccounts/iban
**Caution – Replaced by Recipients feature**
The Bank Account object and endpoints have been replaced by the Recipients feature, which all platforms should integrate instead.
Legacy active Bank Accounts (`Active` is `true`) have been migrated to the new feature and their data is retrievable via the [GET View a Recipient](/api-reference/recipients/view-recipient) endpoint using the same `BankAccountId`. Read more about [legacy bank account migration](/guides/payouts#migration-of-legacy-bank-accounts).
**Note – 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
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.
Max. length: 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 characters used to define the branch of the bank (sometimes replaced with XXX)
**Note:** On IBAN-type bank accounts, the full 11-character version (not using XXX) may be required for the BIC to be accepted as valid. Alternatively, this optional field can be omitted.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max. length: 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 characters used to define the branch of the bank (sometimes replaced with XXX)
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)
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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": "709e198c-c72a-4589-8055-b210c3360893#1745589614",
"Date": 1745589615,
"errors": {
"BIC": "The value is not a valid BIC"
}
}
```
```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
Source: https://docs.mangopay.com/api-reference/bank-accounts/create-other-bank-account
POST /v2.01/{ClientId}/users/{UserId}/bankaccounts/other
**Caution – Replaced by Recipients feature**
The Bank Account object and endpoints have been replaced by the Recipients feature, which all platforms should integrate instead.
Legacy active Bank Accounts (`Active` is `true`) have been migrated to the new feature and their data is retrievable via the [GET View a Recipient](/api-reference/recipients/view-recipient) endpoint using the same `BankAccountId`. Read more about [legacy bank account migration](/guides/payouts#migration-of-legacy-bank-accounts).
**Note – 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 BIC in the `BIC` field. In the `IBAN` field, combine the 6-digit Bank State Branch (BSB) number and the account number.
### 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
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.
Max. length 35, min. length 5; alphanumeric characters only.
The unique number 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 characters used to define the branch of the bank (sometimes replaced with XXX)
The country in which the bank account is registered.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max. length 35, min. length 5; alphanumeric characters only.
The unique number 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 characters used to define the branch of the bank (sometimes replaced with XXX)
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country in which the bank account is registered.
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)
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/bank-accounts/create-us-bank-account
POST /v2.01/{ClientId}/users/{UserId}/bankaccounts/us
**Caution – Replaced by Recipients feature**
The Bank Account object and endpoints have been replaced by the Recipients feature, which all platforms should integrate instead.
Legacy active Bank Accounts (`Active` is `true`) have been migrated to the new feature and their data is retrievable via the [GET View a Recipient](/api-reference/recipients/view-recipient) endpoint using the same `BankAccountId`. Read more about [legacy bank account migration](/guides/payouts#migration-of-legacy-bank-accounts).
### 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
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.
Format: 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Format: 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)
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/bank-accounts/deactivate-bank-account
PUT /v2.01/{ClientId}/users/{UserId}/bankaccounts/{BankAccountId}
**Caution – Replaced by Recipients feature**
The Bank Account object and endpoints have been replaced by the Recipients feature, which all platforms should integrate instead.
Legacy active Bank Accounts (`Active` is `true`) have been migrated to the new feature and their data is retrievable via the [GET View a Recipient](/api-reference/recipients/view-recipient) endpoint using the same `BankAccountId`. Read more about [legacy bank account migration](/guides/payouts#migration-of-legacy-bank-accounts).
### 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max. length: 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 characters used to define the branch of the bank (sometimes replaced with XXX)
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)
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/bank-accounts/list-bank-accounts-user
GET /v2.01/{ClientId}/users/{UserId}/bankaccounts
**Caution – Replaced by Recipients feature**
The Bank Account object and endpoints have been replaced by the Recipients feature, which all platforms should integrate instead.
Legacy active Bank Accounts (`Active` is `true`) have been migrated to the new feature and their data is retrievable via the [GET View a Recipient](/api-reference/recipients/view-recipient) endpoint using the same `BankAccountId`. Read more about [legacy bank account migration](/guides/payouts#migration-of-legacy-bank-accounts).
**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.
Min. value: `1`; 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: 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 characters used to define the branch of the bank (sometimes replaced with XXX)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country in which the bank account is registered.
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)
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/bank-accounts/view-bank-account
GET /v2.01/{ClientId}/users/{UserId}/bankaccounts/{BankAccountId}
**Caution – Replaced by Recipients feature**
The Bank Account object and endpoints have been replaced by the Recipients feature, which all platforms should integrate instead.
Legacy active Bank Accounts (`Active` is `true`) have been migrated to the new feature and their data is retrievable via the [GET View a Recipient](/api-reference/recipients/view-recipient) endpoint using the same `BankAccountId`. Read more about [legacy bank account migration](/guides/payouts#migration-of-legacy-bank-accounts).
### 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max. length: 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 characters used to define the branch of the bank (sometimes replaced with XXX)
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)
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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)
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/bank-wire-payins/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.
[Learn more](/guides/payment-methods/banking/bank-wire) **→**
### 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`).
For a direct bank wire pay-in, the `CreditedFunds` 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 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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Information received from banking partners for the transaction, based on the cash management (Camt) messages of ISO 20022.
This information is only returned when the pay-in `Status` becomes `SUCCEEDED`.
If data is not available then an empty array, `null`, or nulled fields are returned.
If multiple wire payments are received for a single pay-in, then multiple objects are returned.
Max. length: 50 characters
The bank transaction domain code (e.g. PMNT).
Max. length: 50 characters
The bank transaction domain family code (e.g. ICDT).
Max. length: 50 characters
The domain sub-family code (e.g. ACDT).
References for the transaction. If multiple references are available, multiple objects are returned.
Max. length: 50 characters
The type of the reference.
Max. length: 100 characters
The value of the reference.
Max. length: 100 characters
The name of the debtor (i.e. the registered owner of the account that was debited).
Max. length: 50 characters
The account identifier of the debtor (e.g. the account number).
Max. length: 50 characters
The agent of the debtor (e.g. the BIC or bank code).
Max. length: 500 characters
The first line of the debtor’s address.
Max. length: 500 characters
The second line of the debtor’s address.
Max. length: 500 characters
The third line of the debtor’s address.
Max. length: 1,000 characters
Remittance information for the transaction.
Max. length: 1,000 characters
Remittance information for the transaction.
Max. length: 1,000 characters
Remittance information for the transaction.
Max. length: 1,000 characters
Remittance information for the transaction.
### Related resources
Learn more about bank wire pay-ins
# Create a Bank Wire PayIn
Source: https://docs.mangopay.com/api-reference/bank-wire-payins/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
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 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 credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`).
For a direct bank wire pay-in, the `CreditedFunds` 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 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Information received from banking partners for the transaction, based on the cash management (Camt) messages of ISO 20022.
This information is only returned when the pay-in `Status` becomes `SUCCEEDED`.
If data is not available then an empty array, `null`, or nulled fields are returned.
If multiple wire payments are received for a single pay-in, then multiple objects are returned.
Max. length: 50 characters
The bank transaction domain code (e.g. PMNT).
Max. length: 50 characters
The bank transaction domain family code (e.g. ICDT).
Max. length: 50 characters
The domain sub-family code (e.g. ACDT).
References for the transaction. If multiple references are available, multiple objects are returned.
Max. length: 50 characters
The type of the reference.
Max. length: 100 characters
The value of the reference.
Max. length: 100 characters
The name of the debtor (i.e. the registered owner of the account that was debited).
Max. length: 50 characters
The account identifier of the debtor (e.g. the account number).
Max. length: 50 characters
The agent of the debtor (e.g. the BIC or bank code).
Max. length: 500 characters
The first line of the debtor’s address.
Max. length: 500 characters
The second line of the debtor’s address.
Max. length: 500 characters
The third line of the debtor’s address.
Max. length: 1,000 characters
Remittance information for the transaction.
Max. length: 1,000 characters
Remittance information for the transaction.
Max. length: 1,000 characters
Remittance information for the transaction.
Max. length: 1,000 characters
Remittance information for the transaction.
```json 200 - CREATED
{
"Id": "payin_m_01JFAJSSR3VW3SHX2X74C8GW82",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1734448310,
"ResultCode": null,
"ResultMessage": null,
"AuthorId": "user_m_01JCQYJNHFPENP1SKTCBYER0F8",
"CreditedUserId": "user_m_01JCQYJNHFPENP1SKTCBYER0F8",
"DebitedFunds": {
"Currency": "XXX",
"Amount": 0
},
"CreditedFunds": {
"Currency": "XXX",
"Amount": 0
},
"Fees": {
"Currency": "XXX",
"Amount": 0
},
"Status": "CREATED",
"ExecutionDate": null,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01JFAJS7838A32W7KPJ7NNGJ1D",
"DebitedWalletId": null,
"PaymentType": "BANK_WIRE",
"ExecutionType": "DIRECT",
"DeclaredDebitedFunds": {
"Currency": "EUR",
"Amount": 62789
},
"DeclaredFees": {
"Currency": "EUR",
"Amount": 7826
},
"WireReference": "MGgq1y8jjb",
"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"
},
"TransactionDetails": []
}
```
```json REST
{
"Tag": "Created using Mangopay API Postman Collection",
"AuthorId": "user_m_01JCQYJNHFPENP1SKTCBYER0F8",
"CreditedWalletId": "wlt_m_01JFAJS7838A32W7KPJ7NNGJ1D",
"DeclaredDebitedFunds": {
"Currency": "EUR",
"Amount": 62789
},
"DeclaredFees": {
"Currency": "EUR",
"Amount": 7826
},
}
```
```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)
Source: https://docs.mangopay.com/api-reference/bank-wire-payins/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
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 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 credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`).
For a direct bank wire pay-in, the `CreditedFunds` 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 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Information received from banking partners for the transaction, based on the cash management (Camt) messages of ISO 20022.
This information is only returned when the pay-in `Status` becomes `SUCCEEDED`.
If data is not available then an empty array, `null`, or nulled fields are returned.
If multiple wire payments are received for a single pay-in, then multiple objects are returned.
Max. length: 50 characters
The bank transaction domain code (e.g. PMNT).
Max. length: 50 characters
The bank transaction domain family code (e.g. ICDT).
Max. length: 50 characters
The domain sub-family code (e.g. ACDT).
References for the transaction. If multiple references are available, multiple objects are returned.
Max. length: 50 characters
The type of the reference.
Max. length: 100 characters
The value of the reference.
Max. length: 100 characters
The name of the debtor (i.e. the registered owner of the account that was debited).
Max. length: 50 characters
The account identifier of the debtor (e.g. the account number).
Max. length: 50 characters
The agent of the debtor (e.g. the BIC or bank code).
Max. length: 500 characters
The first line of the debtor’s address.
Max. length: 500 characters
The second line of the debtor’s address.
Max. length: 500 characters
The third line of the debtor’s address.
Max. length: 1,000 characters
Remittance information for the transaction.
Max. length: 1,000 characters
Remittance information for the transaction.
Max. length: 1,000 characters
Remittance information for the transaction.
Max. length: 1,000 characters
Remittance information for the transaction.
```json 200 - SUCCEEDED
{
"Id": "payin_m_01JFAJSSR3VW3SHX2X74C8GW82",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1734448310,
"ResultCode": null,
"ResultMessage": null,
"AuthorId": "user_m_01JCQYJNHFPENP1SKTCBYER0F8",
"CreditedUserId": "user_m_01JCQYJNHFPENP1SKTCBYER0F8",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 62789
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 54963
},
"Fees": {
"Currency": "EUR",
"Amount": 7826
},
"Status": "CREATED",
"ExecutionDate": null,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01JFAJS7838A32W7KPJ7NNGJ1D",
"DebitedWalletId": null,
"PaymentType": "BANK_WIRE",
"ExecutionType": "DIRECT",
"DeclaredDebitedFunds": {
"Currency": "EUR",
"Amount": 62789
},
"DeclaredFees": {
"Currency": "EUR",
"Amount": 7826
},
"WireReference": "MGgq1y8jjb",
"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"
},
"TransactionDetails": [
{
"BankTransactionDomainCode": "PMNT",
"BankTransactionDomainFamilyCode": "RCDT",
"BankTransactionDomainSubFamilyCode": null,
"References": [
{
"Type": "EndToEndId",
"Value": "AAB.123.EU.ABC-00012345"
}
],
"DebtorName": "Example Business Services GmbH",
"DebtorAccount": "DE95500400007892074911",
"DebtorAgent": "COBADEFFXXX",
"DebtorAddressLine1": null,
"DebtorAddressLine2": null,
"DebtorAddressLine3": null,
"RemittanceInformationLine1": "MG12AB34CD",
"RemittanceInformationLine2": "/SABF/9URQ",
"RemittanceInformationLine3": null,
"RemittanceInformationLine4": null
}
]
}
```
```php PHP
Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$payinId = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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
Source: https://docs.mangopay.com/api-reference/banking-aliases/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.
**Caution – Replaced by Virtual Accounts**
New integrations should use [Virtual Accounts](/api-reference/virtual-accounts/virtual-account-object), which have replaced Banking Aliases. Existing banking aliases can continue to be used and these endpoints are still supported.
Constraints and comparison with virtual accounts:
* It's not possible to take `Fees` on External Instruction pay-ins to banking aliases – this constraint also exists on virtual accounts
* Only one Banking Alias can be created per wallet, whereas multiple are possible with virtual accounts (of the same [type](/guides/payment-methods/banking/virtual-iban#types))
* On Banking Alias, `LocalAccountDetails` are only available for the UK (`Country` is `GB`), and no further [country expansion](/guides/payment-methods/banking/virtual-iban#iban-countries-and-currencies) is planned
### 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 returned if applicable for the `Country` (e.g. `GB`), otherwise `null`.
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 IBANLearn how to attach a virtual IBAN to a wallet
# Create an IBAN Banking Alias
Source: https://docs.mangopay.com/api-reference/banking-aliases/create-iban-banking-alias
POST /v2.01/{ClientId}/wallets/{WalletId}/bankingaliases/iban
**Caution – Replaced by Virtual Accounts**
New integrations should use [Virtual Accounts](/api-reference/virtual-accounts/virtual-account-object), which have replaced Banking Aliases. Existing banking aliases can continue to be used and these endpoints are still supported.
See the [Banking Alias object](/api-reference/banking-aliases/banking-alias-object) for a comparison.
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.
**Note - Payee confirmation in the UK**
When the user sets up the payee with their bank, Mangopay UK or Mangopay SA is displayed as the account holder name. You should communicate this to them to avoid confusion.
### 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`.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 returned if applicable for the `Country` (e.g. `GB`), otherwise `null`
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`.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 banking alias existing for this wallet",
"Type": "wallet_banking_alias_already_exists",
"Id": "77b73aa3-e08e-4e04-9ffd-5c94ed4f73ff",
"Date": 1732178114,
"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
Source: https://docs.mangopay.com/api-reference/banking-aliases/deactivate-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`.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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);
}
}
```
# View a Banking Alias
Source: https://docs.mangopay.com/api-reference/banking-aliases/view-banking-alias
GET /v2.01/{ClientId}/bankingaliases/{BankingAliasId}
**Note - Payee confirmation in the UK**
When the user sets up the payee with their bank, Mangopay UK or Mangopay SA is displayed as the account holder name. You should communicate this to them to avoid confusion.
### 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`.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 returned if applicable for the `Country` (e.g. `GB`), otherwise `null`
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`.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/banking-aliases/view-banking-alias-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 returned if applicable for the `Country` (e.g. `GB`), otherwise `null`
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`.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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);
}
}
```
# The Bizum PayIn object
Source: https://docs.mangopay.com/api-reference/bizum/bizum-payin-object
### Description
The Bizum PayIn object allows your platform to process Bizum payments.
There are two Bizum flows, both using the same endpoint with different payloads:
* **Phone** – If `Phone` is sent, the `ReturnURL` is ignored and `RedirectURL` is not returned because no redirection is necessary: the user receives a push notification from the Bizum app asking them to authenticate. In Sandbox, the `RedirectURL` is returned in all cases, because it is the only way to complete the transaction.
* **Redirect** – If `Phone` is not sent, then `ReturnURL` is required and you must redirect the user to the `RedirectURL` in the response so they can enter their phone number themselves.
[Read more about Bizum](/guides/payment-methods/bizum) **→**
### Attributes
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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:** `BIZUM`
The type of pay-in.
**Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION`
The type of execution for the pay-in.
Format: International E.164 standard (preceded by plus sign and country code, `+34` in Spain); pattern: `^(\\+?34)?[6-9][0-9]{8}$`
The phone number of the end user to which the Bizum push notification is sent to authenticate the transaction.
On Bizum, if the `Phone` parameter is sent, then `RedirectURL` is not returned and `ReturnURL` not required.
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.
# Create a Bizum PayIn
Source: https://docs.mangopay.com/api-reference/bizum/create-bizum-payin
POST /v2.01/{ClientId}/payins/payment-methods/bizum
There are two [Bizum](/guides/payment-methods/bizum) flows, depending on the payload sent to this endpoint:
* **Phone** – If `Phone` is sent, the `ReturnURL` is ignored and `RedirectURL` is not returned because no redirection is necessary: the user receives a push notification from the Bizum app asking them to authenticate. In Sandbox, the `RedirectURL` is returned in all cases, because it is the only way to complete the transaction (see [testing](/testing/payment-methods#bizum)).
* **Redirect** – If `Phone` is not sent, then `ReturnURL` is required and you must redirect the user to the `RedirectURL` in the response so they can enter their phone number themselves.
**Note – Timeout after 5 minutes**
The payment session lasts for 5 minutes for both the phone and redirect flows, 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: 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
The URL to which the user is returned after the payment, whether the transaction is successful or not.
Required if `Phone` is not sent.
Format: International E.164 standard (preceded by plus sign and country code, `+34` in Spain); pattern: `^(\\+?34)?[6-9][0-9]{8}$`
The phone number of the end user to which the Bizum push notification is sent to authenticate the transaction.
If the `Phone` parameter is sent, then `RedirectURL` is not returned and `ReturnURL` is ignored.
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: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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:** `BIZUM`
The type of pay-in.
**Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION`
The type of execution for the pay-in.
Format: International E.164 standard (preceded by plus sign and country code, `+34` in Spain); pattern: `^(\\+?34)?[6-9][0-9]{8}$`
The phone number of the end user to which the Bizum push notification is sent to authenticate the transaction.
On Bizum, if the `Phone` parameter is sent, then `RedirectURL` is not returned and `ReturnURL` not required.
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
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Id": "7b5f232e-1802-4367-ab67-1914a4038339",
"Date": 1750326049,
"Type": "param_error",
"Errors": {
"Phone": "The field must match the regular expression '^(\\+?34)?[6-9][0-9]{8}$'."
}
}
```
```json Phone
{
"Id": "payin_m_01HZ7HGSWAWWNS6NBTBPBZ6TNC",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1717166434,
"AuthorId": "user_m_01HYE3F4EYHAMD7CX5K0Z0A5NF",
"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": "wlt_m_01HYG6AM9V72R64QTBHJY705DF",
"CreditedUserId": "user_m_01HYE3F4EYHAMD7CX5K0Z0A5NF",
"PaymentType": "BIZUM",
"ExecutionType": "WEB",
"StatementDescriptor": "Example123",
"Phone" : "+34700000000"
}
```
```json Redirect
{
"Id": "payin_m_01HZ7HGSWAWWNS6NBTBPBZ6TNC",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1717166434,
"AuthorId": "user_m_01HYE3F4EYHAMD7CX5K0Z0A5NF",
"CreditedUserId": "user_m_01HYE3F4EYHAMD7CX5K0Z0A5NF",
"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": "wlt_m_01HYG6AM9V72R64QTBHJY705DF",
"PaymentType": "BIZUM",
"ExecutionType": "WEB",
"RedirectURL": "https://authman.sandbox.lp-pl.ppro.com/v0/pages/?redirection_token=eyJhbGciOiJIUzUxMiJ9.eyJzZXNzaW9uIjp7InIiOiJjaGFyZ2VfS0JYM1dsVksxUE9JTktGRTlaM2VvIn19.DKOyGX-fVCkPsIrag0dQ7LL-_M3a-l1issTKN52CJqqXmLyrdZSmaQYMdq2gHSyngRSjES6GqiLVeKGNrb-3lQ",
"ReturnURL": "https://docs.mangopay.com/please-ignore?transactionId=payin_m_01HZ7HGSWAWWNS6NBTBPBZ6TNC",
"StatementDescriptor": "Example123"
}
```
```json Phone
{
"AuthorId": "user_m_01HYE3F4EYHAMD7CX5K0Z0A5NF",
"CreditedWalletId": "wlt_m_01HYG6AM9V72R64QTBHJY705DF",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 100
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Phone": "+34700000000",
"Tag" : "Created using the Mangopay API Postman collection",
"StatementDescriptor" : "Example123"
}
```
```json Redirect
{
"AuthorId": "user_m_01HYE3F4EYHAMD7CX5K0Z0A5NF",
"CreditedWalletId": "wlt_m_01HYG6AM9V72R64QTBHJY705DF",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 100
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"ReturnURL": "https://docs.mangopay.com/please-ignore",
"Tag" : "Created using the Mangopay API Postman collection",
"StatementDescriptor" : "Example123"
}
```
# View a PayIn (Bizum)
Source: https://docs.mangopay.com/api-reference/bizum/view-payin-bizum
GET /v2.01/{ClientId}/payins/{PayInId}
{/* // import PhpViewPayin from '/snippets/code/php-view-payin.mdx'; */}
{/* // import NodeViewPayin from '/snippets/code/node-view-payin.mdx'; */}
{/* // import RubyViewPayin from '/snippets/code/ruby-view-payin.mdx'; */}
{/* // import JavaViewPayin from '/snippets/code/java-view-payin.mdx'; */}
{/* // import PythonViewPayin from '/snippets/code/view-payin-python.mdx'; */}
**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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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:** `BIZUM`
The type of pay-in.
**Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION`
The type of execution for the pay-in.
Format: International E.164 standard (preceded by plus sign and country code, `+34` in Spain); pattern: `^(\\+?34)?[6-9][0-9]{8}$`
The phone number of the end user to which the Bizum push notification is sent to authenticate the transaction.
On Bizum, if the `Phone` parameter is sent, then `RedirectURL` is not returned and `ReturnURL` not required.
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 - Phone
{
"Id": "payin_m_01HZ7HGSWAWWNS6NBTBPBZ6TNC",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1717166434,
"AuthorId": "user_m_01HYE3F4EYHAMD7CX5K0Z0A5NF",
"CreditedUserId": "user_m_01HYE3F4EYHAMD7CX5K0Z0A5NF",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 100
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 100
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1717166562,
"Phone" : "+34700000000",
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01HYG6AM9V72R64QTBHJY705DF",
"PaymentType": "BIZUM",
"ExecutionType": "WEB",
"StatementDescriptor": "Example123"
}
```
```json 200 - Redirect
{
"Id": "payin_m_01HZ7HGSWAWWNS6NBTBPBZ6TNC",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1717166434,
"AuthorId": "user_m_01HYE3F4EYHAMD7CX5K0Z0A5NF",
"CreditedUserId": "user_m_01HYE3F4EYHAMD7CX5K0Z0A5NF",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 100
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 100
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1717166562,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01HYG6AM9V72R64QTBHJY705DF",
"PaymentType": "BIZUM",
"ExecutionType": "WEB",
"RedirectURL": "https://authman.sandbox.lp-pl.ppro.com/v0/pages/?redirection_token=eyJhbGciOiJIUzUxMiJ9.eyJzZXNzaW9uIjp7InIiOiJjaGFyZ2VfS0JYM1dsVksxUE9JTktGRTlaM2VvIn19.DKOyGX-fVCkPsIrag0dQ7LL-_M3a-l1issTKN52CJqqXmLyrdZSmaQYMdq2gHSyngRSjES6GqiLVeKGNrb-3lQ",
"ReturnURL": "https://docs.mangopay.com/please-ignore?transactionId=payin_m_01HZ7HGSWAWWNS6NBTBPBZ6TNC",
"StatementDescriptor": "Example123"
}
```
{/* */}
# The BLIK PayIn object
Source: https://docs.mangopay.com/api-reference/blik/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)
Source: https://docs.mangopay.com/api-reference/blik/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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)
Source: https://docs.mangopay.com/api-reference/blik/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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)
Source: https://docs.mangopay.com/api-reference/blik/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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
Source: https://docs.mangopay.com/api-reference/card-registrations/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
# Create a Card Registration
Source: https://docs.mangopay.com/api-reference/card-registrations/create-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"
}
```
```python cURL
curl -X POST https://api.sandbox.mangopay.com/v2.01/{ClientId}/cardregistrations \
-H 'Content-Type: application/json' \
-d '{
"Tag": null,
"UserId": "user_m_01J7KACBPAV7XAF8AH9BDCJPRS",
"CardType": "CB_VISA_MASTERCARD",
"Currency": "EUR"
} '
```
```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
Source: https://docs.mangopay.com/api-reference/card-registrations/tokenize-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 -X POST {CardRegistrationURL} \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d '{
"accessKeyRef": "ehvrHoPE6FpjCCAgmNvg",
"data": "lhOJ6CFiDJPCXViyHjfcayh92nouB3AAaB5yqiLCBT6yjkLPCptmxsUdfffAc6EE4uj9AuSfmwbdfKN3BMechzUU3Gz8ectEx70TDeupudr",
"cardNumber": "4970105181818183",
"cardExpirationDate": "1229",
"cardCvx": "123"
}'
```
# Update a Card Registration
Source: https://docs.mangopay.com/api-reference/card-registrations/update-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"
}
```
```python cURL
curl -X PUT https://api.sandbox.mangopay.com/v2.01/{ClientId}/cardregistrations/{CardRegistrationId} \
-H 'Content-Type: application/json' \
-d '{
"RegistrationData": "data=acIcnwwLleiAvlZUea5VxZlDBkf07H6B9-N7SrRv5Vv7oSLc1hhCdoFX4JxfZL2iUkLIQL3o9ehAOeaXCbc1KFWnr4ySDvkZ--mJxxdF-vw-gzLNe3lvG2loJvmwrDyRNx0xgKTVnyDj15oG8jR88g",
"CardHolderName": "Alex Smith"
}'
```
```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
Source: https://docs.mangopay.com/api-reference/card-registrations/view-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"
}
```
```python cURL
curl -X GET https://api.sandbox.mangopay.com/v2.01/{ClientId}/cardregistrations/{CardRegistrationId} \
```
```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
Source: https://docs.mangopay.com/api-reference/card-validations/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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/card-validations/create-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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 cards.
**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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/card-validations/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/cards/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.
The name of the card issuing bank.
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
# Deactivate or edit a Card
Source: https://docs.mangopay.com/api-reference/cards/deactivate-edit-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 name of the card issuing bank.
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
Source: https://docs.mangopay.com/api-reference/cards/list-cards-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 name of the card issuing bank.
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
Source: https://docs.mangopay.com/api-reference/cards/list-cards-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 name of the card issuing bank.
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
Source: https://docs.mangopay.com/api-reference/cards/view-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 name of the card issuing bank.
**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
Source: https://docs.mangopay.com/api-reference/client-wallets/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
Source: https://docs.mangopay.com/api-reference/client-wallets/list-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
Source: https://docs.mangopay.com/api-reference/client-wallets/list-client-wallets-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
Source: https://docs.mangopay.com/api-reference/client-wallets/view-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
Source: https://docs.mangopay.com/api-reference/client/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.
Format: 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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/client/update-client
PUT /v2.01/{ClientId}/clients
This endpoint allows you to update some of your platform information directly via the API.
### Body parameters
Format: 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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/client/upload-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
Source: https://docs.mangopay.com/api-reference/client/view-client
GET /v2.01/{ClientId}/clients
Retrieve details about your platform registered with Mangopay
### 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.
Format: 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 trading name",
"RegisteredName": "Platform's legally registered name",
"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://example.com",
"PlatformDescription": "n/a",
"CompanyReference": null,
"PrimaryThemeColour": "#afafaf",
"PrimaryButtonColour": "#ff974b",
"Logo": null,
"CompanyNumber": "00000000000000000000",
"MCC": "0742"
}
```
```json REST
// GET has no body parameters
```
# The Conversion Rate object (FX)
Source: https://docs.mangopay.com/api-reference/conversion-rates/conversion-rate-object
### 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
Source: https://docs.mangopay.com/api-reference/conversion-rates/view-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
}
```
```php PHP
Config->ClientId = 'client-id';
$api->Config->ClientPassword = 'api-key';
$api->Config->TemporaryFolder = '../tmp/';
$api->Config->DebugMode = false;
try {
$response = $api->Conversions->GetConversionRate("EUR", "GBP");
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.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)
Source: https://docs.mangopay.com/api-reference/conversions/conversion-object
### 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
Source: https://docs.mangopay.com/api-reference/conversions/create-instant-conversion-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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": "client-id",
"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
Source: https://docs.mangopay.com/api-reference/conversions/create-instant-conversion-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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"
}
```
```php PHP
Config->ClientId = 'client-id';
$api->Config->ClientPassword = 'api-key';
$api->Config->TemporaryFolder = '../tmp/';
$api->Config->DebugMode = false;
try {
$instantConversion = new \MangoPay\Conversion();
$debitedUserId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR";
$debitedWalletId = "wlt_m_01HQT7AS0FJPGYXDXJ0R151NBV";
$creditedWalletId = "wlt_m_01HQT6422EER2N7FPRXWTSDCSV";
$instantConversion->AuthorId = $debitedUserId;
$instantConversion->DebitedWalletId = $debitedWalletId;
$instantConversion->CreditedWalletId = $creditedWalletId;
$instantConversion->DebitedFunds = new Money();
$instantConversion->DebitedFunds->Amount = 100;
$instantConversion->DebitedFunds->Currency = "GBP";
$instantConversion->CreditedFunds = new Money();
$instantConversion->CreditedFunds->Currency = "EUR";
$instantConversion->Tag = "Created using the Mangopay PHP SDK";
$response = $api->Conversions->CreateInstantConversion($instantConversion);
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.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
Source: https://docs.mangopay.com/api-reference/conversions/create-quoted-conversion-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/conversions/create-quoted-conversion-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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"
}
```
```php PHP
Config->ClientId = 'client-id';
$api->Config->ClientPassword = 'api-key';
$api->Config->TemporaryFolder = '../tmp/';
$api->Config->DebugMode = false;
try {
$quotedConversion = new \MangoPay\Conversion();
$debitedUserId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR";
$debitedWalletId = "wlt_m_01HQT7AS0FJPGYXDXJ0R151NBV";
$creditedWalletId = "wlt_m_01HQT6422EER2N7FPRXWTSDCSV";
$quoteId = "cvrquote_01JE92SJATA0X9YXNXKP9N1VFT";
$quotedConversion->QuoteId = $quoteId;
$quotedConversion->AuthorId = $debitedUserId;
$quotedConversion->DebitedWalletId = $debitedWalletId;
$quotedConversion->CreditedWalletId = $creditedWalletId;
$quotedConversion->Tag = "Created using the Mangopay PHP SDK";
$response = $api->Conversions->CreateQuotedConversion($quotedConversion);
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: "client-id",
clientApiKey: "api-key"
})
let myConversion = {
QuoteId: "cvrquote_01JDHAEJF2QRC0MZ6WTJHETDQZ",
AuthorId: "user_m_01HQK25M6KVHKDV0S36JY9NRKR",
DebitedWalletId: "wlt_m_01HT2J9Q2M6GMFW4Z7GYBAFJ4T",
CreditedWalletId: "wlt_m_01HQT7AS0FJPGYXDXJ0R151NBV",
Tag: "Created using the Mangopay NodeJS SDK"
}
const createQuotedUserConversion = async (conversion) => {
return await mangopay.Conversions.createQuotedConversion(conversion)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
createQuotedUserConversion(myConversion)
```
```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
Source: https://docs.mangopay.com/api-reference/conversions/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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"
}
```
```php PHP
Config->ClientId = 'client-id';
$api->Config->ClientPassword = 'api-key';
$api->Config->TemporaryFolder = '../tmp/';
$api->Config->DebugMode = false;
try {
$response = $api->Conversions->GetConversion("cvr_01JE92STKQNGZ2W67D224J4S2R");
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.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
Source: https://docs.mangopay.com/api-reference/country-authorizations/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
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/country-authorizations/list-authorizations-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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/country-authorizations/view-authorizations-country
GET /v2.01/countries/{CountryCode}/authorizations
This call returns the restrictions for a specific country.
### Path parameters
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The code of the country.
### Responses
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/deposit-preauthorizations/cancel-deposit-preauthorization-request-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 cards.
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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"
}
```
```php PHP
Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$depositId = 'deposit_m_01JH5W6ZE4FZFYY583XGK1AJAT';
$cancel = new CancelDeposit();
$cancel->PaymentStatus = "CANCELED";
$cancelDeposit = $api->Deposits->Cancel($depositId, $cancel);
print_r($cancelDeposit);
} 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.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
Source: https://docs.mangopay.com/api-reference/deposit-preauthorizations/create-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 cards.
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Required if `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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://docs.mangopay.com/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": "Î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"
}
},
"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 {
$userId = 'user_m_01HQK25M6KVHKDV0S36JY9NRKR';
$cardId = 'card_m_01J420XC7KAW655XPP12SC28HS';
$depositPreauth = new MangoPay\CreateDeposit;
$depositPreauth->AuthorId = $userId;
$depositPreauth->CardId = $cardId;
$depositPreauth->DebitedFunds = new Money();
$depositPreauth->DebitedFunds->Amount = 1000;
$depositPreauth->DebitedFunds->Currency = 'EUR';
$depositPreauth->BrowserInfo = new BrowserInfo();
$depositPreauth->BrowserInfo->AcceptHeader = "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8";
$depositPreauth->BrowserInfo->JavaEnabled = true;
$depositPreauth->BrowserInfo->Language = "en";
$depositPreauth->BrowserInfo->ColorDepth = 4;
$depositPreauth->BrowserInfo->ScreenHeight = 1800;
$depositPreauth->BrowserInfo->ScreenWidth = 400;
$depositPreauth->BrowserInfo->TimeZoneOffset = 60;
$depositPreauth->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";
$depositPreauth->BrowserInfo->JavascriptEnabled = true;
$depositPreauth->IpAddress = "192.158.1.38";
$depositPreauth->Culture = "FR";
$depositPreauth->SecureModeReturnURL = "https://docs.mangopay.com/please-ignore";
$createDepositPreauth = $api->Deposits->Create($depositPreauth);
print_r($createDepositPreauth);
} 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.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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/deposit-preauthorizations/create-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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"
}
```
```php PHP
Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$userId = 'user_m_01HQK25M6KVHKDV0S36JY9NRKR';
$cardId = 'card_m_01HT2C9KB8A6NZCN2X4PRMHHRX';
$walletId = 'wlt_m_01HQT6422EER2N7FPRXWTSDCSV';
$depositId = 'deposit_m_01HT2F0KX72D4JE70T4RQRT9XN';
$depositPayIn = new CreateCardPreAuthorizedDepositPayIn();
$depositPayIn->AuthorId = $userId;
$depositPayIn->DepositId = $depositId;
$depositPayIn->CreditedWalletId = $walletId;
$depositPayIn->DebitedFunds = new Money();
$depositPayIn->DebitedFunds->Amount = 1000;
$depositPayIn->DebitedFunds->Currency = 'EUR';
$depositPayIn->Fees = new Money();
$depositPayIn->Fees->Amount = 0;
$depositPayIn->Fees->Currency = 'EUR';
$createPayIn = $api->PayIns->CreateCardPreAuthorizedDepositPayIn($depositPayIn);
print_r($createPayIn);
} 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.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
Source: https://docs.mangopay.com/api-reference/deposit-preauthorizations/create-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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"
}
```
```php PHP
Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$userId = 'user_m_01HQK25M6KVHKDV0S36JY9NRKR';
$cardId = 'card_m_01HT2C9KB8A6NZCN2X4PRMHHRX';
$walletId = 'wlt_m_01HQT6422EER2N7FPRXWTSDCSV';
$depositId = 'deposit_m_01HT2F0KX72D4JE70T4RQRT9XN';
$depositPayIn = new CreateCardPreAuthorizedDepositPayIn();
$depositPayIn->AuthorId = $userId;
$depositPayIn->DepositId = $depositId;
$depositPayIn->CreditedWalletId = $walletId;
$depositPayIn->DebitedFunds = new Money();
$depositPayIn->DebitedFunds->Amount = 1000;
$depositPayIn->DebitedFunds->Currency = 'EUR';
$depositPayIn->Fees = new Money();
$depositPayIn->Fees->Amount = 0;
$depositPayIn->Fees->Currency = 'EUR';
$createPayIn = $api->PayIns->CreateCardPreAuthorizedDepositPayIn($depositPayIn);
print_r($createPayIn);
} 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.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
Source: https://docs.mangopay.com/api-reference/deposit-preauthorizations/create-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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"
}
```
```php PHP
Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$userId = 'user_m_01HQK25M6KVHKDV0S36JY9NRKR';
$cardId = 'card_m_01HT2C9KB8A6NZCN2X4PRMHHRX';
$walletId = 'wlt_m_01HQT6422EER2N7FPRXWTSDCSV';
$depositId = 'deposit_m_01HT2F0KX72D4JE70T4RQRT9XN';
$depositPayIn = new CreateCardPreAuthorizedDepositPayIn();
$depositPayIn->AuthorId = $userId;
$depositPayIn->DepositId = $depositId;
$depositPayIn->CreditedWalletId = $walletId;
$depositPayIn->DebitedFunds = new Money();
$depositPayIn->DebitedFunds->Amount = 1000;
$depositPayIn->DebitedFunds->Currency = 'EUR';
$depositPayIn->Fees = new Money();
$depositPayIn->Fees->Amount = 0;
$depositPayIn->Fees->Currency = 'EUR';
$createPayIn = $api->PayIns->CreateCardPreAuthorizedDepositPayIn($depositPayIn);
print_r($createPayIn);
} 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.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
Source: https://docs.mangopay.com/api-reference/deposit-preauthorizations/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 cards.
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/deposit-preauthorizations/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
Source: https://docs.mangopay.com/api-reference/deposit-preauthorizations/list-deposit-preauthorizations-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 cards.
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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's 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/deposit-preauthorizations/list-deposit-preauthorizations-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 cards.
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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's 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/deposit-preauthorizations/view-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 cards.
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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://docs.mangopay.com/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": "Î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",
"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://docs.mangopay.com/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": "Î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",
"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://docs.mangopay.com/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": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"Shipping": {
"FirstName": "Nels",
"LastName": "Littel",
"Address": {
"AddressLine1": "9675 Gussie Crescent",
"AddressLine2": "Mortimer Shores",
"City": "Paris",
"Region": "Île-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
}
}
```
```php PHP
Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$depositId = 'deposit_m_01JH3BWB8K89TDQC54FFZY6MFV';
$response = $api->Deposits->Get($depositId);
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.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)
Source: https://docs.mangopay.com/api-reference/deposit-preauthorizations/view-payin-deposit-preauthorized
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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
Source: https://docs.mangopay.com/api-reference/direct-card-payins/create-direct-card-payin
POST /v2.01/{ClientId}/payins/card/direct
Process a one-time payment with a `CardId`, obtained from the card registration process
[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. This deprecated parameter defaults to `EN`.
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Required if `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
**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: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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": "wt_ba1e1201-ef12-4c33-942d-8461f1686a67",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1700210889,
"AuthorId": "user_m_01JHQRCND66XP99SVBXQRP54MF",
"CreditedUserId": "user_m_01JHQRCND66XP99SVBXQRP54MF",
"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": "wlt_m_01JHQRD0WZ1QWKNAMQF93E5M15",
"DebitedWalletId": null,
"PaymentType": "CARD",
"ExecutionType": "DIRECT",
"SecureMode": "DEFAULT",
"CardId": "card_m_iWdaSvYItChPyoia",
"SecureModeReturnURL": "https://docs.mangopay.com/please-ignore?transactionId=209160523",
"SecureModeRedirectURL": "https://api.sandbox.whenthen.co/payment-gateway/whenthen/threeDS/54b0c206-0a67-43d4-ace6-14a25697cf85/challenge?id=d7a9a1dd-80aa-4252-b2b4-221e1898d67f&url=aHR0cHM6Ly9hcGkuc2FuZGJveC53aGVudGhlbi5jby9wYXltZW50cy8zRFNlY3VyZS81NGIwYzIwNi0wYTY3LTQzZDQtYWNlNi0xNGEyNTY5N2NmODUvYzA1YTBhYzktNjBmZC00NDQyLWEzYzAtYjlmOTVlN2I1ODk5&amount=MzMzNDE¤cy=RVVS",
"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": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"Shipping": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "Île-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": "user_m_01JHQRCND66XP99SVBXQRP54MF",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 57842
},
"Fees": {
"Currency": "EUR",
"Amount": 8877
},
"CreditedWalletId": "wlt_m_01JHQRD0WZ1QWKNAMQF93E5M15",
"SecureMode": "DEFAULT",
"CardId": "card_m_iWdaSvYItChPyoia",
"SecureModeReturnURL": "https://docs.mangopay.com/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": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"Shipping": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "Île-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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/direct-card-payins/direct-card-payin-object
One-time payment using a tokenized card
### 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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
# View a PayIn (Direct Card)
Source: https://docs.mangopay.com/api-reference/direct-card-payins/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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
Source: https://docs.mangopay.com/api-reference/direct-debit-payins/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) 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, but it depends on their bank. 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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) 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, but it depends on their bank. 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 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
Source: https://docs.mangopay.com/api-reference/direct-debit-payins/direct-debit-payin-object
### Description
The Direct Debit PayIn object represents a pay-in via an available direct debit scheme: SDD or Bacs, as determined by the user's bank account country. Once the bank account is registered as a Recipient, a Mandate object can be created against it. Once the Mandate is confirmed by the user and submitted by Mangopay to their bank, the pay-in can be requested. [Read more about direct debit](/guides/payment-methods/banking/direct-debit) **→**
### 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, but it depends on their bank. 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)
Source: https://docs.mangopay.com/api-reference/direct-debit-payins/view-payin-direct-debit
GET /v2.01/{ClientId}/payins/{PayInId}
### Path parameters
The unique identifier of the pay-in.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) 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, but it depends on their bank. 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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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
Source: https://docs.mangopay.com/api-reference/dispute-documents/create-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/dispute-documents/create-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": "iVBORw0KGgoAAAANSUhEUgAAAlgAAAFRCAIAAAAn40TeAAAACXBIWXMAAAsSAAALEgHS3X78AAAgAElEQVR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rKwsmDp37ty5fv16kiSNRqPJZIJ1DKTver1en8/n8Xj6+/s9Hg9BEFKp1GKxmM1m8CpHIhGUxhNBEBRFnTlz5umnn4Ya9FFsGrw+paWlo0eP3r9/P7L15UCCwSBN08OGDYN/HzlyxOVyXbrNn6ZptVqt0+mEA6RQBomEPrhcLqvVescdd5hMpig2La4QghHj9Xq3b9++YcOG3bt3GwwGEknB9WtuIobzlACo4Llz566//vonnnhCjEPMr61XEomkuLh40aJF7733nsPhEDuD9CIg1gXLWJIkwWU68FMc+GqB64/n+XA4LOTLoOmnAEVRINULFiyYPHkysnpA3wk8vWHDhs2bNw9O+RD7EOmLWud5HqZOiqLS09PhJyzLsizrcDj6+vrgXYLiiDRNp6amUhQFjwuWQUI4EHGEtaenZ/r06bNnz46iOTgQtVr9yCOP1NTUdHZ2pqamIpb5i4bGYrEkJyd/529CQj7LsjBS6JeVkDk4fvz4BQsWRPf4HXGFkCTJs2fPrl+/fvny5e3t7eDWR7wHLuGARWJra2tOTs6TTz45bty4eFBBYkCofOHChbW1tZs2bUJTT/I7u0Fc2BF4aZ7bpT+J1dODYOSIESN+8YtfoNxB/33A3pubbrqptrb2H//4R25uLoJ6OgMRbn+gwQHZbcL/FVITwfgj/v98DfRwHBcOh++++25wrUfXNwMiRFHUmDFjpkyZAv5J9BuFiQFDI+jcRY/90qwZlMCs2NXVlZqa+uCDDyYlJUW3DyI63Hp7e8vLy1955ZW///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/g9+8IObb74ZOjzUjNfrffbZZ59++mmRSCSVSmOxWDbVJRAIAoHA9PT07373u02bNsVXPrz0/Pnze/fu1el0CoUiXXG0AIIgaJr2+/233nrr9773vcVtDf978eLFH/zgB8eOHTOZTARBlEhHxXEcROs999zz8MMPq9XqbDpqLBYjsi8TlCAajQaDQZqmQWxlBo7jBEHEYrFAIJBWjeM47nQ6XS6XVCpNeCPLsgKBIBgMTk5OplsksVgcCoXC4TDLsjy/Dj4kEomEQqFYLBb/J4IgrFYrSZJ+vz9PUiYtoHO7XK4nn3zylVdecbvdmT1HpVK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TFVIQ4jsMyIUVRaWUNwOePldDr9TjvA3I1Gg2k2E93+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//OPs7Gx5eTlPLQjA1HZubu655547efLkmTNntm3btnXr1gXDmfNMXrx48ciRI0eOHGlra9PpdLA+kta7otHo4cOH4fztbdu27dy50263J7uFpumLFy++8sorb731ltvtdjgc8WOf/3tLfO5FPv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3/zm9+MHj0a1jRx+KlfHuhzIBCorKx87rnn2trazGazVCol4ikj5trgOA68iIl1I0Jv9+zZ8+abb1ZXVyclJSXoB8VxHJR5itshiObMS14olYS5DLDRApZIarXa6XQ+88wzb7/9dnt7u7BHKtZ9vDqEDp88efKll15avXq10WjU6XTEhV1fQxVY2SgUCpvNdvDgwRdeeKG8vDwcDidWKFRwRXg8nm+//fbpp58+f/682WwGRU+gG7kMCXcjQm937979+uuvwx7BhHCHfh9xPgRR0y3Y2hIIBKDgQjzfczzA83wkEqFpGgRj5cqVv/rVryoqKhJUOUiS3LVr17PPPnvgwAGomByVukcJQSQSoSjKYDA0Nzf/z//8z6effgpaGOt+XR0Oh2PVqlXPP/98d3e30WhMREfiUAJ8uTt27Hjttdfq6+sNBgOeVEUlakLIcVxqaqper3c4HCzLxnmOdTwAbzbHcZB2WFdX9/jjj2/evPmi6otxDrjUtm/f/pe//OXs2bMajUYul/94VJC4UMIb1jQej+ett956//33E2UQ+Qt1kD/55JN33nknGAxC0ayE6PzQ5ttvv33ttdegIBlWQbGJghCSFwpCLly48PHHH09PT3c6naFQCGvhFQInLZhMpt7e3ueff37dunWDKT6EEphGd+3a9frrr7e1tZlMpgSNYQweKEZjNBoZhnn//feXLVsW/45uGD6n0/nVV1/97//+bygUMplMA+tmYdADL0xFRcXSpUtra2uxLYiGaLpGFQrFggULXnvttYkTJ/b19YVCocEfE/VjAEwKjuNsNpvf73/ppZfWrFkDJWXjGZhG9+3b98YbbzQ0NEBxzh/5FxuJRAwGQzAYXLp06cqVKwd/6Jp4wPD5fL7Nmze/9957JEmaTCYw5eO2zz8GeJ4Ph8Nr167ds2dPSkpKnIfWhgzRzG3heV4mk5WWlr766qt33323w+GA2Rx/V1cIwzAmk8nr9b700ksrV670+Xxx+w3ANHrkyJF33nmntrYWLIlYdyougMpBTqfzP//5z/r167/zrMR4AIL633777csvv+zz+QwGwxUeyoMRD8gqX7du3fbt2yE7Bn9WaIhy1ijP81KpNCMj4/nnn3/66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IDQazfz582+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
Source: https://docs.mangopay.com/api-reference/dispute-documents/create-weblink-to-view-dispute-document-pages
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
Source: https://docs.mangopay.com/api-reference/dispute-documents/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
Source: https://docs.mangopay.com/api-reference/dispute-documents/list-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/dispute-documents/list-documents-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/dispute-documents/submit-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/dispute-documents/view-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/dispute-settlement/create-bank-wire-payin-to-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/dispute-settlement/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/dispute-settlement/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
Source: https://docs.mangopay.com/api-reference/dispute-settlement/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/disputes/close-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/disputes/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
Source: https://docs.mangopay.com/api-reference/disputes/list-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/disputes/list-disputes-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/disputes/list-disputes-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/disputes/list-disputes-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/disputes/list-disputes-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/disputes/submit-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/disputes/update-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/disputes/view-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/events/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
Source: https://docs.mangopay.com/api-reference/events/list-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);
}
}
```
# [Deprecated] Create a Giropay PayIn
Source: https://docs.mangopay.com/api-reference/giropay/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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);
}
}
```
# [Deprecated] The Giropay PayIn object
Source: https://docs.mangopay.com/api-reference/giropay/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)
Source: https://docs.mangopay.com/api-reference/giropay/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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
Source: https://docs.mangopay.com/api-reference/google-pay/create-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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Required if `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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's 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 Succeeded (3DS not required)
{
"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://docs.mangopay.com/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 Created (3DS required)
{
"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://docs.mangopay.com/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 105207 (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://docs.mangopay.com/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://docs.mangopay.com/please-ignore",
"SecureMode":"DEFAULT",
"ReturnURL":"https://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/google-pay/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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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)
Source: https://docs.mangopay.com/api-reference/google-pay/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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's 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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://docs.mangopay.com/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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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
Source: https://docs.mangopay.com/api-reference/ideal/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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://docs.mangopay.com/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)
Source: https://docs.mangopay.com/api-reference/ideal/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
**Caution:** This customization feature is deprecated and must no longer be used. You must redirect on the `RedirectURL` instead.
The customized URL to which to redirect the user to complete the payment.
**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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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://docs.mangopay.com/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://docs.mangopay.com/please-ignore",
"CardType": "IDEAL",
"Culture": "EN",
"Bic": "BITSNL2A"
}
```
# The iDEAL PayIn object
Source: https://docs.mangopay.com/api-reference/ideal/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)
Source: https://docs.mangopay.com/api-reference/ideal/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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://docs.mangopay.com/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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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 an IDV Session
Source: https://docs.mangopay.com/api-reference/idv-sessions/create-idv-session
POST /v2.01/{ClientId}/users/{UserId}/identity-verifications
Initiate a hosted KYC/KYB session and get the unique link for the frontend experience
**Note – Activation required**
The hosted KYC/KYB verification feature must be activated by Mangopay. Contact our teams via the Dashboard to get started.
**Note – Available for Natural, Soletrader, and Business**
An IDV Session can only be created for Natural and Legal Users whose `UserCategory` is `OWNER`.
For Legal users, the feature is only available for `LegalPersonType` values `BUSINESS` and `SOLETRADER`.
### Path parameters
The unique identifier of the user.
### Body parameters
Max. length: 500
The URL to which the user is returned after the hosted identity verification session, regardless of the outcome.
Max. length: 255 characters
Custom data that you can add to this object.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 URL to redirect the user to for the hosted identity verification session.
The status of the overall IDV Session:
* `PENDING` – The unique `HostedUrl` for the session has not yet been submitted by the user. This temporary state can transition to `VALIDATED`, `REFUSED`, or `REVIEW`.
* `REVIEW` – One or more automated checks was neither successful nor refused, so the session was sent for manual review by Mangopay’s teams. This temporary state is only applicable to Legal users and can transition to `REFUSED` or `VALIDATED`.
* `VALIDATED` – - The session was validated and the User became KYC/KYB verified (indicated by the User object’s `KYCLevel`). When the `Status` changes to `VALIDATED`, the [verified data](/guides/users/verification/hosted#verified-data) in `Checks.Data` is used to replace existing data in the User object.
* `REFUSED` – The session was refused and the User is not KYC/KYB verified. The `Checks.CheckStatus` shows which checks were `REFUSED` and the `Checks.Reasons` shows the [refused reason types](/guides/users/verification/hosted#refusals) and comment (which is custom text in the case of manual review for Legal users).
* `OUT_OF_DATE` – The session is not valid because the user’s KYC/KYB verification status was [downgraded](/guides/users/verification/downgrade) by Mangopay.
Max. length: 500
The URL to which the user is returned after the hosted identity verification session, regardless of the outcome.
```json
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
"title": "Forbidden",
"status": 403,
"traceId": "00-046605fe21abece0903b78483c6dc5dd-099f889c8e09309c-01"
}
```
```json
{
"Message": "Missing or incorrect required parameter",
"Type": "param_error",
"Id": "6b5b73cd-6d4c-4ea5-8859-9447dfe2c5b2",
"Date": 1746458497.0,
"errors": {
"UserId": "UserId is not valid"
}
}
```
```json
{
"Message": "This feature is only available for users categorised as Owner.",
"Type": "invalid_action",
"Id": "49377b80-01b4-4b68-ba8b-99920aaf47a9",
"Date": 1736344654.0,
"errors": null
}
```
```json ORGANIZATION
{
"Message": "The LegalUserType ORGANIZATION is not currently supported in the identity verification process. An event will be skipped. PartnerId: {ClientId}/ UserExternalId: {UserId}",
"Type": "invalid_action",
"Id": "6e42d540-efea-4fcc-9a85-fd1f5a09bc03",
"Date": 1746447478.0,
"errors": null
}
```
```json PARTNERSHIP
{
"Message": "The LegalUserType PARTNERSHIP is not currently supported in the identity verification process. An event will be skipped. PartnerId: {ClientId}/ UserExternalId: {UserId}",
"Type": "invalid_action",
"Id": "58148aa4-57bb-4d61-94e6-c1450116606e",
"Date": 1746458611.0,
"errors": null
}
```
```json
{
"Id": "idnver_01JH2ZK1MKAMG5H2Q20M5K6020",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1736340768,
"HostedUrl": "https://user-verification.sandbox.mangopay.com/66ebfacebd780d434e8e6a9d?sessionId=677e75212400002f00a6edd0&redirectURL=https%3A%2F%2Fexample.com",
"Status": "PENDING",
"ReturnUrl": "https://example.com"
}
```
```json
{
"ReturnUrl": "https://example.com",
"Tag": "Created using the Mangopay API Postman collection"
}
```
# The IDV Session object
Source: https://docs.mangopay.com/api-reference/idv-sessions/idv-session-object
Container for Mangopay's hosted KYC/KYB session
### Description
Mangopay relies on the IDV Session object to provide its hosted KYC/KYB verification solution. The object contains the unique session URL for the user's session where they can provide all the necessary data and documents for verification. [Read guide](/guides/users/verification/hosted) **→**
### Attributes
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
Max. length: 255 characters
Custom data that you can add to this object.
The URL to redirect the user to for the hosted identity verification session.
Max. length: 500
The URL to which the user is returned after the hosted identity verification session, regardless of the outcome.
The status of the overall IDV Session:
* `PENDING` – The unique `HostedUrl` for the session has not yet been submitted by the user. This temporary state can transition to `VALIDATED`, `REFUSED`, or `REVIEW`.
* `REVIEW` – One or more automated checks was neither successful nor refused, so the session was sent for manual review by Mangopay’s teams. This temporary state is only applicable to Legal users and can transition to `REFUSED` or `VALIDATED`.
* `VALIDATED` – - The session was validated and the User became KYC/KYB verified (indicated by the User object’s `KYCLevel`). When the `Status` changes to `VALIDATED`, the [verified data](/guides/users/verification/hosted#verified-data) in `Checks.Data` is used to replace existing data in the User object.
* `REFUSED` – The session was refused and the User is not KYC/KYB verified. The `Checks.CheckStatus` shows which checks were `REFUSED` and the `Checks.Reasons` shows the [refused reason types](/guides/users/verification/hosted#refusals) and comment (which is custom text in the case of manual review for Legal users).
* `OUT_OF_DATE` – The session is not valid because the user’s KYC/KYB verification status was [downgraded](/guides/users/verification/downgrade) by Mangopay.
The unique identifier of the user.
The date and time at which the object was created.
The date and time at which the session was last updated.
The checks performed automatically during the session.
This array is empty when `Status` is `PENDING` and may contain any number of objects depending on the outcome.
The unique identifier of the verification check.
Type of check carried out during the session depending on the user type:
* `IDENTITY_DOCUMENT_VERIFICATION` - Verifies the authenticity of the identity document, the liveness of the selfie, and that the selfie matches the identity document photo.
* `IDV_AGE_CHECK` - Checks whether the individual on the identity document meets the minimum age requirement for Mangopay users (age 18).
* `BUSINESS_VERIFICATION` - Looks up the business details entered by the user during the session in the national registry to find a match.
* `IDV_NAME_MATCH_CHECK` - Checks whether the first name, last name and date of birth of the identity document match the `FirstName`, `LastName`, and `Birthday` of the Natural user object or `LegalRepresentative` of the Legal user object.
* `BUSINESS_NAME_MATCH` - Checks whether the name on the identity document is present in the name of the registered sole proprietor in the relevant national registry.
* `BUSINESS_INSIGHTS_MATCH` - Checks whether the name on the identity document matches one of the directors listed in the national registry, and whether the PSC data declared in the session is coherent with the PSC data in the registry.
For information on which checks are performed for which user type and in which cases, see the [user flows and checks performed](/guides/users/verification/hosted#user-flows-and-checks-performed).
**Returned values:** `VALIDATED`, `REFUSED`
The status of the verification check.
The reasons that the check was refused, which may be returned if `CheckStatus` was `REFUSED` (depending on the check type).
The type of the reason. For more details, see [refusals](/guides/users/verification/hosted#refusals).
The explanation of the reason. If the refusal was automatic, this is a preset string. For Legal users, if the refusal follows a manual review, this is a custom explanation from the person who conducted the review.
The date and time at which the check was created.
The date and time at which the check was last updated.
The data extracted and verified during the check.
This array may be empty if no data was extracted or is not applicable for the check.
The type of the data.
For a Natural user:
* `FIRST_NAME`
* `LAST_NAME`
* `BIRTHDATE`
For a Legal user:
* `COMPANY_NAME`
* `COMPANY_NUMBER`
* `LEGAL_REPRESENTATIVE_FIRST_NAME`
* `LEGAL_REPRESENTATIVE_LAST_NAME`
* `LEGAL_REPRESENTATIVE_BIRTHDATE`
The value of the data. The value may be `null` or an empty string if data extraction was not possible but the check was still carried out.
# List IDV Sessions for a User
Source: https://docs.mangopay.com/api-reference/idv-sessions/list-idv-sessions-user
GET /v2.01/{ClientId}/users/{UserId}/identity-verifications
Retrieve key details of all hosted KYC/KYC sessions attempted for a user
### Path parameters
The unique identifier of the user.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
The status of the overall IDV Session:
* `PENDING` – The unique `HostedUrl` for the session has not yet been submitted by the user. This temporary state can transition to `VALIDATED`, `REFUSED`, or `REVIEW`.
* `REVIEW` – One or more automated checks was neither successful nor refused, so the session was sent for manual review by Mangopay’s teams. This temporary state is only applicable to Legal users and can transition to `REFUSED` or `VALIDATED`.
* `VALIDATED` – - The session was validated and the User became KYC/KYB verified (indicated by the User object’s `KYCLevel`). When the `Status` changes to `VALIDATED`, the [verified data](/guides/users/verification/hosted#verified-data) in `Checks.Data` is used to replace existing data in the User object.
* `REFUSED` – The session was refused and the User is not KYC/KYB verified. The `Checks.CheckStatus` shows which checks were `REFUSED` and the `Checks.Reasons` shows the [refused reason types](/guides/users/verification/hosted#refusals) and comment (which is custom text in the case of manual review for Legal users).
* `OUT_OF_DATE` – The session is not valid because the user’s KYC/KYB verification status was [downgraded](/guides/users/verification/downgrade) by Mangopay.
The date and time at which the object was created.
The date and time at which the session was last updated.
```json
[
{
"Id": "idnver_01JTG8BTG92TTRP5VSNV35ZYGM",
"Status": "PENDING",
"CreationDate": 1746449121,
"LastUpdate": null
},
{
"Id": "idnver_01JTGAXGJRVNCD9K4CEM311M4Z",
"Status": "REFUSED",
"CreationDate": 1746449852,
"LastUpdate": 1746449945
}
]
```
```json REST
// GET has no body parameters
```
# View an IDV Session
Source: https://docs.mangopay.com/api-reference/idv-sessions/view-idv-session
GET /v2.01/{ClientId}/identity-verifications/{IdvSessionId}
See details of a hosted KYC/KYB session, outcome of checks, and verified data
### Path parameters
The unique identifier of the IDV Session.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
Max. length: 255 characters
Custom data that you can add to this object.
The URL to redirect the user to for the hosted identity verification session.
Max. length: 500
The URL to which the user is returned after the hosted identity verification session, regardless of the outcome.
The status of the overall IDV Session:
* `PENDING` – The unique `HostedUrl` for the session has not yet been submitted by the user. This temporary state can transition to `VALIDATED`, `REFUSED`, or `REVIEW`.
* `REVIEW` – One or more automated checks was neither successful nor refused, so the session was sent for manual review by Mangopay’s teams. This temporary state is only applicable to Legal users and can transition to `REFUSED` or `VALIDATED`.
* `VALIDATED` – - The session was validated and the User became KYC/KYB verified (indicated by the User object’s `KYCLevel`). When the `Status` changes to `VALIDATED`, the [verified data](/guides/users/verification/hosted#verified-data) in `Checks.Data` is used to replace existing data in the User object.
* `REFUSED` – The session was refused and the User is not KYC/KYB verified. The `Checks.CheckStatus` shows which checks were `REFUSED` and the `Checks.Reasons` shows the [refused reason types](/guides/users/verification/hosted#refusals) and comment (which is custom text in the case of manual review for Legal users).
* `OUT_OF_DATE` – The session is not valid because the user’s KYC/KYB verification status was [downgraded](/guides/users/verification/downgrade) by Mangopay.
The unique identifier of the user.
The date and time at which the object was created.
The date and time at which the session was last updated.
The checks performed automatically during the session.
This array is empty when `Status` is `PENDING` and may contain any number of objects depending on the outcome.
The unique identifier of the verification check.
Type of check carried out during the session depending on the user type:
* `IDENTITY_DOCUMENT_VERIFICATION` - Verifies the authenticity of the identity document, the liveness of the selfie, and that the selfie matches the identity document photo.
* `IDV_AGE_CHECK` - Checks whether the individual on the identity document meets the minimum age requirement for Mangopay users (age 18).
* `BUSINESS_VERIFICATION` - Looks up the business details entered by the user during the session in the national registry to find a match.
* `IDV_NAME_MATCH_CHECK` - Checks whether the first name, last name and date of birth of the identity document match the `FirstName`, `LastName`, and `Birthday` of the Natural user object or `LegalRepresentative` of the Legal user object.
* `BUSINESS_NAME_MATCH` - Checks whether the name on the identity document is present in the name of the registered sole proprietor in the relevant national registry.
* `BUSINESS_INSIGHTS_MATCH` - Checks whether the name on the identity document matches one of the directors listed in the national registry, and whether the PSC data declared in the session is coherent with the PSC data in the registry.
For information on which checks are performed for which user type and in which cases, see the [user flows and checks performed](/guides/users/verification/hosted#user-flows-and-checks-performed).
**Returned values:** `VALIDATED`, `REFUSED`
The status of the verification check.
The reasons that the check was refused, which may be returned if `CheckStatus` was `REFUSED` (depending on the check type).
The type of the reason. For more details, see [refusals](/guides/users/verification/hosted#refusals).
The explanation of the reason. If the refusal was automatic, this is a preset string. For Legal users, if the refusal follows a manual review, this is a custom explanation from the person who conducted the review.
The date and time at which the check was created.
The date and time at which the check was last updated.
The data extracted and verified during the check.
This array may be empty if no data was extracted or is not applicable for the check.
The type of the data.
For a Natural user:
* `FIRST_NAME`
* `LAST_NAME`
* `BIRTHDATE`
For a Legal user:
* `COMPANY_NAME`
* `COMPANY_NUMBER`
* `LEGAL_REPRESENTATIVE_FIRST_NAME`
* `LEGAL_REPRESENTATIVE_LAST_NAME`
* `LEGAL_REPRESENTATIVE_BIRTHDATE`
The value of the data. The value may be `null` or an empty string if data extraction was not possible but the check was still carried out.
{/* */}
```json REST
// GET has no body parameters
```
```json PENDING
{
"Id": "idnver_01JTGFRGJTHCKRZWAGSV1ZEF3W",
"Tag": "Created using the Mangopay API Postman collection",
"HostedUrl": "https://user-verification.sandbox.mangopay.com/6810d9b2c2885039758599bc?sessionId=6818d4082500001000a083b8&redirectURL=https%3A%2F%2Fexample.com%2F",
"ReturnUrl": "https://example.com/",
"Status": "PENDING",
"UserId": "user_m_01JTG7NDTE52MZCCF50QHJ870A",
"CreationDate": 1746457608,
"LastUpdate": 1746457608,
"Checks": []
}
```
```json Natural VALIDATED
{
"Id": "idnver_01JTG8BTG92TTRP5VSNV35ZYGM",
"Tag": "Created using the Mangopay API Postman collection",
"HostedUrl": "https://user-verification.sandbox.mangopay.com/6810d9b2c2885039758599bc?sessionId=6818b5bd24000034007adb66&redirectURL=https%3A%2F%2Fexample.com%2F",
"ReturnUrl": "https://example.com/",
"Status": "VALIDATED",
"UserId": "user_m_01JTG7NDTE52MZCCF50QHJ870A",
"CreationDate": 1746449852,
"LastUpdate": 1746449945,
"Checks": [
{
"CheckId": "idnchc_01JTG8EJC242YG9R5167TEDCJJ",
"Type": "IDENTITY_DOCUMENT_VERIFICATION",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746449942,
"LastUpdate": 1746449942,
"Data": [
{
"Type": "FIRST_NAME",
"Value": "ALEX"
},
{
"Type": "LAST_NAME",
"Value": "SMITH"
},
{
"Type": "BIRTHDATE",
"Value": "775958800"
}
]
},
{
"CheckId": "idnchc_01JTG8EMSD10Q83JZVS7PC5BDF",
"Type": "IDV_NAME_MATCH_CHECK",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746449945,
"LastUpdate": 1746449945,
"Data": []
},
{
"CheckId": "idnchc_01JTG8EN3YGMCR2DZNV9SBES47",
"Type": "IDV_AGE_CHECK",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746449945,
"LastUpdate": 1746449945,
"Data": []
}
]
}
```
```json Natural REFUSED - Name mismatch
{
"Id": "idnver_01JTG8BTG92TTRP5VSNV35ZYGM",
"Tag": "Created using the Mangopay API Postman collection",
"HostedUrl": "https://user-verification.sandbox.mangopay.com/6810d9b2c2885039758599bc?sessionId=6818b5bd24000034007adb66&redirectURL=https%3A%2F%2Fexample.com%2F",
"ReturnUrl": "https://example.com/",
"Status": "REFUSED",
"UserId": "user_m_01JTG7NDTE52MZCCF50QHJ870A",
"CreationDate": 1746449852,
"LastUpdate": 1746449945,
"Checks": [
{
"CheckId": "idnchc_01JTG8EJC242YG9R5167TEDCJJ",
"Type": "IDENTITY_DOCUMENT_VERIFICATION",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746449942,
"LastUpdate": 1746449942,
"Data": [
{
"Type": "FIRST_NAME",
"Value": "ALEXIS"
},
{
"Type": "LAST_NAME",
"Value": "SMITH"
},
{
"Type": "BIRTHDATE",
"Value": "775958800"
}
]
},
{
"CheckId": "idnchc_01JTG8EMSD10Q83JZVS7PC5BDF",
"Type": "IDV_NAME_MATCH_CHECK",
"CheckStatus": "REFUSED",
"Reasons": [
{
"Type": "DOCUMENT_NOT_ACCEPTED",
"Value": "ID name mismatch with declared user data"
}
],
"CreationDate": 1746449945,
"LastUpdate": 1746449945,
"Data": []
},
{
"CheckId": "idnchc_01JTG8EN3YGMCR2DZNV9SBES47",
"Type": "IDV_AGE_CHECK",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746449945,
"LastUpdate": 1746449945,
"Data": []
}
]
}
```
```json Natural REFUSED - Doc not accepted
{
"Id": "idnver_01JTG7VYWNZJ0C02ZJTQF23GPD",
"Tag": "Created using the Mangopay API Postman collection",
"HostedUrl": "https://user-verification.sandbox.mangopay.com/6810d9b2c2885039758599bc?sessionId=6818b3b524000010000b8701&redirectURL=https%3A%2F%2Fexample.com%2F",
"ReturnUrl": "https://example.com/",
"Status": "REFUSED",
"UserId": "user_m_01JTG7NDTE52MZCCF50QHJ870A",
"CreationDate": 1746449333,
"LastUpdate": 1746449646,
"Checks": [
{
"CheckId": "idnchc_01JTG85E05C2PDPB7J2DZ2VQMB",
"Type": "IDENTITY_DOCUMENT_VERIFICATION",
"CheckStatus": "REFUSED",
"Reasons": [
{
"Type": "FACE_MATCH_FAIL",
"Value": "Document IDV has been refused by the provider"
}
],
"CreationDate": 1746449643,
"LastUpdate": 1746449643,
"Data": [
{
"Type": "FIRST_NAME",
"Value": ""
},
{
"Type": "LAST_NAME",
"Value": ""
},
{
"Type": "BIRTHDATE",
"Value": null
}
]
}
]
}
```
```json Soletrader VALIDATED
{
"Id": "idnver_01JS43RGHMF7BEQBE0Q84AT4DH",
"Tag": "Created using the Mangopay API Postman collection",
"HostedUrl": "https://user-verification.sandbox.mangopay.com/6810d975c28850397585971b?sessionId=6819cc56270000350001fb38&redirectURL=https%3A%2F%2Fexample.com%2F",
"ReturnUrl": "https://example.com/",
"Status": "VALIDATED",
"UserId": "user_m_01JS43QXKETMZXTGPPX60EX92B",
"CreationDate": 1746521174,
"LastUpdate": 1746521546,
"Checks": [
{
"CheckId": "idnchc_01JS43WDEC19A9GB2Z4JB94MKJ",
"Type": "BUSINESS_NAME_MATCH",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746521546,
"LastUpdate": 1746521546,
"Data": []
},
{
"CheckId": "idnchc_01JTJCEH2DWX417FFS7G57YHQ4",
"Type": "BUSINESS_VERIFICATION",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746521244,
"LastUpdate": 1746521244,
"Data": [
{
"Type": "COMPANY_NAME",
"Value": "ALEX SMITH SERVICES"
},
{
"Type": "COMPANY_NUMBER",
"Value": "123456789"
}
]
},
{
"CheckId": "idnchc_01JTJCQN80FZM639ZA8WM4634N",
"Type": "IDENTITY_DOCUMENT_VERIFICATION",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746521543,
"LastUpdate": 1746521543,
"Data": [
{
"Type": "LEGAL_REPRESENTATIVE_FIRST_NAME",
"Value": "ALEX"
},
{
"Type": "LEGAL_REPRESENTATIVE_LAST_NAME",
"Value": "SMITH"
},
{
"Type": "LEGAL_REPRESENTATIVE_BIRTHDATE",
"Value": "668649600"
}
]
},
{
"CheckId": "idnchc_01JTJCQQMHSYMRHC43A0KFJZRP",
"Type": "IDV_NAME_MATCH_CHECK",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746521546,
"LastUpdate": 1746521546,
"Data": []
},
{
"CheckId": "idnchc_01JTJCQQT76ZC90S4726CJYFAR",
"Type": "IDV_AGE_CHECK",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746521546,
"LastUpdate": 1746521546,
"Data": []
}
]
}
```
```json Soletrader REVIEW
{
"Id": "idnver_01JTJCCBZXKEYTXRA6V4MB0QXG",
"Tag": "Created using the Mangopay API Postman collection",
"HostedUrl": "https://user-verification.sandbox.mangopay.com/6810d975c28850397585971b?sessionId=6819cc56270000350001fb38&redirectURL=https%3A%2F%2Fexample.com%2F",
"ReturnUrl": "https://example.com/",
"Status": "REVIEW",
"UserId": "user_m_01JTJCC6TFG75TV37VHKC764ZP",
"CreationDate": 1746521174,
"LastUpdate": 1746521546,
"Checks": [
{
"CheckId": "idnchc_01JTJCEH2DWX417FFS7G57YHQ4",
"Type": "BUSINESS_VERIFICATION",
"CheckStatus": "REFUSED",
"Reasons": [
{
"Type": "DOCUMENT_NOT_ACCEPTED",
"Value": "Document has been refused by the provider"
}
],
"CreationDate": 1746521244,
"LastUpdate": 1746521244,
"Data": [
{
"Type": "COMPANY_NAME",
"Value": "ALEX SMITH SERVICES"
},
{
"Type": "COMPANY_NUMBER",
"Value": "123456789"
}
]
},
{
"CheckId": "idnchc_01JTJCQN80FZM639ZA8WM4634N",
"Type": "IDENTITY_DOCUMENT_VERIFICATION",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746521543,
"LastUpdate": 1746521543,
"Data": [
{
"Type": "LEGAL_REPRESENTATIVE_FIRST_NAME",
"Value": "ALEX"
},
{
"Type": "LEGAL_REPRESENTATIVE_LAST_NAME",
"Value": "SMITH"
},
{
"Type": "LEGAL_REPRESENTATIVE_BIRTHDATE",
"Value": "668649600"
}
]
},
{
"CheckId": "idnchc_01JTJCQQMHSYMRHC43A0KFJZRP",
"Type": "IDV_NAME_MATCH_CHECK",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746521546,
"LastUpdate": 1746521546,
"Data": []
},
{
"CheckId": "idnchc_01JTJCQQT76ZC90S4726CJYFAR",
"Type": "IDV_AGE_CHECK",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746521546,
"LastUpdate": 1746521546,
"Data": []
}
]
}
```
```json Business VALIDATED
{
"Id": "idnver_01JT8EBPE4GEN5W92BCZNDHQZ9",
"Tag": "Created using the Mangopay API Postman collection",
"HostedUrl": "https://user-verification.sandbox.mangopay.com/6810d990c288503975859882?sessionId=6814b5b82500002f00edcb7a&redirectURL=https%3A%2F%2Fwww.ReturnUrl.com%2F",
"ReturnUrl": "https://www.example.com/",
"Status": "VALIDATED",
"UserId": "user_m_01JT8EBNP4F4YPMSS4GMTEMZBF",
"CreationDate": 1746187704,
"LastUpdate": 1746187990,
"Checks": [
{
"CheckId": "idnchc_01JT8EFM7MWZ9AFX5VRHJTKFP3",
"Type": "BUSINESS_VERIFICATION",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746187833,
"LastUpdate": 1746187833,
"Data": [
{
"Type": "COMPANY_NAME",
"Value": "EXAMPLE SERVICES"
},
{
"Type": "COMPANY_NUMBER",
"Value": "123456789"
}
]
},
{
"CheckId": "idnchc_01JT8EMA22R2PSDD6NYDRADZPE",
"Type": "IDENTITY_DOCUMENT_VERIFICATION",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746187987,
"LastUpdate": 1746187987,
"Data": [
{
"Type": "LEGAL_REPRESENTATIVE_FIRST_NAME",
"Value": "ALEX"
},
{
"Type": "LEGAL_REPRESENTATIVE_LAST_NAME",
"Value": "SMITH"
},
{
"Type": "LEGAL_REPRESENTATIVE_BIRTHDATE",
"Value": "775958800"
}
]
},
{
"CheckId": "idnchc_01JT8EMCJH665WV75A0AYQ3J4F",
"Type": "BUSINESS_INSIGHTS_MATCH",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746187989,
"LastUpdate": 1746187989,
"Data": []
},
{
"CheckId": "idnchc_01JT8EMCPZ2ZPM318HEBEXD8SM",
"Type": "IDV_NAME_MATCH_CHECK",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746187989,
"LastUpdate": 1746187989,
"Data": []
},
{
"CheckId": "idnchc_01JT8EMCV6XGMJ5GC0Q17K4J0H",
"Type": "IDV_AGE_CHECK",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746187989,
"LastUpdate": 1746187989,
"Data": []
}
]
}
```
```json Business REVIEW
{
"Id": "idnver_01JTJCCBZXKEYTXRA6V4MB0QXG",
"Tag": "Created using the Mangopay API Postman collection",
"HostedUrl": "https://user-verification.sandbox.mangopay.com/6810d975c28850397585971b?sessionId=6819cc56270000350001fb38&redirectURL=https%3A%2F%2Fexample.com%2F",
"ReturnUrl": "https://example.com/",
"Status": "REVIEW",
"UserId": "user_m_01JTJCC6TFG75TV37VHKC764ZP",
"CreationDate": 1746521174,
"LastUpdate": 1746521546,
"Checks": [
{
"CheckId": "idnchc_01JTJCEH2DWX417FFS7G57YHQ4",
"Type": "BUSINESS_VERIFICATION",
"CheckStatus": "REFUSED",
"Reasons": [
{
"Type": "DOCUMENT_NOT_ACCEPTED",
"Value": "Document has been refused by the provider"
}
],
"CreationDate": 1746521244,
"LastUpdate": 1746521244,
"Data": [
{
"Type": "COMPANY_NAME",
"Value": "EXAMPLE SERVICES"
},
{
"Type": "COMPANY_NUMBER",
"Value": "123456789"
}
]
},
{
"CheckId": "idnchc_01JTJCQN80FZM639ZA8WM4634N",
"Type": "IDENTITY_DOCUMENT_VERIFICATION",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746521543,
"LastUpdate": 1746521543,
"Data": [
{
"Type": "LEGAL_REPRESENTATIVE_FIRST_NAME",
"Value": "ALEX"
},
{
"Type": "LEGAL_REPRESENTATIVE_LAST_NAME",
"Value": "SMITH"
},
{
"Type": "LEGAL_REPRESENTATIVE_BIRTHDATE",
"Value": "668649600"
}
]
},
{
"CheckId": "idnchc_01JTJCQQMHSYMRHC43A0KFJZRP",
"Type": "IDV_NAME_MATCH_CHECK",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746521546,
"LastUpdate": 1746521546,
"Data": []
},
{
"CheckId": "idnchc_01JTJCQQT76ZC90S4726CJYFAR",
"Type": "IDV_AGE_CHECK",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746521546,
"LastUpdate": 1746521546,
"Data": []
}
]
}
```
```json Business REFUSED
{
"Id": "idnver_01JTJ6QBVXGPRDCMD6HW34Q049",
"Tag": "Created using the Mangopay API Postman collection",
"HostedUrl": "https://user-verification.sandbox.mangopay.com/6810d990c288503975859882?sessionId=6819b52b2400003200f1fb5b&redirectURL=https%3A%2F%2Fexample.com%2F",
"ReturnUrl": "https://example.com/",
"Status": "REFUSED",
"UserId": "user_m_01JTJ6QB6PEKFRDKTX8JZS4QHR",
"CreationDate": 1746515242,
"LastUpdate": 1746515585,
"Checks": [
{
"CheckId": "idnchc_01JTJ6TBFREZY6KDXVW62SFY6Y",
"Type": "BUSINESS_VERIFICATION",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746515340,
"LastUpdate": 1746515340,
"Data": [
{
"Type": "COMPANY_NAME",
"Value": "EXAMPLE SERVICES"
},
{
"Type": "COMPANY_NUMBER",
"Value": null
}
]
},
{
"CheckId": "idnchc_01JTJ6XRYDMHE1132HBQNDXBKB",
"Type": "IDENTITY_DOCUMENT_VERIFICATION",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746515452,
"LastUpdate": 1746515452,
"Data": [
{
"Type": "LEGAL_REPRESENTATIVE_FIRST_NAME",
"Value": "ALEXIS"
},
{
"Type": "LEGAL_REPRESENTATIVE_LAST_NAME",
"Value": "SMITH"
},
{
"Type": "LEGAL_REPRESENTATIVE_BIRTHDATE",
"Value": "668649600"
}
]
},
{
"CheckId": "idnchc_01JTJ6XVF039GY2FY4RT5PD4P9",
"Type": "BUSINESS_INSIGHTS_MATCH",
"CheckStatus": "REFUSED",
"Reasons": [
{
"Type": "DOCUMENT_NOT_ACCEPTED",
"Value": "Not OK"
}
],
"CreationDate": 1746515455,
"LastUpdate": 1746515455,
"Data": []
},
{
"CheckId": "idnchc_01JTJ6XVRADVYC4D61CYQFMP00",
"Type": "IDV_NAME_MATCH_CHECK",
"CheckStatus": "REFUSED",
"Reasons": [
{
"Type": "DOCUMENT_NOT_ACCEPTED",
"Value": "ID name mismatch with declared user data"
}
],
"CreationDate": 1746515455,
"LastUpdate": 1746515455,
"Data": []
},
{
"CheckId": "idnchc_01JTJ6XW1S6F03701FBGG2C3AY",
"Type": "IDV_AGE_CHECK",
"CheckStatus": "VALIDATED",
"Reasons": [],
"CreationDate": 1746515456,
"LastUpdate": 1746515456,
"Data": []
}
]
}
```
# Create an Intent
Source: https://docs.mangopay.com/api-reference/intents/create-intent
POST /v3.0/{ClientId}/payins/intents
Declare a transaction authorization processed by a third-party PSP
### Body parameters
The full amount authorized in the Intent, which must equal the sum of the total amounts of all `LineItems`.
The currency of the intent.
The amount of fees to be diverted to the platform's Fees Wallet when the Intent is split. This value can be overridden when the Split is created.
The `PlatformFees` value must the sum of all line item `Seller.FeesAmount` values.
Information about the transaction authorization processed by the third-party PSP.
The date at which the transaction authorization was created.
The unique identifier of the transaction at the provider level.
The unique identifier of the transaction at the merchant level.
The [supported third-party PSP](/guides/echo/supported-providers) processing the transaction.
One of the [supported payment methods](/guides/echo/supported-payment-methods) used to process the transaction.
Information about the buyer.
If it exists, the unique identifier of the Mangopay user making the payment via the third-party PSP. Must be a valid Mangopay `UserId`.
Information about the items purchased in the transaction.
The sum of all line item amounts must equal the Intent `Amount` value. The total for each line items is calculated as ((`UnitAmount` x `Quantity`) - `DiscountAmount`), which is shown in the `TotalLineItemAmount` returned. The `TaxAmount` is indicative and included in the `UnitAmount`.
The sum of all line item `Seller.FeesAmount` values must equal the Intent `PlatformFees` value.
Information about the seller of the line item.
The unique identifier of the seller of the line item.
Required if `WalletId` not sent.
The unique identifier of the wallet to credit the seller's funds.
Required if `AuthorId` not sent.
The amount of fees that will be diverted to the platform's Fees Wallet when the Intent is split. This value can be overridden when the Split is created.
The future date when the funds are to be automatically transferred to the seller's wallet.
The stock keeping unit (SKU) or other unique identifier of the item.
The name of the item.
The description of the item.
The number of units in the line item.
The cost of each unit, including `TaxAmount` and excluding `DiscountAmount`.
The amount of the `UnitAmount` which is tax.
The amount of discount applied to the item.
The category of the item, as defined by the platform.
Information about the shipping address.
The first line of the address.
The second line of the address.
The city of the address
The region of the address.
The postal code of the address
The country of the address
### Responses
The unique identifier of the intent.
The full amount authorized in the Intent, which must equal the sum of the total amounts of all `LineItems`.
The remaining amount of the Intent that can be split and transferred to the sellers' wallets.
The currency of the intent.
The amount of fees to be diverted to the platform's Fees Wallet when the Intent is split. This value can be overridden when the Split is created.
The `PlatformFees` value must the sum of all line item `Seller.FeesAmount` values.
The status of the Intent:
* `AUTHORIZED` – The Intent `Amount` was authorized for acquisition by the PSP.
* `PARTIALLY_CAPTURED` – Part of the Intent `Amount` was captured and is expected in a Settlement.
* `CAPTURED` – The full Intent `Amount` was captured and is expected in a Settlement.
* `CANCELED` – Some or all of the `Amount` was canceled.
* `REFUNDED` – Some or all of the `Amount` was refunded.
* `REFUND_REVERSED` – The refund could not be completed and the funds were returned to the platform.
* `DISPUTED` – A dispute occurred on some or all of the `Amount`.
* `DEFENDED` – The disputed funds were returned to the platform temporarily until the dispute is resolved.
* `DISPUTED_WON` – The dispute was resolved in favor of the platform.
* `DISPUTED_LOST` – The dispute was resolved against the platform: funds permanently withdrawn to the buyer.
The possible next actions on the intent.
Information about the transaction authorization processed by the third-party PSP.
The date at which the transaction authorization was created.
The unique identifier of the transaction at the provider level.
The unique identifier of the transaction at the merchant level.
The [supported third-party PSP](/guides/echo/supported-providers) processing the transaction.
One of the [supported payment methods](/guides/echo/supported-payment-methods) used to process the transaction.
Information about the buyer.
If it exists, the unique identifier of the Mangopay user making the payment via the third-party PSP. Must be a valid Mangopay `UserId`.
Information about the items purchased in the transaction.
The sum of all line item amounts must equal the Intent `Amount` value. The total for each line items is calculated as ((`UnitAmount` x `Quantity`) - `DiscountAmount`), which is shown in the `TotalLineItemAmount` returned. The `TaxAmount` is indicative and included in the `UnitAmount`.
The sum of all line item `Seller.FeesAmount` values must equal the Intent `PlatformFees` value.
Information about the seller of the line item.
The unique identifier of the seller of the line item.
Required if `WalletId` not sent.
The unique identifier of the wallet to credit the seller's funds.
Required if `AuthorId` not sent.
The amount of fees that will be diverted to the platform's Fees Wallet when the Intent is split. This value can be overridden when the Split is created.
The future date when the funds are to be automatically transferred to the seller's wallet.
The unique identifier of the line item in Mangopay's ecosystem.
The stock keeping unit (SKU) or other unique identifier of the item.
The name of the item.
The description of the item.
The number of units in the line item.
The cost of each unit, including `TaxAmount` and excluding `DiscountAmount`.
The amount of the `UnitAmount` which is tax.
The amount of discount applied to the line item.
The category of the item, as defined by the platform.
Information about the shipping address.
The first line of the address.
The second line of the address.
The city of the address
The region of the address.
The postal code of the address
The country of the address
The total amount of the line item calculated as ((`UnitAmount` x `Quantity`) - `DiscountAmount`).
The item total `CANCELED` amount.
The item total `CAPTURED` amount
The item total `REFUNDED` amount
The item total `DISPUTED` amount.
The item total `COMPLETED` amount.
The date and time at which the Intent was created.
The date and time at which the Intent moved to `AUTHORIZED`.
```json
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Id": "21d7dbc4-beea-4ad2-9f2a-471d683c25b5",
"Date": 1752053748,
"Type": "param_error",
"Errors": {
"Amount": "The total intent amount does not match the sum of the declared LineItem amounts"
}
}
```
{/*
```json
```
*/}
```json
{
"Id": "int_0197eebf-21fd-73c7-85ef-8193b4cf427d",
"Amount": 20000,
"AvailableAmountToSplit": 0,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "AUTHORIZED",
"NextActions": "CAPTURED, PARTIALLY_CAPTURED, CANCELED",
"ExternalData": {
"ExternalProcessingDate": 1752057185,
"ExternalProviderReference": "auth-stripe-633781e6-bb10-4484-8a29-ff6da7d7464a",
"ExternalMerchantReference": "order-420bbe60-7f62-4e53-9d64-7cb5188c507f",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01JZB09HSDZRVN60QH1006TK6E"
},
"LineItems": [
{
"Seller": {
"AuthorId": "user_m_01JZJ42M48CGJ19F2FS5WWKBNH",
"WalletId": "wlt_m_01JZ5STM3FDSC5G1WWVS4ZCZFJ",
"FeesAmount": 0
},
"Id": "int_li_0197eebf-21fd-73c7-85ef-8193b4cf427e",
"Sku": "example-item-123",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 2,
"UnitAmount": 6000,
"TaxAmount": 0,
"DiscountAmount": 2000,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "2226 Balistreri Roads",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"CapturedAmount": 0,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0,
"TotalLineItemAmount": 10000
},
{
"Seller": {
"AuthorId": "user_m_01JZAXD3C31Y543SRKNCVK3V5N",
"WalletId": "wlt_m_01JZ8DKE83Y06860JZRKAM259V",
"FeesAmount": 0
},
"Id": "int_li_0197eebf-21fd-73c7-85ef-8193b4cf427f",
"Sku": "example-item-456",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 1,
"UnitAmount": 10000,
"TaxAmount": 0,
"DiscountAmount": 0,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "771 Koch Mews",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"CapturedAmount": 0,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0,
"TotalLineItemAmount": 10000
}
],
"CreationDate": 1752057192,
"ExecutionDate": 1752057192
}
```
```json
{
"Amount": 20000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"ExternalData": {
"ExternalProcessingDate": 1752057185,
"ExternalProviderReference": "auth-stripe-633781e6-bb10-4484-8a29-ff6da7d7464a",
"ExternalMerchantReference": "order-420bbe60-7f62-4e53-9d64-7cb5188c507f",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01JZB09HSDZRVN60QH1006TK6E"
},
"LineItems": [
{
"Seller": {
"AuthorId": "user_m_01JZJ42M48CGJ19F2FS5WWKBNH",
"WalletId": "wlt_m_01JZ5STM3FDSC5G1WWVS4ZCZFJ",
"FeesAmount": 0
},
"Sku": "example-item-123",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 2,
"UnitAmount": 6000,
"TaxAmount": 0,
"DiscountAmount": 2000,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "2226 Balistreri Roads",
"AddressLine2": null,
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
},
{
"Seller": {
"AuthorId": "user_m_01JZAXD3C31Y543SRKNCVK3V5N",
"WalletId": "wlt_m_01JZ8DKE83Y06860JZRKAM259V",
"FeesAmount": 0
},
"Sku": "example-item-456",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 1,
"UnitAmount": 10000,
"TaxAmount": 0,
"DiscountAmount": 0,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "771 Koch Mews",
"AddressLine2": null,
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
}
]
}
```
# Create a Capture of an Intent
Source: https://docs.mangopay.com/api-reference/intents/create-intent-capture
POST /v3.0/{ClientId}/payins/intents/{IntentId}/captures
Declare the full or partial capture of an authorization processed by a third-party PSP
You can use this endpoint in three capture scenarios requiring three difference request bodies.
### Path parameters
The unique identifier of the Intent.
The full `Amount` of the intent is captured (all line items) and the `ExternalData` is the same as the Intent (same provider references and date).
### Body parameters
No request body for full simultaneous capture.
The full `Amount` of the intent is captured (all line items) but the `ExternalData` references and date are different from the Intent (for example, a capture following preauthorization).
### Body parameters
Information about the capture processed by the third-party PSP.
The `ExternalData` values are required if they differ from the original Intent values, which is the case for captures that are separate from authorization (different reference and/or date).
The date at which the capture was created.
The unique identifier of the capture at the provider level.
The unique identifier of the capture at the merchant level.
The [supported third-party PSP](/guides/echo/supported-providers) processing the capture.
One of the [supported payment methods](/guides/echo/supported-payment-methods) used to process the capture.
Part of the original Intent `Amount` is captured from one or more line items. Any amount can be captured from any line item(s). The `ExternalData` references and date are different from the Intent. The Capture `Amount` must equal the sum of the `Amount` values captured for all line items.
### Body parameters
The amount of the Capture, required for a partial capture. The Capture `Amount` must equal the sum of the `Amount` values captured for all line items.
The amount of fees to be diverted to the platform's Fees Wallet when the Intent is split. This value can be overridden when the Split is created.
The `PlatformFees` value must the sum of all line item `Seller.FeesAmount` values.
Information about the capture processed by the third-party PSP.
The `ExternalData` values are required if they differ from the original Intent values, which is the case for captures that are separate from authorization (different reference and/or date).
The date at which the capture was created.
The unique identifier of the capture at the provider level.
The unique identifier of the capture at the merchant level.
The [supported third-party PSP](/guides/echo/supported-providers) processing the capture.
One of the [supported payment methods](/guides/echo/supported-payment-methods) used to process the capture.
Information about the items purchased in the transaction, required for a partial capture.
The unique identifier of the line item in Mangopay ecosystem.
The amount of the capture. The sum of the Capture's `LineItems.Amount` values must equal the `Amount` of the Capture.
### Responses
The unique identifier of the intent.
The full amount authorized in the Intent, which must equal the sum of the total amounts of all `LineItems`.
The remaining amount of the Intent that can be split and transferred to the sellers' wallets.
The currency of the intent.
The amount of fees to be diverted to the platform's Fees Wallet when the Intent is split. This value can be overridden when the Split is created.
The `PlatformFees` value must the sum of all line item `Seller.FeesAmount` values.
The status of the Intent:
* `AUTHORIZED` – The Intent `Amount` was authorized for acquisition by the PSP.
* `PARTIALLY_CAPTURED` – Part of the Intent `Amount` was captured and is expected in a Settlement.
* `CAPTURED` – The full Intent `Amount` was captured and is expected in a Settlement.
* `CANCELED` – Some or all of the `Amount` was canceled.
* `REFUNDED` – Some or all of the `Amount` was refunded.
* `REFUND_REVERSED` – The refund could not be completed and the funds were returned to the platform.
* `DISPUTED` – A dispute occurred on some or all of the `Amount`.
* `DEFENDED` – The disputed funds were returned to the platform temporarily until the dispute is resolved.
* `DISPUTED_WON` – The dispute was resolved in favor of the platform.
* `DISPUTED_LOST` – The dispute was resolved against the platform: funds permanently withdrawn to the buyer.
The possible next actions on the intent.
Information about the capture processed by the third-party PSP.
The `ExternalData` values are required if they differ from the original Intent values, which is the case for captures that are separate from authorization (different reference and/or date).
The date at which the capture was created.
The unique identifier of the capture at the provider level.
The unique identifier of the capture at the merchant level.
The [supported third-party PSP](/guides/echo/supported-providers) processing the transaction.
One of the [supported payment methods](/guides/echo/supported-payment-methods) used to process the capture.
Information about the buyer.
If it exists, the unique identifier of the Mangopay user making the payment via the third-party PSP. Must be a valid Mangopay `UserId`.
Information about the line items included in the intent action.
The unique identifier of the line item in Mangopay's ecosystem.
The total amount of the line item calculated as ((`UnitAmount` x `Quantity`) - `DiscountAmount`).
The item total `CANCELED` amount.
The item total `CAPTURED` amount
The item total `REFUNDED` amount
The item total `DISPUTED` amount.
The item total `COMPLETED` amount.
The date and time at which the Intent was created.
The date and time at which the Intent moved to `AUTHORIZED`.
```json
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Id": "538f0981-b975-4790-8a20-748a8afe8719",
"Date": 1752063380,
"Type": "param_error",
"Errors": {
"Amount": "The total intent amount does not match the sum of the declared LineItem amounts"
}
}
```
```json
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Id": "19232364-0772-4ba2-bb7d-5ac6aa1ea385",
"Date": 1752064526,
"Type": "param_error",
"Errors": {
"Amount": "Capture not possible: current captured amount [10000] plus capture amount [5000] exceeds the Intent.LineItemId=[int_li_0197ef2e-88f7-7bcc-8937-207a5e5f483a] with amount [10000]"
}
}
```
```json
{
"Message": "Action on the Intent resource is not permitted",
"Id": "51a50212-30d5-4761-a2c7-f92aca09d697",
"Date": 1750257386,
"Type": "invalid_action",
"Errors": {
"Capture": "A partial operation was found, please include instructions in the request body"
}
}
```
{/*
```json
```
*/}
```json Full, simultaneous
{
"Id": "int_0197ef1e-e53d-7e81-b648-b27b13a98ba9",
"Amount": 20000,
"AvailableAmountToSplit": 20000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "CAPTURED",
"NextActions": "REFUNDED, DISPUTED",
"ExternalData": {
"ExternalProcessingDate": 1752057968,
"ExternalProviderReference": "auth-stripe-d400210c-a4d9-4ce2-bfb1-9cf21cde5a80",
"ExternalMerchantReference": "order-8db7e398-f460-43c8-91ef-19d76d54dbf6",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01JZB09HSDZRVN60QH1006TK6E"
},
"Capture": {
"Id": "int_capture_0197ef1e-fc77-7e14-97f8-96a38847e375"
},
"LineItems": [
{
"Id": "int_li_0197ef1e-e53f-7864-aa28-eaef2cc7170f",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0
},
{
"Id": "int_li_0197ef1e-e53f-7864-aa28-eaef2cc71710",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0
}
],
"CreationDate": 1752063468,
"ExecutionDate": 1752063474
}
```
```json Full, delayed
{
"Id": "int_0197ef23-8cf3-755e-8527-62243565e69d",
"Amount": 20000,
"AvailableAmountToSplit": 20000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "CAPTURED",
"NextActions": "REFUNDED, DISPUTED",
"ExternalData": {
"ExternalProcessingDate": 1752057968,
"ExternalProviderReference": "capture-stripe-4680fa21-e6fd-48e0-8303-fcf6b8f43fb1",
"ExternalMerchantReference": "capture-order-31701b2e-3a15-4ae8-8ca5-b381b0ede3dd",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01JZB09HSDZRVN60QH1006TK6E"
},
"Capture": {
"Id": "int_capture_0197ef23-97ad-7e72-b72e-5a7abb79319e"
},
"LineItems": [
{
"Id": "int_li_0197ef23-8cf5-788d-9d45-f36184eb937a",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0
},
{
"Id": "int_li_0197ef23-8cf5-788d-9d45-f36184eb937b",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0
}
],
"CreationDate": 1752063773,
"ExecutionDate": 1752063776
}
```
```json Partial
{
"Id": "int_0197eecb-7d9e-7e57-8825-0511f8e956ae",
"Amount": 20000,
"AvailableAmountToSplit": 10000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "PARTIALLY_CAPTURED",
"NextActions": "REFUNDED, DISPUTED, PARTIALLY_CAPTURED, CAPTURED",
"ExternalData": {
"ExternalProcessingDate": 1752057968,
"ExternalProviderReference": "capture-stripe-55f66004-6538-4d31-90fa-e6394c7e25ac",
"ExternalMerchantReference": "capture-order-e22f01ad-8370-47f0-a028-186c4e144295",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01JZB09HSDZRVN60QH1006TK6E"
},
"Capture": {
"Id": "int_capture_0197ef1e-94fe-7c62-a8df-eb29551623aa"
},
"LineItems": [
{
"Id": "int_li_0197eecb-7d9f-79fe-9eef-6375bba43793",
"TotalLineItemAmount": 10000,
"CapturedAmount": 5000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0
},
{
"Id": "int_li_0197eecb-7d9f-79fe-9eef-6375bba43794",
"TotalLineItemAmount": 10000,
"CapturedAmount": 5000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0
}
],
"CreationDate": 1752058002,
"ExecutionDate": 1752063448
}
```
```json Full, simultaneous
// No request body
```
```json Full, delayed
{
"ExternalData": {
"ExternalProcessingDate": 1752057968,
"ExternalProviderReference": "capture-stripe-4680fa21-e6fd-48e0-8303-fcf6b8f43fb1",
"ExternalMerchantReference": "capture-order-31701b2e-3a15-4ae8-8ca5-b381b0ede3dd",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
}
}
```
```json Partial
{
"Amount": 10000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"ExternalData": {
"ExternalProcessingDate": 1752057968,
"ExternalProviderReference": "capture-stripe-55f66004-6538-4d31-90fa-e6394c7e25ac",
"ExternalMerchantReference": "capture-order-e22f01ad-8370-47f0-a028-186c4e144295",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"LineItems": [
{
"Id": "int_li_0197eecb-7d9f-79fe-9eef-6375bba43793",
"Amount": 5000
},
{
"Id": "int_li_0197eecb-7d9f-79fe-9eef-6375bba43794",
"Amount": 5000
}
]
}
```
# Create a Split of an Intent
Source: https://docs.mangopay.com/api-reference/intents/create-intent-split
POST /v3.0/{ClientId}/payins/intents/{IntentId}/splits
Create a transfer to the wallet of the seller of an Intent line item.
### Path parameters
The unique identifier of the Intent.
### Body parameters
The future Splits to create to transfer Intent funds to the line item sellers.
The unique identifier of the line item.
The amount to transfer to the seller's `WalledId`.
The sum of the `SplitAmount` values of all `Splits` must be lower than or equal to the `AvailableAmountToSplit` of the Intent.
The amount of fees.
The sum of the `FeesAmount` values of all `Splits` must be lower than or equal to the `PlatformFeesAmount` of the Intent.
The future date when the funds are to be automatically transferred to the seller's wallet.
The description of the Split.
### Responses
The Splits requested.
The unique identifier of the Split.
The unique identifier of the line item.
The unique identifier of the seller of the line item.
The unique identifier of the wallet to credit the seller's funds.
The amount to transfer to the seller's `WalledId`.
The sum of the `SplitAmount` values of all `Splits` must be lower than or equal to the `AvailableAmountToSplit` of the Intent.
The amount of fees.
The sum of the `FeesAmount` values of all `Splits` must be lower than or equal to the `PlatformFeesAmount` of the Intent.
The future date when the funds are to be automatically transferred to the seller's wallet.
The description of the Split.
The status of the Split:
* `CREATED`
* `PENDING_FUNDS_RECEPTION`
* `AVAILABLE`
* `PENDING`
* `COMPLETED`
* `REJECTED`
* `FAILED `
* `REVERSED`
{/*
```json
```
*/}
```json
{
"Splits": [
{
"Id": "int_split_019778c4-29c7-7c62-b7c6-775b744ab9f1",
"LineItemId": "int_li_019778b4-7e87-7153-8fa0-746b23ecae7d",
"SellerId": "user_m_01JXWB4GBKZYXHJX197M90JHYV",
"WalletId": "wlt_m_01JXWB5K56PT3J0HJ8Z9YHCYFR",
"SplitAmount": 8000,
"FeesAmount": 0,
"TransferDate": 1742428800,
"Description": "Example description of the Split",
"Status": "CREATED"
},
{
"Id": "int_split_019778c4-29c7-7c62-b7c6-775b744ab9f2",
"LineItemId": "int_li_019778b4-7e87-7153-8fa0-746b23ecae7e",
"SellerId": "user_m_01JXWB53KC8ZZFQNC6S34W9CN0",
"WalletId": "wlt_m_01JXWB5WF962GM9N4GC3VJVK8K",
"SplitAmount": 2500,
"FeesAmount": 0,
"TransferDate": 1742428800,
"Description": "Example description of the Split",
"Status": "CREATED"
}
]
}
```
```json
{
"Splits" : [
{
"LineItemId" : "int_li_019778b4-7e87-7153-8fa0-746b23ecae7d",
"SplitAmount" : 8000,
"FeesAmount" : 0,
"TransferDate" : 1742428800,
"Description" : "Example description of the Split"
},
{
"LineItemId" : "int_li_019778b4-7e87-7153-8fa0-746b23ecae7e",
"SplitAmount" : 2500,
"FeesAmount" : 0,
"TransferDate" : 1742428800,
"Description" : "Example description of the Split"
}
]
}
```
# Execute a Split of an Intent
Source: https://docs.mangopay.com/api-reference/intents/execute-intent-split
POST /v3.0/{ClientId}/payins/intents/{IntentId}/splits/{SplitId}/execute
Release the funds of a Split to the wallet of the seller of the Intent line item.
### Path parameters
The unique identifier of the Intent.
The unique identifier of the Split.
### Body parameters
No request body to execute Split.
### Responses
The unique identifier of the Split.
The unique identifier of the line item.
The unique identifier of the seller of the line item.
The unique identifier of the wallet to credit the seller's funds.
The amount to transfer to the seller's `WalledId`.
The sum of the `SplitAmount` values of all `Splits` must be lower than or equal to the `AvailableAmountToSplit` of the Intent.
The amount of fees.
The sum of the `FeesAmount` values of all `Splits` must be lower than or equal to the `PlatformFeesAmount` of the Intent.
The future date when the funds are to be automatically transferred to the seller's wallet.
The description of the Split.
The status of the Split:
* `CREATED`
* `PENDING_FUNDS_RECEPTION`
* `AVAILABLE`
* `PENDING`
* `COMPLETED`
* `REJECTED`
* `FAILED `
* `REVERSED`
{/*
```json
```
*/}
{/*
```json
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Id": "948c9c7c-aca7-4d30-829b-fab065bd1fcd",
"Date": 1752655104,
"Type": "param_error",
"Errors": {
"Split": "Execute split requires a status in [AVAILABLE, REJECTED]. Split [int_split_01981253-4911-7149-bf1a-5a114a1f7bd5] currently has a status of CREATED."
}
}
```
*/}
```json
{
"Id": "int_split_0197f979-46a1-7810-adfc-a4bcdd7a9315",
"LineItemId": "int_li_0197f975-63f9-7cb9-b906-43671509eb34",
"SellerId": "user_m_01JZWQAGPP1ZQR39QTH2TCP587",
"WalletId": "wlt_m_01JZWQAJN34AGPDRTP9KHBYNYX",
"SplitAmount": 8000,
"FeesAmount": 0,
"Description": "Example description of the Split",
"Status": "PENDING"
}
```
```json
// No request body
```
# The Intent object
Source: https://docs.mangopay.com/api-reference/intents/intent-object
The Intent object represents the declaration of a payment authorization made via a third-party PSP.
[Read more about Mangopay Echo](/guides/echo) **→**
### Attributes
The unique identifier of the intent.
The full amount authorized in the Intent, which must equal the sum of the total amounts of all `LineItems`.
The remaining amount of the Intent that can be split and transferred to the sellers' wallets.
The currency of the intent.
The amount of fees to be diverted to the platform's Fees Wallet when the Intent is split. This value can be overridden when the Split is created.
The `PlatformFees` value must the sum of all line item `Seller.FeesAmount` values.
The status of the Intent:
* `AUTHORIZED` – The Intent `Amount` was authorized for acquisition by the PSP.
* `PARTIALLY_CAPTURED` – Part of the Intent `Amount` was captured and is expected in a Settlement.
* `CAPTURED` – The full Intent `Amount` was captured and is expected in a Settlement.
* `CANCELED` – Some or all of the `Amount` was canceled.
* `REFUNDED` – Some or all of the `Amount` was refunded.
* `REFUND_REVERSED` – The refund could not be completed and the funds were returned to the platform.
* `DISPUTED` – A dispute occurred on some or all of the `Amount`.
* `DEFENDED` – The disputed funds were returned to the platform temporarily until the dispute is resolved.
* `DISPUTED_WON` – The dispute was resolved in favor of the platform.
* `DISPUTED_LOST` – The dispute was resolved against the platform: funds permanently withdrawn to the buyer.
The possible next actions on the intent.
Information about the transaction authorization processed by the third-party PSP.
The date at which the transaction authorization was created.
The unique identifier of the transaction at the provider level.
The unique identifier of the transaction at the merchant level.
The [supported third-party PSP](/guides/echo/supported-providers) processing the transaction.
One of the [supported payment methods](/guides/echo/supported-payment-methods) used to process the transaction.
Information about the buyer.
If it exists, the unique identifier of the Mangopay user making the payment via the third-party PSP. Must be a valid Mangopay `UserId`.
Information about the items purchased in the transaction.
The sum of all line item amounts must equal the Intent `Amount` value. The total for each line items is calculated as ((`UnitAmount` x `Quantity`) - `DiscountAmount`), which is shown in the `TotalLineItemAmount` returned. The `TaxAmount` is indicative and included in the `UnitAmount`.
The sum of all line item `Seller.FeesAmount` values must equal the Intent `PlatformFees` value.
Information about the seller of the line item.
The unique identifier of the seller of the line item.
Required if `WalletId` not sent.
The unique identifier of the wallet to credit the seller's funds.
Required if `AuthorId` not sent.
The amount of fees that will be diverted to the platform's Fees Wallet when the Intent is split. This value can be overridden when the Split is created.
The future date when the funds are to be automatically transferred to the seller's wallet.
The unique identifier of the line item in Mangopay's ecosystem.
The stock keeping unit (SKU) or other unique identifier of the item.
The name of the item.
The description of the item.
The number of units in the line item.
The cost of each unit, including `TaxAmount` and excluding `DiscountAmount`.
The amount of the `UnitAmount` which is tax.
The amount of discount applied to the line item.
The category of the item, as defined by the platform.
Information about the shipping address.
The first line of the address.
The second line of the address.
The city of the address
The region of the address.
The postal code of the address
The country of the address
The total amount of the line item calculated as ((`UnitAmount` x `Quantity`) - `DiscountAmount`).
The item total `CANCELED` amount.
The item total `CAPTURED` amount
The item total `REFUNDED` amount
The item total `DISPUTED` amount.
The item total `COMPLETED` amount.
The date and time at which the Intent was created.
The date and time at which the Intent moved to `AUTHORIZED`.
Information about the amounts captured against the Intent.
The unique identifier of the Capture.
The amount of the Capture.
The status of the Capture:
* `CAPTURED` – The transaction was successful and the funds have been acquired by the third-party PSP.
* `SETTLED_NOT_PAID` – The transaction was included in a settlement file successfully uploaded by the platform using the [POST Create a Settlement](/api-reference/settlements/create-settlement) endpoint.
* `PAID` – The transaction funds were received on the platform's Escrow Wallet.
Information about the line items in the Capture.
The unique identifier of the line item.
The amount of the line item.
The date and time at which the Capture was created.
The date at which the object was successfully moved to `CAPTURED`.
Information about the amounts refunded against the intent
The unique identifier of the Refund.
The amount of the Refund.
The date and time at which the Refund was created.
The date at which the object was successfully moved to `REFUNDED`.
Information about the line items in the Refund.
The unique identifier of the line item.
The amount of the line item.
The status of the Refund:
* `REFUNDED`
* `REFUND_REVERSED`
Information about the disputes created against against the intent
The unique identifier of the Dispute.
The amount of the Dispute.
The date and time at which the Dispute was created.
The date at which the object was successfully moved to `DISPUTED`.
Information about the line items in the Dispute.
The unique identifier of the line item.
The amount of the line item.
The status of the Dispute:
* `DISPUTED`
* `DEFENDED`
* `DISPUTED_WON`
* `DISPUTED_LOST`
Information about the amounts split against the intent
The unique identifier of the Split.
The amount of the Split.
The date and time at which the Split was created.
The date at which the object was successfully moved to `CREATED`.
Information about the line items in the Split.
The unique identifier of the line item.
The amount split for the line item.
The status of the Split:
* `CREATED`
* `PENDING_FUNDS_RECEPTION`
* `AVAILABLE`
* `PENDING`
* `COMPLETED`
* `REJECTED`
* `FAILED `
* `REVERSED`
The unique identifier of the Settlement linked to this Intent, if one has been successfully created by uploading a settlement file to [POST Create a Settlement](/api-reference/settlements/create-settlement).
```json Intent object example
{
"Id": "int_01980d51-ee76-7841-a98f-009e98d2def2",
"Amount": 20000,
"AvailableAmountToSplit": 20000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "CAPTURED",
"NextActions": "REFUND, DISPUTE",
"ExternalData": {
"ExternalProcessingDate": 1752439988,
"ExternalProviderReference": "auth-stripe-da46c083-ef83-438d-ae4f-d8d2cf0cbca0",
"ExternalMerchantReference": "order-7f3234ad-f0c5-4a66-98ac-83e37cada65b",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01JZB09HSDZRVN60QH1006TK6E"
},
"LineItems": [
{
"Seller": {
"AuthorId": "user_m_01JZWV35ZQZF8T9BYQ3494N4R7",
"WalletId": "wlt_m_01JZ5STM3FDSC5G1WWVS4ZCZFJ",
"FeesAmount": 0
},
"Id": "int_li_01980d51-ee78-717a-93ef-9ebe5a7f070d",
"Sku": "example-item-123",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 2,
"UnitAmount": 6000,
"TaxAmount": 0,
"DiscountAmount": 2000,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "00920 Bahringer Fields",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0,
"TotalLineItemAmount": 10000
},
{
"Seller": {
"AuthorId": "user_m_01JZT2D6QQMS45JDR213A3FWF8",
"WalletId": "wlt_m_01JZ8DKE83Y06860JZRKAM259V",
"FeesAmount": 0
},
"Id": "int_li_01980d51-ee78-717a-93ef-9ebe5a7f070e",
"Sku": "example-item-456",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 1,
"UnitAmount": 10000,
"TaxAmount": 0,
"DiscountAmount": 0,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "5997 Miller Oval",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0,
"TotalLineItemAmount": 10000
}
],
"Captures": [
{
"Id": "int_capture_01980d51-faba-764a-b95f-deba3a1128be",
"Amount": 20000,
"Status": "SETTLED_NOT_PAID",
"LineItems": [
{
"Id": "int_li_01980d51-ee78-717a-93ef-9ebe5a7f070d",
"Amount": 10000
},
{
"Id": "int_li_01980d51-ee78-717a-93ef-9ebe5a7f070e",
"Amount": 10000
}
],
"CreationDate": 1752570133,
"ExecutionDate": 1752570982
}
],
"Refunds": [],
"Disputes": [],
"Splits": [],
"CreationDate": 1752570130,
"ExecutionDate": 1752570133,
"SettlementId": "int_stlmnt_01980d5e-dea1-7828-b7ba-bf1772d6abf2"
}
```
# Reverse the Split of an Intent
Source: https://docs.mangopay.com/api-reference/intents/reverse-intent-split
POST /v3.0/{ClientId}/payins/intents/{IntentId}/splits/{SplitId}/reverse
Reallocate a Split's funds back to the Escrow Wallet if not yet executed.
**Note – Status must be available or rejected**
To reverse a Split, its `Status` must be `AVAILABLE` or `REJECTED`.
### Path parameters
The unique identifier of the Intent.
The unique identifier of the Split.
### Body parameters
No request body to reverse Split.
### Responses
The unique identifier of the Split.
The unique identifier of the line item.
The unique identifier of the seller of the line item.
The unique identifier of the wallet to credit the seller's funds.
The amount to transfer to the seller's `WalledId`.
The sum of the `SplitAmount` values of all `Splits` must be lower than or equal to the `AvailableAmountToSplit` of the Intent.
The amount of fees.
The sum of the `FeesAmount` values of all `Splits` must be lower than or equal to the `PlatformFeesAmount` of the Intent.
The future date when the funds are to be automatically transferred to the seller's wallet.
The description of the Split.
The status of the Split:
* `CREATED`
* `PENDING_FUNDS_RECEPTION`
* `AVAILABLE`
* `PENDING`
* `COMPLETED`
* `REJECTED`
* `FAILED `
* `REVERSED`
{/*
```json
```
*/}
```json
{
"Id": "int_split_0197f979-46a1-7810-adfc-a4bcdd7a9315",
"LineItemId": "int_li_0197f975-63f9-7cb9-b906-43671509eb34",
"SellerId": "user_m_01JZWQAGPP1ZQR39QTH2TCP587",
"WalletId": "wlt_m_01JZWQAJN34AGPDRTP9KHBYNYX",
"SplitAmount": 8000,
"FeesAmount": 0,
"Description": "Example description of the Split",
"Status": "REVERSED"
}
```
```json
// No request body
```
# Update a Split of an Intent
Source: https://docs.mangopay.com/api-reference/intents/update-intent-split
PUT /v3.0/{ClientId}/payins/intents/{IntentId}/splits/{SplitId}
Modify a Split before execution.
**Note – Split Status values that allow modification**
To modify a split, its `Status` must be:
* `CREATED`
* `PENDING_FUNDS_RECEPTION`
* `AVAILABLE`
* `FAILED `
* `REVERSED`
### Path parameters
The unique identifier of the Intent.
The unique identifier of the Split.
### Body parameters
The future Splits to create to transfer Intent funds to the line item sellers.
The unique identifier of the line item.
The amount to transfer to the seller's `WalledId`.
The sum of the `SplitAmount` values of all `Splits` must be lower than or equal to the `AvailableAmountToSplit` of the Intent.
The amount of fees.
The sum of the `FeesAmount` values of all `Splits` must be lower than or equal to the `PlatformFeesAmount` of the Intent.
The future date when the funds are to be automatically transferred to the seller's wallet.
The description of the Split.
### Responses
The Splits requested.
The unique identifier of the Split.
The unique identifier of the line item.
The unique identifier of the seller of the line item.
The unique identifier of the wallet to credit the seller's funds.
The amount to transfer to the seller's `WalledId`.
The sum of the `SplitAmount` values of all `Splits` must be lower than or equal to the `AvailableAmountToSplit` of the Intent.
The amount of fees.
The sum of the `FeesAmount` values of all `Splits` must be lower than or equal to the `PlatformFeesAmount` of the Intent.
The future date when the funds are to be automatically transferred to the seller's wallet.
The description of the Split.
The status of the Split:
* `CREATED`
* `PENDING_FUNDS_RECEPTION`
* `AVAILABLE`
* `PENDING`
* `COMPLETED`
* `REJECTED`
* `FAILED `
* `REVERSED`
{/*
```json
```
*/}
```json
{
"Splits": [
{
"Id": "int_split_019778c4-29c7-7c62-b7c6-775b744ab9f2",
"LineItemId": "int_li_019778b4-7e87-7153-8fa0-746b23ecae7e",
"SellerId": "user_m_01JXWB53KC8ZZFQNC6S34W9CN0",
"WalletId": "wlt_m_01JXWB5WF962GM9N4GC3VJVK8K",
"SplitAmount": 6000,
"FeesAmount": 60,
"TransferDate": 1742428800,
"Description": "Example description of the Split",
"Status": "CREATED"
}
]
}
```
```json
{
"LineItemId": "int_li_019778b4-7e87-7153-8fa0-746b23ecae7e",
"SplitAmount": 6000,
"FeesAmount": 60,
"TransferDate": 1752439988,
"Description": "Example description of the Split"
}
```
# View an Intent
Source: https://docs.mangopay.com/api-reference/intents/view-intent
GET /v3.0/{ClientId}/payins/intents/{IntentId}
Retrieve the declaration of a transaction processed by a third-party PSP
### Path parameters
The unique identifier of the Intent.
### Responses
The unique identifier of the intent.
The full amount authorized in the Intent, which must equal the sum of the total amounts of all `LineItems`.
The remaining amount of the Intent that can be split and transferred to the sellers' wallets.
The currency of the intent.
The amount of fees to be diverted to the platform's Fees Wallet when the Intent is split. This value can be overridden when the Split is created.
The `PlatformFees` value must the sum of all line item `Seller.FeesAmount` values.
The status of the Intent:
* `AUTHORIZED` – The Intent `Amount` was authorized for acquisition by the PSP.
* `PARTIALLY_CAPTURED` – Part of the Intent `Amount` was captured and is expected in a Settlement.
* `CAPTURED` – The full Intent `Amount` was captured and is expected in a Settlement.
* `CANCELED` – Some or all of the `Amount` was canceled.
* `REFUNDED` – Some or all of the `Amount` was refunded.
* `REFUND_REVERSED` – The refund could not be completed and the funds were returned to the platform.
* `DISPUTED` – A dispute occurred on some or all of the `Amount`.
* `DEFENDED` – The disputed funds were returned to the platform temporarily until the dispute is resolved.
* `DISPUTED_WON` – The dispute was resolved in favor of the platform.
* `DISPUTED_LOST` – The dispute was resolved against the platform: funds permanently withdrawn to the buyer.
The possible next actions on the intent.
Information about the transaction authorization processed by the third-party PSP.
The date at which the transaction authorization was created.
The unique identifier of the transaction at the provider level.
The unique identifier of the transaction at the merchant level.
The [supported third-party PSP](/guides/echo/supported-providers) processing the transaction.
One of the [supported payment methods](/guides/echo/supported-payment-methods) used to process the transaction.
Information about the buyer.
If it exists, the unique identifier of the Mangopay user making the payment via the third-party PSP. Must be a valid Mangopay `UserId`.
Information about the items purchased in the transaction.
The sum of all line item amounts must equal the Intent `Amount` value. The total for each line items is calculated as ((`UnitAmount` x `Quantity`) - `DiscountAmount`), which is shown in the `TotalLineItemAmount` returned. The `TaxAmount` is indicative and included in the `UnitAmount`.
The sum of all line item `Seller.FeesAmount` values must equal the Intent `PlatformFees` value.
Information about the seller of the line item.
The unique identifier of the seller of the line item.
Required if `WalletId` not sent.
The unique identifier of the wallet to credit the seller's funds.
Required if `AuthorId` not sent.
The amount of fees that will be diverted to the platform's Fees Wallet when the Intent is split. This value can be overridden when the Split is created.
The future date when the funds are to be automatically transferred to the seller's wallet.
The unique identifier of the line item in Mangopay's ecosystem.
The stock keeping unit (SKU) or other unique identifier of the item.
The name of the item.
The description of the item.
The number of units in the line item.
The cost of each unit, including `TaxAmount` and excluding `DiscountAmount`.
The amount of the `UnitAmount` which is tax.
The amount of discount applied to the line item.
The category of the item, as defined by the platform.
Information about the shipping address.
The first line of the address.
The second line of the address.
The city of the address
The region of the address.
The postal code of the address
The country of the address
The total amount of the line item calculated as ((`UnitAmount` x `Quantity`) - `DiscountAmount`).
The item total `CANCELED` amount.
The item total `CAPTURED` amount
The item total `REFUNDED` amount
The item total `DISPUTED` amount.
The item total `COMPLETED` amount.
The date and time at which the Intent was created.
The date and time at which the Intent moved to `AUTHORIZED`.
Information about the amounts captured against the Intent.
The unique identifier of the Capture.
The amount of the Capture.
The status of the Capture:
* `CAPTURED` – The transaction was successful and the funds have been acquired by the third-party PSP.
* `SETTLED_NOT_PAID` – The transaction was included in a settlement file successfully uploaded by the platform using the [POST Create a Settlement](/api-reference/settlements/create-settlement) endpoint.
* `PAID` – The transaction funds were received on the platform's Escrow Wallet.
Information about the line items in the Capture.
The unique identifier of the line item.
The amount of the line item.
The date and time at which the Capture was created.
The date at which the object was successfully moved to `CAPTURED`.
Information about the amounts refunded against the intent
The unique identifier of the Refund.
The amount of the Refund.
The date and time at which the Refund was created.
The date at which the object was successfully moved to `REFUNDED`.
Information about the line items in the Refund.
The unique identifier of the line item.
The amount of the line item.
The status of the Refund:
* `REFUNDED`
* `REFUND_REVERSED`
Information about the disputes created against against the intent
The unique identifier of the Dispute.
The amount of the Dispute.
The date and time at which the Dispute was created.
The date at which the object was successfully moved to `DISPUTED`.
Information about the line items in the Dispute.
The unique identifier of the line item.
The amount of the line item.
The status of the Dispute:
* `DISPUTED`
* `DEFENDED`
* `DISPUTED_WON`
* `DISPUTED_LOST`
Information about the amounts split against the intent
The unique identifier of the Split.
The amount of the Split.
The date and time at which the Split was created.
The date at which the object was successfully moved to `CREATED`.
Information about the line items in the Split.
The unique identifier of the line item.
The amount split for the line item.
The status of the Split:
* `CREATED`
* `PENDING_FUNDS_RECEPTION`
* `AVAILABLE`
* `PENDING`
* `COMPLETED`
* `REJECTED`
* `FAILED `
* `REVERSED`
The unique identifier of the Settlement linked to this Intent, if one has been successfully created by uploading a settlement file to [POST Create a Settlement](/api-reference/settlements/create-settlement).
{/*
```json
```
*/}
```json Partially captured
{
"Id": "int_0197ef2e-88f6-72fc-8204-2cd0abe8a05e",
"Amount": 20000,
"AvailableAmountToSplit": 10000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "PARTIALLY_CAPTURED",
"NextActions": "REFUNDED, DISPUTED, PARTIALLY_CAPTURED, CAPTURED",
"ExternalData": {
"ExternalProcessingDate": 1752057185,
"ExternalProviderReference": "auth-stripe-86e37e21-f400-402b-ae96-fdadd00ea98f",
"ExternalMerchantReference": "order-d99369ac-70f3-4a25-9c38-2e9d33c483f9",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01JZB09HSDZRVN60QH1006TK6E"
},
"LineItems": [
{
"Seller": {
"AuthorId": "user_m_01JZAXD3C31Y543SRKNCVK3V5N",
"WalletId": "wlt_m_01JZ8DKE83Y06860JZRKAM259V",
"FeesAmount": 0
},
"Id": "int_li_0197ef2e-88f7-7bcc-8937-207a5e5f483a",
"Sku": "example-item-456",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 1,
"UnitAmount": 10000,
"TaxAmount": 0,
"DiscountAmount": 0,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "20039 Narciso Trail",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0,
"TotalLineItemAmount": 10000
},
{
"Seller": {
"AuthorId": "user_m_01JZJ42M48CGJ19F2FS5WWKBNH",
"WalletId": "wlt_m_01JZ5STM3FDSC5G1WWVS4ZCZFJ",
"FeesAmount": 0
},
"Id": "int_li_0197ef2e-88f7-7bcc-8937-207a5e5f4839",
"Sku": "example-item-123",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 2,
"UnitAmount": 6000,
"TaxAmount": 0,
"DiscountAmount": 2000,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "449 Huels Villages",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"CapturedAmount": 0,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0,
"TotalLineItemAmount": 10000
}
],
"Captures": [
{
"Id": "int_capture_0197ef2e-e041-7986-86ff-534785a95b32",
"Amount": 5000,
"Status": "CAPTURED",
"LineItems": [
{
"Id": "int_li_0197ef2e-88f7-7bcc-8937-207a5e5f483a",
"Amount": 5000
}
],
"CreationDate": 1752064516,
"ExecutionDate": 1752064516
},
{
"Id": "int_capture_0197ef2e-fd43-7f5b-a967-2aedb3b54b2d",
"Amount": 5000,
"Status": "CAPTURED",
"LineItems": [
{
"Id": "int_li_0197ef2e-88f7-7bcc-8937-207a5e5f483a",
"Amount": 5000
}
],
"CreationDate": 1752064523,
"ExecutionDate": 1752064523
}
],
"Refunds": [],
"Disputes": [],
"Splits": [],
"CreationDate": 1752064493,
"ExecutionDate": 1752064523,
"SettlementId": ""
}
```
```json Fully captured
{
"Id": "int_0197ef23-8cf3-755e-8527-62243565e69d",
"Amount": 20000,
"AvailableAmountToSplit": 20000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "CAPTURED",
"NextActions": "REFUNDED, DISPUTED",
"ExternalData": {
"ExternalProcessingDate": "01-07-2025",
"ExternalProviderReference": "auth-stripe-a63d35c2-b44a-4ce6-8b38-c85c40f8b375",
"ExternalMerchantReference": "order-9044c399-02dd-4778-ab11-c85d8e4ae8ab",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01JZB09HSDZRVN60QH1006TK6E"
},
"LineItems": [
{
"Seller": {
"AuthorId": "user_m_01JZJ42M48CGJ19F2FS5WWKBNH",
"WalletId": "wlt_m_01JZ5STM3FDSC5G1WWVS4ZCZFJ",
"FeesAmount": 0
},
"Id": "int_li_0197ef23-8cf5-788d-9d45-f36184eb937a",
"Sku": "example-item-123",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 2,
"UnitAmount": 6000,
"TaxAmount": 0,
"DiscountAmount": 2000,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "8683 Rogelio Passage",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0,
"TotalLineItemAmount": 10000
},
{
"Seller": {
"AuthorId": "user_m_01JZAXD3C31Y543SRKNCVK3V5N",
"WalletId": "wlt_m_01JZ8DKE83Y06860JZRKAM259V",
"FeesAmount": 0
},
"Id": "int_li_0197ef23-8cf5-788d-9d45-f36184eb937b",
"Sku": "example-item-456",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 1,
"UnitAmount": 10000,
"TaxAmount": 0,
"DiscountAmount": 0,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "689 Danny Mews",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0,
"TotalLineItemAmount": 10000
}
],
"Captures": [
{
"Id": "int_capture_0197ef23-97ad-7e72-b72e-5a7abb79319e",
"Amount": 20000,
"Status": "CAPTURED",
"LineItems": [
{
"Id": "int_li_0197ef23-8cf5-788d-9d45-f36184eb937a",
"Amount": 10000
},
{
"Id": "int_li_0197ef23-8cf5-788d-9d45-f36184eb937b",
"Amount": 10000
}
],
"CreationDate": 1752063776,
"ExecutionDate": 1752063776
}
],
"Refunds": [],
"Disputes": [],
"Splits": [],
"CreationDate": 1752063773,
"ExecutionDate": 1752063776,
"SettlementId": ""
}
```
```json Settled not paid
{
"Id": "int_01980d51-ee76-7841-a98f-009e98d2def2",
"Amount": 20000,
"AvailableAmountToSplit": 20000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "CAPTURED",
"NextActions": "REFUND, DISPUTE",
"ExternalData": {
"ExternalProcessingDate": 1752439988,
"ExternalProviderReference": "auth-stripe-da46c083-ef83-438d-ae4f-d8d2cf0cbca0",
"ExternalMerchantReference": "order-7f3234ad-f0c5-4a66-98ac-83e37cada65b",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01JZB09HSDZRVN60QH1006TK6E"
},
"LineItems": [
{
"Seller": {
"AuthorId": "user_m_01JZWV35ZQZF8T9BYQ3494N4R7",
"WalletId": "wlt_m_01JZ5STM3FDSC5G1WWVS4ZCZFJ",
"FeesAmount": 0
},
"Id": "int_li_01980d51-ee78-717a-93ef-9ebe5a7f070d",
"Sku": "example-item-123",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 2,
"UnitAmount": 6000,
"TaxAmount": 0,
"DiscountAmount": 2000,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "00920 Bahringer Fields",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0,
"TotalLineItemAmount": 10000
},
{
"Seller": {
"AuthorId": "user_m_01JZT2D6QQMS45JDR213A3FWF8",
"WalletId": "wlt_m_01JZ8DKE83Y06860JZRKAM259V",
"FeesAmount": 0
},
"Id": "int_li_01980d51-ee78-717a-93ef-9ebe5a7f070e",
"Sku": "example-item-456",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 1,
"UnitAmount": 10000,
"TaxAmount": 0,
"DiscountAmount": 0,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "5997 Miller Oval",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0,
"TotalLineItemAmount": 10000
}
],
"Captures": [
{
"Id": "int_capture_01980d51-faba-764a-b95f-deba3a1128be",
"Amount": 20000,
"Status": "SETTLED_NOT_PAID",
"LineItems": [
{
"Id": "int_li_01980d51-ee78-717a-93ef-9ebe5a7f070d",
"Amount": 10000
},
{
"Id": "int_li_01980d51-ee78-717a-93ef-9ebe5a7f070e",
"Amount": 10000
}
],
"CreationDate": 1752570133,
"ExecutionDate": 1752570982
}
],
"Refunds": [],
"Disputes": [],
"Splits": [],
"CreationDate": 1752570130,
"ExecutionDate": 1752570133,
"SettlementId": "int_stlmnt_01980d5e-dea1-7828-b7ba-bf1772d6abf2"
}
```
```json Splits created
{
"Id": "int_01981253-1c98-7883-827f-21e7f9403e88",
"Amount": 20000,
"AvailableAmountToSplit": 20000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "CAPTURED",
"NextActions": "REFUND, DISPUTE",
"ExternalData": {
"ExternalProcessingDate": 1752439988,
"ExternalProviderReference": "auth-stripe-dbe32e90-3f0b-419e-8e6f-9eef471c4b29",
"ExternalMerchantReference": "order-740d39cf-2302-4634-ac69-af400163e6ed",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01JN3KDBA3FWTEP16KBB100BES"
},
"LineItems": [
{
"Seller": {
"AuthorId": "user_m_01K07A0DSCZHX9T4FE0H5Z478X",
"WalletId": "wlt_m_01K076S3GG60GNZAR2GP34AXHK",
"FeesAmount": 0
},
"Id": "int_li_01981253-1c9a-728d-8e5a-bec93fec3828",
"Sku": "example-item-123",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 2,
"UnitAmount": 6000,
"TaxAmount": 0,
"DiscountAmount": 2000,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "38221 Adrain Summit",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0,
"TotalLineItemAmount": 10000
},
{
"Seller": {
"AuthorId": "user_m_01K07A02GX5BJ8VAF4MBP6PSFC",
"WalletId": "wlt_m_01JRCYJ6TSMYSDY8QCFXSP7VX3",
"FeesAmount": 0
},
"Id": "int_li_01981253-1c9a-728d-8e5a-bec93fec3829",
"Sku": "example-item-456",
"Name": "Example item name",
"Description": "Example item description",
"Quantity": 1,
"UnitAmount": 10000,
"TaxAmount": 0,
"DiscountAmount": 0,
"Category": "Example category",
"ShippingAddress": {
"AddressLine1": "647 Howe Trail",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"CapturedAmount": 10000,
"RefundedAmount": 0,
"DisputedAmount": 0,
"SplitAmount": 0,
"TotalLineItemAmount": 10000
}
],
"Captures": [
{
"Id": "int_capture_01981253-29bb-7bdc-93a1-962bd938a7ae",
"Amount": 20000,
"Status": "CAPTURED",
"LineItems": [
{
"Id": "int_li_01981253-1c9a-728d-8e5a-bec93fec3828",
"Amount": 10000
},
{
"Id": "int_li_01981253-1c9a-728d-8e5a-bec93fec3829",
"Amount": 10000
}
],
"CreationDate": 1752654096,
"ExecutionDate": 1752654096
}
],
"Refunds": [],
"Disputes": [],
"Splits": [
{
"Id": "int_split_01981253-4911-7149-bf1a-5a114a1f7bd6",
"Amount": 5000,
"Status": "CREATED",
"LineItems": [
{
"Id": "int_li_01981253-1c9a-728d-8e5a-bec93fec3829",
"Amount": 5000
}
],
"CreationDate": 1752654104,
"ExecutionDate": 1752654104
},
{
"Id": "int_split_01981253-4911-7149-bf1a-5a114a1f7bd5",
"Amount": 6000,
"Status": "CREATED",
"LineItems": [
{
"Id": "int_li_01981253-1c9a-728d-8e5a-bec93fec3828",
"Amount": 6000
}
],
"CreationDate": 1752654104,
"ExecutionDate": 1752654778
}
],
"CreationDate": 1752654093,
"ExecutionDate": 1752654096,
"SettlementId": ""
}
```
```json REST
// GET has no body parameters
```
# View a Split of an Intent
Source: https://docs.mangopay.com/api-reference/intents/view-intent-split
GET /v3.0/{ClientId}/payins/intents/{IntentId}/splits/{SplitId}
Retrieve details of a Split of an Intent.
### Path parameters
The unique identifier of the Split.
### Body parameters
No request body to reverse Split.
### Responses
The unique identifier of the Split.
The unique identifier of the line item.
The unique identifier of the seller of the line item.
The unique identifier of the wallet to credit the seller's funds.
The amount to transfer to the seller's `WalledId`.
The sum of the `SplitAmount` values of all `Splits` must be lower than or equal to the `AvailableAmountToSplit` of the Intent.
The amount of fees.
The sum of the `FeesAmount` values of all `Splits` must be lower than or equal to the `PlatformFeesAmount` of the Intent.
The future date when the funds are to be automatically transferred to the seller's wallet.
The description of the Split.
The status of the Split:
* `CREATED`
* `PENDING_FUNDS_RECEPTION`
* `AVAILABLE`
* `PENDING`
* `COMPLETED`
* `REJECTED`
* `FAILED `
* `REVERSED`
{/*
```json
```
*/}
```json
{
"Id": "int_split_0197f979-46a1-7810-adfc-a4bcdd7a9315",
"LineItemId": "int_li_0197f975-63f9-7cb9-b906-43671509eb34",
"SellerId": "user_m_01JZWQAGPP1ZQR39QTH2TCP587",
"WalletId": "wlt_m_01JZWQAJN34AGPDRTP9KHBYNYX",
"SplitAmount": 8000,
"FeesAmount": 0,
"Description": "Example description of the Split",
"Status": "PENDING_FUNDS_RECEPTION"
}
```
```json
// No request body
```
# Create a Klarna PayIn
Source: https://docs.mangopay.com/api-reference/klarna/create-klarna-payin
POST /v2.01/{ClientId}/payins/payment-methods/klarna
**Note – Timeout after 3 hours**
The Klarna payment session lasts 3 hours, at which point the pay-in fails automatically (result code [101109](/errors/codes/101109)) 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
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 `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.
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.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
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.
The unique identifier of the line item.
Possible values: `DIGITAL_GOODS`, `PHYSICAL_GOODS`, `DISCOUNT`, `SHIPPING_FEE`, `SALES_TAX`, `GIFT_CARD`, `STORE_CREDIT`, `SURCHARGE`
The category of the item, allowing line items of different types to be distinguished (for example, buyer protection as `DIGITAL_GOODS`).
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of residence of the user.
Format: Two-letter language code ([ISO 639-1 alpha-2](/api-reference/overview/data-formats))
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: International E.164 standard (preceded by plus sign and country code)
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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
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.
The unique identifier of the line item.
Possible values: `DIGITAL_GOODS`, `PHYSICAL_GOODS`, `DISCOUNT`, `SHIPPING_FEE`, `SALES_TAX`, `GIFT_CARD`, `STORE_CREDIT`, `SURCHARGE`
The category of the item, allowing line items of different types to be distinguished (for example, buyer protection as `DIGITAL_GOODS`).
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of residence of the user.
Format: Two-letter language code ([ISO 639-1 alpha-2](/api-reference/overview/data-formats))
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: International E.164 standard (preceded by plus sign and country code)
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
{
"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",
"Category": "PHYSICAL_GOODS",
"Sku": "example-item-123"
},
{
"Name": "Walking shoes",
"Quantity": 1,
"UnitAmount": 400,
"TaxAmount": 100,
"Description": "ID of Seller 2",
"Category": "PHYSICAL_GOODS",
"Sku": "example-item-456"
}
],
"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",
"Category": "PHYSICAL_GOODS",
"Sku": "example-item-123"
},
{
"Name": "Walking shoes",
"Quantity": 1,
"UnitAmount": 400,
"TaxAmount": 100,
"Description": "ID of Seller 2",
"Category": "PHYSICAL_GOODS",
"Sku": "example-item-456"
}
],
"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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/klarna/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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
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.
The unique identifier of the line item.
Possible values: `DIGITAL_GOODS`, `PHYSICAL_GOODS`, `DISCOUNT`, `SHIPPING_FEE`, `SALES_TAX`, `GIFT_CARD`, `STORE_CREDIT`, `SURCHARGE`
The category of the item, allowing line items of different types to be distinguished (for example, buyer protection as `DIGITAL_GOODS`).
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of residence of the user.
Format: Two-letter language code ([ISO 639-1 alpha-2](/api-reference/overview/data-formats))
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: International telephone numbering plan E.164 (+ then country code then the number)
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 (3 installments) – Pay in 3 installments.
* 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)
Source: https://docs.mangopay.com/api-reference/klarna/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
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.
The unique identifier of the line item.
Possible values: `DIGITAL_GOODS`, `PHYSICAL_GOODS`, `DISCOUNT`, `SHIPPING_FEE`, `SALES_TAX`, `GIFT_CARD`, `STORE_CREDIT`, `SURCHARGE`
The category of the item, allowing line items of different types to be distinguished (for example, buyer protection as `DIGITAL_GOODS`).
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of residence of the user.
Format: Two-letter language code ([ISO 639-1 alpha-2](/api-reference/overview/data-formats))
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: International E.164 standard (preceded by plus sign and country code)
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 (3 installments) – Pay in 3 installments.
* 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",
"Category": "PHYSICAL_GOODS",
"Sku": "example-item-123"
},
{
"Name": "Walking shoes",
"Quantity": 1,
"UnitAmount": 400,
"TaxAmount": 100,
"Description": "ID of Seller 2",
"Category": "PHYSICAL_GOODS",
"Sku": "example-item-456"
}
],
"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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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
Source: https://docs.mangopay.com/api-reference/kyc-documents/create-kyc-document
POST /v2.01/{ClientId}/users/{UserId}/kyc/documents
Create a container for files to be submitted
[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 container is created and files can be uploaded using the [POST Create a KYC Document Page](/api-reference/kyc-documents/create-kyc-document-page) endpoint before submission.
* `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
Source: https://docs.mangopay.com/api-reference/kyc-documents/create-kyc-document-page
POST /v2.01/{ClientId}/users/{UserId}/kyc/documents/{KycDocumentId}/pages
Upload a file to the KYC Document object
[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.
You can upload up to 5 files to each KYC Document, and each upload requires a call to this endpoint. Each file can contain as many real-life pages as required.
To be able to upload a file using this endpoint:
* The corresponding KYC Document `Status` must be `CREATED`
* The `File` must be Base64 encoded and abide by the [format and size constraints](/guides/users/verification/documents/submission#file-constraints).
### 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": "iVBORw0KGgoAAAANSUhEUgAAAlgAAAFRCAIAAAAn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cMwJ0+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//OPs7Gx5eTlPLQjA1HZubu655547efLkmTNntm3btnXr1gXDmfNMXrx48ciRI0eOHGlra9PpdLA+kta7otHo4cOH4fztbdu27dy50263J7uFpumLFy++8sorb731ltvtdjgc8WOf/3tLfO5FPvbYY4V/Kz5/jFE0Gn377bfn5uZUKhXPKAZwzalUqr179zY3N/O3nSmKGhoaunz5Mo7j/ONxoUjhcHjnzp3bt2/P0kaJRqMXLlx45plnfvGLX1AUZbPZGIbJQLmyLBuLxRQKhUKh+OSTT7q7u0mSLC8vT3GYOPwoEAhisVhnZ6fX640/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PPZWenk4g1+CBUBR155131tXVffnll0VFRSh9WQzDSCSSrKwsmDp37ty5fv16kiSNRqPJZIJ1DKTver1en8/n8Xj6+/s9Hg9BEFKp1GKxmM1m8CpHIhGUxhNBEBRFnTlz5umnn4Ya9FFsGrw+paWlo0eP3r9/P7L15UCCwSBN08OGDYN/HzlyxOVyXbrNn6ZptVqt0+mEA6RQBomEPrhcLqvVescdd5hMpig2La4QghHj9Xq3b9++YcOG3bt3GwwGEknB9WtuIobzlACo4Llz566//vonnnhCjEPMr61XEomkuLh40aJF7733nsPhEDuD9CIg1gXLWJIkwWU68FMc+GqB64/n+XA4LOTLoOmnAEVRINULFiyYPHkysnpA3wk8vWHDhs2bNw9O+RD7EOmLWud5HqZOiqLS09PhJyzLsizrcDj6+vrgXYLiiDRNp6amUhQFjwuWQUI4EHGEtaenZ/r06bNnz46iOTgQtVr9yCOP1NTUdHZ2pqamIpb5i4bGYrEkJyd/529CQj7LsjBS6JeVkDk4fvz4BQsWRPf4HXGFkCTJs2fPrl+/fvny5e3t7eDWR7wHLuGARWJra2tOTs6TTz45bty4eFBBYkCofOHChbW1tZs2bUJTT/I7u0Fc2BF4aZ7bpT+J1dODYOSIESN+8YtfoNxB/33A3pubbrqptrb2H//4R25uLoJ6OgMRbn+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 = "iVBORw0KGgoAAAANSUhEUgAAAlgAAAFRCAI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7bhZLcMwJ0+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//OPs7Gx5eTlPLQjA1HZubu655547efLkmTNntm3btnXr1gXDmfNMXrx48ciRI0eOHGlra9PpdLA+kta7otHo4cOH4fztbdu27dy50263J7uFpumLFy++8sorb731ltvtdjgc8WOf/3tLfO5FPvbYY4V/Kz5/jFE0Gn377bfn5uZUKhXPKAZwzalUqr179zY3N/O3nSmKGhoaunz5Mo7j/ONxoUjhcHjnzp3bt2/P0kaJRqMXLlx45plnfvGLX1AUZbPZGIbJQLmyLBuLxRQKhUKh+OSTT7q7u0mSLC8vT3GYOPwoEAhisVhnZ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iORyFNPPZWenk4g1+CBUBR155131tXVffnll0VFRSh9WQzDSCSSrKwsmDp37ty5fv16kiSNRqPJZIJ1DKTver1en8/n8Xj6+/s9Hg9BEFKp1GKxmM1m8CpHIhGUxhNBEBRFnTlz5umnn4Ya9FFsGrw+paWlo0eP3r9/P7L15UCCwSBN08OGDYN/HzlyxOVyXbrNn6ZptVqt0+mEA6RQBomEPrhcLqvVescdd5hMpig2La4QghHj9Xq3b9++YcOG3bt3GwwGEknB9WtuIobzlACo4Llz566//vonnnhCjEPMr61XEomkuLh40aJF7733nsPhEDuD9CIg1gXLWJIkwWU68FMc+GqB64/n+XA4LOTLoOmnAEVRINULFiyYPHkysnpA3wk8vWHDhs2bNw9O+RD7EOmLWud5HqZOiqLS09PhJyzLsizrcDj6+vrgXYLiiDRNp6amUhQFjwuWQUI4EHGEtaenZ/r06bNnz46iOTgQtVr9yCOP1NTUdHZ2pqamIpb5i4bGYrEkJyd/529CQj7LsjBS6JeVkDk4fvz4BQsWRPf4HXGFkCTJs2fPrl+/fvny5e3t7eDWR7wHLuGARWJra2tOTs6TTz45bty4eFBBYkCofOHChbW1tZs2bUJTT/I7u0Fc2BF4aZ7bpT+J1dODYOSIESN+8YtfoNxB/33A3pubbrqptrb2H//4R25uLoJ6OgMRbn+gwQHZbcL/FVITwfgj/v98DfRwHBcOh++++25wrUfXNwMiRFHUmDFjpkyZAv5J9BuFiQFDI+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
Source: https://docs.mangopay.com/api-reference/kyc-documents/kyc-document-object
### Description
The KYC Document object is a container to store verification document files 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 container is created and files can be uploaded using the [POST Create a KYC Document Page](/api-reference/kyc-documents/create-kyc-document-page) endpoint before submission.
* `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 DocumentLearn about user verification
# List all KYC Documents
Source: https://docs.mangopay.com/api-reference/kyc-documents/list-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 container is created and files can be uploaded using the [POST Create a KYC Document Page](/api-reference/kyc-documents/create-kyc-document-page) endpoint before submission.
* `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
Source: https://docs.mangopay.com/api-reference/kyc-documents/list-kyc-documents-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 container is created and files can be uploaded using the [POST Create a KYC Document Page](/api-reference/kyc-documents/create-kyc-document-page) endpoint before submission.
* `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
Source: https://docs.mangopay.com/api-reference/kyc-documents/submit-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 container is created and files can be uploaded using the [POST Create a KYC Document Page](/api-reference/kyc-documents/create-kyc-document-page) endpoint before submission.
* `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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 container is created and files can be uploaded using the [POST Create a KYC Document Page](/api-reference/kyc-documents/create-kyc-document-page) endpoint before submission.
* `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
Source: https://docs.mangopay.com/api-reference/kyc-documents/view-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 container is created and files can be uploaded using the [POST Create a KYC Document Page](/api-reference/kyc-documents/create-kyc-document-page) endpoint before submission.
* `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
Source: https://docs.mangopay.com/api-reference/mandates/cancel-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/mandates/create-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.
For SDD, if the `BankAccountId` is a Danish IBAN (starting `DK`), this endpoint returns a 400 error because they are not currently supported.
### 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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/mandates/list-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/mandates/list-mandates-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/mandates/list-mandates-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/mandates/mandate-object
### Description
Mangopay relies on the Mandate object to authorize direct debits to be collected from a user'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-debitHow to process a SEPA Direct Debit payment
# View a Mandate
Source: https://docs.mangopay.com/api-reference/mandates/view-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/mb-way/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/mb-way/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)
Source: https://docs.mangopay.com/api-reference/mb-way/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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
Source: https://docs.mangopay.com/api-reference/multibanco/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/multibanco/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)
Source: https://docs.mangopay.com/api-reference/multibanco/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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);
}
}
```
# Managing API keys
Source: https://docs.mangopay.com/api-reference/overview/api-keys
## API accounts
To authenticate your requests to the Mangopay API, you need an **API key** and **Client ID** (also rendered `ClientId`).
* **API key** – An encrypted string (or passphrase) associated with the Client ID
* **Client ID** – An identifier of the platform account, associated with one or more API keys
When you authenticate API calls using [OAuth 2.0 authentication](/api-reference/overview/authentication), you combine the both the Client ID and API key.
A single Client ID can be associated with multiple API keys, which together form an **API account**. Each API key has an **alias** to identify it.
* **API account** – A Client ID and all of its associated API keys.
* **Alias** – An identifier for the API key.
## Creation and scopes
Platforms can manage their Sandbox and Production API accounts and keys in the Dashboard (***Developers*** > ***API accounts***). The ***Admin*** role is required for Production keys.
You can create Sandbox API accounts for testing and integration. Your Production API account (and Client ID) are created at the end of your onboarding, before go-live. Once you generate a Sandbox API account, it cannot be deleted.
When you generate an API account (Client ID), the first API key is automatically generated with all scopes assigned and the alias **Auto-generated key**.
All Mangopay API endpoints are grouped into **permission scopes**. Each endpoint only belongs to one scope. An API key has one, several, or all scopes assigned to it. For the full list of endpoints in each scope, see the [Scopes](/api-reference/overview/api-keys/scopes) guide.
* **Permission scope** – A group of endpoints assigned to an API key with read (GET) and/or write (POST and PUT) access
When you create additional API keys, you assign specific scopes and use a custom alias.
Once a key has been created, its alias and scopes cannot be changed (but it can be revoked).
**Note – Auto-generated key has all possible scopes**
The **Auto-generated key** has full access to all scopes currently existing in the API – and all future ones.
If you create a key and assign all scopes, *only* those scopes are assigned and not any future endpoints or scopes that may be released by Mangopay.
The access granted to a key by assigning permission scopes is independent from the activation (if applicable) of a given feature or endpoint for the API account.
## Production versus Sandbox
API keys in both Production and Sandbox have the same nature and behavior in terms of accounts, scopes, and aliases. They can also both be reset and revoked.
The only difference is that when you generate a new key or reset an existing one, **in Production the API key is only shown once** for you to copy and store securely in an encrypted vault. Sandbox keys are always available in the Dashboard to view and copy (when you view details of a key).
**Warning – Keep credentials safe**
A Production API key is only shown once when it is created or reset. It cannot be retrieved later, even by Mangopay.
You must keep your API keys safe in a secure vault, along with their aliases.
## Reset and revoke
All API keys can be **reset**, which generates a new encrypted string to replace the old one. The newly generated key has the same permission scopes and alias. This allows platforms to rotate their API keys periodically for improved security.
User-generated API keys can be **revoked**, which permanently deletes the entire API key: the encrypted string, its alias and permission scopes. This allows platforms to remove keys that are no longer needed.
The auto-generated key can be reset but not revoked. This ensures that you don't unintentionally block yourself out of scopes that haven’t been assigned to another key.
Resetting and revoking are available for both Production and Sandbox keys.
In the Dashboard, only the ***Admin*** role has access to create, reset, and revoke **Production API keys**. For **Sandbox API keys**, the ***Developer*** and ***Sandbox Admin*** roles have access to reset and revoke keys, and this API access can be assigned to your custom roles.
**Warning – Reset and revoke are irreversible**
Both the reset and revoke actions **delete** the encrypted string. Resetting automatically creates a new one (with the same scopes); revoking removes it.
Once a key has been reset or revoked, the previous string cannot be restored by you or by Mangopay.
Integrations using API keys that have been reset or revoked will no longer have access to the Mangopay API.
**Best practice – Rotate your keys periodically**
Standard API security practice is to rotate your Production key(s) at regular intervals, and at least every 90 days.
Dashboard Admins (only) can rotate a Production API key by resetting it, and keeping the same scopes and alias, or by revoking it and creating a new one.
## Related resources
View the endpoints in each scope
Log in to the Dashboard to manage keys
# Permission scopes
Source: https://docs.mangopay.com/api-reference/overview/api-keys/scopes
When you create an API key, you must assign it scopes and give it an alias to identify it. Each scope corresponds to endpoints that the key has permission to:
* READ, via GET calls
* WRITE, via POST and PUT calls
For more details about managing scopes, see the [API key management](/api-reference/overview/api-keys) guide.
This page lists the endpoints in each scope.
**Notes on scope evolution:**
* Each endpoint belongs to only one scope.
* Endpoints will not be moved from their current scope.
* If a new endpoint is added to an existing scope, keys already assigned to the scope automatically gain access to the new endpoint. This also applies to scope permissions that contain no endpoints today.
* If a new sub-scope is created, e.g. `Bankaccounts.Xxxx`, then keys previously assigned the `Bankaccounts` scope inherit access to the new sub-scope.
## Bankaccounts
WRITE
* [POST Validate data for a Recipient](/api-reference/recipients/validate-recipient-data)
* [POST Create a Recipient](/api-reference/recipients/create-recipient)
* [PUT Deactivate a Recipient](/api-reference/recipients/deactivate-recipient)
* [POST Create an IBAN Bank Account](/api-reference/bank-accounts/create-iban-bank-account)
* [POST Create a US Bank Account](/api-reference/bank-accounts/create-us-bank-account)
* [POST Create a CA Bank Account](/api-reference/bank-accounts/create-ca-bank-account)
* [POST Create a GB Bank Account](/api-reference/bank-accounts/create-gb-bank-account)
* [POST Create an OTHER Bank Account](/api-reference/bank-accounts/create-other-bank-account)
* [PUT Deactivate a Bank Account](/api-reference/bank-accounts/deactivate-bank-account)
READ
* [GET View payout methods](/api-reference/recipients/view-payout-methods)
* [GET View the schema for a Recipient](/api-reference/recipients/view-recipient-schema)
* [GET View a Recipient](/api-reference/recipients/view-recipient)
* [GET List Recipients for a User](/api-reference/recipients/list-recipients-user)
* [GET View a Bank Account](/api-reference/bank-accounts/view-bank-account)
* [GET List Bank Accounts for a User](/api-reference/bank-accounts/list-bank-accounts-user)
* [GET List Transactions for a Bank Account](/api-reference/transactions/list-transactions-bank-account)
## Client
### Client.Details
WRITE
* [PUT Update a Client](/api-reference/client/update-client)
* [PUT Upload a Client logo](/api-reference/client/upload-client-logo)
READ
* [GET View a Client](/api-reference/client/view-client)
### Client.Developers
WRITE
* [POST Create a Hook](/api-reference/webhooks/create-hook)
* [PUT Update a Hook](/api-reference/webhooks/update-hook)
READ
* [GET View an API Response](/api-reference/api-responses/view-api-response)
* [GET View a Hook](/api-reference/webhooks/view-hook)
* [GET List all Hooks](/api-reference/webhooks/list-hooks)
* [GET List all Events](/api-reference/events/list-events)
### Client.PayIns
WRITE
* [POST Create a Bank Wire PayIn to the Repudiation Wallet](/api-reference/dispute-settlement/create-bank-wire-payin-to-repudiation-wallet)
READ
* No endpoints with READ permission
### Client.Permissions
WRITE
* [POST Create a Permission Group](/api-reference/permission-groups/create-permission-group)
* [PUT Update a Permission Group](/api-reference/permission-groups/update-permission-group)
* [POST Create an SSO](/api-reference/ssos/create-sso)
* [PUT Update an SSO](/api-reference/ssos/update-sso)
* [PUT Extend an SSO invitation](/api-reference/ssos/extend-sso-invitation)
READ
* [GET View a Permission Group](/api-reference/permission-groups/view-permission-group)
* [GET List all Permission Groups](/api-reference/permission-groups/list-permission-groups)
* [GET View an SSO](/api-reference/ssos/view-sso)
* [GET List all SSOs](/api-reference/ssos/list-ssos)
* [GET List SSOs for a Permission Group](/api-reference/ssos/list-ssos-permission-group)
### Client.Reports
WRITE
* [POST Create a Transactions Report](/api-reference/reports/create-transactions-report)
* [POST Create a Wallets Report](/api-reference/reports/create-wallets-report)
READ
* [GET View a Report](/api-reference/reports/view-report)
* [GET List all Reports](/api-reference/reports/list-reports)
### Client.Wallets
WRITE
* No endpoints with WRITE permission
READ
* [GET View a Client Wallet](/api-reference/client-wallets/view-client-wallet)
* [GET List all Client Wallets](/api-reference/client-wallets/list-client-wallets)
* [GET List Client Wallets by FundsType](/api-reference/client-wallets/list-client-wallets-fundstype)
* [GET List Transactions for a Client Wallet](/api-reference/transactions/list-transactions-client-wallet)
## Conversions
WRITE
* [POST Create a Quote](/api-reference/quotes/create-quote)
* [POST Create a Quoted Conversion between user Wallets](/api-reference/conversions/create-quoted-conversion-user-wallets)
* [POST Create an Instant Conversion between user Wallets](/api-reference/conversions/create-instant-conversion-user-wallets)
* [POST Create a Quoted Conversion between Client Wallets](/api-reference/conversions/create-quoted-conversion-client-wallets)
* [POST Create an Instant Conversion between Client Wallets](/api-reference/conversions/create-instant-conversion-client-wallets)
READ
* [GET View an indicative Conversion Rate](/api-reference/conversion-rates/view-conversion-rate)
* [GET View a Quote](/api-reference/quotes/view-quote)
* [GET View a Conversion](/api-reference/conversions/view-conversion)
## Disputes
### Disputes.General
WRITE
* [PUT Submit a Dispute](/api-reference/disputes/submit-dispute)
* [PUT Update a Dispute](/api-reference/disputes/update-dispute)
* [PUT Close a Dispute](/api-reference/disputes/close-dispute)
* [POST Create a Dispute Document](/api-reference/dispute-documents/create-dispute-document)
* [PUT Submit a Dispute Document](/api-reference/dispute-documents/submit-dispute-document)
* [POST Create a Dispute Document Page](/api-reference/dispute-documents/create-dispute-document-page)
* [POST Create a weblink to view the Pages of a Dispute Document](/api-reference/dispute-documents/create-weblink-to-view-dispute-document-pages)
READ
* [GET View a Dispute](/api-reference/disputes/view-dispute)
* [GET List all Disputes](/api-reference/disputes/list-disputes)
* [GET List Disputes pending settlement](/api-reference/disputes/list-disputes-settlement)
* [GET List Disputes for a PayIn](/api-reference/disputes/list-disputes-payin)
* [GET List Disputes for a User](/api-reference/disputes/list-disputes-user)
* [GET List Disputes for a Wallet](/api-reference/disputes/list-disputes-wallet)
* [GET View a Dispute Document](/api-reference/dispute-documents/view-dispute-document)
* [GET List all Dispute Documents](/api-reference/dispute-documents/list-dispute-documents)
* [GET List Documents for a Dispute](/api-reference/dispute-documents/list-documents-dispute)
* [GET List Transactions for a Dispute](/api-reference/transactions/list-transactions-dispute)
* [GET View a Repudiation](/api-reference/repudiations/view-repudiation)
### Disputes.Settlement
WRITE
* [POST Create a Settlement Transfer](/api-reference/dispute-settlement/create-settlement-transfer)
READ
* [GET View a Settlement Transfer](/api-reference/dispute-settlement/view-settlement-transfer)
## Payins
WRITE
* [POST Create a Card Registration](/api-reference/card-registrations/create-card-registration)
* [POST Tokenize the card](/api-reference/card-registrations/tokenize-card)
* [PUT Update a Card Registration](/api-reference/card-registrations/update-card-registration)
* [PUT Deactivate or edit a Card](/api-reference/cards/deactivate-edit-card)
* [POST Look up metadata for a payment method](/api-reference/payment-method-metadata/lookup-payment-method-metadata)
* [POST Create a Card Validation](/api-reference/card-validations/create-card-validation)
* [POST Create a Direct Card PayIn](/api-reference/direct-card-payins/create-direct-card-payin)
* [POST Create a Recurring PayIn Registration (Card](/api-reference/recurring-payin-registrations/create-recurring-payin-registration)
* [PUT Update a Recurring PayIn Registration](/api-reference/recurring-payin-registrations/update-recurring-payin-registration)
* [POST Create a Recurring PayIn (CIT](/api-reference/recurring-card-payins/create-recurring-payin-cit)
* [POST Create a Recurring PayIn (MIT](/api-reference/recurring-card-payins/create-recurring-payin-mit)
* [POST Create a Preauthorization](/api-reference/preauthorizations/create-preauthorization)
* [PUT Cancel or validate a Preauthorization](/api-reference/preauthorizations/cancel-validate-preauthorization)
* [POST Create a Preauthorized PayIn](/api-reference/preauthorizations/create-preauthorized-payin)
* [POST Create a Deposit Preauthorization](/api-reference/deposit-preauthorizations/create-deposit-preauthorization)
* [PUT Cancel a Deposit Preauthorization or request a no-show](/api-reference/deposit-preauthorizations/cancel-deposit-preauthorization-request-no-show)
* [POST Create a Deposit Preauthorized PayIn without complement](/api-reference/deposit-preauthorizations/create-deposit-preauthorized-payin-without-complement)
* [POST Create a Deposit Preauthorized PayIn prior to complement](/api-reference/deposit-preauthorizations/create-deposit-preauthorized-payin-prior-to-complement)
* [POST Create a Deposit Preauthorized PayIn complement](/api-reference/deposit-preauthorizations/create-deposit-preauthorized-payin-complement)
* [POST Create a Web Card PayIn](/api-reference/web-card-payins/create-web-card-payin)
* [POST Create a Bank Wire PayIn](/api-reference/bank-wire-payins/create-bank-wire-payin)
* [POST Create an IBAN Banking Alias](/api-reference/banking-aliases/create-iban-banking-alias)
* [PUT Deactivate a Banking Alias](/api-reference/banking-aliases/deactivate-banking-alias)
* [POST Create a Mandate](/api-reference/mandates/create-mandate)
* [PUT Cancel a Mandate](/api-reference/mandates/cancel-mandate)
* [POST Create a Direct Debit PayIn](/api-reference/direct-debit-payins/create-direct-debit-payin)
* [POST Create a Web Direct-Debit PayIn](/api-reference/web-direct-debit-payins/create-web-direct-debit-payin)
* [POST Create an Apple Pay PayIn](/api-reference/apple-pay/create-apple-pay-payin)
* [POST Create a Bancontact PayIn](/api-reference/bancontact/create-bancontact-payin)
* [POST Create a Bizum PayIn](/api-reference/bizum/create-bizum-payin)
* [POST Create a BLIK PayIn (with code)](/api-reference/blik/create-blik-payin-with-code)
* [POST Create a BLIK PayIn (without code)](/api-reference/blik/create-blik-payin-without-code)
* [POST Create a Giropay PayIn](/api-reference/giropay/create-giropay-payin)
* [POST Create a Google Pay PayIn](/api-reference/google-pay/create-google-pay-payin)
* [POST Create an iDEAL PayIn](/api-reference/ideal/create-ideal-payin)
* [POST Create a Klarna PayIn](/api-reference/klarna/create-klarna-payin)
* [POST Create an MB WAY PayIn](/api-reference/mb-way/create-mb-way-payin)
* [POST Create an Multibanco PayIn](/api-reference/multibanco/create-multibanco-payin)
* [POST Create a Payconiq PayIn](/api-reference/payconiq/create-payconiq-payin)
* [POST Create a PayPal PayIn](/api-reference/paypal/create-paypal-payin)
* [PUT Add tracking information to a PayPal PayIn](/api-reference/paypal/add-tracking-paypal-payin)
* [POST Create a Recurring PayIn Registration (PayPal)](/api-reference/recurring-payin-registrations/create-recurring-payin-registration-paypal)
* [PUT Update a Recurring PayIn Registration (PayPal)](/api-reference/recurring-payin-registrations/update-recurring-payin-registration-paypal)
* [GET View a Recurring PayIn Registration (PayPal)](/api-reference/recurring-payin-registrations/view-recurring-payin-registration-paypal)
* [POST Create a Recurring PayPal PayIn (CIT)](/api-reference/paypal/create-recurring-paypal-payin-cit)
* [POST Create a Recurring PayPal PayIn (MIT)](/api-reference/paypal/create-recurring-paypal-payin-mit)
* [POST Create a Satispay PayIn](/api-reference/satispay/create-satispay-payin)
* [POST Create a Swish PayIn](/api-reference/swish/create-swish-payin)
* [POST Create a TWINT PayIn](/api-reference/twint/create-twint-payin)
READ
* [GET View a PayIn](/api-reference/direct-card-payins/view-payin-direct-card) (all payment methods)
* [GET View a Card Registration](/api-reference/card-registrations/view-card-registration)
* [GET View a Card](/api-reference/cards/view-card)
* [GET List Cards for a User](/api-reference/cards/list-cards-user)
* [GET List Transactions for a Card](/api-reference/transactions/list-transactions-card)
* [GET List Cards for a Fingerprint](/api-reference/cards/list-cards-fingerprint)
* [GET List Transactions for a Card Fingerprint](/api-reference/transactions/list-transactions-card-fingerprint)
* [GET View a Card Validation](/api-reference/card-validations/view-card-validation)
* [GET View a Recurring PayIn Registration](/api-reference/recurring-payin-registrations/view-recurring-payin-registration)
* [GET View a Preauthorization](/api-reference/preauthorizations/view-preauthorization)
* [GET List Preauthorizations for a Card](/api-reference/preauthorizations/list-preauthorizations-card)
* [GET List Preauthorizations for a User](/api-reference/preauthorizations/list-preauthorizations-user)
* [GET List Transactions for a Preauthorization](/api-reference/transactions/list-transactions-preauthorization)
* [GET View a Deposit Preauthorization](/api-reference/deposit-preauthorizations/view-deposit-preauthorization)
* [GET List Deposit Preauthorizations for a Card](/api-reference/deposit-preauthorizations/list-deposit-preauthorizations-card)
* [GET List Deposit Preauthorizations for a User](/api-reference/deposit-preauthorizations/list-deposit-preauthorizations-user)
* [GET List Transactions for a Deposit Preauthorization](/api-reference/transactions/list-transactions-deposit-preauthorization)
* [GET View card details for a Web Card PayIn](/api-reference/web-card-payins/view-card-details-web-card-payin)
* [GET View a Banking Alias](/api-reference/banking-aliases/view-banking-alias)
* [GET View a Banking Alias for a Wallet](/api-reference/banking-aliases/view-banking-alias-wallet)
* [GET View a Mandate](/api-reference/mandates/view-mandate)
* [GET List all Mandates](/api-reference/mandates/list-mandates)
* [GET List Mandates for a User](/api-reference/mandates/list-mandates-user)
* [GET List Mandates for a Bank Account](/api-reference/mandates/list-mandates-bank-account)
* [GET List Transactions for a Mandate](/api-reference/transactions/list-transactions-mandate)
{/*
- [POST - [Deprecated] Create a Web Card PayIn (iDEAL)](/api-reference/ideal/create-web-card-payin-ideal)
- [GET View a PayIn (Direct Card)](/api-reference/direct-card-payins/view-payin-direct-card)
- [GET View a PayIn (Recurring Card)](/api-reference/recurring-card-payins/view-payin-recurring)
- [GET View a PayIn (Preauthorized Card)](/api-reference/preauthorizations/view-payin-preauthorized)
- [GET View a PayIn (Deposit Preauthorized) Card](/api-reference/deposit-preauthorizations/view-payin-deposit-preauthorized)
- [GET View a PayIn (Web Card)](/api-reference/web-card-payins/view-payin-web-card)
- [GET View a PayIn (Bank Wire)](/api-reference/bank-wire-payins/view-payin-bank-wire)
- [GET View a PayIn (Banking Alias)](/api-reference/virtual-accounts/view-payin-external-instruction)
- [GET View a PayIn (Direct Debit)](/api-reference/direct-debit-payins/view-payin-direct-debit)
- [GET View a PayIn (Web Direct Debit)](/api-reference/web-direct-debit-payins/view-payin-web-direct-debit)
- [GET View a PayIn (Apple Pay)](/api-reference/apple-pay/view-payin-apple-pay)
- [GET View a PayIn (Bancontact)](/api-reference/bancontact/view-payin-bancontact)
- [GET View a PayIn (BLIK)](/api-reference/blik/view-payin-blik)
- [GET View a PayIn (Giropay)](/api-reference/giropay/view-payin-giropay)
- [GET View a PayIn (Google Pay)](/api-reference/google-pay/view-payin-google-pay)
- [GET View a PayIn (iDEAL)](/api-reference/ideal/view-payin-ideal)
- [GET View a PayIn (Klarna)](/api-reference/klarna/view-payin-klarna)
- [GET View a PayIn (MB WAY)](/api-reference/mb-way/view-payin-mb-way)
- [GET View a PayIn (Multibanco)](/api-reference/multibanco/view-payin-multibanco)
- [GET View a PayIn (Payconiq)](/api-reference/payconiq/view-payin-payconiq)
- [GET View a PayIn (PayPal)](/api-reference/paypal/view-payin-paypal)
- [GET View a PayIn (Satispay)](/api-reference/satispay/view-payin-satispay)
- [GET View a PayIn (Swish)](/api-reference/swish/view-payin-swish)
- [GET View a PayIn (TWINT)](/api-reference/twint/view-payin-twint)
*/}
## Payouts
WRITE
* [POST Create a Payout](/api-reference/payouts/create-payout)
* [POST Check Instant Payout eligibility](/api-reference/payouts/check-instant-payout-eligibility)
READ
* [GET View a Payout](/api-reference/payouts/view-payout)
* [GET View a Payout and check mode applied](/api-reference/payouts/view-payout-check-mode-applied)
## Refunds
### Refunds.General
WRITE
* No endpoints with WRITE permission
READ
* [GET View a Refund](/api-reference/refunds/view-refund)
### Refunds.Payins
WRITE
* [POST Create a Refund for a PayIn](/api-reference/refunds/create-refund-payin)
READ
* [GET List Refunds for a PayIn](/api-reference/refunds/list-refunds-payin)
### Refunds.Payouts
WRITE
* No endpoints with WRITE permission
READ
* [GET List Refunds for a Payout](/api-reference/refunds/list-refunds-payout)
### Refunds.Repudiations
WRITE
* No endpoints with WRITE permission
READ
* [GET List Refunds for a Repudiation](/api-reference/refunds/list-refunds-repudiation)
### Refunds.Transfers
WRITE
* [POST Create a Refund for a Transfer](/api-reference/refunds/create-refund-transfer)
READ
* [GET List Refunds for a Transfer](/api-reference/refunds/list-refunds-transfer)
## Transfers
WRITE
* [POST Create a Transfer](/api-reference/transfers/create-transfer)
READ
* [GET View a Transfer](/api-reference/transfers/view-transfer)
## Users
### Users.Details
WRITE
* [POST Create a Natural User (SCA)](/api-reference/users/create-natural-user-sca)
* [PUT Update a Natural User (SCA)](/api-reference/users/update-natural-user-sca)
* [PUT Categorize a Natural User](/api-reference/users/categorize-natural-user)
* [POST Create a Legal User (SCA)](/api-reference/users/create-legal-user-sca)
* [PUT Update a Legal User (SCA)](/api-reference/users/update-legal-user-sca)
* [PUT Categorize a Legal User](/api-reference/users/categorize-legal-user)
* [POST Enroll a User in SCA](/api-reference/users/enroll-user)
* [DELETE Close a Natural User](/api-reference/users/close-natural-user)
* [DELETE Close a Legal User](/api-reference/users/close-legal-user)
* [POST Create a Natural User](/api-reference/users/create-natural-user)
* [PUT Update a Natural User](/api-reference/users/update-natural-user)
* [POST Create a Legal User](/api-reference/users/create-legal-user)
* [PUT Update a Legal User](/api-reference/users/update-legal-user)
READ
* [GET View a User (SCA)](/api-reference/users/view-user-sca)
* [GET View a User](/api-reference/users/view-user)
* [GET List all Users](/api-reference/users/list-users)
* [GET List Transactions for a User](/api-reference/transactions/list-transactions-user)
* [GET View a User Regulatory Status](/api-reference/user-regulatory-status/view-user-regulatory-status)
* [GET View User EMoney](/api-reference/user-emoney/view-user-emoney)
* [GET View Authorizations for a country](/api-reference/country-authorizations/view-authorizations-country)
* [GET List Authorizations for all countries](/api-reference/country-authorizations/list-authorizations-countries)
### Users.Verification
WRITE
* [POST Create an IDV Session](/api-reference/idv-sessions/create-idv-session)
* [POST Validate the format of User data](/api-reference/user-data-format/validate-user-data-format)
* [POST Create a KYC Document](/api-reference/kyc-documents/create-kyc-document)
* [POST Create a KYC Document Page](/api-reference/kyc-documents/create-kyc-document-page)
* [PUT Submit a KYC Document](/api-reference/kyc-documents/submit-kyc-document)
* [POST Create a UBO Declaration](/api-reference/ubo-declarations/create-ubo-declaration)
* [POST Create a UBO](/api-reference/ubo-declarations/create-ubo)
* [PUT Submit a UBO Declaration](/api-reference/ubo-declarations/submit-ubo-declaration)
* [PUT Update a UBO](/api-reference/ubo-declarations/update-ubo)
READ
* [GET View an IDV Session](/api-reference/idv-sessions/view-idv-session)
* [GET List IDV Sessions for a User](/api-reference/idv-sessions/list-idv-sessions-user)
* [GET View a KYC Document](/api-reference/kyc-documents/view-kyc-document)
* [GET List KYC Documents for a User](/api-reference/kyc-documents/list-kyc-documents-user)
* [GET List all KYC Documents](/api-reference/kyc-documents/list-kyc-documents)
* [GET View a UBO Declaration](/api-reference/ubo-declarations/view-ubo-declaration)
* [GET View a UBO](/api-reference/ubo-declarations/view-ubo)
* [GET List UBO Declarations for a User](/api-reference/ubo-declarations/list-ubo-declarations-user)
## Wallet.Details
WRITE
* [POST Create a Wallet](/api-reference/wallets/create-wallet)
* [PUT Update a Wallet](/api-reference/wallets/update-wallet)
READ
* [GET View a Wallet](/api-reference/wallets/view-wallet)
* [GET List Wallets for a User](/api-reference/wallets/list-wallets-user)
* [GET List Transactions for a Wallet](/api-reference/transactions/list-transactions-wallet)
# Authentication
Source: https://docs.mangopay.com/api-reference/overview/authentication
## Introduction
The Mangopay REST API uses the OAuth 2.0 authentication protocol to provide secure access to resources.
**Caution – API security practices**
* Overuse of the OAuth token endpoint is a security risk and may result in rate limiting or blocking actions from Mangopay. You must ensure you use your authentication token for the full duration of its lifetime for all subsequent calls (and not renew it every call, see [Step 2](#2-use-the-bearer-token-for-its-full-lifetime) below).
* 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.
**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.
## 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:
1. [Generate a Bearer token](#1-generate-a-bearer-token)
2. [Use the Bearer token for its full lifetime](#2-use-the-bearer-token-for-its-full-lifetime)
3. [Generate a new one before expiry](#3-generate-a-new-token-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:
#### 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.
The number of seconds until the `access_token` expires and a new token needs 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 the Bearer token for its full lifetime
Now that you have your Bearer `access_token`, you can use it to authenticate **all other API calls** for the `expires_in` duration.
To do so, add it to the Authorization header of your requests, preceded by "Bearer" and a space:
**Authorization**
Bearer 094696b3724d4aa5a182eac360dcd537
#### Overuse of OAuth token endpoint
**Caution – Use token for its full lifetime**
Overuse of the OAuth token endpoint is a security and performance risk and may result in rate limiting or blocking actions from Mangopay.
You must use the token on all other API calls until a new token is needed. Requesting a new token too often results in unnecessary API calls and can put avoidable strain on your server and Mangopay's.
Base your integration dynamically on the `expires_in` and do not hard-code the default value. We recommend triggering a new OAuth token call **30 seconds** before the `expires_in` value.
### 3. Generate a new token before expiry
Shortly before your token expires (we recommend 30 seconds), generate a new one with the OAuth token endpoint as described in [Step 1C](#c-call-the-oauth-token-endpoint) above.
## HTTP errors
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",
"Date": 1733404277
}
```
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 PHP
$api = new MangoPay\MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-client-api-key;
```
```nodejs Node.js
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 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.mangopay.MangoPayApi;
MangoPayApi api = new MangoPayApi();
api.getConfig().setClientId("your-client-id");
api.getConfig().setClientPassword("your-api-key");
```
```.net .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
Source: https://docs.mangopay.com/api-reference/overview/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
Source: https://docs.mangopay.com/api-reference/overview/data-formats
The Mangopay API follows the standards below regarding the data formats it returns and accepts.
**Dates**
Dates and times are defined as **Unix timestamps**, which are integers representing the number of seconds since the Unix Epoch **in UTC** (January 1, 1970, 00:00:00 UTC).
For birth dates, ensure you convert the individual's timezone to UTC to avoid midnight being interpreted as the day before and causing issues with verification checks.
**Object IDs**
The unique identifier returned for an object (its `Id`) is a case-sensitive **string** and must be handled as such. You must store and use the ID with the same letter casing that was originally returned. The maximum length that can 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`
* `xfer_refund_c_01JX28BTTWQMR1TXH4TC87D7NA`
Other variants are also in use depending on the API feature and when the object was created:
* `wt_287afe02-498a-4076-b022-42e8997a172f` – UUID (universally unique identifier, also called a globally unique identifier or GUID) with one or more prefixes
* `2774fac1-d33f-4c5a-8e21-88b772ec2943` – UUID without prefix
* `card_m_vHrtUIVelDzkPmdL`– prefixed alphanumeric string
* `4659626451` – string containing only digits
**Amounts**
All monetary amounts must be passed as **integers** and not strings. Amounts are expressed in 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. Ensure you follow guidance in the endpoint.
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 generally follow the ISO 639-1 alpha-2 format (two letters, e.g. EN, FR) but ensure you follow guidance in the relevant endpoint.
# Filtering and sorting
Source: https://docs.mangopay.com/api-reference/overview/filtering-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
Source: https://docs.mangopay.com/api-reference/overview/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
Source: https://docs.mangopay.com/api-reference/overview/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");
Mangopay.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
Source: https://docs.mangopay.com/api-reference/overview/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:**
# Rate limiting
Source: https://docs.mangopay.com/api-reference/overview/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 Pay by Bank PayIn
Source: https://docs.mangopay.com/api-reference/pay-by-bank/create-pay-by-bank-payin
POST /v2.01/{ClientId}/payins/payment-methods/openbanking
Related: [test data](/testing/payment-methods#pay-by-bank), [guide](/guides/payment-methods/banking/pay-by-bank)
**Note – Session timeout 9 minutes**
The Pay by Bank session lasts for 9 minutes, 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.
**Allowed values:** `AT`, `DE`, `DK`, `EE`, `ES`, `FI`, `FR`, `GB`, `IE`, `IT`, `LV`, `LT`, `NL`, `NO`, `PL`, `PT`.
The country of residence of the user.
The BIC of the user's bank account, which is only returned if it was sent.
If both the `IBAN` and `BIC` are provided, one of the two authentication steps required by certain banks may be avoided.
The IBAN of the user's bank account, which is only returned if it was sent.
If both the `IBAN` and `BIC` are provided, one of the two authentication steps required by certain banks may be avoided.
**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.
**Allowed values:** One of the [supported bank names](/guides/payment-methods/banking/pay-by-bank#banks-and-schemes).
The name of the bank, which is only returned if it was sent.
If the `BankName` is provided, the user doesn't have to select their bank when they are redirected.
**Allowed values:** `DA`, `CS`, `DE`, `EN`, `ET`, `ES`, `FI`, `FR`, `IT`, `LT`, `LV`, `NL`, `NO`, `PL`, `PT`, `SV`
**Default value:** `EN`
The language in which the Tink open banking page is to be displayed.
**Allowed values:** One of the [supported schemes](/guides/payment-methods/banking/pay-by-bank#banks-and-schemes) for the `Country`.
**Default value:** The [listed instant scheme](/guides/payment-methods/banking/pay-by-bank#banks-and-schemes) for the `Country`. If `Country` is `DK`, there is no default and the `Scheme` must be specified.
The scheme to use to process the payment. Note that some banks may charge additional fees to the user for instant payment schemes.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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:** `PAY_BY_BANK`
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.
**Allowed values:** `AT`, `DE`, `DK`, `EE`, `ES`, `FI`, `FR`, `GB`, `IE`, `IT`, `LV`, `LT`, `NL`, `NO`, `PL`, `PT`.
The country of residence of the user.
The BIC of the user's bank account, which is only returned if it was sent.
If both the `IBAN` and `BIC` are provided, one of the two authentication steps required by certain banks may be avoided.
The IBAN of the user's bank account, which is only returned if it was sent.
If both the `IBAN` and `BIC` are provided, one of the two authentication steps required by certain banks may be avoided.
**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.
**Allowed values:** One of the [supported bank names](/guides/payment-methods/banking/pay-by-bank#banks-and-schemes).
The name of the bank, which is only returned if it was sent.
If the `BankName` is provided, the user doesn't have to select their bank when they are redirected.
**Allowed values:** `DA`, `CS`, `DE`, `EN`, `ET`, `ES`, `FI`, `FR`, `IT`, `LT`, `LV`, `NL`, `NO`, `PL`, `PT`, `SV`
**Default value:** `EN`
The language in which the Tink open banking page is to be displayed.
**Allowed values:** One of the [supported schemes](/guides/payment-methods/banking/pay-by-bank#banks-and-schemes) for the `Country`.
**Default value:** The [listed instant scheme](/guides/payment-methods/banking/pay-by-bank#banks-and-schemes) for the `Country`. If `Country` is `DK`, there is no default and the `Scheme` must be specified.
The scheme to use to process the payment. Note that some banks may charge additional fees to the user for instant payment schemes.
**Possible values:** `PENDING_SUCCEEDED`
Parameter that is only returned once the bank wire has been successfully authenticated and initiated by the user but has not yet been received by Mangopay. When the funds are received, the `Status` changes from `CREATED` to `SUCCEEDED` and the `ProcessingStatus` is no longer returned.
For non-instant schemes, processing can take up to 72 hours but is typically completed within 2 days.
Functional errors (`ResultCode`) are possible on a 200 response. [Read more](api-reference/pay-by-bank/pay-by-bank-payin-object) **→**
```json
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Id": "e5845761-cf31-4bf6-bbca-dee3a969a816",
"Date": 1743157036,
"Type": "param_error",
"Errors": {
"IBAN": "The value DE123456789 is not valid"
}
}
```
```json
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Id": "7119ceaa-24b9-4330-a715-a6091f814f40",
"Date": 1743156913,
"Type": "param_error",
"Errors": {
"Bic": "The field must match the regular expression '[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?'."
}
}
```
```json 200
{
"Id": "wt_af48ec6d-d2a3-4b5c-91ed-1c3466de01f3",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1739542980,
"AuthorId": "user_m_01JM2D5H6C117W88ZDH61FDTA2",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1036
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1036
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "CREATED",
"ResultCode": null,
"ResultMessage": null,
"ExecutionDate": null,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01JM2D5R22PRP33Z5FG33V4N11",
"CreditedUserId": "user_m_01JM2D5H6C117W88ZDH61FDTA2",
"PaymentType": "PAY_BY_BANK",
"ExecutionType": "WEB",
"ReturnURL": "http://example.com?transactionId=wt_af48ec6d-d2a3-4b5c-91ed-1c3466de01f3",
"RedirectURL": "https://link.tink.com/1.0/pay/direct/?client_id=16056f414a434c149c48770b0f0bed6c&redirect_uri=https://api.dev.whenthen.co/payments/apm/?connectionId=payment-gateway-tink:85013d24-5f47-4cfa-9ee6-ad7ca74901f6&payment_request_id=8be3d49621b543b695ed29a40975b3cd&market=DE&locale=en&session_id=8caa95d0d1694bb59f6fe726fc233635a658cd2b3e2e4d82aaf5da7d516fb4f9&input_provider=de-demobank-open-banking-embedded-templates",
"StatementDescriptor": "Example123",
"Country": "DE",
"BIC": "AACSDE33",
"IBAN": "DE03500105177564668331",
"PaymentFlow": "WEB",
"BankName": "de-demobank-open-banking-embedded-templates",
"Culture": "EN",
"Scheme": "SEPA_INSTANT_CREDIT_TRANSFER"
}
```
```json REST
{
"Tag": "Created using the Mangopay API Postman collection",
"AuthorId": "user_m_01JM2D5H6C117W88ZDH61FDTA2",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1000
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"CreditedWalletId": "wlt_m_01JM2D5R22PRP33Z5FG33V4N11",
"Country": "DE",
"ReturnURL": "http://example.com",
"IBAN": "DE03500105177564668331",
"BIC": "AACSDE33",
"Scheme": "SEPA_INSTANT_CREDIT_TRANSFER",
"BankName": "de-demobank-open-banking-embedded-templates",
"Culture": "EN",
"PaymentFlow": "WEB",
"StatementDescriptor": "Example123"
}
```
# The Pay by Bank PayIn object
Source: https://docs.mangopay.com/api-reference/pay-by-bank/pay-by-bank-payin-object
### Description
The Pay by Bank PayIn object allows platforms to process open banking payments, where the user authenticates directly with their bank to confirm the payment. [Read more](/guides/payment-methods/banking/pay-by-bank) **→**
### Attributes
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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:** `PAY_BY_BANK`
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.
**Allowed values:** `AT`, `DE`, `DK`, `EE`, `ES`, `FI`, `FR`, `GB`, `IE`, `IT`, `LV`, `LT`, `NL`, `NO`, `PL`, `PT`.
The country of residence of the user.
The BIC of the user's bank account, which is only returned if it was sent.
If both the `IBAN` and `BIC` are provided, one of the two authentication steps required by certain banks may be avoided.
The IBAN of the user's bank account, which is only returned if it was sent.
If both the `IBAN` and `BIC` are provided, one of the two authentication steps required by certain banks may be avoided.
**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.
**Allowed values:** One of the [supported bank names](/guides/payment-methods/banking/pay-by-bank#banks-and-schemes).
The name of the bank, which is only returned if it was sent.
If the `BankName` is provided, the user doesn't have to select their bank when they are redirected.
**Allowed values:** `DA`, `CS`, `DE`, `EN`, `ET`, `ES`, `FI`, `FR`, `IT`, `LT`, `LV`, `NL`, `NO`, `PL`, `PT`, `SV`
**Default value:** `EN`
The language in which the Tink open banking page is to be displayed.
**Allowed values:** One of the [supported schemes](/guides/payment-methods/banking/pay-by-bank#banks-and-schemes) for the `Country`.
**Default value:** The [listed instant scheme](/guides/payment-methods/banking/pay-by-bank#banks-and-schemes) for the `Country`. If `Country` is `DK`, there is no default and the `Scheme` must be specified.
The scheme to use to process the payment. Note that some banks may charge additional fees to the user for instant payment schemes.
**Possible values:** `PENDING_SUCCEEDED`
Parameter that is only returned once the bank wire has been successfully authenticated and initiated by the user but has not yet been received by Mangopay. When the funds are received, the `Status` changes from `CREATED` to `SUCCEEDED` and the `ProcessingStatus` is no longer returned.
For non-instant schemes, processing can take up to 72 hours but is typically completed within 2 days.
# View a PayIn (Pay by Bank)
Source: https://docs.mangopay.com/api-reference/pay-by-bank/view-payin-pay-by-bank
GET /v2.01/{ClientId}/payins/{PayInId}
### Path parameters
The unique identifier of the pay-in.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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:** `PAY_BY_BANK`
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.
**Allowed values:** `AT`, `DE`, `DK`, `EE`, `ES`, `FI`, `FR`, `GB`, `IE`, `IT`, `LV`, `LT`, `NL`, `NO`, `PL`, `PT`.
The country of residence of the user.
The BIC of the user's bank account, which is only returned if it was sent.
If both the `IBAN` and `BIC` are provided, one of the two authentication steps required by certain banks may be avoided.
The IBAN of the user's bank account, which is only returned if it was sent.
If both the `IBAN` and `BIC` are provided, one of the two authentication steps required by certain banks may be avoided.
**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.
**Allowed values:** One of the [supported bank names](/guides/payment-methods/banking/pay-by-bank#banks-and-schemes).
The name of the bank, which is only returned if it was sent.
If the `BankName` is provided, the user doesn't have to select their bank when they are redirected.
**Allowed values:** `DA`, `CS`, `DE`, `EN`, `ET`, `ES`, `FI`, `FR`, `IT`, `LT`, `LV`, `NL`, `NO`, `PL`, `PT`, `SV`
**Default value:** `EN`
The language in which the Tink open banking page is to be displayed.
**Allowed values:** One of the [supported schemes](/guides/payment-methods/banking/pay-by-bank#banks-and-schemes) for the `Country`.
**Default value:** The [listed instant scheme](/guides/payment-methods/banking/pay-by-bank#banks-and-schemes) for the `Country`. If `Country` is `DK`, there is no default and the `Scheme` must be specified.
The scheme to use to process the payment. Note that some banks may charge additional fees to the user for instant payment schemes.
**Possible values:** `PENDING_SUCCEEDED`
Parameter that is only returned once the bank wire has been successfully authenticated and initiated by the user but has not yet been received by Mangopay. When the funds are received, the `Status` changes from `CREATED` to `SUCCEEDED` and the `ProcessingStatus` is no longer returned.
For non-instant schemes, processing can take up to 72 hours but is typically completed within 2 days.
Pay by Bank functional [errors](/errors/codes) (`ResultCode`):
**RedirectURL page embedded**
The payment failed because the redirect URL is embedded in a page.
**RedirectURL already processed**
The payment failed because the redirect URL has already been processed.
**Bank not supported**
The payment failed because the selected bank is not supported.
**User not recognized**
The payment failed because the user is not recognized by the bank.
**Authentication method not supported**
The payment failed because the authentication method selected is not supported.
**Invalid user credentials**
The payment failed due to invalid user credentials.
**Parallel session detected**
The payment failed due to another session being open for the user.
**User blocked by bank**
The payment failed because the user has been blocked by their bank.
**User denied by bank**
The payment failed because the user is not authorized to perform this action.
```json PENDING_SUCCEEDED
{
"Id": "wt_af48ec6d-d2a3-4b5c-91ed-1c3466de01f3",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1739542980,
"AuthorId": "user_m_01JM2D5H6C117W88ZDH61FDTA2",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1036
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1036
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "CREATED",
"ResultCode": null,
"ResultMessage": null,
"ExecutionDate": null,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01JM2D5R22PRP33Z5FG33V4N11",
"CreditedUserId": "user_m_01JM2D5H6C117W88ZDH61FDTA2",
"PaymentType": "PAY_BY_BANK",
"ExecutionType": "WEB",
"ReturnURL": "http://example.com?transactionId=wt_af48ec6d-d2a3-4b5c-91ed-1c3466de01f3",
"RedirectURL": "https://link.tink.com/1.0/pay/direct/?client_id=16056f414a434c149c48770b0f0bed6c&redirect_uri=https://api.dev.whenthen.co/payments/apm/?connectionId=payment-gateway-tink:85013d24-5f47-4cfa-9ee6-ad7ca74901f6&payment_request_id=8be3d49621b543b695ed29a40975b3cd&market=DE&locale=en&session_id=8caa95d0d1694bb59f6fe726fc233635a658cd2b3e2e4d82aaf5da7d516fb4f9&input_provider=de-demobank-open-banking-embedded-templates",
"StatementDescriptor": "Example123",
"Country": "DE",
"BIC": "AACSDE33",
"IBAN": "DE03500105177564668331",
"PaymentFlow": "WEB",
"BankName": "de-demobank-open-banking-embedded-templates",
"Culture": "EN",
"Scheme": "SEPA_CREDIT_TRANSFER",
"ProcessingStatus": "PENDING_SUCCEEDED"
}
```
```json SUCCEEDED
{
"Id": "wt_af48ec6d-d2a3-4b5c-91ed-1c3466de01f3",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1739542980,
"AuthorId": "user_m_01JM2D5H6C117W88ZDH61FDTA2",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1036
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1036
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1739635782,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01JM2D5R22PRP33Z5FG33V4N11",
"CreditedUserId": "user_m_01JM2D5H6C117W88ZDH61FDTA2",
"PaymentType": "PAY_BY_BANK",
"ExecutionType": "WEB",
"ReturnURL": "http://example.com?transactionId=wt_af48ec6d-d2a3-4b5c-91ed-1c3466de01f3",
"RedirectURL": "https://link.tink.com/1.0/pay/direct/?client_id=16056f414a434c149c48770b0f0bed6c&redirect_uri=https://api.dev.whenthen.co/payments/apm/?connectionId=payment-gateway-tink:85013d24-5f47-4cfa-9ee6-ad7ca74901f6&payment_request_id=8be3d49621b543b695ed29a40975b3cd&market=DE&locale=en&session_id=8caa95d0d1694bb59f6fe726fc233635a658cd2b3e2e4d82aaf5da7d516fb4f9&input_provider=de-demobank-open-banking-embedded-templates",
"StatementDescriptor": "Example123",
"Country": "DE",
"BIC": "AACSDE33",
"IBAN": "DE03500105177564668331",
"PaymentFlow": "WEB",
"BankName": "de-demobank-open-banking-embedded-templates",
"Culture": "EN",
"Scheme": "SEPA_CREDIT_TRANSFER"
}
```
```json REST
// GET has no body parameters
```
# View supported banks for Pay by Bank
Source: https://docs.mangopay.com/api-reference/pay-by-bank/view-supported-banks-pay-by-bank
GET /v2.01/{ClientId}/payment-methods/openbanking/metadata/supported-banks
Retrieve supported banks to present to a user for Pay by Bank pay-ins
This endpoint allows you to retrieve a paginated list of banks that you can present to the user for selection during their Pay by Bank checkout experience. Once they have selected their bank, and optionally the scheme, submit the data of their selection to the [POST Create a Pay by Bank PayIn](/api-reference/pay-by-bank/create-pay-by-bank-payin) endpoint. [Read the guide](/guides/payment-methods/banking/pay-by-bank) **→**
### Query parameters
**Allowed values:** `AT`, `DE`, `DK`, `EE`, `ES`, `FI`, `FR`, `GB`, `IE`, `IT`, `LV`, `LT`, `NL`, `NO`, `PL`, `PT`.
The countries for which to return supported banks. You can combine query values in a comma-separated list.
Min. value: `1`; max. value: `100`
**Default value:** `10`
The number of `Banks` objects returned for each page of the pagination.
On this endpoint, the pagination refers to the number of `Banks` objects, regardless of whether they span multiple `Countries` objects.
Start value: `1`
**Default value:** `1`
Indicates the index of the page for the pagination.
### Responses
The supported banks listed by country.
Array of objects listing the paginated `Banks` per `Country`.
List of paginated banks for the country. Display the list of banks for the user to choose before submitting their selection in the [POST Create a Pay by Bank PayIn](/api-reference/pay-by-bank/create-pay-by-bank-payin) request.
The bank's `BankName` to identify it in the pay-in request.
List of `Scheme` values supported by the bank, which can be presented to the user for selection before submission in the pay-in request.
The bank's display name to show to the user for selection.
The `Country` value for the paginated list of `Banks` objects.
```json
{
"Id": "c3f6137d-eb40-4d48-a320-4209577b0101",
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Date": 1749481944,
"Type": "param_error",
"Errors": {
"countryCodes": "The value [AU] is not valid"
}
}
```
```json REST
// GET has no body parameters
```
```json REST (10 banks by default)
{
"SupportedBanks": {
"Countries": [
{
"Banks": [
{
"BankName": "at-demobank-open-banking-embedded",
"Scheme": [],
"Name": "Tink Demo Bank"
},
{
"BankName": "at-demobank-open-banking-redirect",
"Scheme": [],
"Name": "Tink Demo Bank"
},
{
"BankName": "at-demobank-password",
"Scheme": [],
"Name": "Tink Demo Bank"
}
],
"Country": "AT"
},
{
"Banks": [
{
"BankName": "de-demo-commerzbank-ob",
"Scheme": [
"SEPA_CREDIT_TRANSFER",
"SEPA_INSTANT_CREDIT_TRANSFER",
"PIS_FUTURE_DATE"
],
"Name": "Commerzbank Sandbox"
},
{
"BankName": "de-demobank-open-banking-embedded-templates",
"Scheme": [
"PIS_BULK_PAYMENTS",
"SEPA_CREDIT_TRANSFER",
"SEPA_INSTANT_CREDIT_TRANSFER"
],
"Name": "Tink Demo Bank"
},
{
"BankName": "de-demobank-open-banking-redirect",
"Scheme": [
"PIS_BULK_PAYMENTS",
"SEPA_CREDIT_TRANSFER",
"SEPA_INSTANT_CREDIT_TRANSFER"
],
"Name": "Tink Demo Bank"
},
{
"BankName": "de-demobank-open-banking-redirect-pisonly",
"Scheme": [
"PIS_BULK_PAYMENTS",
"SEPA_CREDIT_TRANSFER",
"SEPA_INSTANT_CREDIT_TRANSFER"
],
"Name": "Tink Demo Bank"
},
{
"BankName": "de-demobank-password",
"Scheme": [
"PIS_BULK_PAYMENTS",
"SEPA_CREDIT_TRANSFER",
"SEPA_INSTANT_CREDIT_TRANSFER"
],
"Name": "Tink Demo Bank"
}
],
"Country": "DE"
},
{
"Banks": [
{
"BankName": "dk-demobank-open-banking-embedded",
"Scheme": [
"INSTANT_DANISH_DOMESTIC_CREDIT_TRANSFER_INTRADAG",
"DANISH_DOMESTIC_CREDIT_TRANSFER",
"INSTANT_DANISH_DOMESTIC_CREDIT_TRANSFER_STRAKS"
],
"Name": "Tink Demo Bank"
},
{
"BankName": "dk-demobank-open-banking-redirect",
"Scheme": [
"INSTANT_DANISH_DOMESTIC_CREDIT_TRANSFER_INTRADAG",
"DANISH_DOMESTIC_CREDIT_TRANSFER",
"INSTANT_DANISH_DOMESTIC_CREDIT_TRANSFER_STRAKS"
],
"Name": "Tink Demo Bank"
}
],
"Country": "DK"
}
]
}
}
```
# Create a Payconiq PayIn
Source: https://docs.mangopay.com/api-reference/payconiq/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/payconiq/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)
Source: https://docs.mangopay.com/api-reference/payconiq/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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://docs.mangopay.com/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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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
Source: https://docs.mangopay.com/api-reference/payment-method-metadata/lookup-payment-method-metadata
POST /v2.01/{ClientId}/payment-methods/metadata
### Body parameters
**Allowed values:** `BIN`, `GOOGLE_PAY`
The type of metadata.
Format: 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.
Format: 6 or 8 digits
The bank identification number (BIN).
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: 6 or 8 digits
The bank identification number (BIN).
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: 6 or 8 digits
The bank identification number (BIN).
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: 6 or 8 digits
The bank identification number (BIN).
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/payment-method-metadata/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.
Format: 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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/payouts/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.
```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 Reachable
{
"InstantPayout": {
"IsReachable": true,
"UnreachableReason": null
}
}
```
```json Not reachable
{
"InstantPayout": {
"IsReachable": false,
"UnreachableReason": {
"Code": "130007",
"Message": "Destination Bank is not reachable"
}
}
}
```
```json Insufficient wallet balance
{
"InstantPayout": {
"IsReachable": false,
"UnreachableReason": {
"Code": "001001",
"Message": "Unsufficient wallet balance"
}
}
}
```
```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
Source: https://docs.mangopay.com/api-reference/payouts/create-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.
**Possible values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY`, `RTGS_PAYMENT`
**Default value:** `STANDARD`
The mode defining how the payout request is sent:
* `STANDARD` – Sent via the relevant route for the currency and destination account (which determine the typical funds [processing times](/guides/payouts#cutoffs-and-processing-times)). If a request is received after the applicable cutoff, it is processed the next working day.
* `INSTANT_PAYMENT` – Sent via the SEPA Instant Credit Transfer scheme (funds processed within 10 seconds) with a fallback to `STANDARD` mode if any of the prerequisites are not met or if another issue occurs.
* `INSTANT_PAYMENT_ONLY` – Sent via the SEPA Instant Credit Transfer scheme (funds processed within 10 seconds) without a fallback. If an issue occurs, the wallet automatically refunded.
* `RTGS_PAYMENT` – Sent via the Eurozone’s [real-time gross settlement (RGTS)](/guides/payouts#real-time-gross-settlement-rtgs) scheme T2 (funds processed same working day) without a fallback. If the request is received after the applicable cutoff (16:15 CET), it is processed the next working day (from 07:00 CET).
Information about the payment reference provided for the payout.
This object must be used to provide the reference of a [bank wire pay-in](/api-reference/bank-wire-payins/bank-wire-payin-object) or a [pay-in to virtual IBAN](/api-reference/virtual-accounts/external-instruction-bank-wire-payin-object), if the payout is being used to refund it.
**Allowed values:** `PAYIN_REFUND`
The reason for the reference being provided:
* `PAYIN_REFUND` – The payout serves to reimburse a pay-in.
**Allowed values:** The valid `Id` of a successful pay-in.
The unique identifier associated with the reference, whose value corresponds to the `ReasonType`:
* `PAYIN_REFUND` – The `ReferenceId` value provided is the same as the `Id` of the initial pay-in being refunded.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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`, `RTGS_PAYMENT`
The value set for the `PayoutModeRequested` parameter when making the request.
**Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `RTGS_PAYMENT`, `PENDING_RESPONSE`
The mode defining how the payout request is sent:
* `STANDARD` – Sent via the relevant route for the currency and destination account (which determine the typical funds [processing times](/guides/payouts#cutoffs-and-processing-times)). If a request is received after the applicable cutoff, it is processed the next working day.
* `INSTANT_PAYMENT` – Sent via the SEPA Instant Credit Transfer scheme (funds processed within 10 seconds). If `ModeRequested` was `INSTANT_PAYMENT_ONLY` and a fallback occurs, the `ModeApplied` is `STANDARD`.
* `RTGS_PAYMENT` – Sent via the Eurozone’s [real-time gross settlement (RGTS)](/guides/payouts#real-time-gross-settlement-rtgs) scheme T2 (funds processed same working day) without a fallback. If the request is received after the applicable cutoff (16:15 CET), it is processed the next working day (from 07:00 CET).
* `PENDING_RESPONSE` – Temporary state to accommodate the possible latency between the creation of the request and the mode being applied in the case of instant payment and RTGS modes.
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.
Information about the payment reference provided for the payout. This object is returned `null` if not provided.
This object must be used to provide the reference of a [bank wire pay-in](/api-reference/bank-wire-payins/bank-wire-payin-object) or a [pay-in to virtual IBAN](/api-reference/virtual-accounts/external-instruction-bank-wire-payin-object), if the payout is being used to refund it.
**Allowed values:** `PAYIN_REFUND`
The reason for the reference being provided:
* `PAYIN_REFUND` – The payout serves to reimburse a pay-in.
**Allowed values:** The valid `Id` of a successful pay-in
The unique identifier associated with the reference, whose value corresponds to the `ReasonType`:
* `PAYIN_REFUND` – The `ReferenceId` value provided is the same as the `Id` of the initial pay-in being refunded.
```json
{
"Id": "44312c27-c681-4240-8df9-a2507bcf30d6",
"Message": "Payout not allowed for RecipientScope PAYIN",
"Type": "invalid_action",
"Date": 1747666655.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": "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 Standard
{
"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": "rec_01K09BK0T804BEGVP6GPKQXR3N",
"BankWireRef": "Example123",
"ModeRequested": null,
"ModeApplied": "PENDING_RESPONSE",
"FallbackReason": null,
"EndToEndId": "2c2184396eef4e5da90ab48a2feeb51d",
"PaymentRef": null
}
```
```json SCT Inst (no fallback)
{
"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": "rec_01K09BK0T804BEGVP6GPKQXR3N",
"BankWireRef": "Example123",
"ModeRequested": "INSTANT_PAYMENT_ONLY",
"ModeApplied": "PENDING_RESPONSE",
"FallbackReason": null,
"EndToEndId": "e8052ae4729f4abe9355442020f411a9",
"PaymentRef": null
}
```
```json RTGS
{
"Id": "po_m_01JMCS9ED9YTYZBJ3CH0GEMEDS",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1739890932,
"AuthorId": "user_m_01JKWYDT94N91CW572D7QNNYRP",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1135
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1022
},
"Fees": {
"Currency": "EUR",
"Amount": 113
},
"Status": "CREATED",
"ResultCode": null,
"ResultMessage": null,
"ExecutionDate": null,
"Type": "PAYOUT",
"Nature": "REGULAR",
"CreditedWalletId": null,
"DebitedWalletId": "wlt_m_01JMAAKGM0VCBCQ5V4DB3EZPER",
"PaymentType": "BANK_WIRE",
"BankAccountId": "rec_01K09BK0T804BEGVP6GPKQXR3N",
"BankWireRef": "Example123",
"ModeRequested": "RTGS_PAYMENT",
"ModeApplied": "PENDING_RESPONSE",
"FallbackReason": null,
"EndToEndId": "a66784a74c7b4357bbe4f10abccbe411",
"PaymentRef": null
}
```
```json PAYIN_REFUND
{
"Id": "po_b_01JCR32EMBXRWNWRN5KVW2DXE1",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1731680352,
"AuthorId": "user_m_01JCQYJNHFPENP1SKTCBYER0F8",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 24581
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 24581
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "CREATED",
"ResultCode": null,
"ResultMessage": null,
"ExecutionDate": null,
"Type": "PAYOUT",
"Nature": "REGULAR",
"CreditedWalletId": null,
"DebitedWalletId": "wlt_m_01J9KR4A7BH8KVE4PG6DTNS817",
"PaymentType": "BANK_WIRE",
"BankAccountId": "rec_01K09BK0T804BEGVP6GPKQXR3N",
"BankWireRef": "Example123",
"ModeRequested": null,
"ModeApplied": "STANDARD",
"FallbackReason": null,
"EndToEndId": "2da75c747abf4fbd83d6fd746d63fad4",
"PaymentRef": {
"ReasonType": "PAYIN_REFUND",
"ReferenceId": "payin_m_01JCR21X56KVHF7F5TVGYNT9G7"
}
}
```
```json Standard
{
"Tag": "Created using Mangopay API Postman Collection",
"AuthorId": "204069570",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 5792
},
"Fees": {
"Currency": "EUR",
"Amount": 579
},
"DebitedWalletId": "204069727",
"BankAccountId": "204070675",
"BankWireRef": "Example123"
}
```
```json SCT Inst (no fallback)
{
"Tag": "Created using Mangopay API Postman Collection",
"AuthorId": "204069570",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 3387
},
"Fees": {
"Currency": "EUR",
"Amount": 339
},
"DebitedWalletId": "204069727",
"BankAccountId": "204070675",
"BankWireRef": "Example123",
"ModeRequested": "INSTANT_PAYMENT_ONLY"
}
```
```json RTGS
{
"Tag": "Created using Mangopay API Postman Collection",
"AuthorId": "user_m_01JKWYDT94N91CW572D7QNNYRP",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1135
},
"Fees": {
"Currency": "EUR",
"Amount": 113
},
"DebitedWalletId": "wlt_m_01JMAAKGM0VCBCQ5V4DB3EZPER",
"BankAccountId": "bankacc_m_01JMCS94W97ZM6XF5HR0KEVSGV",
"BankWireRef": "Example123",
"ModeRequested": "RTGS_PAYMENT"
}
```
```json PAYIN_REFUND {15-17}
{
"AuthorId": "user_m_01JCQYJNHFPENP1SKTCBYER0F8",
"Tag": "Created using Mangopay API Postman Collection",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 24581
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"DebitedWalletId": "wlt_m_01J9KR4A7BH8KVE4PG6DTNS817",
"BankAccountId": "bankacc_m_01JCN1X2EHWG0JNJNPNQ21CW5G",
"BankWireRef": "Example123",
"PaymentRef": {
"ReasonType": "PAYIN_REFUND",
"ReferenceId": "payin_m_01JCR21X56KVHF7F5TVGYNT9G7"
}
}
```
```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 = "Example123";
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
Source: https://docs.mangopay.com/api-reference/payouts/payout-object
### Description
Mangopay relies on the Payout object to transfer funds from a Wallet to an external bank account, which must be registered as a [Recipient](/api-reference/recipients/recipient-object) for the User. Legacy active Bank Account objects can continue to be used for payouts, as they were [migrated to Recipients](/guides/payouts#migration-of-legacy-bank-accounts).
[Read payouts guide](/guides/payouts) **→**
### Attributes
**Possible values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY`, `RTGS_PAYMENT`
**Default value:** `STANDARD`
The mode defining how the payout request is sent:
* `STANDARD` – Sent via the relevant route for the currency and destination account (which determine the typical funds [processing times](/guides/payouts#cutoffs-and-processing-times)). If a request is received after the applicable cutoff, it is processed the next working day.
* `INSTANT_PAYMENT` – Sent via the SEPA Instant Credit Transfer scheme (funds processed within 10 seconds) with a fallback to `STANDARD` mode if any of the prerequisites are not met or if another issue occurs.
* `INSTANT_PAYMENT_ONLY` – Sent via the SEPA Instant Credit Transfer scheme (funds processed within 10 seconds) without a fallback. If an issue occurs, the wallet automatically refunded.
* `RTGS_PAYMENT` – Sent via the Eurozone’s [real-time gross settlement (RGTS)](/guides/payouts#real-time-gross-settlement-rtgs) scheme T2 (funds processed same working day) without a fallback. If the request is received after the applicable cutoff (16:15 CET), it is processed the next working day (from 07:00 CET).
**Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `INSTANT_PAYMENT_ONLY`, `RTGS_PAYMENT`
The value set for the `PayoutModeRequested` parameter when making the request.
**Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `RTGS_PAYMENT`, `PENDING_RESPONSE`
The mode defining how the payout request is sent:
* `STANDARD` – Sent via the relevant route for the currency and destination account (which determine the typical funds [processing times](/guides/payouts#cutoffs-and-processing-times)). If a request is received after the applicable cutoff, it is processed the next working day.
* `INSTANT_PAYMENT` – Sent via the SEPA Instant Credit Transfer scheme (funds processed within 10 seconds). If `ModeRequested` was `INSTANT_PAYMENT_ONLY` and a fallback occurs, the `ModeApplied` is `STANDARD`.
* `RTGS_PAYMENT` – Sent via the Eurozone’s [real-time gross settlement (RGTS)](/guides/payouts#real-time-gross-settlement-rtgs) scheme T2 (funds processed same working day) without a fallback. If the request is received after the applicable cutoff (16:15 CET), it is processed the next working day (from 07:00 CET).
* `PENDING_RESPONSE` – Temporary state to accommodate the possible latency between the creation of the request and the mode being applied in the case of instant payment and RGTS modes.
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.
Information about the payment reference provided for the payout. This object is returned `null` if not provided.
This object must be used to provide the reference of a [bank wire pay-in](/api-reference/bank-wire-payins/bank-wire-payin-object) or a [pay-in to virtual IBAN](/api-reference/virtual-accounts/external-instruction-bank-wire-payin-object), if the payout is being used to refund it.
**Allowed values:** `PAYIN_REFUND`
The reason for the reference being provided:
* `PAYIN_REFUND` – The payout serves to reimburse a pay-in.
**Allowed values:** The valid `Id` of a successful pay-in
The unique identifier associated with the reference, whose value corresponds to the `ReasonType`:
* `PAYIN_REFUND` – The `ReferenceId` value provided is the same as the `Id` of the initial pay-in being refunded.
### Related resources
Read more about payouts
Read about testing payouts
# View a Payout
Source: https://docs.mangopay.com/api-reference/payouts/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Information about the payment reference provided for the payout. This object is returned `null` if not provided.
This object must be used to provide the reference of a [bank wire pay-in](/api-reference/bank-wire-payins/bank-wire-payin-object) or a [pay-in to virtual IBAN](/api-reference/virtual-accounts/external-instruction-bank-wire-payin-object), if the payout is being used to refund it.
**Allowed values:** `PAYIN_REFUND`
The reason for the reference being provided:
* `PAYIN_REFUND` – The payout serves to reimburse a pay-in.
**Allowed values:** The valid `Id` of a successful pay-in
The unique identifier associated with the reference, whose value corresponds to the `ReasonType`:
* `PAYIN_REFUND` – The `ReferenceId` value provided is the same as the `Id` of the initial pay-in being refunded.
```json Standard
{
"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": "rec_01K09BK0T804BEGVP6GPKQXR3N",
"BankWireRef": "Example123"
}
```
```json Standard - GBP FPS
{
"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": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1707929729,
"Type": "PAYOUT",
"Nature": "REGULAR",
"CreditedWalletId": null,
"DebitedWalletId": "204079063",
"PaymentType": "BANK_WIRE",
"BankAccountId": "rec_01K09BK0T804BEGVP6GPKQXR3N",
"BankWireRef": "Created using the Mangopay API Postman collection"
}
```
```json PAYIN_REFUND
{
"Id": "po_b_01JCR32EMBXRWNWRN5KVW2DXE1",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1731680352,
"AuthorId": "user_m_01JCQYJNHFPENP1SKTCBYER0F8",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 24581
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 24581
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "CREATED",
"ResultCode": null,
"ResultMessage": null,
"ExecutionDate": null,
"Type": "PAYOUT",
"Nature": "REGULAR",
"CreditedWalletId": null,
"DebitedWalletId": "wlt_m_01J9KR4A7BH8KVE4PG6DTNS817",
"PaymentType": "BANK_WIRE",
"BankAccountId": "rec_01K09BK0T804BEGVP6GPKQXR3N",
"BankWireRef": "Example123",
"EndToEndId": "2da75c747abf4fbd83d6fd746d63fad4",
"PaymentRef": {
"ReasonType": "PAYIN_REFUND",
"ReferenceId": "payin_m_01JCR21X56KVHF7F5TVGYNT9G7"
}
}
```
```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 {
$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
Source: https://docs.mangopay.com/api-reference/payouts/view-payout-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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`, `RTGS_PAYMENT`
The value set for the `PayoutModeRequested` parameter when making the request.
**Returned values:** `STANDARD`, `INSTANT_PAYMENT`, `RTGS_PAYMENT`, `PENDING_RESPONSE`
The mode defining how the payout request is sent:
* `STANDARD` – Sent via the relevant route for the currency and destination account (which determine the typical funds [processing times](/guides/payouts#cutoffs-and-processing-times)). If a request is received after the applicable cutoff, it is processed the next working day.
* `INSTANT_PAYMENT` – Sent via the SEPA Instant Credit Transfer scheme (funds processed within 10 seconds). If `ModeRequested` was `INSTANT_PAYMENT_ONLY` and a fallback occurs, the `ModeApplied` is `STANDARD`.
* `RTGS_PAYMENT` – Sent via the Eurozone’s [real-time gross settlement (RGTS)](/guides/payouts#real-time-gross-settlement-rtgs) scheme T2 (funds processed same working day) without a fallback. If the request is received after the applicable cutoff (16:15 CET), it is processed the next working day (from 07:00 CET).
* `PENDING_RESPONSE` – Temporary state to accommodate the possible latency between the creation of the request and the mode being applied in the case of instant payment and RTGS modes.
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.
Information about the payment reference provided for the payout. This object is returned `null` if not provided.
This object must be used to provide the reference of a [bank wire pay-in](/api-reference/bank-wire-payins/bank-wire-payin-object) or a [pay-in to virtual IBAN](/api-reference/virtual-accounts/external-instruction-bank-wire-payin-object), if the payout is being used to refund it.
**Allowed values:** `PAYIN_REFUND`
The reason for the reference being provided:
* `PAYIN_REFUND` – The payout serves to reimburse a pay-in.
**Allowed values:** The valid `Id` of a successful pay-in
The unique identifier associated with the reference, whose value corresponds to the `ReasonType`:
* `PAYIN_REFUND` – The `ReferenceId` value provided is the same as the `Id` of the initial pay-in being refunded.
```json Standard
{
"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": "rec_01K09BK0T804BEGVP6GPKQXR3N",
"BankWireRef": "Example123",
"ModeRequested": null,
"ModeApplied": "STANDARD",
"FallbackReason": null,
"EndToEndId": "2c2184396eef4e5da90ab48a2feeb51d"
}
```
```json Standard - GBP FPS
{
"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": "rec_01K09BK0T804BEGVP6GPKQXR3N",
"BankWireRef": "Created using the Mangopay API Postman collection",
"ModeRequested": null,
"ModeApplied": "STANDARD",
"FallbackReason": null,
"EndToEndId": "58810b9cf8c745b2a45f17f5d06a151f"
}
```
```json SCT Inst (no fallback)
{
"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": "rec_01K09BK0T804BEGVP6GPKQXR3N",
"BankWireRef": "Example123",
"ModeRequested": "INSTANT_PAYMENT_ONLY",
"ModeApplied": "INSTANT_PAYMENT",
"FallbackReason": null,
"EndToEndId": "e8052ae4729f4abe9355442020f411a9"
}
```
```json SCT Inst (fallbacked)
{
"Id": "po_m_01HQMZZV376RRXYQGQAHZ4TN9K",
"Tag": null,
"CreationDate": 1709027880,
"AuthorId": "204069570",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 3387
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 3387
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1709028132,
"Type": "PAYOUT",
"Nature": "REGULAR",
"CreditedWalletId": null,
"DebitedWalletId": "3496428130",
"PaymentType": "BANK_WIRE",
"BankAccountId": "rec_01K09BK0T804BEGVP6GPKQXR3N",
"BankWireRef": "Example123",
"ModeRequested": "INSTANT_PAYMENT",
"ModeApplied": "STANDARD",
"FallbackReason": {
"Code": "001999",
"Message": "An unexpected issue prevented the operation from completing. Please retry or contact support."
},
"EndToEndId": "e8052ae4729f4abe9355442020f411a9",
"PaymentRef": null
}
```
```json RTGS
{
"Id": "po_m_01JMCS9ED9YTYZBJ3CH0GEMEDS",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1739890932,
"AuthorId": "user_m_01JKWYDT94N91CW572D7QNNYRP",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1135
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1022
},
"Fees": {
"Currency": "EUR",
"Amount": 113
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1739890964,
"Type": "PAYOUT",
"Nature": "REGULAR",
"CreditedWalletId": null,
"DebitedWalletId": "wlt_m_01JMAAKGM0VCBCQ5V4DB3EZPER",
"PaymentType": "BANK_WIRE",
"BankAccountId": "rec_01K09BK0T804BEGVP6GPKQXR3N",
"BankWireRef": "Example123",
"ModeRequested": "RTGS_PAYMENT",
"ModeApplied": "RTGS_PAYMENT",
"FallbackReason": null,
"EndToEndId": "a66784a74c7b4357bbe4f10abccbe411",
"PaymentRef": null
}
```
```json REST
// GET has no body parameters
```
```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
Source: https://docs.mangopay.com/api-reference/paypal/add-tracking-paypal-payin
PUT /v2.01/{ClientId}/payins/{PayInId}/trackings
You can use this call to add the tracking number and carrier for `LineItems` shipments, on both one-time and recurring PayPal pay-ins.
**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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `Shipping` parameter becomes required and its values are displayed to the end user, who is not able to modify them.
* `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.
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `Shipping` parameter becomes required and its values are displayed to the end user, who is not able to modify them.
* `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.
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
Source: https://docs.mangopay.com/api-reference/paypal/create-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.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `Shipping` parameter becomes required and its values are displayed to the end user, who is not able to modify them.
* `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 URL to which the user is returned after canceling the payment. If not provided, the Cancel button returns the user to the `RedirectURL`.
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: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `Shipping` parameter becomes required and its values are displayed to the end user, who is not able to modify them.
* `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.
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://docs.mangopay.com/please-ignore',
StatementDescriptor: "MGP24",
Shipping: {
FirstName: 'Alex',
LastName: 'Smith',
Address: {
AddressLine1: 'Rue des plantes',
AddressLine2: 'The Oasis',
City: 'Paris',
Region: 'Île-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);
}
}
```
# [Deprecated] Create a PayPal PayIn
Source: https://docs.mangopay.com/api-reference/paypal/create-paypal-payin-web
POST /v2.01/{ClientId}/payins/paypal/web
**Caution – Deprecated legacy integration**
This endpoint is the legacy integration of PayPal with Mangopay. If you are integrating PayPal for the first time, use the new [POST Create a PayPal PayIn](/api-reference/paypal/create-paypal-payin) endpoint.
Existing legacy integrations continue to be supported, but any integration enhancements are only developed on the new endpoint.
Platforms are strongly encouraged to move to the new integration to benefit from additional features, including:
* [Recurring payment flows](/guides/payment-methods/paypal#recurring-payments)
* Support for [tracking information](/guides/payment-methods/paypal#tracking-information) to sync evidence of shipped goods
* Additional API payload data such as shipping preference, platform references, and PayPal user information
### 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.
**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 shipping recipient and address for the transaction. If sent, this information overrides the user's PayPal shipping address. If not sent, the user's PayPal shipping address is used.
The full name of the shipping addressee.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 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.
The unique identifier of the debited wallet.
**Returned values:** `PAYPAL`
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.
**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 shipping recipient and address for the transaction. If sent, this information overrides the user's PayPal shipping address. If not sent, the user's PayPal shipping address is used.
The full name of the shipping addressee.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 email address registered on the PayPal account used to make the payment.
```json 200 - Created
{
"Id": "payin_m_01JJ6ZR0EG3WEFX06DWD672816",
"Tag": "Example of deprecated PayPal pay-in",
"CreationDate": 1737544865,
"AuthorId": "user_m_01JJ6ZQESERHQ3PYWZY5QFS1Z1",
"CreditedUserId": "user_m_01JJ6ZQESERHQ3PYWZY5QFS1Z1",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1980
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1980
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "CREATED",
"ResultCode": null,
"ResultMessage": null,
"ExecutionDate": null,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01JJ25YQA60D8FVZYEBMXG733F",
"DebitedWalletId": null,
"PaymentType": "PAYPAL",
"ExecutionType": "WEB",
"RedirectURL": "https://www.paypal.com/checkoutnow?token=1WB42231AB437123G",
"ReturnURL": "https://example.com?transactionId=payin_m_01JJ6ZR0EG3WEFX06DWD672816",
"Culture": "EN",
"ShippingAddress": {
"RecipientName": "Alex Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-france",
"PostalCode": "75003",
"Country": "FR"
}
},
"PaypalBuyerAccountEmail": null,
"StatementDescriptor": null
}
```
```json REST
{
"Tag": "Example of deprecated PayPal pay-in",
"AuthorId": "user_m_01JJ6ZQESERHQ3PYWZY5QFS1Z1",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1980
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"CreditedWalletId": "wlt_m_01JJ25YQA60D8FVZYEBMXG733F",
"ReturnURL": "https://example.com",
"Culture": "EN",
"ShippingAddress": {
"RecipientName": "Alex Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-france",
"PostalCode": "75003",
"Country": "FR"
}
},
"StatementDescriptor": null
}
```
# Create a Recurring PayPal PayIn (CIT)
Source: https://docs.mangopay.com/api-reference/paypal/create-recurring-paypal-payin-cit
POST /v2.01/{ClientId}/payins/payment-methods/paypal/recurring
[Read more about the Recurring PayPal PayIn object](/api-reference/paypal/recurring-paypal-payin-object) **→**
### Body parameters
The unique identifier of the recurring pay-in registration.
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: 255 characters
The URL to which the user is returned after the payment, whether the transaction is successful or not.
The URL to which the user is returned after canceling the payment. If not provided, the Cancel button returns the user to the `RedirectURL`.
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 values:** `Shipping` information of the registration object (if present).
Required if `ShippingPreference` is `SET_PROVIDED_ADDRESS` and the shipping information is not present in the recurring registration object.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `Shipping` parameter becomes required and its values are displayed to the end user, who is not able to modify them.
* `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.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
**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.
**Default values:** `Shipping` information of the recurring pay-in registration object (if present).
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `Shipping` parameter becomes required and its values are displayed to the end user, who is not able to modify them.
* `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.
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 recurring pay-in registration. On PayPal, this parameter is only returned if the pay-in is a recurring one.
```json 200
{
"Id": "wt_0c7bd61f-c3f0-49b7-94dc-b97bd650be3d",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1732630635,
"AuthorId": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 9900
},
"Fees": {
"Currency": "EUR",
"Amount": 100
},
"Status": "CREATED",
"ResultCode": null,
"ResultMessage": null,
"ExecutionDate": null,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01J9KR4A7BH8KVE4PG6DTNS817",
"CreditedUserId": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"PaymentType": "PAYPAL",
"ExecutionType": "WEB",
"ReturnURL": "http://example.com?transactionId=wt_0c7bd61f-c3f0-49b7-94dc-b97bd650be3d",
"RedirectURL": "https://www.sandbox.paypal.com/agreements/approve?approval_session_id=8C820771K64683846",
"StatementDescriptor": "Example123",
"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": "Product A subscription package",
"Quantity": 1,
"UnitAmount": 4000,
"TaxAmount": 1000,
"Description": "ID of Seller 1",
"Category": "PHYSICAL_GOODS"
},
{
"Name": "Product B subscription package",
"Quantity": 1,
"UnitAmount": 4000,
"TaxAmount": 1000,
"Description": "ID of Seller 2",
"Category": "PHYSICAL_GOODS"
}
],
"Culture": null,
"ShippingPreference": "SET_PROVIDED_ADDRESS",
"PaypalBuyerAccountEmail": null,
"Reference": "abcd-efgh-ijkl",
"Trackings": null,
"CancelURL": "http://example.net?transactionId=wt_0c7bd61f-c3f0-49b7-94dc-b97bd650be3d",
"PaypalPayerID": null,
"BuyerCountry": null,
"BuyerFirstname": null,
"BuyerLastname": null,
"BuyerPhone": null,
"PaypalOrderID": null,
"RecurringPayinRegistrationId": "recpayinreg_wt_c1fb7e3f-8204-4427-9251-df886fbb4e42"
}
```
```json REST
{
"ReturnURL": "http://example.com",
"CancelURL" : "http://example.net",
"LineItems": [
{
"Name": "Running shoes",
"Quantity": 1,
"UnitAmount": 4000,
"TaxAmount": 1000,
"Description": "ID of Seller 1",
"Category": "PHYSICAL_GOODS"
},
{
"Name": "Walking shoes",
"Quantity": 1,
"UnitAmount": 4000,
"TaxAmount": 1000,
"Description": "ID of Seller 2",
"Category": "PHYSICAL_GOODS"
}
],
"Tag": "Created using the Mangopay API Postman collection",
"RecurringPayinRegistrationId": "recpayinreg_wt_be7e55b9-8b0c-4a87-a815-00e55748c723",
"ShippingPreference": "SET_PROVIDED_ADDRESS",
"Reference": "abcd-efgh-ijkl",
"StatementDescriptor" : "Example123"
}
```
# Create a Recurring PayPal PayIn (MIT)
Source: https://docs.mangopay.com/api-reference/paypal/create-recurring-paypal-payin-mit
POST /v2.01/{ClientId}/payins/payment-methods/paypal/recurring
[Read more about the Recurring PayPal PayIn object](/api-reference/paypal/recurring-paypal-payin-object) **→**
### Body parameters
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
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: 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.
**Default values:** `Shipping` information of the registration object (if present).
Required if `ShippingPreference` is `SET_PROVIDED_ADDRESS` and the shipping information is not present in the recurring registration object.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `Shipping` parameter becomes required and its values are displayed to the end user, who is not able to modify them.
* `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.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
**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 values:** `Shipping` information of the recurring pay-in registration object (if present).
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The unique identifier of the recurring pay-in registration. On PayPal, this parameter is only returned if the pay-in is a recurring one.
```json 200
{
"Id": "wt_70621ad8-4ea8-4ea5-9893-b4b5ebb1da17",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1731580317,
"AuthorId": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 4500
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 4500
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1731580323,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01J9KR4A7BH8KVE4PG6DTNS817",
"CreditedUserId": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"PaymentType": "PAYPAL",
"ExecutionType": "WEB",
"ReturnURL": "http://example.com?transactionId=wt_70621ad8-4ea8-4ea5-9893-b4b5ebb1da17",
"StatementDescriptor": "Example123",
"Shipping": {
"FirstName": "Leland",
"LastName": "Baumbach",
"Address": {
"AddressLine1": "65247 Hand Walk",
"AddressLine2": "Mraz Neck",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"LineItems": [
{
"Name": "Product C",
"Quantity": 1,
"UnitAmount": 1500,
"TaxAmount": 0,
"Description": "ID of Seller 1",
"Category": "PHYSICAL_GOODS"
},
{
"Name": "Product D",
"Quantity": 1,
"UnitAmount": 3000,
"TaxAmount": 0,
"Description": "ID of Seller 2",
"Category": "PHYSICAL_GOODS"
}
],
"Culture": "FR",
"ShippingPreference": "SET_PROVIDED_ADDRESS",
"PaypalBuyerAccountEmail": "sb-xej7a6945106@business.example.com",
"Reference": "abcd-efgh-ijkl",
"Trackings": null,
"CancelURL": "http://example.net?transactionId=wt_70621ad8-4ea8-4ea5-9893-b4b5ebb1da17",
"PaypalPayerID": "RVN3GJJS2KGV4",
"BuyerCountry": "FR",
"BuyerFirstname": "John",
"BuyerLastname": "Doe",
"BuyerPhone": null,
"PaypalOrderID": "9KH88598NK328901B",
"RecurringPayinRegistrationId": "recpayinreg_wt_c1fb7e3f-8204-4427-9251-df886fbb4e42"
}
```
```json REST
{
"DebitedFunds": {
"Currency": "EUR",
"Amount": 4500
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"ReturnURL": "http://example.com",
"CancelURL" : "http://example.net",
"LineItems": [
{
"Name": "Product C",
"Quantity": 1,
"UnitAmount": 1500,
"TaxAmount": 0,
"Description": "ID of Seller 1",
"Category": "PHYSICAL_GOODS"
},
{
"Name": "Product D",
"Quantity": 1,
"UnitAmount": 3000,
"TaxAmount": 0,
"Description": "ID of Seller 2",
"Category": "PHYSICAL_GOODS"
}
],
"Tag": "Created using the Mangopay API Postman collection",
"RecurringPayinRegistrationId" : "recpayinreg_wt_be7e55b9-8b0c-4a87-a815-00e55748c723",
"ShippingPreference": "SET_PROVIDED_ADDRESS",
"Reference": "abcd-efgh-ijkl",
"StatementDescriptor" : "Example123"
}
```
# The PayPal PayIn object
Source: https://docs.mangopay.com/api-reference/paypal/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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `Shipping` parameter becomes required and its values are displayed to the end user, who is not able to modify them.
* `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.
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.
The unique identifier of the recurring pay-in registration. On PayPal, this parameter is only returned if the pay-in is a recurring one.
### Related resources
Learn more about PayPal
# The Recurring PayPal PayIn object
Source: https://docs.mangopay.com/api-reference/paypal/recurring-paypal-payin-object
### Description
The Recurring PayPal PayIn object allows platforms to process recurring payments with PayPal.
There are two types of recurring pay-ins:
* Customer-initiated transaction (CIT) – First pay-in of the series, which requires the user to authenticate.
* Merchant-initiated transaction (MIT) – All the pay-ins occurring after a successful CIT, which are executed in the absence of the user.
### Attributes
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
**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.
**Default values:** `Shipping` information of the recurring pay-in registration object (if present).
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `Shipping` parameter becomes required and its values are displayed to the end user, who is not able to modify them.
* `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.
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 recurring pay-in registration.
### Related resources
Learn more about recurring card payments
# View a PayIn (PayPal)
Source: https://docs.mangopay.com/api-reference/paypal/view-payin-paypal
GET /v2.01/{ClientId}/payins/{PayInId}
For PayPal, the pay-in object viewable on this endpoint is the same for one-time and recurring except that `RecurringPayinRegistrationId` is only returned for recurring pay-ins.
**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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `Shipping` parameter becomes required and its values are displayed to the end user, who is not able to modify them.
* `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.
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 recurring pay-in registration. On PayPal, this parameter is only returned if the pay-in is a recurring one.
```json 200 - One-time
{
"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,
"CancelURL": null,
"PaypalPayerID": null,
"BuyerCountry": null,
"BuyerFirstname": null,
"BuyerLastname": null,
"BuyerPhone": null,
"PaypalOrderID": "0V2469407F242402P"
}
```
```json 200 - Recurring
{
"Id": "wt_70621ad8-4ea8-4ea5-9893-b4b5ebb1da17",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1731580317,
"AuthorId": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 4500
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 4500
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1731580323,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01J9KR4A7BH8KVE4PG6DTNS817",
"CreditedUserId": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"PaymentType": "PAYPAL",
"ExecutionType": "WEB",
"ReturnURL": "http://example.com?transactionId=wt_70621ad8-4ea8-4ea5-9893-b4b5ebb1da17",
"StatementDescriptor": "Example123",
"Shipping": {
"FirstName": "Leland",
"LastName": "Baumbach",
"Address": {
"AddressLine1": "65247 Hand Walk",
"AddressLine2": "Mraz Neck",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"LineItems": [
{
"Name": "Product C",
"Quantity": 1,
"UnitAmount": 1500,
"TaxAmount": 0,
"Description": "ID of Seller 1",
"Category": "PHYSICAL_GOODS"
},
{
"Name": "Product D",
"Quantity": 1,
"UnitAmount": 3000,
"TaxAmount": 0,
"Description": "ID of Seller 2",
"Category": "PHYSICAL_GOODS"
}
],
"Culture": "FR",
"ShippingPreference": "SET_PROVIDED_ADDRESS",
"PaypalBuyerAccountEmail": "sb-xej7a6945106@business.example.com",
"Reference": "abcd-efgh-ijkl",
"Trackings": null,
"CancelURL": "http://google.com?transactionId=wt_70621ad8-4ea8-4ea5-9893-b4b5ebb1da17",
"PaypalPayerID": "RVN3GJJS2KGV4",
"BuyerCountry": "FR",
"BuyerFirstname": "John",
"BuyerLastname": "Doe",
"BuyerPhone": null,
"PaypalOrderID": "9KH88598NK328901B",
"RecurringPayinRegistrationId": "recpayinreg_wt_c1fb7e3f-8204-4427-9251-df886fbb4e42"
}
```
```php PHP
Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$payinId = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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
Source: https://docs.mangopay.com/api-reference/permission-groups/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/permission-groups/list-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
Source: https://docs.mangopay.com/api-reference/permission-groups/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
Source: https://docs.mangopay.com/api-reference/permission-groups/update-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/permission-groups/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/preauthorizations/cancel-validate-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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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"
}
```
```php PHP
Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$preauthId = 'preauth_m_01JH0PDQS1WT444DJE8VB7F848';
$preauth = $api->CardPreAuthorizations->Get($preauthId);
$preauth->PaymentStatus = CardPreAuthorizationPaymentStatus::Canceled;
// $preauth->PaymentStatus = CardPreAuthorizationPaymentStatus::Validated;
$cancelPreauth = $api->CardPreAuthorizations->Update($preauth);
// $validatePreauth = $api->CardPreAuthorizations->Update($preauth);
print_r($cancelPreauth);
} 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',
})
// 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
Source: https://docs.mangopay.com/api-reference/preauthorizations/create-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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Required if `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
**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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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://docs.mangopay.com/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://docs.mangopay.com/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 = 'user_m_01HSDQD2RPPQ8NMM36EDGYBMEY';
$cardPreauthorization->DebitedFunds = new \MangoPay\Money();
$cardPreauthorization->DebitedFunds->Currency = 'EUR';
$cardPreauthorization->DebitedFunds->Amount = 1000;
$cardPreauthorization->SecureMode = 'DEFAULT';
$cardPreauthorization->CardId = 'card_m_01HW8BJ2MS5PBV5EB1ZQG5E8T9';
$cardPreauthorization->SecureModeReturnURL = 'https://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/preauthorizations/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 {
$userId = 'user_m_01HQK25M6KVHKDV0S36JY9NRKR';
$cardId = 'card_m_01J420XC7KAW655XPP12SC28HS';
$walletId = 'wlt_m_01HQT6422EER2N7FPRXWTSDCSV';
$preauthId = 'preauth_m_01JH3CJ75WGC9FMST9RH7SKBSC';
$preauthPayIn = new \MangoPay\PayIn();
$preauthPayIn->AuthorId = $userId;
$preauthPayIn->CreditedWalletId = $walletId;
$preauthPayIn->DebitedFunds = new Money();
$preauthPayIn->DebitedFunds->Amount = 1000;
$preauthPayIn->DebitedFunds->Currency = 'EUR';
$preauthPayIn->Fees = new Money();
$preauthPayIn->Fees->Amount = 0;
$preauthPayIn->Fees->Currency = 'EUR';
$preauthPayIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsPreAuthorized();
$preauthPayIn->PaymentDetails->PreauthorizationId = $preauthId;
$preauthPayIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect();
$preauthPayIn->ExecutionDetails->SecureModeReturnURL = 'https://docs.mangopay.com/please-ignore';
$preauthPayIn->ExecutionDetails->Culture = 'FR';
$createPayIn = $api->PayIns->Create($preauthPayIn);
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 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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/preauthorizations/list-preauthorizations-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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 {
$cardId = 'card_m_01J420XC7KAW655XPP12SC28HS';
$response = $api->Cards->GetPreAuthorizations($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 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
Source: https://docs.mangopay.com/api-reference/preauthorizations/list-preauthorizations-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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 = 'user_m_01HQK25M6KVHKDV0S36JY9NRKR';
$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
Source: https://docs.mangopay.com/api-reference/preauthorizations/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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/preauthorizations/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)
Source: https://docs.mangopay.com/api-reference/preauthorizations/view-payin-preauthorized
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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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
Source: https://docs.mangopay.com/api-reference/preauthorizations/view-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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
**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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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 {
$preauthId = 'preauth_m_01JH0PDQS1WT444DJE8VB7F848';
$response = $api->CardPreAuthorizations->Get($preauthId);
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
Source: https://docs.mangopay.com/api-reference/quotes/create-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 `DebitedFunds.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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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"
}
```
```php PHP
Config->ClientId = 'client-id';
$api->Config->ClientPassword = 'api-key';
$api->Config->TemporaryFolder = '../tmp/';
$api->Config->DebugMode = false;
try {
$Quote = new \MangoPay\ConversionQuote();
$Quote->DebitedFunds = new Money();
$Quote->DebitedFunds->Currency = "GBP";
$Quote->CreditedFunds = new Money();
$Quote->CreditedFunds->Currency = "EUR";
$Quote->CreditedFunds->Amount = 10;
$Quote->Duration = 300;
$Quote->Tag = "Created using the Mangopay PHP SDK";
$response = $api->Conversions->CreateConversionQuote($Quote);
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: "client-id",
clientApiKey: "api-key"
})
let myQuote = {
DebitedFunds: {
Currency: 'EUR',
Amount: 1000,
},
CreditedFunds: {
Currency: 'USD',
Amount: null
},
Fees: {
Currency: 'EUR',
Amount: 50,
},
Duration: 300,
Tag: "Created using the Mangopay NodeJS SDK"
}
const createQuote = async (quote) => {
return await mangopay.Conversions.createQuote(quote)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
createQuote(myQuote)
```
```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)
Source: https://docs.mangopay.com/api-reference/quotes/quote-object
### 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
Source: https://docs.mangopay.com/api-reference/quotes/view-quote
GET /v2.01/{ClientId}/conversions/quote/{QuoteId}
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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"
}
```
```php PHP
Config->ClientId = 'client-id';
$api->Config->ClientPassword = 'api-key';
$api->Config->TemporaryFolder = '../tmp/';
$api->Config->DebugMode = false;
try {
$response = $api->Conversions->GetConversionQuote("cvrquote_01JE9135DQRED1CX6FNXDNVSDD");
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
```
```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 Recipient
Source: https://docs.mangopay.com/api-reference/recipients/create-recipient
POST /v2.01/{ClientId}/users/{UserId}/recipients
Register a bank account for local or international payouts
**Caution – Fetch schema and validate data before creation**
Before using this endpoint to register a Recipient for a user, for the given currency, payout method, and recipient type combination, always:
* Fetch the schema dynamically using [GET View the schema for a Recipient](/api-reference/recipients/view-recipient-schema)
* Check that the user's data is valid using [POST Validate data for a Recipient](/api-reference/recipients/validate-recipient-data)
**Note – SCA triggered by this endpoint**
Registering a bank account as a Recipient always requires the user to authenticate using SCA on a Mangopay-hosted webpage (read more about [SCA on recipients](/guides/sca/recipients)).
To let the user complete the SCA session, your platform needs to retrieve the returned `PendingUserAction.RedirectUrl`, add an encoded `returnUrl` query parameter, and redirect the user. Read more about how to redirect them in the [SCA session](/guides/sca/session) guide.
Recipient creation is asynchronous, meaning that this endpoint returns the `Status` as `PENDING` regardless of whether SCA is required (because `RecipientScope` is `OWNER`) or not. In all cases, your integration should rely on the `RECIPIENT_ACTIVE` [webhook](/webhooks/event-types#recipients) to know when the recipient is `ACTIVE`.
### Path parameters
The unique identifier of the user.
### Body parameters
Length: 1–50; cannot contain: `&,'/` (pattern:`^(?!.*[&,'/]).{1,50}$`)
A user-friendly name to identify the account. This value cannot be changed once the recipient is created.
**Possible values:** `InternationalBankTransfer`, `LocalBankTransfer`
The payout method of the recipient:
* `InternationalBankTransfer` – A bank wire transfer sent via SWIFT, requiring the `InternationalBankTransfer` property.
* `LocalBankTransfer` – A bank wire transfer sent via local routes, requiring the `LocalBankTransfer` property.
**Possible values:** `Individual`, `Business`
The recipient type:
* `Individual` – An account held by a natural person, requiring the `IndividualRecipient` property.
* `Business` – An account held by a legal entity, requiring the `BusinessRecipient` property.
**Possible values:** `AED`, `AUD`, `CAD`, `CHF`, `CNH`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HUF`, `ILS`, `JPY`, `MXN`, `NOK`, `NZD`, `PLN`, `RON`, `SAR`, `SEK`, `SGD`, `TRY`, `USD`, `ZAR`
The currency of the recipient.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The destination country of the payout method.
**Possible values:** `PAYIN`, `PAYOUT`
**Default value:** `PAYOUT`
The scope of the recipient:
* `PAYOUT` – Usable for payouts and in pay-in use cases. A `PAYOUT` recipient can only be created by a user with the `UserCategory` `OWNER` and requires SCA. You need to use the returned `PendingUserAction.RedirectUrl` value, adding your encoded `returnUrl` as a query parameter, to redirect the user to the [hosted SCA session](/guides/sca/session) so they can complete the necessary steps.
* `PAYIN` - Not usable for payouts but only usable for pay-in use cases, such as direct debit and refunds using payouts. A `PAYIN` recipient can be created by a user with the `UserCategory` `PAYER` or `OWNER`, and does not require SCA.
Max. length: 255 (pattern: `^.{0,255}$`)
Custom data that you can add to this object. This value cannot be changed once the recipient is created.
The account holder if the `RecipientType` is `Individual`.
Only one of `IndividualRecipient` or `BusinessRecipient` is required.
Length: 1–255; cannot contain: `()&,.:_/` (Pattern: `^(?!.*[()&,.:_/]).{1,255}$`)
The first name of the individual account holder.
Length: 1–255; cannot contain: `()&,.:_/` (Pattern: `^(?!.*[()&,.:_/]).{1,255}$`)
The last name of the individual account holder.
Information about the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The first line of the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The second line of the address.
Length: 1-80; cannot contain: `&,.:_'` (pattern: `^(?!.*[&,.:_']).{1,80}$`)
The city of the address.
Length: 1–10; cannot contain: `&,.:_'-/` (pattern: `^(?!.*[&,.:_'-/]).{1,50}$`)
The region of the address.
Length: 1–10; cannot contain: `()&,.:_'/` (pattern: `^(?!.*[()&,.:_'/]).{1,10}$`)
The postal code of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The account holder if the `RecipientType` is `Business`.
Only one of `IndividualRecipient` or `BusinessRecipient` is required.
Length: 1–255; cannot contain: `(),.:/` (Pattern: `^(?!.*[(),.:/]).{1,255}$`)
The name of the business account holder.
Information about the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The first line of the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The second line of the address.
Length: 1-80; cannot contain: `&,.:_'` (pattern: `^(?!.*[&,.:_']).{1,80}$`)
The city of the address.
Length: 1–10; cannot contain: `&,.:_'-/` (pattern: `^(?!.*[&,.:_'-/]).{1,50}$`)
The region of the address.
Length: 1–10; cannot contain: `()&,.:_'/` (pattern: `^(?!.*[()&,.:_'/]).{1,10}$`)
The postal code of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The account details if `PayoutMethodType` is `InternationalBankTransfer`.
Only one of `InternationalBankTransfer` or `LocalBankTransfer` is required.
The `InternationalBankTransfer` depends on the `Currency` and `Country`.
Format: The format returned by the [schema](/api-reference/recipients/view-recipient-schema) endpoint depending on the `Currency` and `Country`
The account number of the account. For IBAN countries, the `AccountNumber` format is the local IBAN one. For other countries, the format depends on the `Country` and should be retrieved from the [GET View the schema for a Recipient](/api-reference/recipients/view-recipient-schema) endpoint.
Format: The format returned by the [schema](/api-reference/recipients/view-recipient-schema) endpoint depending on the `Currency` and `Country`
The BIC of the account.
For countries that don't use IBAN, the `BIC` is required. For countries that use IBAN, this field is ignored because the BIC generated automatically from the IBAN and returned in the response.
The account details if `PayoutMethodType` is `LocalBankTransfer`, depending on the `Currency`. One of:
{/*
Format: 6 digits (pattern: `^\\d{6}$`)
The branch-state-branch number of the Australian account.
Format: 6–10 digits (pattern: `^\\d{6,10}$`)
The account number of the Australian account.
*/}
Format: 7–35 digits (pattern: `^\\d{7,35}$`)
The account number of the Canadian account.
Format: 3 digits (pattern: `^\\d{3}$`)
The institution number of the Canadian account.
Format: 5 digits (pattern: `^\\d{5}$`)
The branch code of the Canadian account.
Length: 1–50
The bank name of the Canadian account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: 8 digits (pattern: `^\\d{8}$`)
The account number of the UK account.
Format: 6 digits (pattern: `^\\d{6}$`)
The sort code of the UK account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Hong Kong account.
Format: 1–50 alphanumeric characters (pattern: `^[0-9a-zA-Z]{1,50}$`)
The account number of the Hong Kong account.
Format: 3 alphanumeric characters (pattern: `^[0-9a-zA-Z]{3}$`)
The branch code of the Hong Kong account.
*/}
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Mexican account.
Format: 18 digits (pattern: `^\\d{18}$`)
The CLABE of the Mexican account.
*/}
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Singaporean account.
Format: 6–34 alphanumeric characters (pattern: `^[0-9a-zA-Z]{6,34}$`)
The account number of the Singaporean account.
*/}
Format: 8–12 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8,12}$`)
The account number of the US account.
Format: 9 digits (pattern: `^\\d{9}$`)
The ABA routing number of the US account.
Format: 8-12 digits then `FFC` then a space then a sting of characters up to 140 total length (pattern: `^(?=.{0,140}$)[0-9]{8,12}/FFC [0-9a-zA-Z/\\-?:().,'+ ]+$`)
FFC transfer information for the US account.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
**Possible values:** `PENDING`, `CANCELED`, `ACTIVE`, `DEACTIVATED`
The status of the recipient:
* `PENDING` – For `PAYOUT` scope recipients, the user must complete SCA before the recipient can become `ACTIVE`. For `PAYIN` scope recipients, the recipient creation is in progress.
* `CANCELED` – SCA was not successfully completed and the recipient creation request was canceled. To retry, create another recipient to retrieve another `PendingUserAction.RedirectUrl`. The `CANCELED` status does not apply if `RecipientScope` is `PAYIN`.
* `ACTIVE` – Recipient creation was successful (including SCA if `RecipientScope` is `PAYOUT`) and the recipient is ready to be used for payouts .
* `DEACTIVATED` – The recipient has been permanently deactivated and can no longer be used.
The date and time at which the object was created.
Length: 1–50; cannot contain: `&,'/` (pattern:`^(?!.*[&,'/]).{1,50}$`)
A user-friendly name to identify the account. This value cannot be changed once the recipient is created.
**Possible values:** `InternationalBankTransfer`, `LocalBankTransfer`
The payout method of the recipient.
* `InternationalBankTransfer` – A bank wire transfer sent via SWIFT, requiring the `InternationalBankTransfer` property.
* `LocalBankTransfer` – A bank wire transfer sent via local routes, requiring the `LocalBankTransfer` property.
**Possible values:** `Individual`, `Business`
The recipient type:
* `Individual` – An account held by a natural person, requiring the `IndividualRecipient` property.
* `Business` – An account held by a legal entity, requiring the `BusinessRecipient` property.
**Possible values:** `AED`, `AUD`, `CAD`, `CHF`, `CNH`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HUF`, `ILS`, `JPY`, `MXN`, `NOK`, `NZD`, `PLN`, `RON`, `SAR`, `SEK`, `SGD`, `TRY`, `USD`, `ZAR`
The currency of the recipient.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The destination country of the payout method.
The unique identifier of the user.
**Possible values:** `PAYIN`, `PAYOUT`
**Default value:** `PAYOUT`
The scope of the recipient:
* `PAYOUT` – Usable for payouts and in pay-in use cases. A `PAYOUT` recipient can only be created by a user with the `UserCategory` `OWNER` and requires SCA. You need to use the returned `PendingUserAction.RedirectUrl` value, adding your encoded `returnUrl` as a query parameter, to redirect the user to the [hosted SCA session](/guides/sca/session) so they can complete the necessary steps.
* `PAYIN` - Not usable for payouts but only usable for pay-in use cases, such as direct debit and refunds using payouts. A `PAYIN` recipient can be created by a user with the `UserCategory` `PAYER` or `OWNER`, and does not require SCA.
Both `PAYIN` and `PAYOUT` scopes can be created for either `InternationalBankTransfer` or `LocalBankTransfer`, and for either `IndividualRecipient` or `BusinessRecipient`, and for any `Currency`.
Max. length: 255 (pattern: `^.{0,255}$`)
Custom data that you can add to this object. This value cannot be changed once the recipient is created.
The unique identifier of the user.
**Possible values:** `PAYIN`, `PAYOUT`
**Default value:** `PAYOUT`
The scope of the recipient:
* `PAYOUT` – Usable for payouts and in pay-in use cases. A `PAYOUT` recipient can only be created by a user with the `UserCategory` `OWNER` and requires SCA. You need to use the returned `PendingUserAction.RedirectUrl` value, adding your encoded `returnUrl` as a query parameter, to redirect the user to the [hosted SCA session](/guides/sca/session) so they can complete the necessary steps.
* `PAYIN` - Not usable for payouts but only usable for pay-in use cases, such as direct debit and refunds using payouts. A `PAYIN` recipient can be created by a user with the `UserCategory` `PAYER` or `OWNER`, and does not require SCA.
Both `PAYIN` and `PAYOUT` scopes can be created for either `InternationalBankTransfer` or `LocalBankTransfer`, and for either `IndividualRecipient` or `BusinessRecipient`, and for any `Currency`.
Max. length: 255 (pattern: `^.{0,255}$`)
Custom data that you can add to this object. This value cannot be changed once the recipient is created.
The account holder if the `RecipientType` is `Individual`.
Length: 1–255; cannot contain: `()&,.:_/` (Pattern: `^(?!.*[()&,.:_/]).{1,255}$`)
The first name of the individual account holder.
Length: 1–255; cannot contain: `()&,.:_/` (Pattern: `^(?!.*[()&,.:_/]).{1,255}$`)
The last name of the individual account holder.
Information about the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The first line of the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The second line of the address. Parameter only returned if sent.
Length: 1-80; cannot contain: `&,.:_'` (pattern: `^(?!.*[&,.:_']).{1,80}$`)
The city of the address.
Length: 1–10; cannot contain: `&,.:_'-/` (pattern: `^(?!.*[&,.:_'-/]).{1,50}$`)
The region of the address. Parameter only returned if sent.
Length: 1–10; cannot contain: `()&,.:_'/` (pattern: `^(?!.*[()&,.:_'/]).{1,10}$`)
The postal code of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The account holder if the `RecipientType` is `Business`.
Length: 1–255; cannot contain: `(),.:/` (Pattern: `^(?!.*[(),.:/]).{1,255}$`)
The name of the business account holder.
Information about the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The first line of the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The second line of the address. Parameter only returned if sent.
Length: 1-80; cannot contain: `&,.:_'` (pattern: `^(?!.*[&,.:_']).{1,80}$`)
The city of the address.
Length: 1–10; cannot contain: `&,.:_'-/` (pattern: `^(?!.*[&,.:_'-/]).{1,50}$`)
The region of the address. Parameter only returned if sent.
Length: 1–10; cannot contain: `()&,.:_'/` (pattern: `^(?!.*[()&,.:_'/]).{1,10}$`)
The postal code of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The account details if `PayoutMethodType` is `InternationalBankTransfer`.
The account number of the account.
The BIC of the account. For IBAN countries, the returned `BIC` is generated from the IBAN.
The account details if `PayoutMethodType` is `LocalBankTransfer`, depending on the `Currency`. One of:
{/*
Format: 6 digits (pattern: `^\\d{6}$`)
The branch-state-branch number of the Australian account.
Format: 6–10 digits (pattern: `^\\d{6,10}$`)
The account number of the Australian account.
*/}
Format: 7–35 digits (pattern: `^\\d{7,35}$`)
The account number of the Canadian account.
Format: 3 digits (pattern: `^\\d{3}$`)
The institution number of the Canadian account.
Format: 5 digits (pattern: `^\\d{5}$`)
The branch code of the Canadian account.
Length: 1–50
The bank name of the Canadian account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: 8 digits (pattern: `^\\d{8}$`)
The account number of the UK account.
Format: 6 digits (pattern: `^\\d{6}$`)
The sort code of the UK account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Hong Kong account.
Format: 1–50 alphanumeric characters (pattern: `^[0-9a-zA-Z]{1,50}$`)
The account number of the Hong Kong account.
Format: 3 alphanumeric characters (pattern: `^[0-9a-zA-Z]{3}$`)
The branch code of the Hong Kong account.
*/}
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Mexican account.
Format: 18 digits (pattern: `^\\d{18}$`)
The CLABE of the Mexican account.
*/}
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Singaporean account.
Format: 6–34 alphanumeric characters (pattern: `^[0-9a-zA-Z]{6,34}$`)
The account number of the Singaporean account.
*/}
Format: 8–12 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8,12}$`)
The account number of the US account.
Format: 9 digits (pattern: `^\\d{9}$`)
The ABA routing number of the US account.
Format: 8-12 digits then `FFC` then a space then a sting of characters up to 140 total length (pattern: `^(?=.{0,140}$)[0-9]{8,12}/FFC [0-9a-zA-Z/\\-?:().,'+ ]+$`)
FFC transfer information for the US account.
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
Example 400 error:
```json
{
"Id": "a1f3db88-9df5-49a8-b73c-d578ffff6e89",
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Date": 1739182373,
"Errors": {
"IndividualRecipient.Address.Region": "INVALID_FORMAT",
"LocalBankTransfer.GBP.AccountNumber": "LENGTH_LESS_THAN_MIN"
}
}
```
The following error values may be returned:
* `REQUIRED` – Value is required but not present in the request.
* `LENGTH_MORE_THAN_MAX` – String length is greater than required length.
* `LENGTH_LESS_THAN_MIN` – String length is less than required length.
* `INVALID_FORMAT` – Value doe not match expected pattern.
* `NOT_IN_ALLOWED_VALUES` – Value is not a valid `PayoutMethodType`, `RecipientType`, or `Currency`.
* `UNSUPPORTED_CURRENCY` – Currency is a valid ISO 4217 format but not yet supported for Recipients.
* `UNSUPPORTED_PAYOUT_METHOD_FOR_CURRENCY` – Payout method is not supported for the `Currency` and `Country` combination.
* `CLIENT_NOT_FOUND` – `ClientId` making the request does not exist.
* `USER_NOT_FOUND` – `UserId` for which the request is made does not exist.
* `INVALID_SORT_CODE` – Sort code for this account is not valid.
* `INVALID_ACCOUNT_NUMBER` – Account number is not valid.
* `INVALID_IBAN` – IBAN is not valid.
* `INVALID_BIC` – BIC is not valid.
* `UNSUPPORTED_IBAN` – IBAN is valid but not supported:
* If `LocalBankTransfer`, the IBAN country is not part of SEPA and the local currency is not EUR.
* If `InternationalBankTransfer`, the IBAN country is not GB or is not part of SEPA and local currency is not EUR.
* `INVALID_ACCOUNT_NUMBER_AND_SORT_CODE_COMBINATION` – GB sort code and account number combination is not valid.
```json 201 - EUR, international, business, PAYOUT
{
"Id": "rec_01JRADYFJYPFM10XPQ8VFWW947",
"Status": "PENDING",
"CreationDate": 1744106896,
"DisplayName": "Alex Smith EUR international payout account",
"PayoutMethodType": "InternationalBankTransfer",
"RecipientType": "Business",
"Currency": "EUR",
"Country": "FR",
"UserId": "user_m_01JRADX7YD0060N5VAA0XPMM54",
"RecipientScope": "PAYOUT",
"Tag": "Created using the Mangopay API Postman collection",
"BusinessRecipient": {
"BusinessName": "Alex Smith Consulting",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
},
"InternationalBankTransfer": {
"AccountNumber": "FR7630004000031234567890143",
"BIC": "BNPAFRPPXXX"
},
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=sca_019614df3f3b7b08847111a76d9f9924"
}
}
```
```json 201 - GBP, local, individual, PAYIN
{
"Id": "rec_01JRADRZMVZ12VXYV1A3DDX6JM",
"Status": "PENDING",
"CreationDate": 1744106716,
"DisplayName": "Alex Smith GBP local pay-in account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "GBP",
"Country": "GB",
"UserId": "user_m_01JRADQMWEKV9X7C683MYQMQCN",
"RecipientScope": "PAYIN",
"Tag": "Created using the Mangopay API Postman collection",
"IndividualRecipient": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "10 Kingsway",
"City": "London",
"PostalCode": "WC2B 6LH",
"Country": "GB"
}
},
"LocalBankTransfer": {
"GBP": {
"SortCode": "200000",
"AccountNumber": "55779911"
}
}
}
```
```json REST - EUR, international, business, PAYOUT
{
"DisplayName": "Alex Smith EUR IBAN account",
"Tag": "Created using the Mangopay API Postman collection",
"PayoutMethodType": "InternationalBankTransfer",
"Currency": "EUR",
"Country": "FR",
"RecipientType": "Business",
"BusinessRecipient": {
"BusinessName": "Alex Smith Consulting",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
},
"InternationalBankTransfer": {
"AccountNumber": "FR7630004000031234567890143"
}
}
```
```json REST - GBP, local, individual, PAYIN
{
"DisplayName": "Alex Smith GBP local pay-in account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "GBP",
"Tag": "Created using the Mangopay API Postman collection",
"RecipientScope": "PAYIN",
"IndividualRecipient": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "10 Kingsway",
"City": "London",
"PostalCode": "WC2B 6LH",
"Country": "GB"
}
},
"LocalBankTransfer": {
"GBP": {
"SortCode": "200000",
"AccountNumber": "55779911"
}
}
}
```
# Deactivate a Recipient
Source: https://docs.mangopay.com/api-reference/recipients/deactivate-recipient
PUT /v2.01/{ClientId}/recipients/{RecipientId}
Permanently disable a Recipient
### Path parameters
The unique identifier of the Recipient.
### Body parameters
**Allowed values:** `DEACTIVATED`
The status of the recipient:
* `DEACTIVATED` – Value to send to permanently disable the recipient so it can no longer be used. The Recipient must be `ACTIVE` to be deactivated.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
**Possible values:** `PENDING`, `CANCELED`, `ACTIVE`, `DEACTIVATED`
The status of the recipient:
* `PENDING` – For `PAYOUT` scope recipients, the user must complete SCA before the recipient can become `ACTIVE`. For `PAYIN` scope recipients, the recipient creation is in progress.
* `CANCELED` – SCA was not successfully completed and the recipient creation request was canceled. To retry, create another recipient to retrieve another `PendingUserAction.RedirectUrl`. The `CANCELED` status does not apply if `RecipientScope` is `PAYIN`.
* `ACTIVE` – Recipient creation was successful (including SCA if `RecipientScope` is `PAYOUT`) and the recipient is ready to be used for payouts .
* `DEACTIVATED` – The recipient has been permanently deactivated and can no longer be used.
The date and time at which the object was created.
Length: 1–50; cannot contain: `&,'/` (pattern:`^(?!.*[&,'/]).{1,50}$`)
A user-friendly name to identify the account. This value cannot be changed once the recipient is created.
**Possible values:** `InternationalBankTransfer`, `LocalBankTransfer`
The payout method of the recipient.
* `InternationalBankTransfer` – A bank wire transfer sent via SWIFT, requiring the `InternationalBankTransfer` property.
* `LocalBankTransfer` – A bank wire transfer sent via local routes, requiring the `LocalBankTransfer` property.
**Possible values:** `Individual`, `Business`
The recipient type:
* `Individual` – An account held by a natural person, requiring the `IndividualRecipient` property.
* `Business` – An account held by a legal entity, requiring the `BusinessRecipient` property.
**Possible values:** `AED`, `AUD`, `CAD`, `CHF`, `CNH`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HUF`, `ILS`, `JPY`, `MXN`, `NOK`, `NZD`, `PLN`, `RON`, `SAR`, `SEK`, `SGD`, `TRY`, `USD`, `ZAR`
The currency of the recipient.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The destination country of the payout method.
The unique identifier of the user.
**Possible values:** `PAYIN`, `PAYOUT`
**Default value:** `PAYOUT`
The scope of the recipient:
* `PAYOUT` – Usable for payouts and in pay-in use cases. A `PAYOUT` recipient can only be created by a user with the `UserCategory` `OWNER` and requires SCA. You need to use the returned `PendingUserAction.RedirectUrl` value, adding your encoded `returnUrl` as a query parameter, to redirect the user to the [hosted SCA session](/guides/sca/session) so they can complete the necessary steps.
* `PAYIN` - Not usable for payouts but only usable for pay-in use cases, such as direct debit and refunds using payouts. A `PAYIN` recipient can be created by a user with the `UserCategory` `PAYER` or `OWNER`, and does not require SCA.
Both `PAYIN` and `PAYOUT` scopes can be created for either `InternationalBankTransfer` or `LocalBankTransfer`, and for either `IndividualRecipient` or `BusinessRecipient`, and for any `Currency`.
Max. length: 255 (pattern: `^.{0,255}$`)
Custom data that you can add to this object. This value cannot be changed once the recipient is created.
The account holder if the `RecipientType` is `Individual`.
Length: 1–255; cannot contain: `()&,.:_/` (Pattern: `^(?!.*[()&,.:_/]).{1,255}$`)
The first name of the individual account holder.
Length: 1–255; cannot contain: `()&,.:_/` (Pattern: `^(?!.*[()&,.:_/]).{1,255}$`)
The last name of the individual account holder.
Information about the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The first line of the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The second line of the address. Parameter only returned if sent.
Length: 1-80; cannot contain: `&,.:_'` (pattern: `^(?!.*[&,.:_']).{1,80}$`)
The city of the address.
Length: 1–10; cannot contain: `&,.:_'-/` (pattern: `^(?!.*[&,.:_'-/]).{1,50}$`)
The region of the address. Parameter only returned if sent.
Length: 1–10; cannot contain: `()&,.:_'/` (pattern: `^(?!.*[()&,.:_'/]).{1,10}$`)
The postal code of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The account holder if the `RecipientType` is `Business`.
Length: 1–255; cannot contain: `(),.:/` (Pattern: `^(?!.*[(),.:/]).{1,255}$`)
The name of the business account holder.
Information about the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The first line of the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The second line of the address. Parameter only returned if sent.
Length: 1-80; cannot contain: `&,.:_'` (pattern: `^(?!.*[&,.:_']).{1,80}$`)
The city of the address.
Length: 1–10; cannot contain: `&,.:_'-/` (pattern: `^(?!.*[&,.:_'-/]).{1,50}$`)
The region of the address. Parameter only returned if sent.
Length: 1–10; cannot contain: `()&,.:_'/` (pattern: `^(?!.*[()&,.:_'/]).{1,10}$`)
The postal code of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The account details if `PayoutMethodType` is `InternationalBankTransfer`.
The account number of the account.
The BIC of the account. For IBAN countries, the returned `BIC` is generated from the IBAN.
The account details if `PayoutMethodType` is `LocalBankTransfer`, depending on the `Currency`. One of:
{/*
Format: 6 digits (pattern: `^\\d{6}$`)
The branch-state-branch number of the Australian account.
Format: 6–10 digits (pattern: `^\\d{6,10}$`)
The account number of the Australian account.
*/}
Format: 7–35 digits (pattern: `^\\d{7,35}$`)
The account number of the Canadian account.
Format: 3 digits (pattern: `^\\d{3}$`)
The institution number of the Canadian account.
Format: 5 digits (pattern: `^\\d{5}$`)
The branch code of the Canadian account.
Length: 1–50
The bank name of the Canadian account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: 8 digits (pattern: `^\\d{8}$`)
The account number of the UK account.
Format: 6 digits (pattern: `^\\d{6}$`)
The sort code of the UK account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Hong Kong account.
Format: 1–50 alphanumeric characters (pattern: `^[0-9a-zA-Z]{1,50}$`)
The account number of the Hong Kong account.
Format: 3 alphanumeric characters (pattern: `^[0-9a-zA-Z]{3}$`)
The branch code of the Hong Kong account.
*/}
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Mexican account.
Format: 18 digits (pattern: `^\\d{18}$`)
The CLABE of the Mexican account.
*/}
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Singaporean account.
Format: 6–34 alphanumeric characters (pattern: `^[0-9a-zA-Z]{6,34}$`)
The account number of the Singaporean account.
*/}
Format: 8–12 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8,12}$`)
The account number of the US account.
Format: 9 digits (pattern: `^\\d{9}$`)
The ABA routing number of the US account.
Format: 8-12 digits then `FFC` then a space then a sting of characters up to 140 total length (pattern: `^(?=.{0,140}$)[0-9]{8,12}/FFC [0-9a-zA-Z/\\-?:().,'+ ]+$`)
FFC transfer information for the US account.
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
```json
{
"Id": "5c9ea5c63a80ddd7e5d77ef04cf5ed0d",
"Message": "Invalid State",
"Type": "other",
"Date": 1739485283,
"Errors": null
}
```
```json 200
{
"Id": "rec_01JRAEAA2RBYFV0MQD0K49221G",
"Status": "DEACTIVATED",
"CreationDate": 1744107284,
"DisplayName": "Alex Smith EUR international pay-in account",
"PayoutMethodType": "InternationalBankTransfer",
"RecipientType": "Business",
"Currency": "EUR",
"Country": "FR",
"UserId": "user_m_01JRADX7YD0060N5VAA0XPMM54",
"RecipientScope": "PAYIN",
"Tag": "Created using the Mangopay API Postman collection",
"BusinessRecipient": {
"BusinessName": "Alex Smith Consulting",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
},
"InternationalBankTransfer": {
"IBAN": "FR7630004000031234567890143",
"BIC": "BNPAFRPPXXX"
}
}
```
```json REST
{
"Status": "DEACTIVATED"
}
```
# List Recipients for a User
Source: https://docs.mangopay.com/api-reference/recipients/list-recipients-user
GET /v2.01/{ClientId}/users/{UserId}/recipients
List recipients created for a UserId
**Note – Endpoint returns filtered list by default**
By default, this endpoint returns only recipients with the `RecipientScope` value of `PAYOUT`. To retrieve `PAYIN` recipients, you need to specify the value in the `RecipientScope` query parameter.
### Path parameters
The unique identifier of the user.
### Query parameters
**Possible values:** `PAYIN`
By default, this endpoint returns only recipients with the `RecipientScope` value of `PAYOUT` unless `PAYIN` is specified as the query parameter value. It is also not possible to combine the query values.
Read more about [recipient scopes in the guide](/guides/sca/recipients#recipient-scopes).
### Responses
The list of recipients created for the user.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
Length: 1–50; cannot contain: `&,'/` (pattern:`^(?!.*[&,'/]).{1,50}$`)
A user-friendly name to identify the account. This value cannot be changed once the recipient is created.
**Possible values:** `InternationalBankTransfer`, `LocalBankTransfer`
The payout method of the recipient.
* `InternationalBankTransfer` – A bank wire transfer sent via SWIFT, requiring the `InternationalBankTransfer` property.
* `LocalBankTransfer` – A bank wire transfer sent via local routes, requiring the `LocalBankTransfer` property.
**Possible values:** `Individual`, `Business`
The recipient type:
* `Individual` – An account held by a natural person, requiring the `IndividualRecipient` property.
* `Business` – An account held by a legal entity, requiring the `BusinessRecipient` property.
**Possible values:** `AED`, `AUD`, `CAD`, `CHF`, `CNH`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HUF`, `ILS`, `JPY`, `MXN`, `NOK`, `NZD`, `PLN`, `RON`, `SAR`, `SEK`, `SGD`, `TRY`, `USD`, `ZAR`
The currency of the recipient.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The destination country of the payout method.
The unique identifier of the user.
**Possible values:** `PENDING`, `CANCELED`, `ACTIVE`, `DEACTIVATED`
The status of the recipient:
* `PENDING` – For `PAYOUT` scope recipients, the user must complete SCA before the recipient can become `ACTIVE`. For `PAYIN` scope recipients, the recipient creation is in progress.
* `CANCELED` – SCA was not successfully completed and the recipient creation request was canceled. To retry, create another recipient to retrieve another `PendingUserAction.RedirectUrl`. The `CANCELED` status does not apply if `RecipientScope` is `PAYIN`.
* `ACTIVE` – Recipient creation was successful (including SCA if `RecipientScope` is `PAYOUT`) and the recipient is ready to be used for payouts .
* `DEACTIVATED` – The recipient has been permanently deactivated and can no longer be used.
**Possible values:** `PAYIN`, `PAYOUT`
**Default value:** `PAYOUT`
The scope of the recipient:
* `PAYOUT` – Usable for payouts and in pay-in use cases. A `PAYOUT` recipient can only be created by a user with the `UserCategory` `OWNER` and requires SCA. You need to use the returned `PendingUserAction.RedirectUrl` value, adding your encoded `returnUrl` as a query parameter, to redirect the user to the [hosted SCA session](/guides/sca/session) so they can complete the necessary steps.
* `PAYIN` - Not usable for payouts but only usable for pay-in use cases, such as direct debit and refunds using payouts. A `PAYIN` recipient can be created by a user with the `UserCategory` `PAYER` or `OWNER`, and does not require SCA.
Both `PAYIN` and `PAYOUT` scopes can be created for either `InternationalBankTransfer` or `LocalBankTransfer`, and for either `IndividualRecipient` or `BusinessRecipient`, and for any `Currency`.
```json 200
[
{
"Id": "rec_01JV700CD7E5GP9SFZHGX0RV2E",
"DisplayName": "Alex Smith USD account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "USD",
"Country": "US",
"UserId": "user_m_01JV6ZGXBE0VZSF4TEN9JK343Z",
"Status": "ACTIVE",
"RecipientScope": "PAYOUT"
},
{
"Id": "rec_01JV6ZZG6W0RKG6ZGA3MEY60BZ",
"DisplayName": "Alex Smith USD account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "USD",
"Country": "US",
"UserId": "user_m_01JV6ZGXBE0VZSF4TEN9JK343Z",
"Status": "CANCELED",
"RecipientScope": "PAYOUT"
},
{
"Id": "rec_01JV70P7J10PRZP0JQQ9CQZFN8",
"DisplayName": "Alex Smith EUR account",
"PayoutMethodType": "InternationalBankTransfer",
"RecipientType": "Business",
"Currency": "EUR",
"Country": "FR",
"UserId": "user_m_01JV6ZGXBE0VZSF4TEN9JK343Z",
"Status": "ACTIVE",
"RecipientScope": "PAYOUT"
}
]
```
{/* ```json Legacy active bank account with new recipient
[
{
"Id": "bankacc_m_01JCN1X2EHWG0JNJNPNQ21CW5G",
"DisplayName": null,
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "EUR",
"Country": "FR",
"UserId": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"Status": "ACTIVE",
"RecipientScope": "PAYOUT"
},
{
"Id": "rec_01JVS3VF1AQS2G57MAR4BGA0VW",
"DisplayName": "Alex Smith CAD account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "CAD",
"Country": "CA",
"UserId": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"Status": "PENDING",
"RecipientScope": "PAYOUT"
}
]
``` */}
# The Recipient object
Source: https://docs.mangopay.com/api-reference/recipients/recipient-object
### Description
A Recipient represents the beneficiary and the beneficiary account (typically a bank account) of a payout.
The new set of Recipient endpoints replaces the legacy [Bank Account](/api-reference/bank-accounts/bank-account-object) endpoints, including bank account types.
Each recipient can be used for one combination of a payout method and currency, which together determine the account details required.
The Recipients feature also provides endpoints for you to:
* Dynamically retrieve the schema of a Recipient
* Validate a user's data in advance of registering the account
Recipient registration for payouts also systematically requires SCA, thereby enabling the payout request benefit from an [SCA exemption](/guides/sca#exemptions-on-actions) as a trusted beneficiary.
For more details, see the [Recipients](/guides/sca/recipients) guide.
### Attributes
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
**Possible values:** `PENDING`, `CANCELED`, `ACTIVE`, `DEACTIVATED`
The status of the recipient:
* `PENDING` – For `PAYOUT` scope recipients, the user must complete SCA before the recipient can become `ACTIVE`. For `PAYIN` scope recipients, the recipient creation is in progress.
* `CANCELED` – SCA was not successfully completed and the recipient creation request was canceled. To retry, create another recipient to retrieve another `PendingUserAction.RedirectUrl`. The `CANCELED` status does not apply if `RecipientScope` is `PAYIN`.
* `ACTIVE` – Recipient creation was successful (including SCA if `RecipientScope` is `PAYOUT`) and the recipient is ready to be used for payouts .
* `DEACTIVATED` – The recipient has been permanently deactivated and can no longer be used.
The date and time at which the object was created.
Length: 1–50; cannot contain: `&,'/` (pattern:`^(?!.*[&,'/]).{1,50}$`)
A user-friendly name to identify the account. This value cannot be changed once the recipient is created.
**Possible values:** `InternationalBankTransfer`, `LocalBankTransfer`
The payout method of the recipient.
* `InternationalBankTransfer` – A bank wire transfer sent via SWIFT, requiring the `InternationalBankTransfer` property.
* `LocalBankTransfer` – A bank wire transfer sent via local routes, requiring the `LocalBankTransfer` property.
**Possible values:** `Individual`, `Business`
The recipient type:
* `Individual` – An account held by a natural person, requiring the `IndividualRecipient` property.
* `Business` – An account held by a legal entity, requiring the `BusinessRecipient` property.
**Possible values:** `AED`, `AUD`, `CAD`, `CHF`, `CNH`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HUF`, `ILS`, `JPY`, `MXN`, `NOK`, `NZD`, `PLN`, `RON`, `SAR`, `SEK`, `SGD`, `TRY`, `USD`, `ZAR`
The currency of the recipient.
The unique identifier of the user.
**Possible values:** `PAYIN`, `PAYOUT`
**Default value:** `PAYOUT`
The scope of the recipient:
* `PAYOUT` – Usable for payouts and in pay-in use cases. A `PAYOUT` recipient can only be created by a user with the `UserCategory` `OWNER` and requires SCA. You need to use the returned `PendingUserAction.RedirectUrl` value, adding your encoded `returnUrl` as a query parameter, to redirect the user to the [hosted SCA session](/guides/sca/session) so they can complete the necessary steps.
* `PAYIN` - Not usable for payouts but only usable for pay-in use cases, such as direct debit and refunds using payouts. A `PAYIN` recipient can be created by a user with the `UserCategory` `PAYER` or `OWNER`, and does not require SCA.
Both `PAYIN` and `PAYOUT` scopes can be created for either `InternationalBankTransfer` or `LocalBankTransfer`, and for either `IndividualRecipient` or `BusinessRecipient`, and for any `Currency`.
Max. length: 255 (pattern: `^.{0,255}$`)
Custom data that you can add to this object. This value cannot be changed once the recipient is created.
The account holder if the `RecipientType` is `Individual`.
Length: 1–255; cannot contain: `()&,.:_/` (Pattern: `^(?!.*[()&,.:_/]).{1,255}$`)
The first name of the individual account holder.
Length: 1–255; cannot contain: `()&,.:_/` (Pattern: `^(?!.*[()&,.:_/]).{1,255}$`)
The last name of the individual account holder.
Information about the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The first line of the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The second line of the address. Parameter only returned if sent.
Length: 1-80; cannot contain: `&,.:_'` (pattern: `^(?!.*[&,.:_']).{1,80}$`)
The city of the address.
Length: 1–10; cannot contain: `&,.:_'-/` (pattern: `^(?!.*[&,.:_'-/]).{1,50}$`)
The region of the address. Parameter only returned if sent.
Length: 1–10; cannot contain: `()&,.:_'/` (pattern: `^(?!.*[()&,.:_'/]).{1,10}$`)
The postal code of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The account holder if the `RecipientType` is `Business`.
Length: 1–255; cannot contain: `(),.:/` (Pattern: `^(?!.*[(),.:/]).{1,255}$`)
The name of the business account holder.
Information about the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The first line of the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The second line of the address. Parameter only returned if sent.
Length: 1-80; cannot contain: `&,.:_'` (pattern: `^(?!.*[&,.:_']).{1,80}$`)
The city of the address.
Length: 1–10; cannot contain: `&,.:_'-/` (pattern: `^(?!.*[&,.:_'-/]).{1,50}$`)
The region of the address. Parameter only returned if sent.
Length: 1–10; cannot contain: `()&,.:_'/` (pattern: `^(?!.*[()&,.:_'/]).{1,10}$`)
The postal code of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The account details if `PayoutMethodType` is `InternationalBankTransfer`.
The account number of the account.
The BIC of the account. For IBAN countries, the returned `BIC` is generated from the IBAN.
The account details if `PayoutMethodType` is `LocalBankTransfer`, depending on the `Currency`. One of:
{/*
Format: 6 digits (pattern: `^\\d{6}$`)
The branch-state-branch number of the Australian account.
Format: 6–10 digits (pattern: `^\\d{6,10}$`)
The account number of the Australian account.
*/}
Format: 7–35 digits (pattern: `^\\d{7,35}$`)
The account number of the Canadian account.
Format: 3 digits (pattern: `^\\d{3}$`)
The institution number of the Canadian account.
Format: 5 digits (pattern: `^\\d{5}$`)
The branch code of the Canadian account.
Length: 1–50
The bank name of the Canadian account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: 8 digits (pattern: `^\\d{8}$`)
The account number of the UK account.
Format: 6 digits (pattern: `^\\d{6}$`)
The sort code of the UK account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Hong Kong account.
Format: 1–50 alphanumeric characters (pattern: `^[0-9a-zA-Z]{1,50}$`)
The account number of the Hong Kong account.
Format: 3 alphanumeric characters (pattern: `^[0-9a-zA-Z]{3}$`)
The branch code of the Hong Kong account.
*/}
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Mexican account.
Format: 18 digits (pattern: `^\\d{18}$`)
The CLABE of the Mexican account.
*/}
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Singaporean account.
Format: 6–34 alphanumeric characters (pattern: `^[0-9a-zA-Z]{6,34}$`)
The account number of the Singaporean account.
*/}
Format: 8–12 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8,12}$`)
The account number of the US account.
Format: 9 digits (pattern: `^\\d{9}$`)
The ABA routing number of the US account.
Format: 8-12 digits then `FFC` then a space then a sting of characters up to 140 total length (pattern: `^(?=.{0,140}$)[0-9]{8,12}/FFC [0-9a-zA-Z/\\-?:().,'+ ]+$`)
FFC transfer information for the US account.
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
## Related resources
Read about how the Recipients feature works
Read more about SCA
# Validate data for a Recipient
Source: https://docs.mangopay.com/api-reference/recipients/validate-recipient-data
POST /v2.01/{ClientId}/users/{UserId}/recipients/validate
Check that the user's Recipient data is valid before creation
### Path parameters
The unique identifier of the user.
### Body parameters
Length: 1–50; cannot contain: `&,'/` (pattern:`^(?!.*[&,'/]).{1,50}$`)
A user-friendly name to identify the account. This value cannot be changed once the recipient is created.
**Possible values:** `InternationalBankTransfer`, `LocalBankTransfer`
The payout method of the recipient:
* `InternationalBankTransfer` – A bank wire transfer sent via SWIFT, requiring the `InternationalBankTransfer` property.
* `LocalBankTransfer` – A bank wire transfer sent via local routes, requiring the `LocalBankTransfer` property.
**Possible values:** `Individual`, `Business`
The recipient type:
* `Individual` – An account held by a natural person, requiring the `IndividualRecipient` property.
* `Business` – An account held by a legal entity, requiring the `BusinessRecipient` property.
**Possible values:** `AED`, `AUD`, `CAD`, `CHF`, `CNH`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HUF`, `ILS`, `JPY`, `MXN`, `NOK`, `NZD`, `PLN`, `RON`, `SAR`, `SEK`, `SGD`, `TRY`, `USD`, `ZAR`
The currency of the recipient.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The destination country of the payout method.
**Possible values:** `PAYIN`, `PAYOUT`
**Default value:** `PAYOUT`
The scope of the recipient:
* `PAYOUT` – Usable for payouts and in pay-in use cases. A `PAYOUT` recipient can only be created by a user with the `UserCategory` `OWNER` and requires SCA. You need to use the returned `PendingUserAction.RedirectUrl` value, adding your encoded `returnUrl` as a query parameter, to redirect the user to the [hosted SCA session](/guides/sca/session) so they can complete the necessary steps.
* `PAYIN` - Not usable for payouts but only usable for pay-in use cases, such as direct debit and refunds using payouts. A `PAYIN` recipient can be created by a user with the `UserCategory` `PAYER` or `OWNER`, and does not require SCA.
Max. length: 255 (pattern: `^.{0,255}$`)
Custom data that you can add to this object. This value cannot be changed once the recipient is created.
The account holder if the `RecipientType` is `Individual`.
Only one of `IndividualRecipient` or `BusinessRecipient` is required.
Length: 1–255; cannot contain: `()&,.:_/` (Pattern: `^(?!.*[()&,.:_/]).{1,255}$`)
The first name of the individual account holder.
Length: 1–255; cannot contain: `()&,.:_/` (Pattern: `^(?!.*[()&,.:_/]).{1,255}$`)
The last name of the individual account holder.
Information about the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The first line of the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The second line of the address.
Length: 1-80; cannot contain: `&,.:_'` (pattern: `^(?!.*[&,.:_']).{1,80}$`)
The city of the address.
Length: 1–10; cannot contain: `&,.:_'-/` (pattern: `^(?!.*[&,.:_'-/]).{1,50}$`)
The region of the address.
Length: 1–10; cannot contain: `()&,.:_'/` (pattern: `^(?!.*[()&,.:_'/]).{1,10}$`)
The postal code of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The account holder if the `RecipientType` is `Business`.
Only one of `IndividualRecipient` or `BusinessRecipient` is required.
Length: 1–255; cannot contain: `(),.:/` (Pattern: `^(?!.*[(),.:/]).{1,255}$`)
The name of the business account holder.
Information about the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The first line of the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The second line of the address.
Length: 1-80; cannot contain: `&,.:_'` (pattern: `^(?!.*[&,.:_']).{1,80}$`)
The city of the address.
Length: 1–10; cannot contain: `&,.:_'-/` (pattern: `^(?!.*[&,.:_'-/]).{1,50}$`)
The region of the address.
Length: 1–10; cannot contain: `()&,.:_'/` (pattern: `^(?!.*[()&,.:_'/]).{1,10}$`)
The postal code of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The account details if `PayoutMethodType` is `InternationalBankTransfer`.
Only one of `InternationalBankTransfer` or `LocalBankTransfer` is required.
The `InternationalBankTransfer` depends on the `Currency` and `Country`.
Format: The format returned by the [schema](/api-reference/recipients/view-recipient-schema) endpoint depending on the `Currency` and `Country`
The account number of the account. For IBAN countries, the `AccountNumber` format is the local IBAN one. For other countries, the format depends on the `Country` and should be retrieved from the [GET View the schema for a Recipient](/api-reference/recipients/view-recipient-schema) endpoint.
Format: The format returned by the [schema](/api-reference/recipients/view-recipient-schema) endpoint depending on the `Currency` and `Country`
The BIC of the account.
For countries that don't use IBAN, the `BIC` is required. For countries that use IBAN, this field is ignored because the BIC generated automatically from the IBAN and returned in the response.
The account details if `PayoutMethodType` is `LocalBankTransfer`, depending on the `Currency`. One of:
{/*
Format: 6 digits (pattern: `^\\d{6}$`)
The branch-state-branch number of the Australian account.
Format: 6–10 digits (pattern: `^\\d{6,10}$`)
The account number of the Australian account.
*/}
Format: 7–35 digits (pattern: `^\\d{7,35}$`)
The account number of the Canadian account.
Format: 3 digits (pattern: `^\\d{3}$`)
The institution number of the Canadian account.
Format: 5 digits (pattern: `^\\d{5}$`)
The branch code of the Canadian account.
Length: 1–50
The bank name of the Canadian account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: 8 digits (pattern: `^\\d{8}$`)
The account number of the UK account.
Format: 6 digits (pattern: `^\\d{6}$`)
The sort code of the UK account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Hong Kong account.
Format: 1–50 alphanumeric characters (pattern: `^[0-9a-zA-Z]{1,50}$`)
The account number of the Hong Kong account.
Format: 3 alphanumeric characters (pattern: `^[0-9a-zA-Z]{3}$`)
The branch code of the Hong Kong account.
*/}
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Mexican account.
Format: 18 digits (pattern: `^\\d{18}$`)
The CLABE of the Mexican account.
*/}
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Singaporean account.
Format: 6–34 alphanumeric characters (pattern: `^[0-9a-zA-Z]{6,34}$`)
The account number of the Singaporean account.
*/}
Format: 8–12 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8,12}$`)
The account number of the US account.
Format: 9 digits (pattern: `^\\d{9}$`)
The ABA routing number of the US account.
Format: 8-12 digits then `FFC` then a space then a sting of characters up to 140 total length (pattern: `^(?=.{0,140}$)[0-9]{8,12}/FFC [0-9a-zA-Z/\\-?:().,'+ ]+$`)
FFC transfer information for the US account.
### Responses
*No response body – 200 HTTP code indicates the request is valid against the schema*
Example 400 error:
```json
{
"Id": "a1f3db88-9df5-49a8-b73c-d578ffff6e89",
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Date": 1739182373,
"Errors": {
"IndividualRecipient.Address.Region": "INVALID_FORMAT",
"LocalBankTransfer.GBP.AccountNumber": "LENGTH_LESS_THAN_MIN"
}
}
```
The following error values may be returned:
* `REQUIRED` – Value is required but not present in the request.
* `LENGTH_MORE_THAN_MAX` – String length is greater than required length.
* `LENGTH_LESS_THAN_MIN` – String length is less than required length.
* `INVALID_FORMAT` – Value doe not match expected pattern.
* `NOT_IN_ALLOWED_VALUES` – Value is not a valid `PayoutMethodType`, `RecipientType`, or `Currency`.
* `UNSUPPORTED_CURRENCY` – Currency is a valid ISO 4217 format but not yet supported for Recipients.
* `UNSUPPORTED_PAYOUT_METHOD_FOR_CURRENCY` – Payout method is not supported for the `Currency` and `Country` combination.
* `CLIENT_NOT_FOUND` – `ClientId` making the request does not exist.
* `USER_NOT_FOUND` – `UserId` for which the request is made does not exist.
* `INVALID_SORT_CODE` – Sort code for this account is not valid.
* `INVALID_ACCOUNT_NUMBER` – Account number is not valid.
* `INVALID_IBAN` – IBAN is not valid.
* `INVALID_BIC` – BIC is not valid.
* `UNSUPPORTED_IBAN` – IBAN is valid but not supported:
* If `LocalBankTransfer`, the IBAN country is not part of SEPA and the local currency is not EUR.
* If `InternationalBankTransfer`, the IBAN country is not GB or is not part of SEPA and local currency is not EUR.
* `INVALID_ACCOUNT_NUMBER_AND_SORT_CODE_COMBINATION` – GB sort code and account number combination is not valid.
```json 200
// No response body
```
```json REST - EUR, international, business, PAYOUT
{
"DisplayName": "Alex Smith EUR international payout account",
"PayoutMethodType": "InternationalBankTransfer",
"RecipientType": "Business",
"Currency": "EUR",
"Country": "FR",
"Tag": "Created using the Mangopay API Postman collection",
"BusinessRecipient": {
"BusinessName": "Alex Smith Consulting",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
},
"InternationalBankTransfer": {
"AccountNumber": "FR7630004000031234567890143"
}
}
```
```json REST - GBP, local, individual, PAYIN
{
"DisplayName": "Alex Smith GBP local pay-in account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "GBP",
"Country": "GB",
"Tag": "Created using the Mangopay API Postman collection",
"RecipientScope": "PAYIN",
"IndividualRecipient": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "10 Kingsway",
"City": "London",
"PostalCode": "WC2B 6LH",
"Country": "GB"
}
},
"LocalBankTransfer": {
"GBP": {
"SortCode": "200000",
"AccountNumber": "55779911"
}
}
}
```
# View payout methods
Source: https://docs.mangopay.com/api-reference/recipients/view-payout-methods
GET /v2.01/{ClientId}/recipients/payout-methods
See payout methods available to your platform by currency and country
### Query parameters
**Possible values:** `AED`, `AUD`, `CAD`, `CHF`, `CNH`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HUF`, `ILS`, `JPY`, `MXN`, `NOK`, `NZD`, `PLN`, `RON`, `SAR`, `SEK`, `SGD`, `TRY`, `USD`, `ZAR`
The currency of the payout method.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The destination country of the payout method.
### Responses
**Possible values:** `LocalBankTransfer`, `InternationalBankTransfer`
The payout methods available for the currency and country combination.
```json 400 - Currency not supported
{
"Id": "0d361fcc-c766-4062-844a-b619ae2a49a8",
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Date": 1741945960,
"Errors": {
"Currency": "UNSUPPORTED_CURRENCY"
}
}
```
```json Local
{
"AvailablePayoutMethods": [
"LocalBankTransfer"
]
}
```
```json International
{
"AvailablePayoutMethods": [
"InternationalBankTransfer"
]
}
```
```json REST
// GET has no body parameters
```
# View a Recipient
Source: https://docs.mangopay.com/api-reference/recipients/view-recipient
GET /v2.01/{ClientId}/recipients/{RecipientId}
Fetch a recipient based on its ID
### Path parameters
The unique identifier of the Recipient.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
**Possible values:** `PENDING`, `CANCELED`, `ACTIVE`, `DEACTIVATED`
The status of the recipient:
* `PENDING` – For `PAYOUT` scope recipients, the user must complete SCA before the recipient can become `ACTIVE`. For `PAYIN` scope recipients, the recipient creation is in progress.
* `CANCELED` – SCA was not successfully completed and the recipient creation request was canceled. To retry, create another recipient to retrieve another `PendingUserAction.RedirectUrl`. The `CANCELED` status does not apply if `RecipientScope` is `PAYIN`.
* `ACTIVE` – Recipient creation was successful (including SCA if `RecipientScope` is `PAYOUT`) and the recipient is ready to be used for payouts .
* `DEACTIVATED` – The recipient has been permanently deactivated and can no longer be used.
The date and time at which the object was created.
Length: 1–50; cannot contain: `&,'/` (pattern:`^(?!.*[&,'/]).{1,50}$`)
A user-friendly name to identify the account. This value cannot be changed once the recipient is created.
**Possible values:** `InternationalBankTransfer`, `LocalBankTransfer`
The payout method of the recipient.
* `InternationalBankTransfer` – A bank wire transfer sent via SWIFT, requiring the `InternationalBankTransfer` property.
* `LocalBankTransfer` – A bank wire transfer sent via local routes, requiring the `LocalBankTransfer` property.
**Possible values:** `Individual`, `Business`
The recipient type:
* `Individual` – An account held by a natural person, requiring the `IndividualRecipient` property.
* `Business` – An account held by a legal entity, requiring the `BusinessRecipient` property.
**Possible values:** `AED`, `AUD`, `CAD`, `CHF`, `CNH`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HUF`, `ILS`, `JPY`, `MXN`, `NOK`, `NZD`, `PLN`, `RON`, `SAR`, `SEK`, `SGD`, `TRY`, `USD`, `ZAR`
The currency of the recipient.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The destination country of the payout method.
The unique identifier of the user.
**Possible values:** `PAYIN`, `PAYOUT`
**Default value:** `PAYOUT`
The scope of the recipient:
* `PAYOUT` – Usable for payouts and in pay-in use cases. A `PAYOUT` recipient can only be created by a user with the `UserCategory` `OWNER` and requires SCA. You need to use the returned `PendingUserAction.RedirectUrl` value, adding your encoded `returnUrl` as a query parameter, to redirect the user to the [hosted SCA session](/guides/sca/session) so they can complete the necessary steps.
* `PAYIN` - Not usable for payouts but only usable for pay-in use cases, such as direct debit and refunds using payouts. A `PAYIN` recipient can be created by a user with the `UserCategory` `PAYER` or `OWNER`, and does not require SCA.
Both `PAYIN` and `PAYOUT` scopes can be created for either `InternationalBankTransfer` or `LocalBankTransfer`, and for either `IndividualRecipient` or `BusinessRecipient`, and for any `Currency`.
Max. length: 255 (pattern: `^.{0,255}$`)
Custom data that you can add to this object. This value cannot be changed once the recipient is created.
The account holder if the `RecipientType` is `Individual`.
Length: 1–255; cannot contain: `()&,.:_/` (Pattern: `^(?!.*[()&,.:_/]).{1,255}$`)
The first name of the individual account holder.
Length: 1–255; cannot contain: `()&,.:_/` (Pattern: `^(?!.*[()&,.:_/]).{1,255}$`)
The last name of the individual account holder.
Information about the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The first line of the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The second line of the address. Parameter only returned if sent.
Length: 1-80; cannot contain: `&,.:_'` (pattern: `^(?!.*[&,.:_']).{1,80}$`)
The city of the address.
Length: 1–10; cannot contain: `&,.:_'-/` (pattern: `^(?!.*[&,.:_'-/]).{1,50}$`)
The region of the address. Parameter only returned if sent.
Length: 1–10; cannot contain: `()&,.:_'/` (pattern: `^(?!.*[()&,.:_'/]).{1,10}$`)
The postal code of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The account holder if the `RecipientType` is `Business`.
Length: 1–255; cannot contain: `(),.:/` (Pattern: `^(?!.*[(),.:/]).{1,255}$`)
The name of the business account holder.
Information about the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The first line of the address.
Length: 1–255; cannot contain: `()/` (Pattern: `^(?!.*[()/]).{1,255}$`)
The second line of the address. Parameter only returned if sent.
Length: 1-80; cannot contain: `&,.:_'` (pattern: `^(?!.*[&,.:_']).{1,80}$`)
The city of the address.
Length: 1–10; cannot contain: `&,.:_'-/` (pattern: `^(?!.*[&,.:_'-/]).{1,50}$`)
The region of the address. Parameter only returned if sent.
Length: 1–10; cannot contain: `()&,.:_'/` (pattern: `^(?!.*[()&,.:_'/]).{1,10}$`)
The postal code of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
The account details if `PayoutMethodType` is `InternationalBankTransfer`.
The account number of the account.
The BIC of the account. For IBAN countries, the returned `BIC` is generated from the IBAN.
The account details if `PayoutMethodType` is `LocalBankTransfer`, depending on the `Currency`. One of:
{/*
Format: 6 digits (pattern: `^\\d{6}$`)
The branch-state-branch number of the Australian account.
Format: 6–10 digits (pattern: `^\\d{6,10}$`)
The account number of the Australian account.
*/}
Format: 7–35 digits (pattern: `^\\d{7,35}$`)
The account number of the Canadian account.
Format: 3 digits (pattern: `^\\d{3}$`)
The institution number of the Canadian account.
Format: 5 digits (pattern: `^\\d{5}$`)
The branch code of the Canadian account.
Length: 1–50
The bank name of the Canadian account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: 8 digits (pattern: `^\\d{8}$`)
The account number of the UK account.
Format: 6 digits (pattern: `^\\d{6}$`)
The sort code of the UK account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Hong Kong account.
Format: 1–50 alphanumeric characters (pattern: `^[0-9a-zA-Z]{1,50}$`)
The account number of the Hong Kong account.
Format: 3 alphanumeric characters (pattern: `^[0-9a-zA-Z]{3}$`)
The branch code of the Hong Kong account.
*/}
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Mexican account.
Format: 18 digits (pattern: `^\\d{18}$`)
The CLABE of the Mexican account.
*/}
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
Format: A valid IBAN (pattern: `^[a-zA-Z]{2}\\d{2}\\s*(\\w{4}\\s*){2,7}\\w{1,4}\\s*$`)
The IBAN of the account.
{/*
Format: 8–11 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$`)
The BIC of the Singaporean account.
Format: 6–34 alphanumeric characters (pattern: `^[0-9a-zA-Z]{6,34}$`)
The account number of the Singaporean account.
*/}
Format: 8–12 alphanumeric characters (pattern: `^[0-9a-zA-Z]{8,12}$`)
The account number of the US account.
Format: 9 digits (pattern: `^\\d{9}$`)
The ABA routing number of the US account.
Format: 8-12 digits then `FFC` then a space then a sting of characters up to 140 total length (pattern: `^(?=.{0,140}$)[0-9]{8,12}/FFC [0-9a-zA-Z/\\-?:().,'+ ]+$`)
FFC transfer information for the US account.
```json ACTIVE, EUR, international, PAYOUT
{
"Id": "rec_01JRADYFJYPFM10XPQ8VFWW947",
"Status": "ACTIVE",
"CreationDate": 1744106896,
"DisplayName": "Alex Smith EUR international payout account",
"PayoutMethodType": "InternationalBankTransfer",
"RecipientType": "Business",
"Currency": "EUR",
"Country": "FR",
"UserId": "user_m_01JRADX7YD0060N5VAA0XPMM54",
"Tag": "Created using the Mangopay API Postman collection",
"RecipientScope": "PAYOUT",
"BusinessRecipient": {
"BusinessName": "Alex Smith Consulting",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
}
},
"InternationalBankTransfer": {
"AccountNumber": "FR7630004000031234567890143",
"BIC": "BNPAFRPPXXX"
}
}
```
```json ACTIVE, GBP, local, PAYIN
{
"Id": "rec_01JV6ZJZHRK8K7X79BFEZ0MPR4",
"Status": "ACTIVE",
"CreationDate": 1747212402,
"DisplayName": "Alex Smith GBP account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "GBP",
"Country": "GB",
"UserId": "user_m_01JV6ZGXBE0VZSF4TEN9JK343Z",
"Tag": "Created using the Mangopay API Postman collection",
"RecipientScope": "PAYIN",
"IndividualRecipient": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "10 Kingsway",
"City": "London",
"PostalCode": "WC2B 6LH",
"Country": "GB"
}
},
"LocalBankTransfer": {
"GBP": {
"SortCode": "200000",
"AccountNumber": "55779911"
}
}
}
```
```json ACTIVE, USD, local, PAYOUT
{
"Id": "rec_01JV700CD7E5GP9SFZHGX0RV2E",
"Status": "ACTIVE",
"CreationDate": 1747212841,
"DisplayName": "Alex Smith USD account",
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "USD",
"Country": "US",
"UserId": "user_m_01JV6ZGXBE0VZSF4TEN9JK343Z",
"Tag": "Created using the Mangopay API Postman collection",
"RecipientScope": "PAYOUT",
"IndividualRecipient": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "900 Williams Ave.",
"City": "New York",
"Region": "NY",
"PostalCode": "10025",
"Country": "US"
}
},
"LocalBankTransfer": {
"USD": {
"ABA": "071000288",
"AccountNumber": "11696419"
}
}
}
```
{/* ```json Legacy active bank account
{
"Id": "bankacc_m_01JCN1X2EHWG0JNJNPNQ21CW5G",
"Status": "ACTIVE",
"CreationDate": 1731578464,
"DisplayName": null,
"PayoutMethodType": "LocalBankTransfer",
"RecipientType": "Individual",
"Currency": "EUR",
"Country": "FR",
"UserId": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"Tag": null,
"RecipientScope": "PAYOUT",
"IndividualRecipient": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "1 rue de Rivoli",
"City": "Paris",
"PostalCode": "75001",
"Country": "FR"
}
},
"LocalBankTransfer": {
"EUR": {
"IBAN": "FR7630004000031234567890143",
"BIC": "BNPAFRPP"
}
}
}
``` */}
```json REST
// GET has no body parameters
```
# View the schema for a Recipient
Source: https://docs.mangopay.com/api-reference/recipients/view-recipient-schema
GET /v2.01/{ClientId}/recipients/schema
Fetch the data requirements for a given currency, payout method type, and recipient type
### Query parameters
**Allowed values:** `LocalBankTransfer`, `InternationalBankTransfer`
The payout method.
**Allowed values:** The three-letter ISO 4217 code of a supported currency: `AED`, `AUD`, `CAD`, `CHF`, `CNH`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HUF`, `ILS`, `JPY`, `MXN`, `NOK`, `NZD`, `PLN`, `RON`, `SAR`, `SEK`, `SGD`, `TRY`, `USD`, `ZAR`
The currency of the recipient.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The destination country of the payout method.
**Possible values:** `Individual`, `Business`
The recipient type:
* `Individual` – An account held by a natural person
* `Business` – An account held by a legal entity
### Responses
The schema of the `DisplayName` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `Currency` property.
The allowed values of the string.
Whether the field is required or not.
The maximum length of the string.
The minimum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `Country` property.
The allowed values of the string.
Whether the field is required or not.
The maximum length of the string.
The minimum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `RecipientType` property.
The allowed values of the string.
Whether the field is required or not.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `PayoutMethodType` property.
The allowed values of the string.
Whether the field is required or not.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `IndividualRecipient` property.
The schema of the `FirstName` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `LastName` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `Address` object.
The schema of the `AddressLine1` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `AddressLine2` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `City` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `Country` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `Region` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `PostalCode` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `BusinessRecipient` property.
The schema of the `BusinessName` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `Address` object.
The schema of the `AddressLine1` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `AddressLine2` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `City` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `Country` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `Region` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `PostalCode` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `InternationalBankTransfer` property.
The schema of the `AccountNumber` property.
Whether the field is required or not.
The maximum length of the string.
The minimum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `BIC` property (returned if required).
Whether the field is required or not.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `LocalBankTransfer` property. One of:
{/*
The schema of the `AUD` property.
The schema of the `BSB` property.
The schema of the `AccountNumber` property.
*/}
The schema of the `CAD` property.
The schema of the `AccountNumber` property.
Whether the field is required or not.
The maximum length of the string.
The minimum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `InstitutionNumber` property.
Whether the field is required or not.
The maximum length of the string.
The minimum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `BranchCode` property.
Whether the field is required or not.
The maximum length of the string.
The minimum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `BankName` property.
Whether the field is required or not.
The maximum length of the string.
The minimum length of the string.
The schema of the `CHF` property.
The schema of the `IBAN` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `CZK` property.
The schema of the `IBAN` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `DKK` property.
The schema of the `IBAN` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `EUR` property.
The schema of the `IBAN` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `AccountNumber` property.
Whether the field is required or not.
The maximum length of the string.
The minimum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `SortCode` property.
Whether the field is required or not.
The maximum length of the string.
The minimum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `HUF` property.
The schema of the `IBAN` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
{/*
The schema of the `HKD` property.
The schema of the `BIC` property.
The schema of the `BranchCode` property.
The schema of the `AccountNumber` property.
*/}
{/*
The schema of the `MXN` property.
The schema of the `BIC` property.
The schema of the `Clabe` property.
*/}
The schema of the `NOK` property.
The schema of the `IBAN` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `PLN` property.
The schema of the `IBAN` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `RON` property.
The schema of the `IBAN` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `SEK` property.
The schema of the `IBAN` property.
Whether the field is required or not.
The maximum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
{/*
The schema of the `SGD` property.
The schema of the `BIC` property.
The schema of the `AccountNumber` property.
*/}
The schema of the `USD` property.
The schema of the `AccountNumber` property.
Whether the field is required or not.
The maximum length of the string.
The minimum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `ABA` property.
Whether the field is required or not.
The maximum length of the string.
The minimum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
The schema of the `FFC` property.
Whether the field is required or not.
The maximum length of the string.
The minimum length of the string.
The regex describing the accepted value of the string.
A label that platforms can use when displaying or requesting the field to the end user.
**Possible values:** `Show`, `Hide`
Recommendation on whether to show or hide the field (and `Label`) to the end user.
```json
{
"Id": "410e8496-64cb-4594-83c3-0d66f85f4abe",
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Date": 1747210826,
"Errors": {
"PayoutMethodType": "UNSUPPORTED_PAYOUT_METHOD_FOR_CURRENCY"
}
}
```
```json
{
"Id": "50768465-d817-4caf-9488-e71b967b6692",
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Date": 1749822248,
"Errors": {
"PayoutMethodType": "UNSUPPORTED_CURRENCY_FOR_PAYOUT_METHOD"
}
}
```
```json EUR, US, international, individual
{
"DisplayName": {
"Required": true,
"MaxLength": 50,
"Pattern": "^(?!.*[&,'/]).{1,50}$",
"Label": "Display Name",
"EndUserDisplay": "Show"
},
"Currency": {
"AllowedValues": [
"EUR"
],
"Required": true,
"MaxLength": 3,
"MinLength": 3,
"Pattern": "^[a-zA-Z]{3}$",
"Label": "Currency",
"EndUserDisplay": "Hide"
},
"Country": {
"AllowedValues": [
"US"
],
"Required": true,
"MaxLength": 2,
"MinLength": 2,
"Pattern": "^[a-zA-Z]{2}$",
"Label": "Destination Country",
"EndUserDisplay": "Hide"
},
"RecipientType": {
"AllowedValues": [
"Individual"
],
"Required": true,
"Pattern": "^[a-zA-Z]+$",
"Label": "Recipient Type",
"EndUserDisplay": "Hide"
},
"PayoutMethodType": {
"AllowedValues": [
"InternationalBankTransfer"
],
"Required": true,
"Pattern": "^[a-zA-Z]+$",
"Label": "Payout Method Type",
"EndUserDisplay": "Hide"
},
"Tag": {
"Required": false,
"MaxLength": 255,
"Pattern": "^.{0,255}$",
"Label": "Tag",
"EndUserDisplay": "Hide"
},
"RecipientScope": {
"AllowedValues": [
"PAYOUT",
"PAYIN"
],
"Required": false,
"Pattern": "^[a-zA-Z]+$",
"Label": "Recipient Scope",
"EndUserDisplay": "Hide"
},
"IndividualRecipient": {
"FirstName": {
"Required": true,
"MaxLength": 255,
"Pattern": "^(?!.*[()&,.:_/]).{1,255}$",
"Label": "First Name",
"EndUserDisplay": "Show"
},
"LastName": {
"Required": true,
"MaxLength": 255,
"Pattern": "^(?!.*[()&,.:_/]).{1,255}$",
"Label": "Last Name",
"EndUserDisplay": "Show"
},
"Address": {
"AddressLine1": {
"Required": true,
"MaxLength": 255,
"Pattern": "^(?!.*[()/]).{1,255}$",
"Label": "Address Line 1",
"EndUserDisplay": "Show"
},
"AddressLine2": {
"Required": false,
"MaxLength": 255,
"Pattern": "^(?!.*[()/]).{1,255}$",
"Label": "Address Line 2",
"EndUserDisplay": "Show"
},
"City": {
"Required": true,
"MaxLength": 80,
"Pattern": "^(?!.*[&,.:_']).{1,80}$",
"Label": "City",
"EndUserDisplay": "Show"
},
"Country": {
"Required": true,
"MaxLength": 2,
"MinLength": 2,
"Pattern": "^[a-zA-Z]+$",
"Label": "Country",
"EndUserDisplay": "Show"
},
"Region": {
"Required": false,
"MaxLength": 50,
"Pattern": "^(?!.*[&,.:_'-/]).{1,50}$",
"Label": "Region",
"EndUserDisplay": "Show"
},
"PostalCode": {
"Required": true,
"MaxLength": 10,
"Pattern": "^(?!.*[()&,.:_'/]).{1,10}$",
"Label": "Postal Code",
"EndUserDisplay": "Show"
}
}
},
"InternationalBankTransfer": {
"AccountNumber": {
"Required": true,
"MaxLength": 12,
"MinLength": 8,
"Pattern": "^[0-9a-zA-Z]{8,12}$",
"Label": "Account Number",
"EndUserDisplay": "Show"
},
"BIC": {
"Required": true,
"Pattern": "^[0-9a-zA-Z]{8}([0-9a-zA-Z]{3})?$",
"Label": "BIC",
"EndUserDisplay": "Show"
}
}
}
```
```json CAD, CA, local, business
{
"DisplayName": {
"Required": true,
"MaxLength": 50,
"Pattern": "^(?!.*[&,'/]).{1,50}$",
"Label": "Display Name",
"EndUserDisplay": "Show"
},
"Currency": {
"AllowedValues": [
"CAD"
],
"Required": true,
"MaxLength": 3,
"MinLength": 3,
"Pattern": "^[a-zA-Z]{3}$",
"Label": "Currency",
"EndUserDisplay": "Hide"
},
"Country": {
"AllowedValues": [
"CA"
],
"Required": true,
"MaxLength": 2,
"MinLength": 2,
"Pattern": "^[a-zA-Z]{2}$",
"Label": "Destination Country",
"EndUserDisplay": "Hide"
},
"RecipientType": {
"AllowedValues": [
"Business"
],
"Required": true,
"Pattern": "^[a-zA-Z]+$",
"Label": "Recipient Type",
"EndUserDisplay": "Hide"
},
"PayoutMethodType": {
"AllowedValues": [
"LocalBankTransfer"
],
"Required": true,
"Pattern": "^[a-zA-Z]+$",
"Label": "Payout Method Type",
"EndUserDisplay": "Hide"
},
"Tag": {
"Required": false,
"MaxLength": 255,
"Pattern": "^.{0,255}$",
"Label": "Tag",
"EndUserDisplay": "Hide"
},
"RecipientScope": {
"AllowedValues": [
"PAYOUT",
"PAYIN"
],
"Required": false,
"Pattern": "^[a-zA-Z]+$",
"Label": "Recipient Scope",
"EndUserDisplay": "Hide"
},
"LocalBankTransfer": {
"CAD": {
"AccountNumber": {
"Required": true,
"MaxLength": 35,
"MinLength": 7,
"Pattern": "^\\d{7,35}$",
"Label": "Account Number",
"EndUserDisplay": "Show"
},
"InstitutionNumber": {
"Required": true,
"MaxLength": 3,
"MinLength": 3,
"Pattern": "^\\d{3}$",
"Label": "Institution Number",
"EndUserDisplay": "Show"
},
"BranchCode": {
"Required": true,
"MaxLength": 5,
"MinLength": 5,
"Pattern": "^\\d{5}$",
"Label": "Branch Code",
"EndUserDisplay": "Show"
},
"BankName": {
"Required": true,
"MaxLength": 50,
"Label": "Bank Name",
"EndUserDisplay": "Show"
}
}
},
"BusinessRecipient": {
"BusinessName": {
"Required": true,
"MaxLength": 255,
"Pattern": "^(?!.*[(),.:/]).{1,255}$",
"Label": "Business Name",
"EndUserDisplay": "Show"
},
"Address": {
"AddressLine1": {
"Required": true,
"MaxLength": 255,
"Pattern": "^(?!.*[()/]).{1,255}$",
"Label": "Address Line 1",
"EndUserDisplay": "Show"
},
"AddressLine2": {
"Required": false,
"MaxLength": 255,
"Pattern": "^(?!.*[()/]).{1,255}$",
"Label": "Address Line 2",
"EndUserDisplay": "Show"
},
"City": {
"Required": true,
"MaxLength": 80,
"Pattern": "^(?!.*[&,.:_']).{1,80}$",
"Label": "City",
"EndUserDisplay": "Show"
},
"Country": {
"Required": true,
"MaxLength": 2,
"MinLength": 2,
"Pattern": "^[a-zA-Z]+$",
"Label": "Country",
"EndUserDisplay": "Show"
},
"Region": {
"Required": true,
"MaxLength": 50,
"Pattern": "^(?!.*[&,.:_'-/]).{1,50}$",
"Label": "Region",
"EndUserDisplay": "Show"
},
"PostalCode": {
"Required": true,
"MaxLength": 10,
"Pattern": "^(?!.*[()&,.:_'/]).{1,10}$",
"Label": "Postal Code",
"EndUserDisplay": "Show"
}
}
}
}
```
```json REST
// GET has no body parameters
```
# Create a Recurring PayIn (CIT)
Source: https://docs.mangopay.com/api-reference/recurring-card-payins/create-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. This deprecated parameter defaults to `EN`.
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 cards.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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": "payin_m_01JJP2PDQWD7S2W42RR6S21VZE",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1738055301,
"AuthorId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CreditedUserId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 9500
},
"Fees": {
"Currency": "EUR",
"Amount": 500
},
"Status": "CREATED",
"ResultCode": null,
"ResultMessage": null,
"ExecutionDate": null,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01JJ70WZ9JRAZ9GE0DA36Q84NQ",
"DebitedWalletId": null,
"PaymentType": "CARD",
"ExecutionType": "DIRECT",
"SecureMode": null,
"CardId": "card_m_UsklnOoXBWyyqhsN",
"SecureModeReturnURL": "https://example.com/?transactionId=payin_m_01JJP2PDQWD7S2W42RR6S21VZE",
"SecureModeRedirectURL": "https://api.sandbox.whenthen.co/payment-gateway/whenthen/threeDS/54b0c206-0a67-43d4-ace6-14a25697cf85/challenge?id=d7a9a1dd-80aa-4252-b2b4-221e1898d67f&url=aHR0cHM6Ly9hcGkuc2FuZGJveC53aGVudGhlbi5jby9wYXltZW50cy8zRFNlY3VyZS81NGIwYzIwNi0wYTY3LTQzZDQtYWNlNi0xNGEyNTY5N2NmODUvYzA1YTBhYzktNjBmZC00NDQyLWEzYzAtYjlmOTVlN2I1ODk5&amount=MzMzNDE¤cy=RVVS",
"SecureModeNeeded": true,
"Culture": "EN",
"SecurityInfo": {
"AVSResult": "NO_CHECK"
},
"StatementDescriptor": "Example123",
"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": "3a55:f45c:d44e:ff6a:c63b:f2ec:3a31:eb3e",
"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": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"Requested3DSVersion": null,
"Applied3DSVersion": "V2_1",
"RecurringPayinRegistrationId": "recpayinreg_m_01JJP2KS2A47A0P7S7CEBQPHT9",
"PreferredCardNetwork": "MASTERCARD",
"CardInfo": {
"BIN": "497010",
"IssuingBank": "LA BANQUE POSTALE",
"IssuerCountryCode": "MA",
"Type": "CREDIT",
"Brand": "MASTERCARD",
"SubType": null
}
}
```
```json REST
{
"RecurringPayinRegistrationId": "recpayinreg_m_01JJP2KS2A47A0P7S7CEBQPHT9",
"IpAddress": "3a55:f45c:d44e:ff6a:c63b:f2ec:3a31:eb3e",
"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
},
"SecureModeReturnURL": "https://example.com",
"StatementDescriptor": "Example123",
"Tag": "Created using Mangopay API Postman Collection",
"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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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)
Source: https://docs.mangopay.com/api-reference/recurring-card-payins/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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": "70ef422f-80d2-4da6-83e2-cc0dac786e74#1736325908",
"Date": 1736325910,
"errors": {
"SecureModeReturnUrl": "RecurringRegistration is in AUTHENTICATION_NEEDED state. A valid value must be provided."
}
}
```
```json 200
{
"Id": "payin_m_01JJP2PDQWD7S2W42RR6S21VZE",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1738058031,
"AuthorId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CreditedUserId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 9500
},
"Fees": {
"Currency": "EUR",
"Amount": 500
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1738058032,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01JJ70WZ9JRAZ9GE0DA36Q84NQ",
"DebitedWalletId": null,
"PaymentType": "CARD",
"ExecutionType": "DIRECT",
"SecureMode": null,
"CardId": "card_m_UsklnOoXBWyyqhsN",
"SecureModeReturnURL": null,
"SecureModeRedirectURL": null,
"SecureModeNeeded": false,
"Culture": "EN",
"SecurityInfo": {
"AVSResult": "NO_CHECK"
},
"StatementDescriptor": "Example123",
"BrowserInfo": null,
"IpAddress": null,
"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": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"Requested3DSVersion": null,
"Applied3DSVersion": "V2_1",
"RecurringPayinRegistrationId": "recpayinreg_m_01JJP2KS2A47A0P7S7CEBQPHT9",
"PreferredCardNetwork": "MASTERCARD",
"CardInfo": {
"BIN": "497010",
"IssuingBank": "LA BANQUE POSTALE",
"IssuerCountryCode": "MA",
"Type": "CREDIT",
"Brand": "MASTERCARD",
"SubType": null
}
}
```
```json REST
{
"RecurringPayinRegistrationId": "recpayinreg_m_01JJP2KS2A47A0P7S7CEBQPHT9",
"Tag": "Created using Mangopay API Postman Collection",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"Fees": {
"Currency": "EUR",
"Amount": 500
},
"StatementDescriptor": "Example123"
}
```
```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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/recurring-card-payins/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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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)
Source: https://docs.mangopay.com/api-reference/recurring-card-payins/view-payin-recurring
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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)
The language of the browser.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 cards.
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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": "payin_m_01JJP2PDQWD7S2W42RR6S21VZE",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1738058031,
"AuthorId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CreditedUserId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 9500
},
"Fees": {
"Currency": "EUR",
"Amount": 500
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1738058032,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "wlt_m_01JJ70WZ9JRAZ9GE0DA36Q84NQ",
"DebitedWalletId": null,
"PaymentType": "CARD",
"ExecutionType": "DIRECT",
"SecureMode": null,
"CardId": "card_m_UsklnOoXBWyyqhsN",
"SecureModeReturnURL": null,
"SecureModeRedirectURL": null,
"SecureModeNeeded": false,
"Culture": "EN",
"SecurityInfo": {
"AVSResult": "NO_CHECK"
},
"StatementDescriptor": "Example123",
"BrowserInfo": null,
"IpAddress": null,
"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": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"Requested3DSVersion": null,
"Applied3DSVersion": "V2_1",
"RecurringPayinRegistrationId": "recpayinreg_m_01JJP2KS2A47A0P7S7CEBQPHT9",
"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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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 (Card)
Source: https://docs.mangopay.com/api-reference/recurring-payin-registrations/create-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
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Required if `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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. You can only use objects with `Migration` set to `false`. When Mangopay decommissions this parameter (date communicated by email), the `false` value will be forced on all objects, including existing ones. Before decommissioning, you need to re-create the object; after decommissioning, you can re-authenticate the same object.
The need to re-authenticate 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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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. You can only use objects with `Migration` set to `false`. When Mangopay decommissions this parameter (date communicated by email), the `false` value will be forced on all objects, including existing ones. Before decommissioning, you need to re-create the object; after decommissioning, you can re-authenticate the same object.
The need to re-authenticate 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).
**Returned values:** `CARD_DIRECT`, `PAYPAL`
**Default value:** `CARD_DIRECT`
The type of recurring pay-in registration (which must correspond to the pay-ins requested against it).
```json 200
{
"Id": "recpayinreg_m_01JJP2KS2A47A0P7S7CEBQPHT9",
"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": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CardId": "card_m_UsklnOoXBWyyqhsN",
"CreditedUserId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CreditedWalletId": "wlt_m_01JJ70WZ9JRAZ9GE0DA36Q84NQ",
"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": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"EndDate": null,
"Frequency": "Monthly",
"FixedNextAmount": true,
"FractionedPayment": false,
"FreeCycles": 0,
"FirstTransactionDebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"FirstTransactionFees": {
"Currency": "EUR",
"Amount": 500
},
"NextTransactionDebitedFunds": null,
"NextTransactionFees": null,
"Migration": false,
"PaymentType": "CARD_DIRECT"
}
```
```json 200 - 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": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"Shipping": {
"FirstName": "Kaia",
"LastName": "Wilkinson",
"Address": {
"AddressLine1": "69241 Chaya Ports",
"AddressLine2": "Ebert Ports",
"City": "Paris",
"Region": "Île-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,
"PaymentType":"CARD_DIRECT"
}
```
```json REST
{
"AuthorId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CardId": "card_m_UsklnOoXBWyyqhsN",
"CreditedWalletId": "wlt_m_01JJ70WZ9JRAZ9GE0DA36Q84NQ",
"FirstTransactionDebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"FirstTransactionFees": {
"Currency": "EUR",
"Amount": 500
},
"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": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"Frequency": "Monthly",
"FixedNextAmount": true,
"FractionedPayment": false
}
```
```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 = 'Île-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);
}
}
```
# Create a Recurring PayIn Registration (PayPal)
Source: https://docs.mangopay.com/api-reference/recurring-payin-registrations/create-recurring-payin-registration-paypal
POST /v2.01/{ClientId}/recurringpayinregistrations
**Note – Only one registration per user on PayPal**
On PayPal, only one recurring pay-in registration can be used per `UserId`. You can [end a user's existing registration](/api-reference/recurring-payin-registrations/update-recurring-payin-registration-paypal) object to create a new one with the same user.
### Body parameters
The unique identifier of the user at the source of the transaction.
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`).
Information about the end user's 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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
For PayPal recurring registrations, this value is ignored if sent and automatically returned `false`. However, you can specify `NextTransactionDebitedFunds` and `NextTransactionFees` to set up a fixed-amount recurrence.
The amount 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 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`).
**Allowed values:** `CARD_DIRECT`, `PAYPAL`
**Default value:** `CARD_DIRECT`
The type of recurring pay-in registration (which must correspond to the pay-ins requested against it).
**Note:** Multiple active `CARD_DIRECT` registrations can exist for a user, but only one `PAYPAL` 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.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
**Returned values:** `CREATED`, `AUTHENTICATION_NEEDED`, `IN_PROGRESS`, `ENDED`
The status of the recurring registration for PayPal:
* `CREATED` – The recurring registration was created, but no recurring pay-in has yet been made.
* `AUTHENTICATION_NEEDED` – A customer-initiated transaction (CIT) has been initiated against the registration but not authenticated. Note that there is no re-authentication process with PayPal: this status is only returned after the CIT is initiated but not yet successful.
* `IN_PROGRESS` – The CIT has was successful and subsequent merchant-initiated transactions (MIT) can be requested.
* `ENDED` – The registration can no longer be modified nor reused. A new one can be created for the same user.
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:** `CUSTOM`
For PayPal recurring registrations, this value is always `CUSTOM`.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is returned `null`.
The unique identifier of the user at the source of the transaction.
For PayPal recurring registrations, this value is returned `null`.
**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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
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
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is ignored if sent and automatically returned `false`. However, you can specify `NextTransactionDebitedFunds` and `NextTransactionFees` to set up a fixed-amount recurrence.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is returned `0`.
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.
**Returned values:** 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`).
For PayPal recurring registrations, this value is returned `false`.
**Returned values:** `CARD_DIRECT`, `PAYPAL`
**Default value:** `CARD_DIRECT`
The type of recurring pay-in registration (which must correspond to the pay-ins requested against it).
```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": "be73db6f-f78e-4e71-9602-11633626dc9a",
"Date": 1731941788,
"errors": {
"AuthorId": "RecurringPayInRegistration already exists for given AuthorId=user_m_01JCQYRAFZQMN5TD4X5Z3JFZT0 and PaymentType=PAYPAL"
}
}
```
```json 200
{
"Id": "recpayinreg_wt_c1fb7e3f-8204-4427-9251-df886fbb4e42",
"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": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"CardId": null,
"CreditedUserId": null,
"CreditedWalletId": "wlt_m_01J9KR4A7BH8KVE4PG6DTNS817",
"Billing": {
"FirstName": "Ofelia",
"LastName": "Kilback",
"Address": {
"AddressLine1": "8151 Sipes Turnpike",
"AddressLine2": "Garfield Meadows",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"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"
}
},
"EndDate": null,
"Frequency": null,
"FixedNextAmount": false,
"FractionedPayment": false,
"FreeCycles": 0,
"FirstTransactionDebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"FirstTransactionFees": {
"Currency": "EUR",
"Amount": 1000
},
"NextTransactionDebitedFunds": null,
"NextTransactionFees": null,
"Migration": false,
"PaymentType": "PAYPAL"
}
```
```json REST
{
"AuthorId": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"CreditedWalletId": "wlt_m_01J9KR4A7BH8KVE4PG6DTNS817",
"FirstTransactionDebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"FirstTransactionFees": {
"Currency": "EUR",
"Amount": 1000
},
"Billing": {
"FirstName": "Ofelia",
"LastName": "Kilback",
"Address": {
"AddressLine1": "8151 Sipes Turnpike",
"AddressLine2": "Garfield Meadows",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"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"
}
},
"PaymentType": "PAYPAL"
}
```
# The Recurring PayIn Registration object
Source: https://docs.mangopay.com/api-reference/recurring-payin-registrations/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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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. You can only use objects with `Migration` set to `false`. When Mangopay decommissions this parameter (date communicated by email), the `false` value will be forced on all objects, including existing ones. Before decommissioning, you need to re-create the object; after decommissioning, you can re-authenticate the same object.
The need to re-authenticate 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
# The Recurring PayIn Registration object (PayPal)
Source: https://docs.mangopay.com/api-reference/recurring-payin-registrations/recurring-payin-registration-object-paypal
### Description
Mangopay relies on the Recurring PayIn Registration object to store all the relevant information about a series of recurring pay-ins.
To use the recurring registration with PayPal, set the `PaymentType` to `PAYPAL` during the POST call. The same object is used to link [recurring card payments](/api-reference/recurring-payin-registrations/recurring-payin-registration-object), but with different features available.
For more information about recurring payments with PayPal, refer to the [PayPal](/guides/payment-methods/paypal) guide.
### Attributes
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
**Returned values:** `CREATED`, `AUTHENTICATION_NEEDED`, `IN_PROGRESS`, `ENDED`
The status of the recurring registration for PayPal:
* `CREATED` – The recurring registration was created, but no recurring pay-in has yet been made.
* `AUTHENTICATION_NEEDED` – A customer-initiated transaction (CIT) has been initiated against the registration but not authenticated. Note that there is no re-authentication process with PayPal: this status is only returned after the CIT is initiated but not yet successful.
* `IN_PROGRESS` – The CIT has was successful and subsequent merchant-initiated transactions (MIT) can be requested.
* `ENDED` – The registration can no longer be modified nor reused. A new one can be created for the same user.
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:** `CUSTOM`
For PayPal recurring registrations, this value is always `CUSTOM`.
For PayPal recurring registrations, this value is returned `null`.
The unique identifier of the user at the source of the transaction.
For PayPal recurring registrations, this value is returned `null`.
**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 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
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is ignored if sent and automatically returned `false`. However, you can specify `NextTransactionDebitedFunds` and `NextTransactionFees` to set up a fixed-amount recurrence.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is returned `0`.
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 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`).
For PayPal recurring registrations, this value is returned `false`.
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 PayPal payments
# Update a Recurring PayIn Registration
Source: https://docs.mangopay.com/api-reference/recurring-payin-registrations/update-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.
### Path parameters
The unique identifier of the recurring pay-in registration.
### 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.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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. You can only use objects with `Migration` set to `false`. When Mangopay decommissions this parameter (date communicated by email), the `false` value will be forced on all objects, including existing ones. Before decommissioning, you need to re-create the object; after decommissioning, you can re-authenticate the same object.
The need to re-authenticate 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).
**Returned values:** `CARD_DIRECT`, `PAYPAL`
**Default value:** `CARD_DIRECT`
The type of recurring pay-in registration (which must correspond to the pay-ins requested against it).
```json 200
{
"Id": "recpayinreg_m_01JJP2KS2A47A0P7S7CEBQPHT9",
"Status": "AUTHENTICATION_NEEDED",
"ResultCode": null,
"ResultMessage": null,
"CurrentState": {
"PayinsLinked": 2,
"CumulatedDebitedAmount": {
"Currency": "EUR",
"Amount": 20000
},
"CumulatedFeesAmount": {
"Currency": "EUR",
"Amount": 1000
},
"LastPayinId": "payin_m_01JJP59QGFVTMF9Y6YP0K3DXR0"
},
"RecurringType": "CUSTOM",
"TotalAmount": null,
"CycleNumber": null,
"AuthorId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CardId": "card_m_jjPYSyeofKHucJCB",
"CreditedUserId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CreditedWalletId": "wlt_m_01JJ70WZ9JRAZ9GE0DA36Q84NQ",
"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": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"EndDate": null,
"Frequency": "Monthly",
"FixedNextAmount": true,
"FractionedPayment": false,
"FreeCycles": 0,
"FirstTransactionDebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"FirstTransactionFees": {
"Currency": "EUR",
"Amount": 500
},
"NextTransactionDebitedFunds": null,
"NextTransactionFees": null,
"Migration": false,
"PaymentType": "CARD_DIRECT"
}
```
```json REST
{
// "Status": "ENDED",
"CardId": "card_m_jjPYSyeofKHucJCB", // New card
"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": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"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 = 'Île-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);
}
}
```
# Update a Recurring PayIn Registration (PayPal)
Source: https://docs.mangopay.com/api-reference/recurring-payin-registrations/update-recurring-payin-registration-paypal
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. Note that for PayPal, only one recurring registration can be used per `UserId`, so you may need to set the registration to `ENDED` in order to create a new one with the same user.
* `Billing` and `Shipping` – To change information about billing and shipping.
### Path parameters
The unique identifier of the recurring pay-in registration.
### Body parameters
**Allowed values:** `ENDED`
The status of the recurring registration for PayPal:
* `CREATED` – The recurring registration was created, but no recurring pay-in has yet been made.
* `AUTHENTICATION_NEEDED` – A customer-initiated transaction (CIT) has been initiated against the registration but not authenticated. Note that there is no re-authentication process with PayPal: this status is only returned after the CIT is initiated but not yet successful.
* `IN_PROGRESS` – The CIT has was successful and subsequent merchant-initiated transactions (MIT) can be requested.
* `ENDED` – The registration can no longer be modified nor reused. A new one can be created for the same user.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Information about the end user's 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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
**Returned values:** `CREATED`, `AUTHENTICATION_NEEDED`, `IN_PROGRESS`, `ENDED`
The status of the recurring registration for PayPal:
* `CREATED` – The recurring registration was created, but no recurring pay-in has yet been made.
* `AUTHENTICATION_NEEDED` – A customer-initiated transaction (CIT) has been initiated against the registration but not authenticated. Note that there is no re-authentication process with PayPal: this status is only returned after the CIT is initiated but not yet successful.
* `IN_PROGRESS` – The CIT has was successful and subsequent merchant-initiated transactions (MIT) can be requested.
* `ENDED` – The registration can no longer be modified nor reused. A new one can be created for the same user.
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:** `CUSTOM`
For PayPal recurring registrations, this value is always `CUSTOM`.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is returned `null`.
The unique identifier of the user at the source of the transaction.
For PayPal recurring registrations, this value is returned `null`.
**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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
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
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is ignored if sent and automatically returned `false`. However, you can specify `NextTransactionDebitedFunds` and `NextTransactionFees` to set up a fixed-amount recurrence.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is returned `0`.
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`).
For PayPal recurring registrations, this value is returned `false`.
**Returned values:** `CARD_DIRECT`, `PAYPAL`
**Default value:** `CARD_DIRECT`
The type of recurring pay-in registration (which must correspond to the pay-ins requested against it).
```json 200
{
"Id": "recpayinreg_wt_c1fb7e3f-8204-4427-9251-df886fbb4e42",
"Status": "ENDED",
"ResultCode": null,
"ResultMessage": null,
"CurrentState": {
"PayinsLinked": 2,
"CumulatedDebitedAmount": {
"Currency": "EUR",
"Amount": 14500
},
"CumulatedFeesAmount": {
"Currency": "EUR",
"Amount": 1000
},
"LastPayinId": "wt_70621ad8-4ea8-4ea5-9893-b4b5ebb1da17"
},
"RecurringType": "CUSTOM",
"TotalAmount": null,
"CycleNumber": null,
"AuthorId": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"CardId": null,
"CreditedUserId": null,
"CreditedWalletId": "wlt_m_01J9KR4A7BH8KVE4PG6DTNS817",
"Billing": {
"FirstName": "Ofelia",
"LastName": "Kilback",
"Address": {
"AddressLine1": "8151 Sipes Turnpike",
"AddressLine2": "Garfield Meadows",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"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"
}
},
"EndDate": null,
"Frequency": null,
"FixedNextAmount": false,
"FractionedPayment": false,
"FreeCycles": 0,
"FirstTransactionDebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"FirstTransactionFees": {
"Currency": "EUR",
"Amount": 1000
},
"NextTransactionDebitedFunds": null,
"NextTransactionFees": null,
"Migration": false,
"PaymentType": "PAYPAL"
}
```
```json REST
{
"Status":"ENDED"
}
```
# View a Recurring PayIn Registration
Source: https://docs.mangopay.com/api-reference/recurring-payin-registrations/view-recurring-payin-registration
GET /v2.01/{ClientId}/recurringpayinregistrations/{RecurringPayinRegistrationId}
### Query parameters
The unique identifier of the recurring pay-in registration.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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. You can only use objects with `Migration` set to `false`. When Mangopay decommissions this parameter (date communicated by email), the `false` value will be forced on all objects, including existing ones. Before decommissioning, you need to re-create the object; after decommissioning, you can re-authenticate the same object.
The need to re-authenticate 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).
**Returned values:** `CARD_DIRECT`, `PAYPAL`
**Default value:** `CARD_DIRECT`
The type of recurring pay-in registration (which must correspond to the pay-ins requested against it).
```json 200
{
"Id": "recpayinreg_m_01JJP2KS2A47A0P7S7CEBQPHT9",
"Status": "IN_PROGRESS",
"ResultCode": null,
"ResultMessage": null,
"CurrentState": {
"PayinsLinked": 2,
"CumulatedDebitedAmount": {
"Currency": "EUR",
"Amount": 20000
},
"CumulatedFeesAmount": {
"Currency": "EUR",
"Amount": 1000
},
"LastPayinId": "payin_m_01JJP59QGFVTMF9Y6YP0K3DXR0"
},
"RecurringType": "CUSTOM",
"TotalAmount": null,
"CycleNumber": null,
"AuthorId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CardId": "card_m_UsklnOoXBWyyqhsN",
"CreditedUserId": "user_m_01JHX34N3Y9BCQP7KR9QWWETDQ",
"CreditedWalletId": "wlt_m_01JJ70WZ9JRAZ9GE0DA36Q84NQ",
"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": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "île-de-France",
"PostalCode": "75003",
"Country": "FR"
}
},
"EndDate": null,
"Frequency": "Monthly",
"FixedNextAmount": true,
"FractionedPayment": false,
"FreeCycles": 0,
"FirstTransactionDebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"FirstTransactionFees": {
"Currency": "EUR",
"Amount": 500
},
"NextTransactionDebitedFunds": null,
"NextTransactionFees": null,
"Migration": false,
"PaymentType": "CARD_DIRECT"
}
```
```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);
}
}
```
# View a Recurring PayIn Registration (PayPal)
Source: https://docs.mangopay.com/api-reference/recurring-payin-registrations/view-recurring-payin-registration-paypal
GET /v2.01/{ClientId}/recurringpayinregistrations/{RecurringPayinRegistrationId}
### Query parameters
The unique identifier of the recurring pay-in registration.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
**Returned values:** `CREATED`, `AUTHENTICATION_NEEDED`, `IN_PROGRESS`, `ENDED`
The status of the recurring registration for PayPal:
* `CREATED` – The recurring registration was created, but no recurring pay-in has yet been made.
* `AUTHENTICATION_NEEDED` – A customer-initiated transaction (CIT) has been initiated against the registration but not authenticated. Note that there is no re-authentication process with PayPal: this status is only returned after the CIT is initiated but not yet successful.
* `IN_PROGRESS` – The CIT has was successful and subsequent merchant-initiated transactions (MIT) can be requested.
* `ENDED` – The registration can no longer be modified nor reused. A new one can be created for the same user.
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:** `CUSTOM`
For PayPal recurring registrations, this value is always `CUSTOM`.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is returned `null`.
The unique identifier of the user at the source of the transaction.
For PayPal recurring registrations, this value is returned `null`.
**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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
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
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is ignored if sent and automatically returned `false`. However, you can specify `NextTransactionDebitedFunds` and `NextTransactionFees` to set up a fixed-amount recurrence.
For PayPal recurring registrations, this value is returned `null`.
For PayPal recurring registrations, this value is returned `0`.
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`).
For PayPal recurring registrations, this value is returned `false`.
**Returned values:** `CARD_DIRECT`, `PAYPAL`
**Default value:** `CARD_DIRECT`
The type of recurring pay-in registration (which must correspond to the pay-ins requested against it).
```json 200
{
"Id": "recpayinreg_wt_c1fb7e3f-8204-4427-9251-df886fbb4e42",
"Status": "IN_PROGRESS",
"ResultCode": null,
"ResultMessage": null,
"CurrentState": {
"PayinsLinked": 2,
"CumulatedDebitedAmount": {
"Currency": "EUR",
"Amount": 14500
},
"CumulatedFeesAmount": {
"Currency": "EUR",
"Amount": 1000
},
"LastPayinId": "wt_70621ad8-4ea8-4ea5-9893-b4b5ebb1da17"
},
"RecurringType": "CUSTOM",
"TotalAmount": null,
"CycleNumber": null,
"AuthorId": "user_m_01J9KR16BG7EDC8RNEY2M18EXK",
"CardId": null,
"CreditedUserId": null,
"CreditedWalletId": "wlt_m_01J9KR4A7BH8KVE4PG6DTNS817",
"Billing": {
"FirstName": "Ofelia",
"LastName": "Kilback",
"Address": {
"AddressLine1": "8151 Sipes Turnpike",
"AddressLine2": "Garfield Meadows",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"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"
}
},
"EndDate": null,
"Frequency": null,
"FixedNextAmount": false,
"FractionedPayment": false,
"FreeCycles": 0,
"FirstTransactionDebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"FirstTransactionFees": {
"Currency": "EUR",
"Amount": 1000
},
"NextTransactionDebitedFunds": null,
"NextTransactionFees": null,
"Migration": false,
"PaymentType": "PAYPAL"
}
```
```json REST
// GET has no body parameters
```
# Create a Refund for a PayIn
Source: https://docs.mangopay.com/api-reference/refunds/create-refund-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 status is `SUCCEEDED`.
* The initial transaction hasn't been disputed.
* The initial transaction was made within the time window specified for the [payment method](/guides/payment-methods).
[Read more about pay-in refunds](/guides/refunds#pay-in-refunds) **→**
### 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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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"
}
}
```
A 404 is returned if the initial transaction has been archived after 13 months and no longer available via the API (see [data availability](/api-reference/overview/data-availability-periods) for details). Note that for many payment methods, the period during which a refund is allowed is shorter than 13 months.
```json
{
"Message": "The ressource does not exist",
"Type": "ressource_not_found",
"Id": "4ce07ad6-8d30-4dc1-82c1-fe4596ae67d4#1747900976",
"Date": 1747900977,
"errors": {
"ResourceNotFound": "Cannot found the resource PayIn with the id=payin_m_01HPF0PN7SCWZ6TFPRHPBMXSAG "
}
}
```
```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
Source: https://docs.mangopay.com/api-reference/refunds/create-refund-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.
[Read more about transfer refunds](/guides/refunds#transfer-refunds) **→**
### 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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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": "1b89213a-a294-46b8-b52d-f3ab83637e7b",
"Date": 1749200669.0,
"errors": {
"TransferId": "Original transaction has already been successfully refunded"
}
}
```
```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": "7ab5e4dd-769f-4d0a-82c6-d0139bcf24dd#1748866860",
"Date": 1748866861,
"errors": {
"DebitedFunds": "DebitedFunds cannot be higher than CreditedFunds of the initial transfer"
}
}
```
```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
Source: https://docs.mangopay.com/api-reference/refunds/list-refunds-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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": "wt_498263ef-5a87-4ef9-a2ab-995748fc478a",
"Tag": "Partial refund with fees refunded",
"CreationDate": 1737388152,
"AuthorId": "user_m_01JHSSTVRDN5SN9T14SRC6SA9A",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 2500
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 3000
},
"Fees": {
"Currency": "EUR",
"Amount": -500
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1737388152,
"Type": "PAYOUT",
"Nature": "REFUND",
"InitialTransactionId": "wt_bbcb7335-d513-49f6-a86b-502de501d675",
"InitialTransactionType": "PAYIN",
"InitialTransactionNature": "REGULAR",
"DebitedWalletId": "wlt_m_01JHSSTYGT28P1F5KJ82QZ0K65",
"CreditedWalletId": null
},
{
"Id": "wt_498263ef-5a87-4ef9-a2ab-995748fc478a",
"Tag": "Partial refund with more fees taken",
"CreationDate": 1737388152,
"AuthorId": "user_m_01JHSSTVRDN5SN9T14SRC6SA9A",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 2500
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 2000
},
"Fees": {
"Currency": "EUR",
"Amount": 500
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1737388152,
"Type": "PAYOUT",
"Nature": "REFUND",
"InitialTransactionId": "wt_bbcb7335-d513-49f6-a86b-502de501d675",
"InitialTransactionType": "PAYIN",
"InitialTransactionNature": "REGULAR",
"DebitedWalletId": "wlt_m_01JHSSTYGT28P1F5KJ82QZ0K65",
"CreditedWalletId": 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 {
$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
Source: https://docs.mangopay.com/api-reference/refunds/list-refunds-payout
GET /v2.01/{ClientId}/payouts/{PayoutId}/refunds
This call returns the refund for a payout, which is known as a **payout return** or return of funds.
A payout return is only generated by Mangopay. For more information, see the [payout returns](/guides/payouts/rejects-returns) guide.
### 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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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": "refund_m_01JJ22Z1JGMFEHB5P4B5DZ8CCQ",
"Tag": null,
"CreationDate": 1734628083,
"AuthorId": "user_m_01JJ22ZEP6JQQ5KMBPHBGYFQBG",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 12000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 12000
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1734628084,
"Type": "PAYIN",
"Nature": "REFUND",
"InitialTransactionId": "po_m_01JJ2303Q94M2SNSFEX4M3W3N0",
"InitialTransactionType": "PAYOUT",
"InitialTransactionNature": "REGULAR",
"DebitedWalletId": null,
"CreditedWalletId": "wlt_m_01JJ230JF16SKNVFR2FRPHEZWZ"
}
]
```
```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 {
$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
Source: https://docs.mangopay.com/api-reference/refunds/list-refunds-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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": "refund_m_01JJ22PR01NMY4M8HXB3AW6KG7",
"Tag": null,
"CreationDate": 1737367609,
"AuthorId": "user_m_01JJ22Q2A0NXNK26B67BD1MP4R",
"CreditedUserId": "your-mangopay-client-id",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 13000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 13000
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1737367609,
"Type": "PAYIN",
"Nature": "REFUND",
"InitialTransactionId": "repud_m_01JJ22HPJ8Y0E4YW7D9XR96WZY",
"InitialTransactionType": "PAYOUT",
"InitialTransactionNature": "REPUDIATION",
"DebitedWalletId": null,
"CreditedWalletId": "CREDIT_EUR"
}
]
```
```json REST
// GET has no body parameters
```
```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
Source: https://docs.mangopay.com/api-reference/refunds/list-refunds-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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": "refund_m_01JJ264GDXH7QAW558VMKBCE2M",
"Tag": "Partial refund with fees refunded",
"CreationDate": 1737387819,
"AuthorId": "user_m_01JHSSTVRDN5SN9T14SRC6SA9A",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1782
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 2454
},
"Fees": {
"Currency": "EUR",
"Amount": -672
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1737387819,
"Type": "TRANSFER",
"Nature": "REFUND",
"CreditedWalletId": "wlt_m_01JHSSTYGT28P1F5KJ82QZ0K65",
"DebitedWalletId": "wlt_m_01JJ25YQA60D8FVZYEBMXG733F"
},
{
"Id": "refund_m_01JJ264WWWPCM1WPS3TG08G0Y2",
"Tag": "Partial refund with more fees taken",
"CreationDate": 1737387832,
"AuthorId": "user_m_01JHSSTVRDN5SN9T14SRC6SA9A",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1672
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1183
},
"Fees": {
"Currency": "EUR",
"Amount": 489
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1737387832,
"Type": "TRANSFER",
"Nature": "REFUND",
"CreditedWalletId": "wlt_m_01JHSSTYGT28P1F5KJ82QZ0K65",
"DebitedWalletId": "wlt_m_01JJ25YQA60D8FVZYEBMXG733F"
}
]
```
```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 {
$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
Source: https://docs.mangopay.com/api-reference/refunds/refund-object
### Description
Mangopay relies on the Refund object to manage the reimbursement of a past transaction. A Refund object has the value `REFUND` as its `Nature` and is linked to the transaction being reimbursed by its `InitialTransactionId` property.
Two types of refund are initiated by the platform (see the [Refunds](/guides/refunds) guide for details):
* **Pay-in refund** – Platform request to reimburse a pay-in.
* **Transfer refund** – Platform request to reimburse a transfer.
There are two other cases generated automatically by Mangopay:
* **Payout return** – Return of funds created when, for instance, the end user's bank account is closed or if the acquiring bank refuses the funds. This transaction re-credits the wallet from which the payout was sent. See the [Payouts](/guides/payouts/rejects-returns) guide for more details.
* **Repudiation return** – Return of funds created when a dispute is won in favor of the platform. This transaction re-credits the Repudiation Wallet, from which the repudiation was debited. See the [Disputes](/guides/disputes) guide for more details.
**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 pay-in and transfer refunds
Learn more about payout returns
Learn more about disputes and repudiations
# View a Refund
Source: https://docs.mangopay.com/api-reference/refunds/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 Pay-in refund
{
"Id": "refund_m_01JJ23MDDHCXX1GYVKDPYNJKJ8",
"Tag": "Example with fees refunded",
"CreationDate": 1730373612,
"AuthorId": "user_m_01JJ23MPT0Y79AFQA637ZK81CF",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 500
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 550
},
"Fees": {
"Currency": "EUR",
"Amount": -50
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1730373612,
"Type": "PAYOUT",
"Nature": "REFUND",
"InitialTransactionId": "payin_m_01JJ23NT128Y1V1B5B16VKMQ92",
"InitialTransactionType": "PAYIN",
"InitialTransactionNature": "REGULAR",
"DebitedWalletId": "wlt_m_01JJ23NKD34XA6G4N70ZFKFH5W",
"CreditedWalletId": null,
"RefundReason": {
"RefundReasonMessage": null,
"RefundReasonType": "INITIALIZED_BY_CLIENT"
},
"StatementDescriptor": null
}
```
```json Transfer refund
{
"Id": "refund_m_01JJ24GYE8X6MMSR26F0A2VRR9",
"Tag": "Example with fees taken",
"CreationDate": 1737386006,
"AuthorId": "user_m_01JJ24H7HV1H38GRCCY4Q8ZR85",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 2000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1900
},
"Fees": {
"Currency": "EUR",
"Amount": 100
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1737386006,
"Type": "TRANSFER",
"Nature": "REFUND",
"InitialTransactionId": "xfer_m_01JJ24NTCVFSPH5TK453Y623HF",
"InitialTransactionType": "TRANSFER",
"InitialTransactionNature": "REGULAR",
"DebitedWalletId": "wlt_m_01JJ24P7QXT0W0F917DXNQF49S",
"CreditedWalletId": "wlt_m_01JJ24PH51DAJR2H63BDCHSN84",
"RefundReason": {
"RefundReasonMessage": null,
"RefundReasonType": "OTHER"
},
"StatementDescriptor": null
}
```
```json Payout return
{
"Id": "refund_m_01JJ22Z1JGMFEHB5P4B5DZ8CCQ",
"Tag": null,
"CreationDate": 1734628083,
"AuthorId": "user_m_01JJ22ZEP6JQQ5KMBPHBGYFQBG",
"CreditedUserId": null,
"DebitedFunds": {
"Currency": "EUR",
"Amount": 12000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 12000
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1734628084,
"Type": "PAYIN",
"Nature": "REFUND",
"InitialTransactionId": "po_m_01JJ2303Q94M2SNSFEX4M3W3N0",
"InitialTransactionType": "PAYOUT",
"InitialTransactionNature": "REGULAR",
"DebitedWalletId": null,
"CreditedWalletId": "wlt_m_01JJ230JF16SKNVFR2FRPHEZWZ",
"RefundReason": {
"RefundReasonMessage": "AC04",
"RefundReasonType": "BANKACCOUNT_HAS_BEEN_CLOSED"
},
"StatementDescriptor": null
}
```
```json Repudiation return
{
"Id": "refund_m_01JJ22PR01NMY4M8HXB3AW6KG7",
"Tag": null,
"CreationDate": 1737367609,
"AuthorId": "user_m_01JJ22Q2A0NXNK26B67BD1MP4R",
"CreditedUserId": "your-mangopay-client-id",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 13000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 13000
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1737367609,
"Type": "PAYIN",
"Nature": "REFUND",
"InitialTransactionId": "repud_m_01JJ22HPJ8Y0E4YW7D9XR96WZY",
"InitialTransactionType": "PAYOUT",
"InitialTransactionNature": "REPUDIATION",
"DebitedWalletId": null,
"CreditedWalletId": "CREDIT_EUR",
"RefundReason": {
"RefundReasonMessage": null,
"RefundReasonType": "OTHER"
},
"StatementDescriptor": 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 {
$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 Report
Source: https://docs.mangopay.com/api-reference/reporting/create-report
POST /v2.01/{ClientId}/reporting/reports
Generate a reporting service report
This endpoint generates a report from Mangopay's Reporting Service, which is replacing the legacy report types.
Two types of report are available, specified in the `ReportType`:
* `USER_WALLET_TRANSACTIONS` – All transactions crediting or debiting user wallets: pay-ins, transfers, conversions, and payouts, as well as refunds of all types and repudiations (from chargebacks).
* `COLLECTED_FEES`– Detail of transactions crediting or debiting the fees wallet: transactions of all types (pay-ins, transfers, refunds, payouts, etc.) that have a positive or negative fees amount.
**Note – Report expires after 31 days**
A Reporting Service report expires after 31 days, at which point it can no longer be downloaded. On expiry, the report's `Status` becomes `EXPIRED` and the `DownloadURL` becomes `null`.
You can generate a new report with the same filters and dates.
### 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.
**Possible values:** `CSV`
The format of the report file.
The type of the report:
* `USER_WALLET_TRANSACTIONS` – All transactions crediting or debiting user wallets: pay-ins, transfers, conversions, and payouts, as well as refunds of all types and repudiations (from chargebacks).
* `COLLECTED_FEES`– Detail of transactions crediting or debiting the fees wallet: transactions of all types (pay-ins, transfers, refunds, payouts, etc.) that have a positive or negative fees amount.
**Possible values:** `CreationDate:ASC`, `CreationDate:DESC`
**Default value**: `CreationDate:ASC`
The sort direction based on transaction creation date.
**Possible values:** Any past date and time up 24 months ago that is earlier than the `BeforeDate` by less than 12 months
The date and time after which the report's transaction was created, based on the transaction's `CreationDate`.
**Possible values:** Any past date and time up 24 months ago that is later than the `AfterDate` by less than 12 months
The date and time before which the report's transaction was created, based on the transaction's `CreationDate`.
Possible values: `Currency`, `UserId`, `WalletId`
The filers to apply.
If the `ReportType` is `COLLECTED_FEES`, only the `Currency` filter can be used. If the currency is not specified, the report contains data on all currencies.
If the `ReportType` is `USER_WALLET_TRANSACTIONS`, each filter can be used on its own or in combination, in which case the report data satisfies both filters.
* `UserId` and `Currency` – Report contains all transactions (credited or debited) in the currency where UserId is the AuthorId
* `UserId` and `WalletId` – Report contains all transactions (credited or debited) in all currencies where the UserId is specified as the `DebitedWalletId` or `CreditedWalletId`. If the `WalletId` is not a wallet owned by the `UserId`, then the report will be empty.
The `Currency` and `WalletId` cannot be used together.
If no `Filters` are specified, the report contains all transactions crediting or debiting all user wallets.
**Caution:** The `WalletId` and `UserId` values are not validated before the request is launched, so if both are used but don't correspond (the user doesn't own the wallet), then the report will be empty.
The currency of the `DebitedFunds`, `CreditedFunds`, or `Fees` of the transactions.
The unique identifier of the user referenced as the `AuthorId` or `CreditedUserId` of the transaction.
The unique identifier of the wallet referenced as the `DebitedWalletId` or `CreditedWalletId` of the transaction.
**Possible values:** The columns listed in the [Reports](/reports) guide, which differ according to the report type.
**Default values:** The default columns listed in the [Reports](/reports) guide, which differ according to the report type.
The data columns to be included in the report.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
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 object was created.
The date and time at which the report was generated.
**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).
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:** `CSV`
The format in which the report is going to be downloaded.
The URL at which the report file can be downloaded when the `Status` is `GENERATED`.
The type of the report:
* `USER_WALLET_TRANSACTIONS` – All transactions crediting or debiting user wallets: pay-ins, transfers, conversions, and payouts, as well as refunds of all types and repudiations (from chargebacks).
* `COLLECTED_FEES`– Detail of transactions crediting or debiting the fees wallet: transactions of all types (pay-ins, transfers, refunds, payouts, etc.) that have a positive or negative fees amount.
The sorting direction of the CreationDate column. By default, the generated report is sorted by ascending creation date.
**Possible values:** Any date and time (before the `BeforeDate`) between the present and 24 months ago.
The date and time after which the report's transaction was created, based on the transaction's `CreationDate`.
**Note:** The period between the `AfterDate` and the `BeforeDate` cannot exceed 12 months.
**Possible values:** Any date and time (after the `AfterDate`) between the present and 24 months ago.
The date and time before which the report's transaction was created, based on the transaction's `CreationDate`.
**Note:** The period between the `AfterDate` and the `BeforeDate` cannot exceed 12 months.
Possible values: `Currency`, `UserId`, `WalletId`
The filers to apply.
If the `ReportType` is `COLLECTED_FEES`, only the `Currency` filter can be used. If the currency is not specified, the report contains data on all currencies.
If the `ReportType` is `USER_WALLET_TRANSACTIONS`, each filter can be used on its own or in combination, in which case the report data satisfies both filters.
* `UserId` and `Currency` – Report contains all transactions (credited or debited) in the currency where UserId is the AuthorId
* `UserId` and `WalletId` – Report contains all transactions (credited or debited) in all currencies where the UserId is specified as the `DebitedWalletId` or `CreditedWalletId`. If the `WalletId` is not a wallet owned by the `UserId`, then the report will be empty.
The `Currency` and `WalletId` cannot be used together.
If no `Filters` are specified, the report contains all transactions crediting or debiting all user wallets.
**Caution:** The `WalletId` and `UserId` values are not validated before the request is launched, so if both are used but don't correspond (the user doesn't own the wallet), then the report will be empty.
The currency of the `DebitedFunds`, `CreditedFunds`, or `Fees` of the transactions.
The unique identifier of the user referenced as the `AuthorId` or `CreditedUserId` of the transaction.
The unique identifier of the wallet referenced as the `DebitedWalletId` or `CreditedWalletId` of the transaction.
**Possible values:** The columns listed in the [Reports](/reports) guide, which differ according to the report type.
**Default values:** The default columns listed in the [Reports](/reports) guide, which differ according to the report type.
The data columns to be included in the report.
```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": "48455ac1-cdb1-4d15-b1e0-510a38770bd1",
"Date": 1748869280.0,
"errors": {
"UserId & Currency": "User Id or Wallet Id has to be provided in filters"
}
}
```
```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": "552b8151-ee15-4aaa-886c-aaf2757aea76",
"Date": 1748009585.0,
"errors": {
"Report": "Max 12 months between AfterDate and BeforeDate."
}
}
```
```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": "a82b56d6-2471-4b51-8480-af7e24cb695e",
"Date": 1748869101.0,
"errors": {
"Report": "Unknown columns were found in the list: Amount, Report Columns: ClientId, TransactionId, CreationDate, CreationDate:ISO, ExecutionDate, ExecutionDate:ISO, AuthorId, CreditedUserId, DebitedFundsAmount, DebitedFundsCurrency, CreditedFundsAmount, CreditedFundsCurrency, FeesAmount, FeesCurrency, Type, Nature, CreditedWalletId, DebitedWalletId, BankAccountId, PreauthorizationId, BankWireRef, CardId, CardAlias, CardType, CardCountry, CardExpirationDate, Culture, DeclaredDebitedFundsAmount, DeclaredDebitedFundsCurrency, DeclaredFeesAmount, DeclaredFeesCurrency, ExecutionType, PaymentType, WireReference"
}
}
```
```json User wallet transactions
{
"Id": "report_01JVVQFJETHHP9M9S18RN6N8JZ",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1747908544,
"ReportDate": null,
"Status": "PENDING",
"ResultCode": null,
"ResultMessage": null,
"DownloadFormat": "CSV",
"DownloadURL": null,
"ReportType": "USER_WALLET_TRANSACTIONS",
"Sort": "CreationDate:DESC",
"AfterDate": 1740787200,
"BeforeDate": 1743465599,
"Filters": {
"UserId": "user_m_01JSM1ZG3MAWR272S99ZKE2WSP",
"Currency": "EUR"
},
"Columns": [
"ClientId",
"TransactionId",
"CreationDate",
"ExecutionDate",
"AuthorId",
"CreditedUserId",
"DebitedFundsAmount",
"DebitedFundsCurrency",
"CreditedFundsAmount",
"CreditedFundsCurrency",
"FeesAmount",
"FeesCurrency",
"Type",
"Nature",
"CreditedWalletId",
"DebitedWalletId",
"BankAccountId",
"PreauthorizationId",
"BankWireRef",
"CardId",
"CardAlias",
"CardType",
"CardCountry",
"CardExpirationDate",
"Culture",
"DeclaredDebitedFundsAmount",
"DeclaredDebitedFundsCurrency",
"DeclaredFeesAmount",
"DeclaredFeesCurrency",
"ExecutionType",
"PaymentType",
"WireReference"
]
}
```
```json Collected fees
{
"Id": "report_01JVVQDDZ4AT67C2W62ZNK2DC2",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1747908474,
"ReportDate": null,
"Status": "PENDING",
"ResultCode": null,
"ResultMessage": null,
"DownloadFormat": "CSV",
"DownloadURL": null,
"ReportType": "COLLECTED_FEES",
"Sort": "CreationDate:DESC",
"AfterDate": 1740787200,
"BeforeDate": 1743544740,
"Filters": {
"Currency": "EUR"
},
"Columns": [
"ClientId",
"TransactionId",
"CreationDate",
"ExecutionDate",
"AuthorId",
"DebitedWalletId",
"CreditedWalletId",
"CreditedFundsCurrency",
"CreditedFundsAmount",
"DebitedFundsCurrency",
"DebitedFundsAmount",
"FeesAmount",
"FeesCurrency",
"Type",
"Nature",
"PaymentType",
"Tag"
]
}
```
```json User wallet transactions
{
"Tag": "Created using the Mangopay API Postman collection",
"DownloadFormat": "CSV",
"ReportType": "USER_WALLET_TRANSACTIONS",
"AfterDate": 1740787200,
"BeforeDate": 1743465599,
"Filters": {
"UserId": "user_m_01JSM1ZG3MAWR272S99ZKE2WSP",
"Currency": "EUR"
}
}
```
```json Collected fees
{
"Tag": "Created using the Mangopay API Postman collection",
"DownloadFormat": "CSV",
"ReportType": "COLLECTED_FEES",
"AfterDate": 1740787200,
"BeforeDate": 1743544740,
"Filters": {
"Currency": "EUR"
}
}
```
# List all Reports
Source: https://docs.mangopay.com/api-reference/reporting/list-reports
GET /v2.01/{ClientId}/reporting/reports
List key data of Reporting Service reports
### Query parameters
**Possible values:** `PENDING`, `GENERATING`, `GENERATED`, `EXPIRED`, `FAILED`
The status of the report:
* `PENDING` – The report generation request was accepted but is not yet being processed.
* `GENERATING` – The report is being generated.
* `GENERATED` – The report is ready for download at the `DownloadURL`
* `EXPIRED` – The report has expired and is no longer available for download.
* `FAILED` – Report generation was not successful.
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.
Min. value: `1`; max. value: `100`
**Default value:** `10`
Indicates the number of items returned for each page of the pagination.
Start value: `1`
**Default value:** `1`
Indicates the index of the page for the pagination.
### Responses
The list of reports created by the platform.
Key data about the Reporting Service report object created by the platform.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
The type of the report:
* `USER_WALLET_TRANSACTIONS` – All transactions crediting or debiting user wallets: pay-ins, transfers, conversions, and payouts, as well as refunds of all types and repudiations (from chargebacks).
* `COLLECTED_FEES`– Detail of transactions crediting or debiting the fees wallet: transactions of all types (pay-ins, transfers, refunds, payouts, etc.) that have a positive or negative fees amount.
**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).
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 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
[
{
"Id": "report_01JW6854FGRG1JVVSEWZP4B20C",
"ReportType": "COLLECTED_FEES",
"Status": "GENERATING",
"LastUpdated": 1748261573,
"CreationDate": 1748261573,
"Tag": "Created using the Mangopay API Postman collection",
"ResultCode": null,
"ResultMessage": null
},
{
"Id": "report_01JVYRQHQ7G5VKGA6SM0EEVVA5",
"ReportType": "USER_WALLET_TRANSACTIONS",
"Status": "GENERATED",
"LastUpdated": 1748010518,
"CreationDate": 1748010518,
"Tag": "Created using the Mangopay API Postman collection",
"ResultCode": "000000",
"ResultMessage": "Success"
},
{
"Id": "report_01JR92549WWKAP2G1WW0DRAC80",
"ReportType": "USER_WALLET_TRANSACTIONS",
"Status": "EXPIRED",
"LastUpdated": 1746739535,
"CreationDate": 1744060977,
"Tag": "Created using the Mangopay API Postman collection",
"ResultCode": "000000",
"ResultMessage": "Success"
}
]
```
```json REST
// GET has no body parameters
```
# The Report object
Source: https://docs.mangopay.com/api-reference/reporting/report-object
Report object of Mangopay's Reporting Service (2025)
### Description
Mangopay's Reporting Service replaces the legacy reports endpoints.
The Reporting Service enables your platform to download large amounts of data in CSV format for accounting or analysis purposes.
Two types of report are available, specified in the `ReportType`:
* `USER_WALLET_TRANSACTIONS` – All transactions crediting or debiting user wallets: pay-ins, transfers, conversions, and payouts, as well as refunds of all types and repudiations (from chargebacks).
* `COLLECTED_FEES`– Detail of transactions crediting or debiting the fees wallet: transactions of all types (pay-ins, transfers, refunds, payouts, etc.) that have a positive or negative fees amount.
### Differences with legacy reports
**Report coverage** – The `USER_WALLET_TRANSACTIONS` report provides the same data as the legacy Transactions report. A report serving the same purpose as the legacy Wallets report is planned in future. Any new types of reports developed in future will only be added to the Reporting Service.
**Webhook-based notification** – The Reporting Service introduces two [event types](/webhooks/event-types#reports) for [webhook notifications](/webhooks), `REPORT_GENERATED` and `REPORT_FAILED`, which replace the legacy system based on a callback URL for each report.
**Transitional status** – The Reporting service also introduces a new transitional `Status` value, `GENERATING`, which indicates that the report is being generated and no longer awaiting processing (`PENDING`). The `GENERATING` value may be particularly useful when the report contains large volumes of data.
**Historical data availability** – The Reporting Service can return data up to two years in the past. The data availability period may vary for future report types.
**Expiry** – The Reporting Service reports can be downloaded during 31 days, at which point they expire. A new report with the same data can be generated. The expiry date may vary for future report types.
**Dashboard features** – The Reporting Service underpins the reporting features of the Mangopay Dashboard. In the Dashboard, you can generate and manage all reports, and schedule them for regular download.
[Read more about reports](/reports) **→**
### Attributes
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
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 object was created.
The date and time at which the report was generated.
**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).
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:** `CSV`
The format in which the report is going to be downloaded.
The URL at which the report file can be downloaded when the `Status` is `GENERATED`.
The type of the report:
* `USER_WALLET_TRANSACTIONS` – All transactions crediting or debiting user wallets: pay-ins, transfers, conversions, and payouts, as well as refunds of all types and repudiations (from chargebacks).
* `COLLECTED_FEES`– Detail of transactions crediting or debiting the fees wallet: transactions of all types (pay-ins, transfers, refunds, payouts, etc.) that have a positive or negative fees amount.
The sorting direction of the CreationDate column. By default, the generated report is sorted by ascending creation date.
**Possible values:** Any date and time (before the `BeforeDate`) between the present and 24 months ago.
The date and time after which the report's transaction was created, based on the transaction's `CreationDate`.
**Note:** The period between the `AfterDate` and the `BeforeDate` cannot exceed 12 months.
**Possible values:** Any date and time (after the `AfterDate`) between the present and 24 months ago.
The date and time before which the report's transaction was created, based on the transaction's `CreationDate`.
**Note:** The period between the `AfterDate` and the `BeforeDate` cannot exceed 12 months.
Possible values: `Currency`, `UserId`, `WalletId`
The filers to apply.
If the `ReportType` is `COLLECTED_FEES`, only the `Currency` filter can be used. If the currency is not specified, the report contains data on all currencies.
If the `ReportType` is `USER_WALLET_TRANSACTIONS`, each filter can be used on its own or in combination, in which case the report data satisfies both filters.
* `UserId` and `Currency` – Report contains all transactions (credited or debited) in the currency where UserId is the AuthorId
* `UserId` and `WalletId` – Report contains all transactions (credited or debited) in all currencies where the UserId is specified as the `DebitedWalletId` or `CreditedWalletId`. If the `WalletId` is not a wallet owned by the `UserId`, then the report will be empty.
The `Currency` and `WalletId` cannot be used together.
If no `Filters` are specified, the report contains all transactions crediting or debiting all user wallets.
**Caution:** The `WalletId` and `UserId` values are not validated before the request is launched, so if both are used but don't correspond (the user doesn't own the wallet), then the report will be empty.
The currency of the `DebitedFunds`, `CreditedFunds`, or `Fees` of the transactions.
The unique identifier of the user referenced as the `AuthorId` or `CreditedUserId` of the transaction.
The unique identifier of the wallet referenced as the `DebitedWalletId` or `CreditedWalletId` of the transaction.
**Possible values:** The columns listed in the [Reports](/reports) guide, which differ according to the report type.
**Default values:** The default columns listed in the [Reports](/reports) guide, which differ according to the report type.
The data columns to be included in the report.
# View a Report
Source: https://docs.mangopay.com/api-reference/reporting/view-report
GET /v2.01/{ClientId}/reporting/reports/{ReportingId}
Retrieve a report from the Reporting Service
### Path parameters
The unique identifier of the Reporting Service report.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
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 object was created.
The date and time at which the report was generated.
**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).
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:** `CSV`
The format in which the report is going to be downloaded.
The URL at which the report file can be downloaded when the `Status` is `GENERATED`.
The type of the report:
* `USER_WALLET_TRANSACTIONS` – All transactions crediting or debiting user wallets: pay-ins, transfers, conversions, and payouts, as well as refunds of all types and repudiations (from chargebacks).
* `COLLECTED_FEES`– Detail of transactions crediting or debiting the fees wallet: transactions of all types (pay-ins, transfers, refunds, payouts, etc.) that have a positive or negative fees amount.
The sorting direction of the CreationDate column. By default, the generated report is sorted by ascending creation date.
**Possible values:** Any date and time (before the `BeforeDate`) between the present and 24 months ago.
The date and time after which the report's transaction was created, based on the transaction's `CreationDate`.
**Note:** The period between the `AfterDate` and the `BeforeDate` cannot exceed 12 months.
**Possible values:** Any date and time (after the `AfterDate`) between the present and 24 months ago.
The date and time before which the report's transaction was created, based on the transaction's `CreationDate`.
**Note:** The period between the `AfterDate` and the `BeforeDate` cannot exceed 12 months.
Possible values: `Currency`, `UserId`, `WalletId`
The filers to apply.
If the `ReportType` is `COLLECTED_FEES`, only the `Currency` filter can be used. If the currency is not specified, the report contains data on all currencies.
If the `ReportType` is `USER_WALLET_TRANSACTIONS`, each filter can be used on its own or in combination, in which case the report data satisfies both filters.
* `UserId` and `Currency` – Report contains all transactions (credited or debited) in the currency where UserId is the AuthorId
* `UserId` and `WalletId` – Report contains all transactions (credited or debited) in all currencies where the UserId is specified as the `DebitedWalletId` or `CreditedWalletId`. If the `WalletId` is not a wallet owned by the `UserId`, then the report will be empty.
The `Currency` and `WalletId` cannot be used together.
If no `Filters` are specified, the report contains all transactions crediting or debiting all user wallets.
**Caution:** The `WalletId` and `UserId` values are not validated before the request is launched, so if both are used but don't correspond (the user doesn't own the wallet), then the report will be empty.
The currency of the `DebitedFunds`, `CreditedFunds`, or `Fees` of the transactions.
The unique identifier of the user referenced as the `AuthorId` or `CreditedUserId` of the transaction.
The unique identifier of the wallet referenced as the `DebitedWalletId` or `CreditedWalletId` of the transaction.
**Possible values:** The columns listed in the [Reports](/reports) guide, which differ according to the report type.
**Default values:** The default columns listed in the [Reports](/reports) guide, which differ according to the report type.
The data columns to be included in the report.
```json 200 - User wallet transactions
{
"Id": "report_01JVVQFJETHHP9M9S18RN6N8JZ",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1747908544,
"ReportDate": 1747908545,
"Status": "GENERATED",
"ResultCode": "000000",
"ResultMessage": "Success",
"DownloadFormat": "CSV",
"DownloadURL": "https://reporting-sandbox-downloads.mangopay.com/reporting/user-wallet-transactions-b87d078d-ec6a-41aa-8719-4dc86f341e60-user-id-user_m_01JSM1ZG3MAWR272S99ZKE2WSP-wallet-id-wlt_m_01JSM21JYR8CFM43XREZQS1ZXH.csv?Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6IioiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3NTA1NTA0MDB9fX1dfQ__&Signature=TkzN3liwlGu4kLWNWZ2-FRWzwvzYNK2jQAgOmm6MBSl6qiSYOamgGGy~aNCTOWM8sBDgVCveau7W9rqxNajXsJKoVfJbNZYNyDnJlYZt24KMiq0SeBIQ0nLTukr1q-eYOpB7cjVikGetikKNldNUeDYdB3-dqIHUecNpBvRkw9Zoa72cfheznwsrA3XwuHcWpwHdcFHXpz89OD10Fbr75mRKrIqmzb5ecGFRXDjmtBl3UD~iFXyPusDV8UiBAuM6bRinHTenq9Mff4j1~MgTjmSnG7ZSwKsxHG50CJ-G5hhiWtAPgptbwck~2C7Lv7L1Hk1h7u59ZPI0IOh8cXMSKA__&Key-Pair-Id=K16WIKTSLTS2C2",
"ReportType": "USER_WALLET_TRANSACTIONS",
"Sort": "CreationDate:DESC",
"AfterDate": 1740787200,
"BeforeDate": 1743465599,
"Filters": {
"UserId": "user_m_01JSM1ZG3MAWR272S99ZKE2WSP",
"WalletId": "wlt_m_01JSM21JYR8CFM43XREZQS1ZXH"
},
"Columns": [
{
"Name": "ClientId",
"IsDefault": true
},
{
"Name": "TransactionId",
"IsDefault": true
},
{
"Name": "CreationDate",
"IsDefault": true
},
{
"Name": "ExecutionDate",
"IsDefault": true
},
{
"Name": "AuthorId",
"IsDefault": true
},
{
"Name": "CreditedUserId",
"IsDefault": true
},
{
"Name": "DebitedFundsAmount",
"IsDefault": true
},
{
"Name": "DebitedFundsCurrency",
"IsDefault": true
},
{
"Name": "CreditedFundsAmount",
"IsDefault": true
},
{
"Name": "CreditedFundsCurrency",
"IsDefault": true
},
{
"Name": "FeesAmount",
"IsDefault": true
},
{
"Name": "FeesCurrency",
"IsDefault": true
},
{
"Name": "Type",
"IsDefault": true
},
{
"Name": "Nature",
"IsDefault": true
},
{
"Name": "CreditedWalletId",
"IsDefault": true
},
{
"Name": "DebitedWalletId",
"IsDefault": true
},
{
"Name": "BankAccountId",
"IsDefault": true
},
{
"Name": "PreauthorizationId",
"IsDefault": true
},
{
"Name": "BankWireRef",
"IsDefault": true
},
{
"Name": "CardId",
"IsDefault": true
},
{
"Name": "CardAlias",
"IsDefault": true
},
{
"Name": "CardType",
"IsDefault": true
},
{
"Name": "CardCountry",
"IsDefault": true
},
{
"Name": "CardExpirationDate",
"IsDefault": true
},
{
"Name": "Culture",
"IsDefault": true
},
{
"Name": "DeclaredDebitedFundsAmount",
"IsDefault": true
},
{
"Name": "DeclaredDebitedFundsCurrency",
"IsDefault": true
},
{
"Name": "DeclaredFeesAmount",
"IsDefault": true
},
{
"Name": "DeclaredFeesCurrency",
"IsDefault": true
},
{
"Name": "ExecutionType",
"IsDefault": true
},
{
"Name": "PaymentType",
"IsDefault": true
},
{
"Name": "WireReference",
"IsDefault": true
}
]
}
```
```json REST
// GET has no body parameters
```
# Create a Transactions Report
Source: https://docs.mangopay.com/api-reference/reports/create-transactions-report
POST /v2.01/{ClientId}/reports/transactions
Generate a legacy Transactions Report
**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.
**Possible values:** `CSV`
The format of the report file.
Max. length: 255 characters
The URL to which the notification indicating that the report is ready to be downloaded will be sent.
**Possible values:** `CreationDate:ASC`, `CreationDate:DESC`
**Default value**: `CreationDate:ASC`
The sort direction based on transaction 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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
**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 report file can be downloaded when the `Status` is `GENERATED`.
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": "report_m_01JFA0JQQJ1X6W6VT6042SASTC",
"CreationDate": 1734429204,
"Tag": "Created using Mangopay API Postman Collection",
"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": "Created using Mangopay API Postman Collection",
"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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/reports/create-wallets-report
POST /v2.01/{ClientId}/reports/wallets
Generate a legacy Wallets Report
**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.
**Possible values:** `CSV`
The format of the report file.
Max. length: 255 characters
The URL to which the notification indicating that the report is ready to be downloaded will be sent.
**Possible values:** `CreationDate:ASC`, `CreationDate:DESC`
**Default value**: `CreationDate:ASC`
The sort direction based on transaction 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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
**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 report file can be downloaded when the `Status` is `GENERATED`.
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.
**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
{
"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": "report_m_01JFA0QC7K9CJ339JX4KV08CMW",
"CreationDate": 1734429356,
"Tag": "Created using Mangopay API Postman Collection",
"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,
"ResultMessage": null
}
```
```json REST
{
"Tag": "Created using Mangopay API Postman Collection",
"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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/reports/list-reports
GET /v2.01/{ClientId}/reports
List all legacy 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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
**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": "report_m_01JFA0JQQJ1X6W6VT6042SASTC",
"CreationDate": 1734429204,
"Tag": "Created using Mangopay API Postman Collection",
"ReportDate": 1734429204,
"Status": "READY_FOR_DOWNLOAD",
"DownloadFormat": "CSV",
"DownloadURL": "https://downloads.sandbox.mangopay.com/85565d93430945388122986252982648.csv?Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6IioiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3MzQ1MTU2MDR9fX1dfQ__&Signature=YvcEtwjbs2hR4mOb2UuGICdh082lFrCjS1XtwJ~Zem7~vDc8bPPo-2kBA-Neb0Hs7V9gApR5mJ9B6RPOgDzKKdBEVD4iBS066eNYIymuW2fY5IXjfuzFgv0id5yi2ynFcmX02sgSgd9WGChYpUTBH36R-McNbAPG3viOu8FZ5LM9IWR44qnMwrM-8IWXPBpg9yh7uZy6ehDjJpoi9tswNnzt445vpORRMF3clMl~tRel59EcsMV73c-~B1Qvd9inBa6msh6eww~kkcP5FE~MCr4oQ-DsX0lZPAXLoSOJNbhOotNqKgwlBrYwAT1gLV510kUlbJy~4bPDmmsgbSqETw__",
"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": "000000",
"ResultMessage": "Success"
},
{
"Id": "report_m_01JFA0QC7K9CJ339JX4KV08CMW",
"CreationDate": 1734429356,
"Tag": "Created using Mangopay API Postman Collection",
"ReportDate": 1734429356,
"Status": "READY_FOR_DOWNLOAD",
"DownloadFormat": "CSV",
"DownloadURL": "https://downloads.sandbox.mangopay.com/fd9f07b1c84a444aaca68eca2f597495.csv?Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6IioiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3MzQ1MTU3NTZ9fX1dfQ__&Signature=PL0gj96VDkO43AtYkWJyoO7nj1wAFH7axqTwIVLWq3JHN1dadvBoQHaZb~P8tg3PFV3JSjv5MRu62JnHKFzlOAxW6-rpY7zN2MtsNTy9X32c63crC7MqxfZMNze4xkedbmQ~afsFfO6JAncwa40osf28x-1E64K7NrXjGxGO2RykEpwoyJz2g01qY8yjEONYmc0HEdg3lp1OBpLF~Ep3IRQkWLuLfIPbogGsj~NxbTgjQOqM7l~A7KHY5VOgHi-9fR4dd2uI4f-84BbTxmtcv0Uz~um5GhzsjejOV0TEziGVXvxtTEXK7h4cHVHm9YfR4G0jOZi9oRgkW0WYCIz31Q__",
"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": "000000",
"ResultMessage": "Success"
}
]
```
```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 legacy Report object
Source: https://docs.mangopay.com/api-reference/reports/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.
**Note – Replaced by Reporting Service**
The legacy Report endpoints are being replaced by Mangopay's Reporting Service, which underpins the Dashboard's report features.
The legacy Transactions report data is available in the service's User Wallet Transactions report. An equivalent of the legacy Wallets report is planned in future.
### 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
Source: https://docs.mangopay.com/api-reference/reports/view-report
GET /v2.01/{ClientId}/reports/{ReportId}
Retrieve a legacy report
### Path parameters
The unique identifier of the legacy report.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
**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 report file can be downloaded when the `Status` is `GENERATED`.
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": "report_m_01JFA0JQQJ1X6W6VT6042SASTC",
"CreationDate": 1734429204,
"Tag": "Created using Mangopay API Postman Collection",
"ReportDate": 1734429204,
"Status": "READY_FOR_DOWNLOAD",
"DownloadFormat": "CSV",
"DownloadURL": "https://downloads.sandbox.mangopay.com/85565d93430945388122986252982648.csv?Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6IioiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3MzQ1MTU2MDR9fX1dfQ__&Signature=YvcEtwjbs2hR4mOb2UuGICdh082lFrCjS1XtwJ~Zem7~vDc8bPPo-2kBA-Neb0Hs7V9gApR5mJ9B6RPOgDzKKdBEVD4iBS066eNYIymuW2fY5IXjfuzFgv0id5yi2ynFcmX02sgSgd9WGChYpUTBH36R-McNbAPG3viOu8FZ5LM9IWR44qnMwrM-8IWXPBpg9yh7uZy6ehDjJpoi9tswNnzt445vpORRMF3clMl~tRel59EcsMV73c-~B1Qvd9inBa6msh6eww~kkcP5FE~MCr4oQ-DsX0lZPAXLoSOJNbhOotNqKgwlBrYwAT1gLV510kUlbJy~4bPDmmsgbSqETw__&Key-Pair-Id=K21K4XKUJZ74AO",
"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": "000000",
"ResultMessage": "Success"
}
```
```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
Source: https://docs.mangopay.com/api-reference/repudiations/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
Source: https://docs.mangopay.com/api-reference/repudiations/view-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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": "user_m_01JJ22H69SZTPCXW5TY875RTYT",
"CreditedUserId": null,
"CreditedFunds": {
"Currency": "EUR",
"Amount": 13000
},
"Status": "SUCCEEDED",
"ExecutionDate": 1734427652,
"Type": "PAYOUT",
"Nature": "REPUDIATION",
"CreditedWalletId": null,
"DebitedWalletId": "CREDIT_EUR",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 13000
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"ResultCode": "000000",
"ResultMessage": "Success",
"Id": "repud_m_01JJ22HPJ8Y0E4YW7D9XR96WZY",
"Tag": null,
"CreationDate": 1734427652,
"InitialTransactionId": "payin_m_01JJ22HPJ8Y0E4YW7D9XR96WZY",
"InitialTransactionType": "PAYIN",
"InitialTransactionNature": "REGULAR"
}
```
```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 {
$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
Source: https://docs.mangopay.com/api-reference/satispay/create-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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/satispay/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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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)
Source: https://docs.mangopay.com/api-reference/satispay/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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 Settlement
Source: https://docs.mangopay.com/api-reference/settlements/create-settlement
POST /v3.0/{ClientId}/payins/intents/settlements
Upload a Mangopay-format settlement file for a single currency to be reconciled with Intents
Use this endpoint to send Mangopay CSV settlement files in Mangopay’s defined template.
You need to send one file per currency, as soon as it becomes available. Read more about [providing settlement files to Mangopay](/guides/echo#provide-settlement-files-to-mangopay).
**Caution – Use settlement file example as template**
You must follow the [specifications provided here](/guides/echo/settlement-file).
Use this [example CSV file](https://raw.githubusercontent.com/Mangopay/docs/refs/heads/main/guides/echo/Example_Mangopay_Settlement_File.csv) (right click and ***Save as...***), which contains the correct column and row labels and example data for 3 transactions. Remove the example data lines before generating your own file.
There are no requirements for the **file name**: you can name your file how you like.
### Body parameters
The settlement file, provided by the external PSP and formatted to comply with Mangopay's [settlement file structure](/guides/echo/mirakl#specifications-of-the-mangopay-format-settlement-file).
### Responses
The unique identifier of the Settlement.
The status of the Settlement:
* `UPLOADED` – Settlement file received.
* `CREATED` – Settlement file parsed but reconciliation not possible for any lines.
* `UNMATCHED` – Settlement file parsed and reconciliation in progress.
* `PARTIALLY_MATCHED` – Settlement file parsed and some lines matched successfully.
* `PENDING_FUNDS_RECEPTION` – Settlement file parsed and fully matched with Intents; waiting for funds to arrive on the escrow wallet.
* `INSUFFICIENT_FUNDS` – Partial amount received: `FundsMissingAmount` shows the shortfall.
* `RECONCILED` – Full settlement amount (`ActualSettlementAmount`) received on the escrow wallet.
* `FAILED` – Settlement file rejected due to a technical error (e.g. format, timeout).
The date and time the Settlement was created.
The total amount declared through Intent API calls, using the following calculation: (Sum of captured intents) - (Sum of refunded amounts) + (Sum of refund reversed amounts) - (Sum of `DISPUTED` disputes) + (Sum of `DISPUTED_WON` disputes)
The total fees charged by the external provider
The total amount due to the platform, to be held in the escrow wallet. This amount corresponds to the `TotalSettlementAmount` of the settlement file.
A negative amount results in this parameter being set to zero, indicating no incoming funds to the escrow wallet.
The difference between `ActualSettlementAmount` and the amount received on the escrow wallet
***
{/*
*/}
```bash
curl -X POST ".../v3.0/{ClientId}/payins/intents/settlements" \
-H "Authorization: Bearer token" \
-H "Content-Type: multipart/form-data" \
-F "file=@/example/file-path.csv"
```
```json 200
{
"SettlementId": "int_stlmnt_019778c1-fe45-7864-8d2c-c2394e0f105c",
"Status": "UPLOADED",
"CreationDate": 1750077669,
"DeclaredIntentAmount": 0,
"ExternalProcessorFeesAmount": 0,
"ActualSettlementAmount": 0,
"FundsMissingAmount": 0
}
```
# The Settlement Object
Source: https://docs.mangopay.com/api-reference/settlements/settlement-object
The Settlement object represents the payment of Intents to Mangopay.
[Read more about Mangopay Echo](/guides/echo) **→**
### Attributes
The unique identifier of the Settlement.
The status of the Settlement:
* `UPLOADED` – Settlement file received.
* `CREATED` – Settlement file parsed but reconciliation not possible for any lines.
* `UNMATCHED` – Settlement file parsed and reconciliation in progress.
* `PARTIALLY_MATCHED` – Settlement file parsed and some lines matched successfully.
* `PENDING_FUNDS_RECEPTION` – Settlement file parsed and fully matched with Intents; waiting for funds to arrive on the escrow wallet.
* `INSUFFICIENT_FUNDS` – Partial amount received: `FundsMissingAmount` shows the shortfall.
* `RECONCILED` – Full settlement amount (`ActualSettlementAmount`) received on the escrow wallet.
* `FAILED` – Settlement file rejected due to a technical error (e.g. format, timeout).
The date and time the Settlement was created.
The total amount declared through Intent API calls, using the following calculation: (Sum of captured intents) - (Sum of refunded amounts) + (Sum of refund reversed amounts) - (Sum of `DISPUTED` disputes) + (Sum of `DISPUTED_WON` disputes)
The total fees charged by the external provider
The total amount due to the platform, to be held in the escrow wallet. This amount corresponds to the `TotalSettlementAmount` of the settlement file.
A negative amount results in this parameter being set to zero, indicating no incoming funds to the escrow wallet.
The difference between `ActualSettlementAmount` and the amount received on the escrow wallet
```json Settlement object example
{
"SettlementId": "int_stlmnt_01975582-2b19-7699-aaf3-a8167936254f",
"Status": "RECONCILED",
"CreationDate": 1749486283,
"SettlementDate": "2025-06-09",
"ExternalProviderName": "Stripe",
"DeclaredIntentAmount": 10500,
"ExternalProcessorFeesAmount": 500,
"ActualSettlementAmount": 10000,
"FundsMissingAmount": 0
}
```
# Update a Settlement
Source: https://docs.mangopay.com/api-reference/settlements/update-settlement
PUT /v3.0/{ClientId}/payins/intents/settlements/{SettlementId}
Update a Settlement by uploading an additional file
{/* Use this endpoint to send another Mangopay-format CSV file to modify the data in an existing Settlement. */}
### Path parameters
The unique identifier of the Settlement object.
### Body parameters
The settlement file, provided by the external PSP and formatted to comply with Mangopay's [settlement file structure](/guides/echo/settlement-file).
### Responses
The unique identifier of the Settlement.
The status of the Settlement:
* `UPLOADED` – Settlement file received.
* `CREATED` – Settlement file parsed but reconciliation not possible for any lines.
* `UNMATCHED` – Settlement file parsed and reconciliation in progress.
* `PARTIALLY_MATCHED` – Settlement file parsed and some lines matched successfully.
* `PENDING_FUNDS_RECEPTION` – Settlement file parsed and fully matched with Intents; waiting for funds to arrive on the escrow wallet.
* `INSUFFICIENT_FUNDS` – Partial amount received: `FundsMissingAmount` shows the shortfall.
* `RECONCILED` – Full settlement amount (`ActualSettlementAmount`) received on the escrow wallet.
* `FAILED` – Settlement file rejected due to a technical error (e.g. format, timeout).
The date and time the Settlement was created.
The total amount declared through Intent API calls, using the following calculation: (Sum of captured intents) - (Sum of refunded amounts) + (Sum of refund reversed amounts) - (Sum of `DISPUTED` disputes) + (Sum of `DISPUTED_WON` disputes)
The total fees charged by the external provider
The total amount due to the platform, to be held in the escrow wallet. This amount corresponds to the `TotalSettlementAmount` of the settlement file.
A negative amount results in this parameter being set to zero, indicating no incoming funds to the escrow wallet.
The difference between `ActualSettlementAmount` and the amount received on the escrow wallet
***
{/* */}
```bash
curl -X PUT ".../v3.0/{ClientId}/payins/intents/settlements/{SettlementId}"" \
-H "Authorization: Bearer token" \
-H "Content-Type: multipart/form-data" \
-F "file=@/example/file-path.csv"
```
```json 200
{
"SettlementId": "int_stlmnt_019778c1-fe45-7864-8d2c-c2394e0f105c",
"Status": "UPLOADED",
"CreationDate": 1750077669,
"DeclaredIntentAmount": 0,
"ExternalProcessorFeesAmount": 0,
"ActualSettlementAmount": 0,
"FundsMissingAmount": 0
}
```
# View a Settlement
Source: https://docs.mangopay.com/api-reference/settlements/view-settlement
GET /v3.0/{ClientId}/payins/intents/settlements/{settlementId}
Retrieve the settlement data generated from file upload
{/* Use this endpoint to send another Mangopay-format CSV file to modify the data in an existing Settlement. */}
### Path parameters
The unique identifier of the Settlement object.
### Responses
The unique identifier of the Settlement.
The status of the Settlement:
* `UPLOADED` – Settlement file received.
* `CREATED` – Settlement file parsed but reconciliation not possible for any lines.
* `UNMATCHED` – Settlement file parsed and reconciliation in progress.
* `PARTIALLY_MATCHED` – Settlement file parsed and some lines matched successfully.
* `PENDING_FUNDS_RECEPTION` – Settlement file parsed and fully matched with Intents; waiting for funds to arrive on the escrow wallet.
* `INSUFFICIENT_FUNDS` – Partial amount received: `FundsMissingAmount` shows the shortfall.
* `RECONCILED` – Full settlement amount (`ActualSettlementAmount`) received on the escrow wallet.
* `FAILED` – Settlement file rejected due to a technical error (e.g. format, timeout).
The date and time the Settlement was created.
The total amount declared through Intent API calls, using the following calculation: (Sum of captured intents) - (Sum of refunded amounts) + (Sum of refund reversed amounts) - (Sum of `DISPUTED` disputes) + (Sum of `DISPUTED_WON` disputes)
The total fees charged by the external provider
The total amount due to the platform, to be held in the escrow wallet. This amount corresponds to the `TotalSettlementAmount` of the settlement file.
A negative amount results in this parameter being set to zero, indicating no incoming funds to the escrow wallet.
The difference between `ActualSettlementAmount` and the amount received on the escrow wallet
{/*
```json
```
*/}
```json RECONCILED
{
"SettlementId": "int_stlmnt_01975582-2b19-7699-aaf3-a8167936254f",
"Status": "RECONCILED",
"CreationDate": 1749486283,
"SettlementDate": "2025-06-09",
"ExternalProviderName": "Stripe",
"DeclaredIntentAmount": 10500,
"ExternalProcessorFeesAmount": 500,
"ActualSettlementAmount": 10000,
"FundsMissingAmount": 0
}
```
```json PARTIALLY_SETTLED
{
"SettlementId": "int_stlmnt_01980d5e-dea1-7828-b7ba-bf1772d6abf2",
"Status": "PARTIALLY_SETTLED",
"CreationDate": 1752570978,
"SettlementDate": 1752537600,
"ExternalProviderName": "Stripe",
"DeclaredIntentAmount": 20000,
"ExternalProcessorFeesAmount": 2,
"ActualSettlementAmount": 19998,
"FundsMissingAmount": 0
}
```
```json REST
// GET has no body parameters
```
# Create an SSO
Source: https://docs.mangopay.com/api-reference/ssos/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/ssos/extend-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/ssos/list-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
Source: https://docs.mangopay.com/api-reference/ssos/list-ssos-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
Source: https://docs.mangopay.com/api-reference/ssos/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
Source: https://docs.mangopay.com/api-reference/ssos/update-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/ssos/view-sso
GET /v2.01/{ClientId}/clients/ssos/{SsoId}
### Path parameters
The unique identifier of the SSO object.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/swish/create-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.
**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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
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.
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:** `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.
```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://docs.mangopay.com/please-ignore?transactionId=wt_5cc1e327-d766-450e-9794-3a1a079bc6b6",
"RedirectURL": "https://r2.girogate.de/swish/H709/I?tx=2338766490&rs=NuyyUfdpJhGIY3ANnwg7OPtrB99TPxDM&cs=a81cae5e1e050b5c1ce63a57ea70ac5e43fb23afec22809a8acc7746af383cbd",
"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/Lcb9V9vefk5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IrufB+qoWO9mckIPP9SKwt+g+WSNFPeZRc9I7SkXAGtH1PFhf1WInmxNy8LleBPYW3SdrpKjHPGpOekepCFgjup4H66ta7GRzQg4+14vA3qL7ZI0U9ZhHzUnvKBUBa0TX82B9VYudbE7Iwed6EdhbdJ+skaIe86g56R2lImCN6HoerK9qsZPNCTn4EtUW5lFz0psiLkJtYZ5R5qRXVVuYJ9ecXZNNpxxgiWoL86g56U0RF6G2MM8oc9Krqi3Mk2vOrsmmUw6wRLWFedSc9KaIi1BbmGeUOelV1RbmyTVn12TTKQdYotrCPGpOelPERagtzDPKnPSqagvz5Jqza7LplAMsUW1hHjUnvSniItQW5hllTnpVtYV5cs3ZNdl0ygGWqLYwj5qT3hRxEWoL84wyJ72q2sI8uebsmmw65QBLVFuYR81Jb4q4CLWFeUaZk15VbWGeXHN2TTmdViqVvZ66sCqVSjHUhVWpVIqhLqxKpVIMdWFVKpViqAurUqkUQ11YlUqlGOrCqlQqxVAXVqVSKYa6sCqVSjHUhVWpVIqhLqxKpVIMdWFVKpViqAurUqkUQ11YlUqlGOrCqlQqxVAXVqVSKYa6sCqVSjHUhVWpVIqhLqxKpVIMdWFVKpViqAurUqkUQ11YlUqlGOrCqlQqxVAXVqVSKYa6sCqVSjHUhVWpVIqhLqxKpVIMdWFVKpViqAurUqkUQ11YlUqlGOrCqlQqxVAXVqVSKYa6sCqVSjHUhVWpVIrh/wPvCR/VHw+LOQAAAABJRU5ErkJggg==",
"StatementDescriptor": "Example123",
"PaymentFlow": "APP"
}
```
```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",
"Tag": "Created using the Mangopay API Postman collection",
"StatementDescriptor": "Example123",
"PaymentFlow": "APP"
}
```
# The Swish PayIn object
Source: https://docs.mangopay.com/api-reference/swish/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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
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.
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:** `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.
### Related resources
Learn more about Swish
Learn about testing Swish
# View a PayIn (Swish)
Source: https://docs.mangopay.com/api-reference/swish/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
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.
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:** `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.
```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://docs.mangopay.com/please-ignore?transactionId=wt_b78f1b78-336f-46ad-9009-1c7336da0af0",
"RedirectURL": "https://r2.girogate.de/swish/H709/I?tx=2338709140&rs=OzbGDu7VRJo2uskhrkYZ0pkw5vE4U6z3&cs=50cc9a8984116452763ece37084717ccaac5fff84ded48b4d0882159673fd02b",
"DeepLinkURL": "swish://paymentrequest?token=AAAAAAAAAAAAAAAjOHCRQNQoyuWLAhTm&callbackurl=https%3A%2F%2Fapi.sandbox.whenthen.co%2Fpayments%2Fapm%2Fpayment-gate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qFArZ8P8BLsJJ1SkDPzwAAAAASUVORK5CYII=",
"StatementDescriptor": "Example123",
"PaymentFlow": "APP"
}
```
```json REST
// GET has no body parameters
```
# List Transactions for a Bank Account
Source: https://docs.mangopay.com/api-reference/transactions/list-transactions-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.
### Path parameters
The unique identifier of the bank account.
### 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.
### Responses
The list of transactions created by the platform.
The transaction created by the platform.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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"
}
]
```
```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
Source: https://docs.mangopay.com/api-reference/transactions/list-transactions-card
GET /v2.01/{ClientId}/cards/{CardId}/transactions
This call returns all the transactions of a given card.
### Path parameters
The unique identifier of the Card object, obtained during the card registration process.
### 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.
### Responses
The list of transactions created by the platform.
The transaction created by the platform.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
}
]
```
```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
Source: https://docs.mangopay.com/api-reference/transactions/list-transactions-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.
### 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.
### 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.
### Responses
The list of transactions created by the platform.
The transaction created by the platform.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
}
]
```
# List Transactions for a Client Wallet
Source: https://docs.mangopay.com/api-reference/transactions/list-transactions-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/transactions/list-transactions-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.
### Path parameters
The unique identifier of the deposit preauthorization.
### 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.
### Responses
The list of transactions created by the platform.
The transaction created by the platform.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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"
}
]
```
# List Transactions for a Dispute
Source: https://docs.mangopay.com/api-reference/transactions/list-transactions-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).
### Path parameters
The unique identifier of the dispute.
### 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.
### Responses
The list of transactions created by the platform.
The transaction created by the platform.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
}
]
```
```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
Source: https://docs.mangopay.com/api-reference/transactions/list-transactions-mandate
GET /v2.01/{ClientId}/mandates/{MandateId}/transactions
This call returns direct-debit pay-ins made against a given mandate.
### Path parameters
The unique identifier of the 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.
### Responses
The list of transactions created by the platform.
The transaction created by the platform.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/transactions/list-transactions-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.
### Path parameters
The unique identifier of the preauthorization.
### 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.
### Responses
The list of transactions created by the platform.
The transaction created by the platform.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/transactions/list-transactions-user
GET /v2.01/{ClientId}/users/{UserId}/transactions
This call returns transactions with the same `AuthorId`.
**Note – SCA triggered by this endpoint**
This endpoint requires the user to complete SCA to authenticate the access to their wallet, unless SCA for wallet access was successfully completed in the last 180 days (read more about [SCA on wallet access](/guides/sca/wallets)).
When SCA is required, this endpoint returns a **401 - Unauthorized** response.
To let the user complete the SCA session on the Mangopay-hosted webpage, your platform needs to retrieve the `RedirectUrl` from the `WWW-Authenticate` response header, add an encoded `returnUrl` query parameter, and redirect the user. Read more about how to redirect them in the [SCA session](/guides/sca/session) guide.
### Path parameters
The unique identifier of the user.
### Query parameters
**Possible values:** `USER_PRESENT`, `USER_NOT_PRESENT`
**Default value:** `null`
The SCA context of the request, which should be considered required if the user's `UserCategory` is `OWNER`:
* `USER_PRESENT` – The user is initiating the wallet access request and is actively present. The platform must [redirect the user](/guides/sca/session) for SCA using the `PendingUserAction.RedirectUrl` returned, unless a successful SCA session for wallet access occurred in the last 180 days.
* `USER_NOT_PRESENT` – No user is present: the access is automated by the platform as part of their declared and authorized workflow. On these requests, SCA redirection is not initially required, but in future Mangopay may be required to override the request.
Both values may technically result in the need for SCA redirection, because an exemption may be applied by Mangopay or (in future) Mangopay may be required to override a given request.
**Note:** `ScaContext` is a temporary mechanism to introduce SCA on existing endpoints and workflows. New integrations should consider the parameter required and send `USER_PRESENT` by default. Read more about [SCA on wallet access](/guides/sca/wallets) **→**
**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.
### Responses
The list of transactions created by the platform.
The transaction created by the platform.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
When SCA is required for wallet access, this endpoint returns a **401 - Unauthorized** response code with the `redirectUrl` in the `WWW-Authenticate` response header:
```HTTP 401 response header
WWW-Authenticate: PendingUserAction redirectUrl=https://sca.sandbox.mangopay.com/?token=0193cf51ed367151a0cb1c59def21e13
```
In this case, your platform needs to retrieve the URL value, encode and add a `returnUrl` query parameter, and redirect the user.
Read more about [SCA redirection](/guides/sca/) and [SCA on wallet access](/guides/sca/wallets) **→**
```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
}
]
```
```json 401 - SCA required
// No response body, redirectUrl returned in WWW-Authenticate response header
```
```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 {
$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: "user_m_01JZ8AVM2Y1RWVY1RT396BYW9V",
};
const listUserTransactions = async (userId) => {
return await mangopay.Users.getTransactions(userId, {
parameters: {
ScaContext: "USER_PRESENT", // SCA every 180 days for wallet access
},
resolveWithFullResponse: true, // to retrieve www-authenticate header with PendingUserAction RedirectUrl
})
.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, {'ScaContext': 'USER_PRESENT'})
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch transactions for the user: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myUser = {
Id: 'user_m_01JXJ256GTH5TKXF6RGVFYQVV7',
}
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
Source: https://docs.mangopay.com/api-reference/transactions/list-transactions-wallet
GET /v2.01/{ClientId}/wallets/{WalletId}/transactions
This call returns the transactions (pay-in, transfers, conversions, and payouts) of a given wallet.
**Note – SCA triggered by this endpoint**
This endpoint requires the user to complete SCA to authenticate the access to their wallet, unless SCA for wallet access was successfully completed in the last 180 days (read more about [SCA on wallet access](/guides/sca/wallets)).
When SCA is required, this endpoint returns a **401 - Unauthorized** response.
To let the user complete the SCA session on the Mangopay-hosted webpage, your platform needs to retrieve the `RedirectUrl` from the `WWW-Authenticate` response header, add an encoded `returnUrl` query parameter, and redirect the user. Read more about how to redirect them in the [SCA session](/guides/sca/session) guide.
### Path parameters
The unique identifier of the wallet.
### Query parameters
**Possible values:** `USER_PRESENT`, `USER_NOT_PRESENT`
**Default value:** `null`
The SCA context of the request, which should be considered required if the user's `UserCategory` is `OWNER`:
* `USER_PRESENT` – The user is initiating the wallet access request and is actively present. The platform must [redirect the user](/guides/sca/session) for SCA using the `PendingUserAction.RedirectUrl` returned, unless a successful SCA session for wallet access occurred in the last 180 days.
* `USER_NOT_PRESENT` – No user is present: the access is automated by the platform as part of their declared and authorized workflow. On these requests, SCA redirection is not initially required, but in future Mangopay may be required to override the request.
Both values may technically result in the need for SCA redirection, because an exemption may be applied by Mangopay or (in future) Mangopay may be required to override a given request.
**Note:** `ScaContext` is a temporary mechanism to introduce SCA on existing endpoints and workflows. New integrations should consider the parameter required and send `USER_PRESENT` by default. Read more about [SCA on wallet access](/guides/sca/wallets) **→**
**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.
### Responses
The list of transactions created by the platform.
The transaction created by the platform.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
When SCA is required for wallet access, this endpoint returns a **401 - Unauthorized** response code with the `redirectUrl` in the `WWW-Authenticate` response header:
```HTTP 401 response header
WWW-Authenticate: PendingUserAction redirectUrl=https://sca.sandbox.mangopay.com/?token=0193cf51ed367151a0cb1c59def21e13
```
In this case, your platform needs to retrieve the URL value, encode and add a `returnUrl` query parameter, and redirect the user.
Read more about [SCA redirection](/guides/sca/) and [SCA on wallet access](/guides/sca/wallets) **→**
```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
}
]
```
```json 401 - SCA required
// No response body, redirectUrl returned in WWW-Authenticate response header
```
```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: "wlt_m_01JZ8DKE83Y06860JZRKAM259V",
};
const listWalletTransactions = async (walletId) => {
return await mangopay.Wallets.getTransactions(walletId, {
parameters: {
ScaContext: "USER_PRESENT", // SCA every 180 days for wallet access
},
resolveWithFullResponse: true, // to retrieve www-authenticate header with PendingUserAction RedirectUrl
})
.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, {'ScaContext': 'USER_PRESENT'})
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: 'wlt_m_01JXJ25HVXF2RRAC41A3RBY4XZ'
}
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
Source: https://docs.mangopay.com/api-reference/transactions/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
Source: https://docs.mangopay.com/api-reference/transfers/create-transfer
POST /v2.01/{ClientId}/transfers
**Note – SCA may be triggered by this endpoint**
When a user with `UserCategory` `OWNER` initiates a transfer to another `OWNER`, they are required to complete SCA unless Mangopay can apply an exemption (read more about [SCA on transfers](/guides/sca/transfers)).
To let the user complete the SCA session on the Mangopay-hosted webpage, your platform needs to retrieve the returned `PendingUserAction.RedirectUrl`, add an encoded `returnUrl` query parameter, and redirect the user. Read more about how to redirect them in the [SCA session](/guides/sca/session) guide.
### Body parameters
**Possible values:** `USER_PRESENT`, `USER_NOT_PRESENT`
**Default value:** `null`
The SCA context of the request, which should be considered required if the `AuthorId` references a user whose `UserCategory` is `OWNER`:
* `USER_PRESENT` – The user is initiating the transfer and is actively present. The platform must [redirect the user](/guides/sca/session) for SCA using the `PendingUserAction.RedirectUrl` returned, unless an exemption can be applied by Mangopay such as on low-amount and low-risk transfers. Platforms are not able to request specific exemptions ([read more](/guides/sca#exemptions-on-actions)).
* `USER_NOT_PRESENT` – No user is present: the transfer is automated by the platform as part of their declared and authorized workflow. On these transfers, SCA redirection is not initially required, but in future Mangopay may be required to override the request.
The API returns what was sent. Both values may technically result in the need for SCA redirection, because an exemption may be applied by Mangopay or (in future) Mangopay may be required to override a given request.
**Note:** `ScaContext` is a temporary mechanism to introduce SCA on existing endpoints and workflows. New integrations should consider the parameter required and send `USER_PRESENT` by default. Read more about [SCA on transfers](/guides/sca/transfers) **→**
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`).
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
**Possible values:** `USER_PRESENT`, `USER_NOT_PRESENT`
**Default value:** `null`
The SCA context of the request, which should be considered required if the `AuthorId` references a user whose `UserCategory` is `OWNER`:
* `USER_PRESENT` – The user is initiating the transfer and is actively present. The platform must [redirect the user](/guides/sca/session) for SCA using the `PendingUserAction.RedirectUrl` returned, unless an exemption can be applied by Mangopay such as on low-amount and low-risk transfers. Platforms are not able to request specific exemptions ([read more](/guides/sca#exemptions-on-actions)).
* `USER_NOT_PRESENT` – No user is present: the transfer is automated by the platform as part of their declared and authorized workflow. On these transfers, SCA redirection is not initially required, but in future Mangopay may be required to override the request.
The API returns what was sent. Both values may technically result in the need for SCA redirection, because an exemption may be applied by Mangopay or (in future) Mangopay may be required to override a given request.
**Note:** `ScaContext` is a temporary mechanism to introduce SCA on existing endpoints and workflows. New integrations should consider the parameter required and send `USER_PRESENT` by default. Read more about [SCA on transfers](/guides/sca/transfers) **→**
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
```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 - SCA required
{
"ScaContext": "USER_PRESENT",
"Id": "xfer_c_01JRSHQFG2337DBQ4NS8XPYCK7",
"CreationDate": 1744614179,
"DebitedWalletId": "wlt_m_01JRJM7ASZN7YP4MBDVBT0HZF1",
"CreditedWalletId": "wlt_m_01JRHSTW2NP4MDB45WQMDNS23C",
"AuthorId": "user_m_01JRJM5RR5NYQDN0S6QWJJDRMR",
"CreditedUserId": "user_m_01JRHSS3B18H86QA0C467RVK07",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 3001
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 3001
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Type": "TRANSFER",
"Nature": "REGULAR",
"Status": "CREATED",
"Tag": "Created using Mangopay API Postman Collection",
"ResultCode": null,
"ResultMessage": null,
"ExecutionDate": null,
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=sca_0196331bc1247e3fa33be6f9c797abd7"
}
}
```
```json 200 - SCA not required
{
"ScaContext": "USER_PRESENT",
"Id": "xfer_c_01JRSHXFS5YX0HVCXZFQ4J2XMH",
"CreationDate": 1744614375,
"DebitedWalletId": "wlt_m_01JRHSTW2NP4MDB45WQMDNS23C",
"CreditedWalletId": "wlt_m_01JRJM7ASZN7YP4MBDVBT0HZF1",
"AuthorId": "user_m_01JRHSS3B18H86QA0C467RVK07",
"CreditedUserId": "user_m_01JRJM5RR5NYQDN0S6QWJJDRMR",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1000
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Type": "TRANSFER",
"Nature": "REGULAR",
"Status": "SUCCEEDED",
"Tag": "Created using Mangopay API Postman Collection",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1744614375,
"PendingUserAction": null
}
```
```json REST
{
"ScaContext": "USER_PRESENT",
"AuthorId": "user_m_01JRJM5RR5NYQDN0S6QWJJDRMR",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 3001
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"DebitedWalletId": "wlt_m_01JRJM7ASZN7YP4MBDVBT0HZF1",
"CreditedWalletId": "wlt_m_01JRHSTW2NP4MDB45WQMDNS23C",
"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 {
$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 myTransfer = {
ScaContext: "USER_PRESENT",
AuthorId: "user_m_01JYEJ86451TKDK9BZAXRT4RTS",
Tag: "Created using Mangopay NodeJS SDK",
DebitedFunds: {
Currency: "EUR",
Amount: 5000,
},
Fees: {
Currency: "EUR",
Amount: 0,
},
DebitedWalletId: "wlt_m_01JYEJCS18438SEW2773PSNWCV",
CreditedWalletId: "wlt_m_01JY53GESY8V2HBV7EBD6J8FKX",
};
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
Source: https://docs.mangopay.com/api-reference/transfers/transfer-object
### Description
A transfer is a request to relocate funds from one wallet to another in the same currency. To convert funds between wallets of different currencies, see [Conversions](/api-reference/conversions/conversion-object).
**Note – SCA applies to Owner-initiated transfers**
Transfers between two different users with the `UserCategory` of `OWNER` are in scope of SCA. Unless Mangopay can apply an exemption (such as for low-amount or low-risk transfers), these transfers require your platform to [redirect the user](/guides/sca/session) to a Mangopay-hosted webpage where they can authenticate.
The parameter `ScaContext` allows your platform to introduce SCA on these transfers with the value `USER_PRESENT`, and to declare other transfers as not requiring SCA redirection with the value `USER_NOT_PRESENT`.
Read more about [SCA on transfers](/guides/sca/transfers) **→**
### Attributes
**Possible values:** `USER_PRESENT`, `USER_NOT_PRESENT`
**Default value:** `null`
The SCA context of the request, which should be considered required if the `AuthorId` references a user whose `UserCategory` is `OWNER`:
* `USER_PRESENT` – The user is initiating the transfer and is actively present. The platform must [redirect the user](/guides/sca/session) for SCA using the `PendingUserAction.RedirectUrl` returned, unless an exemption can be applied by Mangopay such as on low-amount and low-risk transfers. Platforms are not able to request specific exemptions ([read more](/guides/sca#exemptions-on-actions)).
* `USER_NOT_PRESENT` – No user is present: the transfer is automated by the platform as part of their declared and authorized workflow. On these transfers, SCA redirection is not initially required, but in future Mangopay may be required to override the request.
The API returns what was sent. Both values may technically result in the need for SCA redirection, because an exemption may be applied by Mangopay or (in future) Mangopay may be required to override a given request.
**Note:** `ScaContext` is a temporary mechanism to introduce SCA on existing endpoints and workflows. New integrations should consider the parameter required and send `USER_PRESENT` by default. Read more about [SCA on transfers](/guides/sca/transfers) **→**
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.
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
# View a Transfer
Source: https://docs.mangopay.com/api-reference/transfers/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 - SCA required
{
"ScaContext": "USER_PRESENT",
"Id": "xfer_c_01JRSHQFG2337DBQ4NS8XPYCK7",
"CreationDate": 1744614179,
"DebitedWalletId": "wlt_m_01JRJM7ASZN7YP4MBDVBT0HZF1",
"CreditedWalletId": "wlt_m_01JRHSTW2NP4MDB45WQMDNS23C",
"AuthorId": "user_m_01JRJM5RR5NYQDN0S6QWJJDRMR",
"CreditedUserId": "user_m_01JRHSS3B18H86QA0C467RVK07",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 3001
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 3001
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Type": "TRANSFER",
"Nature": "REGULAR",
"Status": "CREATED",
"Tag": "Created using Mangopay API Postman Collection",
"ResultCode": null,
"ResultMessage": null,
"ExecutionDate": null,
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=sca_0196331bc1247e3fa33be6f9c797abd7"
}
}
```
```json 200 - SCA not required
{
"ScaContext": "USER_PRESENT",
"Id": "xfer_c_01JRSHXFS5YX0HVCXZFQ4J2XMH",
"CreationDate": 1744614375,
"DebitedWalletId": "wlt_m_01JRHSTW2NP4MDB45WQMDNS23C",
"CreditedWalletId": "wlt_m_01JRJM7ASZN7YP4MBDVBT0HZF1",
"AuthorId": "user_m_01JRHSS3B18H86QA0C467RVK07",
"CreditedUserId": "user_m_01JRJM5RR5NYQDN0S6QWJJDRMR",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1000
},
"Fees": {
"Currency": "EUR",
"Amount": 0
},
"Type": "TRANSFER",
"Nature": "REGULAR",
"Status": "SUCCEEDED",
"Tag": "Created using Mangopay API Postman Collection",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1744614375,
"PendingUserAction": 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 {
$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
Source: https://docs.mangopay.com/api-reference/twint/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/twint/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)
Source: https://docs.mangopay.com/api-reference/twint/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/ubo-declarations/create-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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Format: 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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Information about the beneficial owner's place of birth.
The city in which the beneficial owner was born.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country in which the beneficial owner was born.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Information about the beneficial owner's place of birth.
The city in which the beneficial owner was born.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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": "ubo_m_01JH7TS5ZHW3R501ACJEKD5G39",
"CreationDate": 1736503498,
"LastName": "Effertz",
"FirstName": "Michaela",
"Birthday": 652117514,
"Nationality": "FR",
"Address": {
"AddressLine1": "804 Hane Mountains",
"AddressLine2": "Adriel Overpass",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"Birthplace": {
"City": "Paris",
"Country": "FR"
},
"IsActive": true
}
```
```json REST
{
"LastName": "Effertz",
"FirstName": "Michaela",
"Birthday": 652117514,
"Nationality": "FR",
"Address": {
"AddressLine1": "804 Hane Mountains",
"AddressLine2": "Adriel Overpass",
"City": "Paris",
"Region": "Île-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: 'Île-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: 'Île-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 = "Île-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
Source: https://docs.mangopay.com/api-reference/ubo-declarations/create-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Information about the beneficial owner's place of birth.
The city in which the beneficial owner was born.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
{
"Message": "User belonging to category PAYER can't create UBO declarations",
"Type": "invalid_action",
"Id": "96ee403c-1a23-46c9-8b2e-1e56c7e80325#1672326575",
"Date": 1672326576.0,
"errors": null
}
```
```json 200
{
"Id": "ubo_m_01JH7TS09VMCDVV7B39F4A2JAF",
"UserId": "user_m_01JH2Z508798F23M9FB9T9Z2Y7",
"CreationDate": 1736503492,
"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
Source: https://docs.mangopay.com/api-reference/ubo-declarations/list-ubo-declarations-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.
Min. value: `1`; 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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Information about the beneficial owner's place of birth.
The city in which the beneficial owner was born.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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": "Île-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
Source: https://docs.mangopay.com/api-reference/ubo-declarations/submit-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Information about the beneficial owner's place of birth.
The city in which the beneficial owner was born.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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": "Île-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
Source: https://docs.mangopay.com/api-reference/ubo-declarations/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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC 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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Information about the beneficial owner's place of birth.
The city in which the beneficial owner was born.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country in which the beneficial owner was born.
Whether or not the UBO is considered in the declaration. To disregard a UBO, set this parameter to `false`. This action is irreversible.
### Related resources
How to submit a UBO DeclarationLearn more about beneficial owners
# The UBO object
Source: https://docs.mangopay.com/api-reference/ubo-declarations/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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC 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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Information about the beneficial owner's place of birth.
The city in which the beneficial owner was born.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country in which the beneficial owner was born.
Whether or not the UBO is considered in the declaration. To disregard a UBO, set this parameter to `false`. This action is irreversible.
### Related resources
How to submit a UBO Declaration
Learn more about beneficial owners
# Update a UBO
Source: https://docs.mangopay.com/api-reference/ubo-declarations/update-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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Format: 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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Information about the beneficial owner's place of birth.
The city in which the beneficial owner was born.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country in which the beneficial owner was born.
Whether or not the UBO is considered in the declaration. To disregard a UBO, set this parameter to `false`. This action is irreversible.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Information about the beneficial owner's place of birth.
The city in which the beneficial owner was born.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 update an UBO that is inactive",
"Type": "invalid_action",
"Id": "583a9b71-c820-46ea-805d-f6152746bcc6#1736503621",
"Date": 1736503622,
"errors": null
}
```
```json 200
{
"Id": "ubo_m_01JH7TS5ZHW3R501ACJEKD5G39",
"CreationDate": 1736503498,
"LastName": "Wiza",
"FirstName": "Jess",
"Birthday": 652117514,
"Nationality": "FR",
"Address": {
"AddressLine1": "669 Ratke Forge",
"AddressLine2": "Schamberger Walk",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"Birthplace": {
"City": "Paris",
"Country": "FR"
},
"IsActive": true
}
```
```json REST
{
"LastName": "Effertz",
"FirstName": "Michaela",
"Birthday": 652117514,
"Nationality": "FR",
"Address": {
"AddressLine1": "804 Hane Mountains",
"AddressLine2": "Adriel Overpass",
"City": "Paris",
"Region": "Île-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: 'Île-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: 'Île-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
Source: https://docs.mangopay.com/api-reference/ubo-declarations/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Information about the beneficial owner's place of birth.
The city in which the beneficial owner was born.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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": "ubo_m_01JH7TS5ZHW3R501ACJEKD5G39",
"CreationDate": 1736503498,
"LastName": "Wiza",
"FirstName": "Jess",
"Birthday": 652117514,
"Nationality": "FR",
"Address": {
"AddressLine1": "669 Ratke Forge",
"AddressLine2": "Schamberger Walk",
"City": "Paris",
"Region": "Île-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
Source: https://docs.mangopay.com/api-reference/ubo-declarations/view-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Information about the beneficial owner's place of birth.
The city in which the beneficial owner was born.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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": "Île-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
Source: https://docs.mangopay.com/api-reference/user-data-format/user-data-format-object
### Description
The User Data Format object describes a piece of user data and the validation rules applied to its format.
The [POST Validate the format of User data](/api-reference/user-data-format/validate-user-data-format) endpoint allows you to check that the format of the `CompanyNumber` is correct and retrieve the validation rules applied to it.
The `CompanyNumber` must be in the correct format for Business Legal Users to be KYC/B verified.
### 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Company number
Verification requirements
# Validate the format of User data
Source: https://docs.mangopay.com/api-reference/user-data-format/validate-user-data-format
POST /v2.01/{ClientId}/users/data-formats/validation
This endpoint allows you to check that the format of the `CompanyNumber` is correct and retrieve the validation rules applied to it.
The `CompanyNumber` must be in the correct format for Business Legal Users to be KYC/B verified.
**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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Source: https://docs.mangopay.com/api-reference/user-emoney/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
Source: https://docs.mangopay.com/api-reference/user-emoney/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
Source: https://docs.mangopay.com/api-reference/user-regulatory-status/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
Source: https://docs.mangopay.com/api-reference/user-regulatory-status/view-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);
}
}
```
# Categorize a Legal User
Source: https://docs.mangopay.com/api-reference/users/categorize-legal-user
PUT /v2.01/{ClientId}/sca/users/legal/{UserId}/category
Transition a Legal Payer to Owner and enroll them in SCA
export const Aml = ({content}) =>
{content}
;
This endpoint allows you to transition a user whose `UserCategory` is `PAYER` into an `OWNER` by providing the required information and redirecting them on the `PendingUserAction.RedirectUrl` response value to complete SCA enrollment.
The `RedirectUrl` is currently only returned if `LegalPersonType` is `SOLETRADER`, but the endpoint should be integrated for the other types.
Optionally, you can update the `LegalRepresentative.Email` and provide or update the `LegalRepresentative.PhoneNumber` and `LegalRepresentative.PhoneNumberCountry` before SCA redirection.
If the user's `UserCategory` is already `OWNER`, use the [POST Enroll a User in SCA](/api-reference/users/enroll-user) endpoint to obtain an SCA session link.
[Read more about SCA redirection](/guides/sca/session) **→**
**Note – Country-based restrictions apply to users**
Due to Mangopay's [country restrictions](/guides/users/country-restrictions), it is not possible to use blocked countries as the following:
* `LegalRepresentative.Nationality`
* `LegalRepresentative.CountryOfResidence`
### Body parameters
**Allowed values:** `OWNER`
The new category of the user, which must be `OWNER`.
**Allowed values:** `true`
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Information about the legal representative declared for the user.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The nationality of the individual.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of residence of the individual.
Format: A valid email address
Required for SCA to build a [behavioral biometrics profile](/guides/sca/factors#email-confirmation-behavioral-biometrics) and as a backup communication channel.
The individual's email address.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
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
The city of the address.
Max. length: 255 characters
Required if `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.
The country of the address.
Required if `LegalPersonType` is `BUSINESS`.
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).
### Responses
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.
Information about the legal representative declared for the user.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
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`.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Format: A valid email address
Required if `UserCategory` is `OWNER` for SCA to build a [behavioral biometrics profile](/guides/sca/factors#email-confirmation-behavioral-biometrics) and as a backup communication channel. Returned `null` if `UserCategory` is `PAYER`.
The individual's email address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
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`.
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).
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**Returned values:** `PENDING_USER_ACTION`, `ACTIVE`, `CLOSED`
The status of the user:
* `PENDING_USER_ACTION` – The user must enroll in SCA before they can become `ACTIVE`.
* `ACTIVE` – The user account is active and the user can access Mangopay features.
* `CLOSED` – The user account is permanently closed. This value is used by Mangopay to close an account following the procedure outlined in the terms and conditions.
```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": "939c4b8c-3e82-4012-a5bd-a3aa2727432a",
"Date": 1751881519.0,
"errors": {
"LegalRepresentative.Email": "'Email' must not be empty."
}
}
```
```Json
{
"Message": "This endpoint is not allowed for User categorized as OWNER",
"Type": "not_allowed_for_user_category_owner",
"Id": "68d1c3e0-ea28-465b-9ef1-36f388fc896d",
"Date": 1734348365.0,
"errors": null
}
```
If the user's `UserCategory` is `OWNER`, use the [POST Enroll a User in SCA](/api-reference/users/enroll-user) endpoint to obtain an SCA session link.
```json 200 - Owner pending SCA
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Email": "alex.smith@example.com",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": "123456789",
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=0193cef9efe7782881459b02bed1986c"
},
"HeadquartersAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Created using Mangopay API Collection Postman",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1734344306,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
```
```json REST
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
"LegalRepresentative": {
// "Email": "alex.smith@example.com",
// "PhoneNumber": "0611111111",
// "PhoneNumberCountry": "FR",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
},
"HeadquartersAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"CompanyNumber": "123456789"
}
```
# Categorize a Natural User
Source: https://docs.mangopay.com/api-reference/users/categorize-natural-user
PUT /v2.01/{ClientId}/sca/users/natural/{UserId}/category
Transition a Natural Payer to Owner and enroll them in SCA
This endpoint allows you to transition a user whose `UserCategory` is `PAYER` into an `OWNER` by providing the required information and redirecting them on the `PendingUserAction.RedirectUrl` response value to complete SCA enrollment.
Optionally, you can update the `Email` and provide or update the `PhoneNumber` and `PhoneNumberCountry` before SCA redirection.
If the user's `UserCategory` is already `OWNER`, use the [POST Enroll a User in SCA](/api-reference/users/enroll-user) endpoint to obtain an SCA session link.
[Read more about SCA redirection](/guides/sca/session) **→**
**Note – Country-based restrictions apply to users**
Due to Mangopay's [country restrictions](/guides/users/country-restrictions), it is not possible to use blocked countries as the following:
* `Nationality`
* `CountryOfResidence`
### Body parameters
**Allowed values:** `OWNER`
The new category of the user, which must be `OWNER`.
**Allowed values:** `true`
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Format: A valid email address
The individual's email address.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The nationality of the individual.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of residence of the individual.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
### Responses
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Max. length: 255 characters
The occupation of the individual.
Returned `null` if `UserCategory` is `PAYER`.
Returned `null` if `UserCategory` is `PAYER`.
The bracket indicating the income of the individual. The brackets are:
* 1: \< 18K
* 2: 18K - 30K
* 3: 30K - 50K
* 4: 50K - 80K
* 5: 80K - 120K
* 6: > 120K
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.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 individual's email address.
**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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**Returned values:** `PENDING_USER_ACTION`, `ACTIVE`, `CLOSED`
The status of the user:
* `PENDING_USER_ACTION` – The user must enroll in SCA before they can become `ACTIVE`.
* `ACTIVE` – The user account is active and the user can access Mangopay features.
* `CLOSED` – The user account is permanently closed. This value is used by Mangopay to close an account following the procedure outlined in the terms and conditions.
```Json
{
"Message": "This endpoint is not allowed for User categorized as OWNER",
"Type": "not_allowed_for_user_category_owner",
"Id": "68d1c3e0-ea28-465b-9ef1-36f388fc896d",
"Date": 1734348365.0,
"errors": null
}
```
If the user's `UserCategory` is `OWNER`, use the [POST Enroll a User in SCA](/api-reference/users/enroll-user) endpoint to obtain an SCA session link.
```json 200 - Owner pending SCA
{
"FirstName": "Alex",
"LastName": "Smith",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=0193ceab0948799a9af9726fb852fb98"
},
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
```
```json REST
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
// "Email": "alex.smith@example.com",
// "PhoneNumber": "0611111111",
// "PhoneNumberCountry": "FR",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR"
}
```
# Close a Legal User
Source: https://docs.mangopay.com/api-reference/users/close-legal-user
DELETE /v2.01/{ClientId}/users/legal/{UserId}
Permanently close a user account so it can no longer be used
This endpoint allows your platform to close a Mangopay Account, as per Mangopay's terms and conditions, in the event that the agreement between the user and the platform comes to an end.
**Caution – Closure is irreversible**
Calling this endpoint immediately and permanently changes the `UserStatus` to `CLOSED` if the API call is successful. This cannot be undone, even by Mangopay.
Your platform can re-register the user using [POST Create a Legal User (SCA)](/api-reference/users/create-legal-user-sca).
Closure is only possible if all wallets held by the user are empty. Closure is allowed for both `UserCategory` `OWNER` and `PAYER` and for all types of Legal user (Business, Partnership, Organization, Soletrader).
When a User is closed (whether via this endpoint or by Mangopay):
* The `UserStatus` changes to `CLOSED` (and the `USER_ACCOUNT_CLOSED` [webhook](/webhooks/event-types#account-closure) is sent)
* The user has inflows and outflows [blocked](/guides/users/blocked-users) (and the relevant [webhooks](/webhooks/event-types#user-regulatory-status) are sent)
* The user object remains available via the API and Dashboard for historical purposes
Closing a user account does not affect Mangopay's data retention obligations or processes. Personal data associated with the closed account will be retained in accordance with Mangopay's data retention policies.
**Note – Do not overuse OAuth token endpoint if automating calls**
If you are writing a script to close a set of users, ensure you do not call the OAuth token endpoint before each DELETE call. You must use your authentication for the full duration of its lifetime, as described in the [authentication](/api-reference/overview/authentication#2-use-the-bearer-token-for-its-full-lifetime) guide.
Overuse of the OAuth token endpoint is a security and performance risk and may result in preventative action from Mangopay.
### Path parameters
The unique identifier of the user.
### Responses
The 204 response code indicates that the closure request was successful.
```json
{
"Message": "The user cannot be closed as one or several wallets are not empty",
"Type": "user_closure_not_possible",
"Id": "bcb91dae-bb4a-4f99-937c-8f8530c14a31#1744636047",
"Date": 1744636048,
"errors": null
}
```
```json
{
"Message": "An error occurred while closing the user",
"Type": "user_closure_failed",
"Id": "8524ae5f-3232-4910-b9db-4ffd7f4be4ee",
"Date": 1744631045,
"errors": null
}
```
```json REST
// DELETE has no body parameters
```
```php PHP
Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$user = $api->Users->GetLegal('user_m_01JVCP4GYYB7GRXDXP180GF2AQ');
$response = $api->Users->Close($user);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
```
```json 204
```
# Close a Natural User
Source: https://docs.mangopay.com/api-reference/users/close-natural-user
DELETE /v2.01/{ClientId}/users/natural/{UserId}
Permanently close a user account so it can no longer be used
This endpoint allows your platform to close a Mangopay Account, as per Mangopay's terms and conditions, in the event that the agreement between the user and the platform comes to an end.
**Caution – Closure is irreversible**
Calling this endpoint immediately and permanently changes the `UserStatus` to `CLOSED` if the API call is successful. This cannot be undone, even by Mangopay.
Your platform can re-register the user using [POST Create a Natural User (SCA)](/api-reference/users/create-natural-user-sca).
Closure is only possible if all wallets held by the user are empty. Closure is allowed for both `UserCategory` `OWNER` and `PAYER`.
When a User is closed (whether via this endpoint or by Mangopay):
* The `UserStatus` changes to `CLOSED` (and the `USER_ACCOUNT_CLOSED` [webhook](/webhooks/event-types#account-closure) is sent)
* The user has inflows and outflows [blocked](/guides/users/blocked-users) (and the relevant [webhooks](/webhooks/event-types#user-regulatory-status) are sent)
* The user object remains available via the API and Dashboard for historical purposes
Closing a user account does not affect Mangopay's data retention obligations or processes. Personal data associated with the closed account will be retained in accordance with Mangopay's data retention policies.
**Note – Do not overuse OAuth token endpoint if automating calls**
If you are writing a script to close a set of users, ensure you do not call the OAuth token endpoint before each DELETE call. You must use your authentication for the full duration of its lifetime, as described in the [authentication](/api-reference/overview/authentication#2-use-the-bearer-token-for-its-full-lifetime) guide.
Overuse of the OAuth token endpoint is a security and performance risk and may result in preventative action from Mangopay.
### Path parameters
The unique identifier of the user.
### Responses
The 204 response code indicates that the closure request was successful.
```json
{
"Message": "The user cannot be closed as one or several wallets are not empty",
"Type": "user_closure_not_possible",
"Id": "bcb91dae-bb4a-4f99-937c-8f8530c14a31#1744636047",
"Date": 1744636048,
"errors": null
}
```
```json
{
"Message": "An error occurred while closing the user",
"Type": "user_closure_failed",
"Id": "8524ae5f-3232-4910-b9db-4ffd7f4be4ee",
"Date": 1744631045,
"errors": null
}
```
```json REST
// DELETE has no body parameters
```
```php PHP
Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$user = $api->Users->GetNatural('user_m_01JVCNQBJHQCJCTAST064W3WCM');
$response = $api->Users->Close($user);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
```
```json 204
```
# Create a Legal User
Source: https://docs.mangopay.com/api-reference/users/create-legal-user
POST /v2.01/{ClientId}/users/legal
export const Aml = ({content}) =>
{content}
;
**Note – Country-based restrictions apply to users**
Due to Mangopay's [country restrictions](/guides/users/country-restrictions), it is not possible to use blocked countries as the following:
* `HeadquartersAddress.Country`
* `LegalRepresentativeNationality`
* `LegalRepresentativeCountryOfResidence`
* `LegalRepresentativeAddress.Country`
### Body parameters
**Allowed values:** `PAYER`, `OWNER`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
**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: 255 characters
The registered legal name of the entity. The `Name` value should be the one registered with the relevant national authority.
Format: A valid email address
The email address for the entity.
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
The city of the address.
Max. length: 255 characters
Required if `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.
The country of the address.
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).
*Min length: 1; max. length: 100*
The first name of the entity's legal representative.
*Min length: 1; max. length: 100*
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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Format: 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 entity’s legal representative.
Format: 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 country of residence of the entity’s legal representative.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max. length: 255 characters
Custom data that you can add to this object.
### 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Min. length: 1; max. length: 100
The first name of the entity’s legal representative.
Min. length: 1; max. length: 100
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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC 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).
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**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 REST - Payer
{
"HeadquartersAddress": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Name": "Best Business",
"LegalPersonType": "BUSINESS",
"LegalRepresentativeFirstName": "Alex",
"LegalRepresentativeLastName": "Smith",
"LegalRepresentativeEmail": null,
"LegalRepresentativeBirthday": null,
"LegalRepresentativeNationality": null,
"LegalRepresentativeCountryOfResidence": null,
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"LegalRepresentativeProofOfIdentity": null,
"CompanyNumber": null,
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Id": "user_m_01JHX3QCQ38ZC0S52Y1TNGHGAN",
"Tag": "Created using Mangopay API Postman collection",
"CreationDate": 1737217520,
"PersonType": "LEGAL",
"Email": "best.business@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
```json REST - Owner
{
"HeadquartersAddress": {
"AddressLine1": "34 rue des Entreprises",
"AddressLine2": "Batiment B",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Name": "Best Business",
"LegalPersonType": "BUSINESS",
"LegalRepresentativeFirstName": "Alex",
"LegalRepresentativeLastName": "Smith",
"LegalRepresentativeEmail": "alex.smith@example.com",
"LegalRepresentativeBirthday": 652117514,
"LegalRepresentativeNationality": "FR",
"LegalRepresentativeCountryOfResidence": "FR",
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"LegalRepresentativeProofOfIdentity": null,
"CompanyNumber": "123456789",
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Id": "user_m_01JHX3FQ7K0WB275T1BZ1SPZMF",
"Tag": "Created using Mangopay API Postman collection",
"CreationDate": 1737217268,
"PersonType": "LEGAL",
"Email": "best.business@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1737217268,
"UserCategory": "OWNER",
"UserStatus": "ACTIVE"
}
```
```json REST - Payer
{
"UserCategory": "PAYER",
"TermsAndConditionsAccepted": false,
"LegalPersonType": "BUSINESS",
"Name": "Best Business",
"Email": "best.business@example.com",
"LegalRepresentativeFirstName": "Alex",
"LegalRepresentativeLastName": "Smith",
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Tag": "Created using Mangopay API Postman collection"
}
```
```json REST - Owner
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
"LegalPersonType": "BUSINESS",
"Name": "Best Business",
"Email": "best.business@example.com",
"HeadquartersAddress": {
"AddressLine1": "34 rue des Entreprises",
"AddressLine2": "Batiment B",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"CompanyNumber": "123456789",
"LegalRepresentativeFirstName": "Alex",
"LegalRepresentativeLastName": "Smith",
"LegalRepresentativeEmail": "alex.smith@example.com",
"LegalRepresentativeBirthday": 652117514,
"LegalRepresentativeNationality": "FR",
"LegalRepresentativeCountryOfResidence": "FR",
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"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 {
$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',
LegalSca: false,
}
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 = "Île-de-France",
PostalCode = "75001",
Country = CountryIso.FR
},
LegalRepresentativeAddress = new Address {
AddressLine1 = "12032 Wiza Way",
City = "Paris",
Region = "Île-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 Legal User (SCA)
Source: https://docs.mangopay.com/api-reference/users/create-legal-user-sca
POST /v2.01/{ClientId}/sca/users/legal
Register a Legal Payer or Owner (with SCA enrollment)
export const Aml = ({content}) =>
{content}
;
**Note – SCA triggered for Owners**
If `UserCategory` is `OWNER`, this endpoint triggers SCA enrollment.
Your platform needs to use the returned `PendingUserAction.RedirectUrl` (and add an encoded `returnUrl` query parameter) to redirect the user so they can enroll. Read more about how to redirect them in the [SCA session](/guides/sca/session) guide.
The `RedirectUrl` is currently only returned if `LegalPersonType` is `SOLETRADER`, but the endpoint should be integrated for the other types.
**Note – Country-based restrictions apply to users**
Due to Mangopay's [country restrictions](/guides/users/country-restrictions), it is not possible to use blocked countries as the following:
* `HeadquartersAddress.Country`
* `LegalRepresentative.Nationality`
* `LegalRepresentative.CountryOfResidence`
* `LegalRepresentativeAddress.Country`
### Body parameters
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.
Information about the legal representative declared for the user.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Format: 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 individual.
Format: 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 country of residence of the individual.
Format: A valid email address
Required if `UserCategory` is `OWNER` for SCA to build a [behavioral biometrics profile](/guides/sca/factors#email-confirmation-behavioral-biometrics) and as a backup communication channel. Returned `null` if `UserCategory` is `PAYER`.
The individual's email address.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
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).
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
The city of the address.
Max. length: 255 characters
Required if `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.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max. length: 255 characters
Custom data that you can add to this object.
Format: A valid email address
The email address for the entity.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
**Allowed values:** `PAYER`, `OWNER`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
### Responses
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.
Information about the legal representative declared for the user.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
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`.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Format: A valid email address
Required if `UserCategory` is `OWNER` for SCA to build a [behavioral biometrics profile](/guides/sca/factors#email-confirmation-behavioral-biometrics) and as a backup communication channel. Returned `null` if `UserCategory` is `PAYER`.
The individual's email address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
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`.
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).
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**Returned values:** `PENDING_USER_ACTION`, `ACTIVE`, `CLOSED`
The status of the user:
* `PENDING_USER_ACTION` – The user must enroll in SCA before they can become `ACTIVE`.
* `ACTIVE` – The user account is active and the user can access Mangopay features.
* `CLOSED` – The user account is permanently closed. This value is used by Mangopay to close an account following the procedure outlined in the terms and conditions.
```json
{
"Message": "The data you provided does not comply with our anti-fraud policy",
"Type": "fraud_policy",
"Id": "51876239-4814-422e-8f4b-6986520414bb#1750420019",
"Date": 1750420020,
"errors": null
}
```
Read more about Mangopay's [AML rule preventing fake names](/guides/users/types#rule-preventing-fake-user-names) **→**
```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": "733c8dbc-2770-4cc4-80d4-63d684cff38c#1750669115",
"Date": 1750669116,
"errors": {
"HeadquartersAddress.Country": "The HeadquartersAddress.Country used is blocked"
}
}
```
Read more about [country restrictions](/guides/users/country-restrictions) **→**
```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": {
"LegalRepresentative.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": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "c55c3a1e-b581-414b-97be-4c8915127f3b",
"Date": 1751881331.0,
"errors": {
"LegalRepresentative.Email": "'Email' must not be empty."
}
}
```
```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 REST - Payer
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Email": "alex.smith@example.com",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": null,
"PendingUserAction": null,
"HeadquartersAddress": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
```json REST - Owner
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Email": "alex.smith@example.com",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": "123456789",
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=0193cef9efe7782881459b02bed1986c"
},
"HeadquartersAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1734344306,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
```
```json REST - Payer
{
"UserCategory": "PAYER",
"TermsAndConditionsAccepted": false,
"LegalPersonType": "SOLETRADER",
"Name": "Alex Smith",
"Email": "alex.smith.services@example.com",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"Email": "alex.smith@example.com",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Tag": "Created using the Mangopay API Postman collection"
}
```
```json REST - Owner
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
"LegalPersonType": "SOLETRADER",
"Name": "Alex Smith",
"Email": "alex.smith.services@example.com",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Email": "alex.smith@example.com",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
},
"CompanyNumber": "123456789",
"HeadquartersAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Tag": "Created using the Mangopay API Postman collection"
}
```
```javascript NodeJS
const mangopayInstance = require('mangopay2-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-mangopay-client-id',
clientApiKey: 'your-mangopay-api-key',
})
let user = {
UserCategory: "OWNER",
TermsAndConditionsAccepted: true,
LegalPersonType: "SOLETRADER",
Name: "Alex Smith",
Email: "alex.smith.services@example.com",
LegalRepresentative: {
FirstName: "Alex",
LastName: "Smith",
Birthday: 652117514,
Nationality: "FR",
CountryOfResidence: "FR",
Email: "alex.smith@example.com",
PhoneNumber: "0611111111",
PhoneNumberCountry: "FR",
},
CompanyNumber: "123456789",
HeadquartersAddress: {
AddressLine1: "3 rue de la Cité",
AddressLine2: "Appartement 7",
City: "Paris",
Region: "Île-de-France",
PostalCode: "75004",
Country: "FR",
},
LegalRepresentativeAddress: {
AddressLine1: "3 rue de la Cité",
AddressLine2: "Appartement 7",
City: "Paris",
Region: "Île-de-France",
PostalCode: "75004",
Country: "FR",
},
Tag: "Created using the Mangopay NodeJS SDK",
PersonType: "LEGAL",
LegalPersonType: "SOLETRADER",
LegalSca: true,
};
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(user);
```
# Create a Natural User
Source: https://docs.mangopay.com/api-reference/users/create-natural-user
POST /v2.01/{ClientId}/users/natural
export const Aml = ({content}) =>
{content}
;
**Note – Country-based restrictions apply to users**
Due to Mangopay's [country restrictions](/guides/users/country-restrictions), it is not possible to use blocked countries as the following:
* `Nationality`
* `CountryOfResidence`
* `Address.Country`
### Body parameters
**Allowed values:** `PAYER`, `OWNER`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Format: A valid email address
The email address of the user.
Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Format: 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 individual.
Format: 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 country of residence of the individual.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max. length: 255 characters
Returned `null` if `UserCategory` is `PAYER`.
The occupation of the individual.
**Allowed values:** `1`, `2`, `3`, `4`, `5`, `6`, `null`
Returned `null` if `UserCategory` is `PAYER`.
The bracket indicating the income of the individual. The brackets are:
* 1: \< 18K
* 2: 18K - 30K
* 3: 30K - 50K
* 4: 50K - 80K
* 5: 80K - 120K
* 6: > 120K
Max. length: 255 characters
Custom data that you can add to this object.
### 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Max. length: 255 characters
The occupation of the individual.
Returned `null` if `UserCategory` is `PAYER`.
Returned `null` if `UserCategory` is `PAYER`.
The bracket indicating the income of the individual. The brackets are:
* 1: \< 18K
* 2: 18K - 30K
* 3: 30K - 50K
* 4: 50K - 80K
* 5: 80K - 120K
* 6: > 120K
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**Returned values:** ACTIVE, CLOSED
Internal use only. This field can only be used and updated by Mangopay teams.
```json
{
"Message": "The data you provided does not comply with our anti-fraud policy",
"Type": "fraud_policy",
"Id": "51876239-4814-422e-8f4b-6986520414bb#1750420019",
"Date": 1750420020,
"errors": null
}
```
Read more about Mangopay's [AML rule preventing fake names](/guides/users/types#rule-preventing-fake-user-names) **→**
```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": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "31746ec8-51e6-4cd3-bf35-339b6646f3f4#1750669238",
"Date": 1750669239,
"errors": {
"CountryOfResidence": "The CountryOfResidence used is blocked"
}
}
```
Read more about [country restrictions](/guides/users/country-restrictions) **→**
```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 REST - Payer
{
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"FirstName": "Alex",
"LastName": "Smith",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Id": "user_m_01JHX2YFX51HSR8R2HJ8ABSEFF",
"Tag": "Created using Mangopay API Postman collection",
"CreationDate": 1737216704,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
```json REST - Owner
{
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"FirstName": "Alex",
"LastName": "Smith",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Id": "user_m_01JHX332D775R1784M4SK4SFMS",
"Tag": "Created using Mangopay API Postman collection",
"CreationDate": 1737216854,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1737216854,
"UserCategory": "OWNER",
"UserStatus": "ACTIVE"
}
```
```json REST - Payer
{
"UserCategory": "PAYER",
"TermsAndConditionsAccepted": false,
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"FirstName": "Alex",
"LastName": "Smith",
"Email": "alex.smith@example.com",
"Tag": "Created using Mangopay API Postman collection"
}
```
```json REST - Owner
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"FirstName": "Alex",
"LastName": "Smith",
"Email": "alex.smith@example.com",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "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 {
$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',
NaturalSca: false,
}
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);
}
}
```
# Create a Natural User (SCA)
Source: https://docs.mangopay.com/api-reference/users/create-natural-user-sca
POST /v2.01/{ClientId}/sca/users/natural
Register a Natural Payer or Owner (with SCA enrollment)
export const Aml = ({content}) =>
{content}
;
**Note – SCA triggered for Owners**
If `UserCategory` is `OWNER`, this endpoint triggers SCA enrollment. Your platform needs to use the returned `PendingUserAction.RedirectUrl` (and add an encoded `returnUrl` query parameter) to redirect the user so they can enroll.
Read more about how to redirect them in the [SCA session](/guides/sca/session) guide.
**Note – Country-based restrictions apply to users**
Due to Mangopay's [country restrictions](/guides/users/country-restrictions), it is not possible to use blocked countries as the following:
* `Nationality`
* `CountryOfResidence`
* `Address.Country`
### Body parameters
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Format: 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 individual.
Format: 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 country of residence of the individual.
Max. length: 255 characters
Returned `null` if `UserCategory` is `PAYER`.
The occupation of the individual.
**Allowed values:** `1`, `2`, `3`, `4`, `5`, `6`, `null`
Returned `null` if `UserCategory` is `PAYER`.
The bracket indicating the income of the individual. The brackets are:
* 1: \< 18K
* 2: 18K - 30K
* 3: 30K - 50K
* 4: 50K - 80K
* 5: 80K - 120K
* 6: > 120K
Max. length: 255 characters
Custom data that you can add to this object.
Format: A valid email address
The individual's email address.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
**Allowed values:** `PAYER`, `OWNER`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
### Responses
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Max. length: 255 characters
The occupation of the individual.
Returned `null` if `UserCategory` is `PAYER`.
Returned `null` if `UserCategory` is `PAYER`.
The bracket indicating the income of the individual. The brackets are:
* 1: \< 18K
* 2: 18K - 30K
* 3: 30K - 50K
* 4: 50K - 80K
* 5: 80K - 120K
* 6: > 120K
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.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 individual's email address.
**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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**Returned values:** `PENDING_USER_ACTION`, `ACTIVE`, `CLOSED`
The status of the user:
* `PENDING_USER_ACTION` – The user must enroll in SCA before they can become `ACTIVE`.
* `ACTIVE` – The user account is active and the user can access Mangopay features.
* `CLOSED` – The user account is permanently closed. This value is used by Mangopay to close an account following the procedure outlined in the terms and conditions.
```json
{
"Message": "The data you provided does not comply with our anti-fraud policy",
"Type": "fraud_policy",
"Id": "51876239-4814-422e-8f4b-6986520414bb#1750420019",
"Date": 1750420020,
"errors": null
}
```
Read more about Mangopay's [AML rule preventing fake names](/guides/users/types#rule-preventing-fake-user-names) **→**
```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": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "31746ec8-51e6-4cd3-bf35-339b6646f3f4#1750669238",
"Date": 1750669239,
"errors": {
"CountryOfResidence": "The CountryOfResidence used is blocked"
}
}
```
Read more about [country restrictions](/guides/users/country-restrictions) **→**
```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 REST - Payer
{
"FirstName": "Alex",
"LastName": "Smith",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
```json REST - Owner
{
"FirstName": "Alex",
"LastName": "Smith",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=0193ceab0948799a9af9726fb852fb98"
},
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
```
```json REST - Payer
{
"UserCategory": "PAYER",
"TermsAndConditionsAccepted": false,
"FirstName": "Alex",
"LastName": "Smith",
"Email": "alex.smith@example.com",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Tag": "Created using the Mangopay API Postman collection",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
}
```
```json REST - Owner
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
"FirstName": "Alex",
"LastName": "Smith",
"Email": "alex.smith@example.com",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Birthday": 652117514,
"CountryOfResidence": "FR",
"Nationality": "FR",
"Tag": "Created using the Mangopay API Postman collection",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
}
```
```javascript NodeJS
const mangopayInstance = require('mangopay2-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-mangopay-client-id',
clientApiKey: 'your-mangopay-api-key',
})
let user = {
UserCategory: "OWNER",
TermsAndConditionsAccepted: true,
FirstName: "Alex",
LastName: "Smith",
Email: "alex.smith@example.com",
Address: {
AddressLine1: "3 rue de la Cité",
AddressLine2: "Appartement 7",
City: "Paris",
Region: "Île-de-France",
PostalCode: "75004",
Country: "FR",
},
Birthday: 652117514,
CountryOfResidence: "FR",
Nationality: "FR",
Tag: "Created using the Mangopay NodeJS SDK",
PhoneNumber: "0611111111",
PhoneNumberCountry: "FR",
PersonType: "NATURAL",
NaturalSca: true,
};
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(user);
```
# Enroll a User in SCA
Source: https://docs.mangopay.com/api-reference/users/enroll-user
POST /v2.01/{ClientId}/sca/users/{UserId}/enrollment
Obtain an SCA redirection link to enroll an Owner user
If `UserCategory` is `OWNER`, this endpoint allows you to enroll a user in SCA. Your platform needs to retrieve the returned `PendingUserAction.RedirectUrl`, add an encoded `returnUrl` query parameter for them to be returned to after the SCA session, and redirect the user.
[Read more about SCA redirection](/guides/sca/session) **→**
You can use this endpoint to obtain a new session `RedirectUrl`. This is useful to:
* Enroll Owners created without SCA enrollment
* Retry enrollment if a previous session was unsuccessful or expired (after 10 minutes)
Calling this endpoint creates a new valid session that can be used, even if there is one already in progress for the user. Calling this endpoint also doesn't change the user's `UserStatus`, even if the session expires or is unsuccessful.
**Note – This endpoint doesn't change UserStatus**
Calling this endpoint does **not** change the user's status to `PENDING_USER_ACTION` (it stays as `ACTIVE`) and no `USER_ACCOUNT_VALIDATION_ASKED` webhook notification is sent.
This ensures that legacy users do not become blocked if they are unable to complete SCA successfully.
**Caution – Legal representative's email required**
The `LegalRepresentative.Email` address is required for SCA to build a [behavioral biometrics profile](/guides/sca/factors#email-confirmation-behavioral-biometrics) and as a backup communication channel.
Prior to SCA, it was possible to create a Legal `OWNER` without the `LegalRepresentativeEmail`, so this data may be missing. Calling this endpoint without this data will return an error.
### Path parameters
The unique identifier of the user.
### Responses
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
```json
{
"Message": "This endpoint is not allowed for User categorized as PAYER",
"Type": "not_allowed_for_user_category_payer",
"Id": "4f848681-e524-403b-913a-12bf47095328",
"Date": 1736765347,
"errors": null
}
```
To enroll a user whose `UserCategory` is `PAYER` in SCA, use the endpoints [PUT Categorize a Natural User](/api-reference/users/categorize-natural-user) or [PUT Categorize a Legal User](/api-reference/users/categorize-legal-user).
```json 200
{
"PendingUserAction": {
"RedirectUrl": "https://sca.sandbox.mangopay.com/?token=0193cf51ed367151a0cb1c59def21e13"
}
}
```
```json REST
// This POST has no body
```
```php PHP
Config->ClientId = 'your-mangopay-client-id';
$api->Config->ClientPassword = 'your-mangopay-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$userId = 'user_m_01JXHJMQP46F0BB2FT93PQRFE1';
$response = $api->Users->Enroll($userId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
```
# The Legal User object
Source: https://docs.mangopay.com/api-reference/users/legal-user-object
The Legal User object represents a legal entity (legal person) like a company, non-profit or sole proprietor (read more about user [types](/guides/users/types)).
Mangopay users have one of two [categories](/guides/users/categories), indicated by `UserCategory`:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets.
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
### 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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
*Min length: 1; max. length: 100*
The first name of the entity's legal representative.
*Min length: 1; max. length: 100*
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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC 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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the approved and validated workflow implemented by the platform.
**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
# The Legal User object (SCA)
Source: https://docs.mangopay.com/api-reference/users/legal-user-object-sca
### Description
The Legal User object represents a legal entity (legal person) like a company, non-profit or sole proprietor (read more about user [types](/guides/users/types)).
Mangopay users have one of two [categories](/guides/users/categories), indicated by `UserCategory`:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets.
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
To enable `OWNER` users to enroll in SCA, Mangopay released new versions of the user objects and new endpoints.
Read more about SCA on Owner users
#### Changes from non-SCA object
The changes to the Legal User object are:
* New `UserStatus` value `PENDING_USER_ACTION` indicating that the user must enroll in SCA
* New response parameter `PendingUserAction.RedirectUrl` containing the SCA session URL to which the individual must be redirected (after adding an encoded `returnUrl` query parameter)
* New `LegalRepresentative` object to group parameters related to the declared legal representative. This object includes the new `LegalRepresentative.PhoneNumber` and `LegalRepresentative.PhoneNumberCountry`, which may be used to pre-populate the user's phone number in the SCA session
**Caution – Legal representative's email required**
For Owners, the `LegalRepresentative.Email` address is required for SCA to build a [behavioral biometrics profile](/guides/sca/factors#email-confirmation-behavioral-biometrics) and as a backup communication channel.
Prior to SCA, it was possible to create a Legal `OWNER` without the `LegalRepresentativeEmail`, so this data may be missing. Calling the [POST Enroll a User in SCA](/api-reference/users/enroll-user) endpoint without this data will return an error.
```json v2.01 – Non-SCA
{
"HeadquartersAddress": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"LegalRepresentativeAddress": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"Name": "Best Business",
"LegalPersonType": "BUSINESS",
"LegalRepresentativeFirstName": "Alex",
"LegalRepresentativeLastName": "Smith",
"LegalRepresentativeEmail": null,
"LegalRepresentativeBirthday": null,
"LegalRepresentativeNationality": null,
"LegalRepresentativeCountryOfResidence": null,
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"LegalRepresentativeProofOfIdentity": null,
"CompanyNumber": null,
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Id": "user_m_01JHX3FQ7K0WB275T1BZ1SPZMF",
"Tag": "Legal User v2.01 example",
"CreationDate": 1737217268,
"PersonType": "LEGAL",
"Email": "best.business@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
```json v2.01 – SCA-enabled {4-14,19}
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Email": "alex.smith@example.com",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": null,
"PendingUserAction": null,
"HeadquartersAddress": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"LegalRepresentativeAddress": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"Id": "user_m_01JHX3FQ7K0WB275T1BZ1SPZMF",
"Tag": "Legal User v2.01 example with SCA",
"CreationDate": 1737217268,
"PersonType": "LEGAL",
"Email": "best.business@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
### Attributes
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.
Information about the legal representative declared for the user.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
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`.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Format: A valid email address
Required if `UserCategory` is `OWNER` for SCA to build a [behavioral biometrics profile](/guides/sca/factors#email-confirmation-behavioral-biometrics) and as a backup communication channel. Returned `null` if `UserCategory` is `PAYER`.
The individual's email address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
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`.
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).
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**Returned values:** `PENDING_USER_ACTION`, `ACTIVE`, `CLOSED`
The status of the user:
* `PENDING_USER_ACTION` – The user must enroll in SCA before they can become `ACTIVE`.
* `ACTIVE` – The user account is active and the user can access Mangopay features.
* `CLOSED` – The user account is permanently closed. This value is used by Mangopay to close an account following the procedure outlined in the terms and conditions.
### Related resources
Users – Categories
Owner SCA
# List all Users
Source: https://docs.mangopay.com/api-reference/users/list-users
GET /v2.01/{ClientId}/users
List User objects and key details
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.
Min. value: `1`; 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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**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"
}
]
```
```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 {
$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 sort = new Sort();
sort.AddField("CreationDate", SortDirection.desc);
var users = await api.Users.GetAllAsync(new Pagination(1, 20), sort);
string prettyPrint = JsonConvert.SerializeObject(users, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
```
# The Natural User object
Source: https://docs.mangopay.com/api-reference/users/natural-user-object
The Natural User object represents an individual (natural person).
Mangopay users have one of two [categories](/guides/users/categories), indicated by `UserCategory`:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets.
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
### 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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the user.
The date of birth of the user.
Returned `null` if `UserCategory` is `PAYER`.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC 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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the approved and validated workflow implemented by the platform.
**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
# The Natural User object (SCA)
Source: https://docs.mangopay.com/api-reference/users/natural-user-object-sca
### Description
The Natural User object represents an individual (natural person).
Mangopay users have one of two [categories](/guides/users/categories), indicated by `UserCategory`:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets.
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
To enable `OWNER` users to enroll in SCA, Mangopay released new versions of the user objects and new endpoints.
Read more about SCA on Owner users
#### Changes from non-SCA object
The changes to the Natural User object are:
* New `UserStatus` value `PENDING_USER_ACTION` indicating that the user must enroll in SCA
* New response parameter `PendingUserAction.RedirectUrl` containing the SCA session URL to which the individual must be redirected (after adding an encoded `returnUrl` query parameter)
* New `PhoneNumber` and `PhoneNumberCountry` parameters which may be used to pre-populate the user's phone number in the SCA session
```json v2.01 – Non-SCA
{
"Address": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"FirstName": "Alex",
"LastName": "Smith",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Id": "user_m_01JK5MJ4Q0DM6YSH7BGKBE5CDY",
"Tag": "Natural User v2.01 example on non-SCA endpoint",
"CreationDate": 1738577351,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
```json v2.01 – SCA-enabled {22}
{
"FirstName": "Alex",
"LastName": "Smith",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Address": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"PendingUserAction": null,
"Id": "user_m_01JK5MJ4Q0DM6YSH7BGKBE5CDY",
"Tag": "Natural User v2.01 example on SCA endpoint",
"CreationDate": 1738577351,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
### Attributes
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Max. length: 255 characters
The occupation of the individual.
Returned `null` if `UserCategory` is `PAYER`.
Returned `null` if `UserCategory` is `PAYER`.
The bracket indicating the income of the individual. The brackets are:
* 1: \< 18K
* 2: 18K - 30K
* 3: 30K - 50K
* 4: 50K - 80K
* 5: 80K - 120K
* 6: > 120K
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.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 individual's email address.
**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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**Returned values:** `PENDING_USER_ACTION`, `ACTIVE`, `CLOSED`
The status of the user:
* `PENDING_USER_ACTION` – The user must enroll in SCA before they can become `ACTIVE`.
* `ACTIVE` – The user account is active and the user can access Mangopay features.
* `CLOSED` – The user account is permanently closed. This value is used by Mangopay to close an account following the procedure outlined in the terms and conditions.
### Related resources
Users – Categories
Owner SCA
# Update a Legal User
Source: https://docs.mangopay.com/api-reference/users/update-legal-user
PUT /v2.01/{ClientId}/users/legal/{UserId}
export const Aml = ({content}) =>
{content}
;
**Caution – Modification may cause KYC/B verification downgrade**
If `KYCLevel` is `REGULAR`, modifying the following values triggers a [verification downgrade](/guides/users/verification/downgrade) to `LIGHT`:
* `LegalRepresentative.FirstName`
* `LegalRepresentative.LastName`
* `LegalRepresentative.Birthday`
* `LegalRepresentative.Nationality`
* `LegalPersonType`
**Note – Country-based restrictions apply to users**
Due to Mangopay's [country restrictions](/guides/users/country-restrictions), it is not possible to use blocked countries as the following:
* `HeadquartersAddress.Country`
* `LegalRepresentativeNationality`
* `LegalRepresentativeCountryOfResidence`
* `LegalRepresentativeAddress.Country`
### Path parameters
The unique identifier of the user.
### Body parameters
**Allowed values:** `PAYER`, `OWNER`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
**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: 255 characters
The registered legal name of the entity. The `Name` value should be the one registered with the relevant national authority.
Format: A valid email address
The email address for the entity.
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
The city of the address.
Max. length: 255 characters
Required if `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.
The country of the address.
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 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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
*Min length: 1; max. length: 100*
The first name of the entity's legal representative.
*Min length: 1; max. length: 100*
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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Format: 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 entity’s legal representative.
Format: 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 country of residence of the entity’s legal representative.
Max. length: 255 characters
Custom data that you can add to this object.
### 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Min. length: 1; max. length: 100
The first name of the entity’s legal representative.
Min. length: 1; max. length: 100
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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC 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).
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**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 data you provided does not comply with our anti-fraud policy",
"Type": "fraud_policy",
"Id": "51876239-4814-422e-8f4b-6986520414bb#1750420019",
"Date": 1750420020,
"errors": null
}
```
Read more about Mangopay's [AML rule preventing fake names](/guides/users/types#rule-preventing-fake-user-names) **→**
```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": {
"LegalRepresentative.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": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "733c8dbc-2770-4cc4-80d4-63d684cff38c#1750669115",
"Date": 1750669116,
"errors": {
"HeadquartersAddress.Country": "The HeadquartersAddress.Country used is blocked"
}
}
```
Read more about [country restrictions](/guides/users/country-restrictions) **→**
```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 REST - 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": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"Name": "Best Business",
"LegalPersonType": "BUSINESS",
"LegalRepresentativeFirstName": "Alex",
"LegalRepresentativeLastName": "Smith",
"LegalRepresentativeEmail": null,
"LegalRepresentativeBirthday": null,
"LegalRepresentativeNationality": null,
"LegalRepresentativeCountryOfResidence": null,
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"LegalRepresentativeProofOfIdentity": null,
"CompanyNumber": null,
"Id": "user_m_01JHX2YFX51HSR8R2HJ8ABSEFF",
"Tag": "New tag",
"CreationDate": 1670863988,
"PersonType": "LEGAL",
"Email": "best.business@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
```json REST - Owner
{
"HeadquartersAddress": {
"AddressLine1": "34 rue des Entreprises",
"AddressLine2": "Batiment B",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Name": "Best Business",
"LegalPersonType": "BUSINESS",
"LegalRepresentativeFirstName": "Alex",
"LegalRepresentativeLastName": "Smith",
"LegalRepresentativeEmail": "alex.smith@example.com",
"LegalRepresentativeBirthday": 652117514,
"LegalRepresentativeNationality": "FR",
"LegalRepresentativeCountryOfResidence": "FR",
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"LegalRepresentativeProofOfIdentity": null,
"CompanyNumber": "123456789",
"Id": "user_m_01JHX2YFX51HSR8R2HJ8ABSEFF",
"Tag": "Created using MANGOPAY API Collection Postman",
"CreationDate": 1670864174,
"PersonType": "LEGAL",
"Email": "best.business@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1670864174,
"UserCategory": "OWNER",
"UserStatus": "ACTIVE"
}
```
```json REST - Payer
{
"UserCategory": "PAYER",
"TermsAndConditionsAccepted": false,
"Tag": "New tag"
}
```
```json REST - Owner
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
"HeadquartersAddress": {
"AddressLine1": "34 rue des Entreprises",
"AddressLine2": "Batiment B",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"CompanyNumber": "123456789",
"LegalRepresentativeEmail": "alex.smith@example.com",
"LegalRepresentativeBirthday": 652117514,
"LegalRepresentativeNationality": "FR",
"LegalRepresentativeCountryOfResidence": "FR"
}
```
```php PHP
Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$userId = 'user_m_01HYJVHY77NDDM97TQP57W87MH';
$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: 'user_m_01HYJVHY77NDDM97TQP57W87MH',
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 Legal User (SCA)
Source: https://docs.mangopay.com/api-reference/users/update-legal-user-sca
PUT /v2.01/{ClientId}/sca/users/legal/{UserId}
Modify details for a Legal Payer or Owner without changing category
export const Aml = ({content}) =>
{content}
;
**Caution – Modification may trigger SCA re-enrollment**
If `UserCategory` is `OWNER`, modifying the following values changes `UserStatus` to `PENDING_USER_ACTION` and requires [re-enrollment in SCA](/guides/sca/users#re-enroll-an-enrolled-owner) using the returned `PendingUserAction.RedirectUrl`:
* `LegalRepresentative.Email`
* `LegalRepresentative.PhoneNumber`
* `LegalRepresentative.PhoneNumberCountry`
The `RedirectUrl` is currently only returned if `LegalPersonType` is `SOLETRADER`, but the endpoint should be integrated for the other types.
**Caution – Modification may cause KYC/B verification downgrade**
If `KYCLevel` is `REGULAR`, modifying the following values triggers a [verification downgrade](/guides/users/verification/downgrade) to `LIGHT`:
* `LegalRepresentative.FirstName`
* `LegalRepresentative.LastName`
* `LegalRepresentative.Birthday`
* `LegalRepresentative.Nationality`
* `LegalPersonType`
**Note – Country-based restrictions apply to users**
Due to Mangopay's [country restrictions](/guides/users/country-restrictions), it is not possible to use blocked countries as the following:
* `HeadquartersAddress.Country`
* `LegalRepresentative.Nationality`
* `LegalRepresentative.CountryOfResidence`
* `LegalRepresentativeAddress.Country`
### Body parameters
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
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.
Information about the legal representative declared for the user.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Format: 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 individual.
Format: 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 country of residence of the individual.
Format: A valid email address
The individual's email address.
**Caution:** If `UserCategory` is `OWNER`, modifying this value means the user will be required to re-enroll the new value in SCA via the `PendingUserAction.RedirectUrl`. For more details see the [SCA guides](/guides/sca/users).
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
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).
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
The city of the address.
Max. length: 255 characters
Required if `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.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max. length: 255 characters
Custom data that you can add to this object.
Format: A valid email address
The email address for the entity.
### Responses
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.
Information about the legal representative declared for the user.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
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`.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Format: A valid email address
Required if `UserCategory` is `OWNER` for SCA to build a [behavioral biometrics profile](/guides/sca/factors#email-confirmation-behavioral-biometrics) and as a backup communication channel. Returned `null` if `UserCategory` is `PAYER`.
The individual's email address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
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`.
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).
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**Returned values:** `PENDING_USER_ACTION`, `ACTIVE`, `CLOSED`
The status of the user:
* `PENDING_USER_ACTION` – The user must enroll in SCA before they can become `ACTIVE`.
* `ACTIVE` – The user account is active and the user can access Mangopay features.
* `CLOSED` – The user account is permanently closed. This value is used by Mangopay to close an account following the procedure outlined in the terms and conditions.
```json
{
"Message": "The data you provided does not comply with our anti-fraud policy",
"Type": "fraud_policy",
"Id": "51876239-4814-422e-8f4b-6986520414bb#1750420019",
"Date": 1750420020,
"errors": null
}
```
Read more about Mangopay's [AML rule preventing fake names](/guides/users/types#rule-preventing-fake-user-names) **→**
```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": {
"LegalRepresentative.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": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "733c8dbc-2770-4cc4-80d4-63d684cff38c#1750669115",
"Date": 1750669116,
"errors": {
"HeadquartersAddress.Country": "The HeadquartersAddress.Country used is blocked"
}
}
```
Read more about [country restrictions](/guides/users/country-restrictions) **→**
```json REST - Payer
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Email": null,
"PhoneNumber": null,
"PhoneNumberCountry": null
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": null,
"PendingUserAction": null,
"HeadquartersAddress": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Updated using the Mangopay API Postman collection",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
```json REST - Owner
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Email": "alex.smith@example.com",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": "123456789",
"PendingUserAction": null,
"HeadquartersAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Updated using the Mangopay API Postman collection",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1734344306,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
```
```json REST - Payer
{
"UserCategory": "PAYER",
"TermsAndConditionsAccepted": false,
"Tag": "New tag"
}
```
```json REST - Owner
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
"Tag": "New tag"
}
```
# Update a Natural User
Source: https://docs.mangopay.com/api-reference/users/update-natural-user
PUT /v2.01/{ClientId}/users/natural/{UserId}
export const Aml = ({content}) =>
{content}
;
**Caution – Modification may cause KYC/B verification downgrade**
If `KYCLevel` is `REGULAR`, modifying the following values triggers a [verification downgrade](/guides/users/verification/downgrade) to `LIGHT`:
* `FirstName`
* `LastName`
* `Birthday`
* `Nationality`
**Note – Country-based restrictions apply to users**
Due to Mangopay's [country restrictions](/guides/users/country-restrictions), it is not possible to use blocked countries as the following:
* `Nationality`
* `CountryOfResidence`
* `Address.Country`
### Path parameters
The unique identifier of the user.
### Body parameters
**Allowed values:** `PAYER`, `OWNER`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Format: A valid email address
The email address of the user.
Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Format: 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 individual.
Format: 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 country of residence of the individual.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max. length: 255 characters
Returned `null` if `UserCategory` is `PAYER`.
The occupation of the individual.
**Allowed values:** `1`, `2`, `3`, `4`, `5`, `6`, `null`
Returned `null` if `UserCategory` is `PAYER`.
The bracket indicating the income of the individual. The brackets are:
* 1: \< 18K
* 2: 18K - 30K
* 3: 30K - 50K
* 4: 50K - 80K
* 5: 80K - 120K
* 6: > 120K
Max. length: 255 characters
Custom data that you can add to this object.
### 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Max. length: 255 characters
The occupation of the individual.
Returned `null` if `UserCategory` is `PAYER`.
Returned `null` if `UserCategory` is `PAYER`.
The bracket indicating the income of the individual. The brackets are:
* 1: \< 18K
* 2: 18K - 30K
* 3: 30K - 50K
* 4: 50K - 80K
* 5: 80K - 120K
* 6: > 120K
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**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 data you provided does not comply with our anti-fraud policy",
"Type": "fraud_policy",
"Id": "51876239-4814-422e-8f4b-6986520414bb#1750420019",
"Date": 1750420020,
"errors": null
}
```
Read more about Mangopay's [AML rule preventing fake names](/guides/users/types#rule-preventing-fake-user-names) **→**
```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": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "31746ec8-51e6-4cd3-bf35-339b6646f3f4#1750669238",
"Date": 1750669239,
"errors": {
"CountryOfResidence": "The CountryOfResidence used is blocked"
}
}
```
Read more about [country restrictions](/guides/users/country-restrictions) **→**
```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
{
"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 REST - Payer
{
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"FirstName": "Alex",
"LastName": "Smith",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Id": "user_m_01JHX2YFX51HSR8R2HJ8ABSEFF",
"Tag": "New tag",
"CreationDate": 1737216704,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
```json REST - Owner
{
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"FirstName": "Alex",
"LastName": "Smith",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Id": "user_m_01JHX332D775R1784M4SK4SFMS",
"Tag": "Created using Mangopay API Postman collection",
"CreationDate": 1737216854,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1737216854,
"UserCategory": "OWNER",
"UserStatus": "ACTIVE"
}
```
```json REST - Payer
{
"UserCategory": "PAYER",
"TermsAndConditionsAccepted": false,
"Tag": "New tag"
}
```
```json REST - Owner
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR"
}
```
```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);
}
}
```
# Update a Natural User (SCA)
Source: https://docs.mangopay.com/api-reference/users/update-natural-user-sca
PUT /v2.01/{ClientId}/sca/users/natural/{UserId}
Modify details for a Natural Payer or Owner without changing category
export const Aml = ({content}) =>
{content}
;
**Caution – Modification may trigger SCA re-enrollment**
If `UserCategory` is `OWNER`, modifying the following values changes `UserStatus` to `PENDING_USER_ACTION` and requires [re-enrollment in SCA](/guides/sca/users#re-enroll-an-enrolled-owner) using the returned `PendingUserAction.RedirectUrl`:
* `Email`
* `PhoneNumber`
* `PhoneNumberCountry`
**Caution – Modification may cause KYC/B verification downgrade**
If `KYCLevel` is `REGULAR`, modifying the following values triggers a [verification downgrade](/guides/users/verification/downgrade) to `LIGHT`:
* `FirstName`
* `LastName`
* `Birthday`
* `Nationality`
**Note – Country-based restrictions apply to users**
Due to Mangopay's [country restrictions](/guides/users/country-restrictions), it is not possible to use blocked countries as the following:
* `Nationality`
* `CountryOfResidence`
* `Address.Country`
### Body parameters
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Required if `UserCategory` is `OWNER`. Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Format: 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 individual.
Format: 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 country of residence of the individual.
Max. length: 255 characters
Returned `null` if `UserCategory` is `PAYER`.
The occupation of the individual.
**Allowed values:** `1`, `2`, `3`, `4`, `5`, `6`, `null`
Returned `null` if `UserCategory` is `PAYER`.
The bracket indicating the income of the individual. The brackets are:
* 1: \< 18K
* 2: 18K - 30K
* 3: 30K - 50K
* 4: 50K - 80K
* 5: 80K - 120K
* 6: > 120K
Max. length: 255 characters
Custom data that you can add to this object.
Format: A valid email address
The individual's email address.
**Caution:** If `UserCategory` is `OWNER`, modifying this value means the user will be required to re-enroll the new value in SCA via the `PendingUserAction.RedirectUrl`. For more details see the [SCA guides](/guides/sca/users).
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
### Responses
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Max. length: 255 characters
The occupation of the individual.
Returned `null` if `UserCategory` is `PAYER`.
Returned `null` if `UserCategory` is `PAYER`.
The bracket indicating the income of the individual. The brackets are:
* 1: \< 18K
* 2: 18K - 30K
* 3: 30K - 50K
* 4: 50K - 80K
* 5: 80K - 120K
* 6: > 120K
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.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 individual's email address.
**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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**Returned values:** `PENDING_USER_ACTION`, `ACTIVE`, `CLOSED`
The status of the user:
* `PENDING_USER_ACTION` – The user must enroll in SCA before they can become `ACTIVE`.
* `ACTIVE` – The user account is active and the user can access Mangopay features.
* `CLOSED` – The user account is permanently closed. This value is used by Mangopay to close an account following the procedure outlined in the terms and conditions.
```json
{
"Message": "The data you provided does not comply with our anti-fraud policy",
"Type": "fraud_policy",
"Id": "51876239-4814-422e-8f4b-6986520414bb#1750420019",
"Date": 1750420020,
"errors": null
}
```
Read more about Mangopay's [AML rule preventing fake names](/guides/users/types#rule-preventing-fake-user-names) **→**
```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": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "31746ec8-51e6-4cd3-bf35-339b6646f3f4#1750669238",
"Date": 1750669239,
"errors": {
"CountryOfResidence": "The CountryOfResidence used is blocked"
}
}
```
Read more about [country restrictions](/guides/users/country-restrictions) **→**
```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 REST - Payer
{
"FirstName": "Alex",
"LastName": "Smith",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "New tag",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
```json REST - Owner
{
"FirstName": "Alex",
"LastName": "Smith",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "New tag",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
```
```json REST - Payer
{
"UserCategory": "PAYER",
"TermsAndConditionsAccepted": false,
"Tag": "New tag"
}
```
```json REST - Owner
{
"UserCategory": "OWNER",
"TermsAndConditionsAccepted": true,
"Tag": "New tag"
}
```
# View a User
Source: https://docs.mangopay.com/api-reference/users/view-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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Max. length: 255 characters
The occupation of the individual.
Returned `null` if `UserCategory` is `PAYER`.
Returned `null` if `UserCategory` is `PAYER`.
The bracket indicating the income of the individual. The brackets are:
* 1: \< 18K
* 2: 18K - 30K
* 3: 30K - 50K
* 4: 50K - 80K
* 5: 80K - 120K
* 6: > 120K
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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Min. length: 1; max. length: 100
The first name of the entity’s legal representative.
Min. length: 1; max. length: 100
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:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC 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).
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**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": "Île-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": "Île-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": "Île-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": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"LegalRepresentativeAddress": {
"AddressLine1": "12032 Wiza Way",
"AddressLine2": "Mitchell Drive",
"City": "Paris",
"Region": "Île-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"
}
```
```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 {
$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);
}
}
```
# View a User (SCA)
Source: https://docs.mangopay.com/api-reference/users/view-user-sca
GET /v2.01/{ClientId}/sca/users/{UserId}
Retrieve a Natural or Legal User
This endpoint returns the same data as the legacy [GET View a User](/api-reference/users/view-user), including the new `PENDING_USER_ACTION` value for `UserStatus`, with two minor changes:
* The `PendingUserAction` field, which is always `null` on this endpoint
* For Legal users, the `LegalRepresentative` object, which contains the data for the legal representative
**Note – `RedirectUrl` not available on this endpoint**
The `RedirectUrl` is only returned on API calls that trigger SCA.
To obtain a new session link for an Owner, call the [POST Enroll a User in SCA](/api-reference/users/enroll-user) endpoint.
[Read more](/guides/sca/users#view-and-list-users) **→**
### Path parameters
The unique identifier of the user.
### Responses
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Max. length: 255 characters
The occupation of the individual.
Returned `null` if `UserCategory` is `PAYER`.
Returned `null` if `UserCategory` is `PAYER`.
The bracket indicating the income of the individual. The brackets are:
* 1: \< 18K
* 2: 18K - 30K
* 3: 30K - 50K
* 4: 50K - 80K
* 5: 80K - 120K
* 6: > 120K
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.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 individual's email address.
**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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**Returned values:** `PENDING_USER_ACTION`, `ACTIVE`, `CLOSED`
The status of the user:
* `PENDING_USER_ACTION` – The user must enroll in SCA before they can become `ACTIVE`.
* `ACTIVE` – The user account is active and the user can access Mangopay features.
* `CLOSED` – The user account is permanently closed. This value is used by Mangopay to close an account following the procedure outlined in the terms and conditions.
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.
Information about the legal representative declared for the user.
Min. length: 1; max. length: 100
The first name of the individual.
Min. length: 1; max. length: 100
The last name of the individual.
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`.
Returned `null` if `UserCategory` is `PAYER`.
The date of birth of the individual.
**Note:** This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
Returned `null` if `UserCategory` is `PAYER`.
The nationality of the individual.
Returned `null` if `UserCategory` is `PAYER`.
The country of residence of the individual.
Format: A valid email address
Required if `UserCategory` is `OWNER` for SCA to build a [behavioral biometrics profile](/guides/sca/factors#email-confirmation-behavioral-biometrics) and as a backup communication channel. Returned `null` if `UserCategory` is `PAYER`.
The individual's email address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
Required if the `PhoneNumber` is provided in local format (recommended), to render the value in the E.164 standard.
Format: International E.164 standard (preceded by plus sign and country code) or local format
The individual's phone number. The local format (recommended) requires `PhoneNumberCountry` to ensure correct formatting.
If present, the phone number forms part of card transaction data that is passed to issuers to improve authentication rates.
For users with `UserCategory` `OWNER` , the phone number is used to pre-populate the SCA session for them to confirm and receive an SMS OTP. If the individual modifies the phone number during the session, this data is not updated in the API.
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`.
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).
Object containing the link needed for SCA redirection if triggered by the API call (otherwise returned `null`).
The URL to which to redirect the user to perform strong customer authentication (SCA) via a Mangopay-hosted webpage. This value is a variable and should not be hardcoded.
The SCA session link expires 10 minutes after it's generated.
**Caution:** Before redirecting the user on this URL, you must add the query parameter `ReturnUrl` with the percent-encoded URL to which you want the SCA session to return the user after authentication (whether successful or not).
For more details, see [How to redirect a user for an SCA session](/guides/sca/session#how-to-redirect-a-user-for-sca).
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
Whether the user has accepted Mangopay's terms and conditions (as defined by your contract, see the [T\&Cs guide](/guides/users/terms) for details).
Must be `true` if `UserCategory` is `OWNER`.
The date and time at which the `TermsAndConditionsAccepted` value was set to `true`.
Returned `null` if `UserCategory` is `PAYER`.
**Possible values:** `PAYER`, `OWNER`, `PLATFORM`
The [category](/guides/users/categories) of the user:
* `PAYER` – User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).
* `OWNER` – User who can also receive transfers to their wallets. Owners are able to request [KYC verification](/guides/users/verification), which if successful gives them the `KYCLevel` of `REGULAR` and the ability to request payouts.
* `PLATFORM` – Single specific user that represents the platform. The `PLATFORM` value is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
**Returned values:** `PENDING_USER_ACTION`, `ACTIVE`, `CLOSED`
The status of the user:
* `PENDING_USER_ACTION` – The user must enroll in SCA before they can become `ACTIVE`.
* `ACTIVE` – The user account is active and the user can access Mangopay features.
* `CLOSED` – The user account is permanently closed. This value is used by Mangopay to close an account following the procedure outlined in the terms and conditions.
```json 200 - Natural Payer
{
"FirstName": "Ruby",
"LastName": "Reinger",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": null,
"PhoneNumberCountry": null,
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
```json 200 - Natural Owner pending SCA
{
"FirstName": "Ruby",
"LastName": "Reinger",
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR",
"Address": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"PendingUserAction": null,
"Id": "user_m_01JF7AP1M46TR0JH7WBGPWK7D7",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734339135,
"PersonType": "NATURAL",
"Email": "alex.smith@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
```
```json 200 - Legal Payer
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Email": null,
"PhoneNumber": null,
"PhoneNumberCountry": null
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": null,
"PendingUserAction": null,
"HeadquartersAddress": {
"AddressLine1": null,
"AddressLine2": null,
"City": null,
"Region": null,
"PostalCode": null,
"Country": null
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
}
```
```json 200 - Legal Owner pending SCA
{
"Name": "Alex Smith",
"LegalPersonType": "SOLETRADER",
"LegalRepresentative": {
"FirstName": "Alex",
"LastName": "Smith",
"ProofOfIdentity": null,
"Birthday": 652117514,
"Nationality": "FR",
"CountryOfResidence": "FR",
"Email": "alex.smith@example.com",
"PhoneNumber": "0611111111",
"PhoneNumberCountry": "FR"
},
"ProofOfRegistration": null,
"ShareholderDeclaration": null,
"Statute": null,
"CompanyNumber": "123456789",
"PendingUserAction": null,
"HeadquartersAddress": {
"AddressLine1": "100 Rue de Rivoli",
"AddressLine2": "Bâtiment B",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"LegalRepresentativeAddress": {
"AddressLine1": "3 rue de la Cité",
"AddressLine2": "Appartement 7",
"City": "Paris",
"Region": "Ile-de-France",
"PostalCode": "75004",
"Country": "FR"
},
"Id": "user_m_01JF7FKVP51PS3TYKCN79VZZ8M",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1734344306,
"PersonType": "LEGAL",
"Email": "alex.smith.services@example.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1734344306,
"UserCategory": "OWNER",
"UserStatus": "PENDING_USER_ACTION"
}
```
```json REST
// GET has no body parameters
```
```javascript NodeJS
const mangopayInstance = require('mangopay2-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-mangopay-client-id',
clientApiKey: 'your-mangopay-api-key',
})
let user = {
Id: "user_m_01JTNJDEXCGS9G3X4ZZDPE2A8R",
};
const getUser = async (userId) => {
return await mangopay.Users.getSca(userId)
.then((response) => {
console.info(response);
return response;
})
.catch((err) => {
console.log(err);
return false;
});
};
getUser(user.Id);
```
# Create a Virtual Account
Source: https://docs.mangopay.com/api-reference/virtual-accounts/create-virtual-account
POST /v2.01/{ClientId}/wallets/{WalletId}/virtual-accounts
Set up a virtual IBAN or local account attached to a wallet
Virtual Account object **→**
### Path parameter
The unique identifier of the wallet.
### Body parameters
**Allowed values:** The two-letter ISO 3166-1 country code (LU, FR, GB, etc.) of an available country (depends on contract and activation settings).
The country of the IBAN. The country must correspond to the currency of the wallet. See the virtual account guide for details.
**Allowed values:** `COLLECTION`, `USER_OWNED`
The type of the virtual account:
* `COLLECTION` - Owned by Mangopay and usable by platforms and/or users for the purpose of collecting and reconciling incoming funds paid by users.
* `USER_OWNED` - Owned by the wallet owner, enabling them to accept and store funds and make payments.
For more information, see [virtual account](/guides/payment-methods/banking/virtual-iban) guide.
Max. length: 255 characters
Custom data that you can add to this object.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 wallet.
**Allowed values:** `COLLECTION`, `USER_OWNED`
The type of the virtual account:
* `COLLECTION` - Owned by Mangopay and usable by platforms and/or users for the purpose of collecting and reconciling incoming funds paid by users.
* `USER_OWNED` - Owned by the wallet owner, enabling them to accept and store funds and make payments.
For more information, see [virtual account](/guides/payment-methods/banking/virtual-iban) guide.
**Returned values:** The two-letter ISO 3166-1 country code (LU, FR, GB, etc.) of an available country (depends on contract and activation settings).
The country of the IBAN. The country must correspond to the currency of the wallet. See the virtual account guide for details.
The status of the Virtual Account:
* `PENDING` – The account creation request is being processed and full account details may not yet be returned. Any funds sent to the account are returned (if account details exist). `PENDING` can transition to `ACTIVE` or `FAILED`.
* `ACTIVE` – The account is active and can receive funds (see note about delayed [UK CoP recognition](#set-up-the-account) for `GB` accounts). `ACTIVE` can transition to `BLOCKED` or `CLOSED`.
* `BLOCKED` – The account is blocked and is not active. Any funds sent to the account are returned. This temporary status may be used during processes relating to user verification or fraud screening. `BLOCKED` can transition to `ACTIVE` or `CLOSED`.
* `CLOSED` – The account has been deactivated and is closed. Any funds sent to the account are returned. This is a final state.
* `FAILED` – The account creation request failed or was rejected. This final state is rare. Any funds sent to the account are returned (if account details exist).
See the [virtual account](/guides/payment-methods/banking/virtual-iban#status) guide for more details.
Whether or not the Virtual Account is active.
The owner of the virtual account.
The account owner is assigned automatically depending on the `VirtualAccountPurpose`:
* `COLLECTION` – Owned by Mangopay SA or Mangopay UK Ltd., mentioning the platform's trading name in the format "MGP `PlatformTradingName`"
* `USER_OWNED` – Owned by the owner of the associated wallet: `FirstName` `LastName` for Natural Users; `Name` for Legal Users
The account details in local format.
**Best practice:** Retrieve both the fields and values of these objects dynamically to present to the user. The `LocalAccountDetails.Account` object has different properties depending on the virtual account `Country`.
The address associated with the account.
Max. length: 255 characters
The building number and street name of the address.
Max. length: 50 characters
The postal code of the address.
Max. length: 255 characters
The town or city of the address.
Max. length: 255 characters
The region, state, or county of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Details of the account in local account identifier format.
The properties of this object differ depending on the Virtual Account `Country`:
* **IBAN** – Format if `Country` is `DK`, `DE`, `ES`, `FR`, `LU`
* **GB** – Format if `Country` is `GB`
* **US** – Format if `Country` is `US`
* **CA** – Format if `Country` is `CA`
**Caution:** Other formats are planned in future as Mangopay's account coverage expands. Ensure you retrieve the `Account` object's properties and values dynamically.
The international bank account number (IBAN) of the account.
The bank identifier code (BIC) of the account.
The account number of the account.
The sort code of the account.
The account number of the account.
The 9-digit ACH routing number of the US account.
The 9-digit Fedwire (ABA) number of the US account.
The account type of the US account, which is always `CHECKING`.
The 5-digit branch code or transit number of the CA account.
The 3-digit institution number of the CA account.
The account number of the account.
The name of the bank.
List of the account details in international format.
**Best practice:** Retrieve both the fields and values of these objects dynamically to present to the user. The `InternationalAccountDetails.Account` object has different properties depending on the virtual account `Country`.
The address associated with the account.
Max. length: 255 characters
The building number and street name of the address.
Max. length: 50 characters
The postal code of the address.
Max. length: 255 characters
The town or city of the address.
Max. length: 255 characters
The region, state, or county of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Details of the account in international format.
Returned `null` if `Country` is `US` or `CA` as `Capabilities.InternationalPayinAvailable` is always `false`.
The international bank account number (IBAN) of the account.
The bank identifier code (BIC) of the account.
The name of the bank.
Information about the account's payment capabilities.
Whether or not local bank wires can be made to this account.
Whether or not international bank wires can be made to this account.
Returned `false` if `Country` is `US` or `CA`.
**Returned values:** One or more currency codes in ISO 4217 format (EUR, GBP, etc.)
List of currencies supported by the account.
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": "Wallet currency not supported. Supported values: EUR/GBP/AUD/DKK/PLN.",
"Type": "wallet_currency_not_supported",
"Id": "1eb1c947-bac2-4127-a636-fe7d811db9e7",
"Date": 1725288513.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": "The wallet already has an associated Collection Virtual Account",
"Type": "incorrect_account_purpose_for_wallet",
"Id": "d29c77bc-e670-4c72-a715-445489532a1a",
"Date": 1726238248,
"errors": null
}
```
```json
{
"Message": "The wallet already has an associated User Owned Virtual Account",
"Type": "incorrect_account_purpose_for_wallet",
"Id": "8095b0a1-b00b-4696-b5f1-e716c3671707",
"Date": 1726238338,
"errors": null
}
```
```json
{
"Id": "f577f4c5-3175-4023-b97a-8f5af47fdbff",
"Message": "There is already a banking alias existing for this wallet",
"Type": "wallet_banking_alias_already_exists",
"Date": 1743678181.0,
"errors": null
}
```
```json
{
"Id": "19987822-6cd1-4dd8-8b83-8cfdda49bcb2",
"Message": "Missing field in Address for USER_OWNED account purpose",
"Type": "user_error",
"Date": 1743678181.0,
"errors": null
}
```
```json
{
"Id": "b8449773-2fe3-4fee-87f3-c8c84dc574ea",
"Message": "Refused due to user UserCategory: PAYER",
"Type": "forbidden_ressource",
"Date": 1743678181.0,
"errors": null
}
```
```json
{
"Id": "7081ae37-f4b2-4c38-9bc4-9a14546d544f",
"Message": "The user is not KYC-validated",
"Type": "forbidden_ressource",
"Date": 1743678181.0,
"errors": null
}
```
```json GB - ACTIVE
{
"Id": "wltbank_01JSH9TKTHE2KHXENE8K4KD46C",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1745411198,
"WalletId": "wlt_m_01JSH9TDQHSMZX5GDV6TSM9SYN",
"VirtualAccountPurpose": "COLLECTION",
"Country": "GB",
"Active": true,
"Status": "ACTIVE",
"AccountOwner": "MGP PlatformTradingName",
"LocalAccountDetails": {
"Address": {
"StreetName": "68 King William Street",
"PostCode": "EC4N 7HR",
"TownName": "London",
"CountrySubDivision": null,
"Country": "GB"
},
"Account": {
"SortCode": "608382",
"AccountNumber": "22276063"
},
"BankName": "Banking Circle S.A. UK Branch"
},
"InternationalAccountDetails": [
{
"Address": {
"StreetName": "68 King William Street",
"PostCode": "EC4N 7HR",
"TownName": "London",
"CountrySubDivision": null,
"Country": "GB"
},
"Account": {
"Iban": "GB92SAPY60838222276063",
"Bic": "SAPYGB2L"
},
"BankName": "Banking Circle S.A. UK Branch"
}
],
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": true,
"Currencies": [
"GBP"
]
},
"ResultCode": "000000",
"ResultMessage": "Success"
}
```
```json US - PENDING
{
"Id": "wltbank_01JXHN5VAKFY4NJN2CZSS6QR91",
"Tag": "Created using Mangopay API Postman collection",
"CreationDate": 1749718068,
"WalletId": "wlt_m_01JXHN5Q9QDBWH372HT0HWZ6JZ",
"VirtualAccountPurpose": "COLLECTION",
"Country": "US",
"Active": false,
"Status": "PENDING",
"AccountOwner": "MGP PlatformTradingName",
"LocalAccountDetails": null,
"InternationalAccountDetails": null,
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": false,
"Currencies": [
"USD"
]
},
"ResultCode": null,
"ResultMessage": null
}
```
```json CA - PENDING
{
"Id": "wltbank_01JXHMQ77MSJ4ZPYS8BT2KY3H8",
"Tag": "Created using Mangopay API Postman collection",
"CreationDate": 1749717589,
"WalletId": "wlt_m_01JXHMPZS9Q98JZ9S8GD9GMTJF",
"VirtualAccountPurpose": "COLLECTION",
"Country": "CA",
"Active": false,
"Status": "PENDING",
"AccountOwner": "MGP PlatformTradingName",
"LocalAccountDetails": null,
"InternationalAccountDetails": null,
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": false,
"Currencies": [
"CAD"
]
},
"ResultCode": null,
"ResultMessage": null
}
```
```json REST
{
"Country": "GB",
"VirtualAccountPurpose": "COLLECTION",
"Tag": "Created using Mangopay API Postman Collection"
}
```
```php PHP
Config->ClientId = "client-id";
$api->Config->ClientPassword = "api-key";
$api->Config->TemporaryFolder = "../tmp/";
try {
$walletId = "wlt_m_01JBYEE1PEK9C6DWD8PWXK2TSQ";
$virtualAccount = new \MangoPay\VirtualAccount();
$virtualAccount->Country = "GB";
$virtualAccount->VirtualAccountPurpose = "Collection";
$virtualAccount->Tag = "Created using the Mangopay PHP SDK";
$response = $api->VirtualAccounts->Create($virtualAccount, $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: 'client-id',
clientApiKey: 'api-key',
})
let myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
let myVirtualAccount = {
Country: 'FR',
VirtualAccountPurpose: 'Collection',
Tag: 'Created using the Mangopay NodeJS SDK'
}
const createVirtualAccount = async (walletId, virtualAccount) => {
return await mangopay.VirtualAccounts.create(walletId, virtualAccount)
.then((response) => {
console.info(response)
return response
}).catch((err) => {
console.log(err);
return false
});
}
createVirtualAccount(myWallet.Id, myVirtualAccount)
```
```ruby Ruby
require 'mangopay'
require 'PP'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'client-id'
client.client_apiKey = 'api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
myVirtualAccount = {
Country: 'FR',
VirtualAccountPurpose: 'Collection',
Tag: 'Created using the Mangopay Ruby SDK'
}
myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
def createVirtualAccount(walletId, virtualAccount)
begin
response = MangoPay::VirtualAccount.create(walletId, virtualAccount)
puts response
return response
end
end
pp(createVirtualAccount(myWallet[:Id], myVirtualAccount))
```
# Deactivate a Virtual Account
Source: https://docs.mangopay.com/api-reference/virtual-accounts/deactivate-virtual-account
PUT /v2.01/{ClientId}/wallets/{WalletId}/virtual-accounts/{VirtualAccountId}
Close an account permanently to prevent it being used
This call serves only to deactivate a virtual account if it is no longer needed. Once deactivated, the account `Status` is `CLOSED`.
**Caution - Deactivating a Virtual Account is irreversible**
Once the Virtual Account object is deactivated, it is closed and cannot be reopened.
Any funds wired to this IBAN or local account details won’t be credited to the corresponding wallet and will be returned to the sender.
If such cases arise, contact Mangopay via the Dashboard.
### Path parameters
The unique identifier of the wallet.
The unique identifier of the virtual account.
### Body parameters
Whether or not the Virtual Account is active.
**Caution:** Setting this value to `false` permanently closes the account and is irreversible.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 wallet.
**Allowed values:** `COLLECTION`, `USER_OWNED`
The type of the virtual account:
* `COLLECTION` - Owned by Mangopay and usable by platforms and/or users for the purpose of collecting and reconciling incoming funds paid by users.
* `USER_OWNED` - Owned by the wallet owner, enabling them to accept and store funds and make payments.
For more information, see [virtual account](/guides/payment-methods/banking/virtual-iban) guide.
**Returned values:** The two-letter ISO 3166-1 country code (LU, FR, GB, etc.) of an available country (depends on contract and activation settings).
The country of the IBAN. The country must correspond to the currency of the wallet. See the virtual account guide for details.
The status of the Virtual Account:
* `PENDING` – The account creation request is being processed and full account details may not yet be returned. Any funds sent to the account are returned (if account details exist). `PENDING` can transition to `ACTIVE` or `FAILED`.
* `ACTIVE` – The account is active and can receive funds (see note about delayed [UK CoP recognition](#set-up-the-account) for `GB` accounts). `ACTIVE` can transition to `BLOCKED` or `CLOSED`.
* `BLOCKED` – The account is blocked and is not active. Any funds sent to the account are returned. This temporary status may be used during processes relating to user verification or fraud screening. `BLOCKED` can transition to `ACTIVE` or `CLOSED`.
* `CLOSED` – The account has been deactivated and is closed. Any funds sent to the account are returned. This is a final state.
* `FAILED` – The account creation request failed or was rejected. This final state is rare. Any funds sent to the account are returned (if account details exist).
See the [virtual account](/guides/payment-methods/banking/virtual-iban#status) guide for more details.
Whether or not the Virtual Account is active.
The owner of the virtual account.
The account owner is assigned automatically depending on the `VirtualAccountPurpose`:
* `COLLECTION` – Owned by Mangopay SA or Mangopay UK Ltd., mentioning the platform's trading name in the format "MGP `PlatformTradingName`"
* `USER_OWNED` – Owned by the owner of the associated wallet: `FirstName` `LastName` for Natural Users; `Name` for Legal Users
The account details in local format.
**Best practice:** Retrieve both the fields and values of these objects dynamically to present to the user. The `LocalAccountDetails.Account` object has different properties depending on the virtual account `Country`.
The address associated with the account.
Max. length: 255 characters
The building number and street name of the address.
Max. length: 50 characters
The postal code of the address.
Max. length: 255 characters
The town or city of the address.
Max. length: 255 characters
The region, state, or county of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Details of the account in local account identifier format.
The properties of this object differ depending on the Virtual Account `Country`:
* **IBAN** – Format if `Country` is `DK`, `DE`, `ES`, `FR`, `LU`
* **GB** – Format if `Country` is `GB`
* **US** – Format if `Country` is `US`
* **CA** – Format if `Country` is `CA`
**Caution:** Other formats are planned in future as Mangopay's account coverage expands. Ensure you retrieve the `Account` object's properties and values dynamically.
The international bank account number (IBAN) of the account.
The bank identifier code (BIC) of the account.
The account number of the account.
The sort code of the account.
The account number of the account.
The 9-digit ACH routing number of the US account.
The 9-digit Fedwire (ABA) number of the US account.
The account type of the US account, which is always `CHECKING`.
The 5-digit branch code or transit number of the CA account.
The 3-digit institution number of the CA account.
The account number of the account.
The name of the bank.
List of the account details in international format.
**Best practice:** Retrieve both the fields and values of these objects dynamically to present to the user. The `InternationalAccountDetails.Account` object has different properties depending on the virtual account `Country`.
The address associated with the account.
Max. length: 255 characters
The building number and street name of the address.
Max. length: 50 characters
The postal code of the address.
Max. length: 255 characters
The town or city of the address.
Max. length: 255 characters
The region, state, or county of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Details of the account in international format.
Returned `null` if `Country` is `US` or `CA` as `Capabilities.InternationalPayinAvailable` is always `false`.
The international bank account number (IBAN) of the account.
The bank identifier code (BIC) of the account.
The name of the bank.
Information about the account's payment capabilities.
Whether or not local bank wires can be made to this account.
Whether or not international bank wires can be made to this account.
Returned `false` if `Country` is `US` or `CA`.
**Returned values:** One or more currency codes in ISO 4217 format (EUR, GBP, etc.)
List of currencies supported by the account.
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 - Deactivated
{
"Id": "wltbank_m_01J7NCAT73Q15SVSM9S6Z36GRZ",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1726220691,
"WalletId": "wlt_m_01J7NC9YKP3NB1PADF4SHZY712",
"VirtualAccountPurpose": "COLLECTION",
"Country": "GB",
"Status": "CLOSED",
"Active": false,
"AccountOwner": "MGP PlatformTradingName",
"LocalAccountDetails": {
"Address": {
"StreetName": "68 King William Street",
"PostCode": "EC4N 7HR",
"TownName": "London",
"CountrySubDivision": null,
"Country": "GB"
},
"Account": {
"SortCode": "608382",
"AccountNumber": "22276063"
},
"BankName": "Banking Circle S.A. UK Branch"
},
"InternationalAccountDetails": [
{
"Address": {
"StreetName": "68 King William Street",
"PostCode": "EC4N 7HR",
"TownName": "London",
"CountrySubDivision": null,
"Country": "GB"
},
"Account": {
"Iban": "GB92SAPY60838222276063",
"Bic": "SAPYGB2L"
},
"BankName": "Banking Circle S.A. UK Branch"
}
],
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": true,
"Currencies": [
"GBP"
]
},
"ResultCode": "000000",
"ResultMessage": "Success"
}
```
```json REST
{
"Active": false
}
```
```php PHP
Config->ClientId = "client-id";
$api->Config->ClientPassword = "api-key";
$api->Config->TemporaryFolder = "../tmp/";
try {
$walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3";
$virtualAccountId = "wltbank_01JD4YFC4HP10J3HDH03WDJF95";
$response = $api->VirtualAccounts->Deactivate($walletId, $virtualAccountId);
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: 'client-id',
clientApiKey: 'api-key',
})
let myVirtualAccount = {
Id: 'wltbank_01JCNPKMG875WHH0XFQPRHRHP6'
}
let myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
const deactivateVirtualAccount = async (walletId, virtualAccountId) => {
return await mangopay.VirtualAccounts.deactivate(walletId, virtualAccountId)
.then((response) => {
console.info(response)
return response
}).catch((err) => {
console.log(err);
return false
});
}
deactivateVirtualAccount(myWallet.Id, myVirtualAccount.Id)
```
```ruby Ruby
require 'mangopay'
require 'PP'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'client-id'
client.client_apiKey = 'api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
myVirtualAccount = {
Id: 'wltbank_01JCNN78THB9B2FX63RZ0F76KM'
}
myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
def deactivateVirtualAccount(walletId, virtualAccountId)
begin
response = MangoPay::VirtualAccount.deactivate(walletId, virtualAccountId)
puts response
return response
end
end
pp(deactivateVirtualAccount(myWallet[:Id], myVirtualAccount[:Id]))
```
# The External Instruction Bank Wire PayIn object
Source: https://docs.mangopay.com/api-reference/virtual-accounts/external-instruction-bank-wire-payin-object
### Description
The External Instruction Bank Wire PayIn object represents a wire transfer made directly from the end user's bank account to a Virtual Account (or a legacy Banking Alias).
When the funds are received, Mangopay creates the pay-in and credits the associated wallet. This pay-in is therefore not created by the platform via the API, but rather created by Mangopay when it receives the bank wire transfer initiated by the end user.
It is not possible to specify `Fees` on these pay-ins.
**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.
**Note:** This information may only be available for EU IBANs.
Max. length: 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 characters used to define the branch of the bank (sometimes replaced with XXX)
The unique number of the bank account.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country in which the bank account is registered.
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.
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 bank wire received on the virtual IBAN, as provided by the user. If no reference was provided, then this value is `null`.
**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`).
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
The unique identifier of the object.
Max. length: 255 characters
Custom data that you can add to this object.
# List Virtual Accounts for a Wallet
Source: https://docs.mangopay.com/api-reference/virtual-accounts/list-virtual-accounts-wallet
GET /v2.01/{ClientId}/wallets/{WalletId}/virtual-accounts
### Path parameters
The unique identifier of the wallet.
### Query parameters
Start value: `1`
**Default value:** `1`
Indicates the index of the page for the pagination.
Min. value: `1`; 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 virtual accounts created by the platform.
The Virtual Account object created by the platform
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 wallet.
**Allowed values:** `COLLECTION`, `USER_OWNED`
The type of the virtual account:
* `COLLECTION` - Owned by Mangopay and usable by platforms and/or users for the purpose of collecting and reconciling incoming funds paid by users.
* `USER_OWNED` - Owned by the wallet owner, enabling them to accept and store funds and make payments.
For more information, see [virtual account](/guides/payment-methods/banking/virtual-iban) guide.
**Returned values:** The two-letter ISO 3166-1 country code (LU, FR, GB, etc.) of an available country (depends on contract and activation settings).
The country of the IBAN. The country must correspond to the currency of the wallet. See the virtual account guide for details.
The status of the Virtual Account:
* `PENDING` – The account creation request is being processed and full account details may not yet be returned. Any funds sent to the account are returned (if account details exist). `PENDING` can transition to `ACTIVE` or `FAILED`.
* `ACTIVE` – The account is active and can receive funds (see note about delayed [UK CoP recognition](#set-up-the-account) for `GB` accounts). `ACTIVE` can transition to `BLOCKED` or `CLOSED`.
* `BLOCKED` – The account is blocked and is not active. Any funds sent to the account are returned. This temporary status may be used during processes relating to user verification or fraud screening. `BLOCKED` can transition to `ACTIVE` or `CLOSED`.
* `CLOSED` – The account has been deactivated and is closed. Any funds sent to the account are returned. This is a final state.
* `FAILED` – The account creation request failed or was rejected. This final state is rare. Any funds sent to the account are returned (if account details exist).
See the [virtual account](/guides/payment-methods/banking/virtual-iban#status) guide for more details.
Whether or not the Virtual Account is active.
The owner of the virtual account.
The account owner is assigned automatically depending on the `VirtualAccountPurpose`:
* `COLLECTION` – Owned by Mangopay SA or Mangopay UK Ltd., mentioning the platform's trading name in the format "MGP `PlatformTradingName`"
* `USER_OWNED` – Owned by the owner of the associated wallet: `FirstName` `LastName` for Natural Users; `Name` for Legal Users
The account details in local format.
**Best practice:** Retrieve both the fields and values of these objects dynamically to present to the user. The `LocalAccountDetails.Account` object has different properties depending on the virtual account `Country`.
The address associated with the account.
Max. length: 255 characters
The building number and street name of the address.
Max. length: 50 characters
The postal code of the address.
Max. length: 255 characters
The town or city of the address.
Max. length: 255 characters
The region, state, or county of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Details of the account in local account identifier format.
The properties of this object differ depending on the Virtual Account `Country`:
* **IBAN** – Format if `Country` is `DK`, `DE`, `ES`, `FR`, `LU`
* **GB** – Format if `Country` is `GB`
* **US** – Format if `Country` is `US`
* **CA** – Format if `Country` is `CA`
**Caution:** Other formats are planned in future as Mangopay's account coverage expands. Ensure you retrieve the `Account` object's properties and values dynamically.
The international bank account number (IBAN) of the account.
The bank identifier code (BIC) of the account.
The account number of the account.
The sort code of the account.
The account number of the account.
The 9-digit ACH routing number of the US account.
The 9-digit Fedwire (ABA) number of the US account.
The account type of the US account, which is always `CHECKING`.
The 5-digit branch code or transit number of the CA account.
The 3-digit institution number of the CA account.
The account number of the account.
The name of the bank.
List of the account details in international format.
**Best practice:** Retrieve both the fields and values of these objects dynamically to present to the user. The `InternationalAccountDetails.Account` object has different properties depending on the virtual account `Country`.
The address associated with the account.
Max. length: 255 characters
The building number and street name of the address.
Max. length: 50 characters
The postal code of the address.
Max. length: 255 characters
The town or city of the address.
Max. length: 255 characters
The region, state, or county of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Details of the account in international format.
Returned `null` if `Country` is `US` or `CA` as `Capabilities.InternationalPayinAvailable` is always `false`.
The international bank account number (IBAN) of the account.
The bank identifier code (BIC) of the account.
The name of the bank.
Information about the account's payment capabilities.
Whether or not local bank wires can be made to this account.
Whether or not international bank wires can be made to this account.
Returned `false` if `Country` is `US` or `CA`.
**Returned values:** One or more currency codes in ISO 4217 format (EUR, GBP, etc.)
List of currencies supported by the account.
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.
Functional errors (`ResultCode`) are possible on a 200 response. Read more **→**
***
```json
[
{
"Id": "wltbank_m_01J7NCAT73Q15SVSM9S6Z36GRZ",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1726220691,
"WalletId": "wlt_m_01J7NC9YKP3NB1PADF4SHZY712",
"VirtualAccountPurpose": "COLLECTION",
"Country": "GB",
"Status": "ACTIVE",
"Active": true,
"AccountOwner": "MGP PlatformTradingName",
"LocalAccountDetails": {
"Address": {
"StreetName": "2, Avenue Amélie",
"PostCode": "L-1125",
"TownName": "Luxembourg",
"CountrySubDivision": null,
"Country": "Luxembourg"
},
"Account": {
"SortCode": "608382",
"AccountNumber": "21762697"
}
},
"InternationalAccountDetails": [
{
"Address": {
"StreetName": "2, Avenue Amélie",
"PostCode": "L-1125",
"TownName": "Luxembourg",
"CountrySubDivision": null,
"Country": "Luxembourg"
},
"Account": {
"Iban": "GB62SAPY60838221762697",
"Bic": "SAPYGB2L"
}
}
],
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": true,
"Currencies": [
"GBP"
]
},
"ResultCode": "000000",
"ResultMessage": "Success"
}
]
```
```json REST
// GET has no body parameters
```
```php PHP
Config->ClientId = "client-id";
$api->Config->ClientPassword = "api-key";
$api->Config->TemporaryFolder = "../tmp/";
$api->Config->DebugMode = false;
try {
$walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3";
$list = $api->VirtualAccounts->GetAll($walletId);
print_r($list);
} 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: 'client-id',
clientApiKey: 'api-key',
})
let myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
const listWalletVirtualAccounts = async (walletId) => {
return await mangopay.VirtualAccounts.getAll(walletId)
.then((response) => {
console.info(response)
return response
}).catch((err) => {
console.log(err);
return false
});
}
listWalletVirtualAccounts(myWallet.Id)
```
```ruby Ruby
require 'mangopay'
require 'PP'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'client-id'
client.client_apiKey = 'api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
def listWalletVirtualAccounts(walletId)
begin
response = MangoPay::VirtualAccount.fetch_all(walletId)
puts response
return response
end
end
pp(listWalletVirtualAccounts(myWallet[:Id]))
```
# View a PayIn (External Instruction)
Source: https://docs.mangopay.com/api-reference/virtual-accounts/view-payin-external-instruction
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.
**Note:** This information may only be available for EU IBANs.
Max. length: 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 characters used to define the branch of the bank (sometimes replaced with XXX)
The unique number of the bank account.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country in which the bank account is registered.
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.
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 bank wire received on the virtual IBAN, as provided by the user. If no reference was provided, then this value is `null`.
**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`).
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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 Virtual Account
Source: https://docs.mangopay.com/api-reference/virtual-accounts/view-virtual-account
GET /v2.01/{ClientId}/wallets/{WalletId}/virtual-accounts/{VirtualAccountId}
### Path parameters
The unique identifier of the wallet.
The unique identifier of the virtual account.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 wallet.
**Allowed values:** `COLLECTION`, `USER_OWNED`
The type of the virtual account:
* `COLLECTION` - Owned by Mangopay and usable by platforms and/or users for the purpose of collecting and reconciling incoming funds paid by users.
* `USER_OWNED` - Owned by the wallet owner, enabling them to accept and store funds and make payments.
For more information, see [virtual account](/guides/payment-methods/banking/virtual-iban) guide.
**Returned values:** The two-letter ISO 3166-1 country code (LU, FR, GB, etc.) of an available country (depends on contract and activation settings).
The country of the IBAN. The country must correspond to the currency of the wallet. See the virtual account guide for details.
The status of the Virtual Account:
* `PENDING` – The account creation request is being processed and full account details may not yet be returned. Any funds sent to the account are returned (if account details exist). `PENDING` can transition to `ACTIVE` or `FAILED`.
* `ACTIVE` – The account is active and can receive funds (see note about delayed [UK CoP recognition](#set-up-the-account) for `GB` accounts). `ACTIVE` can transition to `BLOCKED` or `CLOSED`.
* `BLOCKED` – The account is blocked and is not active. Any funds sent to the account are returned. This temporary status may be used during processes relating to user verification or fraud screening. `BLOCKED` can transition to `ACTIVE` or `CLOSED`.
* `CLOSED` – The account has been deactivated and is closed. Any funds sent to the account are returned. This is a final state.
* `FAILED` – The account creation request failed or was rejected. This final state is rare. Any funds sent to the account are returned (if account details exist).
See the [virtual account](/guides/payment-methods/banking/virtual-iban#status) guide for more details.
Whether or not the Virtual Account is active.
The owner of the virtual account.
The account owner is assigned automatically depending on the `VirtualAccountPurpose`:
* `COLLECTION` – Owned by Mangopay SA or Mangopay UK Ltd., mentioning the platform's trading name in the format "MGP `PlatformTradingName`"
* `USER_OWNED` – Owned by the owner of the associated wallet: `FirstName` `LastName` for Natural Users; `Name` for Legal Users
The account details in local format.
**Best practice:** Retrieve both the fields and values of these objects dynamically to present to the user. The `LocalAccountDetails.Account` object has different properties depending on the virtual account `Country`.
The address associated with the account.
Max. length: 255 characters
The building number and street name of the address.
Max. length: 50 characters
The postal code of the address.
Max. length: 255 characters
The town or city of the address.
Max. length: 255 characters
The region, state, or county of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Details of the account in local account identifier format.
The properties of this object differ depending on the Virtual Account `Country`:
* **IBAN** – Format if `Country` is `DK`, `DE`, `ES`, `FR`, `LU`
* **GB** – Format if `Country` is `GB`
* **US** – Format if `Country` is `US`
* **CA** – Format if `Country` is `CA`
**Caution:** Other formats are planned in future as Mangopay's account coverage expands. Ensure you retrieve the `Account` object's properties and values dynamically.
The international bank account number (IBAN) of the account.
The bank identifier code (BIC) of the account.
The account number of the account.
The sort code of the account.
The account number of the account.
The 9-digit ACH routing number of the US account.
The 9-digit Fedwire (ABA) number of the US account.
The account type of the US account, which is always `CHECKING`.
The 5-digit branch code or transit number of the CA account.
The 3-digit institution number of the CA account.
The account number of the account.
The name of the bank.
List of the account details in international format.
**Best practice:** Retrieve both the fields and values of these objects dynamically to present to the user. The `InternationalAccountDetails.Account` object has different properties depending on the virtual account `Country`.
The address associated with the account.
Max. length: 255 characters
The building number and street name of the address.
Max. length: 50 characters
The postal code of the address.
Max. length: 255 characters
The town or city of the address.
Max. length: 255 characters
The region, state, or county of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Details of the account in international format.
Returned `null` if `Country` is `US` or `CA` as `Capabilities.InternationalPayinAvailable` is always `false`.
The international bank account number (IBAN) of the account.
The bank identifier code (BIC) of the account.
The name of the bank.
Information about the account's payment capabilities.
Whether or not local bank wires can be made to this account.
Whether or not international bank wires can be made to this account.
Returned `false` if `Country` is `US` or `CA`.
**Returned values:** One or more currency codes in ISO 4217 format (EUR, GBP, etc.)
List of currencies supported by the account.
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.
Functional errors (`ResultCode`) are possible on a 200 response. Read more **→**
***
```json GB - ACTIVE
{
"Id": "wltbank_m_01J7NCAT73Q15SVSM9S6Z36GRZ",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1726220691,
"WalletId": "wlt_m_01J7NC9YKP3NB1PADF4SHZY712",
"VirtualAccountPurpose": "COLLECTION",
"Country": "GB",
"Status": "ACTIVE",
"Active": true,
"AccountOwner": "MGP PlatformTradingName",
"LocalAccountDetails": {
"Address": {
"StreetName": "68 King William Street",
"PostCode": "EC4N 7HR",
"TownName": "London",
"CountrySubDivision": null,
"Country": "GB"
},
"Account": {
"SortCode": "608382",
"AccountNumber": "22276063"
},
"BankName": "Banking Circle S.A. UK Branch"
},
"InternationalAccountDetails": [
{
"Address": {
"StreetName": "68 King William Street",
"PostCode": "EC4N 7HR",
"TownName": "London",
"CountrySubDivision": null,
"Country": "GB"
},
"Account": {
"Iban": "GB92SAPY60838222276063",
"Bic": "SAPYGB2L"
},
"BankName": "Banking Circle S.A. UK Branch"
}
],
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": true,
"Currencies": [
"GBP"
]
},
"ResultCode": "000000",
"ResultMessage": "Success"
}
```
```json US - PENDING
{
"Id": "wltbank_01JXHN5VAKFY4NJN2CZSS6QR91",
"Tag": "Created using Mangopay API Postman collection",
"CreationDate": 1749718068,
"WalletId": "wlt_m_01JXHN5Q9QDBWH372HT0HWZ6JZ",
"VirtualAccountPurpose": "COLLECTION",
"Country": "US",
"Active": false,
"Status": "PENDING",
"AccountOwner": "MGP PlatformTradingName",
"LocalAccountDetails": {
"Address": {
"StreetName": "5 Penn Plaza, 14th Floor",
"PostCode": "NY 10001",
"TownName": "New York",
"CountrySubDivision": "NY",
"Country": "US"
},
"Account": {
"AccountNumber": null,
"AchNumber": null,
"FedWireNumber": null,
"AccountType": "CHECKING"
},
"BankName": "Community Federal Savings Bank"
},
"InternationalAccountDetails": null,
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": false,
"Currencies": [
"USD"
]
},
"ResultCode": null,
"ResultMessage": null
}
```
```json CA - PENDING
{
"Id": "wltbank_01JXHMQ77MSJ4ZPYS8BT2KY3H8",
"Tag": "Created using Mangopay API Postman collection",
"CreationDate": 1749717589,
"WalletId": "wlt_m_01JXHMPZS9Q98JZ9S8GD9GMTJF",
"VirtualAccountPurpose": "COLLECTION",
"Country": "CA",
"Active": false,
"Status": "PENDING",
"AccountOwner": "MGP PlatformTradingName",
"LocalAccountDetails": {
"Address": {
"StreetName": "736 Meridian Road N.E",
"PostCode": null,
"TownName": "Calgary",
"CountrySubDivision": "Alberta",
"Country": "CA"
},
"Account": {
"BranchCode": null,
"InstitutionNumber": null,
"AccountNumber": null
},
"BankName": "Digital Commerce Bank"
},
"InternationalAccountDetails": null,
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": false,
"Currencies": [
"CAD"
]
},
"ResultCode": null,
"ResultMessage": null
}
```
```json GB - BLOCKED
{
"Id": "wltbank_m_01J7NCAT73Q15SVSM9S6Z36GRZ",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1726220691,
"WalletId": "wlt_m_01J7NC9YKP3NB1PADF4SHZY712",
"VirtualAccountPurpose": "COLLECTION",
"Country": "GB",
"Status": "BLOCKED",
"Active": false,
"AccountOwner": "MGP PlatformTradingName",
"LocalAccountDetails": {
"Address": {
"StreetName": "68 King William Street",
"PostCode": "EC4N 7HR",
"TownName": "London",
"CountrySubDivision": null,
"Country": "GB"
},
"Account": {
"SortCode": "608382",
"AccountNumber": "22276063"
},
"BankName": "Banking Circle S.A. UK Branch"
},
"InternationalAccountDetails": [
{
"Address": {
"StreetName": "68 King William Street",
"PostCode": "EC4N 7HR",
"TownName": "London",
"CountrySubDivision": null,
"Country": "GB"
},
"Account": {
"Iban": "GB92SAPY60838222276063",
"Bic": "SAPYGB2L"
},
"BankName": "Banking Circle S.A. UK Branch"
}
],
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": true,
"Currencies": [
"GBP"
]
},
"ResultCode": "000000",
"ResultMessage": "Success"
}
```
```json LU - FAILED
{
"Id": "wltbank_m_01JAGT8JC4DG0NQS7CPHNMK36N",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1729288751,
"WalletId": "wlt_m_01JAGT85WNAAQ3R782XJNKGZY3",
"VirtualAccountPurpose": null,
"Country": "LU",
"Status": "FAILED",
"Active": false,
"AccountOwner": null,
"LocalAccountDetails": {
"Address": {
"StreetName": null,
"PostCode": null,
"TownName": null,
"CountrySubDivision": null,
"Country": null
},
"Account": {
"Iban": null,
"Bic": null
},
"BankName": null
},
"InternationalAccountDetails": [
{
"Address": {
"StreetName": null,
"PostCode": null,
"TownName": null,
"CountrySubDivision": null,
"Country": null
},
"Account": {
"Iban": null,
"Bic": null
},
"BankName": null
}
],
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": true,
"Currencies": [
"EUR"
]
},
"ResultCode": null,
"ResultMessage": null
}
```
```json REST
// GET has no body parameters
```
```php PHP
Config->ClientId = "client-id";
$api->Config->ClientPassword = "api-key";
$api->Config->TemporaryFolder = "../tmp/";
try {
$walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3";
$virtualAccount = "wltbank_01JCNN78THB9B2FX63RZ0F76KM";
$response = $api->VirtualAccounts->Get($walletId, $virtualAccount);
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: 'client-id',
clientApiKey: 'api-key',
})
let myVirtualAccount = {
Id: 'wltbank_01JCQNNDMAW2JTM8YRPX1G2ZYY'
}
let myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
const viewVirtualAccount = async (walletId, virtualAccountId) => {
return await mangopay.VirtualAccounts.get(walletId, virtualAccountId)
.then((response) => {
console.info(response)
return response
}).catch((err) => {
console.log(err);
return false
});
}
viewVirtualAccount(myWallet.Id, myVirtualAccount.Id)
```
```ruby Ruby
require 'mangopay'
require 'PP'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'client-id'
client.client_apiKey = 'api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
myVirtualAccount = {
Id: 'wltbank_01JCNN78THB9B2FX63RZ0F76KM'
}
myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
def viewVirtualAccount(walletId, virtualAccountId)
begin
response = MangoPay::VirtualAccount.fetch(walletId, virtualAccountId)
puts response
return response
end
end
pp(viewVirtualAccount(myWallet[:Id], myVirtualAccount[:Id]))
```
# View Virtual Account availabilities
Source: https://docs.mangopay.com/api-reference/virtual-accounts/view-virtual-account-availabilities
GET /v2.01/{ClientId}/virtual-accounts/availability
See your platform's account capabilities per account type and country
This endpoint allows you to check which account countries and currencies are available to your platform for Collection and User-Owned accounts (see [guide](/guides/payment-methods/banking/virtual-iban#types) for details).
### Responses
List of account capabilities for the account purpose and their availability for the platform.
**Returned values:** One of the supported countries in two-letter ISO 3166-1 format
The country of the account purpose.
Whether or not the account is available for the given country and purpose.
**Returned values:** One or more currency codes in ISO 4217 format (EUR, GBP, etc.)
List of currencies supported by the account.
List of account capabilities for the account purpose and their availability for the platform.
**Returned values:** One of the supported countries in two-letter ISO 3166-1 format
The country of the account purpose.
Whether or not the account is available for the given country and purpose.
**Returned values:** One or more currency codes in ISO 4217 format (EUR, GBP, etc.)
List of currencies supported by the account.
```json REST
// GET has no body parameters
```
```php PHP
Config->ClientId = "client-id";
$api->Config->ClientPassword = "api-key";
$api->Config->TemporaryFolder = "../tmp/";
try {
$response = $api->VirtualAccounts->GetAvailabilities();
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: 'client-id',
clientApiKey: 'api-key',
})
const viewClientAvailabilities = async () => {
return await mangopay.VirtualAccounts.getAvailabilities()
.then((response) => {
console.info(response)
return response
}).catch((err) => {
console.log(err);
return false
});
}
viewClientAvailabilities()
```
```ruby Ruby
require 'mangopay'
require 'PP'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'client-id'
client.client_apiKey = 'api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def viewClientAvailabilities()
begin
response = MangoPay::VirtualAccount.fetch_availabilities
puts response
return response
end
end
pp(viewClientAvailabilities())
```
```json 200
{
"Collection": [
{
"Country": "GB",
"Available": true,
"Currencies": [
"GBP"
]
},
{
"Country": "LU",
"Available": true,
"Currencies": [
"EUR"
]
},
{
"Country": "FR",
"Available": true,
"Currencies": [
"EUR"
]
},
{
"Country": "ES",
"Available": true,
"Currencies": [
"EUR"
]
},
{
"Country": "DE",
"Available": true,
"Currencies": [
"EUR"
]
},
{
"Country": "US",
"Available": true,
"Currencies": [
"USD"
]
},
{
"Country": "CA",
"Available": true,
"Currencies": [
"CAD"
]
},
{
"Country": "DK",
"Available": true,
"Currencies": [
"DKK"
]
},
{
"Country": "PL",
"Available": false,
"Currencies": [
"PLN"
]
},
{
"Country": "AU",
"Available": false,
"Currencies": [
"AUD"
]
}
],
"UserOwned": [
{
"Country": "GB",
"Available": true,
"Currencies": [
"GBP"
]
},
{
"Country": "LU",
"Available": true,
"Currencies": [
"EUR"
]
},
{
"Country": "FR",
"Available": true,
"Currencies": [
"EUR"
]
},
{
"Country": "ES",
"Available": true,
"Currencies": [
"EUR"
]
},
{
"Country": "DE",
"Available": true,
"Currencies": [
"EUR"
]
},
{
"Country": "US",
"Available": true,
"Currencies": [
"USD"
]
},
{
"Country": "CA",
"Available": true,
"Currencies": [
"CAD"
]
},
{
"Country": "DK",
"Available": true,
"Currencies": [
"DKK"
]
},
{
"Country": "PL",
"Available": false,
"Currencies": [
"PLN"
]
},
{
"Country": "AU",
"Available": false,
"Currencies": [
"AUD"
]
}
]
}
```
# The Virtual Account object
Source: https://docs.mangopay.com/api-reference/virtual-accounts/virtual-account-object
### Description
The Virtual Account object enables platforms to attach one or more virtual IBANs to a wallet.
Once created, any funds received on the account are automatically credited to the associated wallet as an [External Instruction Bank Wire PayIn](/api-reference/virtual-accounts/external-instruction-bank-wire-payin-object). Note therefore that `Fees` cannot be taken on pay-ins to virtual accounts.
There are two types of Virtual Account, indicated by the `VirtualAccountPurpose`:
* `COLLECTION` – Owned by Mangopay and usable by platforms and/or users for the purpose of collecting and reconciling incoming funds paid by users. Payouts are generally prohibited from the associated wallet except for refunds. The user can be categorized as a Payer or an Owner.
* `USER_OWNED` – Owned by the wallet owner, enabling them to accept and store funds and make payments. KYC verification is required and the user must be categorized as an Owner.
For more information, see the [Virtual Account](/guides/payment-methods/banking/virtual-iban) guide.
User-Owned accounts require a contract amendment and activation – contact our teams via the Dashboard to get started.
**Note - Replaces legacy Banking Alias feature**
The Virtual Account endpoints replace the legacy Banking Alias endpoints, and new integrations should use virtual accounts.
Existing platforms are invited to change their integration to benefit from extended country and currency coverage, as well as any future product improvements.
If a wallet already has a Banking Alias attached, it cannot be used for Virtual Accounts – you need to create a new wallet.
### Attributes
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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 wallet.
**Allowed values:** `COLLECTION`, `USER_OWNED`
The type of the virtual account:
* `COLLECTION` - Owned by Mangopay and usable by platforms and/or users for the purpose of collecting and reconciling incoming funds paid by users.
* `USER_OWNED` - Owned by the wallet owner, enabling them to accept and store funds and make payments.
For more information, see [virtual account](/guides/payment-methods/banking/virtual-iban) guide.
**Returned values:** The two-letter ISO 3166-1 country code (LU, FR, GB, etc.) of an available country (depends on contract and activation settings).
The country of the IBAN. The country must correspond to the currency of the wallet. See the virtual account guide for details.
The status of the Virtual Account:
* `PENDING` – The account creation request is being processed and full account details may not yet be returned. Any funds sent to the account are returned (if account details exist). `PENDING` can transition to `ACTIVE` or `FAILED`.
* `ACTIVE` – The account is active and can receive funds (see note about delayed [UK CoP recognition](#set-up-the-account) for `GB` accounts). `ACTIVE` can transition to `BLOCKED` or `CLOSED`.
* `BLOCKED` – The account is blocked and is not active. Any funds sent to the account are returned. This temporary status may be used during processes relating to user verification or fraud screening. `BLOCKED` can transition to `ACTIVE` or `CLOSED`.
* `CLOSED` – The account has been deactivated and is closed. Any funds sent to the account are returned. This is a final state.
* `FAILED` – The account creation request failed or was rejected. This final state is rare. Any funds sent to the account are returned (if account details exist).
See the [virtual account](/guides/payment-methods/banking/virtual-iban#status) guide for more details.
Whether or not the Virtual Account is active.
The owner of the virtual account.
The account owner is assigned automatically depending on the `VirtualAccountPurpose`:
* `COLLECTION` – Owned by Mangopay SA or Mangopay UK Ltd., mentioning the platform's trading name in the format "MGP `PlatformTradingName`"
* `USER_OWNED` – Owned by the owner of the associated wallet: `FirstName` `LastName` for Natural Users; `Name` for Legal Users
The account details in local format.
**Best practice:** Retrieve both the fields and values of these objects dynamically to present to the user. The `LocalAccountDetails.Account` object has different properties depending on the virtual account `Country`.
The address associated with the account.
Max. length: 255 characters
The building number and street name of the address.
Max. length: 50 characters
The postal code of the address.
Max. length: 255 characters
The town or city of the address.
Max. length: 255 characters
The region, state, or county of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Details of the account in local account identifier format.
The properties of this object differ depending on the Virtual Account `Country`:
* **IBAN** – Format if `Country` is `DK`, `DE`, `ES`, `FR`, `LU`
* **GB** – Format if `Country` is `GB`
* **US** – Format if `Country` is `US`
* **CA** – Format if `Country` is `CA`
**Caution:** Other formats are planned in future as Mangopay's account coverage expands. Ensure you retrieve the `Account` object's properties and values dynamically.
The international bank account number (IBAN) of the account.
The bank identifier code (BIC) of the account.
The account number of the account.
The sort code of the account.
The account number of the account.
The 9-digit ACH routing number of the US account.
The 9-digit Fedwire (ABA) number of the US account.
The account type of the US account, which is always `CHECKING`.
The 5-digit branch code or transit number of the CA account.
The 3-digit institution number of the CA account.
The account number of the account.
The name of the bank.
List of the account details in international format.
**Best practice:** Retrieve both the fields and values of these objects dynamically to present to the user. The `InternationalAccountDetails.Account` object has different properties depending on the virtual account `Country`.
The address associated with the account.
Max. length: 255 characters
The building number and street name of the address.
Max. length: 50 characters
The postal code of the address.
Max. length: 255 characters
The town or city of the address.
Max. length: 255 characters
The region, state, or county of the address.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
The country of the address.
Details of the account in international format.
Returned `null` if `Country` is `US` or `CA` as `Capabilities.InternationalPayinAvailable` is always `false`.
The international bank account number (IBAN) of the account.
The bank identifier code (BIC) of the account.
The name of the bank.
Information about the account's payment capabilities.
Whether or not local bank wires can be made to this account.
Whether or not international bank wires can be made to this account.
Returned `false` if `Country` is `US` or `CA`.
**Returned values:** One or more currency codes in ISO 4217 format (EUR, GBP, etc.)
List of currencies supported by the account.
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 virtual accounts
# Create a Wallet
Source: https://docs.mangopay.com/api-reference/wallets/create-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/wallets/list-wallets-user
GET /v2.01/{ClientId}/users/{UserId}/wallets
**Note – SCA triggered by this endpoint**
This endpoint requires the user to complete SCA to authenticate the access to their wallet, unless SCA for wallet access was successfully completed in the last 180 days (read more about [SCA on wallet access](/guides/sca/wallets)).
When SCA is required, this endpoint returns a **401 - Unauthorized** response.
To let the user complete the SCA session on the Mangopay-hosted webpage, your platform needs to retrieve the `RedirectUrl` from the `WWW-Authenticate` response header, add an encoded `returnUrl` query parameter, and redirect the user. Read more about how to redirect them in the [SCA session](/guides/sca/session) guide.
### Path parameters
The unique identifier of the user.
### Query parameters
**Possible values:** `USER_PRESENT`, `USER_NOT_PRESENT`
**Default value:** `null`
The SCA context of the request, which should be considered required if the user's `UserCategory` is `OWNER`:
* `USER_PRESENT` – The user is initiating the wallet access request and is actively present. The platform must [redirect the user](/guides/sca/session) for SCA using the `PendingUserAction.RedirectUrl` returned, unless a successful SCA session for wallet access occurred in the last 180 days.
* `USER_NOT_PRESENT` – No user is present: the access is automated by the platform as part of their declared and authorized workflow. On these requests, SCA redirection is not initially required, but in future Mangopay may be required to override the request.
Both values may technically result in the need for SCA redirection, because an exemption may be applied by Mangopay or (in future) Mangopay may be required to override a given request.
**Note:** `ScaContext` is a temporary mechanism to introduce SCA on existing endpoints and workflows. New integrations should consider the parameter required and send `USER_PRESENT` by default. Read more about [SCA on wallet access](/guides/sca/wallets) **→**
### 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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
When SCA is required for wallet access, this endpoint returns a **401 - Unauthorized** response code with the `redirectUrl` in the `WWW-Authenticate` response header:
```HTTP 401 response header
WWW-Authenticate: PendingUserAction redirectUrl=https://sca.sandbox.mangopay.com/?token=0193cf51ed367151a0cb1c59def21e13
```
In this case, your platform needs to retrieve the URL value, encode and add a `returnUrl` query parameter, and redirect the user.
Read more about [SCA redirection](/guides/sca/) and [SCA on wallet access](/guides/sca/wallets) **→**
```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
}
]
```
```json 401 - SCA required
// No response body, redirectUrl returned in WWW-Authenticate response header
```
```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 {
$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: "user_m_01JZ8AVM2Y1RWVY1RT396BYW9V",
};
const listUserWallets = async (userId) => {
return await mangopay.Users.getWallets(userId, {
parameters: {
ScaContext: "USER_PRESENT", // SCA every 180 days for wallet access
},
resolveWithFullResponse: true, // to retrieve www-authenticate header with PendingUserAction RedirectUrl
})
.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, {'ScaContext': 'USER_PRESENT'})
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: 'user_m_01JXJ256GTH5TKXF6RGVFYQVV7',
}
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
Source: https://docs.mangopay.com/api-reference/wallets/update-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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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
Source: https://docs.mangopay.com/api-reference/wallets/view-wallet
GET /v2.01/{ClientId}/wallets/{WalletId}
**Note – SCA triggered by this endpoint**
This endpoint requires the user to complete SCA to authenticate the access to their wallet, unless SCA for wallet access was successfully completed in the last 180 days (read more about [SCA on wallet access](/guides/sca/wallets)).
When SCA is required, this endpoint returns a **401 - Unauthorized** response.
To let the user complete the SCA session on the Mangopay-hosted webpage, your platform needs to retrieve the `RedirectUrl` from the `WWW-Authenticate` response header, add an encoded `returnUrl` query parameter, and redirect the user. Read more about how to redirect them in the [SCA session](/guides/sca/session) guide.
### Path parameters
The unique identifier of the wallet.
### Query parameters
**Possible values:** `USER_PRESENT`, `USER_NOT_PRESENT`
**Default value:** `null`
The SCA context of the request, which should be considered required if the user's `UserCategory` is `OWNER`:
* `USER_PRESENT` – The user is initiating the wallet access request and is actively present. The platform must [redirect the user](/guides/sca/session) for SCA using the `PendingUserAction.RedirectUrl` returned, unless a successful SCA session for wallet access occurred in the last 180 days.
* `USER_NOT_PRESENT` – No user is present: the access is automated by the platform as part of their declared and authorized workflow. On these requests, SCA redirection is not initially required, but in future Mangopay may be required to override the request.
Both values may technically result in the need for SCA redirection, because an exemption may be applied by Mangopay or (in future) Mangopay may be required to override a given request.
**Note:** `ScaContext` is a temporary mechanism to introduce SCA on existing endpoints and workflows. New integrations should consider the parameter required and send `USER_PRESENT` by default. Read more about [SCA on wallet access](/guides/sca/wallets) **→**
### 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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
When SCA is required for wallet access, this endpoint returns a **401 - Unauthorized** response code with the `redirectUrl` in the `WWW-Authenticate` response header:
```HTTP 401 response header
WWW-Authenticate: PendingUserAction redirectUrl=https://sca.sandbox.mangopay.com/?token=0193cf51ed367151a0cb1c59def21e13
```
In this case, your platform needs to retrieve the URL value, encode and add a `returnUrl` query parameter, and redirect the user.
Read more about [SCA redirection](/guides/sca/) and [SCA on wallet access](/guides/sca/wallets) **→**
```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
}
```
```json 401 - SCA required
// No response body, redirectUrl returned in WWW-Authenticate response header
```
```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 {
$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: "wlt_m_01JZ8DKE83Y06860JZRKAM259V",
};
const viewWallet = async (walletId) => {
return await mangopay.Wallets.get(walletId, {
parameters: {
ScaContext: "USER_PRESENT", // SCA every 180 days for wallet access
},
resolveWithFullResponse: true, // to retrieve www-authenticate header with PendingUserAction RedirectUrl
})
.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, nil, {'ScaContext': 'USER_PRESENT'})
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: 'wlt_m_01JXJ25HVXF2RRAC41A3RBY4XZ',
}
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
Source: https://docs.mangopay.com/api-reference/wallets/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
Source: https://docs.mangopay.com/api-reference/web-card-payins/create-web-card-payin
POST /v2.01/{ClientId}/payins/card/web
**Note – Timeout after 15 minutes**
The hosted payment page session on the `RedirectURL` lasts 15 minutes, at which point the pay-in fails automatically with result code [101109](/errors/codes/101109) if it is not completed by the user.
**Caution – TemplateURL customization feature deprecated**
The `TemplateURL` response parameter is deprecated and must no longer be used to redirect the user. You must redirect the user on the `RedirectURL`.
The `TemplateURLOptions` body parameter is also deprecated as the feature allowing minor customization of the hosted page is no longer supported.
### 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.
**Caution:** This customization feature is deprecated and must no longer be used.
The URL of the SSL page of your customized payment page.
**Caution:** This customization feature is deprecated and must no longer be used.
The URL of the corresponding template with the Javascript widget.
**Allowed values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`
The type of the 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.
**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
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Required if `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) 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.
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.
**Caution:** This customization feature is deprecated and must no longer be used. You must redirect on the `RedirectURL` instead.
The customized URL to which to redirect the user to complete the payment.
**Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`
The type of the 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 - CREATED
{
"Id": "wt_f0f67b58-2856-469c-952c-b06e556a70e6",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1746006308,
"AuthorId": "user_m_01JHQRCND66XP99SVBXQRP54MF",
"CreditedUserId": "user_m_01JHQRCND66XP99SVBXQRP54MF",
"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": "wlt_m_01JHQRD0WZ1QWKNAMQF93E5M15",
"DebitedWalletId": null,
"PaymentType": "CARD",
"ExecutionType": "WEB",
"RedirectURL": "https://pay.mangopay.com?id=wt_f0f67b58-2856-469c-952c-b06e556a70e6&client-token=hpp_f5d3a2c1b8e045f7a9d6c3b2a1e9d8c7",
"ReturnURL": "http://example.com&transactionId=wt_f0f67b58-2856-469c-952c-b06e556a70e6",
"TemplateURL": null,
"CardType": "CB_VISA_MASTERCARD",
"Culture": "EN",
"SecureMode": "DEFAULT",
"Billing": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"Shipping": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"StatementDescriptor": "Example123",
"BankName": null
}
```
```json REST
{
"Tag": "Created using the Mangopay API Postman collection",
"AuthorId": "user_m_01JHQRCND66XP99SVBXQRP54MF",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 2000
},
"Fees": {
"Currency": "EUR",
"Amount": 100
},
"CreditedWalletId": "wlt_m_01JHQRD0WZ1QWKNAMQF93E5M15",
"ReturnURL": "http://www.example.com",
"Culture": "EN",
"SecureMode": "DEFAULT",
"Billing": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"Shipping": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"StatementDescriptor": "Example123"
}
```
```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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/web-card-payins/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
Source: https://docs.mangopay.com/api-reference/web-card-payins/view-card-details-web-card-payin
GET /v2.01/{ClientId}/payins/card/web/{PayInId}/extended
**Caution – Endpoint temporarily unavailable**
Due to ongoing improvements to Mangopay's card processing technology, this endpoint temporarily returns a 500 Internal Server Error.
Mangopay is working on reinstating support for this endpoint. For any queries, please contact Support via the Dashboard.
### Path parameters
The unique identifier of the pay-in.
### Responses
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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))
```
# View a PayIn (Web Card)
Source: https://docs.mangopay.com/api-reference/web-card-payins/view-payin-web-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
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) 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.
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.
**Caution:** This customization feature is deprecated and must no longer be used. You must redirect on the `RedirectURL` instead.
The customized URL to which to redirect the user to complete the payment.
**Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`
The type of the 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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 page
{
"Id": "payin_m_01JHQVV446832CA5QAXRYCWV58",
"Tag": "Example with customized payment page",
"CreationDate": 1662454775,
"AuthorId": "user_m_01JHQRCND66XP99SVBXQRP54MF",
"CreditedUserId": "user_m_01JHQRCND66XP99SVBXQRP54MF",
"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": "wlt_m_01JHQRD0WZ1QWKNAMQF93E5M15",
"DebitedWalletId": null,
"PaymentType": "CARD",
"ExecutionType": "WEB",
"RedirectURL": "https://api.sandbox.mangopay.com/Content/PaylineTemplateWidget?rp=f40de6033b7847659387970d98477848&transactionId=payin_m_01JHQVV446832CA5QAXRYCWV58&token=161eekDgqtEVMXbhR3431662108348469",
"ReturnURL": "http://www.example.com?transactionId=payin_m_01JHQVV446832CA5QAXRYCWV58",
"TemplateURL": "https://api.sandbox.mangopay.com/Content/PaylineTemplateWidget?rp=f40de6033b7847659387970d98477848&transactionId=payin_m_01JHQVV446832CA5QAXRYCWV58",
"CardType": "CB_VISA_MASTERCARD",
"Culture": "EN",
"SecureMode": "DEFAULT",
"Billing": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"Shipping": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"StatementDescriptor": "Platform",
"BankName": null
}
```
```json 200 - Customized page
{
"Id": "payin_m_01JHQVV446832CA5QAXRYCWV58",
"Tag": "Example with customized payment page",
"CreationDate": 1662454775,
"AuthorId": "user_m_01JHQRCND66XP99SVBXQRP54MF",
"CreditedUserId": "user_m_01JHQRCND66XP99SVBXQRP54MF",
"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": "wlt_m_01JHQRD0WZ1QWKNAMQF93E5M15",
"DebitedWalletId": null,
"PaymentType": "CARD",
"ExecutionType": "WEB",
"RedirectURL": "https://www.example.com/template/?transactionId=payin_m_01JHQVV446832CA5QAXRYCWV58&token=1jLXHAjyfjxGiJJQv2971662454776237",
"ReturnURL": "http://www.example.com?transactionId=payin_m_01JHQVV446832CA5QAXRYCWV58",
"TemplateURL": "https://www.example.com/template/?transactionId=payin_m_01JHQVV446832CA5QAXRYCWV58",
"CardType": "CB_VISA_MASTERCARD",
"Culture": "EN",
"SecureMode": "DEFAULT",
"Billing": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"Shipping": {
"FirstName": "Alex",
"LastName": "Smith",
"Address": {
"AddressLine1": "6 rue de la Cité",
"AddressLine2": "Appartement 3",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
}
},
"StatementDescriptor": "Platform",
"BankName": null
}
```
```json REST
// GET has no body parameters
```
# The Web Card PayIn object
Source: https://docs.mangopay.com/api-reference/web-card-payins/web-card-payin-object
### Description
The Web Card PayIn object enables you to process a card payment via a Mangopay-hosted payment page (returned in the `RedirectURL`), without registering the user's card details.
**Caution – TemplateURL customization feature deprecated**
The `TemplateURL` response parameter is deprecated and must no longer be used to redirect the user. You must redirect the user on the `RedirectURL`.
The `TemplateURLOptions` body parameter is also deprecated as the feature allowing minor customization of the hosted page is no longer supported.
### 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.
**Caution:** This customization feature is deprecated and must no longer be used.
The URL of the SSL page of your customized payment page.
**Caution:** This customization feature is deprecated and must no longer be used.
The URL of the corresponding template with the Javascript widget.
**Caution:** This customization feature is deprecated and must no longer be used. You must redirect on the `RedirectURL` instead.
The customized URL to which to redirect the user to complete the payment.
**Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`
The type of the card.
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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 `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.
Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))
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.
# [Deprecated] Create a Web Direct-Debit PayIn
Source: https://docs.mangopay.com/api-reference/web-direct-debit-payins/create-web-direct-debit-payin
POST /v2.01/{ClientId}/payins/directdebit/web
**Warning – Deprecated endpoint**
This endpoint is deprecated and will be removed. Both payment methods available via this endpoint, Sofort and Giropay, are no longer available.
**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 no longer available after June 1, 2024**
These endpoints are the legacy integration of Sofort with Mangopay (`DirectDebitType` is `SOFORT`).
As of June 1, 2024, the Sofort payment method was no longer available with Mangopay. Klarna acquired deprecated the Sofort brand and technical solution.
Platforms looking for Sofort are invited to integrate [Klarna](/guides/payment-methods/klarna).
### Body parameters
**Allowed values:** `GIROPAY`, `SOFORT`
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.
**Caution:** This customization feature is deprecated and must no longer be used.
The URL of the SSL page of your customized payment page.
**Caution:** This customization feature is deprecated and must no longer be used.
The URL of the corresponding template with the 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
**Returned values:** `GIROPAY`, `SOFORT`
The type of direct debit.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
**Caution:** This customization feature is deprecated and must no longer be used. You must redirect on the `RedirectURL` instead.
The customized URL to which to redirect the user to complete the payment.
**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",
"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://docs.mangopay.com/please-ignore',
TemplateURL: 'https://docs.mangopay.com/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://docs.mangopay.com/please-ignore',
TemplateURL: 'https://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/web-direct-debit-payins/view-payin-web-direct-debit
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
**Returned values:** `GIROPAY`, `SOFORT`
The type of direct debit.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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.
**Caution:** This customization feature is deprecated and must no longer be used. You must redirect on the `RedirectURL` instead.
The customized URL to which to redirect the user to complete the payment.
**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 = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';
$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);
}
}
```
# [Deprecated] The Web Direct-Debit PayIn object
Source: https://docs.mangopay.com/api-reference/web-direct-debit-payins/web-direct-debit-payin-object
**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 no longer available after June 1, 2024**
These endpoints are the legacy integration of Sofort with Mangopay (`DirectDebitType` is `SOFORT`).
As of June 1, 2024, the Sofort payment method was no longer available with Mangopay. Klarna acquired deprecated the Sofort brand and technical solution.
Platforms looking for Sofort are invited to integrate [Klarna](/guides/payment-methods/klarna).
### Attributes
**Allowed values:** `GIROPAY`, `SOFORT`
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.
**Caution:** This customization feature is deprecated and must no longer be used.
The URL of the SSL page of your customized payment page.
**Caution:** This customization feature is deprecated and must no longer be used.
The URL of the corresponding template with the Javascript widget.
**Caution:** This customization feature is deprecated and must no longer be used. You must redirect on the `RedirectURL` instead.
The customized URL to which to redirect the user to complete the payment.
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
Source: https://docs.mangopay.com/api-reference/webhooks/create-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 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 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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/webhooks/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
Source: https://docs.mangopay.com/api-reference/webhooks/list-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 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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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://example.com",
"Status": "ENABLED",
"Validity": "VALID",
"EventType": "PAYIN_NORMAL_CREATED",
"Id": "hook_m_01J6EK0ZRRGKZH98RCDWB7Y3KJ",
"Tag": "Created using the Mangopay API Postman Collection",
"CreationDate": 1724919086
},
{
"Url": "https://example.com",
"Status": "ENABLED",
"Validity": "VALID",
"EventType": "UBO_DECLARATION_VALIDATION_ASKED",
"Id": "hook_m_01J6EK16AS02MV3H4AMMXMQWZ1",
"Tag": "Created using the Mangopay API Postman Collection",
"CreationDate": 1701792699
}
]
```
```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
Source: https://docs.mangopay.com/api-reference/webhooks/update-hook
PUT /v.2.01/{ClientId}/hooks/{HookId}
### Path parameters
The unique identifier of the hook.
### Body parameters
Max. length: 255 characters
The URL 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 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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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://example.com",
"Status": "DISABLED",
"Validity": "VALID",
"EventType": "UBO_DECLARATION_VALIDATION_ASKED",
"Id": "hook_m_01J6EK16AS02MV3H4AMMXMQWZ1",
"Tag": "Created using the Mangopay API Postman Collection",
"CreationDate": 1655991027
}
```
```json REST
{
"Url": "https://example.com",
"Status": "DISABLED",
"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 {
$hookId = '198685419';
$hook = $api->Hooks->Get($hookId);
$hook->Url = 'https://docs.mangopay.com/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://docs.mangopay.com/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://docs.mangopay.com/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
Source: https://docs.mangopay.com/api-reference/webhooks/view-hook
GET /v2.01/{ClientId}/hooks/{HookId}
### Path parameters
The unique identifier of the hook.
### Responses
Max. length: 255 characters
The URL 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.
Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)
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://example.com",
"Status": "ENABLED",
"Validity": "VALID",
"EventType": "UBO_DECLARATION_VALIDATION_ASKED",
"Id": "hook_m_01J6EK16AS02MV3H4AMMXMQWZ1",
"Tag": "Created using the Mangopay API Postman Collection",
"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
Source: https://docs.mangopay.com/api-status
# Customizing bank statement references
Source: https://docs.mangopay.com/bank-statements
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 Bizum 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
* Create a TWINT 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
# Build with AI
Source: https://docs.mangopay.com/build-with-ai
Use Mangopay docs and SDKs with AI tools
Mangopay provides a set of tools that you can use to accelerate your integration. Our documentation site is also built with large language models (LLMs) in mind, so that our latest content is available to your AI tools inside your workflow.
## Plain text docs
Mangopay's documentation site is written in markdown, which is highly accessible for LLMs.
### Markdown pages
You can access the markdown version of any page by adding `.md` to the page URL. For example, the markdown version of this page is at [https://docs.mangopay.com/build-with-ai.md](https://docs.mangopay.com/build-with-ai.md).
You can copy the markdown of each page via the copy button in the top right, or with the shortcut **⌘/Ctrl + C**.
Markdown pages are preferable to web-rendered pages when working with AI tools.
LLMs break text down into semantic tokens (words and parts of words), and markdown has a much higher density of tokens that have semantic meaning compared with HTML.
LLMs can more easily parse the markdown hierarchy and formatting tokens, and all the text is present and not hidden (for example, inside JavaScript-based components).
### LLMs.txt
Our documentation sites hosts an [/llms.txt](https://docs.mangopay.com/llms.txt) file which functions like a sitemap for LLMs. The file is based on an emerging standard that makes websites more accessible by list page URLs in markdown format.
We also host an [/llms-full.txt](https://docs.mangopay.com/llms-full.txt) file, which is a single file containing of the full content of the site in markdown.
## AI assistant
Mangopay's documentation site also features an AI assistant, which is available in the search dialog (**⌘/Ctrl + K**) based on your query, or it can be opened directly with **⌘/Ctrl + I** for you to ask away.
The AI assistant uses an agentic approach to search indexed pages for your query. It may search again using slightly different keywords to increase confidence in its response.
**Best practice – Check sources**
The AI assistant provides links to the documentation pages on which its response is based. You are strongly recommended to read the sources to enhance your understanding of Mangopay's product, especially for significant decisions about workflow integration.
### AI disclaimer
Mangopay's documentation forms an integral part of the contractual obligations that are binding upon Mangopay's partner platforms, who are required to integrate and use the API and associated services strictly in accordance with it.
Any AI tool or response provided on Mangopay's documentation website is intended to facilitate navigation and access to the documentation, but does not form part of the documentation itself and is not binding.
AI tools and large language models (LLMs) may produce inaccurate or incomplete information. You are strongly advised to verify all responses against the official documentation.
Mangopay cannot be held liable for any misunderstanding or misinterpretation resulting from AI-generated content, whether by partner platforms or their end users. For any concerns or queries, please contact us via the Dashboard.
# Mirakl connector
Source: https://docs.mangopay.com/connectors/mirakl
## 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 →
# All error codes
Source: https://docs.mangopay.com/errors/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.
For `ActionCodes` applied when a user is blocked, see the [blocked users](/guides/users/blocked-users) article.
**Note - Categories are indicative**
The categories presented on this page are not exhaustive and errors may be returned on multiple features and endpoints.
## Success
**Success**\
The `000000` result code indicates a successful outcome.
## 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
### Closed users
**User owning debited wallet is closed and cannot transfer to another wallet**
The transaction is requested from a wallet belonging to a closed user and is therefore refused.
**User owning credited wallet is closed and and cannot receive funds from another wallet**
The transaction is targeting a wallet belonging to a closed user and is therefore refused.
### User category
**Users with category PAYER cannot make transfers to other users with category PAYER.**\
The action was refused because the user is a Payer, not an Owner.
**Refused due to user's UserCategory: PAYER**
The action was refused because it is only permitted if the user is an OWNER.
### Owner user SCA
**Transfer authentication failed. Please retry with a new request.**
The user reached the maximum number of retries for one of the authentication factors, so the SCA session failed.
**Transfer authentication expired. Please initiate a new request.**
The user did not complete all steps required within 10 minutes, so the SCA session expired.
### 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.
**CreditedFunds must be more than 0 (DebitedFunds can not equal Fees)**\
The debited funds must be greater than the fees.
**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.
**The payment period has expired**\
The period allowed for the user to complete the payment has ended.
**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 has been refused**\
The bank transfer has been declined or canceled due to a bank wire issue.
### Pay by Bank
**RedirectURL page embedded**
The payment failed because the redirect URL is embedded in a page.
**RedirectURL already processed**
The payment failed because the redirect URL has already been processed.
**Bank not supported**
The payment failed because the selected bank is not supported.
**User not recognized**
The payment failed because the user is not recognized by the bank.
**Authentication method not supported**
The payment failed because the authentication method selected is not supported.
**Invalid user credentials**
The payment failed due to invalid user credentials.
**Parallel session detected**
The payment failed due to another session being open for the user.
**User blocked by bank**
The payment failed because the user has been blocked by their bank.
**User denied by bank**
The payment failed because the user is not authorized to perform this action.
### 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 initial transaction occured less than 7 days ago**
A direct debit pay-in cannot be refunded within 7 calendar days of the pay-in `CreationDate`.
**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.
**Conversions while market is closed are not enabled. Contact your support to activate this feature.**\
The conversion failed because FX markets were closed and off-market trading is not enabled.
## 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
Source: https://docs.mangopay.com/errors/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`, `ressource_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`
Unix timestamp
The date and time at which the error occurred.
`Errors`
object
The list of issues that triggered the HTTP error.
### Example HTTP errors
The following examples show the HTTP error report. Further examples are given in the responses to a given endpoint where relevant and valuable.
```json 400 Bad Request
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "5e83fbe8-7345-4778-8437-4aa6464b3337",
"Date": 1740581497.0,
"errors": {
"CreditedWalletId": "The CreditedWalletId field is required."
}
}
```
```json 400 Bad Request
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "59fd66e0-c84e-4a24-abaa-a22f8c1ac230#1740580804",
"Date": 1740580805,
"errors": {
"IBAN": "The value is not a valid IBAN"
}
}
```
```json 403 Forbidden
{
"Message": "This endpoint is not available for your account",
"Type": "forbidden_ressource",
"Id": "18afb259-3ce8-4985-916c-8f308e776fcc",
"Date": 1740580883,
"errors": null
}
```
```json 404 Not Found
{
"Message": "The ressource does not exist",
"Type": "ressource_not_found",
"Id": "9b3d2584-77ba-4723-aa43-6aceba34c8dc#1740580881",
"Date": 1740580882,
"errors": {
"RessourceNotFound": "Cannot found the ressource PayIn with the id=123456789"
}
}
```
```json 409 Conflict
{
"Message": "A resource has already been created with this Idempotency Key",
"Type": "idempotent_creation_conflict",
"Id": "3a61d663-eefa-41dc-9665-bce3a88d8eda#1740581343",
"Date": 1740581344,
"errors": null
}
```
# HTTP response codes
Source: https://docs.mangopay.com/errors/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
Source: https://docs.mangopay.com/guides/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.
**Best practice – Contact Mangopay to discuss interest**
Mangopay's roadmap for currency coverage and payment methods depends on many factors, and features marked as planned or on request in the tables below are subject to change.
Interest from existing partner platforms and prospects is a key consideration for Mangopay's expansion. Contact us via the Dashboard or the Sales contact form to register your interest and discuss your needs.
**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`, `ILS`, `JPY`, `MXN`, `NOK`, `NZD`, `PLN`, `RON`, `SAR`, `SEK`, `SGD`, `TRY`, `USD`, `ZAR`.
## Payment methods
## Related resources
See all supported payment methods
# Disputes
Source: https://docs.mangopay.com/guides/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 user and the platform or between the paying user and the recipient user.
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
Source: https://docs.mangopay.com/guides/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: on the one hand, the users making payments and, on the other hand, the users receiving them.
## 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 →
# Mangopay Echo
Source: https://docs.mangopay.com/guides/echo
Thanks to Mangopay's flexible wallet system, platforms are able to use third-party acquirers instead of Mangopay pay-ins and then benefit from Mangopay's wallet and payout capabilities.
Mangopay Echo is a unified solution for platforms to declare payments not acquired by Mangopay but which then transit the Mangopay environment as part of the workflow. This allows payments to be correctly reconciled against the funds that are received on the platform's escrow wallet.
### Flow types
Mangopay Echo is applicable to platforms acquiring funds for goods or services sold by your platform directly (first-party or [1P transactions](#first-party-transactions-1p)), as well as for goods or services sold by third-party sellers on your platform (third-party or [3P transactions](#third-party-transactions-3p)).
### Echo for Mirakl Connector platforms
Some platforms acquiring with a third-party PSP are also using Mangopay's Mirakl Connector to synchronize their sellers and payouts.
Mangopay's Mirakl Connector handles the integration of Echo for your 3P payments, which is made possible by your integration of Mirakl Custom Fields on your Mirakl API calls. For more details on this setup process, see the dedicated [Echo guide for Mirakl Connector](/guides/echo/mirakl) platforms.
Mirakl Connector platforms also need to [send settlement files](#send-settlement-files-to-mangopay) to Mangopay, as described below.
Furthermore, if your platform is using the Mirakl Connector and also selling goods or services directly as **1P payments**, you need to integrate Echo Intents and captures for these transactions, because they are not reflected in the Mirakl Connector.
## Overview diagram
The diagram below shows an overview of how the solution works:
The rest of this guide refers to the numbers in the diagram above, along the main stages.
## Declare payment authorization
Mangopay Echo allows your platform to compliantly declare transactions acquired by third-party PSPs as **Intents**. The Intent API object represents a payment authorization processed by a third-party PSP, and can subsequently be used to track the full lifecycle of the transaction.
### Intent
The Intent represents the successful *authorization* of the transaction (**1A**), while its *capture* represents the acquisition of the funds by the PSP.
To create an Intent (**1B**), call the endpoint:
> [**POST Create an Intent**](/api-reference/intents/create-intent)
Include the following information:
* Payment details – Amount, currency, payment method
* External provider – Provider name, unique identifier of the transaction, date
* Buyer (optional) – If the user is also registered with Mangopay, the Mangopay UserId that made the payment
* Line items – A list of items purchased by the buyer. Each line item identifies the seller (Mangopay user and wallet) and the item purchased (amount, SKU, etc.). Future actions declared for the intent It also tracks the amount of the line item that is subsequently captured, refunded, disputed, and so on.
The seller details of a line item are different depending on whether the transaction is 1P or 3P.
### First-party transactions (1P)
First-party (1P) flows refer to transactions where your platform sells directly to the user on your website: an e-commerce transaction. In a 1P scenario, your platform operator is the beneficiary of the transaction.
For a 1P Line Item, your platform is the line item's `Seller`: your `ClientId` is the `AuthorId`, and your Fees Wallet is the `WalletId`.
### Third-party transactions (3P)
Third-party flows refer to transactions where your platform acts as an intermediary between the buyer and a seller. In a 3P scenario, the Seller is the beneficiary.
For a 3P line item, The seller on your platform is the line item's `Seller`: their `UserId` is the `AuthorId` and their wallet is the `WalletId`.
## Declare capture or cancel
When the third-party PSP captures the funds (**2A**), you need to declare this to Mangopay (**2B**).
### Intent Capture
To declare the capture, call the endpoint using the Intent’s `Id`:
> [POST Create a Capture of an Intent](/api-reference/intents/create-intent-capture)
In all cases, the capture of an Intent is a separate Mangopay API call from the Intent creation.
There are three possible scenarios:
* Authorization simultaneous with capture – No new data required because the external data is the same as the authorization, so the call has an empty body.
* Authorization and delayed full capture (e.g. preauthorization) – New data is required for the external PSP reference and amount, because a delayed capture is necessarily a different object.
* Authorization and partial captures – New external data is required along with the amount for each line item that is being captured.
### Intent Cancel
If an payment authorization (or part of it) is not used, then the Intent can be fully or partially cancelled. To do so, call the endpoint:
> [POST Create a Cancel of an Intent](/api-reference/intents/create-intent-cancel)
Cancellations can be partial. In a cancellation scenario, new external data is necessarily required as the action must require a new object with the third-party PSP.
## Declare future split transfer to seller
In Echo, the future transfer of funds to seller's Mangopay wallet is called a **Split**, and you need to create this request in the Mangopay API.
To create a Split (**3**), call the endpoint:
> [POST Create a Split of an Intent](/api-reference/intents/create-intent-split)
**Note – Split creation timing depends on your workflow**
A Split can be declared via the API as soon as the Intent `Status` is `CAPTURED` or `PARTIALLY_CAPTURED` (**2B**).
However, depending on your workflow, it may be more suitable to wait until a later stage, such as the settlement to Mangopay being reconciled (**5C**) or paid (**6A** **&** **6B**).
When you create a Split for the Intent, you declare also the fees that will be taken by your platform for the transaction (and diverted to your Fees Wallet) when the split is executed by Mangopay (**7B**).
However, you can also specify the `PlatformFeesAmount` in the Intent, which is used if there is no `FeesAmount` in the Split.
## Track the payment lifecycle
Once the authorization and capture are declared, your platform needs to track any other transaction events that occur on the payment (**4A** **& 4B**). Besides a cancellation or partial cancel (mentioned above), there are two other possible pathways for the payment.
### Intent Refund
The payment can be refunded by the seller, and this needs to be reflected in an Intent Refund. Intent Refunds can be full or partial.
For some payment methods, particularly those involving bank wire transfers, it can happen that a refund cannot be processed. In the Echo solution, this is a reflected in a refund being reversed, indicating that the funds were returned to the platform.
### Intent Dispute
The payment can be subject to a chargeback or dispute initiated by the buyer. Your platform needs to track this eventuality in an Intent Dispute, which can be won or lost. If your provider returns the funds to you temporarily while it is defended, you can reflect this status change in the Intent Dispute, but there is no movement of funds on Echo's side until the outcome of the dispute.
## Send settlement files to Mangopay
**Applies to:** Any platform using a third-party PSP for funds acquisition, whether the platform uses the Mirakl Connector or not.
For Mirakl Connector platforms, the payment intent declarations are created automatically by the connector, but the settlement data must be provided by the platform.
When your third-party PSP settles the transaction with your platform, they provide settlement files for reconciliation purposes (**5A**).
Mangopay Echo needs settlement data to be able to reconcile the funds entering the Mangopay environment with the payment Intents that your platform previously declared. The payment and possible refund or dispute may all be reflected in the settlement of the transaction to your platform.
You need to format this settlement data according to Mangopay’s expected format and send settlement files to Mangopay as soon as they become available, and in one file for each currency (**5B**).
To do so, create a CSV file according to [Mangopay's settlement file format](/guides/echo/settlement-file) with the data received from your provider. Then send it via the endpoint:
> [POST Create a Settlement](/api-reference/settlements/create-settlement)
You can use this [example template](/guides/echo/settlement-file#example-template) to help you.
In response, the API creates the Settlement object with `SettlementId` and other summary data about the status and amounts.
## Fund the escrow wallet
In your workflow, the funds acquired by your third-party PSP arrive in the Mangopay environment as a payment to your dedicated Escrow Wallet (**6A**).
In most cases, this payment is handled by your PSP. In some cases, your platform makes the payment.
Once the funds arrive, the Settlement `Status` changes to `RECONCILED`. If the funds which arrive on the wallet do not cover the amount declared in Intents and Settlements, the Status changes to `INSUFFICIENT_FUNDS`.
## Release split transfers to sellers
Once the Settlement is reconciled, your platform can release the previously created Splits to the sellers (**7A**).
Your platform can divert fees to your Fees Wallet using the `FeesAmount` parameter.
Once the funds are credited to the sellers' wallets, they can be paid out to their external bank accounts.
## Echo endpoints
### Intent endpoints
Declare a transaction authorization processed by a third-party PSP
{/*
Update details of a declared transaction authorization processed by a third-party PSP
*/}
Retrieve the declaration of a transaction processed by a third-party PSP
Declare the full or partial capture of an authorization processed by a third-party PSP
{/*
Declare the full or partial cancellation of a payment authorization processed by a third-party PSP
*/}
#### Intent Split endpoints
Create a transfer to the wallet of the seller of an Intent line item
Release the funds of a Split to the wallet of the seller of the Intent line item
Reallocate a Split's funds back to the Escrow Wallet if not yet executed
Modify a Split before execution
Retrieve details of a Split of an Intent
### Settlement endpoints
Upload a Mangopay-format settlement file for a single currency to be reconciled with Intents
Upload an additional file to update the Settlement
Retrieve the Settlement details generated from file upload
# Mangopay Echo integration for Mirakl Connector platforms
Source: https://docs.mangopay.com/guides/echo/mirakl
Guide for platforms using the Mirakl Connector to prepare for the launch of Mangopay Echo
Platforms are able to use third-party acquirers along with Mangopay pay-ins and then benefit from Mangopay's wallet and payout capabilities.
Mangopay is developing a new pay-in connector called **Mangopay Echo** to provide better transparency on funds acquired by other PSPs but which then transit the Mangopay environment.
The Mirakl Connector, which your platform is using, will take care of the Mangopay Echo functionality for all Mirakl Orders, regardless of whether the payments are processed by a third-party PSP or by Mangopay. However, we require you to enrich Mirakl Orders with some data so they can be processed.
Furthermore, we require certain actions from all platforms using third-party acquirer PSPs, including those using the Mirakl Connector.
{/* For Mirakl Connector platforms also processing first-party payments for the sale of their own goods, we will require integration of Mangopay Echo to declare these direct payments. This is because these payments are not visible in Mirakl and therefore not handled by the Mirakl Connector. */}
While developments of Mangopay Echo are being finalized, certain actions can be started on your side.
## Confirm your PSP provides settlement files
**Applies to:** Any platform using a third-party PSP for funds acquisition (whether the platform uses the Mirakl Connector or not)
Settlement data consists of:
* **A list of transactions** and details for each: type (e.g. payment, refund, chargeback), identifiers, amounts, date, status information, etc.
* **Summary data** relating to the settlement of those transactions: date of settlement, total amount sent to your platform, total amount of commission retained by the PSP, etc.
Many PSPs provide daily settlement files, but it is possible that your provider doesn't. In this case, you need to request that they start making files available to you, ideally daily.
**Best practice – Request settlement files as soon as possible (if not already provided)**
If your PSP doesn't provide settlement files today, you need to request that they do as soon as possible.
This data is essential for regulatory compliance and Mangopay relies on your partner PSP to provide you the files.
## Enrich Mirakl Connector integration
**Applies to:** Any platform using a third-party PSP for funds acquisition and using the Mirakl Connector
**Note – If using multi-capture, use order line custom fields**
The connector supports single capture (one capture per `commercial_order`) and multi-capture (one capture per `logistic_order` or multiple captures per `logistic_order`).
If you use multiple captures per `logistic_order`, use **order line custom fields** (`order_line_additional_fields`) instead of order custom fields.
### 1. Create custom Order fields in the Mirakl Dashboard
Mirakl allows its operators to create custom data fields (for Stores, Orders, etc.) for specific business needs.
Mangopay's Mirakl Connector relies on these custom fields to standardize the transactional data that is not always present in Orders. Without these fields, Mangopay Echo can't declare external payments (called Intents in the Echo solution) or reconcile and release funds.
#### How to create fields
To create custom fields in the Mirakl Dashboard:
1. Navigate to ***Settings*** in the sidebar menu.
2. Select the entity: ***Orders***
3. Go to the ***Custom fields*** tab.
4. Click ***Create custom field*** and fill in the required details such as ***Label***, ***Code***, ***Type***, and ***Description***.
Follow the specifications in the table below exactly.
For the Mirakl settings not mentioned below we recommend:
* ***Store account permissions***: ***Invisible*** or ***Read only***
* ***Required field***: No
There are no requirements for the ***Label***, which is your custom display name.
#### Fields to create
Code
Description
Type (Mirakl Dashboard)
`mgp-external-provider-name`
The name of the external provider processing the transaction.
***Single values list*** containing the relevant value(s) exactly as they appear in the [supported external providers](/guides/echo/supported-providers).
`mgp-external-processing-date`
The date at which the transaction was created.
***Date (ISO 8601 format)***
`mgp-external-provider-reference`
The unique identifier of the transaction at the provider level.
***Text (Max: 2000 char.)***
`mgp-external-merchant-reference`
The unique identifier of the transaction at the merchant level.
***Text (Max: 2000 char.)***
`mgp-external-provider-payment-method`
One of the [supported payment methods](/guides/echo/supported-payment-methods) used to process the transaction.
***Single values list*** containing the relevant values exactly as they appear in the [supported payment methods](/guides/echo/supported-payment-methods).
**Best practice – Use list values not text strings**
The data values sent in `mgp-external-provider-name` and `mgp-external-provider-payment-method` must match the supported enum values linked above.
Therefore, it is better to use the Mirakl ***Single values list*** format with the specified values rather than free text. In the Mirakl API this format is `LIST` with `accepted_values`.
Note that the payment method is not required by Mangopay, so if you make it required on Mirakl then all values must be in the supported values.
### 2. Integrate the custom Order fields into your Mirakl API calls
Now that the fields have been created, you need to integrate them on your calls to the Mirakl API for Orders.
The following fields are required for correct processing by Mangopay Echo:
Field
Required
Expected values
`mgp-external-provider-name`
Yes
One of the [supported external providers](/guides/echo/supported-providers).
`mgp-external-processing-date`
Yes
ISO 8601 date time in UTC (YYYY-MM-DDTHH:MM:SSZ)
`mgp-external-provider-reference`
Yes
String
`mgp-external-merchant-reference`
No
String
`mgp-external-provider-payment-method`
No
One of the [supported payment methods](/guides/echo/supported-payment-methods). If the payment method is not supported, this field can be left blank (provided you created it as not required).
You can send the data on the Mirakl endpoints:
* **OR01** when you create an Order – this is recommended
* **OR31** by editing an existing Order, if the data becomes available after creation
**Note – Incomplete custom fields blocks release of funds**
You should provide the custom field data as early as possible in the flow.
With this information, the Mirakl Connector calls the Mangopay API to declare the order details to Mangopay based on the Mirakl Order status. It creates, captures and refunds Intents.
Without this custom field data, the Mirakl Connector cannot reconcile the Order and its settlement with Intents, preventing the release of funds to the seller.
#### Example of custom fields in Mirakl API call
```json
...
"order_additional_fields": [
{
"code": "mgp-external-provider-name",
"type": "LIST",
"value": "ADYEN"
},
{
"code": "mgp-external-processing-date",
"type": "DATE",
"value": "2013-10-21T13:28:06.419Z"
},
{
"code": "mgp-external-provider-reference",
"type": "STRING",
"value": "b8fd937e-f1ce-4ad7-9744-59797957beeb"
},
{
"code": "mgp-external-merchant-reference",
"type": "STRING",
"value": "6f9b2ec2-d51e-4193-ac78-a18589f7d8af"
},
{
"code": "mgp-external-provider-payment-method",
"type": "LIST",
"value": "VISA"
}
]
...
```
## Provide settlement files to Mangopay
**Applies to:** Any platform using a third-party PSP for funds acquisition (whether the platform uses the Mirakl Connector or not)
If your platform is using a third-party PSP for funds acquisition, you also need to send settlement data to Mangopay for reconciliation.
The payment intent declarations are created automatically by the Mirakl Connector, but the settlement data must be provided by the platform.
To do this, your platform needs to send CSV files to a dedicated endpoint as soon as they become available. Read more about the process and requirements in the guide:
Read how to provide settlement files to Mangopay
## Related resources
Read about Echo integration
POST Create a Settlement
# Settlement file format requirements
Source: https://docs.mangopay.com/guides/echo/settlement-file
This page describes the Mangopay format requirements of the CSV settlement file that your platform must upload to the [POST Create a Settlement](/api-reference/settlements/create-settlement) endpoint.
The CSV file contains:
* Transaction data – Header columns and a row for each transaction included in the settlement file
* A single empty row (string of commas)
* Footer rows – Summary data with header rows and a single value for each
**Caution – Mandatory fields must not be empty**
All mandatory fields must be present and not empty in every row or the file will be rejected. The parser identifies columns by their headers, not their position.
Optional fields (transaction data or summary footer) can be empty.
### Example template
You can use this [example CSV file](https://raw.githubusercontent.com/Mangopay/docs/refs/heads/main/guides/echo/Example_Mangopay_Settlement_File.csv) (right click and ***Save as...***), which contains the correct column and row labels and example data for 3 transactions. Remove the example data lines before generating your own file.
## File requirements
* File type: `.csv`
* Delimiter: Comma `,`
* Max. file size: TBD
There are no requirements for the **file name** – you can name your file how you like.
## Mandatory fields
### Columns (mandatory)
Column name
Description
Format
Example
`ExternalProviderReference`
The unique identifier of the transaction at the provider level.
The type of transaction using Mangopay's accepted values:
* `PAYMENT`
* `REFUND`
* `DISPUTE`
string
`PAYMENT`
`ExternalTransactionStatus`
The status of the transaction. The accepted values listed can only apply to the `ExternalTransactionType` mentioned:
* `SETTLED` – `PAYMENT` successfully processed: funds are expected to be received.
* `REFUNDED` – `REFUND` fully processed: funds were returned to the buyer.
* `REFUND_REVERSED` – `REFUND` processed but reversed: funds were returned to the platform.
* `DISPUTED` – Funds deducted due to a `DISPUTE`: not available for settlement.
* `DEFENDED` – Funds temporarily returned to the platform as part of the `DISPUTE` defense process.
* `DISPUTED_WON` – `DISPUTE` resolved in favor of the platform.
* `DISPUTED_LOST` – `DISPUTE` resolved against the platform: funds permanently withdrawn to buyer.
string
`SETTLED`
`ExternalProcessingDate`
The date on which the transaction was created.
date (DD-MM-YYYY)
`19-06-2025`
`Amount`
The amount of the transaction in the currency's minor unit.
string
`50000` (500)
`Currency`
The currency of the transaction.
string
`EUR`
### Footer rows (mandatory)
Footer row name
Description
Format
Example
`SettlementDate`
The creation date of the settlement from the provider.
date (DD-MM-YYYY)
`19-06-2025`
`ExternalProviderName`
The name of the third-party PSP.
string
`Stripe`
`TotalSettlementFeesAmount`
The total amount of fees taken by the provider from the settlement in the currency's minor unit. This amount match the sum of all `ExternalProviderFees` values in the file, if they are provided.
string
`500`
`TotalSettlementAmount`
Net settlement amount in the currency's minor unit, which must be the sum of the `Amount` values of all transaction lines, minus the `TotalSettlementFeesAmount`.
string
`50000`
## Optional fields
### Columns (optional)
Column name
Description
Format
Example
`IntentId`
The unique identifier of the associated Intent in Mangopay's ecosystem.
string
`int_01978259-e06b-758c-8cd5-888cee9dd669`
`ExternalPaymentMethod`
The [supported payment method](/guides/echo/supported-payment-methods) used to process the transaction.
string
`int_01978259-e06b-758c-8cd5-888cee9dd669`
`ExternalInitialReference`
The unique identifier of the original transaction authorization or capture at the acquirer's level.
Required only when `ExternalTransactionType` is `REFUND` or `DISPUTE`.
The amount of fees deducted by the provider from the transaction `Amount` in the currency's minor unit.
string
`150`
### Footer rows (optional)
Footer line name
Description
Format
Example
`SettlementCurrency`
The currency of the settlement file.
string
`EUR`
## Related resources
Read more about Mangopay Echo
POST Create a Settlement
# Supported payment methods
Source: https://docs.mangopay.com/guides/echo/supported-payment-methods
This page lists the payment method values supported by Mangopay Echo.
These values are used for:
* The `ExternalData.ExternalProviderPaymentMethod` property of the [Intent object](/api-reference/intents/create-intent)
* The `ExternalPaymentMethod` property of Mangopay's [settlement file format](/guides/echo/settlement-file)
If your payment method is not available in the list, leave the field blank.
Category
Payment method value
Description
Card networks
`VISA`
Visa
`MASTERCARD`
Mastercard
`CB`
Carte bancaire
`AMERICAN_EXPRESS`
American Express
`DISCOVER`
Discover
`DINERS_CLUB`
Diners Club
`JCB`
JCB
`UNIONPAY`
UnionPay
Digital wallets (external)
`APPLE_PAY`
Apple Pay
`GOOGLE_PAY`
Google Pay
`SAMSUNG_PAY`
Samsung Pay
`PAYPAL`
PayPal
`VENMO`
Venmo
`CASH_APP`
Cash App
Bank wire transfers and open banking
`SEPA_CREDIT_TRANSFER`
SEPA Credit Transfer
`SEPA_DIRECT_DEBIT`
SEPA Direct Debit
`SWIFT`
SWIFT
`WIRE_TRANSFER`
Wire Transfer
`FASTER_PAYMENTS`
Faster Payments
`BACS`
BACS
`CHAPS`
CHAPS
`ACH_CREDIT_TRANSFER`
ACH Credit Transfer
`ACH_DIRECT_DEBIT`
ACH Direct Debit
`RTP`
Real-Time Payments (RTP)
`FEDNOW`
FedNow
`OPEN_BANKING_UK`
Open Banking UK
`OPEN_BANKING_EU`
Open Banking EU
Buy Now, Pay Later (BNPL)
`KLARNA`
Klarna
`AFTERPAY`
Afterpay
`CLEARPAY`
Clearpay
`ZIP`
Zip
`AFFIRM`
Affirm
`PAYPAL_PAY_LATER`
PayPal Pay Later
`SCALAPAY`
Scalapay
Local payment methods – Europe
`BANCONTACT`
Bancontact
`BLIK`
BLIK
`GIROPAY`
Giropay
`EPS`
EPS
`PRZELEWY24`
Przelewy24 (P24)
`MULTIBANCO`
Multibanco
`MBWAY`
MB Way
`SOFORT`
Sofort
`IDEAL`
iDEAL
`TRUSTLY`
Trustly
`SWISH`
Swish
`TWINT`
Twint
`BIZUM`
Bizum
`MOBILEPAY`
MobilePay
`POSTPAY`
PostPay
`PAYSAFECARD`
Paysafecard
`POSTFINANCE`
PostFinance
`WERO`
Wero
`PAYCONIQ`
Payconiq
`ALIPAY`
Alipay
`WECHATPAY`
WechatPa
Local payment methods – UK and US
`ZELLE`
Zelle
`VENMO`
Venmo
`CASH_APP`
Cash App
Checks and cash-based
`CHECK`
Check
`CASH`
Cash
`PAYSAFECARD_VOUCHER`
Paysafecard Voucher
## Related resources
Read more about Mangopay Echo
POST Create an Intent
# Supported providers
Source: https://docs.mangopay.com/guides/echo/supported-providers
This page lists the external payment service provider (PSP) values supported by Mangopay Echo.
These values are used for:
* The `ExternalData.ExternalProviderName` property of the [Intent object](/api-reference/intents/create-intent)
* The `ExternalProviderName` property of Mangopay's [settlement file format](/guides/echo/settlement-file)
During the establishment of your contract with Mangopay, any new providers are added to the list. If your provider is not listed, please contact us via the Dashboard.