registerSubscription()


Method can be used only with client-side payment process.

Method provides entitlement to your subscription offer for given customer.

Parameters:

Name Type Description
publisherToken string You can find your publisher token at api-keys page
customerEmail string Email provided by customer
offerId string ID of the subscription offer
-paymentGateway string Parameter requires additional configuration. Contact us for its value
-paymentMethod string Parameter requires additional configuration. Contact us for its value
paymentMethodSpecificParams string Additional payment parameters (depend on paymentMethod)
paymentExternalId string External ID of the payment

- required parameter

Response Parameters:

Name Type Description
success boolean true/false information about registration success

Error Codes:

Code Description
3 Publisher token is invalid
4 Offer offerId does not exist
10 Customer customerEmail is not associated with your account or doesn't exist

Request:

[
    {
        "method": "registerSubscription",
        "params": {
            "publisherToken": "Ilrx-SjTLVMCsaRsOf2q2hvWKOlrF57yHknDRRRMX-13Fz-x",
            "customerEmail": "example@email.com",
            "offerId": "S123123123_US",
            "paymentGateway": "free-isp",
            "paymentMethod": "free-isp",
            "paymentMethodSpecificParams": [],
            "paymentExternalId": null
        },
        "jsonrpc": "2.0",
        "id": 1
    }
]

Response:

[
    {
        "result": {
            "success": true
        },
        "id": "1",
        "jsonrpc": "2.0"
    }
]

Remember! you can always check it by yourself using API Console - registerSubscription()

Back to Subscription Offers