Create Order in Infusionsoft using XML-RPC API

Hello

We need to create Order in Infusionsoft using XML-RPC API .
We tried using
https://developer.infusionsoft.com/docs/xml-rpc/#order-create-an-order

but it is giving Invalid Arguments error .

Also please let us know how to add Manual payment to the order

Is there any example for this

Regards
Atul

I think you are asking two questions? First we would need to see the payload you are sending to the create order xmlrpc function to determine what might be wrong.

Second once you use the above endpoint to create an order the response will have the invoice id in it. You can then use the invoice id to add a manual payment. https://developer.infusionsoft.com/docs/xml-rpc/#invoice-add-a-payment-to-an-invoice

We are trying to use REST API now . We have created Client ID and Client Secret . We followed this example :

It asks for the permission to get access token . And for that we have to login to infusionsoft and grant permission . Then using that access token we were able to create contact . However when we try again to create another contact , it again asked to grant permission .

We are really confused as how this all work .
We are integrating infusionsoft on our existing website . Why will the end use have go through all this as he is not the infusionsoft login user .
ideally we should only provide access token and refresh token to the PhP code similar to how we supply API KEY

You can authorize in order to get an access token or you can generate one in https://accounts.infusionsoft.com under API Access. Once you have a valid access and refresh tokens you will need to maintain the access token on your backend by refreshing the token before it expires.

I created access code using
" https://accounts.infusionsoft.com under API Access"

But if you check : https://github.com/infusionsoft/infusionsoft-php/blob/master/samples/addWithDupCheck.php

// If the serialized token is available in the session storage, we tell the SDK
// to use that token for subsequent requests.
if (isset($_SESSION[‘token’])) {
infusionsoft->setToken(unserialize(_SESSION[‘token’]));
}

// If we are returning from Infusionsoft we need to exchange the code for an
// access token.
if (isset($_GET[‘code’]) and !$infusionsoft->getToken()) {
infusionsoft->requestAccessToken(_GET[‘code’]);

It wants Array . Let me knoiw how to pass existing Access Code and Refresh Code to the below example

// Save the serialized token to the current session for subsequent requests
$_SESSION['token'] = serialize($infusionsoft->getToken());

}

If you used the API Access option in Account Central then you already have an access token and refresh token. There is no need to exchange a code for tokens like the example shows. The example is for when you are performing an Authorization Code Grant to get tokens.