---
title: "success(with:)"
framework: intents
role: symbol
role_heading: Type Method
path: "intents/inpaymentstatusresolutionresult/success(with:)"
---

# success(with:)

Creates an object whose resolution involves the successful matching of the specified value.

## Declaration

```swift
class func success(with resolvedPaymentStatus: INPaymentStatus) -> Self
```

## Parameters

- `resolvedPaymentStatus`: The value that resolves the requested value of the intent. You may specify a different payment status if your app treats that value as equivalent to the status requested by the user.

## Return Value

Return Value A new INPaymentStatusResolutionResult object.

## Discussion

Discussion Use this method to create a result object when you are able to perform a search based on the requested payment status.

## See Also

### Creating a Resolution Result Object

- [confirmationRequired(with:)](intents/inpaymentstatusresolutionresult/confirmationrequired(with:).md)
