Skip to main content
POST
/
v2.01
/
{ClientId}
/
payins
/
{PayInId}
/
refunds
{
    "Tag": "Created using Mangopay API Postman Collection",
    "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY",
    "DebitedFunds": {
        "Currency": "EUR",
        "Amount": 2000
    },
    "Fees": {
        "Currency": "EUR",
        "Amount": -100
    }
}
  
{
    "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"
}
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.
Read more about pay-in refunds

Path parameters

PayInId
string
required
The unique identifier of the pay-in.

Body parameters

Tag
string
Max. length: 255 charactersCustom data that you can add to this object.
For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform.
AuthorId
string
required
The unique identifier of the user at the source of the initial transaction.
DebitedFunds
object
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.
Fees
object
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.
StatementDescriptor
string
Max. length: 10 characters; only alphanumeric and spacesCustom 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

Id
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
Tag
string
Max. length: 255 charactersCustom data that you can add to this object.
For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform.
CreationDate
Unix timestamp
The date and time at which the object was created.
AuthorId
string
The unique identifier of the user at the source of the initial transaction.
CreditedUserId
string
Default value: The unique identifier of the owner of the credited wallet.The unique identifier of the user whose wallet is credited.
DebitedFunds
object
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.
CreditedFunds
object
Information about the funds being credited to the target of the transaction (CreditedFunds = DebitedFunds - Fees).
Fees
object
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.
Status
string
Returned values: CREATED, SUCCEEDED, FAILEDThe status of the transaction.
ResultCode
string
The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes.
ResultMessage
string
The explanation of the result code.
ExecutionDate
Unix timestamp
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.
Type
string
Returned values: PAYIN, TRANSFER, CONVERSION, PAYOUTThe type of the transaction.
Nature
string
Returned values: REGULAR, REPUDIATION, REFUND, SETTLEMENTThe 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.
InitialTransactionId
string
The unique identifier of the initial transaction being refunded.
InitialTransactionType
string
Returned values: PAYIN, TRANSFER, PAYOUTThe type of the initial transaction being refunded.
InitialTransactionNature
string
Returned values: REGULAR, REPUDIATION, REFUND, SETTLEMENTThe 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.
DebitedWalletId
string
The unique identifier of the debited wallet.
CreditedWalletId
string
The unique identifier of the credited wallet.
RefundReason
object
Information about the reasons for the refund.
StatementDescriptor
string
Max. length: 10 characters; only alphanumeric and spacesCustom 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).
{
    "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"
    }
}  
{
    "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"
    }
}  
{
    "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"
    }
}  
{
    "Message": "The original transaction must have a SUCCEEDED Status to be refunded",
    "Id": "cd53bb5b-21f6-499e-bcc5-d3520c0d1eb7",
    "Date": 1759504170,
    "Type": "original_transaction_must_be_succeeded",
    "Errors": {}
}
{
    "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 for details). Note that for many payment methods, the period during which a refund is allowed is shorter than 13 months.
{
    "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 "
    }
}
{
    "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"
}
{
    "Tag": "Created using Mangopay API Postman Collection",
    "AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY",
    "DebitedFunds": {
        "Currency": "EUR",
        "Amount": 2000
    },
    "Fees": {
        "Currency": "EUR",
        "Amount": -100
    }
}
  
I