Single Sign On

Single Sign On by subscription reference

get

Create Single Sign On links into 2Checkout myAccount based on subscription references.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 115D3F5ED1
PageTypestringRequired

The specific myAccount page you want the user to be redirected to. Possible values: view_order, my_license, change_card, my_products, payment_methods, user_data, order_lookup, faq - default: index page

Example: change_card
Query parameters
EmailstringOptional

End user email address belonging to the customers associated with the subscription.

Example: [email protected]
LanguageCodestringOptional

ISO language codes for the product - ISO 639-1.

Example: en
ValidityTimeintegerOptional

The time, in seconds, before the single sign-on URL expires. By default, the URL expires after 10 seconds.

Example: 25
ValidationIpstringOptional

The IP address of the shopper, necessary for security purposes. Can be an empty string or a valid IP, or null.

Example: 127.0.0.1
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get
/subscriptions/{SubscriptionReference}/signon/{PageType}

Retrieve Single Sign On customer info by SSOToken

get

Overview

Retrieve the details of a customer entity from the 2Checkout system. Send the SSO token you create by generating tokenized cart payment links. Click here to learn how to generate a single-sign-on URL.

Here's an example of a single-sign-on URL:


https://store.YourCustomDomain.com/order/checkout.php?PRODS=1112233&logintoken=8b74ac97f8277654563c44da6915b054ba0d21be

The SSO token used for retrieving customer information is 8b74ac97f8277654563c44da6915b054ba0d21be.

Query parameters
ssotokenstringRequiredExample: 9387f43c0c4d52d57f315ef1e3d1c87443f2f4d3
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
ExternalCustomerReferencestringOptional
FirstNamestringOptional
LastNamestringOptional
CompanystringOptional
FiscalCodestringOptional
Address1stringOptional
Address2stringOptional
CitystringOptional
StatestringOptional
ZipstringOptional
CountryCodestringOptional
PhonestringOptional
FaxstringOptional
EmailstringOptional
ExistingCardsstring[]Optional
EnabledbooleanOptional
TrialbooleanOptional
LanguagestringOptional
CustomerReferencestringOptional
get
/customers
200

OK

Single Sign On by customer reference

get

Overview

Create Single Sign On links into 2Checkout myAccount based on customer references (IDs). Use either the 2Checkout Customer Reference or the External Customer Reference to identify specific customers.

Path parameters
CReferencestringRequired

Internal 2Checkout customer reference or your customer identifier string

Example: 260015052
PageTypestringRequired

The specific myAccount page you want the user to be redirected to. Possible values: index, my_subscription, user_data, order_lookup, faq, payment_methods

Example: index
Query parameters
LangstringOptional

ISO language codes for the product - ISO 639-1.

Example: en
ValidityTimestringOptional

The time, in seconds, before the single sign-on URL expires. By default, the URL expires after 10 seconds.

Example: 25
ValidationIpstringOptional

The IP address of the shopper, necessary for security purposes. Can be an empty string or a valid IP, or null.

Example: 127.0.0.1
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get
/customers/{CReference}/account/{PageType}
200

OK

Single Sign On in cart

get

Generate tokenized payment links for returning customers, and display their previously used credit cards in the shopping cart, along with their prefilled billing information. 2Checkout attaches a unique token to links, designed to identify the returning shoppers and support the automatic extraction of payment data and billing information from the 2Checkout system. For example, you can generate single sign on in cart links for existing customers logged into your website based on their external or 2Checkout customer IDs.

Path parameters
CReferencestringRequired

Internal 2Checkout customer reference or your customer identifier string

Example: 111222333
Query parameters
UrlstringRequired

The specific shopping cart page you want the user to be redirected to.

Example: https://store.avancart.com/order/checkout.php?PRODS=1234567&QTY=1&CART=1&CARD=2
ValidityTimenumberOptional

The time, in seconds, before the single sign-on URL expires. By default, the URL expires after 10 seconds.

Example: 25
ValidationIpstringOptional

The IP address of the shopper, necessary for security purposes. Can be an empty string or a valid IP, or null.

Example: 127.0.0.1
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get
/customers/{CReference}/cart
200

OK

Last updated

Was this helpful?