Skip to main content

WeChat Pay

Overview

WeChat Pay is an online payment method that allows shoppers in China and Hong Kong to send payments through the WeChat social media mobile application. Every WeChat user has their own WeChat Payment account, in which they can acquire balance by linking their WeChat account to their debit card. With an increasing market share in China and Southeast Asia, WeChat Pay offers customers an easy-to-use and reliable payment method.

 
Transaction limit for WeChat is 8000 USD or equivalent.

Availability

Available on 2Monetize accounts.

Requirements

Shoppers must have the WeChat application installed on their Android or iOS devices.

Supported currencies

  • CNY
  • USD
  • HKD

Benefits

WeChat Pay enhances the checkout experience through multiple optimizations:

  • Convenient, easy and safe. Simplified purchase flow designed for mobile payments and safe storage for cards used within the wallet.
  • Increased market share. Used by hundreds of millions of users every day, WeChat Pay is one of the most popular payment methods in China.
  • Higher conversion rates. Convert more Chinese visitors into buyers.

Activation steps

Go to Payment methods and enable WeChat Pay.

Purchase flow

  1. Shoppers select China or Hong Kong in the shopping cart.
  2. They place the order.
  3. 2Checkout redirects shoppers to WeChat.
  4. WeChat displays the QR code that shoppers need to scan.
  5. Shoppers use their WeChat application to scan the QR code.
  6. 2Checkout marks the order as Pending until shoppers place the order.
  7. Shoppers place the order and the WeChat application confirms the payment.
  8. 2Checkout marks the order as complete as soon as WeChat sends back an Instant Payment Notification.
  9. Shoppers receive the Payment receipt and Electronic delivery emails from 2Checkout.
 
You can configure unfinished payment follow-up emails from the Control Panel.

Type of charges

WeChat Pay does not support recurring transactions, so subscription renewals can only be done manually.

Refunds

WeChat supports order refunds.

REST 3.0 Reference

Overview

Use the attached blueprints to integrate with the 2Checkout API via REST 3.0. 

Authentication

To authenticate to the 2Checkout REST API include a header with the following structure into your requests:

X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"

Alternatively, use:

X-Avangate-Authentication: code='{VENDOR_CODE}' date='{REQUEST_DATE_TIME}' hash='{HASH}'

  • VENDOR_CODE: Your unique Avangate supplied merchant code.
  • REQUEST_DATE_TIME: The UTC date-time of the request. Format: YYYY-MM-DD HH:MM:SS.
  • HASH: The hash mac digest with an md5 hashing algorithm of the following: LEN(VENDOR_CODE) + VENDOR_CODE + LEN(REQUEST_DATE_TIME) + REQUEST_DATE_TIME. Use the secret key associated with your account for the hashing.

You must authenticate for all requests.

JSON encoded requests

The 2Checkout REST API supports only JSON encoded requests and responses. You need to include the following headers in your requests:

  • Content-Type: application/json
  • Accept: application/json

Responses follow HTTP specifications regarding response headers. Successful responses are composed of:

  • An HTTP Success header.
  • A JSON encoded string.

Resources

Please visit https://github.com/avangate.

Working code samples for REST are available for each documented scenario and method. To access code samples, select any scenario and click on the "Working example" link. You can use:

  • cURL
  • Java
  • JavaScript
  • Node.js
  • Perl
  • Python
  • PHP
  • Ruby
  • Go
  • C#
  • Visual Basic
  • Groovy
  • Objective-C
  • Swift

Best practices

One-click (1 click) subscription renewal

2Checkout supports 1-click manual subscription renewals for returning customers who paid for their previous orders with Credit/Debit cards.

In this scenario, you can facilitate subscription renewals for subscribers who opted out of auto-renewal (recurring billing).

How does this work?

  • Identify returning customers.
  • Generate the manual renewal link.
  • Create a tokenized manual subscription renewal link and serve it to the returning customer.
  • Customers using the link land a hosted shopping cart choose one of the credit cards they previously used for purchases from your account/store and place the order.

Availability

Contact 2Checkout to start using one-click (1-click) subscription renewals.

Requirements

  1. Make sure that the subscription is eligible:

    • Status needs to be Active or Past Due
    • Subscription cannot be evergreen​
  2. The email address must match that from the initial order. If shoppers change the email they need to re-enter the payment details.

    • Identify returning customers.
    • Generate the manual renewal link.
    • Create a tokenized manual subscription renewal link and serve it to the returning customer.
    • Customers using the link land a hosted shopping cart choose one of the credit cards they previously used for purchases from your account/store and place the order.

