Pay another account

DocsCurrentDirect merchant

Last updated: Apr 10th, 8:03pm

By default, money is paid to the application owner in their own account. The account receiving funds is known as the payee.

To specify a different payee when you create an order:

  1. Add the payee object to the transaction payload.
  2. Include the email_address or merchant_id of the account to receive the payment.

Sample request

    1async function createOrder() {
    2 // Create accessToken using your clientID and clientSecret
    3 // For the full stack example, please see the Standard Integration guide at
    4 // https://developer.paypal.com/docs/checkout/standard/integrate/
    5 const accessToken = "REPLACE_WITH_YOUR_ACCESS_TOKEN"
    6 return fetch("https://api-m.sandbox.paypal.com/v2/checkout/orders", {
    7 method: "POST",
    8 headers: {
    9 "Content-Type": "application/json",
    10 Authorization: `Bearer ${accessToken}`,
    11 },
    12 body: JSON.stringify({
    13 intent: "CAPTURE",
    14 purchase_units: [{
    15 amount: {
    16 value: "15.00",
    17 currency_code: "USD",
    18 },
    19 payee: {
    20 email_address: "payee@exmple.com",
    21 },
    22 }, ],
    23 }),
    24 })
    25 .then((response) => response.json())
    26 .then((data) => console.log(data));
    27}