Configuring Wire Transfer

Learn how to configure Wire Transfer for DigitialRiver.js with Elements.

If you're using DigitalRiver.js with Elements, you can create a Wire Transfer payment method for your app or website in four easy steps:

Step 1: Build a Wire Transfer source request object

A Wire Transfer source request object requires the following fields.

Field
Value

type

wireTransfer

sessionId

The payment session identifier.

owner

wireTransfer

A Wire Transfer object. (This is currently empty)

Step 2: Create a Wire Transfer source using DigitalRiver.js

Use the DigitalRiver.js library to create and mount elements to the HTML container.

The address object must contain postal code and state/province data that adheres to a standardized format.

var data = {
    "type": "wireTransfer",
    "sessionId": "ea03bf6f-84ef-4993-b1e7-b7d5ecf71d1f",
    "owner": {
        "firstName": "John",
        "lastName": "Doe",
        "email": "[email protected]",
        "phoneNumber": "1555000000",
        "address": {
            "line1": "123 Main Street",
            "line2": "",
            "city": "Minnetonka",
            "state": "MN",
            "postalCode": "55343",
            "country": "US"
        }
    },
    "wireTransfer": {
    }
}

digitalriver.createSource(data).then(function(result) {
    if (result.error) {
        //handle errors
    } else {
        var source = result.source;
        //send source to back end
        sendToBackend(source);
    }
});

Wire Transfer source response example

Step 3: Use the authorized source

Once authorized, you can use the source by attaching it to a checkout.

Step 4: Direct your customer to go to their banking institution

Once the customer submits the order, the source remains in the pending_funds state. Direct your customer to go to their banking institution to wire the money to the account details listed in the wireTransfer block of your source.

Last updated