--- title: "Start Alipay and WeChat Pay transactions" url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/extras-jni/start-alipay-and-wechat-pay-transactions-jni" source_url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/extras-jni/start-alipay-and-wechat-pay-transactions-jni.md" canonical: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/extras-jni/start-alipay-and-wechat-pay-transactions-jni" last_modified: "2019-05-01T11:48:00+02:00" language: "en" --- # Start Alipay and WeChat Pay transactions [View source](/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/extras-jni/start-alipay-and-wechat-pay-transactions-jni.md) ## Class | Name | Description | | ------------- | --------------------------------------------------------------------------------------- | | `MerchantPed` | Extends  `AdyenPed`.  Class used to implement all PIN entry device (PED) functionality. | ## Special tender parameter | Name | Type | Description | | --------------- | ------------- | ------------------------ | | `specialTender` | SpecialTender | Holds tender attributes. | Use the SpecialTenderBuilder to create the SpecialTender object: ```java SpecialTender.SpecialTenderBuilder(merchantAccount, merchantReference, "payment", "alipay", currency, amount) .tenderOptions(tenderOptions) .specialOptions(specialOptions) .build();  ``` ## Use put to set special options | Name | Description | | -------------------- | ------------------------------------------------------- | | `specialOptions.put` | Allows you to add a special option as a key value pair. | Add special options parameters to the `specialTender` using the `specialOptions.put` method.  | Name | Type | Required | Description | | ---------------- | ------ | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `cardNumber ` | String | ![-x-](/user/data/smileys/emoji/x.png "-x-") | The scanned number from the wallet app (to be provided only for [Flow 3: Cash register scans Shopper barcode](/point-of-sale/qr-code-wallets)) | | `forceEntryMode` | String | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The entry mode for the transaction. In this case, use the value "Keyed". | ```java specialOptions.put("cardNumber", "60362821657200117610"); ``` ## Instantiate special tender options | Name | Type | Description | | ---------------- | -------------- | ------------------------ | | `specialOptions` | SpecialOptions | Holds tender attributes. | ### Parameters | Name | Type | Required | Description | | ------------------- | -------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `transactionType` | String | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Type of transaction. `TransactionType` takes the following value:- payment | | `paymentMethodType` | String | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The type of payment method, in this case wallets. `PaymentMethodType` takes the following values:- - Pass **"alipay"** for an Alipay transaction. - Pass **"wechatpay\_pos"** for WeChat Pay transaction. | | `shopperReference` | String | ![-x-](/user/data/smileys/emoji/x.png "-x-") | Shopper identification (used for omnichannel digital customer recognition). | | `shopperEmail` | String | ![-x-](/user/data/smileys/emoji/x.png "-x-") | Shopper identification (used for omnichannel digital customer recognition). | | `merchantAccount` | String | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The transaction reference provided by the Merchant (reported in the Adyen payments platform). | | `merchantReference` | String | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The transaction reference provided by the Merchant (reported in the Adyen payments platform). | | `currency` | long | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The transaction currency. | | `amount` | String | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The transaction amount in minor units (100 is 1.00 with EUR). The Amount field should be a strong typed field with a string for currency code and a number (long) for the minor digits value (similar to the current API (of the terminal)). | | `specialOptions` | SpecialTenderOptions | ![-x-](/user/data/smileys/emoji/x.png "-x-") | Holds tender attributes.- cardNumber  - forceEntryMode | | `handleReceipt` | Boolean | ![-x-](/user/data/smileys/emoji/x.png "-x-") | Specifies that the POS handles and prints receipts. If omitted, it is required that the PED prints the receipt. If there is no printer unit, the transaction will fail. | Instantiate `specialOptions` by assigning it to the result of the SpecialTender getter` specialtender.getSpecialOptions()` ```java SpecialOptions specialOptions = specialTender.getSpecialOptions(); ``` ## Call the method | Name | Description | | ---------------------- | ---------------------------------------------- | | `runSpecialTenderSync` | Creates a tender using a number of attributes. | ```java ped.runSpecialTenderSync(specialTender); ``` ## Determine the current and final tender state Adyen provides a method to determine the current, or final, tender state. For more information, see [Determine the current and final tender state - JNI](/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/process-a-basic-transaction-jni/determine-the-current-and-final-tender-state-jni). ## Callbacks | Name | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | | [`progressCallback`](/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/process-a-basic-transaction-jni/handle-progress-events-jni) | Reports the progress on a running tender | | [`tenderPrintReceiptCallback`](/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/process-a-basic-transaction-jni/handle-the-print-receipt-callback-jni) | Returns the receipt for printing, and requests that the POS confirms it has received the receipt. | | [`finalCallback`](/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/process-a-basic-transaction-jni/handle-the-final-state-callback-jni) | When the system finishes processing the tender, it triggers the final state callback. |