Alipay+Alipay+

Request logo assets from the Alipay+ CDN server

Alipay+ allows you to request logo assets from the Alipay+ CDN server. With such information, you need to display Alipay+ as a payment method correctly, including:

  • display Alipay+ as a payment method only when the .png asset exists
  • display Alipay+ with the logo in the .png asset

Construct the CDN URL

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

https://resource.alipayplus.com/prod/<acquirerId>/sha256(<referenceMerchantId>)/<productCode>/<paymentCurrency>/<userRegion>/<logoPattern>/alipayplus.png

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.

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.

Valid values are:

  • CASHIER_PAYMENT

paymentCurrency

String(3)

The payment 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 from01.

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 assets.

Sample CDN URL

https://resource.alipayplus.com/prod/A1112TEST0000000/4cb491f43ee490cd7a17c7306bf109025eb05808bf9bf56e36e4dda108fc2844/CASHIER_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 logo assets 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/4cb491f43ee490cd7a17c7306bf109025eb05808bf9bf56e36e4dda108fc2844/CASHIER_PAYMENT/USD/defaultregion/P2-WEB-TypeD/alipayplus.png" alt="Alipay+" onerror="imgError()" />
  <div>
    
    <script>
      var imgError = function () {
        document.getElementById('alipayplus').style.display = 'none'; 
      };
</script>