Class Order

    • Constructor Detail

      • Order

        public Order()
    • Method Detail

      • setId

        public void setId​(String id)
        The ID of the order.
      • setIntent

        public void setIntent​(String intent)
        The intent to either capture payment immediately or authorize a payment for an order after order creation. The possible values are:
        • "CAPTURE". The merchant intends to capture payment immediately after the customer makes a payment.
        • "AUTHORIZE". The merchant intends to authorize a payment and place funds on hold after the customer makes a payment. Authorized payments are best captured within three days of authorization but are available to capture for up to 29 days. After the three-day honor period, the original authorized payment expires and you must re-authorize the payment. You must make a separate request to capture payments on demand. This intent is not supported when you have more than one `purchase_unit` within your order.
      • setLinks

        public void setLinks​(List<LinkDescription> links)
        An array of request-related HATEOAS links. To complete payer approval, use the "approve" link to redirect the payer. The API caller has 3 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 3 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include "application_context.return_url" is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment.
      • setPaymentSource

        public void setPaymentSource​(PaymentSource paymentSource)
        The payment source used to fund the payment.
      • setProcessingInstruction

        public void setProcessingInstruction​(String processingInstruction)
        The instruction to process an order. The possible values are:
        • "ORDER_COMPLETE_ON_PAYMENT_APPROVAL". API Caller expects the Order to be auto completed (i.e. for PayPal to authorize or capture depending on the intent) on completion of payer approval. This option is not relevant for payment_source that typically do not require a payer approval or interaction. This option is currently only available for the following payment_source: Alipay, Bancontact, BLIK, boletobancario, eps, giropay, GrabPay, iDEAL, Multibanco, MyBank, OXXO, P24, PayU, PUI, SafetyPay, SatisPay, Sofort, Trustly, Verkkopankki, WeChat Pay
        • "NO_INSTRUCTION". The API caller intends to authorize "v2/checkout/orders/id/authorize" or capture "v2/checkout/orders/id/capture" after the payer approves the order.
      • setPurchaseUnits

        public void setPurchaseUnits​(List<PurchaseUnit> purchaseUnits)
        An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
      • setStatus

        public void setStatus​(String status)
        The order status. The possible values are:
        • "CREATED". The order was created with the specified context.
        • "SAVED". The order was saved and persisted. The order status continues to be in progress until a capture is made with "final_capture = true" for all purchase units within the order.
        • "APPROVED". The customer approved the payment through the PayPal wallet or another form of guest or unbranded payment. For example, a card, bank account, or so on.
        • "VOIDED". All purchase units in the order are voided.
        • "COMPLETED". The payment was authorized or the authorized payment was captured for the order.
        • "PAYER_ACTION_REQUIRED". The order requires an action from the payer (e.g. 3DS authentication). Redirect the payer to the "rel":"payer-action" HATEOAS link returned as part of the response prior to authorizing or capturing the order.
      • getId

        public String getId()
        The ID of the order.
      • getIntent

        public String getIntent()
        The intent to either capture payment immediately or authorize a payment for an order after order creation. The possible values are:
        • "CAPTURE". The merchant intends to capture payment immediately after the customer makes a payment.
        • "AUTHORIZE". The merchant intends to authorize a payment and place funds on hold after the customer makes a payment. Authorized payments are best captured within three days of authorization but are available to capture for up to 29 days. After the three-day honor period, the original authorized payment expires and you must re-authorize the payment. You must make a separate request to capture payments on demand. This intent is not supported when you have more than one `purchase_unit` within your order.
      • getLinks

        public List<LinkDescription> getLinks()
        An array of request-related HATEOAS links. To complete payer approval, use the "approve" link to redirect the payer. The API caller has 3 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 3 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include "application_context.return_url" is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment.
      • getPaymentSource

        public PaymentSource getPaymentSource()
        The payment source used to fund the payment.
      • getProcessingInstruction

        public String getProcessingInstruction()
        The instruction to process an order. The possible values are:
        • "ORDER_COMPLETE_ON_PAYMENT_APPROVAL". API Caller expects the Order to be auto completed (i.e. for PayPal to authorize or capture depending on the intent) on completion of payer approval. This option is not relevant for payment_source that typically do not require a payer approval or interaction. This option is currently only available for the following payment_source: Alipay, Bancontact, BLIK, boletobancario, eps, giropay, GrabPay, iDEAL, Multibanco, MyBank, OXXO, P24, PayU, PUI, SafetyPay, SatisPay, Sofort, Trustly, Verkkopankki, WeChat Pay
        • "NO_INSTRUCTION". The API caller intends to authorize "v2/checkout/orders/id/authorize" or capture "v2/checkout/orders/id/capture" after the payer approves the order.
      • getPurchaseUnits

        public List<PurchaseUnit> getPurchaseUnits()
        An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
      • getStatus

        public String getStatus()
        The order status. The possible values are:
        • "CREATED". The order was created with the specified context.
        • "SAVED". The order was saved and persisted. The order status continues to be in progress until a capture is made with "final_capture = true" for all purchase units within the order.
        • "APPROVED". The customer approved the payment through the PayPal wallet or another form of guest or unbranded payment. For example, a card, bank account, or so on.
        • "VOIDED". All purchase units in the order are voided.
        • "COMPLETED". The payment was authorized or the authorized payment was captured for the order.
        • "PAYER_ACTION_REQUIRED". The order requires an action from the payer (e.g. 3DS authentication). Redirect the payer to the "rel":"payer-action" HATEOAS link returned as part of the response prior to authorizing or capturing the order.