Skip to main content
Version: v1

POST Update Transaction

To update the cart total, nonprofit selection, associated Beam user, or currency code of a given transaction and verify the cart total of a given transaction.

When an order is accepted by your order management system, it is important to let the Beam system know that the order is valid and accurate. This is typically done after any fraud detection process have been run.

Authorization

The update transaction endpoint takes the OMS Integration API Key.

Authorization: "Api-Key {{ oms_integration_api_key }}"

Endpoint

POST https://api.beamimpact.com/api/v3/updateTransactionByOrderId

Body

{
"orderId": "{{ orderId }}", // String, required
"storeId": {{ storeId }}, // Int, required
"cartTotal": {{ cartTotal }}, // Decimal, required
"currencyCode": "USD", // String, required
"nonprofitId": {{ nonprofitId }}, // Int, optional
"email": "{{ userEmail }}", // String, optional
"postalCode": "12345", // String
"beamUserId": "{{ beamUserId }}" // String, optional
"creationMethod": null, // String, optional, set to "recurring" if the order was placed as part of a recurring subscription
"cart": { // The "cart" object is optional in the API, though is required for supporting SKU-based campaigns
"schema": {
"source": "generic"
},
"content": {
"subscriptions": [
    {
    "remoteSubscriptionId": "{{ subscriptionId }}", // String
"isNew": {{ true | false }} // Boolean, optional, true = This is the first order in a subscription; false = This is not the first order in a subscription
}
],
"items": [ // A list of line items in the cart
{
"localAmount": {{ itemAmount }}, // Decimal, required
"remoteProductIdentifier": "{{ remoteProductIdentifier }}", // String, required
"remoteSubscriptionId": "{{ subscriptionId }}" // String, optional
},
{
"localAmount": {{ itemAmount_2 }}, // Decimal, required
"remoteProductIdentifier": "{{ remoteProductIdentifier_2 }}", // String, required
"remoteSubscriptionId": "{{ subscriptionId_2 }}" // String, optional
},
]
}
},
}

Response

{
"transactionId": {{ transactionId }}, // Int
"beamUserId": "{{ beamUserId }}", // String
"nonprofitId": {{ nonprofitId }}, // Int
"chainId": {{ chainId }} // Int
}