> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mangopay.com/api-reference/settlements/create-settlement/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server. # Create a Settlement and generate a secure URL for file upload POST https://api.sandbox.mangopay.com/v3.0/{ClientId}/payins/intents/settlements Content-Type: application/json Generate a pre-signed URL to which you can upload your Mangopay-format settlement file This endpoint returns a unique temporary pre-signed URL, `SettlementFileUploadUrl`, that you can use to upload your Mangopay-format settlement file (see [PUT Upload a settlement file to the secure URL](/api-reference/settlements/upload-settlement-file)). Reference: https://docs.mangopay.com/api-reference/settlements/create-settlement ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. If your platform is using a [proxy](/guides/sca/proxy-management) to take SCA-triggering action on behalf of users, you also need to integrate [mTLS authentication](/guides/sca/platform) and use the `api-mtls` base URL. ## Servers - `https://api.sandbox.mangopay.com` (Sandbox, default) - `https://api.mangopay.com` (Production) - `https://api-mtls.sandbox.mangopay.com` (mTLS Sandbox) - `https://api-mtls.mangopay.com` (mTLS Production) ## Request ### Path parameters - `ClientId` (string, required) — Platform's API account identifier, associated with the API key. ### Body (application/json) This endpoint expects a CreateASettlementAndGenerateASecureURLForFileUploadRequest. - `FileName` (string, required) — The name of your file, which can be anything you wish. The file extension must be `.csv`. ## Response ### 200 Success - `UploadUrl` (string, optional) — The unique temporary pre-signed URL to which to upload your CSV file. Use the full dynamic URL including the host, path, and all query parameters. The URL is already authenticated, so the call does not require an Authorization header. See [PUT Upload a settlement file to the secure URL](/api-reference/settlements/upload-settlement-file) for details - `SettlementId` (string, optional) — The unique identifier of the Settlement. ## Errors ### 400 Bad Request Error Bad Request - `Message` (string, optional) — Description of the error. - `Type` (string, optional) — The category of the error. - `Id` (string, optional) — Unique identifier of the error instance, useful when contacting Mangopay for support. - `Date` (double, optional) — Unix timestamp (UTC) of the date and time the error was triggered. - `errors` (map from string to string, optional, nullable) — Object containing one or more field-level errors. ## Examples **Response** ```json { "UploadUrl": "https://s3.eu-west-1.amazonaws.com/private-files.sandbox.whenthen.co/mangopay/echo/settlement/2025-12-16/2025-12-16_13%3A25_019b2756-c2f8-78a6-9a8f-1a0d354cef20.csv?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEJ7%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCWV1LXdlc3QtMSJIMEYCIQC49GJoqW%2FixnIsaeFKCrvI4Yx9aTN7MfMn%2BBBa3YlgAgIhAPsckOjS8Q6EEILEt1PqjB35U2Ai80iglXzmhhp4M2xoKuUDCGYQAhoMODQ4OTQzNDkyMDQyIgx3igwjnJYW%2FrLuJYEqwgM95qmUSmbtZm1ND0ekhHDgLzmhSDVKzTT98Umx3FthNsHtC9ok2RHKEeqjvuB2tvuBviNmmZxmyfGv7W5YOdobkrPZLmxzlhUuOLO4W0mdQnOBUPzbt0bSGNl9KUHEFoThFwRJKXKcKjNU1BPF9jUUoIdBMnjFqZi2f1GygR9Dim9WSSFRm0XKVaOv37gptMUYfkH1GvD07yESbB%2Fsc9iGZwje98hhKYeL4xyl7qYtYD%2Br1S%2FXGGBpbtziDs95FoI8m%2BZ2FDjVveHPVv8%2FcfkrrRrw3MQ0cCTHX1weSXb%2FqrTEhfEA1ngrcb9G1N%2Fi%2FmyEmjMnlSK%2FCLplZplDeisKshcpClKA7Ry2nMxxTQ8qLImWAzxVI580DZKIi%2BNgvwpB5LnfWzJbKyhfTv8KbOPtRfPbMTxZi%2FUtzbfVc58dfPgEf0NLsIaDNiWkTkzgO4Tv4mffZrek2kTA6cwKcWlwTVnD2%2BDXFT8rkniOe2Y%2BnTxsY4mHlsuNSvTYkfFSqEXtrlPtXnVR6WV%2BSYcUzPLI444dsoUHHyd9CQ62vRDYIwO0UBDTVIq5JG8QdjMbhmALugijbAy6F%2FpINrlZlP8FFeEwlbeFygY6pAFg5Ufu5Ioip3HMq9sfvv0iXxhhx05EF43fiiFiizJMDW5kwMHfj1ko24K3C9J1dtqBqMgNuSWWNYPDAhAHbr0PeArUAE1sL5u6BFz3wkeY1IErGJ0gTzmlwj58j%2FrJvkajyXECzUnt%2BmXkIUBYVl0sEVLYku8q9Ztrrc70vXeu%2B4w4ieqjbEz1ZIeEKA8nRerscuFC1aagvyUD4%2F9Y9We%2FST9rfg%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20251216T132556Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Expires=900&X-Amz-Credential=ASIA4LKHZVPFAEUA2EB4%2F20251216%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Signature=b460c40ef9f93fdb58adf9d8510707b47c97065e68c2e56bac60f4e0bf50ee3f", "SettlementId": "int_stlmnt_019b2756-c2f8-78a6-9a8f-1a0d354cef20" } ```