Authorize.net
ToolJet supports the Authorize.net plugin to help you securely accept payments, manage customer profiles, and run end-to-end payment lifecycles directly from your applications. You can charge cards, save payment methods, handle refunds and voids, and manage tokenized customer profiles without writing backend code.
Before following this guide, it is assumed that you have already completed the process of Using Marketplace plugins.
Configuration​
To configure the Authorize.net plugin in ToolJet, you will need the following credentials from your Authorize.net account:
- API Login ID
- Transaction Key
You can generate these from the Authorize.net Merchant Interface → Settings → API Credentials & Keys section.
Supported Operations​
Charge a Credit Card​
Creates and submits an auth-and-capture transaction.
Request Body
{
"amount": "5.00",
"cardNumber": "4007000000027",
"expirationDate": "2027-04",
"cardCode": "123",
"refId": "123456",
"lineItems": {
"lineItem": [
{
"itemId": "1",
"name": "Product Name",
"description": "Product Description",
"quantity": "1",
"unitPrice": "5.00"
}
]
},
"tax": {
"amount": "0.50",
"name": "Sales Tax",
"description": "State Tax"
},
"billTo": {
"firstName": "John",
"lastName": "Doe",
"address": "123 Main St",
"city": "Seattle",
"state": "WA",
"zip": "98101",
"country": "US"
}
}
Response Example
refId:"123456" messages : resultCode:"Ok" code:"I00001" text:"Successful." transactionResponse : responseCode:"1" authCode:"IS0IR5" avsResultCode:"Y" cvvResultCode:"P" cavvResultCode:"2" transId:"80051037662" refTransID:"" transHash:"" testRequest:"0" accountNumber:"XXXX0027" accountType:"Visa"
Authorize a Credit Card​
Places a hold on the amount without capturing the funds.
Request Body
{
"amount": "5.00",
"cardNumber": "4111111111111111",
"expirationDate": "2027-09",
"cardCode": "123",
"refId": "123456",
"lineItems": {
"lineItem": [
{
"itemId": "1",
"name": "Product Name",
"description": "Product Description",
"quantity": "1",
"unitPrice": "5.00"
}
]
},
"tax": {
"amount": "0.50",
"name": "Sales Tax",
"description": "State Tax"
},
"billTo": {
"firstName": "John",
"lastName": "Doe",
"address": "123 Main St",
"city": "Seattle",
"state": "WA",
"zip": "98101",
"country": "US"
}
}
Response Example
refId:"123456" networkTransId:"BR11UQFRDSM16890455GKA5" responseCode:"1" authCode:"XSRDNS" avsResultCode:"Y" cvvResultCode:"P" cavvResultCode:"2" transId:"80051037939"
Capture a Previously Authorized Amount​
Captures funds from a previously authorized transaction.
Request Body
{
"refTransId": "1234567890",
"amount": "5.00",
"refId": "123456"
}
Response Example
========= ORDER INFORMATION ========= Invoice : Description : Goods or Services Amount : 5.00 (USD) Payment Method: Visa xxxx0027 Transaction Type: Authorization and Capture
Refund a Transaction​
Refunds a previously captured transaction.
Request Body
{
"transId": "80051038433",
"amount": "1.00",
"cardNumber": "0015",
"expirationDate": "XXXX"
}
Response Example
============== RESULTS ============== Response : Refund has been successful. Auth Code : NRY5S0 Transaction ID : 80051038433
Void a Transaction​
Voids an unsettled transaction.
Request Body
{
"transId": "12345678",
"refId": "optional-ref-123",
"terminalNumber": "optional-terminal"
}
Response Example
refId:"optional-ref-123" resultCode:"Ok" responseCode:"1" authCode:"NRY5S0" avsResultCode:"P" cvvResultCode:"" cavvResultCode:"" transId:"80051038433" refTransID:"80051038433" transHash:"" testRequest:"0" accountNumber:"XXXX0027" accountType:"Visa" transHashSha2:""
Charge a Customer Profile​
Charges a saved customer payment profile.
Request Body
{
"customerProfileId": "40338125",
"customerPaymentProfileId": "1000177237",
"amount": "45.00",
"refId": "123456",
"lineItems": {
"lineItem": [
{
"itemId": "1",
"name": "vase",
"description": "Cannes logo",
"quantity": "18",
"unitPrice": "45.00"
}
]
}
}
Response Example
"refId": "ref-789456", "resultCode": "Ok", "responseCode": "1", "authCode": "Q8YH72", "avsResultCode": "Y", "cvvResultCode": "M", "cavvResultCode": "", "transId": "90081234567", "refTransID": "", "transHash": "", "testRequest": "0", "accountNumber": "XXXX0027", "accountType": "Visa", "messages": "text": "This transaction has been approved." "transHashSha2": "", "message": "Customer profile charged successfully."
Create a Customer Profile​
Creates a new customer profile in Authorize.net.
Request Body
{
"email": "customer@example.com",
"description": "Customer Name",
"merchantCustomerId": "12345"
}
Response Example
resultCode:"Ok" code:"I00001" text:"Successful." customerProfileId:"123456"
Get Customer Profile​
Fetches the details of an existing customer profile.
Request Body
{
"customerProfileId": "123456",
"refId": "ref123",
"includeIssuerInfo": true
}
Response Example
code:"I00001" text:"Successful." merchantCustomerId:"12345" description:"Customer Name" email:"customer@example.com" customerProfileId:"123456" profileType:"regular"
Get Customer Profile IDs​
Fetches all customer profile IDs.
- No parameter needed.
Update Customer Profile​
Updates an existing customer profile.
Request Body
{
"customerProfileId": "123456",
"email": "newemail@example.com",
"description": "Updated Name"
}
Response Example
resultCode:"Ok" code:"I00001" text:"Successful."
Delete Customer Profile​
Deletes an existing customer profile.
Request Body
{
"customerProfileId": "123456"
}
Response Example
resultCode:"Ok" code:"I00001" text:"Successful."
Create Customer Payment Profile​
Creates a new payment profile under an existing customer profile.
Request Body
{
"customerProfileId": "123456",
"cardNumber": "4111111111111111",
"expirationDate": "2028-10",
"cardCode": "123",
"billTo": {
"firstName": "John",
"lastName": "Doe",
"address": "123 Main St",
"city": "Bellevue",
"state": "WA",
"zip": "98004",
"country": "US",
"phoneNumber": "000-000-0000"
},
"defaultPaymentProfile": false,
"validationMode": "liveMode"
}
Response Example
Invoice : none Description : Test transaction for ValidateCustomerPaymentProfile. Amount : 10.00 (USD) Payment Method: Visa xxxx1111 Transaction Type: Authorization Only Response : This transaction has been approved. Auth Code : ABS166
Get Customer Payment Profile​
Fetches details of a specific payment profile.
Request Body
{
"customerProfileId": "10000",
"customerPaymentProfileId": "20000",
"includeIssuerInfo": "true",
"refId": "get-payment-001"
}
Response Example
"refId": "get-payment-001", "resultCode": "Ok", "customerProfileId": "10000", "customerPaymentProfileId": "20000" "message": "Customer payment profile retrieved successfully."
Validate Customer Payment Profile​
Validates a saved customer payment profile.
Request Body
{
"customerProfileId": "123456",
"customerPaymentProfileId": "234567",
"validationMode": "testMode"
}
Response Example
"resultCode": "Ok", "customerProfileId": "123456", "customerPaymentProfileId": "234567" "code": "I00001", "text": "Customer payment profile validation successful."
Update Customer Payment Profile​
Updates an existing customer payment profile.
Request Body
{
"customerProfileId": "10000",
"customerPaymentProfileId": "20000",
"cardNumber": "4111111111111111",
"expirationDate": "2029-05",
"billTo": {
"firstName": "John",
"lastName": "Doe",
"address": "123 Main St.",
"city": "Bellevue",
"state": "WA",
"zip": "98004",
"country": "US",
"phoneNumber": "000-000-0000"
},
"defaultPaymentProfile": false,
"validationMode": "liveMode"
}
Response Example
"resultCode": "Ok", "customerProfileId": "10000", "customerPaymentProfileId": "20000", "validationMode": "liveMode" "message": "Payment profile updated."
Delete Customer Payment Profile​
Deletes a payment profile under a customer profile.
Request Body
{
"customerProfileId": "123456",
"customerPaymentProfileId": "234567",
"refId": "delete-payment-001"
}
Response Example
"code": "I00001", "text": "Customer payment profile deleted successfully."
Create a Customer Profile from a Transaction​
Creates a customer and payment profile using a successful transaction.
Request Body
{
"transId": "1234567890",
"customer": {
"merchantCustomerId": "CUST123",
"description": "Customer description",
"email": "customer@example.com"
},
"profileType": "regular",
"refId": "create-profile-001"
}
Response Example
"refId": "create-profile-001", "resultCode": "Ok", "customerProfileId": "987654321" "customerPaymentProfileIdList": "555666777" "customerShippingAddressIdList":"888999000" "code": "I00001", "text": "Customer profile created successfully from transaction."