Skip to main content

Destroy Signature

To destroy a signature in the NoWallet system, use the following endpoint:

POST{baseUrl}/destroy/signature

It is used to cancel one payment just after initiation, if payment is still initiated, it will be cancelled

Request Destroying Signature Parameters

When destroying a signature, the request must include the following parameters in the request body:

When destroying a signature, the request body must include the following parameters in JSON format. The signature is the unique identifier for the payment to destroy.

NameInTypeRequiredDescription
bodybodySignatureDTOtruenone

Example Request Body

{
"signature": "EXAMPLE-ba325fc6-ca09eb7b4dce"
}

Code Samples in Multiple Languages

To help you integrate the NoWallet API seamlessly, we provide code samples in various programming languages. These examples demonstrate how to make a request to the API endpoint and handle the response.

  • Shell (cURL): For quick testing and command-line usage.
  • HTTP: Raw HTTP request format for understanding the structure.
  • JavaScript: Using fetch for browser or Node.js environments.
  • Ruby: Using the rest-client library for Ruby applications.
  • Python: Using the requests library for Python projects.
  • PHP: Using GuzzleHttp for PHP integrations.
  • Java: Using HttpURLConnection for Java applications.
  • Go: Using the net/http package for Go projects.

Example Request

Below is an example of how to destroy a signature using different languages. Select the tab corresponding to your preferred language to view the implementation.

note

Ensure you replace {access-token} with your actual API token and provide the required request body parameters.

# Example cURL command to destroy a signature
curl -X POST {baseUrl}/destroy/signature \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'

Response Parameters

The response from the NoWallet API will include the following parameters in JSON format. The statusCode indicates the success or failure of the operation.

StatusMeaningDescriptionSchema
200OKSignature destroyed with successfulNone
400Bad RequestBad Request possible errorsNone

Error Response (400 Bad Request)

Bad Request possible errors

{
"statusCode": 400,
"error": "SIGNATURE_NOT_FOUND",
"message": "It seems that this signature does not exist or You can't perform this action, this token does not allow you"
}
{
"statusCode": 400,
"error": "SIGNATURE_ALREADY_CANCELLED",
"message": "This signature has already been cancelled, you cannot cancel it again"
}
{
"statusCode": 400,
"error": "SIGNATURE_ALREADY_CLOSED",
"message": "This signature has already been change state, you cannot cancel it again"
}

Was this page helpful?