LogoLogo
System Status
  • Commerce API
    • Test and use cases
    • Roles and permissions
    • Sending API calls
  • Shopper APIs
    • Shopper basics
      • Common use cases
        • Creating a customer
        • Applying store credit
        • Private store workflow
        • Guest checkout
    • OAuth
      • Authentication
      • OAuth 2.0 APIs
      • Token
      • Access tokens
      • Session-aware access tokens
      • Authorizing a shopper
    • Shoppers
      • Managing shoppers
        • User management
        • Single sign-on (SSO)
        • Data validation
        • Bulk user management
        • Bulk user account export
      • Managing a shopper's account
      • Managing a shopper's address
      • Managing payment options
    • Product discovery
      • Categories
      • Products
      • Product variations
      • Pricing
      • Inventory status
      • Financing
      • Offers
        • Understanding offers
        • How to use point of promotions (POPs)
          • Retrieving all point of promotion offers for a specific product
          • Retrieving all offers for a specific point of promotion
        • How to use offers
      • Private stores
        • Managing private stores
        • Submitting an order for a private store
        • Useful APIs
      • Fulfillment
        • Electronic Fulfillment Service (OFI)
        • Digital rights
        • Digital rights revocation
        • Physical fulfillment
          • EDI X12 832 definition data elements
          • EDI X12 846 definition data elements
          • EDI X12 850 definition data elements
          • EDI X12 855 definition data elements
          • EDI X12 856 definition data elements
          • EDI X12 180-1 definition data elements
          • EDI X12 180-2 definition of data elements
          • EDI X12 180-3 definition of data elements
    • Cart
      • Applying a shopper to a cart
      • Getting the current cart
      • Creating or updating a cart
        • Adding a product to a cart
          • Gifting
        • Capturing the customer's IP address
        • Providing address information
        • Managing the shipping or billing address
        • Providing subscription information
        • Managing payment methods
        • Capturing the Terms of Sale (TOS) acceptance
      • Managing offers in a cart
        • Applying an offer
        • Applying a coupon or promo code
        • Getting all applied offers
        • Removing an applied offer
        • Removing eligible offers
        • Reconciling conflicting offers
        • Dynamic offers/personalization
          • Skipping Global Commerce merchandising offer arbitration
          • Triggering a promotional URL offer
          • Overriding a promotional URL offer discount
      • Pricing
        • Landed cost
          • Mixed cart support
          • Tax-included pretty price
      • Redirecting to a Digital River-hosted cart
      • Configuring taxes
        • Managing tax identifiers
      • Managing shipping options
        • Getting shipping options
        • Providing a shipping discount
      • Managing line items
      • Applying a price override
      • Managing payment sessions
      • Managing web checkout
      • Submitting a cart
        • Initiating a charge
        • Authorization declines
      • Resuming cart submission
      • HGOP2
    • Orders
      • Getting orders
      • Selling entities
      • Retrieving addresses from an order
      • Retrieving line items from an order
      • Order lookup
      • Returns
        • Initiate an authenticated session
        • Setting up returns in Global Commerce
        • Managing returns
    • Subscriptions
      • Retrieve the subscription
        • Getting all orders for a subscription
        • Getting a subscription's pending actions
        • Getting all subscriptions for a shopper
        • Getting a subscription by identifier
      • Update subscription at the next renewal
        • Changing the subscription renewal type
        • Changing the subscription renewal quantity
        • Adding or updating a perpetual unit price
        • Changing the subscription's payment option
        • Changing the subscription's payment source
      • Immediately change the subscription
        • Updating the subscription's shipping address
        • Updating a subscription's billing and shipping email address
        • Cancelling a subscription
      • Immediately apply a midterm subscription change
        • Reducing the subscription renewal quantity
  • Admin APIs
    • Admin basics
      • Available Admin API calls
    • Order management
      • Getting the order's details
      • Downloading the invoice
    • Offer management
    • Refund management
      • Authorization
      • Refund reason codes
      • Creating a satisfaction refund
      • Getting the available refunds for a specific order
      • Getting refunds for a specific order
      • Getting refunds available for a shopper's order
      • Getting the JSON schema for an order refund
      • Managing a refund for a delayed payment method
      • Refund error scenarios
    • Subscription management
      • Retrieve the subscription
        • Getting all orders for a subscription
        • Getting a subscription's pending actions
        • Getting all subscriptions for a shopper
        • Getting a subscription by identifier
      • Update the subscription at the next renewal
        • Changing the subscription renewal type
        • Changing the subscription renewal product
        • Changing the subscription renewal price
        • Changing the subscription renewal quantity
        • Adding or updating a perpetual unit price
        • Changing the subscription's payment option
        • Changing the subscription's payment source
      • Immediately change the subscription
        • Activating a subscription
        • Changing the subscription's external reference identifier
        • Updating a subscription's billing and shipping email address
        • Cancelling a subscription
        • Updating the subscription's expiration date
      • Immediately apply a midterm subscription change
        • Applying a midterm change with price override
        • Reducing the subscription renewal quantity
      • Subscription notifications
        • Updating the subscriber's email address
        • Card Account Updater
        • Sending a payment information change notification
        • Sending an expired credit card notification
        • Sending an invalid payment account notification
        • Sending a payment failure notification
        • Sending a subscription renewal reminder notification
        • Setting up subscription renewal reminders
        • Setting up trial subscription renewal reminders
        • Setting up marketing reminders
      • Using the Expired Card Optimizer
    • Customer management
      • Retrieving customer details
      • Requesting PII removal for a customer
    • Site management
      • Configuring authorized shipping and billing countries
      • Getting a site's authorized billing countries
      • Getting a site's authorized shipping countries
    • Product management
      • Getting started
      • Manage products (asynchronous API)
        • Creating or updating a product
        • Adding or updating a product variation
        • Deploying a product
        • Applying live changes
        • Retiring a product
        • Deleting a product variation
        • Deleting a base or individual product's locale
      • Retrieve products (synchronous API)
        • Getting a product by locale
        • Getting a product variation
        • Getting a product variation by locale
      • Get the task status for a product (synchronous API)
        • Getting the latest information on a product task
        • Retrieving the tasks for a specific product
        • Retrieving the tasks for products
      • Bulk operation
        • Asynchronous bulk operations
          • Creating products in bulk
          • Updating products in bulk
          • Deploying products in bulk
          • Deleting product variations in bulk
        • Bulk product upload (BPU)
        • Bulk Product Export (BPE)
          • Line-item level satisfaction refund
          • Order-level satisfaction refund
          • Auto-created line-item level return product
          • Line-item level return product
    • File management
      • Downloading a file
  • Payments
    • Payments solutions
      • Drop-in payments
        • How Drop-in payments work
        • Drop-in payments integration guide
      • DigitalRiver.js with Elements
        • Elements integration guide
        • Configuring payment methods
          • Configuring Afterpay
          • Configuring Alipay+ (cross-border)
          • Configuring Alipay (domestic)
          • Configuring Amazon Pay
          • Configuring Apple Pay
          • Configuring Bancontact
          • Configuring BLIK
          • Configuring Boleto
          • Configuring CCAvenue
          • Configuring Clearpay
          • Configuring Credit Cards
          • Configuring FPX Online Banking
          • Configuring Google Pay
          • Configuring iDEAL
          • Configuring Klarna
          • Configuring Konbini
          • Configuring Online Banking (IBP)
          • Configuring Online Banking (Korea Bank Transfer)
          • Configuring PayCo
          • Configuring PayPal
          • Configuring SEPA Direct Debit
          • Configuring Trustly
          • Configuring Wire Transfer
          • Common payment sources
          • Common payment objects
    • Supported payment methods
      • Afterpay
      • Alipay (domestic)
      • Alipay+ (cross-border)
      • Amazon Pay
      • Apple Pay
      • Bancontact
      • BLIK
      • Boleto
      • CCAvenue
      • Clearpay
      • Credit Cards
      • FPX Online Banking
      • Google Pay
      • iDEAL
      • Klarna
      • Konbini
      • Korea Bank Transfer (Online Banking)
      • Online Banking (IBP)
      • PayCo
      • PayPal
      • PayPal Billing Agreement
      • PayPal Credit
      • PayPal Pay in 3
      • PayPal Pay in 4
      • PayPal RatenZahlung (Installment Payment)
      • SEPA Direct Debit
      • Trustly
      • Wire Transfer
    • Source basics
      • Managing sources
      • Handling credit card sources
      • Retrieving sources
    • Building payment workflows
      • Flows by payment type
      • Handling redirect payment methods
    • PSD2 and SCA
    • Payment testing scenarios
      • Testing standard payment methods
      • Testing redirect payment methods
      • Testing receiver payment methods
      • Testing the CCAvenue payment method
  • Events
    • Events overview
    • Responding to events
    • Event types
      • Delayed payment event types
        • Delayed payment expired event
          • Boleto
          • Konbini
          • Wire Transfer
        • Delayed payment reminder event
          • Boleto
          • Konbini
          • Wire Transfer
      • Subscription event types
        • Subscription created event
        • Subscription updated event
        • Subscription action processed event
        • Subscription cancelled event
        • Subscription credit card expired event
        • Subscription payment information changed event
        • Subscription renewal reminder event
        • Subscription renewed event
        • Subscription trial converted event
        • Subscription trial renewal reminder event
        • Subscription payment failed event
      • Post-order event types
        • Invoice created event
        • Refund credit memo event
      • Inventory event types
        • Inventory out of stock event
        • Inventory source and management
        • Inventory self-managed updated event
        • Inventory fulfiller-managed updated event
      • Post-order Notification Integration Guide
    • Webhooks
      • Commerce API safelist
      • Searching for a webhook
      • Creating a webhook
      • Using webhooks
      • Editing a webhook
      • Turning webhooks on or off
      • Revealing a webhook's secret
      • Rotating a webhook's secret
      • Viewing the webhook details
      • Deleting a webhook
  • Developer Resources
    • Postman collection
    • Commerce API references
    • Shopper APIs reference
    • Admin APIs reference
    • DigitalRiver.js reference
      • Including DigitalRiver.js
      • Initializing DigitalRiver.js
      • DigitalRiver object
      • Elements
        • Amazon Pay element
        • Apple Pay elements
        • Google Pay elements
        • IBAN element
        • iDEAL element
        • Konbini elements
        • Compliance element
        • Offline refund element
        • Online Banking elements
        • Tax Identifier element
        • Delayed payment instructions element
        • PayPal elements
      • Guidelines for capturing payment details
      • Security
      • Digital River payment objects
      • Error types, codes, and objects
  • General resources
    • Global Commerce
    • Global Commerce
      • Company hierarchy
      • Categories
        • Getting a list of categories
      • Products
        • Product scenarios
        • Individual products
          • Creating an individual product
        • Base product with variants
          • Creating a base product with variants
        • Bundle offers
          • Creating a prorated bundle offer with a subscription
        • Product combination
          • Creating a product combination
        • Gifting
        • Inventory status
      • Customer service
        • Log a shopper's request to remove PII
      • Customers
        • Creating a customer
        • Digital River-maintained customer login
        • Client-maintained customer login
      • Transparent Commerce purchase flow
    • eCompass
    • eCompass documentation
    • Release notes
      • 2024
      • 2024 latest
      • 2023
      • 2022
      • 2021
      • 2020
