Logoelepay

Payment Methods

Overview

When using the mobile SDKs (iOS, Android), the configuration for each payment method is described on this page.

◯: Requires individual settings, △: Only common elepay settings are needed, X: No special settings.

iOS Development Setup

PaymentURL SchemeLSApplicationQueriesSchemesApple Pay Merchant ID
PayPay◯ *1
merpayX
d払いXX
au PAY◯ *1
Rakuten Pay
PaidyXX
atoneXX
WeChat Pay
Alipay
UnionPay (銀聯雲閃付)
PayPalX
Apple PayXX
Credit CardXX

1: From ElepaySDK for iOS v3.2.1 onward, you do not need to add each payment app’s scheme to LSApplicationQueriesSchemes. If the payment app is not actually installed, the SDK returns error code "10110".

Android Development Setup

About payment providers

GoAllpay

If you use GoAllpay, you must add the GoAllpay SDK repository and dependency to your project configuration. For details, refer to the GoAllpay SDK docs in Chinese or English.

Setup:

Add the following to the root project’s build.gradle:

repositories {
	// ... other maven repos
	// maven repo for GoAllpay SDK
	maven {
    	url 'https://s01.oss.sonatype.org/content/repositories/releases/'
	}
}

Add the following to the app module’s build.gradle:

dependencies {
	// ... other dependencies
	api("io.github.goallpay:allpaysdk:5.2.5")
}

Per-payment-method setup

PaymentAndroidManifest.xml (Process Activity)build.gradle (Library Dependency)
PayPayX
merpayX
d払いXX
au PAYX
Rakuten PayX
PaidyXX
atoneXX
WeChat Pay
AlipayX
UnionPay (銀聯雲閃付)XX
PayPalXX
Apple PayXX
Credit CardXX

From elepay Android SDK 1.8.0 and later, the callback Activity specified in AndroidManifest.xml can be consolidated into a single Activity as shown below. The per-payment-method setup used up to 1.7.1 is no longer supported. When using 1.8.0 or later, use ElepayCallbackActivity.

📘 For how to obtain the elepay-specific URL Scheme, see “URL Scheme for iOS/Android SDK”.

<activity
    android:name="jp.elestyle.androidapp.elepay.activity.ElepayCallbackActivity"
    android:launchMode="singleTask"
    android:exported="true">
    <intent-filter>
        <data android:scheme="ep1234567890abcdef" /> ←このschemeは「アプリ設定」ページより取得してください。

        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
    </intent-filter>
</activity>

Payment methods

PayPay

iOS

iOS 9 and later

Starting with ElepaySDK for iOS v3.2.1, you can use the payment app without adding the scheme below to LSApplicationQueriesSchemes. If the payment app is not installed, the SDK returns error code “10110”.

For ElepaySDK for iOS v3.2.1 and earlier, to hand off to the PayPay app, add the LSApplicationQueriesSchemes key under PROJECTTARGETSInfo (or Info.plist) in Xcode.

<string>paypay</string>
Callback URL Scheme for iOS apps

For the default elepay URL Scheme, see here.

Android

🚧 From elepay Android SDK 1.8.0 and later, the callback Activity specified in AndroidManifest.xml can be consolidated into ElepayCallbackActivity. The per-payment-method setup used up to 1.7.1 is no longer supported. When using 1.8.0 or later, use ElepayCallbackActivity. See the Overview for details.

To use PayPay, add the URL Scheme from the “App Settings” page of your elepay account to your project’s AndroidManifest.xml.

<activity
    android:name="jp.elestyle.androidapp.elepay.activity.paypay.PayPayActivity"
    android:exported="true">
    <intent-filter>
        <data android:scheme="ep8bd64f25c5545b99c43e295"
              android:host="paypay"/> ←このschemeは「アプリ設定」ページより取得してください。

        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
    </intent-filter>
</activity>

If you customize the Activity launched by the scheme, inherit from jp.elestyle.androidapp.elepay.activity.paypay.PayPayActivity.

merpay

Android

🚧 From elepay Android SDK 1.8.0 and later, the callback Activity specified in AndroidManifest.xml can be consolidated into ElepayCallbackActivity. The per-payment-method setup used up to 1.7.1 is no longer supported. When using 1.8.0 or later, use ElepayCallbackActivity. See the Overview for details.

To use merpay, add the URL Scheme from the “App Settings” page of your elepay account to your project’s AndroidManifest.xml.

