Build a Bank Transfer Source Request and Details objects.
Bank Transfer source request object
The Bank Transfer Source Request object requires the following fields.
Field
Value
Bank Transfer source details object
The Bank Transfer Source Details object requires the following fields.
{"returnUrl": "https://example.com"}
Step 2: Create the Bank 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 thatadheres to a standardized format using the state attribute. Note that the state attribute listed below corresponds to the countrySubdivision attribute used when providing address information. The payment session manages the correct field name on the backend.
var data = {"type":"bankTransfer","sessionId":"3c9473b0-630d-4f20-af61-63d3aa8acb35","owner": { firstName:"John", lastName:"Doe", email:"test@digitalriver.com", address: { line1:"1234 Fake Street", line2:"Yaum-dong", city:"Ulsan-si", state:"Kyongsangnamdo", postalCode:"100-011", country:"KR" } },"bankTransfer": {"returnUrl":"https://yourReturnUrl.com" }}digitalriver.createSource(data).then(function(result) {if (result.error) {//handle errors } else {var source =result.source;//send the source to the back endsendToBackend(source); }});
When you create a Bank Transfer source, the customer is required to authorize the charge through their payment provider. You can accomplish this by redirecting the customer to their payment provider.
Redirecting the customer for Bank Transfer authorization
Use the redirectUrl parameter in your createSource response to redirect your customer to the payment provider for authorization.
The payment provider will present the customer with the transaction details where they can authorize or cancel the transaction. A successful authorization redirects the customer to the Bank Transfer Return URL parameter you specified when you created the source.
Once authorized, the source state will change to chargeable.