Update Subscription
Audience:
Low-code Engineers,Software DevelopersSkill Prerequisites:
Actions,Tokens,Authorize.Net
Changes an existing Authorize.Net recurring subscription, using its Automated Recurring Billing (ARB) service. You identify the subscription by its subscription ID, which Create Subscription returns.
Each update sends the amount, the credit card, the billing name and the number of payments together, so you have to supply all of them every time, even if only one changes.
This action requires the Authorize.Net feature (AUTHORIZE) to be licensed. Authorize.Net support is a separate add-on package (DnnSharp.Authorize.Net). If you don't see the Authorize.Net actions, the add-on isn't installed.
Typical Use Cases
- Let a member replace an expired or lost card on their subscription
- Change the amount, for example when a customer moves to a different plan
- Correct the billing name or address
- Extend or shorten a subscription by changing the total number of payments
Don't use it to
- Change how often the subscription bills. The action has no interval parameters, and Authorize.Net doesn't allow the interval to change. Create a new subscription instead.
- Cancel a subscription. There's no action for this. Cancel it in the Authorize.Net Merchant Interface.
- Charge a one-time amount. Use Make a Payment with Credit Card.
- Switch the subscription to a bank account. This action only accepts a credit card.
- Refund a subscription payment. Use Refund a Transaction.
Related Actions
| Action Name | Description |
|---|---|
| Create Subscription | Creates the subscription and returns its ID. |
| Make a Payment with Credit Card | Charges a card once through Authorize.Net. |
| Refund a Transaction | Refunds an Authorize.Net transaction. |
| Run SQL Query | Looks up the saved subscription ID before the update. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| API Login ID | The API Login ID of the Authorize.Net account that owns the subscription. | Yes | empty string | Yes |
| Transaction Key | The Transaction Key that goes with the API Login ID. It's masked in the action editor. | Yes | empty string | Yes |
| Go Live | When checked, the request goes to the Authorize.Net production environment. When unchecked, it goes to the sandbox. It must match the environment the subscription was created in. | No | false | No |
| Subscription Id | The ID of the subscription to change, as returned by Create Subscription. | Yes | empty string | Yes |
| Card Number | The credit card number to bill from now on. Spaces and dashes are removed before it's sent. | Yes | empty string | Yes |
| Card CCV | The card's security code. | Yes | empty string | Yes |
| Subscription Name | A name for the subscription, shown in the Authorize.Net Merchant Interface. | Yes | empty string | No |
| Subscription Amount | The amount of each regular payment, with a decimal point and no currency symbol, for example 8.95. It must include tax, shipping and any other charges. | Yes | 0 | Yes |
| Subscription Trial Amount | The amount of each trial payment. It's only sent when Trial Occurrences is set and the amount is above 0. | Yes | 0 | No |
| Expiration Month | The card's expiration month, for example 7 or 07. A one-digit month gets a leading zero. | Yes | empty string | Yes |
| Expiration Year | The card's expiration year, for example 30 or 2030. Only the last two digits are sent. | Yes | empty string | Yes |
| Total Occurrences | The total number of payments, including trial payments. Use 9999 for no end date. | Yes | empty string | Yes |
| Trial Occurrences | How many of the first payments are billed at the trial amount. It's ignored when Total Occurrences is 9999. | Yes | 0 | No |
| First Name | The billing first name. | Yes | empty string | Yes |
| Last Name | The billing last name. | Yes | empty string | Yes |
| Country | The billing country. | Yes | empty string | No |
| State | The billing state or province. | Yes | empty string | No |
| City | The billing city. | Yes | empty string | No |
| Address | The billing street address. | Yes | empty string | No |
| Postal Code | The billing postal or ZIP code. | Yes | empty string | No |
| Company | The billing company name. | Yes | empty string | No |
| Response Result Code TokenName | The name of a token to store the result code in. See Output Parameters Reference. | No | empty string | No |
| Response Message TokenName | The name of a token to store the response message in. | No | empty string | No |
| Response Customer ProfileId TokenName | The name of a token to store the customer profile ID in. | No | empty string | No |
| Response Customer PaymentProfileId TokenName | The name of a token to store the customer payment profile ID in. | No | empty string | No |
| Response Customer Address Id TokenName | The name of a token to store the customer address ID in. | No | empty string | No |
| Response Ref Id TokenName | The name of a token to store the reference ID in. | No | empty string | No |
| Response SessionToken TokenName | The name of a token to store the session token in. | No | empty string | No |
| On Success | Actions that run when Authorize.Net accepts the update. | No | empty list | No |
| On Error | Actions that run when Authorize.Net rejects the update. | No | empty list | No |
Output Parameters Reference
Each token is only created if you enter a name for it. The tokens are set before On Success or On Error runs, so you can use them in both lists.
| Parameter | Description |
|---|---|
| Response Result Code TokenName | Ok if the subscription was updated, Error if it wasn't. |
| Response Message TokenName | The first message code and text from Authorize.Net, separated by two spaces, for example I00001 Successful. On an error, it tells you why. |
| Response Customer ProfileId TokenName | The ID of the customer profile linked to the subscription, if Authorize.Net returned one. |
| Response Customer PaymentProfileId TokenName | The ID of the customer payment profile, if Authorize.Net returned one. |
| Response Customer Address Id TokenName | The ID of the customer address, if Authorize.Net returned one. |
| Response Ref Id TokenName | The reference ID. The action doesn't send one, so it's normally empty. |
| Response SessionToken TokenName | The session token Authorize.Net returned, normally empty. |
The subscription ID doesn't change, so there's no token for it.
What happens when it runs
- The action sends the update to the sandbox or production environment, depending on
Go Live. Along with your values, it always sends a start date of tomorrow. - It stores the output tokens you named.
- If the result is
Ok, it runsOn Success. - If the result is
Error, for example because the subscription ID is wrong or a value is invalid, it runsOn Error. The action doesn't raise an error in this case, so put your error handling inOn Error.
If Authorize.Net doesn't answer at all, the action fails with an error. You can catch it with the On Error of an enclosing Execute Actions.
Considerations
- Send every value. The amount, card, expiration date, name and
Total Occurrencesare all required and all replace what's on the subscription. To change just the card, look up the current amount and number of payments first and pass them unchanged. Fill in the optional billing fields too if you want to keep them, because the update may clear them otherwise. - Start date. Authorize.Net only lets you change the start date before the first payment. The action always sends tomorrow's date, so test an update of a subscription that has already been billed in the sandbox before you rely on it.
- Trials. Authorize.Net only lets you change the trial before it starts. Leave
Trial Occurrencesempty if the trial has started or there isn't one. - Test in the sandbox first. Leave
Go Liveunchecked and use the sandbox account's credentials, with a subscription created in the sandbox. Authorize.Net's sandbox accepts test card numbers such as4111111111111111. - Keep credentials out of the action. Load the API Login ID and Transaction Key into tokens from a protected place, instead of typing them into each action.
- Card data and PCI. Your site receives and passes on the full card number and security code, so your site is in scope for PCI DSS. Use HTTPS, don't save card fields to your database, and don't log them. On success, the action saves the current tokens for 7 days, and these can include your form's card fields.
- Check who's asking. Anyone who can run the action with a subscription ID can change that subscription. Look up the ID from the signed-in user's record instead of taking it from a form field.
- Webhook notifications. On success, the action replaces the tokens that Create Subscription saved for its webhook notifications and keeps them for another 7 days. This action has no notification lists of its own, so test that the Create Subscription lists still run after an update.
Examples
To understand how to use the below examples, please see Running Examples.
1. Replace the card on a membership
This action puts a new card on the member's subscription in the sandbox. It assumes that earlier actions loaded the API credentials into [AnetLoginId] and [AnetTransactionKey], and the member's [SubscriptionId], [PlanAmount] and [TotalPayments] from your database. The form supplies the card and name fields. The condition skips the update if no subscription ID was found.
{
"Title": "Update Subscription",
"ActionType": "UpdateSubscription",
"Description": "Replace the card on the member's subscription",
"Condition": "\"[SubscriptionId]\" != \"\"",
"Parameters": {
"AuthorizeNetAPILoginID": "[AnetLoginId]",
"AuthorizeNetTransactionKey": "[AnetTransactionKey]",
"AuthorizeNetLiveMode": false,
"AuthorizeNetSubscriptionId": "[SubscriptionId]",
"AuthorizeNetCardNumber": "[CardNumber]",
"AuthorizeNetCCV": "[CardCode]",
"AuthorizeNetAmount": "[PlanAmount]",
"AuthorizeNetExpirationMonth": "[ExpMonth]",
"AuthorizeNetExpirationYear": "[ExpYear]",
"TotalOccurrences": "[TotalPayments]",
"AuthorizeNetFirstName": "[FirstName]",
"AuthorizeNetLastName": "[LastName]",
"AuthorizeNetResponseResultCodeTokenName": "AnetResult",
"AuthorizeNetResponseMessageTokenName": "AnetMessage",
"OnSuccess": [
{
"Title": "Display Message",
"ActionType": "ShowMessage",
"Parameters": {
"Message": "<p>Your card has been updated.</p>"
}
}
],
"OnError": [
{
"Title": "Display Error Message",
"ActionType": "ShowError",
"Parameters": {
"Message": "<p>We couldn't update your card: [AnetMessage]</p>"
}
}
]
}
}
Revised 09/27/2026