Refund
curl --request POST \
--url https://api.hit-pay.com/v1/refund \
--header 'Content-Type: application/json' \
--header 'X-BUSINESS-API-KEY: <x-business-api-key>' \
--data '
{
"amount": 100.99,
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"webhook": "https://www.google.com",
"email": "[email protected]"
}
'import requests
url = "https://api.hit-pay.com/v1/refund"
payload = {
"amount": 100.99,
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"webhook": "https://www.google.com",
"email": "[email protected]"
}
headers = {
"X-BUSINESS-API-KEY": "<x-business-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-BUSINESS-API-KEY': '<x-business-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 100.99,
payment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
webhook: 'https://www.google.com',
email: '[email protected]'
})
};
fetch('https://api.hit-pay.com/v1/refund', 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://api.hit-pay.com/v1/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 100.99,
'payment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'webhook' => 'https://www.google.com',
'email' => '[email protected]'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BUSINESS-API-KEY: <x-business-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hit-pay.com/v1/refund"
payload := strings.NewReader("{\n \"amount\": 100.99,\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"webhook\": \"https://www.google.com\",\n \"email\": \"[email protected]\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-BUSINESS-API-KEY", "<x-business-api-key>")
req.Header.Add("Content-Type", "application/json")
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.hit-pay.com/v1/refund")
.header("X-BUSINESS-API-KEY", "<x-business-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 100.99,\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"webhook\": \"https://www.google.com\",\n \"email\": \"[email protected]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hit-pay.com/v1/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-BUSINESS-API-KEY"] = '<x-business-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 100.99,\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"webhook\": \"https://www.google.com\",\n \"email\": \"[email protected]\"\n}"
response = http.request(request)
puts response.read_body{
"id": "9ef6957e-6b1b-4e08-8cde-d5f5c908418d",
"refunded_by": "QA SG",
"payment_id": "9a934d94-a41f-46c7-a934-c1ebf2436008",
"amount_refunded": 1,
"total_amount": 96.49,
"currency": "sgd",
"status": "succeeded",
"payment_method": "card",
"provider_fee": null,
"provider_fee_currency": null,
"refunded_at": "2025-05-21T09:17:52.000000Z",
"created_at": "2025-05-21T17:17:52"
}Refund
Create Refund
Issue a full or partial refund for a completed charge
POST
/
v1
/
refund
Refund
curl --request POST \
--url https://api.hit-pay.com/v1/refund \
--header 'Content-Type: application/json' \
--header 'X-BUSINESS-API-KEY: <x-business-api-key>' \
--data '
{
"amount": 100.99,
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"webhook": "https://www.google.com",
"email": "[email protected]"
}
'import requests
url = "https://api.hit-pay.com/v1/refund"
payload = {
"amount": 100.99,
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"webhook": "https://www.google.com",
"email": "[email protected]"
}
headers = {
"X-BUSINESS-API-KEY": "<x-business-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-BUSINESS-API-KEY': '<x-business-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 100.99,
payment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
webhook: 'https://www.google.com',
email: '[email protected]'
})
};
fetch('https://api.hit-pay.com/v1/refund', 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://api.hit-pay.com/v1/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 100.99,
'payment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'webhook' => 'https://www.google.com',
'email' => '[email protected]'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BUSINESS-API-KEY: <x-business-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hit-pay.com/v1/refund"
payload := strings.NewReader("{\n \"amount\": 100.99,\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"webhook\": \"https://www.google.com\",\n \"email\": \"[email protected]\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-BUSINESS-API-KEY", "<x-business-api-key>")
req.Header.Add("Content-Type", "application/json")
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.hit-pay.com/v1/refund")
.header("X-BUSINESS-API-KEY", "<x-business-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 100.99,\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"webhook\": \"https://www.google.com\",\n \"email\": \"[email protected]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hit-pay.com/v1/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-BUSINESS-API-KEY"] = '<x-business-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 100.99,\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"webhook\": \"https://www.google.com\",\n \"email\": \"[email protected]\"\n}"
response = http.request(request)
puts response.read_body{
"id": "9ef6957e-6b1b-4e08-8cde-d5f5c908418d",
"refunded_by": "QA SG",
"payment_id": "9a934d94-a41f-46c7-a934-c1ebf2436008",
"amount_refunded": 1,
"total_amount": 96.49,
"currency": "sgd",
"status": "succeeded",
"payment_method": "card",
"provider_fee": null,
"provider_fee_currency": null,
"refunded_at": "2025-05-21T09:17:52.000000Z",
"created_at": "2025-05-21T17:17:52"
}Headers
Example:
"b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d"
Body
application/json
The remaining amount to be refunded.
Example:
100.99
Payment ID for the successful payment request
Example:
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
The webhook URL
Example:
"https://www.google.com"
Available options:
true, false Example:
Response
200 - application/json
200
Example:
"9858acaf-edc8-427d-b0e5-c32e1b1543db"
Example:
"Test QA"
Example:
"984e6b86-f0e2-4283-991c-d8236f67567e"
Example:
13
Example:
99.99
Example:
"usd"
Example:
"card"
Example:
1.1
Example:
"SGD"
Example:
"2025-05-21T09:17:52.000000Z"
Example:
"2023-01-30T16:10:17"
Last modified on June 11, 2026
Was this page helpful?
⌘I