JSON API: POST {host}/xml/v1/request.api, one root key = request name, merchantAuthentication{name, transactionKey}, optional refId; hosts https://apitest.authorize.net (sandbox) and https://api.authorize.net (live) | Api::call, Config::LIVE/SANDBOX | AR (JSON examples, "API endpoints"); hosts confirmed on the webhooks page |
| Element order must follow the reference ("force the ordering of elements to match") | Api::hostedToken, refund, billTo order | AR; XSD transactionRequestType order: transactionType, amount, currencyCode, payment, profile, ..., refTransId, ..., order, ..., customer, billTo |
| The answer can start with a UTF-8 byte order mark | Api::decode | Unverified on the pages read (widely documented for the JSON API; handled defensively) |
getHostedPaymentPageRequest: transactionRequest (only transactionType and amount required), hostedPaymentSettings.setting[] with settingName / settingValue (a JSON object as a string); allowed names: IFrameCommunicatorUrl, ButtonOptions, ReturnOptions, OrderOptions, PaymentOptions, BillingAddressOptions, ShippingAddressOptions, SecurityOptions, CustomerOptions, StyleOptions | Api::hostedToken | accept-hosted page; XSD getHostedPaymentPageRequest, SC get-an-accept-payment-page.php |
hostedPaymentReturnOptions {showReceipt, url, urlText, cancelUrl, cancelUrlText}; hostedPaymentButtonOptions {text}; hostedPaymentPaymentOptions {cardCodeRequired, showCreditCard, showBankAccount, customerProfileId}; hostedPaymentBillingAddressOptions {show, required}; hostedPaymentOrderOptions {show, merchantName}; hostedPaymentIFrameCommunicatorUrl {url} | Api::hostedToken | accept-hosted page (settings table) |
Form token valid for 15 minutes; token POSTed as form field token to https://accept.authorize.net/payment/payment (live) / https://test.authorize.net/payment/payment (sandbox) | Config::formUrl, catalog twig | accept-hosted page |
Lightbox / iframe: communicator page on the merchant domain, HTTPS, filename equal to the setting; it relays message events and location.hash to window.parent.parent.AuthorizeNetPopup.onReceiveCommunication; messages action=resizeWindow&width&height, action=cancel, action=transactResponse&response=<JSON>, successfulSave (sample only) | .communicator, twig AuthorizeNetPopup | accept-hosted page ("Integrating the Form Using Iframes and Lightboxes"). Unverified: the exact code of the official IFrameCommunicator.html (page summarised only; ours implements the described behaviour); successfulSave appears only in sample code |
order.invoiceNumber max 20, order.description max 255, refId max 20 (request) | invoice OC<order>-<txn>, refId T<txn> / `C | V | R<op>` | AR field tables (refId 20, invoiceNumber 20, description 255); XSD orderType.invoiceNumber 20, description 255. XSD allows refId 50 in some places; AR says 20 and we use 20 |
| billTo limits: firstName 50, lastName 50, company 50, address 60, city 40, state 40, zip 20, country 60; customer id 20, email 255 | Payments::start | XSD nameAndAddressType, customerDataType |
amount: decimal, no currency symbols, up to 15 digits with decimal point, includes tax and shipping | Money::format | AR (amount) |
currencyCode (optional, string) in transactionRequest | sent when not USD | XSD transactionRequestType.currencyCode. Unverified: which processors/accounts honour it (the docs page did not say) |
authCaptureTransaction / authOnlyTransaction | Api::hostedToken | AR (transactionType) |
getTransactionDetailsRequest {transId} (or transrefId, unused); answer transaction: transId, refTransId, transactionType, transactionStatus, responseCode, responseReasonCode, order.invoiceNumber, authAmount, settleAmount, payment.creditCard.cardNumber (masked, last four) | Api::details, Payments::reconcile | XSD getTransactionDetailsRequest, transactionDetailsType; SC get-transaction-details.php. Unverified in prose: that order.invoiceNumber is returned for hosted-page transactions (the schema has it; confirm in sandbox) |
transactionStatus values: authorizedPendingCapture, capturedPendingSettlement, communicationError, refundSettledSuccessfully, refundPendingSettlement, approvedReview, declined, couldNotVoid, expired, generalError, pendingFinalSettlement, pendingSettlement, failedReview, settledSuccessfully, settlementError, underReview, updatingSettlement, voided, FDSPendingReview, FDSAuthorizedPendingReview, returnedItem, chargeback, chargebackReversal, authorizedPendingRelease | Payments::mapState | XSD transactionStatusEnum (the feature pages print no list) |
getUnsettledTransactionListRequest: unsettled transactions with transId, transactionStatus, invoiceNumber, amounts | Payments::sync, refund reconcile | XSD transactionSummaryType; SC get-unsettled-transaction-list.php. Unverified: the 1000-transaction cap and that a customer's first-hour transaction is listed immediately (read in integrator guides, not on a page we could fetch); the extension also keeps the transaction id from the webhook |
priorAuthCaptureTransaction {amount, refTransId}: the original must be authOnly, authorization valid 30 days, one capture per authorization, amount <= authorized | Payments::capture | AR (priorAuthCaptureTransaction fields); payment-transactions page ("30-day validity", "only one capture", "less than or equal to the original authorized amount") |
voidTransaction {refTransId}: unsettled only ("Once a transaction settles, it cannot be voided") | Payments::void | AR; payment-transactions page |
refundTransaction: settled only; payment.creditCard.cardNumber = last four digits, expirationDate = XXXX, refTransId, amount; "a credit is a new and distinct transaction with its own transaction ID"; default window 180 days after settlement; amount up to the settled amount | Payments::refund, Api::refund | AR (refundTransaction: "Only the last four digits are required", "use XXXX"); payment-transactions page; SC refund-transaction.php. Unverified: the 180 days is a default that can differ per merchant; we do not enforce it locally, Authorize.Net's refusal is shown |
order.invoiceNumber on the refund transaction as our idempotency handle | Payments::refund, reconcileOp | XSD (order is part of transactionRequestType). Unverified: behaviour documented nowhere; sandbox check needed that the refund appears in the unsettled list with our invoiceNumber |
Duplicate window (duplicateWindow setting, up to 28800 s) | not set; documented in FAQ | payment-transactions page |
createCustomerProfileFromTransactionRequest {transId, customer{merchantCustomerId (<=20), email}} -> customerProfileId; a duplicate answers E00039 with the existing id | Api::profileFromTransaction, Payments::saveProfile | SC create-customer-profile-from-transaction.php; XSD; customer-profiles page ("the error message contains the ID of the existing profile"). Unverified: exact E00039 text format (ID 123), parsed with a regex |
Saved cards on the hosted page: transactionRequest.profile.customerProfileId and hostedPaymentPaymentOptions.customerProfileId | Api::hostedToken | accept-hosted page (settings table, profile in the request). Unverified: the exact interplay of addPaymentProfile and customerProfileId (not used) |
Webhooks: payment events net.authorize.payment.authorization.created, authcapture.created, capture.created, refund.created, priorAuthCapture.created, void.created; payload notificationId, eventType, eventDate, webhookId, payload{responseCode, authCode, avsResponse, authAmount, entityName, id}; endpoints POST/GET /rest/v1/webhooks; retry up to 10 times until HTTP 200 (3 x 3 min, 3 x 8 h, 4 x 48 h), then the webhook is set inactive; answer 200 quickly | Webhook, Payments::notify, Api::createWebhook | webhooks page. Unverified: the body of POST /rest/v1/webhooks (url, eventTypes, status) was not printed on the page read |
Signature: header X-ANET-Signature, HMAC-SHA512 of the notification body with the Signature Key | Webhook::signatureOk | webhooks page. Unverified: hex letter case, a sha512= prefix and whether the key is used as text or as hex bytes: the check accepts both cases, the prefix, and both key readings |
| Authentication test | Api::ping | XSD authenticateTestRequest; AR "Authenticate Test" |
Error shape: messages.resultCode Ok / Error, messages.message[].code / text, transactionResponse.responseCode 1 approved, 2 declined, 3 error, 4 held, transactionResponse.errors[].errorCode / errorText | Api::call, Api::transaction | AR (response codes) |
| Brand | no logo shipped | research/brand-assets/authorize_net/SOURCE.md |