Powered by GitBook
On this page
  • Creating a DigitalRiver object
  • Creating an instance of Drop-in
  • createDropin(configuration)
  • Creating elements
  • createElement(element, config)
  • digitalriver.Compliance.getDetails(businessEntityCode [, locale]);
  • Creating a payment request
  • Creating sources
  • createSource(sourceData)
  • createSource(element, sourceData)
  • Specifying a source's future use
  • Retrieving sources
  • digitalriver.retrieveSource(sourceId, sourceClientSecret)
  • Authenticating sources
  • authenticateSource(data)
  • authenticateSource([cvvElement], data)
  • Updating sources
  • digitalriver.updateSource([element,] sourceData);
  • Retrieving available payment methods
  • digitalriver.retrieveAvailablePaymentMethods([filters])
  • Credit card logos
  • Retrieving available banks for Online Banking
  • digitalriver.retrieveOnlineBankingBanks(countryCode, currency)

Was this helpful?

  1. Developer Resources
  2. DigitalRiver.js reference

DigitalRiver object

Learn how to use the DigitalRiver object.

PreviousInitializing DigitalRiver.jsNextElements

Last updated 2 months ago

Was this helpful?

Creating a DigitalRiver object

For details, refer to the page.

let digitalRiver = new DigitalRiver("pk_test_fh9861t8b7384b7dke9e8dn4fb79808192", {
     "locale": "en-US"
});

