Delete Merchant
curl --request DELETE \
--url https://api-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/ \
--header 'X-API-Version: <api-key>' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>'import requests
url = "https://api-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/"
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"X-API-Version": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'X-Client-ID': '<api-key>',
'X-Client-Secret': '<api-key>',
'X-API-Version': '<api-key>'
}
};
fetch('https://api-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/', 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-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-Version: <api-key>",
"X-Client-ID: <api-key>",
"X-Client-Secret: <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"
"net/http"
"io"
)
func main() {
url := "https://api-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
req.Header.Add("X-API-Version", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("X-API-Version", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
request["X-API-Version"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Sub-merchant deleted successfully",
"data": {
"id": "6182929449"
}
}{
"success": false,
"error": {
"code": "ERR_AUTH_000",
"message": "Missing credentials",
"details": {
"authentication": "Missing credentials."
}
}
}{
"success": false,
"error": {
"code": "ERR_MERCHANT_017",
"message": "Sub-Merchant endpoints are only available to IMPORT PSP accounts",
"details": {}
}
}{
"success": false,
"error": {
"code": "ERR_MERCHANT_016",
"message": "Sub-Merchant not found",
"details": {}
}
}{
"success": false,
"error": {
"code": "ERR_MERCHANT_004",
"message": "Sub-Merchant can only be deleted while Pending or Rejected",
"details": {}
}
}Merchant
Delete Merchant
Remove a sub-merchant that is pending review or has been rejected.
DELETE
/
partners
/
merchants
/
{merchant_id}
/
Delete Merchant
curl --request DELETE \
--url https://api-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/ \
--header 'X-API-Version: <api-key>' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>'import requests
url = "https://api-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/"
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"X-API-Version": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'X-Client-ID': '<api-key>',
'X-Client-Secret': '<api-key>',
'X-API-Version': '<api-key>'
}
};
fetch('https://api-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/', 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-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-Version: <api-key>",
"X-Client-ID: <api-key>",
"X-Client-Secret: <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"
"net/http"
"io"
)
func main() {
url := "https://api-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
req.Header.Add("X-API-Version", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("X-API-Version", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.eximpe.com/partners/merchants/{merchant_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
request["X-API-Version"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Sub-merchant deleted successfully",
"data": {
"id": "6182929449"
}
}{
"success": false,
"error": {
"code": "ERR_AUTH_000",
"message": "Missing credentials",
"details": {
"authentication": "Missing credentials."
}
}
}{
"success": false,
"error": {
"code": "ERR_MERCHANT_017",
"message": "Sub-Merchant endpoints are only available to IMPORT PSP accounts",
"details": {}
}
}{
"success": false,
"error": {
"code": "ERR_MERCHANT_016",
"message": "Sub-Merchant not found",
"details": {}
}
}{
"success": false,
"error": {
"code": "ERR_MERCHANT_004",
"message": "Sub-Merchant can only be deleted while Pending or Rejected",
"details": {}
}
}Overview
Removes a sub-merchant you no longer want onboarded. Once deleted it no longer appears in List Merchants, and Get Merchant answers404 for its ID. Deleting sends no webhook and no notification.
When you can delete
| Status | Delete allowed? |
|---|---|
PENDING | Yes |
REJECTED | Yes |
IN_REVIEW, CHANGES_REQUESTED, APPROVED | No. Refused with a 409. |
CHANGES_REQUESTED sub-merchant cannot be deleted; fix it with Update Merchant instead. A sub-merchant created through the API in sandbox is approved immediately, so it can never be deleted; the API offers no way to change this. Contact EximPe if you need a sandbox sub-merchant in another status to test with.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| merchant_id | string | Yes | The sub-merchant’s ID, e.g. 6182929449. |
Response
{
"success": true,
"message": "Sub-merchant deleted successfully",
"data": {
"id": "6182929449"
}
}
{
"success": false,
"error": {
"code": "ERR_MERCHANT_004",
"message": "Sub-Merchant can only be deleted while Pending or Rejected",
"details": {}
}
}
Errors
| Status | error.code | When | details |
|---|---|---|---|
401 | ERR_AUTH_000, ERR_AUTH_001 | X-Client-ID or X-Client-Secret is missing or wrong | {"authentication": "Missing credentials."} or {"authentication": "Invalid credentials."} |
403 | ERR_AUTH_003 | Your account is not a PSP | {}. Only PSPs can manage sub-merchants |
403 | ERR_MERCHANT_017 | Your account is a PSP, but not set up for import collections | {}. Contact EximPe |
404 | ERR_MERCHANT_016 | No sub-merchant with this ID belongs to you, or it is already deleted | {}. Check the ID |
409 | ERR_MERCHANT_004 | The sub-merchant is IN_REVIEW, CHANGES_REQUESTED or APPROVED | {}. It cannot be deleted in this status |
Authorizations
Client Application ID - Your unique application identifier used to authenticate API requests. You can find your Client ID in the Developer Settings section of the merchant dashboard.
Client Secret Key - Your secret key used alongside the Client ID for secure authentication. Keep this confidential and never expose it in client-side code. Available in the Developer Settings section of the merchant dashboard.
API Version - Specifies which version of the API to use (e.g., '1.X.X', '2.X.X', or '3.X.X'). This header allows you to control which API version your integration uses. Default version information is available in the Developer Settings.
Path Parameters
The sub-merchant's ID.