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 (organizationId).  For example, use the value associated with TreviPay's client reference_id as the value for the organizationId. 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 --location --request POST 'https://api.digitalriver.com/shoppers/me/carts/active' \
--header 'Content-Type:  application/json' \
--header 'authorization: Basic  ***\
--data-raw '{
		"cart": {
				"organizationId": "Acme_Inc",
				"lineItems": {
						"lineItem":
								{
										"quantity": "1",
										"product": {
												"id": "5326162000"
										}
								}
				}
			}
}'A successful request returns a 200 OK response.
{
  "cart": {
    ...
    "organizationId": "Acme_Inc"
  }
}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 --location --request POST 'https://api.digitalriver.com/shoppers/me/carts/active' \
--header 'Content-Type:  application/json' \
--header 'authorization: Basic ***\
--data-raw '{
		"cart": {
				"organizationId": "",
				"lineItems": {
						"lineItem":
								{
										"quantity": "1",
										"product": {
												"id": "5326162000"
										}
								}
				}
			}
}'A successful request returns a 200 OK response.
{
  "cart": {
    ...
  }
}Last updated
Was this helpful?