Detailed 1-click subscription renewal flow

  1. Identify returning customers

    You particularly need either the 2Checkout customer reference or the external customer reference you control.

  2. Use customer information

    If customers log into your system and you’ve mapped unique identifiers into the 2Checkout platform you can easily extract their subscription information.

  3. Use subscription information

    You can also use subscription information to extract customer references, based on a set of filters. Validate the status of the subscription (needs to be Active or Past Due).

    • Customer email
    • Delivered codes/activation keys
    • Avangate customer reference
    • External customer reference
    • Subscription status
    • Recurring billing status
    • Product code
    • Customer country
    • Purchased date
    • Expiration/Renewal deadline
    • Subscription type
  4. Create the manual renewal link

    Retrieve information regarding subscription renewals based on 2Checkout Subscription References:

    • Information on the automatic renewal (recurring billing) status (enabled or disabled).
    • The link that customers access to renew the subscription through a manual payment.
  5. Attach the payment token to the manual renewal link

    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.

REST API 3.0 Blueprints for Download

 

REST 3.0 Blueprints (.zip) Legacy%20REST%20API%203.0%20blueprints_0.zip

 

Affiliate newsletter module

Overview

The 2Checkout Newsletter module supports sending plain text as well as HTML email messages to your affiliates.

Keep in touch with your affiliates. Provide them with information about new products, launches and important features that are worth promoting via newsletters. Also, send tips to affiliates and share your sales know-how with them. Through the 2Checkout Newsletter module, you can create and manage newsletters for your affiliates and segment them based on location and approval date. For example, you can set up a monthly newsletter to send to the affiliates in your 2Checkout program. Add an incentive for affiliates to motivate them to sell your products.

Requirements

The 2Checkout Affiliate Network must be enabled for your account. Contact 2Checkout directly to start taking advantage of our affiliates.

Availability

Newsletters are subject to approval, following a review by an 2Checkout representative.

Use the 2Checkout Newsletter module to send out:

  1. Plain text emails
  2. HTML messages - engage customers on a deeper level with visually rich email experiences

Plain text newsletter

Here are the steps necessary to configure a plain text newsletter for your affiliates:

  1. Go to Affiliate Network -> Newsletter. The Affiliate Newsletter Management is designed to let you compose and manage newsletters for your affiliates.
  2. Scroll down to the Compose Newsletter area. Note: the Compose Newsletter area is available only in the absence of any pending newsletters. You'll be able to compose new messages after pending emails have been approved and sent out or after they're rejected by an 2Checkout representative.
  3. Select the affiliates you want to receive the newsletter. You can filter them by multiple criteria. Note: Filters are available only if your affiliates supplied the details in the Account information area of their accounts.
    • Affiliate country - affiliate business country.
    • Type
      • Content & Reviews
      • Coupons/ Discounts
      • Loyalty/ Cashback
      • Email marketing
      • Search Engine Marketing
      • Social Media
      • Display/ Retargeting
      • VAR/ Reseller
    • Approval date - the date when affiliates joined your program.
    • Supported languages - The languages supported by affiliates for their referrals.
    • Geographic target - Markets that generate sales for your affiliates. The 2Checkout system fills in this field automatically and shares the info with you once affiliates request to join your program. 
  4. Enter a new email subject or edit the one automatically generated.
  5. Do not check the checkbox next to the Send HTML newsletter option.
  6. Provide the message in the Text newsletter body field. The email will be sent in text format only. HTML tags are not allowed.
  7. Upload an image to be attached to the newsletter.
  8. Click Preview to view a draft of your plain text newsletter before submitting it for approval. Approval and distribution usually takes less than two (2) working days.
  9. Click Save newsletter to submit the message for approval. Affiliate Newsletters must be approved manually by 2Checkout.

HTML newsletter