Creating an instance of Drop-in

createDropin(configuration)

Use createDropin() to create an instance of . For details, refer to the .

Creating elements

createElement(element, config)

Use this method to create an instance of an that you can use to capture payment details. You can use the following elements in conjunction with to create a payment source.

Element Type
Description

amazonPay

applepay

cardCVV

A card security code field

cardExpiration

A credit card expiration field

cardNumber

A credit card number field

googlepay

iban

ideal

konbini

A Konbini select

onlineBanking

An online banking select

offlineRefund

An offline refund data collection element

paypal

A PayPal element

var options = {
    classes: {
        base: "DRElement",
        complete: "complete",
        empty: "empty",
        focus: "focus",
        invalid: "invalid",
        webkitAutofill: "autofill"
    },
    style: {
        base: {
            color: "#fff",
            fontFamily: "Arial, Helvetica, sans-serif",
            fontSize: "20px",
            fontSmoothing: "auto",
            fontStyle: "italic",
            fontVariant: "normal",
            letterSpacing: "3px"
        },
        empty: {
            color: "#fff"
        },
        complete: {
            color: "green"
        },
        invalid: {
            color: "red",
        }
    }
};
 
 
var cardNumber = digitalriver.createElement('cardnumber', options);
var cardExpiration = digitalriver.createElement('cardexpiration', options);
var cardCVV = digitalriver.createElement('cardcvv', options);
<div id="card-number" class="DRElement">
    <!-- The embedded Element iframe -->
    <iframe src="cardnumber.html"></iframe>
</div>
 
 
<div id="card-number" class="DRElement--complete">
    <!-- The embedded Element iframe -->
    <iframe src="cardnumber.html"></iframe>
</div>
 
<div id="card-number" class="DRElement--empty">
    <!-- The embedded Element iframe -->
    <iframe src="cardnumber.html"></iframe>
</div>
 
<div id="card-number" class="DRElement--focus">
    <!-- The embedded Element iframe -->
    <iframe src="cardnumber.html"></iframe>
</div>
 
 
<div id="card-number" class="DRElement--invalid">
    <!-- The embedded Element iframe -->
    <iframe src="cardnumber.html"></iframe>
</div>
 
 
<div id="card-number" class="DRElement--autofilled">
    <!-- The embedded Element iframe -->
    <iframe src="cardnumber.html"></iframe>
</div>

Options

Heading
State
Default Class

classes

base

DRElement

classes

complete

DRElement--complete

classes

empty

DRElement--empty

classes

focus

DRElement--focus

classes

invalid

DRElement--invalid

classes

autofilled

DRElement--autofilled

digitalriver.Compliance.getDetails(businessEntityCode [, locale]);

Use this method to retrieve localized strings that can be used to create the various disclosures required by Digital River.

Parameter
Required/Optional
Description
Accepted Values

businessEntityCode

Required

The business entity code of the entity facilitating the transaction.

DRES_INC-ENTITY, DR_WP-ENTITY, DR_WPAB-ENTITY, C5_INC-ENTITY, DR_BRAZIL-ENTITY, DR_BRAZIL2-ENTITY, DR_CHINA-ENTITY, DR_GMBH-ENTITY, DR_INC-ENTITY, DR_INDIA-ENTITY, DR_IRELAND-ENTITY, DR_JAPAN-ENTITY, DR_KOREA-ENTITY, DR_MEXICO-ENTITY, DR_RUSSIA-ENTITY, DR_TAIWAN-ENTITY, DR_SARL-ENTITY, DR_UK-ENTITY

locale

Optional

The language associated with the returned data. If you do not provide a locale and you provided a default locale when you started the DigitalRiver.js library, the strings will be localized to that default value. If you did not provide a default locale, the default language is English.

ar-EG, cs-CZ, da-DK, de-AT, de-CH, de-DE, el-GR, en-AU, en-BE, en-CA, en-CH, en-DK, en-FI, en-GB, en-IE, en-IN, en-MY, en-NL, en-NO, en-NZ, en-PR, en-SE, en-SG, en-US, en-ZA, es-AR, es-CL, es-CO, es-EC, es-ES, es-MX, es-PE, es-VE, et-EE, fi-FI, fr-BE, fr-CA, fr-CH, fr-FR, hu-HU, it-CH, it-IT, iw-IL, ja-JP, ko-KR, lt-LT, lv-LV, nl-BE, nl-NL, no-NO, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sl-SI, sr-YU, sv-SE, th-TH, tr-TR, zh-CN, zh-HK, zh-TW

This method returns an object with various compliance strings and links that can be used to create a legal footer with various resources.

