JDBC Driver for PayPal

Build 22.0.8462

CreatePayouts

Makes payouts in Paypal.

Table Specific Information

Payout Items

You cannot create a payout without payout items. To create payout items, you must insert data either using a JSON aggregate or via temporary table called 'PayoutItem#TEMP'. Refer to the following examples for more information.

Example: Create payouts using JSON aggregate

EXECUTE CreatePayouts SenderBatchId='1247', EmailSubject='You have a payout!', EmailMessage='You have received a payout! Thanks for using our service!', PayoutItem='[{\n" +
          "\"recipient_type\": \"EMAIL\",\n" +
          "\"amount\": {\n" +
          "\"value\": \"0.0\",\n" +
          "\"currency\": \"USD\"\n" +
          "},\n" +
          "\"note\": \"Thanks for your patronage3333!\",\n" +
          "\"receiver\": \"[email protected]\",\n" +
          "\"sender_item_id\": \"201403140001\"\n" +
          "}, {\n" +
          "\"recipient_type\": \"PHONE\",\n" +
          "\"amount\": {\n" +
          "\"value\": \"0.0\",\n" +
          "\"currency\": \"USD\"\n" +
          "\t},\n" +
          "\"note\": \"Thanks for your support!\",\n" +
          "\"receiver\": \"91-734-234-1234\",\n" +
          "\"sender_item_id\": \"201403140002\"\n" +
          "}\n" +
          "]'

Example: Create payouts using temp table

You first need to insert into PayoutItem#TEMP to create payout items.

INSERT INTO PayoutItem#TEMP(RecipientType,AmountValue,AmountCurrency,Note,SenderItemId,Receiver) VALUES ('EMAIL','3.2','USD','Thanks for your patronage!', '201403140001', '[email protected]')
INSERT INTO PayoutItem#TEMP(RecipientType,AmountValue,AmountCurrency,Note,SenderItemId,Receiver) VALUES ('PHONE','8.98','USD','Thanks for your support!', '201403140002', '91-734-234-1234')

Execute

After creating at least one payout item, you can execute the stored procedure.

EXECUTE CreatePayouts SenderBatchId='123', EmailSubject='You have a payout!', EmailMessage='You have received a payout! Thanks for using our service!'

The following columns are required to create a payout item:

  • RecipientType
  • AmountValue
  • AmountCurrency
  • SenderItemId
  • Receiver

Input

Name Type Required Description
SenderBatchId String True A sender-specified ID number. Tracks the payout in an accounting system.
EmailSubject String False The subject line for the email that PayPal sends when payment for a payout item completes. The subject line is the same for all recipients.
EmailMessage String False The email message that PayPal sends when the payout item completes. The message is the same for all recipients.
PayoutItems String False A JSON aggregate which contains an array of individual payout items

Result Set Columns

Name Type Description
PayoutBatchId String The PayPal-generated ID for the payout.
BatchStatus String The PayPal-generated payout status. If the payout passes preliminary checks, the status is PENDING.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462