Initiate a PayPal payment

PayPalTransactionInit

How does it work?

Lemonway's PayPal solution lets you seamlessly integrate PayPal payments into your platform. Our solution is a simple standard web page redirect to PayPal.com that allows buyers to log into their accounts and make payments.

Request and Response

Request: Parameters and body (mandatory). See further down the page.
Response: id, payPalOrderId, and redirectionUrl

Making a PayPal Payment

When opting for the SOAP version of PayPal's payment method, the underlying logic remains consistent with the REST approach. However, instead of utilizing the REST endpoint, you would invoke the SOAP method PayPalTransactionInit. Consult Buyer Journey.

📘

Note

To keep buyers informed about their transaction status, it is important to ensure that your redirection URLs are publicly visible and accessible.

XML

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <MoneyInPayPalInit xmlns="Service_mb_xml">
            <redirections>
                <returnUrl>http://www.marketplace.com/ok</returnUrl>
                <errorUrl>http://www.marketplace.com/ko</errorUrl>
                <cancelUrl>http://www.marketplace.com/cancel/cancelUrl>
            </redirections>
            <transaction>
                <reference>{{reference}}</reference>
                <walletId>mkp</walletId>
                <totalAmount>10.00</totalAmount>
                <commissionAmount>1.00</commissionAmount>
                <comment>test paypal Lemonway</comment>
            </transaction>
            <amountBreakdown>
                <totalItems>10.00</totalItems>
                <totalItemTaxes>0</totalItemTaxes>
                <shipping>0</shipping>
                <handling>0</handling>
                <insurance>0</insurance>
                <shippingDiscount>0</shippingDiscount>
                <discount>0</discount>
            </amountBreakdown>
            <delivery>
                <address>
                    <country>FR</country>
                    <city>paris</city>
                    <street>sentier</street>
                    <postCode>75001</postCode>
                    <state>Ile-De-France</state>
                </address>
                <receiver>
                    <fullName>mike tomn</fullName>
                </receiver>
            </delivery>
            <items>
                <item>
                    <merchantWalletId>mkp</merchantWalletId>
                    <description>shopping</description>
                    <quantity>1</quantity>
                    <unitAmount>10.00</unitAmount>
                    <type>Digital</type>
                    <taxAmount>0</taxAmount>
                </item>
            </items>
            <walletIp>1.1.1.2</walletIp>
            <walletUa>chrome</walletUa>
            <language>en</language>
            <wlLogin>{{wlLogin}}</wlLogin>
            <wlPass>{{wlPass}}</wlPass>
        </MoneyInPayPalInit>
    </soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <MoneyInPayPalInitResponse xmlns="Service_mb_xml">
            <MoneyInPayPalInitResult>
                <MoneyInId>71348</MoneyInId>
                <RedirectionUrl>https://www.lodxld.paypal.com/checkoutnow?token=6SV01997U7118594W</RedirectionUrl>
                <PayPalOrderId>6SV01997U7118594W</PayPalOrderId>
            </MoneyInPayPalInitResult>
        </MoneyInPayPalInitResponse>
    </soap:Body>
</soap:Envelope>

Objects Table

ItemDescriptionMandatoryFormatExample
returnUrlReturn URL after successful paymentYesStringhttp://www.marketplace.com/ok
errorUrlURL for handling payment errorsYesStringhttp://www.marketplace.com/ko
cancelUrlURL for cancelling paymentYesStringhttp://www.marketplace.com/cancelUrl
referenceTransaction referenceYesString1223APKKL
walletIdWallet IDYesStringmkpZED
totalAmountTotal amountYesString10.00
commissionAmountCommission amountYesString1.00
commentCommentNoStringPayPal Lemonway
countryCountryYesStringFR
cityCityYesStringParis
streetStreetYesStringSentier
postCodePostal CodeYesString75001
stateStateYesStringIle-De-France
fullNameReceiver's Full NameYesStringmike tomn
walletIpWallet IP addressYesString1.1.1.2
walletUaWallet User AgentYesStringchrome
languageLanguageNoStringen

📘

Note

The shipping address is applicable only when there is at least one physical item among the purchased items.