24/7 Support: 800.608.6482

Navigation


SubscriptionAndOrderItem_Add

This function adds an item to an order and a subscription.

Request Parameters

store_code Type:
String
Title:
Store Code
Store code to run the function against. Found in the Miva Admin under Settings > Store Details
function Type:
String
Title:
Subscription And Order Item Add
The name of the function being executed
order_id Type:
Number
Title:
Order ID
The order number to be updated
customer_id Type:
Number
Title:
Customer ID
The id number of the customer
paymentcard_id Type:
Number
Title:
Payment Card ID
the id of the saved payment card linked to the order
product_id Type:
Number
Title:
Product ID
The id number of the product
productsubscriptionterm_id Type:
Number
Title:
Product Subscription Term ID
subscription term id for the product
address_id Type:
Number
Title:
Address ID
address id for the subscription
ship_id Type:
Number
Title:
Shipping ID
shipping id for the subscription
ship_data Type:
String
Title:
Shipping Data
The name of the shipping option for the subscription
quantity Type:
Number
Title:
Quantity
product quantity for the subscription
nextdate Type:
Number
Title:
Next Date
Datetime string for the next subscription fulfillment date
template_codes Type:
String
Title:
Template Codes
Template codes for product
attribute_codes Type:
String
Title:
Attribute Codes
Attribute codes for product
values Type:
String
Title:
Values
Product values

Response Parameters

success Type:
Boolean
Title:
Status Response
Boolean value indicating if the api request was successful
total Type:
Number
Title:
Subscription Total
Subscription total price
formatted_total Type:
String
Title:
Currency Formatted Subscription Total
Currency formatted subscription total price

Example Request

Example Response

Error Responses

error code:
MER-JSN-ORD-00025
error message:
Order not found
description:
Order not found

Copyright © 1997 – 2026 Miva®, Miva Merchant®, MivaPay Vault®, Camp Miva®, Miva Connect®, Vexture℠, Miva, Inc. All Rights Reserved.