Alipay+ DocsAlipay+ Docs

Request the logo from the Alipay+ CDN server

You can request the logo from the Alipay+ CDN server via properly constructed URLs. For each request, only one .png logo is returned if the Alipay+ payment method is available. You need to display Alipay+ as a payment method with the logo after receiving it.

Construct the CDN URL

To request the logo, you need to construct a CDN URL as follows:

  • Production environment: https://resource.alipayplus.com/prod/<acquirerId>/sha256(<referenceMerchantId>)/<productCode>/<paymentCurrency>/<userRegion>/<logoPattern>/alipayplus.png
  • Sandbox environment: https://developers.alipayplus.com/cdn/sandbox/<acquirerId>/sha256(<referenceMerchantId>)/<productCode>/<paymentCurrency>/<userRegion>/<logoPattern>/alipayplus.png

Note: All parameters in the CDN URL are required. See the following table for details about how to specify values for the parameters.

Request parameters

The following table lists the request parameters in the CDN URL:

Parameter

Type

Description

acquirerId

String(64)

The unique ID that is assigned by Alipay+ to identify an ACQP.

ImportantSpecify different values for this parameter in the production and sandbox environment as follows:

  • Production environment: Specify the Participant ID that is provided by the Alipay+ Solution Architect.
  • Sandbox environment: Specify the Participant ID that is displayed on the Settings page under the Sandbox tab of the Alipay+ Developer Center. For more information, see Develop in sandbox.

referenceMerchantId

String(64)

The unique ID that is assigned by the ACQP to identify a merchant. The value of this parameter must be SHA256 encoded to convert special characters.

productCode

String(32)

The type of payment product that is supported by the merchant.

The valid value for Auto Debit is AGREEMENT_PAYMENT.

paymentCurrency

String(3)

The payment currency, also known as the transaction currency, that is supported by the merchant. The value of this parameter must be an alphabetic code that follows the ISO 4217 standard, for example, "EUR" for Euros.

userRegion

String(14)

This parameter is reserved for further use. Set the value to defaultregion.

logoPattern

String(32)

The pattern of the logo, such as P1-WEB-01. The value consists of the following three parts:

  • The layout of the logo. Valid values are:
    • P1: indicates that the Alipay+ logo is located on the left of wallet logos.
    • P2: indicates that the Alipay+ logo is above wallet logos.
  • The terminal type that the logo is applied to. Valid values are WEB and APP.
  • Custom field with a maximum length of 10 characters. The default values are sequential numbers starting from 01.

Note: If you do not use aggregated logos, set the value of this parameter to defaultlogo; otherwise, you need to set the value of this parameter to the pattern of the logo.

Response parameters

No response parameters are returned. Instead, the Alipay+ CDN server directly returns the logo.

Sample CDN URL

https://resource.alipayplus.com/prod/A1112TEST0000000/82c67417922f7c946504b2d9faff39c260539213e5a4effbb561396fccde3498/AGREEMENT_PAYMENT/USD/defaultregion/P2-WEB-TypeD/alipayplus.png

Call from client side

After the CDN URL is constructed, you can call the Alipay+ CDN server from your client side. The following sample shows how to request the logo from your client side.

copy
<!-- Load the logo via the <img> tag. If there's no <img> tag, hide the <div> element.-->
<div id="alipayplus"> 
  <img src="https://resource.alipayplus.com/prod/A1112TEST0000000/82c67417922f7c946504b2d9faff39c260539213e5a4effbb561396fccde3498/AGREEMENT_PAYMENT/USD/defaultregion/P2-WEB-TypeD/alipayplus.png" alt="Alipay+" onerror="imgError()" />
  <div>

    <script>
      var imgError = function () {
        document.getElementById('alipayplus').style.display = 'none'; 
      };
    </script>