Prerequisites
Enable the subscription management feature
Before using the Subscription Management API, ensure that you perform the following actions:- Connect with your Marqeta representative to enable the subscription management feature for your program.
- Confirm that a card exists that is in an
ACTIVE,SUSPENDED, orLIMITEDstate.
Note
Cards in a
TERMINATED state or cards that have reached their expiration date cannot have stop orders placed against them.- Confirm that a recurring transaction exists for the card. You can use the value in the
transaction_tokenfield in Retrieve recurring transactions to identify the recurring transaction. Use Retrieve recurring transactions to find recurring transactions associated with a card.
About merchant ID continuity
In order to effectively block future recurring transactions for a specific merchant, the merchant ID must match the value in themerchant_id field in the original Create a stop order response. Merchant IDs are not static and can change if, for example, a merchant starts using a different acquirer or changes the location of their business. As Marqeta does not generate or assign the values for merchant IDs, changes to merchant ID values are not within Marqeta’s control.
Stop order object
The following fields are returned for stop order resources across the Subscription Management API.Retrieve recurring transactions
The/v3/cards/{card_token}/transactions endpoint allows you to retrieve recurring transactions from the last six months using the is_recurring query parameter.
Action: GET
Endpoint: /v3/cards/{card_token}/transactions
Path parameters
URL query parameters
Response body
Sample response
JSON
Create a stop order
Places a new stop order to block future recurring transactions from a specific merchant for a given card.Note
If you reissue a card whose source card had a stop order on it, the stop order will not carry over to the reissued card. You must create a new stop order for the reissued card if you would like to continue blocking future recurring transactions.
POST
Endpoint: /v3/cards/{card_token}/stoporders
Path parameters
Request body
Response body
See Stop order object.Sample request
JSON
Sample response
JSON
List stop orders for a card
Returns a paginated list of all stop orders for the given card token, sorted by last modified time. For errors associated with listing a stop order for a card, see the Errors page. Action:GET
Endpoint: /v3/cards/{card_token}/stoporders
Path parameters
Response body
Sample response
JSON
Retrieve a specific stop order
Returns the details of a single stop order. Action:GET
Endpoint: /v3/cards/{card_token}/stoporders/{stop_order_token}
Path parameters
Response body
See Stop order object.Sample response
JSON
Update stop order
Updates an existing stop order. Use this endpoint to cancel a stop order or change its duration. Action:PUT
Endpoint: /v3/cards/{card_token}/stoporders/{stop_order_token}
Path parameters
Request body
Response body
See Stop order object.Sample request
JSON
Sample response
JSON
Stop order declines
After placing a stop order on a recurring transaction for a specific merchant, Marqeta will automatically decline any subsequent occurrences of that transaction with the response code1949 (Decline recurring transaction by cardholder) during the authorization process.
This decline reason code is mapped to card networks with the following values:
Note
If you are a JIT Gateway program, you can choose to perform authorization decisioning internally and decline JIT requests with the
REVOCATION_AUTHORIZATION_ORDER reason code. Marqeta will then translate this reason code to the associated card network decline reason code and send it to the card network.Stop order statuses
Status lifecycle
When you create a stop order, its default status isACTIVE. After creation, you can transition the stop order to CANCELLED via the Update stop order endpoint. If you do not cancel the stop order, it automatically transitions to EXPIRED when the expiry_time is reached.
Note
Only orders in an
ACTIVE state transition to an EXPIRED state when the expiry date is reached.Canceled orders remain in CANCELLED state when the expiry date is reached.