Search…
Adding required information for specific payment methods
Learn how to add the information required to support a specific payment method.
Specific payment methods such as TreviPay require the organization identifier (client_reference_id). The following instructions show you how to add or remove the organization identifier.

Adding an organization identifier to a cart

You can add a shopper's organization identifier when you update a cart. We pass the organization identifier to the payment session where the payment method becomes available.
Use the POST /shoppers/me/carts/active resource to add an organizationId to the cart.
cURL
1
curl --location --request POST 'https://api.digitalriver.com/shoppers/me/carts/active' \
2
--header 'Content-Type: application/json' \
3
--header 'authorization: bearer ***\
4
--data-raw '{
5
"cart": {
6
"organizationId": "Acme_Inc",
7
"lineItems": {
8
"lineItem":
9
{
10
"quantity": "1",
11
"product": {
12
"id": "5326162000"
13
}
14
}
15
}
16
}
17
}'
Copied!
A successful request returns a 200 OK response.
200 OK response
1
{
2
"cart": {
3
...
4
"organizationId": "Acme_Inc"
5
}
6
}
Copied!

Removing an organization identifier from the cart

Use the POST /shoppers/me/carts/active resource and an empty organizationId string to delete the organization identifier from the cart.
cURL
1
curl --location --request POST 'https://api.digitalriver.com/shoppers/me/carts/active' \
2
--header 'Content-Type: application/json' \
3
--header 'authorization: bearer ***\
4
--data-raw '{
5
"cart": {
6
"organizationId": "",
7
"lineItems": {
8
"lineItem":
9
{
10
"quantity": "1",
11
"product": {
12
"id": "5326162000"
13
}
14
}
15
}
16
}
17
}'
Copied!
A successful request returns a 200 OK response.
200 OK response
1
{
2
"cart": {
3
...
4
}
5
}
Copied!
Last modified 1mo ago