Deactivate Customer
curl --request POST \
--url https://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/', 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://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/"
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://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}{
"code": 40001,
"type": "NotAuthenticated",
"detail": {
"message": "Authentication credentials were not provided.",
"code": "not_authenticated"
},
"status": 401
}{
"code": 40004,
"type": "NotFound",
"detail": {
"message": "Not found.",
"code": "not_found"
},
"status": 404
}{
"code": 20063,
"type": "CustomerHasPendingOperationsException",
"detail": {
"message": "Customer '3fa85f64-5717-4562-b3fc-2c963f66afa6' has pending operations and cannot be deactivated."
},
"status": 409
}Customers
Deactivate Customer
Deactivates a customer account and all associated fiat accounts. This action sets the customer and their deposit accounts to inactive. External fiat accounts are transitioned to deactivated as well.
POST
/
api
/
v1
/
customers
/
{customerId}
/
deactivate
/
Deactivate Customer
curl --request POST \
--url https://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/', 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://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/"
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://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://skala-sandbox.ripio.com/api/v1/customers/{customerId}/deactivate/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}{
"code": 40001,
"type": "NotAuthenticated",
"detail": {
"message": "Authentication credentials were not provided.",
"code": "not_authenticated"
},
"status": 401
}{
"code": 40004,
"type": "NotFound",
"detail": {
"message": "Not found.",
"code": "not_found"
},
"status": 404
}{
"code": 20063,
"type": "CustomerHasPendingOperationsException",
"detail": {
"message": "Customer '3fa85f64-5717-4562-b3fc-2c963f66afa6' has pending operations and cannot be deactivated."
},
"status": 409
}Before you deactivate: no pending operations
A customer cannot be deactivated while they have operations still in progress. The request returns
409 Conflict with the error code 20063 (CustomerHasPendingOperationsException), and nothing is changed.- An on-ramp or off-ramp order is being processed (
PROCESSING) or awaiting a refund (CANCELLED— not final until it becomesREFUNDED). An order still inPENDING(created but no deposit received yet) does not block. - A fiat payout or refund is still being processed — for example, an off-ramp withdrawal or a refund that has not settled yet.
What happens when a customer is deactivated
Deactivating a customer setsisActive to false on the customer record. This has the following cascading effects:
- Customer detail (
PUT /customers/{customerId}/): still works and returnsisActive: falsein the response. - KYC, fiat account creation, accept terms, and OTP (
/kyc/,/kyb/,/fiatAccount/,/acceptTerms/,/otp/): return404. - On-ramp and off-ramp orders and sessions: stop appearing in list endpoints; detail endpoints (
GET /onramp/{orderId}/,GET /onrampSession/{sessionId}/, etc.) return404. - Fiat accounts: stop appearing in list endpoints; detail and confirm endpoints return
404. - KYC submissions list: the customer’s submissions are excluded from results.
Webhook notification
When a customer is deactivated, Ripio automatically sends anACCOUNT.CLOSED webhook event to your configured webhook URL. See Account Webhook Events for the payload structure.Authorizations
Access token obtained via /oauth2/token/. Use as Authorization: Bearer <access_token>.
Path Parameters
Unique identifier for the customer.
Response
Customer deactivated successfully.
The response is of type object.
Was this page helpful?