Skip to main content

Add an AfterSale message for your shoppers

Overview

Add a custom HTML formatted text to the last stage of the ordering process (the Thank You page - finish.php), engaging shoppers directly after payment confirmation (transaction was authorized successfully). Insert special variables including first and last name, email, order reference, total value and currency using the buttons above the custom AfterSale Message field.

Use the Tracking Script area to include external scripts (such as Google Analytics) for an advanced feedback monitoring of sales, cart visitors and tracking of customer conversion rates.

Availability

  1. AfterSale messages for the desktop version of the shopping cart are available for all 2Checkout accounts.
  2. Setting AfterSale messages for mobile users requires an account with the 2Checkout shopping cart activated. Contact 2Checkout directly for more details.

What is the AfterSale message?

You can use this feature to reach out to shoppers who successfully placed an order with personalized messaging.

When is the AfterSale message displayed to shoppers?

The AfterSale Message is displayed to customers only after they successfully place an order.

  • Payment needs to be authorized successfully. This usually happens for online payment methods that are authorized instantaneously, such as credit/debit cards and PayPal.
  • Payment needs to go through without any problems or errors.

How do AfterSale Messages work?

  1. Go to Dashboard →Setup → Ordering Options →​​​​​​​ AfterSale Message.
  2. Select the type of platform you want the message to be displayed for. AfterSale Messages need to be defined for each platform separately:
    • Desktop
    • Mobile
  3. Use the Special Variables buttons to insert custom variables identifying the shopper placing the order, such as first and last name, email address, order reference number, total value, currency. Below is an example of an AfterSale Message.
  4. You can use HTML formatting and tags and edit the code directly. You also have the option of previewing your message using the Preview button.
  5. Select the language for your message. Use the Apply for all languages option to set the same message for all languages available for your account. Customers using a language for which you did not set an AfterSale message will not be offered the special messaging.
  6. To edit AfterSale Messages, you need to edit each item individually. Selecting the Apply for all languages option will overwrite all existing messages with the latest text you supply.
  7. Click Save message.

aftersale message_2.png

AfterSale Message example

Dear Mr./Mrs. <--{FIRST_NAME}--> <--{LAST_NAME}-->,
<p>Thank you for choosing our services! </p>
<p>Your order reference number is <--{REFNO}--> with a total amount of
<--{TOTAL}--> <--{CURRENCY}-->.
Your e-mail address used for this order is <--{EMAIL}--> </p>

Display the AfterSale message for all orders

By default, the after-sale message is displayed only for orders with payments authorized instantly (this includes usually credit cards and PayPal), after the payment is complete (transaction needs to be authorized successfully). To display the message for all placed orders regardless of the payment status:

  1. Go to Dashboard →​​​​​​​Setup →​​​​​​​ Ordering Options.
  2. Scroll down to the bottom of the Order settings area and check the checkbox for the Show message for all placed orders option.
  3. Click Save Settings.

The message will be displayed even for orders where the payment is not yet received (like bank transfers or checks).

aftersale message_3.png

FAQ

Is there a way to bypass the Thank You page and not display the AfterSale Message?

Yes. If you use a Redirect URL when generating buy-links, i.e. including the BACK_REF parameter in buy-links together with a specific URL where shoppers are redirected after placing the order. Shoppers will be redirected to this URL after the payment is confirmed. The redirect URL replaces the default 'Thank you' page (except for offline payment methods such as Bank Transfer).

Free trial download expiration

Use the variables in the list below to customize the Free trial download expiration shopper email according to your needs. Check the 'Mandatory' column to see the variables that are required in your customized version of the e-mail.

Variable name Description Test value Mandatory
AVANGATE_LOGO Avangate logo URL https://secure.avangate.com/images/e...endor_logo.png Yes
BUSINESS_COMPANY Avangate company name Avangate Yes

BUSINESS_OPEMAIL

Avangate operational email address

support@avangate.com

No

BUY_NOW_LINK

Short version of renewal buy link (prefilled with shopper information)

https://secure.avangate.com/order/ch..._ID=xxxxxxxxxx

No

BUY_NOW_LINK_RAW

Renewal link prefilled with shopper information (long version)

0

No

DISCOUNT_TYPE

Promotion discount type: percentage or fixed

%]

No
EXPIRATIONDATE Subscription expiration date [trial expiration date] Yes

ENCRYPTED_MERCHANT_CODE

Encrypted merchant code

0

No

FIRSTNAME

Shopper's first name used on the delivery information

[John

No
FULL_PRICE Total price with currency. [product price with currency] Yes

HAPPY_HOURS

Promotion length (hours)

0

No

ID_ACCOUNT

0

0

No

LASTNAME

Shopper's last name used on the delivery information

Doe]

