Jump to content

Update credit card details through API


Recommended Posts

Hi,

 

I am trying to update the credit card details for a client through the WHMCS API.

 

$postfields["username"] = $username;

$postfields["password"] = md5($password);

$postfields["action"] = "updateclient";

$postfields["clientid"] = $cid;

$postfields["cardtype"] = $input["card_type"];

$postfields["cardnum"] = $input["cardnumber"];

$postfields["expdate"] = $input["expiration_month"]."/".$input["expiration_year"];

 

But the credit card details are not being updated. Does WHMCS still support this functionality??

 

Thanks,

Mithila.

Link to comment
Share on other sites

  • 3 weeks later...

Can anyone out there help us with this? I have this same problem when adding the CC in the addclient api call. I'm pretty sure you should be able to add a CC in both the addclient AND updateclient api calls, but neither work.

 

These are the fields I'm setting.

 

cardtype

cardnum

expdate

 

 

whmcs 4.1

Link to comment
Share on other sites

Ok, I am able to update the cc with the updateclient api call. mithilavelishala, make sure you pass all these fields for the cc.

 

cardtype

cardnum

issuenumber (the 3-4 digit number on the back.)

expdate (pass this as just 4 numbers. the system puts the slash in for you.)

startdate (not sure what this is, but pass the month and year the same as the expdate, no slashes)

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

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

Guest
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