> This page is for Cash App Pay Partner API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers-beta.cash.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers-beta.cash.app/_mcp/server.

# Revoke customer grant

POST https://api.cash.app/network/v1/customers/{customer_id}/grants/{grant_id}/revoke

Revokes a customer grant, rendering it unusable. Other endpoints will no longer be able to use the grant to perform its associated action. You cannot un-revoke a grant. Use with caution.**This endpoint is not rate limited.**Scopes: `GRANTS_WRITE`

Reference: https://developers-beta.cash.app/cash-app-pay-partner-api/api-reference/network-api/revoke-customer-grant

## Servers

- `https://api.cash.app/network/v1` (Production, default)
- `https://sandbox.api.cash.app/network/v1` (Sandbox)

## Request

### Path parameters

- `customer_id` (string, required)
- `grant_id` (string, required)

## Response

### 200

OK

- `grant` (Grant, required) — Describes a grant that can be used to perform actions specified in a customer request using the Network API.

## Errors

### 400 Bad Request Error

Bad Request

- `errors` (list of Error, required) — A list of errors that occurred while processing the request. Min number of items: `1`

### 404 Not Found Error

Not Found

- `errors` (list of Error, required) — A list of errors that occurred while processing the request. Min number of items: `1`

## Types

### Grant

Describes a grant that can be used to perform actions specified in a customer request using the Network API.

- `id` (string, required) — Unique identifier for this grant issued by Cash App. Min length: `1` Max length: `256`
- `customer_id` (string, required) — ID of the customer that approved this grant. Min length: `1` Max length: `128`
- `request_id` (string, required) — A unique identifier issued by Cash App for the customer request that resulted in the creation of this grant. Min length: `1` Max length: `128`
- `action` (Action, required) — Represents what the client intends to do to a customer if given authorization.
- `status` (enum, required) — Describes whether or not this grant can be used to perform the action associated with it. If `ACTIVE`, it can be used to perform the action. If `EXPIRED`, it may no longer be used to perform the action due to the current time being past the "expires_at" time. If `CONSUMED`, it was already redeemed to perform the action and cannot be used again. If `REVOKED`, the customer or merchant explicitly unauthorized the grant, preventing it from being used to perform the action.
  - Allowed values: `ACTIVE`, `CONSUMED`, `REVOKED`, `EXPIRED`
- `type` (enum, required) — Describes whether this grant can be only be used once (`ONE_TIME`) or repeatedly (`EXTENDED`).
  - Allowed values: `ONE_TIME`, `EXTENDED`
- `channel` (enum, required) — How the customer is expected to interact with the request. - `IN_PERSON`: The customer presents or scans a QR code at a physical location to approve the request. - `ONLINE`: The customer scans a QR code or is redirected to Cash App from a browser context. - `IN_APP`: The customer scans a QR code or is redirected to Cash App from a native mobile application context.
  - Allowed values: `IN_PERSON`, `ONLINE`, `IN_APP`
- `created_at` (string, required) — When this grant was created, in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) format (UTC).
- `updated_at` (string, required) — When this grant was last updated, in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) format (UTC).
- `expires_at` (string, optional) — If present, indicates when the grant's status will become `EXPIRED`, preventing a client from using it to create payments or refunds. The timestamp is in the [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) format (UTC).

### Error

Represents an error encountered during a request to the API.

- `category` (enum, required) — The high-level reason the error occurred
  - Allowed values: `API_ERROR`, `AUTHENTICATION_ERROR`, `BRAND_ERROR`, `DISPUTE_ERROR`, `MERCHANT_ERROR`, `INVALID_REQUEST_ERROR`, `PAYMENT_PROCESSING_ERROR`, `RATE_LIMIT_ERROR`, `WEBHOOK_ERROR`, `API_KEY_ERROR`, `GRANT_ERROR`
- `code` (string, required) — A unique identifier for the specific type of error that occurred. See the Error Code Reference for more information. Min length: `1`
- `detail` (string, optional) — Human-readable description of why the error occurred and how to resolve it. Min length: `1`
- `field` (string, optional) — The field in the request that caused the error, using array and object dot notation. Min length: `1`

### Action

Represents what the client intends to do to a customer if given authorization.

- One Time Payment Action: OneTimePaymentAction
- On File Payment Action: OnFilePaymentAction
- On File Deposit Action: OnFileDepositAction
- Link Account Action: LinkAccountAction

### OneTimePaymentAction

Describes an intent for a client to charge a customer a given amount. Note the following restrictions when using this action: - If no amount is provided to the action, the payment charged may be **any** amount. - If `amount` is provided, `currency` must be provided too (and vice versa).

- `scope_id` (string, required) — ID of the client, brand, or merchant that will charge the customer. If a client ID is passed, the grant from this action can be used to create a payment for any merchant owned by the client. If a brand ID is passed, the grant from this action can be used to create a payment for any merchant that has a matching brand ID. If a merchant ID is passed, the grant from this action can be used to create a payment for the merchant with a matching ID. Min length: `1` Max length: `128`
- `type` (enum, required) — The type of the action (`ONE_TIME_PAYMENT`).
  - Allowed values: `ONE_TIME_PAYMENT`