No
MYACCOUNT_URL URL for myAccount. To the BASE_URL we add /myaccount/ https://secure.avangate.com/myaccoun...m&k=xxxxxxxxxx Yes

PRODUCTS

0

0

No

PRODUCTS[index1].CURRENCY

Currency applied to the abandoned cart

USD

No

PRODUCTS[index1].HAS_PROMOTIONAL_PRICE

Indicates whether the product is included in a lead management discount campaign

0

No

PRODUCTS[index1].PRICE_CURRENCY

0

0

No

PRODUCTS[index1].PRODUCT_IMAGE

0

0

No

PRODUCTS[index1].PROMOTIONAL_PRICE

Price of the product discounted as per lead management promotion campaign

8.5

No

PRODUCTS[index1].REGULAR_PRICE

Catalog price for the product included in the abandoned cart

10

No

PRODUCTS[index1].SHORT_DESCRIPTION

Short product description

0

No

PRODUCTS_DATA

0

0

No

PRODUCTS_DATA[index1].IdProduct

Product ID number

123456

No

PRODUCTS_DATA[index1].PRICE_CURRENCY

Currency applied to the abandoned cart

USD

No

PRODUCTS_DATA[index1].PRODUCT_NAME

0

[Test product name]

No

PRODUCTS_DATA[index1].PRODUCT_SHORT_DESCRIPTION

Short product description

[Product short description]

No

PRODUCTS_DATA[index1].PROMOTIONAL_PRICE

Price of the product discounted as per lead management promotion campaign

8.5

No

PRODUCTS_DATA[index1].REGULAR_PRICE

Catalog price for the product included in the abandoned cart

10

No

PRODUCT_NAME

The name of the renewal product

[Test product name]

Yes

PROMOTION_COUPON

Discount coupon (if applicable)

0

No

PROMOTION_DISCOUNT

Value of the promotional discount associated to the lead management campaign. Use it in conjunction with DISCOUNT_TYPE

