# How to charge a card

> Submit a card charge, handle Charge API response states, and verify the final result.

For when to choose this flow, see [Charge API](/payments/online/charge-api).

## Submit the initial charge

Send the customer email, amount, and card details to `https://api.paystack.co/charge`.

```json
{
  "email": "some@body.nice",
  "amount": "10000",
  "card": {
    "cvv": "408",
    "number": "4084084084084081",
    "expiry_month": "01",
    "expiry_year": "99"
  },
  "pin": "0000"
}
```

```bash
curl https://api.paystack.co/charge \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d @charge.json \
-X POST
```

Track the `data.reference` from every response. You need it for follow-up actions and final verification.

## Handle the next action

Use `data.status` as the next action for the charge.

<table>
<thead>
  <tr>
    <th>
      <code>
        data.status
      </code>
    </th>
    
    <th>
      What to do
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        send_pin
      </code>
    </td>
    
    <td>
      Collect the card PIN and submit it with the reference.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        send_otp
      </code>
    </td>
    
    <td>
      Collect the OTP sent by the bank and submit it with the reference.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        send_phone
      </code>
    </td>
    
    <td>
      Collect the phone number tied to the bank account and submit it with the reference.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        send_birthday
      </code>
    </td>
    
    <td>
      Collect the customer’s birthday and submit it with the reference.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        send_address
      </code>
    </td>
    
    <td>
      Collect street address, city, state, and ZIP code, then submit them with the reference.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        open_url
      </code>
    </td>
    
    <td>
      Redirect the customer to <code>
        data.url
      </code>
      
       to complete bank-controlled authentication.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pending
      </code>
    </td>
    
    <td>
      Wait at least 10 seconds, then check the pending charge or verify the transaction.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pay_offline
      </code>
    </td>
    
    <td>
      Show the offline instruction, such as a USSD code, and wait for completion.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        success
      </code>
    </td>
    
    <td>
      Move to verification.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        failed
      </code>
      
       or <code>
        timeout
      </code>
    </td>
    
    <td>
      Stop the flow and start a new charge if the customer wants to retry.
    </td>
  </tr>
</tbody>
</table>

## Submit follow-up responses

Submit a PIN:

```bash
curl https://api.paystack.co/charge/submit_pin \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"pin":"0000","reference":"apg8mnjf5yg7zp8"}' \
-X POST
```

Submit an OTP:

```bash
curl https://api.paystack.co/charge/submit_otp \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"otp":"123456","reference":"vpw8wvwz4lghrgb"}' \
-X POST
```

Submit a phone number:

```bash
curl https://api.paystack.co/charge/submit_phone \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"phone":"08000000000","reference":"apg8mnjf5yg7zp8"}' \
-X POST
```

Submit a birthday:

```bash
curl https://api.paystack.co/charge/submit_birthday \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"birthday":"1990-01-31","reference":"apg8mnjf5yg7zp8"}' \
-X POST
```

For `open_url`, redirect the customer to the returned URL. If you want Paystack to force this hosted authentication path, add `"use_hosted_url": true` to the original charge payload.

## Verify the outcome

After the flow completes, verify the transaction with the charge reference:

```bash
curl https://api.paystack.co/transaction/verify/:reference \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-X GET
```

Deliver value only when `data.status` is `success`. Also confirm the amount matches what you intended to charge.

## Handle webhook confirmation

Use the `charge.success` webhook as your primary signal to fulfill orders, grant access, or update your database. The customer can close the page before your callback runs, but the webhook still arrives.

Add your webhook URL on the [Paystack Dashboard](https://dashboard.paystack.com/v2/developers/api-configuration), and [verify the signature](/developer-tools/integration/webhooks#verify-webhook-signatures) on every event with your webhook signing secret.

Keep server-side verification for redirects, retries, and reconciliation.
