Skip to main content
GET
/
v1
/
checkout
/
payment-resources
/
{id}
Retrieve a payment resource
curl --request GET \
  --url https://api.paypal.com/v1/checkout/v1/checkout/payment-resources/{id} \
  --header 'Authorization: Bearer <token>'
{
  "integration_mode": "LINK",
  "type": "BUY_NOW",
  "id": "<string>",
  "payment_link": "<string>",
  "links": [
    {
      "href": "<string>",
      "rel": "<string>",
      "method": "GET"
    }
  ],
  "create_time": "<string>",
  "update_time": "<string>",
  "status": "ACTIVE",
  "reusable": "MULTIPLE",
  "return_url": "<string>",
  "line_items": [
    {
      "name": "<string>",
      "product_id": "<string>",
      "description": "<string>",
      "unit_amount": {
        "currency_code": "<string>",
        "value": "<string>"
      },
      "taxes": [
        {
          "type": "PERCENTAGE",
          "value": "<string>",
          "name": "<string>"
        }
      ],
      "shipping": [
        {
          "type": "FLAT",
          "value": "<string>"
        }
      ],
      "collect_shipping_address": true,
      "customer_notes": [
        {
          "required": true,
          "label": "<string>"
        }
      ],
      "variants": {
        "dimensions": [
          {
            "name": "<string>",
            "primary": true,
            "options": [
              {
                "label": "<string>",
                "unit_amount": {
                  "currency_code": "<string>",
                  "value": "<string>"
                }
              }
            ]
          }
        ]
      },
      "adjustable_quantity": {
        "maximum": 50
      }
    }
  ],
  "code_snippets": {
    "single": {
      "body": "<string>"
    },
    "stacked": [
      {
        "framework": "HTML",
        "head": "<string>",
        "body": "<string>",
        "button_placement": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Oauth 2.0 authentication.

Headers

Content-Type
string

The media type. Required for operations with a request body. The value is application/<format>, where format is json.

Required string length: 1 - 255
Pattern: ^[A-Za-z0-9/+-]+$
PayPal-Auth-Assertion
string

An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion.

Path Parameters

id
string
required

The payment resource id for which to show details.

Required string length: 1 - 127
Pattern: ^[A-Z]{3}-[A-Z0-9]+$

Response

A successful request returns the HTTP 200 OK status code with a JSON response body that shows payment resource details.

Detailed response for Payment resource, which include code snippets for payment resources.

integration_mode
enum<string>
required

Determines how the payment resource is presented to customers. Currently, only LINK is supported, which generates a PayPal-hosted payment page with a shareable URL. This value is immutable after creation.

Available options:
LINK
Required string length: 1 - 20
Pattern: ^[A-Z0-9_]+$
type
enum<string>
required

The type of payment resource. Once a payment resource is created, this field cannot be changed.

Available options:
BUY_NOW
Required string length: 1 - 20
Pattern: ^[A-Z0-9_]+$
id
string

Unique identifier for the payment resource (link or button).

Required string length: 1 - 127
Pattern: ^[A-Z]{3}-[A-Z0-9]+$

The generated payment link URL for the transaction (present if integration_mode is link).

Required string length: 1 - 200
Pattern: ^.*$

An array of related HATEOAS links.

Required array length: 1 - 20 elements
create_time
string<ppaas_date_time_v3>

The date and time that this payment resource was created.

Required string length: 20 - 64
Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
update_time
string<ppaas_date_time_v3>

The date and time that the payment resource was updated.

Required string length: 20 - 64
Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
status
enum<string>
default:ACTIVE

Status of the payment resource.

Available options:
ACTIVE,
INACTIVE
Required string length: 1 - 20
Pattern: ^[A-Z0-9_]+$
reusable
enum<string>
default:MULTIPLE

Indicates if the payment resource can be used multiple times or only once.

Available options:
MULTIPLE
Required string length: 1 - 20
Pattern: ^[A-Z0-9_]+$
return_url
string<uri>

URL to which the customer is redirected after completing the transaction.

Required string length: 1 - 1024
Pattern: ^.*$
line_items
Line Item of Payment Resource · object[]

List of individual item in payment resource.

Required array length: 1 - 20 elements
code_snippets
Code snippets · object

Code snippets holds the code needed to inject payment resources for merchant experience.