[15

No

RETRYLINK

Payment retry link

0

No

RETRY_LINK

Payment retry link

0

No

SELLERCOMPANY

Merchant's company name

[Software Company Name]

No

UNSUBSCRIBE_LINK

Shopper unsubscribe link

https://secure.avangate.com/order/un...p?q=xxxxxxxxxx

No

UPLOADLINK

File upload link

0

No

UPLOAD_LINK

File upload link

0

No

WEBSITE

Website where the shopper placed the order

http://www.software-company-website.com

No

Subscription history

Overview

The object below is returned directly or within a successful response from the following API requests:

Retrieve subscription history

Subscription history object

Parameters Type/Description
SubscriptionObject Array of Objects

ReferenceNo

String

 

Unique, system-generated order reference number.

Type

String

 

Purchase type:

  • SALE
  • RENEWAL
  • UPGRADE

SubscriptionReference

String

 

Unique, system-generated subscription reference.

StartDate

String

 

Subscription start date(YYYY-MM-DD) - StartDate is mandatory when importing subscription data. If you changed the time zone for the 2Checkout API by editing system settings under Account settings, then the StartDate you provide must be in accordance with your custom configuration.

ExpirationDate

String

 

Subscription expiration date(YYYY-MM-DD) - ExpirationDate is mandatory when importing subscription data. If you changed the time zone for the 2Checkout API by editing system settings under Account settings, then the ExpirationDate you provide must be in accordance with your custom configuration.

Lifetime

Boolean

 

Possible values:

  • True – the subscription is evergreen

False – the subscription has a recurring billing cycle less than or equal to three years.

SKU

String

 

Stock keeping unit you defined.

DeliveryInfo

Object

 

Object with information about the delivery made to the customer - structure described below

PartnerCode

String

 

Possible values:

  • Empty = ecommerce order
  • Partner Code

Subscription upgrade

Overview

The object below is returned directly or within a successful response from the following API requests:

Retrieve upgrade options

Subscription upgrade object

Parameters Type/Description

ProductInfo

Object

               

Details below.

 

ProductId

Int

 

 

Unique, system-generated product identifier belonging to the upgrade product.

 

ProductCode

String

 

 

Unique product identifier that you control belonging to the upgrade product.

 

ProductName

String

 

 

Product name

 

ProductVersion

String

 

 

The product version number that you control.

 

ProductEnabled

Boolean

 

 

Possible values:

0 – You disabled this product.

1 – You enabled this product.

 

ProductType

String

 

 

REGULAR or BUNDLE

 

Currency

String

 

 

The currency for prices. The currency ISO code used for the payment - ISO 4217.

 

DefaultCurrency

String

 

 

The product's default currency which is set in the Control Panel. The currency ISO code to be used for the payment - ISO 4217.

 

Price

Double

 

 

Product price. Can be null for flat pricing schemes. You need to call getPrice with Quantity, Currency and Price Options parameters to get a valid price.

 

GiftOption

String

 

 

True or false depending on whether the product can be gifted or not.

 

IdGroup

Int

 

 

Product Group ID number.

 

GroupName

String

 

 

The name of the Product Group.

 

ShortDescription

String

 

 

The product's short description.

 

ProductImage

String

 

 

URLs to the product images uploaded into the Avangate platform.

 

Languages

Array of strings

 

 

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

 

PriceIntervals

Array of objects

 

 

Pricing intervals.

 

PriceType

String

 

 

NET or GROSS

 

PriceSchema

String

 

 

FLAT or DYNAMIC

Quantity

Int

 

Number of units available for the upgrade order.

PriceOptions

Array of objects

 

Details below.

 

Id

String

 

 

Pricing options ID.

 

Name

String

 

 

Pricing options group name.

 

Description

String

 

 

The description of the Pricing options group

 

Required

Boolean

 

 

True or False depending on whether you set the Pricing options group asrequired or not.

 

Type

String

 

 

Pricing options group type:

  • COMBO
  • CHECKBOX
  • RADIO

INTERVAL

 

Options

Array of objects

 

 

Details below.

 

 

Name

String

 

 

 

The name of the option inside the Pricing options group

 

 

Value

String

 

 

 

The code of the option inside the Pricing options group

 

 

Default

Boolean

 

 

 

True or false.

 

 

Description

String

 

 

 

The description of the option inside the Pricing options group.

 

 

MinValue

Int

 

 

 

Start value of a scale interval.

 

 

MaxValue

Int

 

 

 

End value of a scale interval.

Single Sign On (SSO)

Overview

Redirect and login shoppers automatically from your user portal into their 2Checkout myAccount based on subscription or customer information.

Requirements

You need a custom domain to use Single Sign On. Contact 2Checkout directly for guidance on how to set up a custom domain.

 

 

Subscription history

Overview

Retrieve information about a subscription's history.

Use the API methods displayed below to extend or renew a subscription.

 

 

Single Sign On (SSO)

Overview

Redirect and login shoppers automatically from your user portal into their customer myAccount based on subscription or customer information.

Requirements

You need a custom domain to use Single Sign-On. Contact 2Checkout directly for guidance on how to set up a custom domain.

 

Subscription import

Overview

Add/import subscriptions in the Avangate system.

 

Include card data with your subscription import only if you contacted Avangate to enable this functionality for your account. Otherwise, the import process results in a failure. Contact Avangate or your account manager directly for more details.

ATTRIBUTES

Parameters Type/Description

ExternalSubscriptionReference

Required (string)

 

Unique identifier for your subscription. Mandatory when importing subscription data.

StartDate

Required (string)

 

Subscription start date(YYYY-MM-DD) - StartDate is mandatory when importing subscription data. If you changed the time zone for the Avangate API by editing system settings under Account settings, then the StartDate you provide must be in accordance with your custom configuration.

ExpirationDate

Required (string)

 

Subscription expiration date(YYYY-MM-DD) - ExpirationDate is mandatory when importing subscription data. If you changed the time zone for the Avangate API by editing system settings under Account settings, then the ExpirationDate you provide must be in accordance with your custom configuration.

Product

Required (object)

 

The product for which Avangate generated the subscription. Details below.

 

ProductCode

String

 

 

Unique product identifier that you control.

 

ProductId

Int

 

 

Unique, system-generated product identifier.

 

ProductName

String

 

 

Product name.

 

ProductQuantity

Int

 

 

Ordered number of units.

 

ProductVersion

String

 

 

Product version.

 

PriceOptionCodes

Array

 

 

The product options codes the customer selected when acquiring the subscription. Pricing options codes are case sensitive.

EndUser

Required (object)

 

The end user of the subscription. Details below.

 

Person

Object

 

 

FirstName

String

 

 

 

End user's first name

 

 

LastName

String

 

 

 

End user's last name

 

 

CountryCode

String

 

 

 

End user country code [ISO3166-1 Alpha 2].

 

 

State

String

 

 

 

End user state.

 

 

City

String

 

 

 

End user city.

 

 

Address1

String

 

 

 

End user first address line.

 

 

Address2

String

 

 

 

End user second address line.

 

 

Zip

String

 

 

 

End user zip code.

 

 

Email

String

 

 

 

End user email address.

 

 

Phone

String

 

 

 

End user phone number.

 

 

Company

String

 

 

 

Company name.

 

Fax

String

 

 

End user fax.

 

Language

String

 

 

Language [ISO639-2] the Avangate system uses for communications.

DeliveryInfo

Optional (object)

 

The object contains information about the delivery/fulfillment made to the customer.

 

Description

String

 

 

Delivery description.

 

Codes

Array of objects

 

 

Code

String

 

 

 

Delivered activation key/code.

 

 

Description

String

 

 

 

Code description for dynamic lists from your key generator. 

 

 

ExtraInfo

Object

 

 

 

Info set by your key generator for dynamic lists only.

 

 

 

CodeExtraInfo

Object

 

 

 

Type

String

 

 

 

Label

String

 

 

 

Value

String

 

 

File

Array of objects

 

 

 

Content

String

 

 

 

 

Content of the file (base64 encoded).

 

 

 

ContentLength

Int

 

 

 

 

File size.

 

 

 

Filename

String

 

 

 

 

The name of the delivered file.

 

 

 

FileType

String

 

 

 

 

The type of the delivered file.

PartnerCode

Optional (string)

 

  • Empty: for ecommerce orders
  • Partner Code (mandatory)

ExternalCustomerReference

Optional (string)

 

Customer identifier you control.

SubscriptionValue

Optional (double)

 

Subscription value. The total costs incurred by the customer through the lifecycle of the subscription before you imported the item into the Avangate system.

When you send this parameter you must accompany it by ValueCurrency.

SubscriptionValueCurrency

Optional (string)

 

Mandatory when you also send the Value parameter. The currency associated to the subscription value.

AdditionalInfo

Optional (string)

 

Extra information that you can attach to a subscription, such as the source of the initial purchase.

NextRenewalPrice

Optional (double)

 

The future costs that subscribers would incur when their subscriptions are renewed. When provided, you must accompany it by NextRenewalPriceCurrency and CustomPriceBillingCyclesLeft.

NextRenewalPriceCurrency

Optional (string)

 

Mandatory when you send CustomPriceBillingCyclesLeft. The currency associated with the subscription next renewal price value.

CustomPriceBillingCyclesLeft

Optional (string)

 

Mandatory when you send NextRenewalPrice. Avangate applies the next renewal price to the number of billing cycles you define.

CardPayment

Optional (object)

 

Include payment (credit/debit card) information that Avangate uses for recurring billing to renew imported subscriptions. Importing subscriptions with payment data is available only to eligible Avangate accounts. Contact Avangate directly for additional details.

 Card payment

Add credit/debit card details when importing subscriptions. Avangate uses payment information in the recurring billing process.

For imports of test subscriptions, use the credit card information from this article.`

CardPayment Object

CardNumber

Required (string)

 

The credit/debit card number.

CardType

Required (string)

 

VISA, VISAELECTRON, MASTERCARD, MAESTRO, AMEX, DISCOVER, DANKORT, CARTEBLEUE, JCB.

ExpirationYear

Required (string)

 

The year in which the card expires.

ExpirationMonth

Required (string)

 

The month in which the card expires.

HolderName

Required (string)

 

Card holder name.

CCID

Required (string)

 

Credit Card Identification - an extra ID printed on the card, usually a 3-4 digit number, the CVC2/CVV2.

HolderNameTime

Required (int)

 

The interval of time in seconds in which shoppers enter their name in the HolderName field. An abnormally short interval is usually a red flag for fraud attempts.

AutoRenewal

Optional (bool)

 

True or false, depending on whether the customer or you enabled or disabled subscription auto-renewals.

CardNumberTime

Optional (int)

 

The interval of time in seconds in which shopper enter their card number in the CardNumber field. An abnormally short interval is usually a red flag for fraud attempts.

Can be NULL, but not a negative number.

 

 

Custom store domain for the checkout process

Overview

Use a custom domain to increase your conversion rate:

  • Provide your shoppers with a seamless transition from your store or website to checkout. 
  • Give customers a sense of extra security during the checkout process by purchasing a store domain and SSL certificate.  
  • Enhance the shopping cart experience with your custom branding elements.

A custom store domain allows you to change the URL of your checkout pages from secure.2checkout.com to mystore.mycompany.com.

Requirements

Contact 2Checkout for availability.

Set up a store domain

To set up a custom store domain, follow these steps:

1. Contact 2Checkout to request a custom domain and choose a domain name.

Contact our Sales team to discuss the terms of your custom domain agreement. Don't forget to choose a domain name for your online store. Most common examples of online store web addresses are:

2. Provide your company details.

Following your discussion with our Sales team, send the following company information to our Merchant Support team. This information is used by 2Checkout to generate a Certificate Signing Request (CSR) on your behalf, as the certificate will be hosted on our server. Make sure that the data sent is correct, as it will be included in the CSR file. The information will be validated by the Certificate Authority before the SSL certificate is sold to you.

  • Certificates shall be purchased from Certificate Authorities trusted by your customer’s browsers.   Such authorities are commonly referred to as “Public” Authorities. and some examples are listed  here.
  • Certificates shall contain the full hostname of the target, such as store.yourdomain.com.  “Wildcard” certificates are not supported.
  • Certificate validity should be for 1 year, as browsers have started to not trust certificates with a longer duration.
Information Details

2Checkout merchant code

2Checkout generated merchant code. Can be found in Cpanel > System settings.

Company name

Your company name.

Address

The address of your company.

City

City in which your company is located.

Zip code

Zip code corresponding to the area in which your company is located.

Country

Country in which your company is located.

State

State in which your company is located. Use N/A if it doesn’t apply.

Desired URL

Your desired custom store domain name. E.q.: https://secure.myshop.com

3. 2Checkout generates private and public keys and the CSR.

2Checkout uses the information mentioned above to generate the private and public keys as well as the Certificate Signing Request (CSR) necessary to acquire a Secure Sockets Layer (SSL) Certificate from a Certificate Authority. The CSR file generated by 2Checkout will be e-mailed to you by our Vendor Support team, together with instructions on your next steps.

SSL certificates act as a method of securing data transmissions, including sensitive details such as payment information.
While the public key and CSR are shared with you, the private key will be stored only inside 2Checkout’s secure environment, ensuring that SSL security cannot be compromised. 2Checkout ongoing investment in security is reflected by the PCI DSS Certification received yearly.

2Checkout does not accept and will not use SSL certificates purchased based on private/public keys and CSRs you generate yourself or which have been previously used. Custom domains and associated SSL certificates can be used only if 2Checkout is the sole keeper of private keys.

4. Purchase the SSL certificate using the 2Checkout generated CSR.

Use the CSR file provided by 2Checkout to acquire an SSL certificate from your preferred CA. If at any time during the purchase process you’re asked about the server platform type, choose Apache.
When purchasing an SSL certificate you are responsible for:

  • Deciding which Certificate Authority to buy it from. We recommend one of the following providers:
  • Choosing the type of SSL certificate:
    • Extended Validation (EV) SSL Certificate – complex and extensive vetting of your company per the EV Guidelines ratified by the CA/Browser forum in 2007. This is the only type of SSL certificate providing visual feedback to browser users by turning the address bar green for valid EV SSL certificates or red for untrustworthy sites.
    • Organization Validation (OV) SSL Certificate – the CA checks to see if your company is a legitimate business by verifying your credentials and if you have the right to use the domain name.
    • Domain Validation (DV) SSL Certificate – only name and contact information are checked to see if you have the right to use the domain name.

5. Send the SSL certificate to 2Checkout

Send the SSL certificate by email to supportplus@2checkout.com. 2Checkout will finalize the setup of the custom domain and install the certificate.

6. Update the DNS and buy-links

Update your DNS with a CNAME (Canonical Name) record (host aliases) for the chosen custom domain name to have YourSHOP.YourCompany.com point to the host YourCompany.2checkout.com (once the DNS update is propagated traffic from YourSHOP.YourCompany.com will be guided to YourCompany.2checkout.com).

You’ll need to confirm the availability of YourCompany.2checkout.com with 2Checkout before updating your DNS records.

Once our Vendor Support team confirms the installation of your custom domain, you can create new buy links from the Generate links area. The new links generated from our interface will contain your custom domain name. Your older links having the format secure.2checkout.com remain functional, so both link types can be used for the ordering process.

Retrieve account time zone

Overview

Use the getTimezone method to retrieve information on the time zone used by your account for the Avangate API.

Parameters

Parameters Type/Description

sessionID

Required (string)

 

Session identifier, the output of the Login method. Include sessionID into all your requests. Avangate throws an exception if the values are incorrect. The sessionID expires in 10 minutes.

Response

Parameters Type/Description

Timezone

String

 

The time zone you selected or the default GMT+02:00 time zone of the Avangate system.

Request

<?php

require ('PATH_TO_AUTH');

$jsonRpcRequest = array (
'method' => 'getTimezone',
'params' => array($sessionID),
'id' => $i++,
'jsonrpc' => '2.0');

var_dump (callRPC((Object)$jsonRpcRequest, $host, true));

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo