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
Field | Type | Description |
---|---|---|
create_new_subscription_at_checkout | Boolean | As 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_subscription | Boolean | As 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_pro | Boolean | As 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. |
interval | String | This field is set by the subscription widget on the product details page and in the cart, and by the Subscribe Pro order placement process to designate which subscription interval is selected for this subscription. In the case of Advanced Scheduling Rules, this field will be set to the parameterized rule name. |
subscription_id | Integer | This attribute contains the subscription ID associated with the line item, for both new and recurring orders. |
reorder_ordinal | Integer | This 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_date | Date | As 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_priced | Decimal | As 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. |
option | String | As 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
Field | Type | Description |
---|---|---|
gateway_token | Integer | The 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. |
details | String (JSON) | This is a JSON-encoded collection of data including the card type, expiration date, last four digits, and Spreedly payment token. |
payment_method_code | String | All 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 includeVI
for Visa,MC
for MasterCard,AE
for American Express, andDI
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
Field | Type | Description |
---|---|---|
txn_id | Integer | The 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_information | String (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
Field | Type | Description |
---|---|---|
cc_trans_id | Integer | The 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_information | String (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"
}