shipping_amount
, shipping_address
values for the subscription. This type of update requires the buyer's consent.username:password
Authorization: Basic *****************
{
"plan_id": "{{billing_plan_id}}",
"shipping_amount": {
"currency_code": "USD",
"value": "10.00"
},
"shipping_address": {
"name": {
"full_name": "John Doe"
},
"address": {
"address_line_1": "2211 N First Street",
"address_line_2": "Building 17",
"admin_area_2": "San Jose",
"admin_area_1": "CA",
"postal_code": "95131",
"country_code": "US"
}
},
"application_context": {
"brand_name": "walmart",
"locale": "en-US",
"shipping_preference": "SET_PROVIDED_ADDRESS",
"payment_method": {
"payer_selected": "PAYPAL",
"payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED"
},
"return_url": "https://example.com/returnUrl",
"cancel_url": "https://example.com/cancelUrl"
}
}
curl --location -g --request POST 'https://api-m.sandbox.paypal.com/v1/billing/subscriptions/{{subscription_id}}/revise' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
"plan_id": "{{billing_plan_id}}",
"shipping_amount": {
"currency_code": "USD",
"value": "10.00"
},
"shipping_address": {
"name": {
"full_name": "John Doe"
},
"address": {
"address_line_1": "2211 N First Street",
"address_line_2": "Building 17",
"admin_area_2": "San Jose",
"admin_area_1": "CA",
"postal_code": "95131",
"country_code": "US"
}
},
"application_context": {
"brand_name": "walmart",
"locale": "en-US",
"shipping_preference": "SET_PROVIDED_ADDRESS",
"payment_method": {
"payer_selected": "PAYPAL",
"payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED"
},
"return_url": "https://example.com/returnUrl",
"cancel_url": "https://example.com/cancelUrl"
}
}'
{
"plan_id": "P-39H27838NY539662TMIBPJBA",
"shipping_amount": {
"currency_code": "USD",
"value": "10.0"
},
"shipping_address": {
"name": {
"full_name": "John Doe"
},
"address": {
"address_line_1": "2211 N First Street",
"address_line_2": "Building 17",
"admin_area_2": "San Jose",
"admin_area_1": "CA",
"postal_code": "95131",
"country_code": "US"
}
},
"plan_overridden": false,
"links": [
{
"href": "https://www.sandbox.paypal.com/webapps/billing/subscriptions/update?ba_token=BA-0D497368A6995050E",
"rel": "approve",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v1/billing/subscriptions/I-00YGWV5XH5SJ",
"rel": "edit",
"method": "PATCH"
},
{
"href": "https://api.sandbox.paypal.com/v1/billing/subscriptions/I-00YGWV5XH5SJ",
"rel": "self",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v1/billing/subscriptions/I-00YGWV5XH5SJ/cancel",
"rel": "cancel",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/billing/subscriptions/I-00YGWV5XH5SJ/suspend",
"rel": "suspend",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/billing/subscriptions/I-00YGWV5XH5SJ/capture",
"rel": "capture",
"method": "POST"
}
]
}