On this page
No Headings
Deprecation notice: TheCreates a sale, an authorized payment to be captured later, or an order. To create a sale, authorization, or order, include the payment details in the JSON request body. Set the/v1/paymentsendpoint is deprecated. Use the/v2/paymentsendpoint instead. For details, see PayPal Checkout Basic Integration.
intent to sale, authorize, or order. Note: TPP Clients (Third Party Providers in the context of PSD2 regulation) are restricted from usingInclude payer, transaction details, and, for PayPal payments only, redirect URLs. The combination of theauthorizeandorderintents.
payment_method and funding_instrument determines the type of payment that is created. For more information, see Payments REST API.Oauth 2.0 authentication
In: header
Scope: https://api.paypal.com/v1/payments/.*
length <= 32application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
curl -X POST "https://api-m.sandbox.paypal.com/v1/payments/payment" \ -H "Content-Type: application/json" \ -d '{ "intent": "sale", "payer": { "payment_method": "paypal" }, "transactions": [ { "amount": { "total": "30.11", "currency": "USD", "details": { "subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "handling_fee": "1.00", "shipping_discount": "-1.00", "insurance": "0.01" } }, "description": "The payment transaction description.", "custom": "EBAY_EMS_90048630024435", "invoice_number": "48787589673", "payment_options": { "allowed_payment_method": "INSTANT_FUNDING_SOURCE" }, "soft_descriptor": "ECHI5786786", "item_list": { "items": [ { "name": "hat", "description": "Brown hat.", "quantity": "5", "price": "3", "tax": "0.01", "sku": "1", "currency": "USD" }, { "name": "handbag", "description": "Black handbag.", "quantity": "1", "price": "15", "tax": "0.02", "sku": "product34", "currency": "USD" } ], "shipping_address": { "recipient_name": "Brian Robinson", "line1": "4th Floor", "line2": "Unit #34", "city": "San Jose", "country_code": "US", "postal_code": "95131", "phone": "011862212345678", "state": "CA" } } } ], "note_to_payer": "Contact us for any questions on your order.", "redirect_urls": { "return_url": "https://example.com/return", "cancel_url": "https://example.com/cancel" } }'{
"id": "string",
"intent": "sale",
"payer": {
"payment_method": "credit_card",
"status": "VERIFIED",
"funding_instruments": [
{
"credit_card_token": {
"credit_card_id": "string",
"payer_id": "string",
"external_customer_id": "string",
"last4": "stri",
"type": "string",
"expire_month": 1,
"expire_year": "stri"
}
}
],
"payer_info": {
"email": "user@example.com",
"salutation": "string",
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"suffix": "string",
"payer_id": "string",
"birth_date": "2019-08-24T14:15:22Z",
"tax_id": "string",
"tax_id_type": "BR_CPF",
"billing_address": {
"line1": "string",
"line2": "string",
"city": "string",
"country_code": "st",
"postal_code": "string",
"state": "string",
"phone": "string",
"normalization_status": "UNKNOWN",
"type": "string"
},
"shipping_address": {
"line1": "string",
"line2": "string",
"city": "string",
"country_code": "st",
"postal_code": "string",
"state": "string",
"phone": "string",
"normalization_status": "UNKNOWN",
"type": "string",
"recipient_name": "string"
}
}
},
"application_context": {
"brand_name": "string",
"locale": "string",
"landing_page": "string",
"shipping_preference": "NO_SHIPPING",
"user_action": "string",
"preferred_payment_source": {
"token": {
"id": "string",
"type": "BILLING_AGREEMENT"
}
},
"payment_pattern": "CUSTOMER_PRESENT_ONETIME_PURCHASE"
},
"transactions": [
{
"amount": {
"currency": "string",
"total": "string",
"details": {
"subtotal": "string",
"shipping": "string",
"tax": "string",
"handling_fee": "string",
"shipping_discount": "string",
"insurance": "string",
"gift_wrap": "string"
}
},
"payee": {
"email": "user@example.com",
"merchant_id": "string"
},
"description": "string",
"note_to_payee": "string",
"custom": "string",
"invoice_number": "string",
"soft_descriptor": "string",
"payment_options": {
"allowed_payment_method": "UNRESTRICTED"
},
"item_list": {
"items": [
{
"sku": "string",
"name": "string",
"description": "string",
"quantity": "string",
"price": "string",
"currency": "str",
"tax": "string"
}
],
"shipping_address": {
"line1": "string",
"line2": "string",
"city": "string",
"country_code": "st",
"postal_code": "string",
"state": "string",
"phone": "string",
"normalization_status": "UNKNOWN",
"type": "string",
"recipient_name": "string"
},
"shipping_method": "string",
"shipping_phone_number": "string"
},
"notify_url": "http://example.com",
"related_resources": [
{
"sale": {
"id": "string",
"amount": {
"currency": "string",
"total": "string",
"details": {
"subtotal": "string",
"shipping": "string",
"tax": "string",
"handling_fee": "string",
"shipping_discount": "string",
"insurance": "string",
"gift_wrap": "string"
}
},
"payment_mode": "INSTANT_TRANSFER",
"state": "completed",
"reason_code": "CHARGEBACK",
"protection_eligibility": "ELIGIBLE",
"protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE",
"clearing_time": "2019-08-24T14:15:22Z",
"payment_hold_status": "HELD",
"payment_hold_reasons": [
{
"payment_hold_reason": "PAYMENT_HOLD"
}
],
"transaction_fee": {
"currency": "string",
"value": "string"
},
"receivable_amount": {
"currency": "string",
"value": "string"
},
"transaction_fee_in_receivable_currency": {
"currency": "string",
"value": "string"
},
"exchange_rate": "string",
"fmf_details": {
"filter_type": "ACCEPT",
"filter_id": "AVS_NO_MATCH",
"name": "string",
"description": "string"
},
"receipt_id": "string",
"parent_payment": "string",
"processor_response": {
"response_code": "stri",
"avs_code": "s",
"cvv_code": "s",
"advice_code": "01_NEW_ACCOUNT_INFORMATION",
"eci_submitted": "string",
"vpas": "string"
},
"billing_agreement_id": "string",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
},
"authorization": {
"id": "string",
"amount": {
"currency": "string",
"total": "string",
"details": {
"subtotal": "string",
"shipping": "string",
"tax": "string",
"handling_fee": "string",
"shipping_discount": "string",
"insurance": "string",
"gift_wrap": "string"
}
},
"payment_mode": "INSTANT_TRANSFER",
"state": "pending",
"reason_code": "AUTHORIZATION",
"pending_reason": "AUTHORIZATION",
"protection_eligibility": "ELIGIBLE",
"protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE",
"fmf_details": {
"filter_type": "ACCEPT",
"filter_id": "AVS_NO_MATCH",
"name": "string",
"description": "string"
},
"parent_payment": "string",
"processor_response": {
"response_code": "stri",
"avs_code": "s",
"cvv_code": "s",
"advice_code": "01_NEW_ACCOUNT_INFORMATION",
"eci_submitted": "string",
"vpas": "string"
},
"valid_until": "2019-08-24T14:15:22Z",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"receipt_id": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
},
"order": {
"id": "string",
"amount": {
"currency": "string",
"total": "string",
"details": {
"subtotal": "string",
"shipping": "string",
"tax": "string",
"handling_fee": "string",
"shipping_discount": "string",
"insurance": "string",
"gift_wrap": "string"
}
},
"payment_mode": "INSTANT_TRANSFER",
"state": "PENDING",
"reason_code": "PAYER_SHIPPING_UNCONFIRMED",
"pending_reason": "payer_shipping_unconfirmed",
"protection_eligibility": "ELIGIBLE",
"protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE",
"parent_payment": "string",
"fmf_details": {
"filter_type": "ACCEPT",
"filter_id": "AVS_NO_MATCH",
"name": "string",
"description": "string"
},
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
},
"capture": {
"id": "string",
"amount": {
"currency": "string",
"total": "string",
"details": {
"subtotal": "string",
"shipping": "string",
"tax": "string",
"handling_fee": "string",
"shipping_discount": "string",
"insurance": "string",
"gift_wrap": "string"
}
},
"is_final_capture": false,
"state": "pending",
"reason_code": "CHARGEBACK",
"parent_payment": "string",
"invoice_number": "string",
"transaction_fee": {
"currency": "string",
"value": "string"
},
"transaction_fee_in_receivable_currency": {
"currency": "string",
"value": "string"
},
"receivable_amount": {
"currency": "string",
"value": "string"
},
"exchange_rate": "string",
"note_to_payer": "string",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
},
"refund": {
"id": "string",
"amount": {
"currency": "string",
"total": "string",
"details": {
"subtotal": "string",
"shipping": "string",
"tax": "string",
"handling_fee": "string",
"shipping_discount": "string",
"insurance": "string",
"gift_wrap": "string"
}
},
"state": "pending",
"reason": "string",
"invoice_number": "string",
"sale_id": "string",
"capture_id": "string",
"parent_payment": "string",
"description": "string",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}
}
]
}
],
"state": "created",
"experience_profile_id": "string",
"note_to_payer": "string",
"redirect_urls": {
"return_url": "http://example.com",
"cancel_url": "http://example.com"
},
"failure_reason": "UNABLE_TO_COMPLETE_TRANSACTION",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}{
"name": "string",
"message": "string",
"debug_id": "string",
"information_link": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}The payment intent. Value is:sale. Makes an immediate payment.authorize. Authorizes a payment for capture later.order. Creates an order.
"sale" | "authorize" | "order"The source of the funds for this payment. Payment method is PayPal Wallet payment or bank direct debit.
Use the application context resource to customize payment flow experience for your buyers.
An array of payment-related transactions. A transaction defines what the payment is for and who fulfills the payment. For update and execute payment calls, the transactions object accepts the amount object only.
Deprecated. The PayPal-generated ID for the merchant's payment experience profile. For information, see create web experience profile. Use application_context instead.
A free-form field that clients can use to send a note to the payer.
length <= 165A set of redirect URLs that you provide for PayPal-based payments.