cancel
Showing results for 
Search instead for 
Did you mean: 

Create Customer Profile and charge the CC card at the same time? Updated Info?

I've read this blog post (CIM Profile Creation Enhancements) and this one (New ARBGetSubscriptionList Call)

 

The first tells me this "if you pass the createProfile flag in the createTransactionRequest for AIM, you can both process a payment and create a payment and shipping  profile in a single API call".

 

When I search the API docs for the createProfile flag it shows up in authorize a credit card or

Debit a Bank Account.

 

So my question is, as of the current API, can I charge a card and create a paymennt profile at one time, in one call to Authorize.net?

 

If so, could you please point me to docs that say how to do it?

 

Thanks,

 

- D

fifty-git
Regular Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

If anyone is looking for a complete example of "Charge a Credit Card" you can find it here:

Sample Code on Git Hub

 

- D

View solution in original post

fifty-git
Regular Contributor
8 REPLIES 8

Hello @fifty-git

 

It's available in the API Reference at http://developer.authorize.net/api/reference/index.html#payment-transactions-charge-a-credit-card

 

If you set createProfile as true, it will run the transaction and create a profile if successful.

 

Richard

RichardH
Administrator Administrator
Administrator

Thanks for your reply.

 

If I'm reading this correctly, I will have to create a customer profile as well as a payment profile, yes?

 

No way to just create the payment profile?

 

Thanks,

 

- D

fifty-git
Regular Contributor

If you use createTransaction and createProfile=true, it will create a customer and payment profile for you or it will return duplicate customer profile id in the error message.

 

You can experiment with this in the sandbox to ensure you've got your most common uses cases covered.

 

Richard

Thanks again for your answer.

 

The PHP sample code is pretty sparse for this, any better examples to show what I'm trying to do?

Perhaps I should be looking at the sample code for creating a customer profile to add to the charge a credit card sample?

 

Thanks,

 

- D

fifty-git
Regular Contributor

If anyone is looking for a complete example of "Charge a Credit Card" you can find it here:

Sample Code on Git Hub

 

- D

fifty-git
Regular Contributor

Since the above solution will indeed throw an error, it will charge the card, but it will not create a second payment profile.

 

So I put together a class to create only a payment profile and then charge to it.

 

Works great, except that it runs two transactions (somewhat expected) one to authorize the profile and one to charge to it.

 

So back to my original question... (I'm thinking the above is all I can do, but...)

 

My intention is to create only a new payment profile, without trying to create a customer profile, and then charge to. Doing this in one transaction.

 

Is there a way to do this?

I need to confirm my options.

 

Thank you!

 

- D

fifty-git
Regular Contributor

Hello @fifty-git

 

It's not possible to store a payment profile without a customer profile. 

 

Richard

Sorry, my intention is to create a payment profile for an exsiting customer profile and charge it all in the same transaction.

 

Thanks,

 

 -D

fifty-git
Regular Contributor