{
    "disclosure": {
        "termsOfSale": {
            "localizedText": "Terms of Sale",
            "url": "https://store.digitalriver.com/store/defaults/en_IE/DisplayDRTermsAndConditionsPage/eCommerceProvider.Digital%20River%20Ireland%20Ltd."
        },
        "privacyPolicy": {
            "localizedText": "Privacy Policy",
            "url": "https://store.digitalriver.com/store/defaults/en_IE/DisplayDRPrivacyPolicyPage/eCommerceProvider.Digital%20River%20Ireland%20Ltd."
        },
        "cookiePolicy": {
            "localizedText": "Cookies",
            "url": "https://store.digitalriver.com/store/defaults/en_IE/DisplayDRCookiesPolicyPage/eCommerceProvider.Digital%20River%20Ireland%20Ltd."
        },
        "legalNotice": {
            "localizedText": "Legal Notice",
            "url": "https://store.digitalriver.com/store/defaults/en_IE/DisplayDRContactInformationPage/eCommerceProvider.Digital%20River%20Ireland%20Ltd."
        },
        "autorenewalPlanTerms": {
            "localizedText": "By checking the box below and completing your purchase, you expressly authorize and permit Digital River to automatically renew your purchased license or subscription for successive renewal terms each equal in length to the initial term specified above, at the purchase price for your initial term (plus taxes and fees, less any applicable discounts) using the payment information you provided for your initial purchase, until you cancel. At least one email will be sent to you to remind you of each upcoming renewal. We may change the renewal price as of the next renewal date if we provide you with prior notice of the change by email (you can elect to cancel automatic renewal as described below if you do not agree to the change). The Digital River <a href=\"https://store.digitalriver.com/store/defaults/en_IE/DisplayDRTermsAndConditionsPage/eCommerceProvider.Digital%20River%20Ireland%20Ltd.\" target=\"_blank\" class=\"dr_termsAndConditions\">Terms of Sale</a> and <a href=\"https://store.digitalriver.com/store/defaults/en_IE/DisplayDRPrivacyPolicyPage/eCommerceProvider.Digital%20River%20Ireland%20Ltd.\" target=\"_blank\" class=\"dr_privacyPolicy\">Privacy Policy</a> will apply to each renewal transaction. You may cancel your auto-renewal plan at any time by logging into the account interface (access information will be included in your order confirmation email or on the Customer Service Help page), selecting your product, and selecting the option to disable automatic renewal.<br/><br/>I agree that Digital River may store my payment information for future purchases including the processing of any subsequent subscription renewals which may occur following the date of this order."
        },
        "saveCardMandate": {
            "localizedText": "Yes, please save this account and payment information for future purchases."
        },
        "idealRecurringAgreement": {
            "localizedText": "By clicking the box, you authorize Digital River to collect your first payment via iDEAL and use your IBAN to collect the subsequent subscription payments by SEPA direct debit. You can review your SEPA Direct Debit information after order submission. <br/><br/>As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited. "
        },
        "businessEntity": {
            "name": "Digital River Ireland Ltd.",
            "id": "DR_IRELAND-entity"
        },
        "resellerDisclosure": {
            "localizedText": "<a href=\"https://store.digitalriver.com/store/defaults/en_IE/DisplayDRAboutDigitalRiverPage/eCommerceProvider.Digital%20River%20Ireland%20Ltd.\" target=\"_blank\" class=\"dr_resellerDisclosure\">Digital River Ireland Ltd.</a> is the authorised reseller and merchant of the products and services offered within this store.",
            "url": "https://store.digitalriver.com/store/defaults/en_IE/DisplayDRAboutDigitalRiverPage/eCommerceProvider.Digital%20River%20Ireland%20Ltd."
        },
        "confirmDisclosure": {
            "localizedText": "By submitting my order, I agree to the <a href=\"https://store.digitalriver.com/store/defaults/en_IE/DisplayDRTermsAndConditionsPage/eCommerceProvider.Digital%20River%20Ireland%20Ltd.\" target=\"_blank\" class=\"dr_termsAndConditions\">Terms of Sale</a> and the <a href=\"https://store.digitalriver.com/store/defaults/en_IE/DisplayDRPrivacyPolicyPage/eCommerceProvider.Digital%20River%20Ireland%20Ltd.\" target=\"_blank\" class=\"dr_privacyPolicy\">Privacy Policy</a> of Digital River Ireland Ltd."
        },
        "cancellationRights": {
            "localizedText": "Cancellation Right",
            "url": "https://store.digitalriver.com/store/defaults/en_IE/DisplayDRTermsAndConditionsPage/eCommerceProvider.Digital%20River%20Ireland%20Ltd.#cancellationRight"
        }
    }
Attribute
Description

businessEntity

Details about the business entity.

resellerDisclosure

Digital River reseller statement and links.

termsOfSale

Localized Terms of Sale and a link to the Digital River terms and conditions page.

privacyPolicy

Localized Privacy Policy and a link to the Digital River privacy policy page.

cookiePolicy

Localized Cookie Policy and a link to the Digital River cookie policy page.

cancellationRights

Localized Cancellation Rights and a link to the Digital River page explaining the shopper's cancellation rights.

legalNotice

Localized Legal Notice and a link to the Digital River page with our legal notice details.

confirmDisclosure

A localized string with our confirmation disclosure statement. This should be placed next to your confirm order button.

autorenewalPlanTerms

Localized Autorenewal Plan Terms and a link to the Digital River page with our Terms of Sale.

saveCardMandate

The save payment agreement for future purchases

californiaPrivacyRights

California Privacy Rights identifier in English and a link to the Digital River page explaining the shopper's rights in California. This is only applicable to the en-US locale.

warrantyInformation

Warranty Information in Italian and a link to the Digital River page explaining warranty information to residents of Italy. This is only applicable to the it-IT locale.

Creating a payment request

Creating sources

For both versions, the createSource() method returns a promise that contains a Result object. The Result object, in turn, contains one of two possible objects:‌

  • source — A Source object created by Digital River.

createSource(sourceData)

In the following example, the method takes a single argument. The sourceData contains the data that you want Digital River to tokenize.

var sourceData = {
        "type": "creditCard",
        "owner": {
            "firstName": "firstName",
            "lastName": "lastName",
            "email": "email@email.org",
            "address": {
                "line1": "1234 First St.",
                "city": "Minnetonka",
                "state": "MN",
                "country": "US",
                "postalCode": 55410
            }
        },
        "creditCard": {
            "number": "4444333322221111",
            "expirationMonth": 12,
            "expirationYear": 2025,
            "cvv": "123"
        }
    }
 
 
digitalriver.createSource(sourceData).then(function(result) {
    if(result.error) {
        //handle error message
        var errorMessage = result.error.errors[0].message;
    } else {
 
        //send source to back end for processing
        var source = result.source;
    }
});

A successful response returns a source with a unique id.

{
    "error": undefined,
    "source": {
        "id": "775d3ff1-99a3-4640-bd2c-24e4b6b13324",
        "type": "creditCard",
        "owner": {
            "firstName": "John",
            "lastName": "Doe",
            "email": "john.doe@yahoo.com",
            "referenceId": "",
            "address": {
                "line1": "10380 Bren Road W.",
                "line2": "Suite 929",
                "city": "Minnetonka",
                "state": "MN",
                "country": "US",
                "postalCode": "55343"
            }
        },
        "status": "chargeable",
        "creationIp": "67.256.231.1",
        "creationDate": "2018-08-22T19:21:59.26Z",
        "flow": "standard",
        "creditCard": {
            "brand": "Visa",
            "expirationMonth": 10,
            "expirationYear": 2019,
            "lastFourDigits": "1111"
        }
    }
}

An unsuccessful response returns an error with information on what needs to be corrected.

{
    "error": {
        "type": "bad_request",
        "errors": [{
           "code": "invalid_parameter",
           "parameter": "owner.firstName",
           "message": "'' is not a valid owner.firstname."
        },
        {
           "code": "currency_unsupported",
           "parameter": "currency",
           "message": "currency 'xyz' is not supported."
        }]
    },
    source: undefined
}

createSource(element, sourceData)

Use the createSource(element, sourceData) method to create a tokenized source to safely transmit to the backend for use in downstream API calls. This method requests two parameters:‌

This method uses source data and an element argument in the following example.

var sourceData = {
        "type": "creditCard",
        "owner": {
            "firstName": "firstName",
            "lastName": "lastName",
            "email": "email@email.org",
            "address": {
                "line1": "1234 First St.",
                "city": "Minnetonka",
                "state": "MN",
                "country": "US",
                "postalCode": 55410
            }
        }
    }
 
 
digitalriver.createSource(cardNumber, sourceData).then(function(result) {
    if(result.error) {
        //handle error messages
        var errorMessage = result.error.errors[0].message;
    } else {
        //send source to back end for processing
        var source = result.source;
    }
});

A successful response returns a source with a unique id.

{
    "error": undefined,
    "source": {
        "id": "775d3ff1-99a3-4640-bd2c-24e4b6b13324",
        "clientId": "gc",
        "channelId": "drdod15",
        "type": "creditCard",
        "owner": {
            "firstName": "Gwen",
            "lastName": "Sawayn",
            "email": "Felicita81@yahoo.com",
            "referenceId": "",
            "address": {
                "line1": "04644 Altenwerth Drives",
                "line2": "Suite 929",
                "city": "North Aurelia",
                "state": "NV",
                "country": "US",
                "postalCode": "93414-6991"
            }
        },
        "amount": "100.00",
        "currency": "USD",
        "status": "chargeable",
        "creationIp": "67.216.237.4",
        "creationDate": "2018-08-22T19:21:59.26Z",
        "flow": "standard",
        "creditCard": {
            "brand": "Visa",
            "expirationMonth": 10,
            "expirationYear": 2019,
            "lastFourDigits": "1111"
        }
    }
}

An unsuccessful response returns an error with information on what needs to be corrected.

{
    "error": {
        "type": "validation_error",
        "errors": [{
            "code": "incomplete_card_number",
            "message": "Your card number is incomplete."
        }]
    },
    source: undefined
}

Specifying a source's future use

Subscription

Set usage to subscription when you create sources that are used primarily for recurring transactions, made at regular intervals for a product or a service.

Convenience

Unscheduled

Set usage to unscheduled when you create sources for unscheduled merchant-initiated transactions. These are contracts that occur on a non-fixed schedule using stored card information. Automatic top-ups are an example of one such transaction. They occur whenever a customer's balance drops below a pre-defined amount.

Retrieving sources

digitalriver.retrieveSource(sourceId, sourceClientSecret)

Use this method to retrieve a source with the front-end DigitalRiver.js library. This method takes two parameters:‌

  • sourceId—The unique ID of the source you want to retrieve.

  • sourceClientSecret—The clientSecret value of the source you are trying to retrieve. This is specific to the source.

The digitalriver.createSource() returns a Promise that includes a Result object. (See the following source response example.) The Result object will have either:‌

  • result.source—If this object is not null, it will contain the Source object you requested.

  • result.error— If this object is not null, it will contain an Error object with details on the specific error.

digitalriver.retrieveSource("ee90c07c-5549-4a6b-aa5f-aabe29b1e97a","ee90c07c-5549-4a6b-aa5f-aabe29b1e97a_51afe818-0e7f-46d7-8257-b209b20f4d8").then(function(result) {
    if(result.error) {
        //handle error messages
        var errorMessage = result.error.errors[0].message;
    } else {
        //do something with the source
        var source = result.source;
    }
});
{
    "error": undefined,
    "source": {
        "id": "775d3ff1-99a3-4640-bd2c-24e4b6b13324",
        "clientId": "gc",
        "channelId": "drdod15",
        "type": "creditCard",
        "usage": "single",
        "owner": {
            "firstName": "Gwen",
            "lastName": "Sawayn",
            "email": "Felicita81@yahoo.com",
            "referenceId": "",
            "address": {
                "line1": "04644 Altenwerth Drives",
                "line2": "Suite 929",
                "city": "North Aurelia",
                "state": "NV",
                "country": "US",
                "postalCode": "93414-6991"
            }
        },
        "amount": "100.00",
        "currency": "USD",
        "status": "chargeable",
        "creationIp": "67.216.237.4",
        "creationDate": "2018-08-22T19:21:59.26Z",
        "flow": "standard",
        "creditCard": {
            "brand": "Visa",
            "expirationMonth": 10,
            "expirationYear": 2019,
            "lastFourDigits": "1111"
        }
    }
}

Authenticating sources

Parameter
Required/Optional
Description

sessionId

Required

sourceId

Required

The identifier of the payment source used in this transaction.

sourceClientSecret

Required

The source client secret for this transaction.

returnUrl

Required

The return URL where the customer is directed when 3D Secure 1 is required. If the value is not provided, we use the current page location.

After you call either version of this method, Digital River automatically handles the SCA requirements. Once the customer completes the necessary authentication or we determine that authentication isn't required, the method resolves and the checkout flow can continue.

More specifically, the method returns a promise which is resolved by a source authentication result object. The following are the possible results and the recommended actions:

Status
Description

complete

The customer successfully completed the steps necessary to authenticate the source. You can now submit the order.

authentication_not_required

Digital River determined that the payment source didn't require authentication for this particular payment session. You can now submit the order.

failed

Source authentication failed. The source can still be used in the transaction but may be declined. You should attempt to authenticate the source again.

authenticateSource(data)

digitalriver.authenticateSource({
    "sessionId": "65b1e2c2-632c-4240-8897-195ca22ce108",
    "sourceId": "ee90c07c-5549-4a6b-aa5f-aabe29b1e97a",
    "sourceClientSecret": "ee90c07c-5549-4a6b-aa5f-aabe29b1e97a_51afe818-0e7f-46d7-8257-b209b20f4d8",
    "returnUrl": "https://returnurl.com"
});

The following is an example response when a source is successfully authenticated:

{
    "status": "complete"
}

authenticateSource([cvvElement], data)

digitalriver.authenticateSource(cvvElement, {
    "sessionId": "65b1e2c2-632c-4240-8897-195ca22ce108",
    "sourceId": "ee90c07c-5549-4a6b-aa5f-aabe29b1e97a",
    "sourceClientSecret": "ee90c07c-5549-4a6b-aa5f-aabe29b1e97a_51afe818-0e7f-46d7-8257-b209b20f4d8",
    "returnUrl": "https://returnurl.com"
});

The following is an example response when a source is successfully authenticated:

{
    "status": "complete"
}

Updating sources

digitalriver.updateSource([element,] sourceData);

Use this method to update details on a source.

This method takes two parameters:‌

  • element—An optional card expiration element for using the Elements portion of this library.

  • sourceData—A required data object containing additional data required to update the payment source.

Field
Required
Type
Description

clientSecret

Required

String

The Client Secret of the source you are updating.

id

Required

String

The ID of the source you are updating.

owner

Optional

An Owner Object

An object containing the Owner details. Note: You can only update the owner information for Credit Cards.

digitalriver.updateSource() returns a Promise that returns a result object. The result object will have either:‌

  • result.source—A source object that was updated in the Payments Service

  • result.error—An error occurred that must be corrected to update the source.

Updating expiration and address information

//Create the element using DigitalRiver.js and place it on the page.
var options = {
    style: {
        base: {
            color: "#fff",
            fontFamily: "Arial, Helvetica, sans-serif",
            fontSize: "20px",
            fontSmoothing: "auto",
            fontStyle: "italic",
            fontVariant: "normal",
            letterSpacing: "3px"
        }
  ...
}
var cardExpiration = digitalriver.createElement('cardexpiration', options);
cardExpiration.mount('card-expiration');
 
 
var sourceData = {
        "id": "14381d1c-8bff-4350-aeea-82b36f3a196c",
        "clientSecret": "14381d1c-8bff-4350-aeea-82b36f3a196c_14381d1c-8bff-4350-aeea-82b36f3a196c",
        "owner": {
            "firstName": "firstName",
            "lastName": "lastName",
            "email": "email@email.org",
            "address": {
                "line1": "1234 First St.",
                "city": "Minnetonka",
                "state": "MN",
                "country": "US",
                "postalCode": 55410
            }
        }
    }
 
 
digitalriver.updateSource(cardExpiration, sourceData).then(function(result) {
    if(result.error) {
        //handle error messages
        var errorMessage = result.error.errors[0].message;
    } else {
        //the source has been updated with new details
        var source = result.source;
    }
});
{
    "error": undefined,
    "source": {
        "id": "775d3ff1-99a3-4640-bd2c-24e4b6b13324",
        "clientId": "gc",
        "channelId": "drdod15",
        "type": "creditCard",
        "usage": "single",
        "owner": {
            "firstName": "firstName",
            "lastName": "lastName",
            "email": "email@email.org",
            "address": {
                "line1": "1234 First St.",
                "city": "Minnetonka",
                "state": "MN",
                "country": "US",
                "postalCode": 55410
            }
        },
        "status": "chargeable",
        "creationIp": "67.216.237.4",
        "creationDate": "2018-08-22T19:21:59.26Z",
        "flow": "standard",
        "creditCard": {
            "brand": "Visa",
            "expirationMonth": 10,
            "expirationYear": 2019,
            "lastFourDigits": "1111"
        }
    }
}

Updating only address information

var sourceData = {
        "id": "14381d1c-8bff-4350-aeea-82b36f3a196c",
        "clientSecret": "14381d1c-8bff-4350-aeea-82b36f3a196c_14381d1c-8bff-4350-aeea-82b36f3a196c",
        "owner": {
            "firstName": "firstName",
            "lastName": "lastName",
            "email": "email@email.org",
            "address": {
                "line1": "1234 First St.",
                "city": "Minnetonka",
                "state": "MN",
                "country": "US",
                "postalCode": 55410
            }
        }
    }
 
 
digitalriver.updateSource(sourceData).then(function(result) {
    if(result.error) {
        //handle error messages
        var errorMessage = result.error.errors[0].message;
    } else {
        //the source has been updated with new details
        var source = result.source;
    }
});
{
    "error": undefined,
    "source": {
        "id": "775d3ff1-99a3-4640-bd2c-24e4b6b13324",
        "clientId": "gc",
        "channelId": "drdod15",
        "type": "creditCard",
        "usage": "single",
        "owner": {
            "firstName": "firstName",
            "lastName": "lastName",
            "email": "email@email.org",
            "address": {
                "line1": "1234 First St.",
                "city": "Minnetonka",
                "state": "MN",
                "country": "US",
                "postalCode": 55410
            }
        },
        "status": "chargeable",
        "creationIp": "67.216.237.4",
        "creationDate": "2018-08-22T19:21:59.26Z",
        "flow": "standard",
        "creditCard": {
            "brand": "Visa",
            "expirationMonth": 10,
            "expirationYear": 2019,
            "lastFourDigits": "1111"
        }
    }
}

Updating only card expiration information

//Create the element using DigitalRiver.js and place it on the page.
var options = {
    style: {
        base: {
            color: "#fff",
            fontFamily: "Arial, Helvetica, sans-serif",
            fontSize: "20px",
            fontSmoothing: "auto",
            fontStyle: "italic",
            fontVariant: "normal",
            letterSpacing: "3px"
        }
 
  ...
}
var cardExpiration = digitalriver.createElement('cardexpiration', options);
 
cardExpiration.mount('card-expiration');
 
 
var sourceData = {
        "id": "14381d1c-8bff-4350-aeea-82b36f3a196c",
        "clientSecret": "14381d1c-8bff-4350-aeea-82b36f3a196c_14381d1c-8bff-4350-aeea-82b36f3a196c"
    }
 
 
digitalriver.updateSource(cardExpiration, sourceData).then(function(result) {
    if(result.error) {
        //handle error messages
        var errorMessage = result.error.errors[0].message;
    } else {
        //the source has been updated with new details
        var source = result.source;
    }
});
{
    "error": undefined,
    "source": {
        "id": "775d3ff1-99a3-4640-bd2c-24e4b6b13324",
        "clientId": "gc",
        "channelId": "drdod15",
        "type": "creditCard",
        "usage": "single",
        "owner": {
            "firstName": "firstName",
            "lastName": "lastName",
            "email": "email@email.org",
            "address": {
                "line1": "1234 First St.",
                "city": "Minnetonka",
                "state": "MN",
                "country": "US",
                "postalCode": 55410
            }
        },
        "status": "chargeable",
        "creationIp": "67.216.237.4",
        "creationDate": "2018-08-22T19:21:59.26Z",
        "flow": "standard",
        "creditCard": {
            "brand": "Visa",
            "expirationMonth": 10,
            "expirationYear": 2019,
            "lastFourDigits": "1111"
        }
    }
}

Update error‌

If there is a problem with the update request, an error object will be returned in the response.

{
    "error": {
        "type": "validation_error",
        "errors": [{
            "code": "incomplete_card_number",
            "message": "Your card number is incomplete."
        }]
    },

Retrieving available payment methods

digitalriver.retrieveAvailablePaymentMethods([filters])

Use this method to retrieve an array of available payment methods. You can use this to filter and determine applicable payment methods while building your checkout flows. The filters object is optional.

Attribute
Required/Optional
Description

currency

Optional

The currency of the transaction.

country

Optional

The country of the billing addresses associated with this transaction.

supportsStorage

Optional

Whether the payment supports storage.

supportsRecurring

Optional

Whether the payment method supports recurring payments.

supportsFreeTrial

Optional

Whether the payment method supports free trials.

sessionId

Optional

The Payment Session ID. If used, the response will return the payment methods which apply to your transaction.

Retrieve available payment methods response without using session ID

The following example shows a request with no filters applied.

digitalriver.retrieveAvailablePaymentMethods().then(function(result) {
    //do something with the result. This could include showing or hiding specific payment methods that apply to the display.
});

The following response includes all payment methods that you configured for your account.

{
    "paymentMethods": [
        {
            "type": "alipay",
            "flow": "redirect",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/alipay.png"
            }
        },
        {
            "type": "applePay",
            "flow": "standard",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/applepay.png"
            }
        },
        {
            "type": "bankTransfer",
            "flow": "redirect",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/bankTransfer.png"
            }
        },
        {
            "type": "carrierFinancing",
            "flow": "standard",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {}
        },
        {
            "type": "codJapan",
            "flow": "standard",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/codJapan.png"
            }
        },
        {
            "type": "creditCard",
            "flow": "standard",
            "supportsRecurring": true,
            "supportsFreeTrial": true,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/creditcard.png"
            }
        },
        {
            "type": "creditInstallment",
            "flow": "redirect",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {},
            "terms": [
                {
                    "id": "8281",
                    "name": "4x installment for Cetelem",
                    "code": "4_months",
                    "underMinimumAmount": 0,
                    "overMaximumAmount": 0,
                    "durationMonths": 4,
                    "monthlyPaymentAmount": 25.21,
                    "monthlyPaymentWithFeesAmount": 30.21,
                    "orderTotal": 100,
                    "totalRepayable": 120.84,
                    "creditChargeAmount": 20.84,
                    "originationFeeAmount": 5,
                    "administrationFeeAmount": 0,
                    "nominalApr": 4,
                    "effectiveApr": 151.1
                }
            ]
        },
        {
            "type": "directDebit",
            "flow": "redirect",
            "supportsRecurring": true,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/directDebit.png"
            }
        },
        {
            "type": "directDebitGb",
            "flow": "redirect",
            "supportsRecurring": true,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/directDebitGb.png"
            }
        },
        {
            "type": "googlePay",
            "flow": "standard",
            "supportsRecurring": true,
            "supportsFreeTrial": true,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/googlepay.png"
            }
        },
        {
            "type": "klarnaCredit",
            "flow": "redirect",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/klarna.png"
            }
        },
        {
            "type": "klarnaCreditRecurring",
            "flow": "redirect",
            "supportsRecurring": true,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/klarnaRecurring.png"
            }
        },
        {
            "type": "konbini",
            "flow": "receiver",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/konbini.png"
            }
        },
        {
            "type": "onlineBanking",
            "flow": "redirect",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/onlineBanking.png"
            }
        },
        {
            "type": "payco",
            "flow": "redirect",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/payco.png"
            }
        },
        {
            "type": "payPal",
            "flow": "redirect",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/paypal.png"
            }
        },
        {
            "type": "payPalBilling",
            "flow": "redirect",
            "supportsRecurring": true,
            "supportsFreeTrial": true,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/paypalBilling.png"
            }
        },
        {
            "type": "wireTransfer",
            "flow": "receiver",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/wireTransfer.png"
            }
        }
    ]
}

