On this page
No Headings
Oauth 2.0 authentication.
In: header
Scope: https://uri.paypal.com/services/checkout/payment-resources
The server stores keys for 6 hours.
^[0-9a-zA-Z_-]+$1 <= length <= 108The media type. Required for operations with a request body. The value is application/<format>, where format is json.
^[A-Za-z0-9/+-]+$1 <= length <= 255An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion.
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.paypal.com/v1/checkout/v1/checkout/payment-resources" \ -H "PayPal-Request-Id: string" \ -H "Content-Type: application/json" \ -d '{ "integration_mode": "LINK", "type": "BUY_NOW" }'{
"id": "string",
"payment_link": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"create_time": "stringstringstringst",
"update_time": "stringstringstringst",
"status": "ACTIVE",
"integration_mode": "LINK",
"type": "BUY_NOW",
"reusable": "MULTIPLE",
"return_url": "http://example.com",
"line_items": [
{
"name": "string",
"product_id": "string",
"description": "string",
"unit_amount": {
"currency_code": "str",
"value": "string"
},
"taxes": [
{
"name": "string",
"type": "PERCENTAGE",
"value": "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": "str",
"value": "string"
}
}
]
}
]
},
"adjustable_quantity": {
"maximum": 1
}
}
],
"code_snippets": {
"single": {
"body": "string"
},
"stacked": [
{
"framework": "HTML",
"head": "string",
"body": "string",
"button_placement": "string"
}
]
}
}{
"id": "string",
"payment_link": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"create_time": "stringstringstringst",
"update_time": "stringstringstringst",
"status": "ACTIVE",
"integration_mode": "LINK",
"type": "BUY_NOW",
"reusable": "MULTIPLE",
"return_url": "http://example.com",
"line_items": [
{
"name": "string",
"product_id": "string",
"description": "string",
"unit_amount": {
"currency_code": "str",
"value": "string"
},
"taxes": [
{
"name": "string",
"type": "PERCENTAGE",
"value": "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": "str",
"value": "string"
}
}
]
}
]
},
"adjustable_quantity": {
"maximum": 1
}
}
],
"code_snippets": {
"single": {
"body": "string"
},
"stacked": [
{
"framework": "HTML",
"head": "string",
"body": "string",
"button_placement": "string"
}
]
}
}{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}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.
^[A-Z0-9_]+$1 <= length <= 20"LINK"The type of payment resource. Once a payment resource is created, this field cannot be changed.
^[A-Z0-9_]+$1 <= length <= 20"BUY_NOW"Indicates if the payment resource can be used multiple times or only once.
"MULTIPLE"^[A-Z0-9_]+$1 <= length <= 20"MULTIPLE"URL to which the customer is redirected after completing the transaction.
^.*$uri1 <= length <= 1024List of individual item in payment resource.
1 <= items <= 20