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
Item | Description | Mandatory | Format | Example |
---|---|---|---|---|
returnUrl | Return URL after successful payment | Yes | String | http://www.marketplace.com/ok |
errorUrl | URL for handling payment errors | Yes | String | http://www.marketplace.com/ko |
cancelUrl | URL for cancelling payment | Yes | String | http://www.marketplace.com/cancelUrl |
reference | Transaction reference | Yes | String | 1223APKKL |
walletId | Wallet ID | Yes | String | mkpZED |
totalAmount | Total amount | Yes | String | 10.00 |
commissionAmount | Commission amount | Yes | String | 1.00 |
comment | Comment | No | String | PayPal Lemonway |
country | Country | Yes | String | FR |
city | City | Yes | String | Paris |
street | Street | Yes | String | Sentier |
postCode | Postal Code | Yes | String | 75001 |
state | State | Yes | String | Ile-De-France |
fullName | Receiver's Full Name | Yes | String | mike tomn |
walletIp | Wallet IP address | Yes | String | 1.1.1.2 |
walletUa | Wallet User Agent | Yes | String | chrome |
language | Language | No | String | en |
Note
The shipping address is applicable only when there is at least one physical item among the purchased items.