Skip to main content

Register Webhook

Receiving notifications for new order, order cancellations and order status changes from Tokopedia, you will need to first register as a fulfillment service.

Path

post

/v1/fs/:fs_id/register

Request Parameters

ParameterTypeRequiredLocationDescription
fs_id
Integer
Required
path
Fulfillment service unique identifier
order_notification_url
Integer
Required
body
Callback url on which to receive new payment verified order notifications
order_cancellation_url
String
Required
body
Callback url on which to receive order cancellation notifications
order_status_url
String
Required
body
Callback url on which to recieve order status update
chat_notification_url
String
Required
body
Callback url on which to receive new chat notification
product_creation_url
String
Required
body
Callback url which triggered when product creation from Create Product Endpoint V2 finished uploading
product_changes_url
String
Required
body
Callback url on which to receive new product changes
campaign_notification_url
String
Required
body
Callback url on which to receive new campaign notification
webhook_secret
String
Required
body
Secret for generating HMAC while making callbacks

Example Request

curl -X POST \
https://fs.tokopedia.net/v1/fs/13004/register \
-H 'Authorization: Bearer OoHgyxcgQ5a1uCbmbbXjjA' \
-H 'Content-Type: application/json' \
-d '{
"fs_id":13004,
"order_notification_url": "http://yourstore.com/v1/order/notification",
"order_cancellation_url": "http://yourstore.com/v1/order/cancellation",
"order_status_url": "http://yourstore.com/v1/order/status",
"order_request_cancellation_url":"http://yourstore.com/v1/order/request_cancel",
"chat_notification_url":"http://yourstore.com/v1/chat/notification",
"product_creation_url":"http://yourstore.com/v1/product/creation",
"product_changes_url": "http://yourstore.com/v1/product/changes",
"campaign_notification_url": "http://yourstore.com/v1/campaign/notification",
"webhook_secret": "webhook_secret"
}'

Response Parameters

NameTypeDemo ValueDescription
data
String
success
Response Data
status
String
200 Ok
Response Status
error_message
String Array
bad input data
Response Error Message

Success Response Examples

{
"data": "success",
"status": "200 Ok",
"error_message": []
}

Error Response Examples

{
"data": null,
"status": "400 Bad Request",
"error_message": [
"bad input data"
]
}

Error Codes

Notes

If you’ve already registered Webhook URL via the API above, you would need to provide a copy of your current urls which can be found here to prevent it being replaced by empty string.

After registration is successful, you will receive notifications for the new order, order cancellations and order status updates from Tokopedia on respective endpoints you registered. You will also be able to accept or reject order or update order status for each order notification received.

Have a feedback?