Revoke a handle's connection
client.PaymentHandles.Revoke(ctx, handle) (*PaymentHandleConnection, error)
DELETE/v3/payments/handles/{handle}/connection
Revokes this partner’s grant for the customer. Only your grant is removed; the customer’s wallet at the provider is untouched.
Revoke a handle's connection
package main
import (
"context"
"fmt"
"github.com/linq-team/linq-go"
"github.com/linq-team/linq-go/option"
)
func main() {
client := linqgo.NewClient(
option.WithAPIKey("My API Key"),
)
paymentHandleConnection, err := client.PaymentHandles.Revoke(context.TODO(), "handle")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", paymentHandleConnection.ConnectID)
}
{
"connect_id": "cs_01HZY8",
"handle": "+14155550123",
"status": "connected"
}{
"error": {
"status": 401,
"code": 2004,
"message": "Unauthorized - missing or invalid authentication token",
"doc_url": "https://docs.linqapp.com/error/codes/2xxx/2004/"
},
"success": false
}{
"error": {
"status": 404,
"code": 2001,
"message": "Resource not found",
"doc_url": "https://docs.linqapp.com/error/codes/2xxx/2001/"
},
"success": false
}{
"error": {
"status": 500,
"code": 3006,
"message": "Internal server error",
"doc_url": "https://docs.linqapp.com/error/codes/3xxx/3006/"
},
"success": false
}Returns Examples
{
"connect_id": "cs_01HZY8",
"handle": "+14155550123",
"status": "connected"
}{
"error": {
"status": 401,
"code": 2004,
"message": "Unauthorized - missing or invalid authentication token",
"doc_url": "https://docs.linqapp.com/error/codes/2xxx/2004/"
},
"success": false
}{
"error": {
"status": 404,
"code": 2001,
"message": "Resource not found",
"doc_url": "https://docs.linqapp.com/error/codes/2xxx/2001/"
},
"success": false
}{
"error": {
"status": 500,
"code": 3006,
"message": "Internal server error",
"doc_url": "https://docs.linqapp.com/error/codes/3xxx/3006/"
},
"success": false
}