Hi - this may be easier to achieve with the GraphQL API rather than the REST API. There is a subscriptionContract query on the GraphQL API which you could use to get info about a subscription contract that is associated with an order, it could look something like this:
query GetSubscriptionContractDetails {
subscriptionContract(id: "gid://shopify/SubscriptionContract/1234567890") {
id
nextBillingDate
status
deliveryPolicy {
interval
intervalCount
}
customer {
id
email
displayName
}
lines(first: 50, reverse: true) {
edges {
node {
productId
currentPrice {
amount
currencyCode
}
quantity
title
variantTitle
}
}
}
orders(first: 1, reverse: true) {
edges {
node {
id
}
}
}
}
}