On this page
No Headings
PayPalJWT PayPal-supplied JWT token for authenticating merchant API requests.
Important: These JWT tokens are issued and managed by PayPal, not generated by merchants. PayPal provides these tokens to authenticate calls to your merchant API endpoints.
Usage:
Example:
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
In: header
The cart identifier
PayPal-supplied JWT token for authentication
Request content type
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://your-domain.com/api/paypal/v1/merchant-cart/CART-123/checkout" \ -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..." \ -H "Content-Type: application/json" \ -H "Content-Type: application/json" \ -d '{ "payment_method": { "type": "paypal", "token": "EC-7U8939823K567", "payer_id": "PAYER123456789" }, "items": [ { "variant_id": "JEANS-SLIM-32", "parent_id": "JEANS-SLIM-COLLECTION", "quantity": 2 } ], "customer": { "name": { "given_name": "John", "surname": "Smith" }, "email_address": "john.smith@example.com", "phone": { "country_code": "1", "national_number": "5551234567" } }, "shipping_address": { "address_line_1": "123 Main Street", "address_line_2": "Apt 4B", "admin_area_2": "San Jose", "admin_area_1": "CA", "postal_code": "95131", "country_code": "US" }, "billing_address": { "address_line_1": "456 Payment Boulevard", "address_line_2": "Suite 789", "admin_area_2": "New York", "admin_area_1": "NY", "postal_code": "10001", "country_code": "US" } }'{
"id": "CART-123",
"status": "COMPLETED",
"validation_status": "VALID",
"validation_issues": [],
"payment_confirmation": {
"merchant_order_number": "ORDER-789",
"order_review_page": "https://yourstore.com/orders/789"
},
"totals": {
"total": {
"currency_code": "USD",
"value": "37.19"
}
}
}{
"name": "INVALID_REQUEST",
"message": "Payment method is required for checkout",
"debug_id": "ERROR-400-CHECKOUT-001",
"details": [
{
"field": "payment_method",
"issue": "MISSING_REQUIRED_FIELD",
"description": "Payment method with token and payer_id is required"
}
]
}{
"name": "CART_NOT_FOUND",
"message": "Cart with ID does not exist",
"debug_id": "ERROR-404-67890"
}{
"name": "UNPROCESSABLE_ENTITY",
"message": "Payment was declined",
"details": [
{
"field": "payment_method",
"issue": "PAYMENT_DECLINED",
"description": "Payment was declined by the payment processor"
}
]
}{
"name": "INTERNAL_SERVER_ERROR",
"message": "A temporary system error occurred. Please try again later.",
"debug_id": "ERROR-500-33445"
}Available shipping methods with selection state
Products in the cart
1 <= itemsRepresents customer information for the shopping cart.
International shipping address for cart delivery.
Billing address for merchant business purposes, obtained from customer's PayPal profile. Similar to shipping addresses, billing addresses can be retrieved from customer's default address information stored in their PayPal account.
When Billing Address is Available:
Primary Use Cases:
Secondary Use Cases:
Note: Payment verification (AVS) and chargeback protection are handled by PayPal internally.
Implementation Notes:
Payment method information for PayPal Cart API. This API is specifically designed for PayPal's shopping cart service, so only PayPal payment methods are supported.
Payment Flow:
Billing Address Behavior:
Note: Other payment methods (credit cards, Apple Pay, etc.) would be handled by separate merchant payment systems outside of this PayPal Cart API.
Custom checkout fields (age verification, etc.)
Discount coupons to apply or remove from cart
Optional precise location coordinates for enhanced delivery services