Money requests

DOCS

Last updated: Sept 23rd, 10:01pm

Use the Money Requests API to request money between friends and family. All transactions are free of charge except credit card transactions. Payments for goods or services include a fee that one of the involved parties pay.

Know before you code

  • Complete the steps in Get started to get the following sandbox account information from the Developer Dashboard:
    • Your client ID
    • Your personal and business sandbox accounts
  • You can make group and child money requests:
    • Group — Split the cost of dinner among friends or raise money for a fund raiser.
    • Child — Add another friend to group dinner bill or remind a friend to pay their share of the bill.
  • This integration uses the Money Requests API

Step 1: Create a group money request

A group money request asks members of a group to pay their part of a shared cost.

Sample request

The event for this sample group request is dinner at the Taj restaurant. Two group members attended the event:

  • The first member, or requestee, is notified about the request by phone and owes 100 U.S. dollars.
  • The second requestee is notified by email and owes 100 euros.

API endpoint used: Create group money request

    1curl -v -X POST https://api-m.sandbox.paypal.com/v1/payments/money-requests/ \
    2 -H "Content-Type: application/json" \
    3 -H "Authorization: Bearer <Access-Token>" \
    4 -d '{
    5 "event_title": "Dinner At Taj",
    6 "event_time": "2020-01-31T04:12:02Z",
    7 "requests": [{
    8 "note": "Dollars for your share of dinner",
    9 "amount": {
    10 "currency": "USD",
    11 "value": "100"
    12 },
    13 "requestee": {
    14 "id": "+1 4088363374",
    15 "type": "PHONE"
    16 }
    17 }, {
    18 "note": "Euros for your share of dinner",
    19 "amount": {
    20 "currency": "EUR",
    21 "value": "100"
    22 },
    23 "requestee": {
    24 "id": "cdayanand-per@paypal.com",
    25 "type": "EMAIL"
    26 }
    27 }]
    28}'

    Modify the code

    After you copy the code in the sample request, modify the following:

    • Change Access-Token to your access token.
    • Change details about the request to fit the actual event and requestees.

    Step result

    A successful request returns the following:

    • A return status code of HTTP 200 OK.
    • A JSON response body that contains an ID for the call request and details about the money request. You can use this ID to complete other actions through the REST API, such as sending request reminders to requestees.

    Sample response

      1{
      2 "id": "U-377340176H629572Y",
      3 "event_title": "Dinner At Taj",
      4 "event_time": "2013-01-31T04:12:02Z",
      5 "user_role": "REQUESTER",
      6 "requests": [
      7 {
      8 "id": "U-5P370308L27577715",
      9 "time_created": "2014-11-19T11:00:42Z",
      10 "note": "Dollars for your share of dinner",
      11 "status": "SENT",
      12 "amount": {
      13 "value": "100",
      14 "currency": "USD"
      15 },
      16 "requestee": {
      17 "name": "Chinta Raja Dayanand PER",
      18 "id": "+1 4088363374",
      19 "type": "PHONE",
      20 "given_name": "Dayanand PER",
      21 "surname": "Chinta Raja",
      22 "alternate_full_name": "Dayanand PER Chinta Raja",
      23 "payer_id": "BRWGTZJZC79DW",
      24 "account_type": "PERSONAL"
      25 },
      26 "links": [
      27 {
      28 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-5P370308L27577715",
      29 "rel": "self",
      30 "method": "GET"
      31 },
      32 {
      33 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-5P370308L27577715",
      34 "rel": "update",
      35 "method": "PATCH"
      36 },
      37 {
      38 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-5P370308L27577715/cancel",
      39 "rel": "cancel",
      40 "method": "POST"
      41 },
      42 {
      43 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-5P370308L27577715/remind",
      44 "rel": "remind",
      45 "method": "POST"
      46 },
      47 {
      48 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-5P370308L27577715/mark-as-paid",
      49 "rel": "mark-as-paid",
      50 "method": "POST"
      51 },
      52 {
      53 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-5P370308L27577715/funding-options",
      54 "rel": "funding-options",
      55 "method": "POST"
      56 },
      57 {
      58 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-5P370308L27577715/pay",
      59 "rel": "pay",
      60 "method": "POST"
      61 }]
      62 },
      63 {
      64 "id": "U-2NW143491P9849701",
      65 "time_created": "2014-11-19T11:00:42Z",
      66 "note": "Euros for your share of dinner",
      67 "status": "SENT",
      68 "amount": {
      69 "value": "100",
      70 "currency": "EUR"
      71 },
      72 "requestee": {
      73 "name": "Chinta Raja Dayanand PER",
      74 "id": "cdayanand-per@paypal.com",
      75 "type": "EMAIL",
      76 "given_name": "Dayanand PER",
      77 "surname": "Chinta Raja",
      78 "alternate_full_name": "Dayanand PER Chinta Raja",
      79 "payer_id": "BRWGTZJZC79DW",
      80 "account_type": "PERSONAL"
      81 },
      82 "links": [
      83 {
      84 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-2NW143491P9849701",
      85 "rel": "self",
      86 "method": "GET"
      87 },
      88 {
      89 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-2NW143491P9849701",
      90 "rel": "update",
      91 "method": "PATCH"
      92 },
      93 {
      94 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-2NW143491P9849701/cancel",
      95 "rel": "cancel",
      96 "method": "POST"
      97 },
      98 {
      99 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-2NW143491P9849701/remind",
      100 "rel": "remind",
      101 "method": "POST"
      102 },
      103 {
      104 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-2NW143491P9849701/mark-as-paid",
      105 "rel": "mark-as-paid",
      106 "method": "POST"
      107 },
      108 {
      109 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-2NW143491P9849701/funding-options",
      110 "rel": "funding-options",
      111 "method": "POST"
      112 },
      113 {
      114 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests/U-2NW143491P9849701/pay",
      115 "rel": "pay",
      116 "method": "POST"
      117 }]
      118 }],
      119 "links": [
      120 {
      121 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y",
      122 "rel": "self",
      123 "method": "GET"
      124 },
      125 {
      126 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/requests",
      127 "rel": "add",
      128 "method": "POST"
      129 },
      130 {
      131 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y",
      132 "rel": "update",
      133 "method": "PATCH"
      134 },
      135 {
      136 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/cancel",
      137 "rel": "cancel",
      138 "method": "POST"
      139 },
      140 {
      141 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/remind",
      142 "rel": "remind",
      143 "method": "POST"
      144 },
      145 {
      146 "href": "https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-377340176H629572Y/mark-as-paid",
      147 "rel": "mark-as-paid",
      148 "method": "POST"
      149 }]
      150}

      Step 2: Make a child request

      Make child requests to add other friends to the group bill or to remind a friend to pay their share.

      Sample request

      This sample adds a friend to the group money request.

      API endpoint used: Add children to group money request

        1curl -v -X POST https://api-m.sandbox.paypal.com/v1/payments/money-requests/U-6NW18119BN943780C/requests \
        2 -H "Content-Type: application/json" \
        3 -H "Authorization: Bearer <Access-Token>" \
        4 -d '{
        5 "requests": [{
        6 "note": "Only food for you",
        7 "amount": {
        8 "currency": "USD",
        9 "value": "100"
        10 },
        11 "requestee": {
        12 "id": "+1 4088313374",
        13 "type": "PHONE"
        14 }
        15 }, {
        16 "note": "Only drinks for you",
        17 "amount": {
        18 "currency": "EUR",
        19 "value": "100"
        20 },
        21 "requestee": {
        22 "id": "cdayanand-pre@paypal.com",
        23 "type": "EMAIL"
        24 }
        25 }]
        26}'

        Modify the code

        After you copy the code in the sample request, modify the following:

        • Change Access-Token to your access token.
        • Change the id to your group money request ID.
        • Change details about the request to fit the actual event and requestees.

        Step result

        A successful request results in the following:

        • A return status code of HTTP 200 OK.
        • A JSON response body that contains an new ID for the call request and details about the money request. Use the new ID for other child requests such as sending reminders.

        See also