data-src=../../includes/paas-only.md

PayPal Payflow Link payment method

data-variant=info
data-slots=text
PayPal has designated PayFlow Link as a legacy product.

PayPal PayFlow Link is available for merchants in the United States and Canada only. Customers are not required to have a personal PayPal account. Instead, customers enter their credit card information in a form that is hosted by PayPal.

The Payflow gateway uses a secure token to send non-credit card transaction data to the Payflow server for storage in a way that cannot be intercepted and manipulated maliciously. This token secures the data for a one-time transaction and is valid for 30 minutes. When the PWA client runs the placeOrder mutation, the application requests a secure token. The Payflow server returns the token as a string of up to 32 alphanumeric characters.

The following diagram shows the workflow for placing an order when Payflow Link is the selected payment method.

PayPal Payflow Link sequence diagram

data-src=../../includes/graphql/payment-methods/payflow-link-workflow.md

Additional Payment information

When you set the payment method to Payflow Link in the setPaymentMethodOnCart mutation, the payment_method object must contain a payflow_link object, which defines the following objects:

data-src=../../includes/graphql/payment-methods/payflow-link-attributes.md

Example usage

The following example shows the setPaymentMethodOnCart mutation constructed for the Payflow Link payment method.

Request:

mutation {
    setPaymentMethodOnCart(input: {
        payment_method: {
            code: "payflow_link"
            payflow_link: {
                return_url: "paypal/action/return.html"
                error_url: "paypal/action/error.html"
                cancel_url: "paypal/action/cancel.html"
            }
        }
        cart_id: "IeTUiU0oCXjm0uRqGCOuhQ2AuQatogjG"
    }) {
        cart {
            selected_payment_method {
                code
                title
            }
        }
    }
}

Response:

{
  "data": {
    "setPaymentMethodOnCart": {
      "cart": {
        "selected_payment_method": {
          "code": "payflow_link",
          "title": "PayPal Payflow Link"
        }
      }
    }
  }
}