Retrieve available payment methods response using filters

The following example shows a request using filters.

digitalriver.retrieveAvailablePaymentMethods({
    "currency": "USD",
    "country": "US",
    "supportsRecurring": true
}).then(function(result) {
    //do something with the result. This could include showing or hiding specific payment methods that apply to the display.
});

The following response only returns payment methods available in the US, using the USD currency, and supporting recurring payments.

{
    "paymentMethods": [
        {
            "type": "creditCard",
            "flow": "standard",
            "supportsRecurring": true,
            "supportsFreeTrial": true,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/creditcard.png"
            }
        },
        {
            "type": "googlePay",
            "flow": "standard",
            "supportsRecurring": true,
            "supportsFreeTrial": true,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/googlepay.png"
            }
        },
        {
            "type": "klarnaCreditRecurring",
            "flow": "redirect",
            "supportsRecurring": true,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/klarnaRecurring.png"
            }
        },
        {
            "type": "payPalBilling",
            "flow": "redirect",
            "supportsRecurring": true,
            "supportsFreeTrial": true,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/paypalBilling.png"
            }
        }
    ]
}

Retrieve available payment methods response with a Session ID

If you specify a Payment Session ID, you will only receive the payment methods which apply to your transaction.

digitalriver.retrieveAvailablePaymentMethods({
    "sessionId": "d3941a36-6821-4d93-be23-6190226ae5f7"
}).then(function(result) {
    //do something with the result. This could include showing or hiding specific payment methods that apply to the display.
});
{
    "sessionInformation": {
        "currency": "EUR",
        "country": "FR",
        "amount": "450.00"
    },
    "paymentMethods": [
        {
            "type": "applePay",
            "flow": "standard",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/applepay.png"
            }
        },
        {
            "type": "creditCard",
            "flow": "standard",
            "supportsRecurring": true,
            "supportsFreeTrial": true,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/creditcard.png"
            }
        },
        {
            "type": "directDebit",
            "flow": "redirect",
            "supportsRecurring": true,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/directDebit.png"
            }
        },
        {
            "type": "googlePay",
            "flow": "standard",
            "supportsRecurring": true,
            "supportsFreeTrial": true,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/googlepay.png"
            }
        },
        {
            "type": "wireTransfer",
            "flow": "receiver",
            "supportsRecurring": false,
            "supportsFreeTrial": false,
            "images": {
                "iconImage": "https://ui1.img.digitalrivercontent.net/Storefront/images/paymentMethodLogos/wireTransfer.png"
            }
        }
    ]
}

