Skip to main content

Automatic Transfer Confirmation

Learn how to create transfers that are automatically confirmed without user interaction - perfect for background payments, automated payouts, and system-to-system transfers.

Overview​

Automatic confirmation allows you to create and complete transfers programmatically without redirecting users to the Paysera interface. This is ideal when:

  • Processing automated payouts (commissions, royalties)
  • Running scheduled payments
  • Handling system-triggered transfers
  • Operating without user presence
Permissions Required

Automatic confirmation requires special API permissions. Contact Paysera support to enable this feature for your client.

Prerequisites​

Before you begin:

  • ✅ API credentials with automatic confirmation permissions
  • ✅ Sufficient balance in your account
  • ✅ Understanding of Transfer Statuses

Workflow​

1. Create Transfer (auto_confirm: true)
↓
2. Transfer Status: reserved
↓
3. Automatic Confirmation
↓
4. Transfer Status: done
How this relates to the full workflow

This workflow is a simplified version of the full 5-step workflow. By setting auto_confirm: true, you are instructing the system to automatically perform the reserve, provide-password (if applicable), sign (if applicable), and register steps.

Step-by-Step Guide​

Create a transfer with auto_confirm parameter:

POST /transfer/rest/v1/transfers HTTP/1.1
Host: wallet.paysera.com
Content-Type: application/json
Authorization: MAC id="client_id", ts="...", nonce="...", mac="..."

{
"amount": {
"amount": "50.00",
"currency": "EUR"
},
"beneficiary": {
"type": "bank",
"name": "John Doe",
"bank_account": {
"iban": "LT123456789012345678"
}
},
"payer": {
"account_number": "EVP9876543210"
},
"purpose": {
"details": "Commission payment"
},
"auto_confirm": true
}

Key Parameter:

  • auto_confirm: true - Enables automatic confirmation

Complete Code Examples​

<?php
use Paysera\Client\TransferClient;

// Initialize client
$client = TransferClient::create([
'auth' => [
'mac' => [
'mac_id' => getenv('PAYSERA_CLIENT_ID'),
'mac_secret' => getenv('PAYSERA_MAC_KEY'),
],
],
]);

try {
// Create transfer with automatic confirmation
$transfer = $client->createTransfer([
'amount' => [
'amount' => '50.00',
'currency' => 'EUR',
],
'beneficiary' => [
'type' => 'bank',
'name' => 'John Doe',
'bank_account' => [
'iban' => 'LT123456789012345678',
],
],
'payer' => [
'account_number' => 'EVP9876543210',
],
'purpose' => [
'details' => 'Commission payment',
],
'auto_confirm' => true,
]);

echo "Transfer created: " . $transfer->getId() . "\n";
echo "Status: " . $transfer->getStatus() . "\n";
echo "Auto-confirm: " . ($transfer->getAutoConfirm() ? 'Yes' : 'No') . "\n";

// Wait for automatic confirmation (usually happens within seconds)
sleep(5);

// Check updated status
$updated = $client->getTransfer($transfer->getId());
echo "Updated status: " . $updated->getStatus() . "\n";

if ($updated->getStatus() === 'done') {
echo "Transfer completed successfully!\n";
}

} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}

Use Cases​

Automatically pay commissions to partners:

function payCommission($partnerId, $amount) {
$partner = getPartner($partnerId);

$transfer = $client->createTransfer([
'amount' => [
'amount' => $amount,
'currency' => 'EUR',
],
'beneficiary' => [
'type' => 'paysera',
'name' => $partner->name,
'paysera_account' => [
'account_number' => $partner->account,
],
],
'payer' => [
'account_number' => 'EVP9876543210',
],
'purpose' => [
'details' => "Commission for period " . date('Y-m'),
],
'auto_confirm' => true,
]);

logPayment($partnerId, $transfer->getId());

return $transfer;
}

Error Handling​

Insufficient Funds:

{
"error": "insufficient_funds",
"error_description": "Account balance insufficient",
"available": "30.00",
"required": "50.00"
}

Permission Denied:

{
"error": "forbidden",
"error_description": "Auto-confirmation not enabled for this client"
}

Invalid Beneficiary:

{
"error": "invalid_beneficiary",
"error_description": "Invalid account number format"
}

Security Considerations​

function validateTransferData($data) {
if (!isset($data['amount']) || $data['amount'] <= 0) {
throw new ValidationException('Invalid amount');
}

if (!isset($data['beneficiary']['account_number'])) {
throw new ValidationException('Beneficiary account required');
}

// Validate IBAN format
if (!isValidIBAN($data['beneficiary']['account_number'])) {
throw new ValidationException('Invalid IBAN');
}

return true;
}

Comparison: Auto vs Manual​

FeatureAuto ConfirmationManual Confirmation
User InteractionNoneRequired
SpeedInstantDepends on user
Use CaseBackground paymentsUser-initiated
PermissionsSpecial permission neededStandard
ControlFull automationUser verifies

Additional Resources​

Support​

Need help with complex integrations?

Contact: tech_support@paysera.com