Re-charge Card
Startbutton's 'Re-charge' feature allows you to charge your customer's card for subsequent transactions after the first charge has been successfully authenticated and completed.
Enable Card Re-Charge 
Hey there! Please contact the Startbutton team if you would like to access this feature. With a single API, you can initiate a card re-charge on domestic and international cards.
Complete First Charge 
In order for us to ensure that the card is valid and can be charged for subsequent transactions, initializing a first charge is required. You could do this as described here for your customer's first transaction with the card.
Store Card Authorization Code
Once the first transaction is successful (via the initialize transaction endpoint), you should have the webhook payload by listening for webhook notifications or getting the transaction status.
Store the authorizationCode returned to you via the webhook payload or the 'get transaction status' endpoint. This can be used to charge the card subsequently. Avoid saving an authorizationCode multiple times.
{
  event: "collection.completed",
  data: {
    merchantId: "64459778bf350cc65485986c",
    paymentPartner: {
      id: "644a50bb188729db2115443b"
      name: "Paystack",
      currency: "NGN",
    },
    transaction: {
      _id: "648ca8aba0fa641316284dc3",
      transType: "collection",
      status: "processing",
      toAmount: 200000,
      toCurrency: "NGN",
      merchantId: "64459778bf350cc65485986c",
      transactionReference: "69f146f0487b",
      customerEmail: "test@customer.com",
      paymentCode:
        "d316a59258c21bd06d23288ce8cedc679686bef8a9907e89bc6e630fb2a1e32f639d4bee4deeb8aaf3e8dada44867a0650e32d60feae47f2a99099f96d176d1b00434876b29e8a03a728312bec3cfc429b7ac26fc73021ab13551e104e2f2680",
      isRecurrent: "false"
      createdAt: "2023-06-16T18:23:39.716Z",
      updatedAt: "2023-06-16T18:23:41.837Z",
      __v: 0
      },
      authorizationCode: "f2e4a43dc7bxxx"
    },
  },{
  event: "collection.completed",
  data: {
    merchantId: "64459778bf350cc65485986c",
    paymentPartner: {
      name: "Paystack",
      currency: "NGN",
    },
    transaction: {
      _id: "648ca8aba0fa641316284dc3",
      transType: "collection",
      status: "processing",
      toAmount: 2000,
      toCurrency: "NGN",
      merchantId: "64459778bf350cc65485986c",
      transactionReference: "69f146f0487b",
      customerEmail: "test@customer.com",
      paymentPartnerId: {
        name: "Paystack",
        currency: "NGN",
      },
      paymentCode:
        "d316a59258c21bd06d23288ce8cedc679686bef8a9907e89bc6e630fb2a1e32f639d4bee4deeb8aaf3e8dada44867a0650e32d60feae47f2a99099f96d176d1b00434876b29e8a03a728312bec3cfc429b7ac26fc73021ab13551e104e2f2680",
      createdAt: "2023-06-16T18:23:39.716Z",
      updatedAt: "2023-06-16T18:23:41.837Z",
    },
  },
};Post Re-Charge Request
For subsequent card charges, send the authorizationCode and amount in the param.
Content-type
Set value to application/json
Post a request to the URL below, where the base URL is determined by the environment you are on.
POST  {{baseurl}}/transaction/recurrent
Sample request:
{
    "authorizationCode": "f2e4a43dc7b313",
    "amount": 27000,
    "reference": "43ntjb4tph"
}Sample response:
{
    "success": true,
    "message": "transaction",
    "data": "processing"
}Webhooks
Go here to understand webhooks and getting transaction status
Last updated