Skip to main content
Version: 1.28 (Current)

Update Subscription

Audience: Low-code Engineers, Software Developers

Skill 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.

note

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.
Action NameDescription
Create SubscriptionCreates the subscription and returns its ID.
Make a Payment with Credit CardCharges a card once through Authorize.Net.
Refund a TransactionRefunds an Authorize.Net transaction.
Run SQL QueryLooks up the saved subscription ID before the update.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
API Login IDThe API Login ID of the Authorize.Net account that owns the subscription.Yesempty stringYes
Transaction KeyThe Transaction Key that goes with the API Login ID. It's masked in the action editor.Yesempty stringYes
Go LiveWhen 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.NofalseNo
Subscription IdThe ID of the subscription to change, as returned by Create Subscription.Yesempty stringYes
Card NumberThe credit card number to bill from now on. Spaces and dashes are removed before it's sent.Yesempty stringYes
Card CCVThe card's security code.Yesempty stringYes
Subscription NameA name for the subscription, shown in the Authorize.Net Merchant Interface.Yesempty stringNo
Subscription AmountThe 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.Yes0Yes
Subscription Trial AmountThe amount of each trial payment. It's only sent when Trial Occurrences is set and the amount is above 0.Yes0No
Expiration MonthThe card's expiration month, for example 7 or 07. A one-digit month gets a leading zero.Yesempty stringYes
Expiration YearThe card's expiration year, for example 30 or 2030. Only the last two digits are sent.Yesempty stringYes
Total OccurrencesThe total number of payments, including trial payments. Use 9999 for no end date.Yesempty stringYes
Trial OccurrencesHow many of the first payments are billed at the trial amount. It's ignored when Total Occurrences is 9999.Yes0No
First NameThe billing first name.Yesempty stringYes
Last NameThe billing last name.Yesempty stringYes
CountryThe billing country.Yesempty stringNo
StateThe billing state or province.Yesempty stringNo
CityThe billing city.Yesempty stringNo
AddressThe billing street address.Yesempty stringNo
Postal CodeThe billing postal or ZIP code.Yesempty stringNo
CompanyThe billing company name.Yesempty stringNo
Response Result Code TokenNameThe name of a token to store the result code in. See Output Parameters Reference.Noempty stringNo
Response Message TokenNameThe name of a token to store the response message in.Noempty stringNo
Response Customer ProfileId TokenNameThe name of a token to store the customer profile ID in.Noempty stringNo
Response Customer PaymentProfileId TokenNameThe name of a token to store the customer payment profile ID in.Noempty stringNo
Response Customer Address Id TokenNameThe name of a token to store the customer address ID in.Noempty stringNo
Response Ref Id TokenNameThe name of a token to store the reference ID in.Noempty stringNo
Response SessionToken TokenNameThe name of a token to store the session token in.Noempty stringNo
On SuccessActions that run when Authorize.Net accepts the update.Noempty listNo
On ErrorActions that run when Authorize.Net rejects the update.Noempty listNo

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.

ParameterDescription
Response Result Code TokenNameOk if the subscription was updated, Error if it wasn't.
Response Message TokenNameThe 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 TokenNameThe ID of the customer profile linked to the subscription, if Authorize.Net returned one.
Response Customer PaymentProfileId TokenNameThe ID of the customer payment profile, if Authorize.Net returned one.
Response Customer Address Id TokenNameThe ID of the customer address, if Authorize.Net returned one.
Response Ref Id TokenNameThe reference ID. The action doesn't send one, so it's normally empty.
Response SessionToken TokenNameThe 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​

  1. 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.
  2. It stores the output tokens you named.
  3. If the result is Ok, it runs On Success.
  4. If the result is Error, for example because the subscription ID is wrong or a value is invalid, it runs On Error. The action doesn't raise an error in this case, so put your error handling in On 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 Occurrences are 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 Occurrences empty if the trial has started or there isn't one.
  • Test in the sandbox first. Leave Go Live unchecked and use the sandbox account's credentials, with a subscription created in the sandbox. Authorize.Net's sandbox accepts test card numbers such as 4111111111111111.
  • 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​

tip

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