If you're sending productDetails in create checkout requests, your integration must reference the product's associated SKU group. You do this by specifying a skuGroupId in the productDetails object.
When building a checkout, provide the IP address of the customer's browser used to place the order.
Ensure the specified upstream identifier matches your order identifier
For tracking purposes, specify an upstream identifier during the checkout process that matches the identifier of the corresponding order in your commerce platform.
Each time you create or update a checkout, use the response from the Checkouts API to update price, fee, and tax information in the upstream commerce platform. These updates should be performed for the entire transaction and each line item. This ensures that the values in your system stay in sync with those in our system.
Additionally, you should display these response values in your interface so customers can review tax and product totals during the checkout process.
Set charge type to customer-initiated in subscription acquisitions
Since the customer actively participates in a subscription acquisition, you should set chargeType to customer_initiated.
Set charge type to merchant initiated in subscription auto-renewals
During a subscription's autorenewal, the customer is not an active participant. As a result, when building a checkout to process an autorenewal, you should set chargeType to merchant_initiated.
Send subscription information
Any transaction that includes a recurring product or service must provide information that describes that subscription. So, when building a checkout, provide these details in the subscriptionInfo hash table.
During the acquisition process, you can optionally generate a unique subscription identifier and assign it to subscriptionId.
Specify a subscription's renewal method
For every recurring product or service, you must use the autoRenewal parameter to tell us whether the subscription is automatically or manually renewed.
Send the billing agreement identifier in renewals
During the renewal process, send the billingAgreementId generated during the subscription's acquisition.
Provide a start and end time for Klarna-funded subscriptions
Use Drop-in to display available payment methods and create a source
Drop-in payments are our all-in-one solution for handling payments and ensuring compliance. We recommend you use this solution as a quick and easy way to start accepting payments.
Respond to on success event and display the order review page
Whenever Drop-in payments successfully create a payment source, we send you the onSuccess event. Once you receive this event, redirect the customer to the order review page. The customer can review the order's details before deciding whether to purchase.
Display reusable payment sources
When a customer purchases an auto-renewing subscription, the payment methods that Drop-in payments display must support recurring transactions. To ensure that Drop-in only displays reusable payment methods, set autoRenewal to true in a POST/checkouts or POST/checkouts/{id} request. You then use Drop-in's configurable options to set showTermsOfSaleDisclosure to true.
Acquire customer's acceptance of subscription and payment storage terms
When acquiring an auto-renewing subscription, customers must agree to save the transaction's payment source to their account so that it can be applied to renewals. So, you must configure Drop-in payments to display the combined subscription save payment agreement terms and then acquire the customer's active acceptance.
You do this by first setting autoRenewal to true in a POST/checkouts or POST/checkouts/{id} request. You then use Drop-in's configurable options to set showTermsOfSaleDisclosure to true.
Save ready for storage source to customer's account
When the onSuccess event returns a source that is readyForStorage, you should save the source to the customer's account. This operation flips its reusable value to true. As a result, the source can be used in merchant-initiated subscription auto-renewals.
Create an order with the checkout identifier
After you display the review order page to the customer and the customer actively accepts Digital River's disclosure terms and then submits the order on the storefront, you should convert the checkout to an order.
Digital River creates an order based on the data in a Checkout. Providing checkoutId in the payload of POST/orders acts primarily as a call to authorize payment and trigger a fraud review.
Notify the customer of the order status
When a customer uses a synchronous payment method such as a credit card to pay for a transaction, the POST /orders request almost always immediately returns an accepted or failed order. When the order succeeds, direct the customer to the "Thank you" page. If the order fails, use the error's message to inform the customer of the issue through the user interface.
Capture the order's identifier
When the POST /orders response returns a 201 Created status code, retrieve the order's id from the payload and use that value to set the corresponding attribute in the upstream commerce platform's order.
Align order states
Use the POST /orders response to set the status of the upstream commerce platform's order.
When the POST /orders response returns a 201 Created status code, retrieve charges[].state from the payload and use that value to set the corresponding attribute in the upstream commerce platform's order.
When the POST /orders response returns a 201 Created status code, retrieve fraudState from the payload and use that value to set the corresponding attribute in the upstream commerce platform's order.
We send the order.accepted event when Digital River successfully authorizes payment and completes its fraud review. This event indicates that the order is ready to be fulfilled. Upon receipt, retrieve state, fraudState, and charges[].state from the payload and use these values to update the corresponding attributes in the upstream commerce platform's order.
Listen for and handle order failed events
An asynchronous payment authorization failure triggers an order.charge.failed event. When Digital River asynchronously detects an anomaly during its fraud review or the customer is determined to be on the Denied Persons List, we send an order.blocked event.
Upon receipt of either event, retrieve state, fraudState, and charges[].state from the payload and use these values to update the corresponding attributes in the upstream commerce platform's order.
Persist the billing agreement identifier
For each subscription product or service you create, store the billingAgreementId that Digital River generates so that it can be sent in the renewal request.