Here are the steps necessary to configure a HTML newsletter for your affiliates:

  1. Go to Affiliate Network -> NewsletterThe Affiliate Newsletter Management is designed to let you compose and manage newsletters for your affiliates.
  2. Scroll down to the Compose Newsletter area. Note: the Compose Newsletter area is available only in the absence of any pending newsletters. You'll be able to compose new messages after pending emails have been approved and sent out or after they're rejected by an 2Checkout representative.
  3. Select the affiliates who will receive the newsletter. You can filter them by multiple criteria. Note: Filters are available only if your affiliates supplied the details in the Account information area of their accounts.
    • Affiliate country - affiliate business country.
    • Type
      • Content & Reviews
      • Coupons/ Discounts
      • Loyalty/ Cashback
      • Email marketing
      • Search Engine Marketing
      • Social Media
      • Display/ Retargeting
      • VAR/ Reseller
    • Approval date - the date when affiliates joined your program.
    • Supported languages - The languages supported by affiliates for their referrals.
    • Geographic target - Markets that generate sales for your affiliates. The 2Checkout system fills in this field automatically and shares the info with you once affiliates request to join your program.
  4. Enter a new email subject or edit the one automatically generated.
  5. Check the checkbox next to the Send HTML newsletter option and select the HTML tab.
  6. Provide the message in the HTML newsletter body field. The email will be sent in HTML format. HTML tags are allowed.
  7. Optional: You can also configure a plain text message in concert to the HTML newsletter by providing the message in the Text newsletter body field. Following approval of your newsletter, the 2Checkout system will send out both the plain text and the HTML versions of the newsletter in parallel. Recipients using email clients featuring HTML support will receive the HTML message, while those with email clients lacking HTML support will receive the plain text messages.
  8. Upload an image to be attached to the newsletter.
  9. With the HTML tab selected click Preview to view a draft of your HTML newsletter before submitting it for approval. Approval and distribution usually takes less than two (2) working days.
  10. Click Save newsletter to submit the message for approval. Affiliate Newsletters must be approved manually by 2Checkout.

Technologies used

Custom Affiliate Newsletters can be built using primarily HTML and CSS (inline). It's less recommended to include JavaScript since the messages need to be tailored to email clients, which tend not to support JS properly.

Affiliate newsletter metrics

As of November 17th, 2015, 2Checkout tracks the newsletters you send so that you can evaluate their performance. Tracking is not available for newsletters sent prior to November 17th, 2015.

Click View Details on a sent newsletter to see metrics related to delivery, bounce, open and click rates. Important: Open rate tracking only works when the following 2 criteria are met:

  • You send the email in HTML format
  • The recipient's email client is able to display images. 2Checkout uses a pixel tracking technology in order to identify opened emails.

2Checkout tracks the following metrics:

  • Recipients - the number of affiliates that you have sent the newsletter to
  • Delivered - the number of newsletters that have reached the recipients' mail servers
  • Bounces - the number of both temporarily and permanently delivery failures. This usually occurs when a recipient's mail server rejects a newsletter. The most common reasons for bounced emails include misspelled email addresses or full recipient mailboxes. 2Checkout marks bounces that return a permanent error message as hard bounces and drops future messages sent to these recipients from the very beginning.
  • Opens - the total number of times recipients have opened an HTML email
    • Unique opens - the number of unique recipients that have opened the HTML email
  • Clicks - the total number of URL clicks inside an email
    • Unique clicks - the number of unique recipients that have clicked links inside an email

REST 4.0 Reference

Overview

Use the attached blueprints to integrate with the 2Checkout API via REST 4.0. 

Authentication

To authenticate to the 2Checkout REST API include a header with the following structure into your requests:

X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"

Alternativelly, use:

X-Avangate-Authentication: code='{VENDOR_CODE}' date='{REQUEST_DATE_TIME}' hash='{HASH}'

  • VENDOR_CODE: Your unique 2Checkout supplied merchant code.
  • REQUEST_DATE_TIME: The UTC date-time of the request. Format: YYYY-MM-DD HH:MM:SS. You must provide the time of the request in the GMT timezone.
  • HASH: The hash mac digest with an md5 hashing algorithm of the following: LEN(VENDOR_CODE) + VENDOR_CODE + LEN(REQUEST_DATE_TIME) + REQUEST_DATE_TIME. Use the secret key associated with your account for the hashing.

You must authenticate for all requests.

JSON encoded requests

The 2Checkout REST API supports only JSON encoded requests and responses. You need to include the following headers in your requests:

  • Content-Type: application/json
  • Accept: application/json

Responses follow HTTP specifications regarding response headers. Successful responses are composed of:

  • An HTTP Success header.
  • A JSON encoded string.

REST API 4.0 Blueprints for Download

 

REST 4.0 Blueprints (.zip) LegacyRESTAPI4Blueprints.zip

 

Next renewal price

Overview

Retrieve the costs of the next subscription renewal.

Attributes

