API: Update subscription payment source

mateusbaruffi
New Community Member

Hi there,

I am trying to update credit card information using the update subscription subscriber.payment_source as defined in the api docs ( https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions_patch ), but I am always getting an error.

Could someone point out what I am doing wrong?

Thank you.

 

REQUEST BOBY:

[
{
"op": "replace",
"path": "/subscriber/payment_source",
"value":
{
"card": {
"name": "Matt test Doe",
"number": "4111 1111 1111 1111",
"security_code": "123",
"expiry": "01/32",
"billing_address": {
"address_line_1": "string",
"address_line_2": "string",
"admin_area_2": "string",
"admin_area_1": "string",
"postal_code": "string",
"country_code": "st"
}
}
}
}
]

 

RESPONSE BODY

{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"debug_id": "081d02e41049d",
"details": [
{
"field": "/0/path",
"value": "/subscriber/payment_source",
"location": "body",
"issue": "INVALID_PATCH_PATH",
"description": "Field does not exist"
}
],
"links": [
{
"href": "https://developer.paypal.com/docs/api/v1/billing/subscriptions#INVALID_REQUEST",
"rel": "information_link",
"method": "GET"
}
]
}

Login to Me Too
1 REPLY 1

Kavyar
Moderator
Moderator

Good day @mateusbaruffi 

 

Thank you for posting to the PayPal community.

 

I kindly suggest you create an MTS ticket via the following URL  - https://www.paypal-support.com/s/?language=en_US . Please ensure that you provide detailed information and error details when submitting the ticket.

 

Sincerely,

Kavya

PayPal MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.