Getting an error when calling API endpoint for Create Billing Agreement Token V1

joseph_funraise
Contributor
Contributor

I saw that in related questions you need a new permission added to get the V1 Billing Agreement Token endpoint to work.

 

Here's the response I'm getting now:

{
  "name": "BUSINESS_ERROR",
  "debug_id": "f2a9d5cbece00",
  "message": "Business error",
  "information_link": "https://developer.paypal.com/webapps/developer/docs/api/#BUSINESS_ERROR",
  "details": [
    {
      "name": "UNAUTHORISED ACCESS",
      "message": "Authorization failed due to insufficient permissions. Invalid Scopes"
    }
  ]
}

 

CC: @MTS_Jennifer 

Login to Me Too
4 REPLIES 4

MTS_Jennifer
Moderator
Moderator

Hello @joseph_funraise ,

Thank you for posting to the PayPal Sandbox Merchant Community. I have enabled Future Payments and ensured Reference Transactions are enabled on your sandbox account.

Thank you,

Jennifer

MTS

PayPal

Login to Me Too

joseph_funraise
Contributor
Contributor

Hi @MTS_Jennifer,

 

I'm unfortunately still getting this error

 

{
"name": "BUSINESS_ERROR",
"debug_id": "7696e5d46c375",
"message": "Business error",
"information_link": "https: //developer.paypal.com/webapps/developer/docs/api/#BUSINESS_ERROR",
"details": [
  {
    "name": "UNAUTHORISED ACCESS",
    "message": "Authorization failed due to insufficient permissions. Invalid Scopes"
  }
 ]
}
 
This is the endpoint that I'm trying to call: /v1/billing-agreements/agreement-tokens
Login to Me Too

MTS_Jennifer
Moderator
Moderator

Hello @joseph_funraise 

Thank you for contributing to this post. Try this api call with your access_token:

POST to https://api.sandbox.paypal.com/v1/billing-agreements/agreement-tokens
{
  "description": "Billing Agreement",
  "currency_code" : "USD",
 
  "payer":
  {
    "payment_method": "PAYPAL"

  },
  "plan":
  {
    "type": "MERCHANT_INITIATED_BILLING",
    "merchant_preferences":
    {
      "return_url": "https://example.com/return",
      "cancel_url": "https://example.com/cancel",
      "notify_url": "https://example.com/notify",
      "accepted_pymt_type": "INSTANT",
      "skip_shipping_address": true
     
     
    }
  }
}

 Let me know if you receive the same message.

Thank you,

Jennifer

MTS

PayPal

Login to Me Too

MTS_Chiranjeevi
Moderator
Moderator

Hi @joseph_funraise ,

Good day!

I understand that you are trying to integrate PayPal Reference Transaction via REST API, which is a limited release.

I would suggest to please create a MTS ticket via - https://www.paypal-support.com/s/?language=en_US  with the detail error details, to debug further.

Thank you.

Login to Me Too

Haven't Found your Answer?

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