Credit card logos

If you want to display the credit card payment logo on your website, you can use the following URLs to add the appropriate brand logo image to your website:

Best Practices: To ensure you always use the latest logo, link to the URL instead of downloading the image to your website.

Retrieving available banks for Online Banking

digitalriver.retrieveOnlineBankingBanks(countryCode, currency)

This method returns an array that will either be empty if no banks are available or contain objects with Issuer IDs and Bank Names. DigitalRiver.js uses this data when creating an Online Banking source. This method is useful if you want to build a bank selector instead of using the Online Banking element.

digitalriver.retrieveOnlineBankingBanks("DE","EUR").then(function(result) {
    //do something with the banks; this could include building a selector or something else
});
[{
    "bankCode": "86",
    "bankName": "Sofortüberweisung"
}, {
    "bankCode": "21",
    "bankName": "Giropay"
}]

Refer to the in the article for details.

When creating sources, you can select a method that accepts an element or use a . Both methods, however, require that you provide source data to tokenize. When configuring this data, you can .

error — An that indicates a problem with the tokenization request. It provides the data you must correct before creating a source again.

Use the createSource(sourceData) method to create a payment source that contains information you can safely use with other Commerce APIs. This includes immediate sources (if PCI compliant), redirect sources, or delayed sources. See for more information on the structure of these requests.‌

