Hi @MTS-Aaron, Thank you very much for providing me assistance and thank you for pointing out my error! I did update the request to: {
"intent": "sale",
"payer":
{
"payment_method": "PAYPAL",
"funding_instruments": [
{
"billing":
{
"billing_agreement_id": "I-3AD4BAMG087W"
}
}]
},
"transactions": [
{
"amount":
{
"currency": "EUR",
"total": "1.00"
},
"description": "Payment transaction.",
"custom": "Payment custom field.",
"note_to_payer": "Note to payer field.",
"item_list":
{
"items": [
{
"sku": "sku",
"name": "ItemNo1",
"description": "The item description.",
"quantity": "1",
"price": "1.00",
"currency": "EUR"
}]
}
}],
"redirect_urls":
{
"return_url": "https://example.com/return",
"cancel_url": "https://example.com/cancel"
}
} It still gives me the error: {
"name": "PERMISSION_DENIED",
"message": "No permission for the requested operation",
"information_link": "https://developer.paypal.com/docs/api/payments/#errors",
"debug_id": "e332894f70bcb",
"code": "PERMISSION_DENIED"
} However, when I remove the "funding_instruments" object in the request and proceeded, I get a successful response. {
"id": "PAYID-MBNO3MI37V09383GK5094236",
"intent": "sale",
"state": "created",
"payer": {
"payment_method": "paypal"
},
"transactions": [
{
"amount": {
"total": "1.00",
"currency": "EUR"
},
"description": "Payment transaction.",
"custom": "Payment custom field.",
"item_list": {
"items": [
{
"name": "ItemNo1",
"sku": "sku",
"description": "The item description.",
"price": "1.00",
"currency": "EUR",
"quantity": 1
}
]
},
"related_resources": []
}
],
"create_time": "2021-03-24T07:43:45Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MBNO3MI37V09383GK5094236",
"rel": "self",
"method": "GET"
},
{
"href": "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-79H40392MX2936104",
"rel": "approval_url",
"method": "REDIRECT"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MBNO3MI37V09383GK5094236/execute",
"rel": "execute",
"method": "POST"
}
]
} The URL leads me to a PayPal page to approve the payment transaction. However, what I do want to achieve is to create a payment transaction on behalf of the customers using the created billing agreement. This scenario I believe is achievable right? Is there something wrong with how the billing agreement was created?
... View more