For the complete documentation index, see llms.txt. This page is also available as Markdown.

Re-send subscription activation keys

Use this method to send or re-send activation keys for a list of subscriptions. If no email is provided, messages get sent to the end user email set on each subscription.

Request parameters

Parameter
Type / Description

sessionID

Required (string) Session identifier, output of the Login method. An exception is thrown if the values are incorrect.

refNo

Required (string) The unique identifier of an order from the Avangate system.

subscriptionReferencesList

Required (stringArray) Array of subscription references for which activation keys will be sent. You can send keys for up to 50 subscriptions at once.

email

Optional (string) End user email address. Can be NULL.

Request sample

<?php

require ('PATH_TO_AUTH');  // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/02Authentication
require ('PATH_TO_setPartner'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/Partner/00Set_partner

$refNo = 'YOUR_ORDER_REFERENCE';
$subscriptionReferencesList = array('REFERENCE_1', 'REFERENCE_2');
$email = 'YOUR_EMAIL_ADDRESS';

$jsonRpcRequest = array (
  'jsonrpc' => '2.0',
  'id' => $i++,
  'method' => 'resendSubscriptionsActivationKeys ',
  'params' => array($sessionID, $refNo, $subscriptionReferencesList, $email)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));

Response parameters

Parameter
Type / Description

result

Boolean True or false

Errors

Error
Description

NOT_FOUND_PARTNER

A partner must be set first.

INVALID_ORDER

Order is not yet completed.

EMPTY_SUBSCRIPTION_REFERENCES_LIST

The subscription references list is empty.

INVALID_SUBSCRIPTION_REFERRENCE

The subscription reference is invalid.

INVALID_EMAIL

The email address is invalid.

Last updated

Was this helpful?