Generate Return Details Report
This guide walks through the process of generating detailed reports containing return information such as upsell information and associated Stripe transactions. This data can be used to help you extract any necessary information for detailed analysis and reconciliation.
This guide uses upsell and Stripe information as examples, but you can use the steps below to create reports containing any return information returned by the Get Return Details endpoint.
Retrieving Detailed Return Data
To generate a return report, you’ll first need to fetch detailed return information.
-
Start by using the Detailed Returns List endpoint to retrieve a list of returns.
- You can use query parameters to filter returns by date range, status, or other relevant criteria to narrow down your report scope.
-
Iterate through the list of returns to extract the
return_id
for each return.
Fetching Detailed Return Information
For each return_id
returned in the previous step, retrieve the detailed return information to access upsell and transaction details.
-
Use the Get Return Details endpoint to fetch detailed information for each return.
-
Parse the returned JSON response to extract the following information for each return:
- Upsell Details: The
upsell
field includes the upsell value associated with the return. - Transaction Details: The name of the refund gateway (such as Stripe) is found in the
gateway
field of therefunds
object.
- Upsell Details: The
Generating the Report
Organize the return date into a structured format, such as a CSV file or a database table. This can be done programmatically with a scripting language such as Python or manually by pasting the return details into a spreadsheet.