title: PayPal v2 Orders API - difference between OrdersGetRequest and OrdersCaptureRequest
body: <p>I'm using checkout-sdk with angular and spring boot. Here is the code I have on the angular side</p>
  <pre><code>           paypal
              .Buttons({
                style: {
                  color:  'blue',
                  shape:  'pill',
                  label:  'pay',
                  height: 40
                },
                createOrder: (data, actions) =&gt; {
                  return actions.order.create({
                    purchase_units: [
                      {
                        description: 'Order id: '+this.order.id,
                        amount: {
                          currency_code: 'EUR',
                          value: this.order.totalPrice
                        }
                      }
                    ]
                  });
                },
                onApprove: async (data, actions) =&gt; {
                  const order = await actions.order.capture();
                  this.paidFor = true;
                  this.checkoutPaypal(this.id,order.id)
                },
                onError: err =&gt; {
                }
              })
              .render(this.paypalElement.nativeElement);
  </code></pre>
  <p>This is function used to retrieve payment, and save details to database..</p>
  <pre><code> public String checkoutPaypal(Integer id, String orderId) {
          OrdersCaptureRequest request = new OrdersCaptureRequest(orderId);
          request.requestBody(buildRequestBody());
          HttpResponse&lt;com.paypal.orders.Order&gt; response;
  
          try {
              response = payPalClient.client().execute(request);
          } catch (IOException e) {
              throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage());
          }
  
          for (PurchaseUnit purchaseUnit : response.result().purchaseUnits()) {
              purchaseUnit.amountWithBreakdown();
              for (Capture capture : purchaseUnit.payments().captures()) {
                  if (capture.status().equals(&quot;COMPLETED&quot;)) {
                      Order order = orderRepository.findById(id).orElseThrow(() -&gt; new ResponseStatusException(HttpStatus.NOT_FOUND, &quot;Not found!&quot;));
                      order.setOrderState(OrderState.PAID);
                      order.setPaymentDetails(&quot;Charge id: &quot; + capture.id() + &quot;; Status: &quot; + capture.status() + &quot;; Time paid: &quot; + capture.createTime() + &quot; GMT&quot;);
                      order.addOrderStateChange(OrderState.PAID, false);
  
                      sendEmail(order, &quot; paid successfully!&quot;, &quot;Thanks for your purchase!&lt;br&gt;We will work as hard as we can, to deliver the order to you, as soon as possible!&quot;);
                      orderRepository.save(order);
                  }
              }
      }
      return &quot;Successfully paid!&quot;;
  }
  </code></pre>
  <p>Which worked few days ago.. But now I'm getting this error</p>
  <pre><code>{&quot;name&quot;:&quot;UNPROCESSABLE_ENTITY&quot;,&quot;details&quot;:[{&quot;issue&quot;:&quot;ORDER_ALREADY_CAPTURED&quot;,&quot;description&quot;:&quot;Order already captured.If 'intent=CAPTURE' only one capture per order is allowed.&quot;}],&quot;message&quot;:&quot;The requested action could not be performed, semantically incorrect, or failed business validation.&quot;,&quot;debug_id&quot;:&quot;f058cb447ccbb&quot;,&quot;links&quot;:[{&quot;href&quot;:&quot;https://developer.paypal.com/docs/api/orders/v2/#error-ORDER_ALREADY_CAPTURED&quot;,&quot;rel&quot;:&quot;information_link&quot;,&quot;method&quot;:&quot;GET&quot;}]}
  </code></pre>
  <p>But after replacing</p>
  <pre><code> OrdersCaptureRequest request = new OrdersCaptureRequest(orderId);
   request.requestBody(buildRequestBody());
   HttpResponse&lt;com.paypal.orders.Order&gt; response;
  </code></pre>
  <p>with</p>
  <pre><code> OrdersGetRequest request = new OrdersGetRequest(orderId);
   HttpResponse&lt;com.paypal.orders.Order&gt; response;
  </code></pre>
  <p>It works as it should.</p>
  <p>So my question is, what is the difference between
  <a href="https://developer.paypal.com/docs/checkout/reference/server-integration/capture-transaction/" rel="nofollow noreferrer">https://developer.paypal.com/docs/checkout/reference/server-integration/capture-transaction/</a>
  and
  <a href="https://developer.paypal.com/docs/checkout/reference/server-integration/get-transaction/" rel="nofollow noreferrer">https://developer.paypal.com/docs/checkout/reference/server-integration/get-transaction/</a> ?</p>