400 Bad Request via REST bill balance of subscription

whyilift
Contributor
Contributor

I list the billing agreement and it returns the following JSON.

When I call bill-balance it returns 

{"name":"VALIDATION_ERROR","details":[{"field":"amount","issue":"Currency Object can't be null."}],"message":"Invalid request. See details.","information_link":"https://developer.paypal.com/docs/api/payments.billing-agreements#errors","debug_id":"8c322903a7af"}

 

From what I see in the billing agreement, currency is not NULL

 

{
"id":"I-A239447TW9CG",
"state":"Active",
"description":"Monthy Profile Subscription :windsor ascot",
"start_date":"2019-04-22T07:00:00Z",
"payer":
{
"payment_method":"paypal",
"status":"verified",
"payer_info":
{
"email":"XXXXXXXX"

"first_name":"test",
"last_name":"buyer",
"payer_id":"2FYCKGCJ9FDZJ",
"shipping_address":
{
"recipient_name":"test buyer",
"line1":"1 Main St",
"city":"San Jose",
"state":"CA",
"postal_code":"95131",
"country_code":"US"
}
}
},
"shipping_address":
{
"recipient_name":"test buyer",
"line1":"1 Main St",
"city":"San Jose",
"state":"CA",
"postal_code":"95131",
"country_code":"US"
},
"plan":{
"payment_definitions":
[
{
"type":"REGULAR",
"frequency":"Month",
"amount":
{
"currency":"USD",
"value":"3.00"
},
"cycles":"0",
"charge_models":
[
{
"type":"TAX",
"amount":
{
"currency":"USD",
"value":"0.00"
}
},
{
"type":"SHIPPING",
"amount":
{
"currency":"USD",
"value":"0.00"
}
}
],
"frequency_interval":"1"
}
],
"merchant_preferences":
{
"setup_fee":
{
"currency":"USD","value":"0.00"
},
"max_fail_attempts":"3",
"auto_bill_amount":"YES"
}
},
"links":[{"href":"https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-A239447TW9CG/suspend","rel":"suspend..."}}

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

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