- HTTP request
- Path parameters
- Request body
- Response body
- IntentPayload
- CreateSubscriptionIntent
- EntitleSubscriptionIntent
This API replaces user authorized OAuth consent based APIs (Create, Entitle). Generates a short-lived token for a user session based on the user intent. You can use the session token to redirect the user to Google to finish the signup flow. You can re-generate new session token repeatedly for the same request if necessary, regardless of the previous tokens being expired or not.
HTTP request
POST https://paymentsresellersubscription.googleapis.com/v1/{parent=partners/*}/userSessions:generate
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. The parent, the partner that can resell. Format: partners/{partner} |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"intentPayload": {
object ( |
Fields | |
---|---|
intent |
The user intent to generate the user session. |
Response body
[Preview only] Response that contains the details for generated user session.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"userSession": {
object ( |
Fields | |
---|---|
user |
The generated user session. The token size is proportional to the size of the intent payload. |
IntentPayload
The payload that describes the user intent.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field request . The intent types. request can be only one of the following: |
|
create |
The request to create a subscription. |
entitle |
The request to entitle a subscription. |
CreateSubscriptionIntent
Intent message for creating a Subscription resource.
JSON representation |
---|
{
"parent": string,
"subscription": {
object ( |
Fields | |
---|---|
parent |
Required. The parent resource name, which is the identifier of the partner. |
subscription |
Required. The Subscription to be created. |
subscription |
Required. Identifies the subscription resource on the Partner side. The value is restricted to 63 ASCII characters at the maximum. If a subscription was previously created with the same subscriptionId, we will directly return that one. |
EntitleSubscriptionIntent
Intent for entitling the previously provisioned subscription to an end user.
JSON representation |
---|
{ "name": string } |
Fields | |
---|---|
name |
Required. The name of the subscription resource that is entitled to the current end user. |