> ## 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.

# Calling the auth and capture Methods Separately

If a `Transaction` object’s payment method is credit card, you may also set up real-time billing by calling the `auth()` and `capture()` methods separately.

To specify a risk score threshold (also known as chargeback probability), call `auth()`. If the score evaluates to a value higher than the threshold, Subscribe does not authorize the transaction. `auth()` also allows you to examine the responses to the AVS and CVN verifications returned by the payment processor. If the risk score exceeds your allowable value, or if the AVS or CVN return score is not acceptable, do not capture the transaction, and set its status to `Cancelled` by calling `Transaction.cancel()`.

For more detail on AVS and CVN Return Codes, please work with your Vindicia Client Services representative.

To capture an authorized transaction before the authorization period expires, call `capture()`. (The authorization period varies by card issuer, but is typically seven days.)

## Capture an authorized Transaction

```

 $tx = new Transaction();
 
 // populate the Transaction object as illustrated above 
 // for credit card based authCapture call
 
 $sendEmailNotification = false;
 $minChargebackProbability = 100; // not doing risk score based rejection
 $response = $tx->auth($minChargebackProbability, 
       $sendEmailNotification);
 
 if($response['returnCode']==200) {
 
    if($tx->statusLog[0]->status=='Authorized') {
       // Check AVS match. vinAVS attribute provides an abstraction
       // for AVS response codes from various payment processors based
       // on Subscribe's interpretation. If vinAVS is set to NoOpinion, 
       // check $tx->statusLog[0]->status->creditCardStatus->avsCode
       // for the response received from your payment processor
 
       if ($txnStatus->vinAVS == "FullMatch" 
       || $txnStatus->vinAVS == "PartialMatch") {
       print " Address verified \n";
       }
       else {
       $avs = $txnStatus->creditCardStatus->avsCode;
       // work with the AVS response code here. If a return value for
       // the ACS response code is not acceptable, 
       // cancel the autobill
       if ($avs == "xyz") {
       $autobill->cancel(true, true) 
       // immediate disentitle and forced cancellation
       exit();
       }
       } 
       // AVS is OK, now check the response to security code verification 
 
       $cvn = $txnStatus->creditCardStatus->cvnCode;
       // work with the CVN response code here. If a return value for
       // the CVN response code is not acceptable, cancel the autobill
       if ($cvn == "abc") {
       $autobill->cancel(true, true) 
       // immediate disentitle and forced cancellation
       exit();
       }
       else {
       $soapTxn = new Transaction();
       $txnBatchToCancel = array($tx);
       $soapTxn.cancel($txnBatchToCancel);
       }
    }
    else if($tx->statusLog[0]->status=='Cancelled') {
       // The transaction did not go through 
       print "Declined. Reason code received from payment 
       processor: ";
       print $tx->statusLog[0]->status->creditCardStatus->authCode . "\n";
    }
 }
```

For more information, see The Transaction Object in the Subscribe API Guide.

**Parent topic:**[Using Credit Cards for One-Time Transactions](../topics/Using_Credit_Cards_for_O)


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