Delete a recipient
Permanently delete a recipient to prevent future transfers. Existing transfers to the recipient are not affected.
API Credentials
Request Parametersโ
Required - 1 fieldRequired Parameters
`id`STRING(required)
Recipient ID (e.g., recp_test_...). Provided in the URL path.
Responsesโ
200
Successful transactionRecipient deleted successfully. Returns confirmation with deleted: true.
Response structure:
object- "recipient"id- ID of the deleted recipientdeleted- true (confirms deletion)
401
UnauthorizedAuthentication failed. Invalid or missing API key.
Common causes:
- Missing Authorization header
- Invalid secret key
- Using public key instead of secret key
- Incorrect HTTP Basic Auth format
404
Not foundRecipient not found.
Common causes:
- Invalid recipient ID
- Recipient does not belong to your account
- Recipient already deleted
- Mixing test and live mode IDs
Code samplesโ
- cURL
- Ruby
- Python
- Node.js
- PHP
- Java
- C#
- Go
curl https://api.omise.co/recipients/recp_test_5xuy4w91xqz7d1w9u0t \
-X DELETE \
-u skey_test_5xuy4w91xqz7d1w9u0t:
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
recipient = Omise::Recipient.retrieve('recp_test_5xuy4w91xqz7d1w9u0t')
recipient.destroy
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
recipient = omise.Recipient.retrieve('recp_test_5xuy4w91xqz7d1w9u0t')
recipient.destroy()
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
await omise.recipients.destroy('recp_test_5xuy4w91xqz7d1w9u0t');
<?php
define('OMISE_SECRET_KEY', 'skey_test_5xuy4w91xqz7d1w9u0t');
$recipient = OmiseRecipient::retrieve('recp_test_5xuy4w91xqz7d1w9u0t');
$recipient->destroy();
Client client = new Client.Builder()
.secretKey("skey_test_5xuy4w91xqz7d1w9u0t")
.build();
client.recipients().destroy("recp_test_5xuy4w91xqz7d1w9u0t");
var client = new Client("skey_test_5xuy4w91xqz7d1w9u0t");
await client.Recipients.Delete("recp_test_5xuy4w91xqz7d1w9u0t");
client, _ := omise.NewClient(
"pkey_test_5xuy4w91xqz7d1w9u0t",
"skey_test_5xuy4w91xqz7d1w9u0t",
)
recipient, _ := client.Recipients().Destroy("recp_test_5xuy4w91xqz7d1w9u0t")
Important notesโ
- Deleted recipients cannot be recovered
- Existing transfers to deleted recipients are not affected
- Once deleted, the recipient ID cannot be reused
- To update bank account details, delete and create a new recipient
Try it outโ
Required - 1 fields