<activity
    android:name="jp.elestyle.androidapp.elepay.activity.merpay.MerpayActivity"
    android:exported="true">
    <intent-filter>
        <data
            android:host="merpay"
            android:scheme="ep33e72b55aaa6cce18c0abd7" /> ←このschemeは「アプリ設定」ページより取得してください。

        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
    </intent-filter>
</activity>

au PAY

iOS

iOS 9 and later

Starting with ElepaySDK for iOS v3.2.1, you can use the payment app without adding the scheme below to LSApplicationQueriesSchemes. If the payment app is not installed, the SDK returns error code “10110”.

For ElepaySDK for iOS v3.2.1 and earlier, to hand off to the au PAY app, add the LSApplicationQueriesSchemes key under PROJECTTARGETSInfo (or Info.plist) in Xcode.

<string>auwallet</string>
Callback URL Scheme for iOS apps

For the default elepay URL Scheme, see here.

Rakuten Pay

iOS

To use RPay, in addition to the elepay SDK, you must add the proprietary (non‑public) RPay framework to your project’s build dependencies. Contact elepay support for how to obtain RPayKit.framework and how to add it.

iOS 9 and later

To hand off to the Rakuten Pay app, add the LSApplicationQueriesSchemes key under PROJECTTARGETSInfo (or Info.plist) in Xcode.

<string>rakutenpaysdk</string>
Callback URL Scheme for iOS apps

For the default elepay URL Scheme, see here.

Android

To use RPay, in addition to the elepay SDK, add the proprietary Rakuten Pay AAR (non‑public) to your project’s build dependencies. For how to add the dependency, see the Android Developer official docs.

📘 For the download location of the Rakuten Pay AAR, contact elepay support.

Apple Pay

iOS

Overview

This section describes how to implement Apple Pay.

How it works

Apple Pay allows Apple devices to function as a wallet for simple payments.

Apple Pay configuration

See Setting Up Apple Pay.

  1. Register an Apple Merchant ID To use Apple Pay, you must register an Apple Merchant ID.
  2. Create an Apple Pay certificate A certificate is required to encrypt payment data. Create the certificate as follows: (1) In elepay, go to “開発設定” → “Apple Pay” → “Apple Pay Certificate” and download the CSR (Certificate Signing Request). (2) Upload the CSR on Apple Developer using the Merchant ID created in step 1 to create the certificate. (3) Upload the certificate to elepay.
  3. Integrate with Xcode Open your project in Xcode and enable Apple Pay under the Capabilities tab. You may be prompted to sign in with your developer account. After enabling it, check the Merchant ID created in step 1 to complete the configuration.

See also Adding capabilities to your app.

Apple Pay (UnionPay in China) certificate

(Required only if you applied for “China UnionPay Apple Pay”)

  • On Apple Developer, create a Certificate Signing Request (CSR). Refer to Apple’s guide.

  • When creating the CSR, be sure to check “Let me specify key pair information”.

  • In “Key Pair Information”, set Algorithm to “ECC” and Key Size to “256 bits”.

  • When uploading the CSR to developer.apple.com, select “No” for “Will payments associated with this Merchant ID be processed exclusively in China?”.

  • Download the generated certificate (.cer) and export a Personal Information Exchange (.p12) with an empty password.
  • In elepay “開発設定” → “Apple Pay” → “Apple Pay Certificate (中国)”, upload the certificate (.cer) and the .p12 file above.

Google Pay

Android

Specify googlePayEnvironment when setting up the elepay SDK.

📘 Using Google Pay requires an application to Google. You may be asked to submit apps built for both TEST and PRODUCTION environments.

When configuring the elepay SDK, you can specify googlePayExistingPaymentRequired (default: true) to check whether the user already has a valid payment card in Google Pay.

true: At least one payable card is required in Google Pay.

false: Do not check cards in Google Pay. If there is no card, the user can add one in the payment dialog.

val configuration = ElepayConfiguration(
  apiKey = "" // test key or live key
  googlePayEnvironment = GooglePayEnvironment.TEST // or GooglePayEnvironment.PRODUCTION
  googlePayExistingPaymentRequired = false // default true
)
Elepay.setup(configuration)

Because Google Pay depends on Google Play Services, you must check availability before use. The SDK provides the following method for availability of Google Pay:

// Check whether Google Pay can be used.
fun checkIfGooglePayIsReadyToUse(
    activity: Activity,
    resultHandler: (Boolean) -> Unit
)
Google Pay development
  1. Ensure minSdkVersion meets the official requirements: https://developers.google.com/pay/api/android/guides/setup#app%20prerequisites
  2. Configure AndroidManifest.xml:
