iwanndie Posted February 23, 2021 Share Posted February 23, 2021 Hi again, I am just finishing up my API for WHMCS, and I have a question about checkouts. I am currently building a one-page checkout in Laravel for WHMCS using the API. What would be the correct order of API calls? Currently I have: Add Client Account Add Payment Method Add Order / Invoice Would that also automatically generate the invoice? Or would I need to generate the invoice at checkout? Does that also capture the payment, or do I need to capture too? Would this also set-up automatic billing through Stripe 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted February 26, 2021 Share Posted February 26, 2021 Your order is correct as the AddOrder requires a client id and the payment method. AddOrder has noinvoice and when set to true it wont generate an invoice but if not set it will generate one. You'll need to do the CapturePayment API call to get payment. Flow would likely be : Add Client Account Add Payment Method Add Order Capture Payment from invoice of the new order Accept Order Profit...? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.