cancel
Showing results for 
Search instead for 
Did you mean: 

trialOccurrences and trialAmount update using ARBUpdateSubscriptionRequest

Hello team can we update trialOccurrences and trialAmount update subscription using ARBUpdateSubscriptionRequest, if so please suggest valid json format.

navya
Member
3 REPLIES 3

To update trialOccurrences and trialAmount in a subscription using the ARBUpdateSubscriptionRequest with Authorize.Net, you can send a JSON request including these fields under the paymentSchedule section of the subscription. Make sure to include your merchant authentication details, subscription ID, and the new values for trialOccurrences and trialAmount. For exact field names and format, refer to Authorize.Net's API documentation.

AreejAnjum
Member

Thanks For your response AreejAnjum i have tried it but am getting error -Your payment could not be processed because of error E00003: The element 'subscription' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'paymentSchedule' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'order, customer, billTo, shipTo, profile' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.

navya
Member

Hi @navya 

Here is the json request/response example of success updating trial data:

request

{
	"ARBUpdateSubscriptionRequest": {
		"merchantAuthentication": {
			"name": "${your_api_login_id}",
			"transactionKey": "${you_transaction_key}"
		},
		"refId": "123456",
		"subscriptionId": "9052227",
		"subscription": {
			"paymentSchedule": {
				"trialOccurrences": 1
			},
			"trialAmount": 1.00
		}
	}
}

response:

{
	"profile": {
		"customerProfileId": "515619158",
		"customerPaymentProfileId": "523840874"
	},
	"refId": "123456",
	"messages": {
		"resultCode": "Ok",
		"message": [
			{
				"code": "I00001",
				"text": "Successful."
			}
		]
	}
}
sera_nikulin
Contributor