Skip to main content

Assign Affiliate to Subscription

Assign the affiliate to the subscription.

Request Parametersapplication/json
AssignToSubscriptionRequestModel
object
affiliateAgreementId
integer
required
The ID of the agreement with your affiliate.
It can be found in your PayPro Global account > Affiliates > Agreements.
subscriptionId
integer
required
The subscription ID to which the affiliate should be assigned.
payAffiliateForPastCharges
boolean
Possible values are true or false.
If true, it calculates and pays the affiliate the commission
for the past subscription payments, false otherwise.
vendorAccountId
integer
required
The vendor account ID identifies your PayPro Global account.
It can be found in Account settings > Business info.
apiSecretKey
string
required
The vendor account API secret key is a unique key
that was generated specifically for authenticating API requests.
It can be found in Store settings > General settings > Integration tab.
Response Parametersapplication/json
AssignToSubscriptionResponseModel
object
changedItems
array[object]
itemId
integer
The item ID (in this case subscription ID) that has been updated.
isActionSuccess
boolean
Possible values are true or false. If true, the action was successful, false otherwise.
actionItemMessage
string
It displays the message in case isActionSuccess is false.
request
object
affiliateAgreementId
integer
The ID of the agreement with your affiliate.
It can be found in your PayPro Global account > Affiliates > Agreements.
subscriptionId
integer
The subscription ID to which the affiliate should be assigned.
payAffiliateForPastCharges
boolean
Possible values are true or false.
If true, it calculates and pays the affiliate the commission
for the past subscription payments, false otherwise.
vendorAccountId
integer
The vendor account ID identifies your PayPro Global account.
It can be found in Account settings > Business info.
apiSecretKey
string
The vendor account API secret key is a unique key
that was generated specifically for authenticating API requests.
It can be found in Store settings > General settings > Integration tab.
errors
array[object]
propertyWithError
string
propertyErrorMessages
array[string]
isSuccess
boolean
Request Sample:
{
"affiliateAgreementId": 1,
"subscriptionId": 954874,
"payAffiliateForPastCharges": true,
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
}
Response Sample:
{
"changedItems": [
{
"itemId": 1,
"isActionSuccess": true,
"actionItemMessage": "sample string 3"
},
{
"itemId": 1,
"isActionSuccess": true,
"actionItemMessage": "sample string 3"
}
],
"request": {
"affiliateAgreementId": 1,
"subscriptionId": 954874,
"payAffiliateForPastCharges": true,
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
},
"errors": [
{
"propertyWithError": "orderId",
"propertyErrorMessages": [
"Error message 1",
"Error message 2"
]
},
{
"propertyWithError": "orderId",
"propertyErrorMessages": [
"Error message 1",
"Error message 2"
]
}
],
"isSuccess": false
}