MageSmith
MutationPaypal · Magento 2.4.9

createPayflowProToken

createPayflowProToken is a Magento 2 GraphQL mutation in the Paypal module. Initiate a transaction and receive a token. Use this mutation for Payflow Pro and Payments Pro payment methods. It returns CreatePayflowProTokenOutput and requires an Authorization header (Bearer customer token).

Last verified: against Magento 2.4.9.

Returns

CreatePayflowProTokenOutput

Resolver class

\Magento\PaypalGraphQl\Model\Resolver\PayflowProToken

Arguments

input PayflowProTokenInput! Required

An input object that defines the requirements to fetch payment token information.

Example request

Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.

Headers

Content-Type
application/json
Store
default store view code; use 'default' for the single-store baseline
Authorization
Bearer <CUSTOMER_TOKEN> obtain from generateCustomerToken mutation

Query

mutation ($input: PayflowProTokenInput!) {
  createPayflowProToken(input: $input) {
    secure_token
    secure_token_id
    response_message
    result
    result_code
  }
}

Variables

{
  "input": {
    "cart_id": "",
    "urls": {
      "cancel_url": "",
      "error_url": "",
      "return_url": ""
    }
  }
}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.