On this page:
https://developer.apple.com/documentation/appstoreserverapi
See the section "Refund information", and in particular "Send Consumption Information".
I believe there is a WWDC video that describes this.
Topic:
App & System Services
SubTopic:
StoreKit
Tags: