Payment reauthorizations

Gain a better understanding of Digital River's payment reauthorization feature and how you might use it to sell pre-ordered goods

You have a higher risk of chargebacks when selling pre-ordered goods or managing other types of delayed fulfillments. This is due to the often-lengthy period of time between payment authorization and capture.

If you'd like to minimize your chargeback risks, your account can be setup so that Digital River never initiates the capture and settlement process without first possessing a valid authorization. There are however potential downsides to selecting this option. For details, refer to Managing chargeback risks.

Although Digital River's payment reauthorization feature has other use cases, this article mainly focuses on strategies you could use to process checkouts and fulfillments that contain pre-ordered goods.

Managing chargeback risks

An order whose state moves to accepted indicates that the issuing bank has given approval for the transaction to proceed. But that authorization remains valid for only a limited amount of time. If it expires before a create fulfillment request is submitted that results in Digital River attempting to fully or partially capture an order's charges[], then the issuing bank may initiate a late presentment chargeback.

To manage this, we can configure your account to be chargeback risk tolerant or chargeback risk averse. The option you instruct your Digital River representative to select helps determine the balance between the frequency of chargebacks you receive and the amount of revenue you earn.

Risk tolerant

If your account is configured to be risk tolerant, then Digital River attempts to capture and settle using the original authorization, even when it has expired and we're unable to create a new one to replace it.

By default, all accounts are set up to be risk tolerant.

In most cases, this option ensures your revenue opportunities are being optimized. It does however carry a slightly higher risk of late presentment chargebacks. But these types of chargebacks typically only occur in a small percentage of all orders.

Risk averse

If your account is configured to be risk averse, then Digital River only attempts to capture a charge when (1) the original payment authorization has yet to expire or (2) we're able to secure a new authorization to replace the expired one. In other words, Digital River never attempts to force settle on an expired authorization.

With this option, you can minimize late presentment chargebacks. However, by setting up your account to be risk averse, you do run the risk of losing out on potential revenue. This is because a high percentage of expired authorization capture attempts are ultimately approved by the issuing bank.

Pre-orders

By allowing customers to pre-order goods, you can sell products that are not yet available or those that are out of stock. This can be useful if you want to generate excitement around an upcoming release or forecast demand for a new product.

In this section, you'll find information on how to handle checkouts and process fulfillments that contain pre-ordered goods.

Handling pre-order checkouts

In the Digital River APIs, checkouts that involve pre-ordered goods don't require any unique customizations. This means you're not required to pass any additional data in SKUs, checkouts, or checkout-sessions.

With the pre-orders feature:

Processing pre-order fulfillments

Depending on whether your account is set up to be risk tolerant or risk averse, the following sections outline, at a high-level, some possible approaches to fulfilling pre-ordered goods.

The actual solution you implement is highly dependent on your fulfillment setup. For example, you'll likely need to analyze how your fulfiller and warehouses communicate, the responsiveness of that integration and at what points in the pipeline shipments can be cancelled.

Whichever chargeback risk option you select, the order's state should be accepted before you initiate fulfillment operations.

Risk tolerant fulfillments

If your account is set up to be risk tolerant, wait until the order's pre-ordered items[] are ready to be released and then instruct your fulfiller to ship them. Once your fulfiller notifies you that the goods are in transit, send Digital River a POST /fulfillments request that includes any tracking data they may have provided, along with the quantity of each items[] that's getting delivered.

curl --location --request POST 'https://api.digitalriver.com/fulfillments' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Secret API key>' \
...
--data-raw '{
    "orderId": "250956650336",
    "items": [
        {
            "itemId": "180179270336",
            "quantity": "2"
        }
    ],
    "trackingCompany": "Fedex",
    "trackingNumber": "Z10100002632653",
    "trackingUrl": "http://www.fedex.com/Tracking?tracknumbers=Z10100002632653"
}'

Whether Digital River (1) attempts to capture and settle on the original payment authorization because it has yet to expire, (2) successfully creates a new authorization to replace the expired one or (3) fails to create a new authorization and then force settles on the original, expired one, your request immediately returns a fulfillment and this results in the creation of an event whose type is order.charge.capture.pending and whose data.object is a charge.

Both of these notifications indicate that Digital River is in the process of attempting to capture that charge.

{
    "id": "ful_c80eed02-6664-4570-9f96-b0c91bf56f1e",
    "createdTime": "2023-01-03T20:17:17Z",
    "items": [
        {
            "quantity": 2,
            "cancelQuantity": 0,
            "skuId": "bda6f910-1135-4e28-bd7b-fd42b592e5e6",
            "itemId": "180179270336"
        }
    ],
    "orderId": "250956650336",
    "trackingCompany": "Fedex",
    "trackingNumber": "Z10100002632653",
    "trackingUrl": "http://www.fedex.com/Tracking?tracknumbers=Z10100002632653",
    "liveMode": false
}

Once the payment processor informs Digital River whether the capture succeeded or failed, we create an event whose type is either order.charge.capture.complete or order.charge.capture.failed, respectively.

Both of them could be used to trigger a function that updates the status of the payment in your system. Additionally, you might use the failed event's captures[].fulfillmentId to look up the fulfillment and then send a request to your fulfiller that attempts to cancel shipment of those goods.

Risk averse fulfillments

If your account is set up to be risk averse, wait until the order's pre-ordered items[] are ready to be released and then send Digital River a POST /fulfillments request that specifies the quantity of each items[] that's scheduled to be shipped.

curl --location 'https://api.digitalriver.com/fulfillments' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Your secret key>' \
--header 'Cookie: incap_ses_1164_1638494=wJA7XORjxj+de56Y81wnECTPLmUAAAAAcw3fjSPvsJPHwenpL9OI/g==; incap_ses_1534_1638494=/hPSMOaK7w7KTFIWa91JFZ3bLmUAAAAAHPBG8qox2FXXecPq/VN/9A==; nlbi_1638494=Ny5HJhNmOV4dDgfWvwbRrQAAAADj0b73/HZghorTOo7vClvB; nlbi_1638494_1914372=65A9PK9ExhPm9B9pvwbRrQAAAACALsnE+1WpHbkZHBURlxq7; visid_incap_1638494=ZgPNr8DiSPety37xbpnVqijUnmQAAAAAQUIPAAAAAAC6uhinP72rh9xkXa7aYFH+' \
--data '{
    "orderId": "291973150336",
    "items": [
        {
            "itemId": "225220780336",
            "quantity": "1"
        }
    ]
}'

At this point, your integration should be setup to handle both success and failure responses.

Success response

If Digital River determines that the original payment authorization has yet to expire or (in the event that it's no longer valid) successfully creates a new authorization, then your POST/ fulfillments request immediately returns a fulfillment and this results in the creation of an event whose type is order.charge.capture.pending and whose data.object is a charge.

{
    "id": "ful_8b9cfa72-0f04-46a4-abfe-eed7066bf586",
    "createdTime": "2023-10-17T19:11:19Z",
    "items": [
        {
            "quantity": 1,
            "cancelQuantity": 0,
            "skuId": "d95b458d-1752-4729-b702-bf24a9fd3020",
            "itemId": "225220780336"
        }
    ],
    "orderId": "291973150336",
    "liveMode": false
}

Both of these notifications indicate that we're in the process of attempting to capture the charge.

At this point, you should send a request to your fulfiller instructing them to ship the goods and, once they notify you that they're in transit, update the fulfillment with tracking data.

Passing trackingCompany, trackingNumber, and trackingUrl in this update request helps Digital River detect fraud and manage chargeback risks.

curl --location 'https://api.digitalriver.com/fulfillments/ful_8b9cfa72-0f04-46a4-abfe-eed7066bf586' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Your secret key>' \
--header 'Cookie: incap_ses_1164_1638494=wJA7XORjxj+de56Y81wnECTPLmUAAAAAcw3fjSPvsJPHwenpL9OI/g==; incap_ses_1534_1638494=/hPSMOaK7w7KTFIWa91JFZ3bLmUAAAAAHPBG8qox2FXXecPq/VN/9A==; nlbi_1638494=Ny5HJhNmOV4dDgfWvwbRrQAAAADj0b73/HZghorTOo7vClvB; nlbi_1638494_1914372=65A9PK9ExhPm9B9pvwbRrQAAAACALsnE+1WpHbkZHBURlxq7; visid_incap_1638494=ZgPNr8DiSPety37xbpnVqijUnmQAAAAAQUIPAAAAAAC6uhinP72rh9xkXa7aYFH+' \
--data '{
    "trackingCompany": "UPS",
    "trackingNumber": "Z10100002632653",
    "trackingUrl": "http://www.ups.com/Tracking?tracknumbers=Z10100002632653",
    "items": [
        {
            "itemId": 225220780336
        }
    ]
}'

Once the payment processor informs Digital River whether the capture succeeded or failed, we create an event whose type is either order.charge.capture.complete or order.charge.capture.failed, respectively.

Both of them could be used to trigger a function that updates the status of the payment in your system. Additionally, you might use the failed event's captures[].fulfillmentId to look up the fulfillment and then send a request to your fulfiller that attempts to cancel shipment of those goods.

Failure response

If Digital River determines that the original payment authorization has expired and is unable to get the issuing bank to grant a new authorization, then your POST/ fulfillments request immediately returns an error with a code of payment_authorization_failed and this results in the creation of an event whose type is order.charge.reauth.failed and whose data.object is the order.

Both of these notifications indicate that we won't be able to capture the charge.

409 Conflict
{
    "errors": [
        {
            "code": "payment_authorization_failed",
            "description": "Fulfillment cannot be processed because the payment authorization has expired",
            "parameter": "orderId"
        }
    ]
}

The payment_authorization_failed error could trigger a request to your fulfiller that instructs them to cancel the order before the goods are shipped.

From the event, you could retrieve items[].productDetails, payment.sources[], and other data and use it to populate a payment failed notification (typically an email) that gets sent to the customer. If it's supported by your business model, you could also attempt to get a new payment method from the customer.

If you have a transaction that contains multiple pre-ordered items, but they're not all ready to ship at the same time, and you send a POST /fulfillments with a partial quantity of these items[] that throws a payment authorization failed exception, then any subsequent capture attempts are also likely to fail. As result, in this particular scenario, we recommend that you cancel all of that transaction's pre-ordered items.

Testing reauthorizations

Our payments mocker doesn't currently support testing reauthorizations in a non-production environment. However, once feature-specific test credit card numbers become available, we'll add them to the docs.

Last updated