element — A Element object created using the portion of this library.

sourceData — The source data that you want Digital River to tokenize. See for more information on the required source data.

When creating a source using DigitalRiver.js, you should identify the types of transactions it will likely be used for in the future. This increases the probability that these future transactions will be approved. The usage value you select should be the one that most closely corresponds to your business model. The available options are , , and .

The convenience setting applies mainly to saved payment sources that are used for one-off transactions. These are sources where customers are typically present during the checkout flow and want to quickly access their payment information. Select this option if you don't offer or don't have merchant-initiated transactions

The authenticate source method determines whether the saved payment source selected by a customer during the checkout process requires (SCA).

You can use this method when that allow customers to retrieve saved payment information during and .

The accepts a configuration object that contains the data we need to authenticate the source. With the exception of the returnUrl, you can set the parameters of this object by and then getting the required data.

The identifier of this transaction.

Do not log, embed in URLs, or expose the sourceClientSecret to anyone other than the customer. On any page that includes the secret, ensure that is enabled.

The accepts this same data plus an optional CVV type.

This method can before it is applied to a transaction.

In this alternative version of the method to , you can provide an optional CVV type (assuming it is correctly and ). By setting this parameter, the value contained in the field of the CVV Element is included in the authentication request.

When updating a source, you can only update the owner and the expiration details for . If you need to update a non-Credit Card (creditCard) payment type, use .

