Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
JavaScript
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}}; fetch('https://api.gnosispay.com/api/v1/order/{orderId}/cancel', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
curl --request POST \ --url https://api.gnosispay.com/api/v1/order/{orderId}/cancel \ --header 'Authorization: Bearer <token>'
import requestsurl = "https://api.gnosispay.com/api/v1/order/{orderId}/cancel"headers = {"Authorization": "Bearer <token>"}response = requests.post(url, headers=headers)print(response.text)
package mainimport ( "fmt" "net/http" "io")func main() { url := "https://api.gnosispay.com/api/v1/order/{orderId}/cancel" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer <token>") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body))}
HttpResponse<String> response = Unirest.post("https://api.gnosispay.com/api/v1/order/{orderId}/cancel") .header("Authorization", "Bearer <token>") .asString();
require 'uri'require 'net/http'url = URI("https://api.gnosispay.com/api/v1/order/{orderId}/cancel")http = Net::HTTP.new(url.host, url.port)http.use_ssl = truerequest = Net::HTTP::Post.new(url)request["Authorization"] = 'Bearer <token>'response = http.request(request)puts response.read_body
{ "ok": true }
{ "message": "Invalid order transition"}
{ "message": "<string>"}
{ "message": "Card order not found."}
{ "message": "An unexpected error occurred."}
This endpoint transitions the card order to the cancelled state.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The unique identifier of the card order to cancel.
Card order successfully cancelled.
true