• France
status page
Demo shops
assistance
FAQContact support
Search
Categories
Tags
Europe (English)
France
Spain
Europe (English)
India
Homepage
Use cases
Create a payment
Create an installment payment
Create a multi-card (split) payment
Create a payment by Alias (Token)
Create a payment link
Create a recurring payment
Manage subscriptions
Manage your transactions (refund, cancel...)
Analyze your reports
API docs
Embedded Form
REST API
Hosted payment
Mobile payment
File exchange
SDD mandates by REST API
Snippets
Payment methods
Plugins
Marketplace
Guides
Merchant Back Office
Back Office Expert
Functional guides

Creating a refund request

This step allows to create the refund request by using a POST request on the REFUND resource:

POST /refunds/

When a refund request is created, the following elements are controlled by the API and are subject to a 400 returned error code if they are not verified:
  • The refund request must have the SUCCEEDED status.
  • The seller that performs the refund must be one of the sellers of the refunded order.
  • The refund must concern only one seller. If several sellers must refund a part of the same order, several separate refund requests must be created: one for each seller. The only exception is if the second seller of the request is the marketplace administrator.

Note: the refunded amount is not verified at this stage. The verification occurs later on, in scheduled process chains, that is reflected in the change of the processing request status.

Example of a call POST REFUND

In this example of the JSON content to post, a refund request of €130 is created, where €120 are refunded by the seller and €10 are refunded by the marketplace manager:

Request

POST https://secure.lyra.com/marketplace/refunds/

Body

{
"order": "9537e049-8862-400a-ae8d-da2ec9ca6051",
"reference": "remb000045",
"description": "Refund Mrs Smith 001",
"currency": "EUR",
"items": [{
"seller":  "dfc42a76-10b5-421a-91cd-c288c8265c92",  
"reference": "remb000045a", 
"description": "Phoneshop",  
"amount": 12000 
},          
{      
"seller":"975e2a43-7e72-438c-a2b2-b61347aa160c", 
"reference":"remb000045b", 
"description": "Manager", 
"amount": 1000 
}]
}

Example response of POST REFUND

The amount attribute in the response is calculated automatically based on the posted amounts of each of the parts.

{
"uuid": "16ad9da8-b9cb-11e4-97c6-b1229586dec7",
"href":"https://secure.lyra.com/marketplace/refunds/16ad9da8-b9cb-11e4-97c6-b1229586dec7",
"created_at": "2018-06-08T12:36:56.681073Z",
"updated_at":"2018-06-08T12:39:46.859402Z",
"order": "9537e049-8862-400a-ae8d-da2ec9ca6051",
"reference": "remb000045",
"description": "Refund Mrs Smith 001",
"amount": 13000,
"currency": "EUR",
"status":"CREATED",
"items": [ { 
"seller": "dfc42a76-10b5-421a-91cd-c288c8265c92",  
"reference": "remb000045a",  
"description":"Phoneshop",  
"amount":12000,  
"is_commission": false 
}, 
{
"seller":"975e2a43-7e72-438c-a2b2-b61347aa160c", 
"reference": "remb000045b", 
"description": "Manager",  
"amount": 1000, 
 "is_commission": false 
}]
}
Jobs
Legal
GDPR
25.18-1.11