I am trying to sent request to api to update the billing plan for paypal Rest Api.
API Link: https://developer.paypal.com/docs/api/payments.billing-plans#plan_update
The request method is:
HTTPoison.patch(Paypal.Config.url <> "/payments/billing-plans/#{plan.id}",
[Poison.encode!(%{path: "/", value: %{"state" => "ACTIVE"}, op: "replace"})],
Paypal.Authentication.headers,
timeout: :infinity,
recv_timeout: :infinity)
|> Paypal.Config.parse_response
But the response give me the error with format problem.
%{"debug_id" => "a673179dcd91",
"information_link" => "https://developer.paypal.com/webapps/developer/docs/api/#MALFORMED_REQUEST",
"message" => "Incoming JSON request does not map to API request",
"name" => "MALFORMED_REQUEST"}
What the problem of my request?