简体   繁体   中英

paypal rest api update a stored credit card

Using the PayPal Rest API, is there any way to update a stored credit card? PayPal's documentation on this, " Vault: Store customer credit cards securely .", only specifies:

  • Store a credit card
  • Delete a stored credit card
  • Look up a stored credit card

It does not however, mention anything about updating a stored card.

Currently, to update a card, I have the user re-input all their credit card data, I delete the old card from paypal and store the new one, returning a new creditcard_id. But if the user only needs to update their card expiration date or their billing address, I don't want them to have to enter their card number again, just security code and new expire date or address.

Any help would be appreciated.

The Vault API supports a PATCH method (it is returned by the HATEOAS links from a GET request) but there is no documentation on what kind of request object to send to get it to work properly. I am looking for this also but we might have to contact Paypal Developer Support for the information unless someone can suss out the right request format. (I've been trying but everything barfs back a 401 Malformed Request.)

This is the answer I got from PayPal:


Thank you for contacting Merchant Technical Services.

PATCH request is not available anymore in REST API. This means that UPDATING a stored credit card is not available anymore. The option now is to delete the stored credit card and re-add again.

I understand, the team is working to revamp the documentation on the site so that it will be updated. I am sorry for the inconvenience caused by this.

PATCH request is not available anymore in REST API. This means that UPDATING a stored credit card is not available anymore. The option now is to delete the stored credit card and re-add again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM