Configuring TreviPay
Learn how to configure TreviPay for DigitialRiver.js with Elements.
Last updated
Learn how to configure TreviPay for DigitialRiver.js with Elements.
Last updated
If you're using DigitalRiver.js with Elements, you can create a TreviPay payment method for your app or website in four easy steps:
A TreviPay source request object requires the following fields.
Field | Value |
---|---|
The TreviPay source details object requires the following fields.
Field | Required/Optional | Description |
---|---|---|
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 adhere to a standardized format.
When you create a TreviPay source, the customer is required to authorize the charge at TreviPay. You can accomplish this by redirecting the customer to TreviPay to authorize the charge as part of your experience.
To redirect your customer to TreviPay for authorization, use the redirectUrl
parameter in your createSource
response.
At TreviPay, the customer can authorize or cancel the transaction when presented with the transaction details. If the authorization is successful, the customer will be redirected to the TreviPay Return URL parameter you specified when you created the source. If the customer cancels, they will be returned to the TreviPay Cancel URL parameter you specified.
Once authorized, you can use the source by attaching it to a checkout.
See Testing redirect payment methods for testing instructions.
type
msts
sessionId
The payment session identifier.
msts
A TreviPay source details object that includes the details of the transaction.
returnUrl
Required
If you choose to use the full redirect flow, this is where you will redirect your customer after authorizing within the TreviPay experience. Note that the returnUrl
must use https
.
cancelUrl
Required
If you choose to utilize the full redirect flow, this is where you will redirect your customer after canceling within the TreviPay experience.