Welcome to SubscriptionPro, Unlock recurring savings and never pay full price again! This documentation will guide digital service providers through the process of integrating your products with SubscriptionPro to offer a seamless experience to users.
Visit SubscriptionPro and sign up as a merchant.
Production Server:
BASEURL: https://customer.subscriptionpro.co/api/v1/
After signing in, navigate to the profile page (click the top right corner profile icon) to provide basic company information, including name, logo, description, phone, and email.
On the profile page under the settings section, find your token_key. This key will be used to make API requests to SubscriptionPro and authorize incoming requests from SubscriptonPro to your webhook.
Note: Use API keys to authenticate API requests
Product Unique ID: It should be a unique id/code that can be used to identify your specific product even if you have multiple products. It should be unique for each product.
Suggestion: Your company name’s shortcode + Your product’s 3-5 character shortcode + Product released date (year’s last two digits + month’s last two digits)
Example: spwpa2311
Integration Page URL: This will be the URL of the page at which the user will be redirected once they click on the connect button along with some params like product_identifier, user_token and you can authenticate the user and send the user’s subscription info to us)
Suggestion: This is your application’s page, where users will be able to see to allow SubscriptionPro to connect.
There will be two options, one is allow and another would be cancel or disallow.
Example: https://app.wpannouncement.com/subscriptionpro/connect
Note: After successful integration, inform SubscriptionPro to review your integration. To review your application, share test credentials.
SubscriptionPro will review and approve your product, making it visible to users.
Learn more about error codes and how to resolve them.
Note: We follow standard HTTP status codes to handle errors and responses.
Code | Name |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
502 | Bad Gateway |
503 | Service Unavailable |
504 | Gateway Timeout |
Param | Type | Example |
---|---|---|
access_token | string | OYraftTragaergPfcCixg5w5eR |
user_token | string | ZXlKcGRpSTZJbGhIU1ZoaGEydEtSMlZZTlhS... |
product_identifier | string | wpatr234 (lowercase) |
plan_id | integer | 26 |
plan_type | string | monthly/yearly (lowercase - no space allowed) |
price | float | 54.98 (USD amount) |
status | string | active/inactive (lowercase) |
started_at | datetime | 2023-11-11 16:29:50 (24 hours - YYYY-MM-DD HH:MM:SS) |
expire_at | datetime | 2023-11-11 16:29:50 (24 hours - YYYY-MM-DD HH:MM:SS) |
api-key | string | ZXlKcGRpSTZJbGhIU1ZoaGEydEtSMlZZTlhS... |
amount | float | 65.00 (USD amount) |
transaction_id | big integer | 123456 |
product_identifier: Your unique Product ID to differentiate between multiple products.
After validating the user’s authentication and retrieving their subscription info, send subscription data to SubscriptionPro using a POST request to BASEURL + Route in the following format (Make sure to stop auto-renewal from your platform since the user will manage it from SubscriptionPro)
Header:
api-key: <your token_key> Get it from your merchant profile
Method: POST
Route: order/product
Complete Endpoint: https://customer.subscriptionpro.co/api/v1/order/product
{ "access_token": "your_generated_access_token", "user_token": "user_token from the url params", "product_identifier": "product_identifier", "plan_id": "plan_id", "plan_type": "plan_type", "price": "price in USD", "status": "active", "started_at": "started_at", "expire_at": "expire_at" }
Header:
api-key: <your token_key> Get it from your merchant profile
Method: POST
Route: Your webhook URL
Complete Endpoint: https://app.wpannouncement.com/subscriptionpro/notify
{ "access_token": "your_generated_access_token", "product_identifier": "product_identifier", "amount": "amount in USD", "transaction_id" : "User’s payment id" }
Monitor the SubscriptionPro dashboard to track subscription amounts for your users. Withdraw these amounts from your merchant account within SubscriptionPro.
That’s it! You’re now integrated with SubscriptionPro, offering users a centralized platform for managing their subscriptions. For any further assistance, contact our support team at rasel@subscriptionpro.xyz