PayPal · Example Payload

Paypal Subscriptionscreate Example

BillingCommerceDisputesInvoicesOrdersPaymentsPayoutsSubscriptionsTokensWebhooks

Paypal Subscriptionscreate Example is an example object payload from PayPal, with 6 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

operationIdmethodpathsummaryrequestExamplesresponseExamples

Example Payload

Raw ↑
{
  "operationId": "subscriptions.create",
  "method": "POST",
  "path": "/v1/billing/subscriptions",
  "summary": "Paypal Create subscription",
  "requestExamples": [
    {
      "contentType": "application/json",
      "name": "subscription_request_post",
      "example": {
        "plan_id": "P-5ML4271244454362WXNWU5NQ",
        "start_time": "2018-11-01T00:00:00Z",
        "quantity": "20",
        "shipping_amount": {
          "currency_code": "USD",
          "value": "10.00"
        },
        "subscriber": {
          "name": {
            "given_name": "John",
            "surname": "Doe"
          },
          "email_address": "customer@example.com",
          "shipping_address": {
            "name": {
              "full_name": "John Doe"
            },
            "address": {
              "address_line_1": "2211 N First Street",
              "address_line_2": "Building 17",
              "admin_area_2": "San Jose",
              "admin_area_1": "CA",
              "postal_code": "95131",
              "country_code": "US"
            }
          }
        },
        "application_context": {
          "brand_name": "walmart",
          "locale": "en-US",
          "shipping_preference": "SET_PROVIDED_ADDRESS",
          "user_action": "SUBSCRIBE_NOW",
          "payment_method": {
            "payer_selected": "PAYPAL",
            "payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED"
          },
          "return_url": "https://example.com/returnUrl",
          "cancel_url": "https://example.com/cancelUrl"
        }
      }
    }
  ],
  "responseExamples": [
    {
      "status": "200",
      "contentType": "application/json",
      "name": "subscription",
      "example": {
        "id": "I-BW452GLLEP1G",
        "status": "APPROVAL_PENDING",
        "status_update_time": "2018-12-10T21:20:49Z",
        "plan_id": "P-5ML4271244454362WXNWU5NQ",
        "plan_overridden": false,
        "start_time": "2018-11-01T00:00:00Z",
        "quantity": "20",
        "shipping_amount": {
          "currency_code": "USD",
          "value": "10.00"
        },
        "subscriber": {
          "name": {
            "given_name": "John",
            "surname": "Doe"
          },
          "email_address": "customer@example.com",
          "payer_id": "2J6QB8YJQSJRJ",
          "shipping_address": {
            "name": {
              "full_name": "John Doe"
            },
            "address": {
              "address_line_1": "2211 N First Street",
              "address_line_2": "Building 17",
              "admin_area_2": "San Jose",
              "admin_area_1": "CA",
              "postal_code": "95131",
              "country_code": "US"
            }
          }
        },
        "create_time": "2018-12-10T21:20:49Z",
        "links": [
          {
            "href": "https://www.paypal.com/webapps/billing/subscriptions?ba_token=BA-2M539689T3856352J",
            "rel": "approve",
            "method": "GET"
          },
          {
            "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G",
            "rel": "edit",
            "method": "PATCH"
          },
          {
            "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G",
            "rel": "self",
            "method": "GET"
          }
        ]
      }
    },
    {
      "status": "201",
      "contentType": "application/json",
      "name": "subscription",
      "example": {
        "id": "I-BW452GLLEP1G",
        "status": "APPROVAL_PENDING",
        "status_update_time": "2018-12-10T21:20:49Z",
        "plan_id": "P-5ML4271244454362WXNWU5NQ",
        "plan_overridden": false,
        "start_time": "2018-11-01T00:00:00Z",
        "quantity": "20",
        "shipping_amount": {
          "currency_code": "USD",
          "value": "10.00"
        },
        "subscriber": {
          "name": {
            "given_name": "John",
            "surname": "Doe"
          },
          "email_address": "customer@example.com",
          "payer_id": "2J6QB8YJQSJRJ",
          "shipping_address": {
            "name": {
              "full_name": "John Doe"
            },
            "address": {
              "address_line_1": "2211 N First Street",
              "address_line_2": "Building 17",
              "admin_area_2": "San Jose",
              "admin_area_1": "CA",
              "postal_code": "95131",
              "country_code": "US"
            }
          }
        },
        "create_time": "2018-12-10T21:20:49Z",
        "links": [
          {
            "href": "https://www.paypal.com/webapps/billing/subscriptions?ba_token=BA-2M539689T3856352J",
            "rel": "approve",
            "method": "GET"
          },
          {
            "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G",
            "rel": "edit",
            "method": "PATCH"
          },
          {
            "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G",
            "rel": "self",
            "method": "GET"
          }
        ]
      }
    }
  ]
}