Parameters Type/Description

NetPrice

Double

 

Price without taxes

NetCurrency

String

 

Currency for the price without taxes. The currency ISO code used for the payment - ISO 4217.

FinalPrice

Double

 

Price with taxes

FinalCurrency

String

 

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

 

Finance documents

Overview

The Accounting menu provides an easy way of keeping tabs on your 2Checkout account's financial activity.

Availability

All 2Checkout accounts. 

How to run net sales reports

  1. Access the Finance documents area by opening the corresponding menu in the Accounting section.
  2. Use the Period net sales section to generate reports based on the net sales generated on your account within a specified time period. The report displays by default the net sales due in the last 30 days.
  3. Use the Period net sales search section to choose the period net sales status, due date and paid date to include in the report.
  4. Once you have finished configuring your filters, click Search. The report is displayed below and it contains 10 results/page. You can extend the displayed results number to 200 results/page.
  5. Export the entire generated report in CSV format by clicking the Export as CSV button.
  6. Click the More info button to see more information about a specific transaction.

  7. You can also download the transaction's invoice in either HTML or XML format, by selecting the desired format from the Actions column.

The Paid on column also shows you the invoice status:

  • Not paid
  • Partially paid
  • Paid
  • Canceled

2Checkout allows you to download multiple types of net sales reports for each sale:

  • Product overview report
  • Orders overview report
  • Products Report

Click the corresponding download link for each of these reports to download them.

How to run disputes balance reports

Use the Disputes balance section to generate reports based on the chargebacks opened on your account within a specified time period. The report displays by default the invoices due in the last 30 days.

  1. Choose the dispute balance status, due date and paid date to include in the report in the Disputes balance search section.
  2. Once you have finished configuring your filters, click Search. The report is displayed below and it contains 10 results/page. You can extend the displayed results number to 200 results/page.
  3. Export the entire generated report in CSV format by clicking the Export as CSV button.
  4. Click the More info button to see more information about a specific transaction.
  5. Download the transaction's invoice in HTML format, by selecting the desired format from the Action column.
  6. Download individual reports in CSV format for each transaction by clicking the corresponding download links.

The amounts shown in the CSV reports can have one of two possible statuses:

  • HOLD = opened chargebacks
  • RELEASE = closed chargebacks

The Disputes balance section also provides you information about your chargeback fund. The chargeback fund is retained by 2Checkout as soon as you sign the contract. 2Checkout uses this fund to settle chargebacks and refunds opened as late as six months after the termination of your 2Checkout contract. Six months after your 2Checkout contract ends, you receive the remaining chargeback fund back into your account.

How to view accounting services invoices

Generate reports based on the type of accounting services that you use in the Services section.

  1. Use the Accounting services section to filter the invoices based on their type, status, payment date and due date.
  2. Once you have finished configuring your filters, click Search. The report is displayed below and it contains 10 results/page. You can extend the displayed results number to 200 results/page.
  3. Download each invoice in PDF format, by selecting the format from the Actions column, or download the entire report in CSV format by clicking Export as CSV.

View order tracking IDs

Overview

To facilitate your access to shipping data for physical delivery products, 2Checkout offers you an easy way to access tracking IDs directly from your account.

Availability

All 2Checkout accounts.

Where can I find the tracking IDs?

  1. In the Order details page for each order that contains products with physical delivery. Click the Tracking details link below the Backup CD entry. The Tracking Details pop-up shows you two tracking IDs:
    • Tracking order ID = the identifier used by our back-up CD provider in their internal system. All Back-up CDs offered by 2Checkout have a tracking order ID.
    • Tracking ID = the identifier used by the shipping company. You can use this ID to track the shipment of an order. Important: Depending on the type of Back-up CD, the order might or might not have a tracking ID.
  2. You can also find the tracking details in the Order Search Export reports. Important: Before exporting the reports, make sure that the template that you are using includes the Tracking Order ID and Tracking ID column headers from the Product category. 
  3. 2Checkout also includes the tracking details in Instant Search Export reports. Important: To see the tracking details in this type of reports, make sure the template that you are using includes the Tracking Order ID and Tracking ID column headers.

Instant Notification Service (INS)

Overview

You can use the Instant Notification Service (INS) to automate order management processes by accepting order information via web posts. The INS is a service that will post sets of parameters to any URL you specify. Each post represents a message containing all the information you need about a specific event (such as when a recurring order re-bills successfully).

How can I use INS?

