Skip to main content

Return and refund

Introduction

Return & Refund Integration can enable sellers to manage their returns and refund orders in one place. Including:

  1. Check the Return & Refund orders and the reasons provided by the buyer
  2. Accept or reject the buyer's request.

More information:https://seller-us.tiktok.com/university/essay?identity=1&role=1&knowledge_id=6837901778454274&from=feature_guide

Benefits

  • Inform sellers about the return and refund orders to prevent a negative impact on SLA due to unawareness.
  • Offer a comprehensive fulfillment experience within your app, so sellers don't have to navigate back to the Seller Center to manage return and refund orders

Integration demo

Tips:

  1. Add a return& refund tab in your app for the seller to operate
  2. Guide for sellers to check out the return& refund page

React framework

Configure preload in WidgetConfigProvider preloadWidgetNames, you can put WidgetConfigProvider to the outermost preload time

TYPESCRIPTWord Wrap

import { WidgetConfigProvider,RemoteWidget } from '@tiktokshop/widget-kit-react';  

const getWidgetToken = async () => {
const res: any = await get('https://xxx/api/v1/widget/access_token', {
outer_shop_id: 'xxx',
partner_type: '1',
});
if (res?.code === 0) {
return res?.data;
}
return {};
};

const initOptions = {
config: {
shopId: 'xxx', //seller id, such as 123456
oecRegion: 'xxx', //country,such as US
appKey: 'xxx', //The key corresponding to the merchant's creation service
isvInfo: {
name: 'xxx', //ISV name,such as OPEN_PLATFORM
},
},
getToken: getWidgetToken, //get auth token
remotes: [
{
name: 'xxx', //Integrated business name, provided by the open platform,such as:@tiktokshop-widget/reverse:ManageReturns
},
],
};

export default () => {
return (
<WidgetConfigProvider
config={initOptions.config}
getToken={initOptions.getToken}
remotes={initOptions.remotes}
preloadWidgetNames={['@tiktokshop-widget/reverse:ManageReturns']}>
<RemoteWidget
name={'@tiktokshop-widget/reverse:ManageReturns'}
className={'containerClass'}
/>
</WidgetConfigProvider>
);
};

Native js

JSONWord Wrap

import React, { useEffect } from 'react';  
import { get } from './utils/fetch';
import { loadWidget, init, WidgetComponent } from '@tiktokshop/widget-kit';

const name = '@tiktokshop-widget/reverse:ManageReturns';
let view = null;
export default () => {
const getWidgetToken = async () => {
const res: any = await get('https://xxx/api/v1/widget/access_token', {
outer_shop_id: 'xxx',
partner_type: '1',
});
if (res?.code === 0) {
return res?.data;
}
return {};
};

const initWidget = () => {//It is recommended to initialize the widget in the outer layer and execute the preloadWidget([name]) method to preload resources.
init({
config: {
shopId: 'xxx',
oecRegion: 'US',
appKey: 'xxx',
isvInfo: {
name: 'OPEN_PLATFORM',
},
},
remotes: [
{
name,
},
],
getToken: getWidgetToken,
});
};
useEffect(() => {
initWidget();
loadWidget(name).then((component: WidgetComponent) => {
view = component.create(
document.getElementById('widget-preview-container')!,
);
view?.render({});
});
return () => {
view?.unmount();
};
}, []);
return (
<div
className="widget-preview-container"
id="widget-preview-container"></div>
);
};

Change log

Release dateUpdate
2024/6/25The first version is launched, providing the management of return and refund orders

Widget SDK User Guide

Widget SDK User Guide