On this page
No Headings
Deprecation notice: ThePartially updates a payment, by ID. You can update the amount, shipping address, invoice ID, and custom data. You cannot update a payment after the payment executes./v1/paymentsendpoint is deprecated. Use the/v2/paymentsendpoint instead. For details, see PayPal Checkout Basic Integration.
Note: TPP Clients (Third Party Providers in the context of PSD2 regulation) are restricted from patching amount once authorized.
Oauth 2.0 authentication
In: header
Scope: https://api.paypal.com/v1/payments/.*
The ID of the payment to execute.
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
curl -X PATCH "https://api-m.sandbox.paypal.com/v1/payments/payment/string" \ -H "Content-Type: application/json" \ -d '[ { "op": "replace", "path": "/transactions/0/amount", "value": { "total": "18.37", "currency": "EUR", "details": { "subtotal": "13.37", "shipping": "5.00" } } }, { "op": "add", "path": "/transactions/0/item_list/shipping_address", "value": { "recipient_name": "Anna Gruneberg", "line1": "Kathwarinenhof 1", "city": "Flensburg", "postal_code": "24939", "country_code": "DE" } } ]'{
"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"
}
]
}