Update the Payment Selection Page

Last updated: Aug 15th, 7:47am

For PayPal Plus for Brazil, see the Brazilian integration guide.

When a payment selection causes changes to the displayed fields in your payment flow, you might PATCH the payment and reload the payment selection page.

This example demonstrates how to issue a patch request.

    1curl -v -X PATCH https://api-m.sandbox.paypal.com/v1/payments/payment/<Payment-Id>
    2 -H 'Content-Type: application/json' \
    3 -H 'Authorization: Bearer <Access-Token>' \
    4 -d '{
    5 {
    6 "op": "replace",
    7 "path": "/transactions/0/amount",
    8 "value": {
    9 "total": "25.00",
    10 "currency": " BRL ",
    11 "details": {
    12 "subtotal": "20.00",
    13 "shipping": "5.00"
    14 }
    15 }
    16 }, {
    17 "op": "add",
    18 "path": "/transactions/0/item_list/shipping_address",
    19 "value": {
    20 "recipient_name": "Max Santos",
    21 "line1": "Greg?rio Rolim de Oliveira, 42",
    22 "city": "Votorantim",
    23 "postal_code": "18117-134",
    24 "country_code": "BR"
    25 }
    26 }
    27}'

    If the call succeeds, the response returns the HTTP 204 No Content status code.

    Next