Use INS to automate back-end functions, including but not limited to:

  • Creating end-user accounts
  • Providing access to acquired services
  • Fulfilling purchases
  • Tracking orders and customers
  • Engaging customers

How does INS work?

  1. Create one or multiple INS listener pages on your website. 
  2. Configure the INS settings of your 2Checkout account to point to the URLs of your default/preferred listener pages.
  3. Set up multiple URLs if you require more listener pages, such as in testing scenarios in which you don’t want to use your default INS listener. 
  4. 2Checkout sends webhook notifications to the endpoints you defined when shoppers acquire products/services from your online store. 2Checkout packages the content information and sends it using secure (HTTPS) POST, according to your INS settings.
  5. 2Checkout sends the INS parameters according to your setup from INS Settings. To customize the information available in the notifications, check the parameters from the INS settings page. Learn more about INS parameters here.
  6. 2Checkout uses a SHA2/SHA3 signature to validate the HTTPS POST. Calculate the signature using data sent and your 2Checkout account’s secret key, following the instructions included in this article.
  7. Your custom INS listener scripts consume the notifications and process the info received.
  8. Configure your INS listeners to output a read receipt confirmation on the listener page after receiving a valid INS message. This article includes guidance on how to generate the confirmation.
  9. In the absence of a confirmation from one of your INS listeners, 2Checkout will make 5 attempts to send notifications to that endpoint, according to the failure retry process.
  10. In the eventuality that 2Checkout fails to send INS or doesn’t receive a confirmation from your INS listener, it displays an error in your Control Panel, on the Dashboard.

Set up INS endpoints

  1. Login into your 2Checkout account.
  2. Navigate to INS settings under System settings.
  3. Click on Add endpoint to add a new URL configuration that will receive the notifications.
  4. Save your settings.

You can set up multiple endpoints for your INS notifications, for scenarios in which you have multiple Internal System that require to receive this information. You can add an unlimited number of endpoints that will receive notifications.

Debug INS

To view or debug INS notifications during the integration phase, place TEST orders.

Alternatively, search for specific orders in the Reports center menu and click on the API & Webhooks section. When you access the Instant Notification Service webhooks activity, you have the option to resend notifications. This action will help you retrieve the INS data already sent in case technical issues occurred and the set of parameters did not successfully reach the defined endpoints. 

You can resend notifications one by one (individual resend) or you can select multiple notifications that you want to resend via one single Resend action (bulk resend). Notifications selected for resend action will be included in the resend process, meaning that the resend action will not be performed instantly. In the resend process the initial set of parameters will be included, meaning the values will not be recalculated by the system. In the webhooks reports, resent notifications will be marked differently than the original/initial ones. The Resend action will consider only the original set of parameters, meaning that if you choose to resend both original and already resent notifications, the system will only consider the original set of parameters and only once a unique notification will be resent.

Secure your INS script

For security reasons, 2Checkout recommends that you restrict access to the INS script.

 

REST 5.0 Reference

Overview

Use the attached blueprints to integrate with the 2Checkout API via REST 5.0. 

Before you start using the 2Checkout API, make sure you are PCI DSS compliant. Find out more details about what PCI DSS compliance means and what you should do to be PCI compliant here.

Authentication

To authenticate to the 2Checkout REST API include a header with the following structure into your requests:

X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"

Alternatively, use:

X-Avangate-Authentication: code='{VENDOR_CODE}' date='{REQUEST_DATE_TIME}' hash='{HASH}'

  • VENDOR_CODE: Your unique 2Checkout supplied merchant code.
  • REQUEST_DATE_TIME: The UTC date-time of the request. Format: YYYY-MM-DD HH:MM:SS. You must provide the time of the request in the GMT timezone.
  • HASH: The hash mac digest with an md5 hashing algorithm of the following: LEN(VENDOR_CODE) + VENDOR_CODE + LEN(REQUEST_DATE_TIME) + REQUEST_DATE_TIME. Use the secret key associated with your account for the hashing.

You must authenticate for all requests.

JSON encoded requests

The 2Checkout REST API supports only JSON encoded requests and responses. You need to include the following headers in your requests:

  • Content-Type: application/json
  • Accept: application/json

Reponses follow HTTP specification regarding response headers. Successful responses are composed of:

  • An HTTP Success header.
  • A JSON encoded string.

REST API 5.0 Blueprints for Download

 

REST 5.0 Blueprints (.zip) LegacyRESTapi5blueprints.zip

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