Enabling Reference Transactions for Sandbox env

brianzammit
Contributor
Contributor

Hello,

I would like Reference Transactions to be enabled for my Sandbox Environment. 
MERCHANT ID:  HK7CLA786MML4

Thanks.

Best regards,
Brian

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

MTS_Justin
Moderator
Moderator
Hello,

It appears you have not submitted the order creation request correctly, as it's missing the billing agreement token.

https://developer.paypal.com/limited-release/reference-transactions/

"When you initiate a reference transaction, PayPal recommends that you use a billing agreement ID to avoid confusion. You pass the ID of the billing agreement in the JSON request body of a /v1/payments/payment call or a v2/orders call"

Follow the guide and you should no longer experience the specific error response message "NOT_ELIGIBLE_FOR_TOKEN_PROCESSING".

Thanks !

Was my post helpful? If so, please give me a kudos!

View solution in original post

Login to Me Too
5 REPLIES 5

MTS_Justin
Moderator
Moderator
Hello,

Thanks for sharing the merchant id for your sandbox account.

Reference transactions show as being enabled on the sandbox account.

Thanks !

Was my post helpful? If so, please give me a kudos!
Login to Me Too

brianzammit
Contributor
Contributor

Hello @MTS_Justin ,

 

I have tried the request again but still failing with `NOT_ELIGIBLE_FOR_TOKEN_PROCESSING`. Please find details below:
Request: POST https://api.sandbox.paypal.com/v2/checkout/orders/63P03801A2095502F/capture

 

Request Body:

 
Spoiler
{
    "payment_source": {
       "token": {
         "id""19X5107749171015S",
         "type""PAYPAL_TRANSACTION_ID"
         }
       }
}
 
 
Response: 403 Fodbidden

Response Body:
 
Spoiler
{
    "name""NOT_AUTHORIZED",
    "details": [
        {
            "issue""NOT_ELIGIBLE_FOR_TOKEN_PROCESSING",
            "description""API caller is not enabled to process payments with the specified type of token. Please contact customer support to request permissions to process transactions with this type of token."
        }
    ],
    "message""Authorization failed due to insufficient permissions.",
    "debug_id""6663377143783",
    "links": [
        {
            "rel""information_link",
            "method""GET"
        }
    ]
}

Thank you for your assistance.

Best regards,
Brian

 

Login to Me Too
Solved

MTS_Justin
Moderator
Moderator
Hello,

It appears you have not submitted the order creation request correctly, as it's missing the billing agreement token.

https://developer.paypal.com/limited-release/reference-transactions/

"When you initiate a reference transaction, PayPal recommends that you use a billing agreement ID to avoid confusion. You pass the ID of the billing agreement in the JSON request body of a /v1/payments/payment call or a v2/orders call"

Follow the guide and you should no longer experience the specific error response message "NOT_ELIGIBLE_FOR_TOKEN_PROCESSING".

Thanks !

Was my post helpful? If so, please give me a kudos!
Login to Me Too

brianzammit
Contributor
Contributor

Thank you @MTS_Justin 

This helped me achieve my goal!

Thanks a lot!

Best regards,
Brian

Login to Me Too

foobard
Contributor
Contributor

Hi Justin!

 

I'm trying to figure out how to integrate PayPal API version 2 in our system here and it turns out that I faced the same issue as the OP while following the steps described here in your documentation: https://developer.paypal.com/docs/checkout/advanced/customize/reference-transactions/

 

it's a sandbox env, my merchant_id is WQKQN7N7882MS.

 

In more detail:

 

Method used: https://api-m.sandbox.paypal.com/v2/checkout/orders/0S204677HR0605331/authorize

 

The request body:

 

Spoiler
{
"payment_source": {
"token": {
"id": "2KS09886FT421350T",
"type": "PAYPAL_TRANSACTION_ID"
}
}
}

The response:

 

Spoiler
{
"name": "NOT_AUTHORIZED",
"details": [
{
"issue": "NOT_ELIGIBLE_FOR_TOKEN_PROCESSING",
"description": "API caller is not enabled to process payments with the specified type of token. Please contact customer support to request permissions to process transactions with this type of token."
}
],
"message": "Authorization failed due to insufficient permissions.",
"debug_id": "84a3069cc25cf",
"links": [
{
"rel": "information_link",
"method": "GET"
}
]
}

I tried taking the same steps after creating a billing agreement id and using it in this request instead of transaction id and it worked. But this way I would have to mix different versions of the API and I would love to avoid it.

 

I've also found this note: 

 

Spoiler
Important: The PayPal Reference Transactions API is available on a limited-use basis to select merchants for approved use cases. This API is not generally available and might require re-integration as and when an equivalent API is made generally available. For more information, reach out to your PayPal account manager.

 

I don't think I fully understand what it means. Does it mean that I can use it for our use case?

 

For more context, here is our use case:

 

We have a subscription like model where customers sign up once and we as a service provider would like to trigger payments on their behalf later on.

 

Could you please clarify what I did wrong and how to make reference transactions? 

 

@MTS_Justin 

 

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.