New to the community? Welcome! Please read our Community Rules and Guidelines
If you want to report illegal content under the EU Digital Services Act, please do so here
Hi Willindzz, yes you can get this scenario working:
Call the v2 Order API with an intent of AUTHORIZE
Ref.
Example:
{
"intent": "AUTHORIZE",
"application_context": {
"return_url": "https://myReturnURL.com",
"cancel_url": "https://myCancelURL.com",
"brand_name": "My Shop Name",
"locale": "en-US",
"landing_page": "LOGIN",
"user_action": "CONTINUE"
},
"purchase_units": [
{
"amount": {
"currency_code": "USD",
"value": "500.00",
},
"item_total": {
"currency_code": "USD",
...
...
...
Call the approve link returne into the API response so that the buyer will be redirected to the PayPal checkout page and will authorize the order:
"href": "https://www.paypal.com/checkoutnow?token=8YL60405GN0650213",
"rel": "approve",
"method": "GET"
Call POST /v2/checkout/orders/8YL60405GN0650213/authorize in order to get the authorization ID
Ref.
You will get "authorizations": [
"status": "CREATED",
"id": "6HV03080SC429193M"
Call the payment API: v2/payments/authorizations/6HV03080SC429193M/capture
Ref.
As you can read in the reference above you can "capture a portion of the full authorized amount. If amount is not specified, the full authorized amount is captured". And also you can use this variable:
final_capture
Indicates whether you can make additional captures against the authorized payment. Set to TRUE if you do not intend to capture additional payments against the authorization. Set to FALSE if you intend to capture additional payments against the authorization.