Skip to main content
PUT
/
v1
/
checkout
/
payment-resources
/
{id}
Replace a payment resource
curl --request PUT \
  --url https://api.paypal.com/v1/checkout/v1/checkout/payment-resources/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "integration_mode": "LINK",
  "type": "BUY_NOW",
  "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
      }
    }
  ]
}
'
{
  "name": "<string>",
  "message": "<string>",
  "debug_id": "<string>",
  "details": [
    {
      "issue": "<string>",
      "field": "<string>",
      "value": "<string>",
      "location": "body",
      "links": [
        {
          "href": "<string>",
          "rel": "<string>",
          "method": "GET"
        }
      ],
      "description": "<string>"
    }
  ],
  "links": [
    {
      "href": "<string>",
      "rel": "<string>",
      "method": "GET"
    }
  ]
}

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
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

Body

application/json

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
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
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
return_url
string<uri>

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

Required string length: 1 - 1024
line_items
Line Item of Payment Resource · object[]

List of individual item in payment resource.

Required array length: 1 - 20 elements

Response

A successful request returns the HTTP 204 No Content status code with no JSON response body.