AuthorizeNet / sdk-python

Python SDK for the Authorize.Net API
Other
53 stars 82 forks source link

Access denied. You do not have permissions to call the Transaction Details API. #118

Closed lighth7015 closed 6 years ago

lighth7015 commented 6 years ago

So I'm working on getting used to the python API for Authorize.Net, however I seem to be running into the following issues with the API-

Code: E00011
Text: Access denied. You do not have permissions to call the Transaction Details API.

And all the logs will tell me is this,

2018-09-20 11:54:51,750 authorizenet.sdk DEBUG    performing custom validation..
2018-09-20 11:54:51,750 authorizenet.sdk DEBUG    Executing http post to url: https://apitest.authorize.net/xml/v1/request.api
2018-09-20 11:54:51,750 authorizenet.sdk DEBUG    building request..
2018-09-20 11:54:52,337 authorizenet.sdk ERROR    Create Document Exception: <class 'pyxb.exceptions_.IncompleteElementContentError'>, (<authorizenet.apicontractsv1.CTD_ANON_70 object at 0x7fb5ee5c3080>, <pyxb.utils.fac.Configuration object at 0x7fb5ee5c3128>, None, None)

And I don't know how to get more information.

anuragg29 commented 6 years ago

You need to login to your Merchant Interface for enabling the permission for it .

Here's what you can do to enable the API:

1) Log in to your Authorize.net Merchant Interface

2) Navigate to Settings under Account in the main menu on the left.

3) Click on Transaction Details API in the Security Settings section.

4) If you've not already enabled the Transaction Details API, enter the answer to your Secret Question and click Enable Transaction Details API.

lighth7015 commented 6 years ago

Do you happen to know what the transactionId in the python samples would be? I've looked all over, and am unable to understand what its purpose is.

ashtru commented 6 years ago

If you are calling the GetTransactionDetails API, transactionIdis the id of the transaction, you wish to view the details of.

If instead, you are looking to get a list of transactions done by merchant:

  1. For unsettled transactions: Use get-unsettled-transaction-list. The sorting and paging parameters used here, are not mandatory.
  2. For settled transactions: a. Use get-settled-batch-list. This will return the batchId's of settled transactions, based on date range passed. BatchId is used to identify the settlement batch these transactions were part of. b. Followed by, call to get-transaction-list for which batchId is a mandatory field.
  3. The next step is to use get-transaction-details to get the details of the transaction that you are interested in.

You can refer the API Reference page and look at the same request in Try It tab to understand these better:

API Reference GetTransactionDetails API Reference GetUnsettledTransactionList API Reference GetSettledBatchList API Reference GetTransactionList

lighth7015 commented 6 years ago

Can I get a list of transactions associated with an ARB?

ashtru commented 6 years ago

@lighth7015 Sorry for the late response. Yes, you can get the list of transactions ran successfully for an ARB subscription.

In the request, includeTransactions flag has to be set as true (GetSubscription example). And then you can traverse the array of transactions returned in the response (GetSubscription example).

References

  1. https://developer.authorize.net/api/reference/features/recurring_billing.html#Subscription_Reporting
  2. https://developer.authorize.net/api/reference/index.html#recurring-billing (you can explore different scenarios in the Try It tab.)

Kindly close this issue if your problem is resolved. Feel free to reopen this issue or raise a new one for any queries in future.

lighth7015 commented 6 years ago

Thank you, It works now! You all are wonderfully helpful!