# Update Payment Intent

Execute this method to update the active flag of a payment intent. Sandbox or production environment will be selected by **apiKey** passed as authentication.

**Uri**

```url
https://backend.turinlabs.com/graphql
```

**Headers**

```json
{
  "apiKey": "turinpay_sk_test_eee78-de9e-4e84-b2e6-fc2ae0687"
}
```

**GraphQL Query**

```graphql
mutation UPDATE_PAYMENT_INTENT_MUTATION($input: UpdatePaymentIntentInput!) {
  updateTPayPaymentIntent(input: $input) {
    __typename
    ... on GenericResult {
        result
    }
    ... on Error {
      code
      message
      description
    }
  }
}
```

**Variables (sample)**

```json
{
    "input": {
        "id": "4a17cc82-ae19-42cd-a807-9e3118ae60",
        "active": true
    }
}
```

**Parameters description**

* **id**: _(mandatory)_ Identifier of the Payment Intent
* **active**: _(mandatory)_ Boolean value that will be set in the Payment Intent.&#x20;
