Close Order
curl --request POST \
--url https://pay-api.holdstation.com/partners/orders/{order_id}/closeimport requests
url = "https://pay-api.holdstation.com/partners/orders/{order_id}/close"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://pay-api.holdstation.com/partners/orders/{order_id}/close', 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://pay-api.holdstation.com/partners/orders/{order_id}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://pay-api.holdstation.com/partners/orders/{order_id}/close"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pay-api.holdstation.com/partners/orders/{order_id}/close")
.asString();require 'uri'
require 'net/http'
url = URI("https://pay-api.holdstation.com/partners/orders/{order_id}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"message": "success",
"data": {
"success": true,
"code": 0,
"error": ""
}
}
{
"error": "invalid request",
"error_code": "BAD_REQUEST",
"message": "Order cannot be closed in its current state"
}
{
"error": "unauthorized",
"error_code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
Orders
Close Order
Close a payment order that is in Processing state with a Pending processing state.
POST
/
partners
/
orders
/
{order_id}
/
close
Close Order
curl --request POST \
--url https://pay-api.holdstation.com/partners/orders/{order_id}/closeimport requests
url = "https://pay-api.holdstation.com/partners/orders/{order_id}/close"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://pay-api.holdstation.com/partners/orders/{order_id}/close', 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://pay-api.holdstation.com/partners/orders/{order_id}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://pay-api.holdstation.com/partners/orders/{order_id}/close"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pay-api.holdstation.com/partners/orders/{order_id}/close")
.asString();require 'uri'
require 'net/http'
url = URI("https://pay-api.holdstation.com/partners/orders/{order_id}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"message": "success",
"data": {
"success": true,
"code": 0,
"error": ""
}
}
{
"error": "invalid request",
"error_code": "BAD_REQUEST",
"message": "Order cannot be closed in its current state"
}
{
"error": "unauthorized",
"error_code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
Overview
Partners can close a payment order that is in theProcessing state and Pending processing state by providing the order_id. Once closed, the order cannot be paid.
The unique UUID of the order to close.
{
"message": "success",
"data": {
"success": true,
"code": 0,
"error": ""
}
}
{
"error": "invalid request",
"error_code": "BAD_REQUEST",
"message": "Order cannot be closed in its current state"
}
{
"error": "unauthorized",
"error_code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
⌘I