DELETE:: Deletar uma cobrança imediata

Endpoint de request

https://sandbox.agilspotpay.financehub.com.br/pix/v1/collection/immediate/{transactionId}

Exemplo com as principais linguagem

Retorno em JSON com os dados do cadastro.

<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://sandbox.agilspotpay.financehub.com.br/pix/v1/collection/immediate/{transactionId}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "accept: application/json"
  ],
]);

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

curl_close($curl);

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

Modelo de retorno 200 OK

{
  "transactionId": 45854857,
  "status": 200,
  "message": "success"
}

Modelo de retorno 400 Error

400 - Value Cannot Be Null. (Parameter 'Source')
{
  "errorCode": "DE001",
  "description": "Value cannot be null. (Parameter 'source')"
}

Last updated