How can i get the authorization_id

Pallaringa
Contributor
Contributor
I want to get that id to know all the information that client made by the trasaction
This code is what a i got but the only things that i can get is the orderID and the payerID:
 
$venta = curl_init("https://api.sandbox.paypal.com/v2/payments/authorizations/here it goes the authorization_id");
curl_setopt($venta,CURLOPT_HEADER,array("Content-Type: application/json","Authorization: Bearer ".$AccessToken));
curl_setopt($venta,CURLOPT_RETURNTRANSFER,TRUE);
$respuestaVenta = curl_exec($venta);
 
I want to get this information:
 
{ "id": "authorization_id", "status": "AUTHORIZED", "amount": { "total": "10.99", "currency": "USD" }, "invoice_id": "INVOICE-123", "seller_protection": { "status": "ELIGIBLE", "dispute_categories": [ "ITEM_NOT_RECEIVED", "UNAUTHORIZED_TRANSACTION" ] }, "expiration_time": "2017-10-10T23:23:45Z", "create_time": "2017-09-11T23:23:45Z", "update_time": "2017-09-11T23:23:45Z", "links": [ { "rel": "self", "method": "GET", "href": "https://api.paypal.com/v2/payments/authorizations/0VF52814937998046" }, { "rel": "capture", "method": "POST", "href": "https://api.paypal.com/v2/payments/authorizations/0VF52814937998046/capture" }, { "rel": "void", "method": "POST", "href": "https://api.paypal.com/v2/payments/authorizations/0VF52814937998046/void" }, { "rel": "reauthorize", "method": "POST", "href": "https://api.paypal.com/v2/payments/authorizations/0VF52814937998046/reauthorize" } ] }
Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

rahul-dighe
PayPal Employee
PayPal Employee

I presume you have use v2/checkout/orders and v2/payments.

 

To get authorization_id you just need to do a GET v2/checkout/orders/{id}

 

Senior Product Manager - PayPal Checkout API Product

View solution in original post

Login to Me Too
1 REPLY 1
Solved

rahul-dighe
PayPal Employee
PayPal Employee

I presume you have use v2/checkout/orders and v2/payments.

 

To get authorization_id you just need to do a GET v2/checkout/orders/{id}

 

Senior Product Manager - PayPal Checkout API Product
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.