- `amount` (integer, optional) — Amount to charge the customer, in the lowest unit of the associated currency. Min value: `1`
- `currency` (enum, optional) — Indicates the country associated with an entity. Values are from the [ISO-4217 Alpha-3](https://www.iso.org/iso-4217-currency-codes.html) specification. Current values: - `USD`: United States Dollar
  - Allowed values: `USD`

### OnFilePaymentAction

Describes an intent for a client to store a customer's account, allowing a client to create payments or issue refunds for it on a recurring basis.

- `scope_id` (string, required) — ID of the client or brand that will charge customers. If a client ID is passed, the grant from this action can be used to create a payment for any merchant owned by the client. If a brand ID is passed, the grant from this action can be used to create a payment for any merchant that has a matching brand ID. Merchant IDs may *not* be passed. Min length: `1` Max length: `128`
- `type` (enum, required, default: ON_FILE_PAYMENT) — The type of the action (`ON_FILE_PAYMENT`).
  - Allowed values: `ON_FILE_PAYMENT`
- `account_reference_id` (string, optional) — Identifier of the account or customer associated to the on file action.

### OnFileDepositAction

Describes an intent for a client to deposit funds into the Cash App account balances in perpetuity until the Cash App account revokes the grant.

- `type` (enum, required) — The type of the action (`ON_FILE_DEPOSIT`).
  - Allowed values: `ON_FILE_DEPOSIT`
- `scope_id` (string, required) — ID of the client or brand that indicates the set of merchants that will deposit to customers. If a client ID is passed, the grant from this action can be used to create a deposit for any merchant owned by the client. If a brand ID is passed, the grant from this action can be used to create a deposit for any merchant that has a matching brand ID. Min length: `1` Max length: `128`
- `account_reference_id` (string, required) — Identifier of the account or customer associated to the on file action.

### LinkAccountAction

Describes an intent for a client to manage a customer's merchant profiles in Cash App.

- `type` (enum, required) — The type of the action (`LINK_ACCOUNT`).
  - Allowed values: `LINK_ACCOUNT`

## Examples

**Response**

```json
{
  "grant": {
    "id": "GRG_221243dc6985a6819ff6950c1a21332f7bc4a46ebd49b5a7002908ab768e8e5ff7831e084d0d2c9d8d939793b55eff50",
    "customer_id": "CST_AQmxh4y_QGoNNIG5NUw0jttqyYedL1LklACQdyJ3H-Vs6WmLtP6A_C7XjQNohvY",
    "request_id": "GRR_1hrxhz136krcq6ezdte2ha5q",
    "action": {
      "amount": 2500,
      "currency": "USD",
      "scope_id": "MMI_4vxs5egfk7hmta3qx2h6rp91x",
      "type": "ONE_TIME_PAYMENT"
    },
    "status": "ACTIVE",
    "type": "ONE_TIME",
    "channel": "IN_PERSON",
    "created_at": "2022-01-01T12:00:00Z",
    "updated_at": "2022-01-01T12:01:00Z",
    "expires_at": "2022-04-01T12:00:00Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.cash.app/network/v1/customers/customer_id/grants/grant_id/revoke"

headers = {
    "Accept": "Accept",
    "X-Region": "X-Region",
    "X-Signature": "X-Signature",
    "User-Agent": "User-Agent"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.cash.app/network/v1/customers/customer_id/grants/grant_id/revoke';
const options = {
  method: 'POST',
  headers: {
    Accept: 'Accept',
    'X-Region': 'X-Region',
    'X-Signature': 'X-Signature',
    'User-Agent': 'User-Agent'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.cash.app/network/v1/customers/customer_id/grants/grant_id/revoke"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Accept", "Accept")
	req.Header.Add("X-Region", "X-Region")
	req.Header.Add("X-Signature", "X-Signature")
	req.Header.Add("User-Agent", "User-Agent")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.cash.app/network/v1/customers/customer_id/grants/grant_id/revoke")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = 'Accept'
request["X-Region"] = 'X-Region'
request["X-Signature"] = 'X-Signature'
request["User-Agent"] = 'User-Agent'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.cash.app/network/v1/customers/customer_id/grants/grant_id/revoke")
  .header("Accept", "Accept")
  .header("X-Region", "X-Region")
  .header("X-Signature", "X-Signature")
  .header("User-Agent", "User-Agent")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.cash.app/network/v1/customers/customer_id/grants/grant_id/revoke', [
  'headers' => [
    'Accept' => 'Accept',
    'User-Agent' => 'User-Agent',
    'X-Region' => 'X-Region',
    'X-Signature' => 'X-Signature',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.cash.app/network/v1/customers/customer_id/grants/grant_id/revoke");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "Accept");
request.AddHeader("X-Region", "X-Region");
request.AddHeader("X-Signature", "X-Signature");
request.AddHeader("User-Agent", "User-Agent");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Accept": "Accept",
  "X-Region": "X-Region",
  "X-Signature": "X-Signature",
  "User-Agent": "User-Agent"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cash.app/network/v1/customers/customer_id/grants/grant_id/revoke")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```