<application>
  ...
  <meta-data
    android:name="com.google.android.gms.wallet.api.enabled"
    android:value="true" />
</application>
Google Pay PRODUCTION verification

Per Google Pay requirements, PRODUCTION must use a Google Play release-signed build. Follow this process:

  1. Apply for Google Pay API integration. a. https://developers.google.com/pay/api/android/guides/test-and-deploy/publish-your-integration
  2. You must download the app from Google Play Store and test it (a locally installed release-signed APK is not accepted). a. https://developers.google.com/pay/api/android/guides/setup#app%20prerequisites b. After signing with your release key and uploading to Google Play, download with a tester account and verify Google Pay functionality.
  3. Use GooglePayEnvironment.PRODUCTION, not GooglePayEnvironment.TEST.
Differences between TEST and PRODUCTION

When googlePayExistingPaymentRequired is true:

  1. Test environment: Depends on the Google Wallet app. Install Google Wallet and register a credit card; otherwise the Google Pay dialog will not start and checkIfGooglePayIsReadyToUse returns false (forcing a payment will return error code 10100).
  2. Production environment: Real users must have a payment card registered in Google Wallet or their Google account. If not, checkIfGooglePayIsReadyToUse returns false (forcing a payment will return error code 10100).

When googlePayExistingPaymentRequired is false:

  1. Test environment: The payment dialog automatically fills test card information.
  2. Production environment: If the user has no card in Google Pay, the dialog prompts them to add a card.

PayPal

iOS

Callback URL Scheme for iOS apps

For the default elepay URL Scheme, see here.

In addition, add a PayPal‑specific URL Scheme that starts with your app’s Bundle ID. See elepay Dashboard開発設定アプリ設定URL SchemePayPal.

iOS 9 and later

To hand off to the PayPal app, add the LSApplicationQueriesSchemes key under PROJECTTARGETSInfo (or Info.plist) in Xcode.

<string>com.paypal.ppclient.touch.v1</string>
<string>com.paypal.ppclient.touch.v2</string>

Alipay

iOS

Alipay is a simple and secure payment service provided by Ant Financial, available on iOS, Android, and web browsers.

iOS 9 and later

To hand off to the Alipay app, add the LSApplicationQueriesSchemes key under PROJECTTARGETSInfo (or Info.plist) in Xcode.

<string>alipay</string>
Callback URL Scheme for iOS apps

For the default elepay URL Scheme, see here.

Android

To use Alipay, download the Alipay SDK and place it under your project’s libs folder.

📘 The Alipay SDK filename looks like: alipaySdk-15.6.8-20191021122455-noUtdid.aar

Then, add the Alipay SDK dependency to your app’s build.gradle:

dependencies {
  // ... other dependencies
  implementation files('libs/alipaySdk-20170725.jar')
}

WeChat Pay

iOS

Callback URL Scheme for iOS apps

For the default elepay URL Scheme, see here.

In addition, a WeChat‑specific URL Scheme (starting with wx) is required. See elepay Dashboard開発設定アプリ設定URL SchemeWeChat Pay. If WeChat Pay is not enabled, this section is hidden.

iOS 9 and later

To hand off to the WeChat Pay app, add the LSApplicationQueriesSchemes key under PROJECTTARGETSInfo (or Info.plist) in Xcode.

<string>weixin</string>
<string>weixinULAPI</string>

Android

WeChat Pay depends on the WeChat library. Add the WeChat SDK dependency to build.gradle. We recommend the latest version; see WeChat SDK maven for versions.

dependencies {
  // ... other dependencies
  implementation "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:version"
}

Then add the following activity-alias to your project’s AndroidManifest.xml. WeChat Pay looks for package.name.wxapi.WXPayEntryActivity, so the elepay SDK links into your existing code.

<!-- Other activity declarations -->
<activity name="...">
</activity>

<!-- Required for using WeChat Pay -->
<activity-alias
    android:name="パッケージ名.wxapi.WXPayEntryActivity"
    android:exported="true"
    android:targetActivity="jp.elestyle.androidapp.elepay.activity.wxapi.WXPayEntryActivity" />

UnionPay(銀聯雲閃付)

iOS

iOS 9 and later

To hand off to a UnionPay app, add the LSApplicationQueriesSchemes key under PROJECTTARGETSInfo (or Info.plist) in Xcode.

<string>uppaysdk</string>
<string>uppaywallet</string>
<string>uppayx1</string>
<string>uppayx2</string>
<string>uppayx3</string>
Callback URL Scheme for iOS apps

For the default elepay URL Scheme, see here.

Last updated on

On this page