have you looked at LSATs at all? basically your client hits an API endpoint, it returns an HTTP 402 Payment Required with a lightning invoice, you pay it and now have access to the resource.
Is that the sort of thing you're thinking of?