# Method: orders.refund

- [HTTP request](https://developers.google.com/android-publisher/api-ref/rest/v3/orders/refund#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/android-publisher/api-ref/rest/v3/orders/refund#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/android-publisher/api-ref/rest/v3/orders/refund#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/android-publisher/api-ref/rest/v3/orders/refund#body.request_body)
- [Response body](https://developers.google.com/android-publisher/api-ref/rest/v3/orders/refund#body.response_body)
- [Authorization scopes](https://developers.google.com/android-publisher/api-ref/rest/v3/orders/refund#body.aspect)
- [Try it!](https://developers.google.com/android-publisher/api-ref/rest/v3/orders/refund#try-it)

Refunds a user's subscription or in-app purchase order. Orders older than 3 years cannot be refunded.

### HTTP request

`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/orders/{orderId}:refund`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `packageName` | `string` The package name of the application for which this subscription or in-app item was purchased (for example, 'com.some.thing'). |
| `orderId` | `string` The order ID provided to the user when the subscription or in-app order was purchased. |

### Query parameters

| Parameters ||
|---|---|
| `revoke` | `boolean` Whether to revoke the purchased item. If set to true, access to the subscription or in-app item will be terminated immediately. If the item is a recurring subscription, all future payments will also be terminated. Consumed in-app items need to be handled by developer's app. (optional). |

### Request body

The request body must be empty.

### Response body

If successful, the response body is empty.

### Sample

The following is a sample request:

```json
curl \
  -X POST \
  'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.app/orders/1234567890:refund?revoke=true' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer [YOUR_ACCESS_TOKEN]'
```

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/androidpublisher`