Single Sign On
Create Single Sign On links into 2Checkout myAccount based on subscription references.
Unique, system-generated subscription identifier.
115D3F5ED1The 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
change_cardEnd user email address belonging to the customers associated with the subscription.
2Checkoutcustomer@email.comISO language codes for the product - ISO 639-1.
enThe time, in seconds, before the single sign-on URL expires. By default, the URL expires after 10 seconds.
25The IP address of the shopper, necessary for security purposes. Can be an empty string or a valid IP, or null.
127.0.0.1application/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"OK
Bad Request
GET /rest/6.0/subscriptions/{SubscriptionReference}/signon/{PageType}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
https://api.2checkout.org/myaccount/?login=41715b15b69dec74db4ad9895e47e956Overview
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.
9387f43c0c4d52d57f315ef1e3d1c87443f2f4d3application/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"OK
GET /rest/6.0/customers/?ssotoken=text HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
OK
{
"ExternalCustomerReference": "Customer127",
"FirstName": "John",
"LastName": "Doe",
"Company": "test company",
"FiscalCode": "",
"Address1": "Address details",
"Address2": "55",
"City": "London",
"State": "London",
"Zip": "WC1A1AH",
"CountryCode": "gb",
"Phone": "265897456",
"Fax": "",
"Email": "john.doe@example.com",
"ExistingCards": [],
"Enabled": false,
"Trial": false,
"CustomerReference": "423577932"
}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.
Internal 2Checkout customer reference or your customer identifier string
260015052The specific myAccount page you want the user to be redirected to. Possible values: index, my_subscription, user_data, order_lookup, faq, payment_methods
indexISO language codes for the product - ISO 639-1.
enThe time, in seconds, before the single sign-on URL expires. By default, the URL expires after 10 seconds.
25The IP address of the shopper, necessary for security purposes. Can be an empty string or a valid IP, or null.
127.0.0.1application/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"OK
GET /rest/6.0/customers/{CReference}/account/{PageType}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
OK
http://secure.avangate.org/myaccount/?login=38c6110c6c4305e2818425676c264e7eGenerate 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.
Internal 2Checkout customer reference or your customer identifier string
111222333The specific shopping cart page you want the user to be redirected to.
https://store.avancart.com/order/checkout.php?PRODS=1234567&QTY=1&CART=1&CARD=2The time, in seconds, before the single sign-on URL expires. By default, the URL expires after 10 seconds.
25The IP address of the shopper, necessary for security purposes. Can be an empty string or a valid IP, or null.
127.0.0.1application/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"OK
GET /rest/6.0/customers/{CReference}/cart/?Url=text HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
OK
https://store.avancart.com/order/checkout.php?PRODS=1234567&logintoken=f3387c386650eaedd21c6859b85c5d51df024dc4Last updated
Was this helpful?