๐Ÿ“ Bolt Help / APIs, SDKs, & Webhooks / Payment Authorization / Set Up Delayed Capture

Set Up Delayed Capture

Learn about authorization response codes for different processors or gateways.

This guide enables merchants using our Checkout Custom Cart or Accounts Direct API packages to implement a delayed capture process. This process can be used to support backorders, pre-orders, or systems that purposefully wait to capture transactions until the time of shipment.

This process involves referencing and voiding the initial pending transaction (or allowing it to expire), then replacing it with a new authorization to complete the transaction at the later desired date and time.

Before You Start

TO-DO

Reach out to Bolt Support to let them know you plan to implement delayed capture and to request that Auto Capture be disabled for your account.

Step 1: Store Transaction Reference

TIP

Card authorizations have a lifespan of 7-14 days depending on the payment services provider. To acquire a valid authorization that can be captured, it may be necessary to request a new authorization over the lifetime of an uncaptured transaction.

After you receive a pending transaction request, store the transaction reference at data.source_transaction.reference using the Transaction Webhooks endpoint.

"type": "pending",
"object": "transaction",
"data": {
  "id": "T1c3p4yBuVYJ9",
  ...
  "source_transaction": {
    "id": "T1c3p4yBuVYJ9",
    "type": "cc_payment",
    "processor": "adyen_gateway",
    "date": 1615407159447,
    "reference": "LBLJ-TWW7-R9VC",
    ...
  }
  ...
}

Step 2: Retrieve Transaction Details

Use the transaction reference retrieved in Step 1 to retrieve Transaction Details.

Then, use the retrieved from_credit_card.id and from_consumer.id values (found in the Transaction Details response) for use in the new auth request.

Step 3: Void Prior Transaction

If it has not already expired, void the initial transaction by using its transaction reference with the Void a Transaction endpoint.

Step 4: Generate a New Authorization

Generate a new authorization using the Authorize a Card endpointโ€™s merchant_credit_card_authorization_recharge functionality. Be sure to include the consumer_id and credit_card_id acquired from the initial transaction.

Store the new transaction reference found at transaction.reference for use in Step 6.

Example Request Body

{
    "auto_capture": false,
    "cart": {
      "items": [
        {
          "description": "Large tote with Bolt logo.",
          "quantity": 1,
          "reference": "item_100",
          "sku": "BOLT-SKU_100",
          "unit_price": 1000,
          "name": "Bolt Tote Bag"
        }
      ],
      "tax_amount": 0,
      "total_amount": 1000,
      "currency": "USD",
      "display_id": "Order #100100",
      "order_reference": "100100"
    },
    "consumer_id": "CA9oXWDogFPbb",
    "credit_card_id": "CAbw1xCK6Zeci",
    "source": "direct_payments",
    "user_identifier": {
      "email": "dev+test-merchant@bolt.com",
      "phone": "5555555555"
    },
    "user_identity": {
      "first_name": "John",
      "last_name": "Doe"
    }
  }

Step 5: (Optional) Maintain Active Authorization

To guarantee funds will be available for the new transaction, maintain an active authorization until ready to capture.

Repeat Steps 2-4 at regular intervals according to your payment services provider’s authorization timeout window over the lifetime of the uncaptured transaction until you are ready to capture funds.

Step 6: Capture the Transaction

Once you are ready to capture funds, use the Capture a Transaction endpoint to capture using the new transaction_reference.

You should have acquired the correct value for transaction_reference from the Authorize a Card endpoint as instructed in Step 4.

Payload Example

{
  "amount": 754,
  "currency": "USD",
  "skip_hook_notification": false,
  "transaction_reference": "LBLJ-TWW7-R9VC"
}
๐Ÿ“–On This Page
Filter by Section
Filter by Topic