Database Additions


The Subscribe Pro extension for Magento 2 stores data in a number of locations in the Magento database. The following database entities have data added:

Quote and Order Item

The Subscribe Pro extension uses several extension attributes that are added to the quote item and order item objects. These attributes power the subscription widget on the PDP and in the cart, and the subscription creation, cart price rule, and recurring ordering functionality.

Added Fields

FieldTypeDescription
create_new_subscription_at_checkoutBooleanAs of extension version 1.2.0, this attribute is a flag determining whether or not a new subscription should be created at checkout for the line item. By default this is false but if a customer selects the Regular Delivery option during the checkout process, this will become true.
item_fulfils_subscriptionBooleanAs of extension version 1.2.0, this attribute is a flag determining whether the line item on the quote/order is fulfilling a scheduled recurring order for a subscription. This should be true for any automatic recurring orders placed by Subscribe Pro, and will be false for any frontend orders or manual, off-cycle orders placed by Subscribe Pro. Prior to version 1.2.0, this field is called is_fulfilling.
item_added_by_subscribe_proBooleanAs of extension version 1.2.0, this attribute is a flag determining whether the line item on the quote/order was added by Subscribe Pro.
intervalStringThis field is set by the subscription widget on the product details age and in the cart, and by the Subscribe Pro order placement process to designate which subscription interval is selected for this subscription.
subscription_idIntegerThis attribute contains the subscription ID associated with the line item, for both new and recurring orders.
reorder_ordinalIntegerThis field represents the number of recurring orders Subscribe Pro has placed for the subscription associated with the current line item, and is available as a conditional attribute for Cart Price Rules. This count includes the order currently being placed.
next_order_dateDateAs of version 1.2.0, this attribute contains the date of the next scheduled order following this one in the subscription's recurring order schedule. The actual date may change after it is saved in this attribute, and any changes will not be reflected here.
fixed_pricedDecimalAs of version 1.2.0, when present, the value of this attribute is used to override the catalog price of the product being added in the cart.
optionStringAs of version 1.2.0, this is only used for controlling the subscription widget on the quote item. This field is not present on the order item. Possible values are subscription and onetime_purchase.

Payment Methods

Subscribe Pro stores customers' tokenized credit cards in the Magento 2 database using Magento's standard vault functionality. Records are stored on the vault_payment_token table, and data is kept in sync between this table and Subscribe Pro using API calls.

The following chart identifies how our integration uses certain columns on that table to store necessary data for tokenized credit card records to be used by our payment integration.


Table Name: vault_payment_token

FieldTypeDescription
gateway_tokenIntegerThe Subscribe Pro Payment Profile ID is stored on this row and is used to refer to the correct payment profile in Subscribe Pro when initiating a transaction using the stored card.
detailsString (JSON)This is a JSON-encoded collection of data including the card type, expiration date, last four digits, and Spreedly payment token.
payment_method_codeStringAll Subscribe Pro credit card records will be stored with a value of subscribe_pro.

Here is an example of the JSON you might expect to see in the `details` column:
{
  "type":"VI",
  "maskedCC":"1111",
  "expirationDate":"2\/2021",
  "paymentToken":"FFFFFFFFFFFFFFFFFFFFFFFFFFF"
}

  • The type element contains a card type abbreviation as expected by Magento, and may include VI for Visa, MC for MasterCard, AE for American Express, and DI for Discover, among others.
  • The paymentToken element contains the Spreedly token that is references for all transactions made with the stored card record for that customer.

Transactions

Table Name: sales_payment_transaction

FieldTypeDescription
txn_idIntegerThe Subscribe Pro Transaction ID is stored on this row and is used to refer to the transaction record in Subscribe Pro, which can be looked up in our Merchant App under Manage > Vault Transactions.
additional_informationString (JSON)This is a JSON-encoded collection of data including the card type, expiration date, last four digits, Subscribe Pro payment profile and gateway IDs, etc.

Here is an example of the JSON you might expect to see in the additional_information column:

{
  "raw_details_info":{
    "gateway_type":"test",
    "creditcard_type":"visa",
    "creditcard_last_digits":"1111",
    "creditcard_first_digits":"411111",
    "creditcard_month":"2",
    "creditcard_year":"2021",
    "ref_payment_profile_id":1234567,
    "ref_gateway_id":1234,
    "id":12345678,
    "token":"FFFFFFFFFFFFFFFFFFFFFFFFFFF",
    "type":"Authorization",
    "amount":2750,
    "currency_code":"USD",
    "state":"succeeded",
    "gateway_transaction_id":"63",
    "email":"[email protected]",
    "order_id":"000000003",
    "ip":"127.0.0.1",
    "response_message":"Successful authorize",
    "created":"2025-07-22T17:00:26+0000"
  }
}

  • The raw_details_info stores the transaction information returned by Subscribe Pro's API when Magento requests the transaction to be placed.
  • The id refers to the transaction ID in Subscribe Pro.
  • The ref_payment_profile_id refers to the payment profile ID in Subscribe Pro that was used to place the transaction.
  • The token refers to the Spreedly payment token.
  • The gateway_transaction_id refers to the ID of the transaction within the payment gateway.

Table Name: sales_order_payment

FieldTypeDescription
cc_trans_idIntegerThe Subscribe Pro Transaction ID is stored on this row and is used to refer to the transaction record in Subscribe Pro, which can be looked up in our Merchant App under Manage > Vault Transactions.
additional_informationString (JSON)This is a JSON-encoded collection of data including the card type, expiration date, last four digits, Subscribe Pro payment profile and gateway IDs, etc.

Here is an example of the JSON you might expect to see in the additional_information column:

{
  "customer_id":"2",
  "subscribe_pro_order_token":"FFFFFFFFFFFFFFFFFFFFFFFFFFF",
  "method_title":"Stored Cards (SubscribePro)",
  "transaction_id":12345678,
  "transaction_type":"Authorization",
  "gateway_type":"test",
  "avs_code":null,
  "avs_message":null,
  "cvv_code":null,
  "cvv_message":null,
  "response_message":"Successful authorize",
  "cc_type":"VI",
  "cc_number":"xxxx-1111"
}