# Cancel Fulfillment
> Source: /api-reference/members/wallet/cancel-fulfillment
> Cancel an active fulfillment
> Endpoint: POST /members/me/wallet/fulfillments/{fulfillmentId}/cancel

## Overview [#overview]

Cancels a claimed fulfillment and refunds the points to the member's wallet. Only active fulfillments can be cancelled.

This action is irreversible and will refund points according to the cancellation policy.

## Authentication [#authentication]

Requires a valid Clerk JWT token in the Authorization header.

## Path Parameters [#path-parameters]

<ParamField path="fulfillmentId" type="string" required>
  UUID of the fulfillment to cancel
</ParamField>

<RequestExample>

```bash cURL
curl -X POST "http://localhost:3000/v1/members/me/wallet/fulfillments/fulfill_550e8400-e29b-41d4-a716-446655440000/cancel" \
  -H "Authorization: Bearer YOUR_CLERK_JWT"
```

```typescript TypeScript
const fulfillmentId = "fulfill_550e8400-e29b-41d4-a716-446655440000";
const response = await fetch(`http://localhost:3000/v1/members/me/wallet/fulfillments/${fulfillmentId}/cancel`, {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_CLERK_JWT'
  }
});

const result = await response.json();
```

</RequestExample>

## Response [#response]

<ResponseField name="success" type="boolean" required>
  Whether the cancellation was successful
</ResponseField>

<ResponseField name="message" type="string" required>
  Human-readable confirmation message
</ResponseField>

<ResponseExample>

```json 200 Response - Success
{
  "success": true,
  "message": "Fulfillment cancelled successfully"
}
```

```json 400 Response - Cannot Cancel
{
  "statusCode": 400,
  "message": "Cannot cancel fulfillment with status: fulfilled"
}
```

```json 404 Response - Not Found
{
  "statusCode": 404,
  "message": "Fulfillment not found"
}
```

</ResponseExample>

## Cancellable Statuses [#cancellable-statuses]

Only fulfillments with these statuses can be cancelled:

### claimed [#claimed]
- **Timing**: Just claimed, not yet processed
- **Refund**: Full point refund
- **Impact**: No impact on property

### pending_approval [#pending_approval]
- **Timing**: Waiting for property approval
- **Refund**: Full point refund  
- **Impact**: Notifies property of cancellation

### modified [#modified]
- **Timing**: Property modified, awaiting member response
- **Refund**: Full point refund
- **Impact**: Notifies property of cancellation

### approved [#approved]
- **Timing**: Approved but not yet used
- **Refund**: Full point refund
- **Impact**: Notifies property, may affect relationship

## Non-Cancellable Statuses [#non-cancellable-statuses]

These fulfillments **cannot** be cancelled:

### fulfilled [#fulfilled]
- **Reason**: Already redeemed/used
- **Action**: Contact support for exceptional cases

### rejected [#rejected]  
- **Reason**: Already declined by property
- **Action**: Points already refunded

### cancelled [#cancelled]
- **Reason**: Already cancelled
- **Action**: No further action needed

### expired [#expired]
- **Reason**: Already expired
- **Action**: Points typically already refunded

## Cancellation Process [#cancellation-process]

When a fulfillment is successfully cancelled:

1. **Status Update**: Fulfillment status changes to "cancelled"
2. **Point Refund**: Points are refunded to the member's wallet
3. **Property Notification**: Property is notified of cancellation (if applicable)
4. **Code Invalidation**: Verification codes become invalid
5. **Transaction Record**: Cancellation is logged for audit purposes

## Refund Details [#refund-details]

- **Point Type**: Same asset type as originally charged (VALID/CREDIT)
- **Amount**: Full amount originally charged
- **Timing**: Immediate (synchronous with API call)
- **Transaction**: Creates a CREDIT transaction in wallet

## Best Practices [#best-practices]

### Before Cancelling [#before-cancelling]
1. **Check Status**: Ensure fulfillment can be cancelled
2. **Review Terms**: Some offers may have no-cancellation policies
3. **Contact Property**: For courtesy, especially if close to travel dates

### After Cancelling [#after-cancelling]
1. **Confirm Refund**: Check wallet balance to confirm points returned
2. **Save Confirmation**: Keep the success message for records
3. **Property Follow-up**: Contact property if needed to confirm cancellation

## Error Handling [#error-handling]

Common error scenarios:

### Fulfillment Not Found (404) [#fulfillment-not-found-404]
- **Cause**: Invalid fulfillment ID or not owned by member
- **Solution**: Verify the fulfillment ID and membership

### Cannot Cancel (400) [#cannot-cancel-400]
- **Cause**: Fulfillment status doesn't allow cancellation
- **Solution**: Check fulfillment status and cancellation rules

### System Error (500) [#system-error-500]
- **Cause**: Backend processing error
- **Solution**: Retry or contact support if persistent

## Related Endpoints [#related-endpoints]

- [Get Fulfillment](/api-reference/members/wallet/get-fulfillment) - Check fulfillment status before cancelling
- [Get Fulfillments](/api-reference/members/wallet/get-fulfillments) - List all fulfillments
- [Get Balance](/api-reference/members/wallet/get-balance) - Verify refund processed
