# How to set up recurring charges

> Store a reusable authorization from a first payment and charge it again later.

## Charge the first transaction

Start with a normal successful payment from Checkout, a mobile SDK, or another supported first-charge flow.

For card tokenization, Paystack recommends charging at least NGN 50.00, GHS 0.10, ZAR 1.00, KES 3.00, or USD 2.00.

## Retrieve the authorization

After the payment succeeds, retrieve the transaction result from your webhook endpoint or from transaction verification. The successful transaction includes an `authorization` object inside `data`.

```json
{
  "data": {
    "authorization": {
      "authorization_code": "AUTH_8dfhjjdt",
      "card_type": "visa",
      "last4": "1381",
      "exp_month": "08",
      "exp_year": "2018",
      "bin": "412345",
      "bank": "TEST BANK",
      "channel": "card",
      "signature": "SIG_idyuhgd87dUYSHO92D",
      "reusable": true,
      "country_code": "NG",
      "account_name": "BoJack Horseman"
    }
  }
}
```

## Store the authorization and email

Save the full `authorization` object and the exact transaction email in your database. Use the `signature` to deduplicate cards so you do not store the same instrument more than once.

## Charge the stored authorization

When you need to bill the customer again, charge the saved authorization code with the same email.

```bash
curl https://api.paystack.co/transaction/charge_authorization \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
  "authorization_code": "AUTH_pmx3mgawyd",
  "email": "mail@mail.com",
  "amount": "300000"
}' \
-X POST
```

## Handle 2FA when required

Some recurring charges can return a paused response that requires the customer to authorize the payment on a hosted page.

```json
{
  "status": true,
  "message": "Please, redirect your customer to the authorization url provided",
  "data": {
    "authorization_url": "https://checkout.paystack.com/resume/0744ub5o065nwyz",
    "reference": "jvx2o36ghlvrgtt",
    "access_code": "0744ub5o065nwyz",
    "paused": true
  }
}
```

Redirect the customer to `data.authorization_url`. You can also include `callback_url` in the request and `metadata.cancel_action` if you need custom completion and cancellation destinations.

## Authorization fields

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        authorization_code
      </code>
    </td>
    
    <td>
      Token you pass to <code>
        charge_authorization
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        card_type
      </code>
    </td>
    
    <td>
      Card brand or type
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        last4
      </code>
    </td>
    
    <td>
      Last four digits of the card
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        exp_month
      </code>
    </td>
    
    <td>
      Expiry month
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        exp_year
      </code>
    </td>
    
    <td>
      Expiry year
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        bin
      </code>
    </td>
    
    <td>
      First six digits of the card
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        bank
      </code>
    </td>
    
    <td>
      Issuing bank
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        channel
      </code>
    </td>
    
    <td>
      Payment channel, such as <code>
        card
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        signature
      </code>
    </td>
    
    <td>
      Stable identifier for the payment instrument
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reusable
      </code>
    </td>
    
    <td>
      Whether the authorization can be charged again
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        country_code
      </code>
    </td>
    
    <td>
      ISO 3166-1 alpha-2 country code
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        account_name
      </code>
    </td>
    
    <td>
      Name attached to the payment instrument when available
    </td>
  </tr>
</tbody>
</table>

Use webhooks or verification to confirm every recurring charge before fulfilment.
