How do I set-up this workflow? Membership form with Payment > Discourse Invite

One side of this is that you can generate invite links via the API and make your community require login / approval. Do you have someone doing dev on your side, it is going to require a little bit of coding.