Jump to content

Questions about charging through the api


Recommended Posts

I'm trying to set up a series of pages do the following.


1. Get the user information and create the client (if necessary)

2. The user signs up for a basic service

3. Charge the user for the basic service

4. Make other offers (upsells)

5. Create the order/products & charge the account correctly

6. Create the correct module

7. Done


I know the basic api calls, but I'm not sure how to properly do #3--how do I run a charge through whmcs (and make sure it goes through correctly) and then apply that amount towards the products orderd in step #6?





Link to comment
Share on other sites

When you call AddClient, theres a field for the credit card information. After this is done, you will need to call CreateInvoice. Once the invoice is created, you can call CapturePayment to run the charge. That will return either success or failure depending on whether it went through or not.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated