Payment reauthorizations

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

Selling pre-ordered goods or managing other delayed fulfillment types carries a higher risk of chargebacks. This is due to the often lengthy period of time between payment authorization and order fulfillment.

If you'd like to minimize your chargeback risks, your account can be set up so that Digital River never initiates the capture and settlement process without valid authorization. However, selecting this option has potential downsides. For details, refer to Managing chargeback risks.

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

Managing chargeback risks

An order whose state moves to accepted indicates that the issuing bank has approved the transaction to proceed. However, 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[], 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, Digital River attempts to capture and settle using the original authorization, even when it has expired, and we cannot create a new one to replace it.

This is the default setting for all accounts.

This option optimizes your revenue opportunities. However, it carries a slightly higher risk of late presentment chargebacks, typically occurring in a small number of orders.

Risk averse

If your account is configured to be risk averse, then Digital River only attempts to capture a charge when either (1) the original payment authorization has yet to expire or (2) we can 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 risk losing out on potential revenue. This is because the issuing bank ultimately approves many expired authorization capture attempts.

Pre-orders

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

This section provides 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 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.

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.

These notifications indicate that Digital River is trying 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 could be used to trigger a function that updates the payment status 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 the 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 set up to handle both success and failure responses.

Success response

If Digital River determines that the original payment authorization has yet to expire or (if 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 trying 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.

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 could be used to trigger a function that updates the payment status 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 the shipment of those goods.

Failure response

If Digital River determines that the original payment authorization has expired and we're 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.

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) sent to the customer. If your business model supports it, you could also attempt to get a new payment method from the customer.

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