
The
Adaptive Payments API allows you to send money in various ways: from simple to complex. For example, you can create a small application for sending money in social networks or a stable payment system.
The Adaptive Payments system processes payments between their sender and one or more recipients. You are the owner of the application (the merchant owning the website, the owner of the widget in the social network, the provider of payment applications on mobile phones, etc.). Your application is a subscriber of the Adaptive Payments system.
With many applications, you can be both the owner of the application and the recipient. For example, as the owner of a website, you are the recipient of payments from senders (your customers). The following diagram shows the relationship between the sender, you, as the payee, and PayPal:
')

You do not need to be a recipient. For example, if you own a shopping basket, you do not need to receive payments directly. You can arrange the passage of payment from the sender to the recipients, who, in fact, sell the goods. The following diagram shows the relationship between the payer, you, as the owner of the application that sends payments to the recipient, and PayPal:

The chart shows a payment that the payer sends to multiple recipients in parallel payments. With such parallel payments, the sender can see the transactions to each recipient.
The following diagram shows the relationship between the sender, you, as the owner of the application that sends the payment to the recipients, and PayPal in the chain payment:

In a chain payment, the payer sends a payment to the primary recipient, from which the primary recipient pays the secondary recipients. Only the primary beneficiary is known to the payer, but the secondary ones are not known. Secondary recipients know only the primary recipient, but not the sender.
The following diagram shows the relationship between you, as the sender, and the owner of the application, which directs payments to the recipients:

For example, you can use this configuration in sales commission applications that transfer funds intended for commission from your account to the account of your sales managers.
Simple, Parallel and Chain Payments
The system of adaptive payments provides several types of payments: simple, parallel and chain. Each of these types you can create using PayAPI.
Simple payments allow the payer to send a single payment to a single payee. For example, your website may use Adaptive Payments to send money from a sale from your customer’s PayPal account to your own. This is the traditional method of payment.
Parallel payments allow the payer to send one payment to multiple recipients. For example, your application may be a “shopping cart” that allows a buyer to pay for goods from several sellers in one payment. Your “basket” collects payments to sellers who directly sell goods. PayPal then withdraws money from the payer's account and places it on the recipient account.
Chain payments allow the payer to send a separate payment to the primary recipient. The primary beneficiary saves part of the payment and pays the balance to the secondary beneficiaries. For example, your application may be an online travel agency that issues a booking of airline tickets, hotels and car rental. The payer sees only the primary recipient. You receive a payment that includes payment for services provided by third parties and your commission. PayPal withdraws money from the payer's account and places it on your account and on accounts of secondary recipients.

Payment approval
The sender must approve the payment. He can do this on paypal.com, choosing the appropriate method of approval: each payment separately, in advance or, if the sender is your application, indirectly approve payments.
There are 3 ways to approve a payment:
Direct payment approval when the payer enters paypal.com in their account to approve each payment. Directly approved payments are a familiar PayPal operation. This is the only option unless the payer has set up a prior approval agreement or you, an API subscriber, are also a payer.
For preapproved payments, the sender enters PayPal and sets up a preliminary approval for subsequent payments or sets up a preliminary approval in the “inserted” order of payment.
The sender comes to paypal.com once to install prior approval. After the sender consents to prior approval,
additional approval is no longer necessary.
Indirect payment approval is necessary when your application is both a sender of payment and a PayAPI Adaptive Payer subscriber. In this case, PayPal makes a payment from your own account, which reduces the need for approval.
Adaptive Payments Service Permit
There are two categories of services: standard, not requiring special permission for use, and advanced, which require PayPal approval. You can request approval to use the service by submitting an application to PayPal.
You can use standard services without special permission:
- the use of simple or parallel payments that require the direct approval of the sender;
- making simple or parallel payments that require the direct approval of the sender;
- receipt of payment details;
- making a refund;
- performing currency conversion.
Direct payment approval process
For direct payment approval, go to paypal.com to approve the payment. You can control the connection between your application and PayPal by specifying redirection links in various situations.
The following diagram shows the standard course of payment control (for example, payment for goods in a basket in an online store), which requires the sender to approve payment via paypal.com:

Pre-payment approval process
To pre-approve a payment, the sender must go to paypal.com to establish a payment agreement with a specific vendor.
You can control the connection between your application and PayPal by specifying the link to redirect in various situations.
The payer enters paypal.com, establishes a preliminary approval, which includes the following information settings:
- the duration of prior approval;
- the maximum possible preapproved amount;
- maximum number of payments.
The following diagram shows the standard course of payment control with prior approval:

Indirect payment approval process
Indirectly approved payments are those in which the sender and API subscriber use the same account. Since PayPal withdraws payments for payments from your own account, there is no need for approval, and there is no visible process for indirect approval as such.
The following diagram shows the standard control process during indirect approval of payments:

Embedded payments
An embedded payment is a payment that initiates a visual representation of the Adaptive Payments process when the sender does not seem to have left the “to the cashier” or “payment” page. Built-in payments make it easier for the sender to pay, because PayPal can allow it to skip the login and password entry procedure.
Types of embedded payments
Embedded payments may include:
- simple payments;
- parallel payments;
- chain payments.
You can also authorize prior approval for future payments, or allow you to associate a shipping address with an embedded payment.
Basics of Embedded Payment Implementation
To implement an embedded payment process, you must
- Enable javascript code from paypal on your cashier or payment page
- use the functions available in JavaScript to coordinate the PayPal process with the display on your page;
- launch the preferred embedded payment process, which is either a banner ad (lightbox) or mini-browser, and redirects the payer's browser to a PayPal address that supports embedded payments, namely www.paypal.com/webapps/adaptivepayment/flow/pay?paykey= ..
Payment Fee Configuration
You can set up a transaction in such a way that either the sender or the recipient pays the payment commission. If the beneficiary pays the commission, then you can set the payer of the commission to either the primary beneficiary, or all the beneficiaries pay part of the commission.
Thanks