You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 3rd Party Payment Provider & Subscription Management Quickstart
8
9
9
10
What does this solution do?
10
11
Zype provides an effective way of importing and managing an external database of consumers within the Zype platform. This is useful if you are using a 3rd party payment processor to sell subscriptions or a 3rd party CRM tool to manage your customer database and would also like to import and track these customers in the Zype platform.
11
-
12
+
12
13
Once imported into the Zype platform, benefits include ensuring these customers have access to content across all of your distribution endpoints via Universal login.
13
-
14
+
14
15
This workflow involves use of Zype’s Consumer, Subscription, and Linked Devices APIs. This document provides details on how to integrate subscription customers and transactions processed via 3rd party payment processors.
15
16
16
17
@@ -29,46 +30,46 @@ In order to utilize Zype’s RESTful API service to implement 3rd party payment
29
30
Importing and managing consumers and subscriptions stored in a 3rd party database is easy to do with Zype, typically requiring only three steps:
30
31
31
32
1. Create a consumer user in your own platform’s database
32
-
33
+
33
34
2. Create corresponding Zype consumer user to match to your database consumer
34
-
35
+
35
36
3. Create a subscription for the Zype consumer
36
37
37
38
### Step 1: Create a consumer user in your own platform’s database
38
39
39
40
Consumers are used to represent users in the Zype platform. Consumer records can be used to store basic user login information, including email, name and password. Consumers can also be used to store subscription information, and if credentials are supplied, process payments and subscriptions from Stripe or Braintree.
40
-
41
+
41
42
Creating a consumer user in your database is typically handled prior to transaction processing, during your account sign up or account creation flow. This is not dependent on the Zype platform, but is required for importing or creating a consumer record in the Zype database.
42
43
43
44
### Step 2: Create the corresponding consumer user in Zype
44
45
45
46
Once you’ve created a consumer in your database, you should also create a consumer in the Zype platform via our Consumer API. This will ensure that you can track all consumers who are creating accounts via your 3rd party payment processors or CRMs, and that those consumers can have access to any subscription content they purchase directly through you.
46
-
47
+
47
48
Consumer objects are generally used in the following ways in the Zype platform:
48
49
49
50
* To store subscription, transaction, entitlement, and payment information about users.
50
51
* To enable linking a device for the user in order to access content on one of your OTT endpoints.
51
52
* To optionally provide login capabilities for your platform. Depending on your use case this may not be required, but if you’d like to utilize login capabilities simply provide a password for consumers when they are created.
52
53
53
54
The minimum required fields to create a user is their email address. You can also supply additional information including the consumer’s name, birthday, or gender by supplying values in the POST request. Although optional, typically all consumer objects include passwords upon creation (to enable login / authentication across your content distribution endpoints).
54
-
55
+
55
56
Once you create a consumer in Zype, you’ll want to create a relational record for the consumer between Zype and your own database. We suggest using the Zype consumer ID for this purpose. The consumer ID of a Zype created consumer is returned upon successful creation via API. (example consumer_id value: 54579a634c61450389000000)
56
-
57
-
To create consumers via API, you will need to supply your admin API key in the API request.
57
+
58
+
To create consumers via API, you will need to supply your admin API key in the API request.
For a full listed of supported API commands please visit our API documentation: [Zype Consumer API Documentation](http://dev.zype.com/api_docs/consumers/)
86
87
87
88
88
89
### Step 3: Create a subscription for a Zype consumer
89
90
90
-
Subscriptions are used to track that a consumer has subscribed to content on your platform and should have entitlement to your premium subscription library. There are three types of subscriptions available: Basic, Stripe or Braintree.
91
-
91
+
Subscriptions are used to track that a consumer has subscribed to content on your platform and should have entitlement to your premium subscription library. There are three types of subscriptions available: Basic, Stripe or Braintree.
92
+
92
93
Basic subscriptions are used to indicate that a user has subscribed to your content without having a Zype integrated payment provider to process payment. For any subscriptions purchased through your 3rd party payment processor, you’ll create Basic subscriptions via Zype’s Subscription API.
93
94
94
95
Stripe and Braintree subscriptions require a payment token be provided from the respective provider when creating the subscription. Zype will then process the payment through the respective provider on your behalf.
95
-
96
+
96
97
Subscriptions should be created after your users has provided payment details. If you would like to manage payment processing yourself use a “basic” subscription which will only track that a user is subscribed to a plan. Stripe or Braintree subscriptions can be utilized if you have Zype manage subscriptions on your behalf via our embeddable widgets.
97
-
98
+
98
99
Once a consumer purchases via your 3rd party payment processor, you’ll want to create a Basic subscription in the Zype platform. After creating the Basic subscription, you should create a relational record between the subscription record in Zype and your own database. We suggest using the Zype subscription ID for this purpose. The subscription ID of a Zype created subscription is returned upon successful creation of the subscription. (example subscription_id: 54579a634c61450389000000)
99
-
100
+
100
101
To create subscriptions you will need to supply your admin API key in the API request. You will also need to have a consumer and plan set up in the Zype platform to subscribe to.
101
102
102
103
Subscription API Endpoint
103
-
POST - https://api.zype.com/subscriptions
104
-
104
+
POST - https://api.zype.com/subscriptions
105
+
105
106
Example Request:
106
-
{% highlight xml %}
107
+
{% highlight xml %}
107
108
curl https://api.zype.com/subscriptions\
108
109
-d api_key="[YOUR ADMIN KEY]" \
109
110
-d subscription[third_party_id]=[THIRD PARTY ID IN YOUR PLAN]\
0 commit comments