Example: paypal recurring payments api for create plan
curl -k -v -H
“Content-Type:application/json”
-H “Authorization: Bearer ACCESS_TOKEN”
-d '{“name”:”Test REST Club Plan”,
“description”:”Template creation.”,
“type”:”fixed”,
“payment_definitions”:[{“name”:”Regular Payments”,
“type”:”REGULAR”,
“frequency”:”MONTH”,
“frequency_interval”:”2”,
“amount”:{“value”:”100”,
“currency”:”USD”},
“cycles”:”12”,
“charge_models”:[{“type”:”SHIPPING”,
“amount”:{“value”:”10”,
“currency”:”USD”}},
{“type”:”TAX”,
“amount”:{“value”:”12”,
“currency”:”USD”}}]}],
“merchant_preferences”:{“setup_fee”:{“value”:”1”,
“currency”:”USD”},
“return_url”:”http://returnurl”,
“cancel_url”:”http://cancelurl”,
“auto_bill_amount”:”YES”,
“initial_fail_amount_action”:”CONTINUE”,
“max_fail_attempts”:”0”}}' https://api.sandbox.paypal.com/v1/payments/billing-plans
Comments
Post a Comment