Visa URL:

Mastercard URL:

American Express URL:

Discover URL:

JCB URL:

Maestro URL:

UnionPay URL:

Use this method to retrieve an array of available banks for a combination of country code and currency code.‌

Configuring payment methods
Elements
Common payment sources
Strong Customer Authentication
TLS
ISO 3166-1 alpha-2
ISO 4217
method that doesn't require an element
specify a future source use
subscription
convenience
unscheduled
subscriptions
unscheduled
standard version of the method
retrieving the source
Element
other version of the authenticate source method
authenticate a payment source
Credit Cards
createSource
Amazon Pay element
Apple Pay element
Google Pay element
IBAN element
iDEAL element
payment session
Digital River publishable API key
Drop-in Payments
Drop-in Payments integration guide
element
createSource()
Digital River payment objects
building workflows
Element
authenticate sources
created
https://ui1.img.digitalrivercontent.net/Storefront/images/creditCardLogos/visa.png
https://ui1.img.digitalrivercontent.net/Storefront/images/creditCardLogos/mastercard.png
https://ui1.img.digitalrivercontent.net/Storefront/images/creditCardLogos/amex.png
https://ui1.img.digitalrivercontent.net/Storefront/images/creditCardLogos/discover.png
https://ui1.img.digitalrivercontent.net/Storefront/images/creditCardLogos/jcb.png
https://ui1.img.digitalrivercontent.net/Storefront/images/creditCardLogos/maestro.png
https://ui1.img.digitalrivercontent.net/Storefront/images/creditCardLogos/unionpay.png
error object
mounted
one-off purchases
subscription acquisitions
Payment request object
configuration