Hello,
I am able to obtain the Access Token through oauth2 API but when I apply the Bearer Token in Request Header to create the "PayPal Billing Plan" and obtain the Billing Plan ID I get the following Error message:
{
"status":400,
"uri":"https://api.sandbox.paypal.com/v1/pay...",
"response":{
"name":"VALIDATION_ERROR",
"details":[
{
"field":"payment_definitions",
"issue":"Payment definitions are invalid. Valid parameters are REGULAR or combination of TRIAL and REGULAR."
}
],
"message":"Invalid request - see details",
"information_link":"https://developer.paypal.com/webapps/...",
"debug_id":"773d07ee153d0"
}
}
I am using the following API Request sample made available by PayPal:
curl -v POST https://api.sandbox.paypal.com/v1/pay... \
-H 'Content-Type:application/json' \
-H 'Authorization: Bearer ' \
-d '{
"name": "T-Shirt of the Month 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://www.return.com",
"cancel_url": "http://www.cancel.com",
"auto_bill_amount": "YES",
"initial_fail_amount_action": "CONTINUE",
"max_fail_attempts": "0"
}
}'
What is causing this Error Message? Thanks in advance!