{
"ExternalData": {
"ExternalProcessingDate": 1769431976,
"ExternalProviderReference": "refund-stripe-23bdabed-7ba8-488e-822a-ba7d8c8da0d1",
"ExternalMerchantReference": "order-33419af2-e770-43b8-82ac-512963313811",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
}
}
{
"Amount": 10000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"ExternalData": {
"ExternalProcessingDate": 1769432391,
"ExternalProviderReference": "refund-stripe-3ce4ca75-4ce0-4a6c-8681-6ce02f056367",
"ExternalMerchantReference": "refund-order-9724a65a-9d98-4ac3-8c8b-639e0c9ad21f",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"LineItems": [
{
"Id": "int_li_019bfa63-90ae-762a-ad52-7f6284ceb9bc",
"Amount": 5000
},
{
"Id": "int_li_019bfa63-90ae-762a-ad52-7f6284ceb9bd",
"Amount": 5000
}
]
}
// idempotencyKey is null in this example
api.getPayInApi().createPayInIntentRefund(intentId, refundToBeCreated, null);
await Api.PayIns.CreatePayInIntentPartialRefundAsync(dto, intent.Id);
await Api.PayIns.CreatePayInIntentFullRefundAsync(dto, intent.Id);
api.PayIns.createPayInIntentRefund(intent.Id, refundDto)
_api->PayIns->CreatePayInIntentRefund($intent->Id, $refundDto);
PayInIntent.create_refund(intent.id, **dto)
MangoPay::PayIn::PayInIntent::Refund.create(intent['Id'], dto)
{
"Id": "int_019bfa5d-33a7-7cd5-9178-627425ff32ee",
"Amount": 20000,
"AvailableAmountToSplit": 0,
"UnfundedAmount": 0,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "REFUNDED",
"NextActions": "REVERSE_REFUND",
"ExternalData": {
"ExternalProcessingDate": 1769431976,
"ExternalProviderReference": "refund-stripe-23bdabed-7ba8-488e-822a-ba7d8c8da0d1",
"ExternalMerchantReference": "order-33419af2-e770-43b8-82ac-512963313811",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01KF3087EDXEAK8VPD9DTMZW8N"
},
"LineItems": [
{
"Id": "int_li_019bfa5d-33ae-723e-b257-ce01863b3ce0",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 10000,
"DisputedAmount": 0,
"SplitAmount": 0,
"CancelledAmount": 0,
"UnfundedSellerAmount": 0
},
{
"Id": "int_li_019bfa5d-33ae-723e-b257-ce01863b3ce1",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 10000,
"DisputedAmount": 0,
"SplitAmount": 0,
"CancelledAmount": 0,
"UnfundedSellerAmount": 0
}
],
"CreationDate": 1769431970,
"ExecutionDate": 1769431976,
"Refund": {
"Id": "int_refund_019bfa5d-4ad4-79b2-8dcf-5738147affeb"
}
}
{
"Id": "int_019bfa63-90ad-743b-b478-c0f950f6efb3",
"Amount": 10000,
"AvailableAmountToSplit": 10000,
"UnfundedAmount": 0,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "CAPTURED",
"NextActions": "REFUND, DISPUTE, REVERSE_REFUND",
"ExternalData": {
"ExternalProcessingDate": 1769432391,
"ExternalProviderReference": "refund-stripe-3ce4ca75-4ce0-4a6c-8681-6ce02f056367",
"ExternalMerchantReference": "refund-order-9724a65a-9d98-4ac3-8c8b-639e0c9ad21f",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01KF3087EDXEAK8VPD9DTMZW8N"
},
"LineItems": [
{
"Id": "int_li_019bfa63-90ae-762a-ad52-7f6284ceb9bc",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 5000,
"DisputedAmount": 0,
"SplitAmount": 0,
"CancelledAmount": 0,
"UnfundedSellerAmount": 0
},
{
"Id": "int_li_019bfa63-90ae-762a-ad52-7f6284ceb9bd",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 5000,
"DisputedAmount": 0,
"SplitAmount": 0,
"CancelledAmount": 0,
"UnfundedSellerAmount": 0
}
],
"CreationDate": 1769432387,
"ExecutionDate": 1769432390,
"Refund": {
"Id": "int_refund_019bfa63-9d22-76fe-afb1-c561008f4e93"
}
}
Intents
Create an Intent Refund
Declare the full or partial refund of a payment processed by a third-party PSP
POST
/
v3.0
/
{ClientId}
/
payins
/
intents
/
{IntentId}
/
refunds
{
"ExternalData": {
"ExternalProcessingDate": 1769431976,
"ExternalProviderReference": "refund-stripe-23bdabed-7ba8-488e-822a-ba7d8c8da0d1",
"ExternalMerchantReference": "order-33419af2-e770-43b8-82ac-512963313811",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
}
}
{
"Amount": 10000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"ExternalData": {
"ExternalProcessingDate": 1769432391,
"ExternalProviderReference": "refund-stripe-3ce4ca75-4ce0-4a6c-8681-6ce02f056367",
"ExternalMerchantReference": "refund-order-9724a65a-9d98-4ac3-8c8b-639e0c9ad21f",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"LineItems": [
{
"Id": "int_li_019bfa63-90ae-762a-ad52-7f6284ceb9bc",
"Amount": 5000
},
{
"Id": "int_li_019bfa63-90ae-762a-ad52-7f6284ceb9bd",
"Amount": 5000
}
]
}
// idempotencyKey is null in this example
api.getPayInApi().createPayInIntentRefund(intentId, refundToBeCreated, null);
await Api.PayIns.CreatePayInIntentPartialRefundAsync(dto, intent.Id);
await Api.PayIns.CreatePayInIntentFullRefundAsync(dto, intent.Id);
api.PayIns.createPayInIntentRefund(intent.Id, refundDto)
_api->PayIns->CreatePayInIntentRefund($intent->Id, $refundDto);
PayInIntent.create_refund(intent.id, **dto)
MangoPay::PayIn::PayInIntent::Refund.create(intent['Id'], dto)
{
"Id": "int_019bfa5d-33a7-7cd5-9178-627425ff32ee",
"Amount": 20000,
"AvailableAmountToSplit": 0,
"UnfundedAmount": 0,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "REFUNDED",
"NextActions": "REVERSE_REFUND",
"ExternalData": {
"ExternalProcessingDate": 1769431976,
"ExternalProviderReference": "refund-stripe-23bdabed-7ba8-488e-822a-ba7d8c8da0d1",
"ExternalMerchantReference": "order-33419af2-e770-43b8-82ac-512963313811",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01KF3087EDXEAK8VPD9DTMZW8N"
},
"LineItems": [
{
"Id": "int_li_019bfa5d-33ae-723e-b257-ce01863b3ce0",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 10000,
"DisputedAmount": 0,
"SplitAmount": 0,
"CancelledAmount": 0,
"UnfundedSellerAmount": 0
},
{
"Id": "int_li_019bfa5d-33ae-723e-b257-ce01863b3ce1",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 10000,
"DisputedAmount": 0,
"SplitAmount": 0,
"CancelledAmount": 0,
"UnfundedSellerAmount": 0
}
],
"CreationDate": 1769431970,
"ExecutionDate": 1769431976,
"Refund": {
"Id": "int_refund_019bfa5d-4ad4-79b2-8dcf-5738147affeb"
}
}
{
"Id": "int_019bfa63-90ad-743b-b478-c0f950f6efb3",
"Amount": 10000,
"AvailableAmountToSplit": 10000,
"UnfundedAmount": 0,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "CAPTURED",
"NextActions": "REFUND, DISPUTE, REVERSE_REFUND",
"ExternalData": {
"ExternalProcessingDate": 1769432391,
"ExternalProviderReference": "refund-stripe-3ce4ca75-4ce0-4a6c-8681-6ce02f056367",
"ExternalMerchantReference": "refund-order-9724a65a-9d98-4ac3-8c8b-639e0c9ad21f",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01KF3087EDXEAK8VPD9DTMZW8N"
},
"LineItems": [
{
"Id": "int_li_019bfa63-90ae-762a-ad52-7f6284ceb9bc",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 5000,
"DisputedAmount": 0,
"SplitAmount": 0,
"CancelledAmount": 0,
"UnfundedSellerAmount": 0
},
{
"Id": "int_li_019bfa63-90ae-762a-ad52-7f6284ceb9bd",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 5000,
"DisputedAmount": 0,
"SplitAmount": 0,
"CancelledAmount": 0,
"UnfundedSellerAmount": 0
}
],
"CreationDate": 1769432387,
"ExecutionDate": 1769432390,
"Refund": {
"Id": "int_refund_019bfa63-9d22-76fe-afb1-c561008f4e93"
}
}
This endpoint allows you to declare that a captured Intent was subject to a refund, in full or in part.
Path parameters
string
required
The unique identifier of the Intent.
Body parameters
- Full refund
- Partial refund
The full
Amount of the intent is refunded (all line items) but the ExternalData of the third-party refund must be provided.object
required
Information about the refund processed by the third-party PSP.
Show child attributes
Show child attributes
Unix timestamp
required
The date at which the capture was created.
string
required
The unique identifier of the capture at the provider level.
string
The unique identifier of the capture at the merchant level.
string
required
The supported third-party PSP processing the transaction.Note: The uppercase value is expected. The API returns the sentence-case value.
string
One of the supported payment methods used to process the capture.
Part of the original Intent
Amount is refunded from one or more line items in a third-party refund (corresponding to the ExternalData). Any amount can be refunded from any line item(s). In this call, the Refund Amount must equal the sum of the LineItems.Amount values sent.integer
required
The amount of the Refund, required for a partial refund. The Refund
Amount must equal the sum of the Amount values refunded for all line items.integer
The currency of the intent.
integer
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.object
required
Information about the refund processed by the third-party PSP.
Show child attributes
Show child attributes
Unix timestamp
required
The date at which the capture was created.
string
required
The unique identifier of the capture at the provider level.
string
The unique identifier of the capture at the merchant level.
string
required
The supported third-party PSP processing the transaction.Note: The uppercase value is expected. The API returns the sentence-case value.
string
One of the supported payment methods used to process the capture.
array (object)
required
Information about the amount refunded for each line item, required for a partial refund.
Responses
200 - Response parameters
200 - Response parameters
string
The unique identifier of the intent.
integer
The full amount authorized in the Intent, which must equal the sum of the total amounts of all
LineItems.integer
The remaining amount of the Intent that can be split and transferred to the sellers’ wallets.
integer
The amount needing to be settled to the Platform’s technical wallet before the Intent Splits can be executed.
integer
The currency of the intent.
integer
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.string
The status of the Intent, as declared by the platform through Intent Captures, Refunds (and reversals), or Disputes (and decisions). Where partial actions occur, the top-level Intent
Status may differ from the Status of Intent LineItems.Intent Status values:AUTHORIZED– The IntentAmountwas authorized for acquisition by the PSP and can be captured or canceled.PARTIALLY_CAPTURED– Part of the IntentAmountfrom one or moreLineItemswas captured. The other parts are either still available for capture or cancel.CAPTURED– All of the IntentAmountwas captured. Part of it may have been subsequently refunded or disputed.CANCELLED– All of the IntentAmountwas canceled.REFUNDED– All of theCapturedAmountof allLineItemswas refunded.REFUND_REVERSED– The refund could not be completed and the funds were returned to the platform.DISPUTED– All of theCapturedAmountof allLineItemswas disputed.DEFENDED– The dispute is being defended by the platform.DISPUTED_WON– The dispute was resolved in favor of the platform.DISPUTED_LOST– The dispute was resolved against the platform.
string
The possible next actions on the intent.
object
Information about the refund processed by the third-party PSP.
Show child attributes
Show child attributes
Unix timestamp
The date at which the refund was created.
string
The unique identifier of the refund at the provider level.
string
The unique identifier of the refund at the merchant level.
string
The supported third-party PSP processing the transaction.Note: The uppercase value is expected. The API returns the sentence-case value.
string
One of the supported payment methods used to process the refund.
object
Information about the buyer.
Show child attributes
Show child attributes
string
If it exists, the unique identifier of the Mangopay user making the payment via the third-party PSP. Must be a valid Mangopay
UserId.array (object)
Information about the line items included in the intent action.
Show child attributes
Show child attributes
string
The unique identifier of the line item in Mangopay’s ecosystem.
integer
The total amount of the line item calculated as ((
UnitAmount x Quantity) - DiscountAmount).integer
The item total
CAPTURED amountinteger
The item total
REFUNDED amountinteger
The item total
DISPUTED amount.integer
The item total
COMPLETED amount.integer
The amount needing to be settled to the Platform’s technical wallet before the Intent Splits can be executed for this seller.
string
The date and time at which the Intent was created.
Unix timestamp
The date and time at which the Intent moved to
AUTHORIZED.{
"Id": "int_019bfa5d-33a7-7cd5-9178-627425ff32ee",
"Amount": 20000,
"AvailableAmountToSplit": 0,
"UnfundedAmount": 0,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "REFUNDED",
"NextActions": "REVERSE_REFUND",
"ExternalData": {
"ExternalProcessingDate": 1769431976,
"ExternalProviderReference": "refund-stripe-23bdabed-7ba8-488e-822a-ba7d8c8da0d1",
"ExternalMerchantReference": "order-33419af2-e770-43b8-82ac-512963313811",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01KF3087EDXEAK8VPD9DTMZW8N"
},
"LineItems": [
{
"Id": "int_li_019bfa5d-33ae-723e-b257-ce01863b3ce0",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 10000,
"DisputedAmount": 0,
"SplitAmount": 0,
"CancelledAmount": 0,
"UnfundedSellerAmount": 0
},
{
"Id": "int_li_019bfa5d-33ae-723e-b257-ce01863b3ce1",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 10000,
"DisputedAmount": 0,
"SplitAmount": 0,
"CancelledAmount": 0,
"UnfundedSellerAmount": 0
}
],
"CreationDate": 1769431970,
"ExecutionDate": 1769431976,
"Refund": {
"Id": "int_refund_019bfa5d-4ad4-79b2-8dcf-5738147affeb"
}
}
{
"Id": "int_019bfa63-90ad-743b-b478-c0f950f6efb3",
"Amount": 10000,
"AvailableAmountToSplit": 10000,
"UnfundedAmount": 0,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"Status": "CAPTURED",
"NextActions": "REFUND, DISPUTE, REVERSE_REFUND",
"ExternalData": {
"ExternalProcessingDate": 1769432391,
"ExternalProviderReference": "refund-stripe-3ce4ca75-4ce0-4a6c-8681-6ce02f056367",
"ExternalMerchantReference": "refund-order-9724a65a-9d98-4ac3-8c8b-639e0c9ad21f",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"Buyer": {
"Id": "user_m_01KF3087EDXEAK8VPD9DTMZW8N"
},
"LineItems": [
{
"Id": "int_li_019bfa63-90ae-762a-ad52-7f6284ceb9bc",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 5000,
"DisputedAmount": 0,
"SplitAmount": 0,
"CancelledAmount": 0,
"UnfundedSellerAmount": 0
},
{
"Id": "int_li_019bfa63-90ae-762a-ad52-7f6284ceb9bd",
"TotalLineItemAmount": 10000,
"CapturedAmount": 10000,
"RefundedAmount": 5000,
"DisputedAmount": 0,
"SplitAmount": 0,
"CancelledAmount": 0,
"UnfundedSellerAmount": 0
}
],
"CreationDate": 1769432387,
"ExecutionDate": 1769432390,
"Refund": {
"Id": "int_refund_019bfa63-9d22-76fe-afb1-c561008f4e93"
}
}
{
"ExternalData": {
"ExternalProcessingDate": 1769431976,
"ExternalProviderReference": "refund-stripe-23bdabed-7ba8-488e-822a-ba7d8c8da0d1",
"ExternalMerchantReference": "order-33419af2-e770-43b8-82ac-512963313811",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
}
}
{
"Amount": 10000,
"Currency": "EUR",
"PlatformFeesAmount": 0,
"ExternalData": {
"ExternalProcessingDate": 1769432391,
"ExternalProviderReference": "refund-stripe-3ce4ca75-4ce0-4a6c-8681-6ce02f056367",
"ExternalMerchantReference": "refund-order-9724a65a-9d98-4ac3-8c8b-639e0c9ad21f",
"ExternalProviderName": "Stripe",
"ExternalProviderPaymentMethod": "MASTERCARD"
},
"LineItems": [
{
"Id": "int_li_019bfa63-90ae-762a-ad52-7f6284ceb9bc",
"Amount": 5000
},
{
"Id": "int_li_019bfa63-90ae-762a-ad52-7f6284ceb9bd",
"Amount": 5000
}
]
}
// idempotencyKey is null in this example
api.getPayInApi().createPayInIntentRefund(intentId, refundToBeCreated, null);
await Api.PayIns.CreatePayInIntentPartialRefundAsync(dto, intent.Id);
await Api.PayIns.CreatePayInIntentFullRefundAsync(dto, intent.Id);
api.PayIns.createPayInIntentRefund(intent.Id, refundDto)
_api->PayIns->CreatePayInIntentRefund($intent->Id, $refundDto);
PayInIntent.create_refund(intent.id, **dto)
MangoPay::PayIn::PayInIntent::Refund.create(intent['Id'], dto)
Was this page helpful?
⌘I