Authorize.net
Set up Authorize.net for payment processing.
Updated
On this page
Overview
Accept payments using Authorize.net. The SDK includes a built-in Authorize.net client-side processor for PCI-compliant tokenization.
Setup
- Create an Authorize.net account
- Go to Settings → Payments in the dashboard
- Select Authorize.net
- Enter your API Login ID and Transaction Key
- Save
How It Works
import dash from "@/lib/dash"
// Load the Authorize.net processor
await dash.payment.load()
// Tokenize card — uses Authorize.net Accept.js
const { token, descriptor } = await dash.payment.tokenize({
cardNumber: "4111111111111111",
expDate: "12/26",
cvv: "123",
})
// Complete checkout
const { order } = await dash.checkout.complete({
cartId: dash.cart.cartId,
shipping: { ... },
payment_token: { token, descriptor },
})
Note: The SDK automatically loads the Authorize.net Accept.js library when
dash.payment.load() is called.
Saved Cards And Subscriptions
Untick Card Code "Required" in the classic Authorize.net interface (Account, Settings, Payment Form, Form Fields) before using saved cards or product subscriptions. Charges to a saved card carry no card code, so while it is required they are declined with
33: Card Code is required. The newer interface can show the box unticked while the classic setting is still ticked.
Next Steps
- Payment Flow — Payment lifecycle
- Payment Processing — Tokenization