Skip to main content
POST
/
v3
/
collection_account
/
{id}
/
{req_id}
/
cancel
Cancel Collection Account Request
curl --request POST \
  --url https://service-sandbox.tazapay.com/v3/collection_account/{id}/{req_id}/cancel \
  --header 'Authorization: Basic <encoded-value>'
import requests

url = "https://service-sandbox.tazapay.com/v3/collection_account/{id}/{req_id}/cancel"

headers = {"Authorization": "Basic <encoded-value>"}

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

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};

fetch('https://service-sandbox.tazapay.com/v3/collection_account/{id}/{req_id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://service-sandbox.tazapay.com/v3/collection_account/{id}/{req_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://service-sandbox.tazapay.com/v3/collection_account/{id}/{req_id}/cancel"

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

req.Header.Add("Authorization", "Basic <encoded-value>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://service-sandbox.tazapay.com/v3/collection_account/{id}/{req_id}/cancel")
.header("Authorization", "Basic <encoded-value>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://service-sandbox.tazapay.com/v3/collection_account/{id}/{req_id}/cancel")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'

response = http.request(request)
puts response.read_body
{
  "id": "req_abc123",
  "object": "collection_account_request",
  "collection_account_id": "cva_crqinja9chqqs7moi8rg",
  "type": "enablement",
  "status": "cancelled",
  "created_at": "2024-09-26T09:39:25.03501Z",
  "updated_at": "2024-09-26T09:41:43.349835Z",
  "status_description": "Request cancelled by merchant."
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

id
string
required

Unique ID of the collection account.

req_id
string
required

Unique ID of the request to cancel.

Response

200 - application/json

Collection account request cancelled successfully.

An enablement, disablement, or reenablement request attached to a collection account.

id
string

Unique ID of the request.

object
string

Always "collection_account_request".

collection_account_id
string

ID of the linked collection account.

type
enum<string>

Type of request.

Available options:
enablement,
disablement,
reenablement
status
enum<string>

Current status of the request.

Available options:
processing,
approval_hold,
requires_action,
succeeded,
failed,
cancelled
requested_currencies
string[]

Currencies requested for enablement (present on enablement requests).

created_at
string<date-time>

Timestamp when the request was created.

updated_at
string<date-time>

Timestamp when the request was last updated.

status_description
string

Description of the current status or failure reason.