> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using ECP for One-Time Transactions

For the ECP payment method, the status of a transaction after an `authCapture()` call is `Authorized`. The payment processor has performed a real-time validation of the payment information to ensure, for example, that the bank routing number is not blacklisted. Subscribe then submits the transaction to the payment processor for further processing (deposit or withdrawal from the specified bank), and changes the status to `AuthorizedPending`, to indicate that processing of the transaction has begun.

Six banking days must elapse before Subscribe sets the status to `Captured`. If, during that time, Subscribe receives notice (by a reason code) from the payment processor that the transaction failed, Subscribe changes the transaction status to `Cancelled`.

If the reason code from the payment processor indicates that there will be an internal retry of the transaction, Subscribe changes the transaction status to `RetryPending`. The retry date depends on the retry schedule that the payment processor has previously defined with you according to your division ID. (Be sure to provide Vindicia with your division ID’s retry schedule.)

If Subscribe does not receive any decline codes during the six banking days after the retry, Subscribe sets the transaction status to `Captured`.

## Create a Transaction with ECP as the payment method

```

$txn = new Transaction();
 
 // populate the transaction as shown in the previous example
 $paymentMethod = new PaymentMethod();
 $paymentMethod->setBillingAddress($address); 
 $paymentMethod->setType('ECP');
 
 $ecp = new ECP();
 
 // specify account number where funds will be with withdrawn from 
 $ecp->setAccount('123456789'); 
 
 // specify bank routing number
 $ecp->setRoutingNumber('3409284043');
 $ecp->setAccountType('ConsumerChecking');
 $paymentMethod->setECP($ecp);
 
 // If this is an inbound payment (a withdrawal from a 
 // specified bank account and deposit into the merchant's 
 // account), set the source payment method in the transaction. 
 // For paying out (a deposit into a specified bank account and 
 // withdrawal from the merchant's bank account), set the 
 // destinationPaymentMethod attribute of the transaction
 
 $tx->setSourcePaymentMethod($paymentMethod);
 $tx->setEcpTransactionType('Inbound');
 
 $sendEmailNotification = false;
 $response = $tx->authCapture($sendEmailNotification);
 
 if($response['returnCode'] ==200) {
    if($tx->statusLog[0]->status=='Authorized') {
       print "Successful\n";
    }
    else if($tx->statusLog[0]->status=='Cancelled') {
       // The transaction did not go through 
       print "Declined. Reason code from payment processor: ";
       print $tx->statusLog[0]->status->ecpStatus->authCode . "\n";
    }
 }
```

* **[Creating Outbound Payment Transactions with ECP](../topics/Creating_Outbound_Paymen)**

**Parent topic:**[Working with One-Time Transactions](../topics/ProgGuide_Transactions)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.