> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Merchant-Managed Use Cases

The five main use cases in the Merchant-managed subscription flow that Merchants need to process and respond to are the following:

* Subscription to the Merchant's Service
* Request to Resend a PIN
* Charging and Payment Processing (One-Time and Recurring)
* Refunds
* Subscription Cancellation

Each section below provides API sequence information and diagrams. The APIs used for integration with the platform are the MarketONE APIs.

**Note:** The corresponding Reseller-specific API key needs to be included in the HTTP header for each call.

## Subscription to the Merchant's Service

The new subscription flow includes account validation, PIN validation/purchase confirmation, and subscription confirmation.

The following sequence diagram describes the new subscription flow. <img src="https://mintcdn.com/amdocs-spbu/-GCj74mr5p4KPy3T/marketONE/partnerAPIGuide/images/NewSubscriptionSequence_Partner.png?fit=max&auto=format&n=-GCj74mr5p4KPy3T&q=85&s=569320ab4678a3387b26a4410002622a" alt="New Subscription Sequence" width="1445" height="1739" data-path="marketONE/partnerAPIGuide/images/NewSubscriptionSequence_Partner.png" />

The process works as follows:

1. Account validation is required before the purchase is completed to make sure the user is eligible for the current purchase.

2. The Merchant requires the user to enter a PIN, which is sent to the user's communication channel. This is to verify the user owns the account associated with their communication channel identifier.

   **Note:** The PIN has a default expiry duration of 5 minutes. After it has expired, the user needs to request that a new PIN be sent. The PIN length is configurable and the default is 6 digits. Both the PIN validity period and PIN length can be configured per Merchant or per Merchant-Reseller.

3. The Merchant sends the purchase confirmation to MarketONE.

## Request to Resend a PIN

The following sequence diagram describes the flow to resend a PIN.

<img src="https://mintcdn.com/amdocs-spbu/-GCj74mr5p4KPy3T/marketONE/partnerAPIGuide/images/ResendPINSequence_Partner.png?fit=max&auto=format&n=-GCj74mr5p4KPy3T&q=85&s=fabb1377ee8f3699610547c15f604b27" alt="Resend PIN Sequence" width="784" height="528" data-path="marketONE/partnerAPIGuide/images/ResendPINSequence_Partner.png" />

The process works as follows:

* If the user didn't receive the PIN for their purchase, they can request that the PIN be resent. MarketONE regenerates a new PIN if the PIN has expired (the default expiration period is 5 minutes). Otherwise, MarketONE sends the same PIN and pushes it to the Merchant through the `POST /notification` API to the Reseller (Service Provider).

## Charging and Payment Processing (One-Time and Recurring)

The following sequence diagram describes the charging and payment processing flow.

<img src="https://mintcdn.com/amdocs-spbu/-GCj74mr5p4KPy3T/marketONE/partnerAPIGuide/images/ottprocess_step3.png?fit=max&auto=format&n=-GCj74mr5p4KPy3T&q=85&s=f7e502a761bea73f2680fee00ef3b17c" alt="Sending the Transaction for Posting" width="854" height="538" data-path="marketONE/partnerAPIGuide/images/ottprocess_step3.png" />

This process works as follows:

1. The Merchant must post the transaction, which is either one-time or recurring (depending on the nature of the subscription). This is needed to charge the amount to the user's bill.
2. MarketONE sends the charges to the Reseller (Service Provider) by making a `POST /transaction` call. MarketONE applies any applicable settlement model if it's a part of the agreement between the Merchant and Reseller.

## Refunds

The following sequence diagram describes the refund flow.

<img src="https://mintcdn.com/amdocs-spbu/-GCj74mr5p4KPy3T/marketONE/partnerAPIGuide/images/RefundSequence_Partner.png?fit=max&auto=format&n=-GCj74mr5p4KPy3T&q=85&s=046452b4af9d76fb7b8e6a56b454ca76" alt="Refund Sequence" width="947" height="427" data-path="marketONE/partnerAPIGuide/images/RefundSequence_Partner.png" />

The process works as follows:

* The Merchant's refund request specifies the amount which will be credited to the user's carrier bill.

  **Note:** The refund amount for any Merchant subscription can't be greater than the original charge amount.

## Subscription Cancellation

The following sequence diagram describes the cancellation flow.

<img src="https://mintcdn.com/amdocs-spbu/-GCj74mr5p4KPy3T/marketONE/partnerAPIGuide/images/ottprocess_step4.png?fit=max&auto=format&n=-GCj74mr5p4KPy3T&q=85&s=d8d17bae3845eebc36f7915294064b1f" alt="Canceling a Subscription" width="682" height="429" data-path="marketONE/partnerAPIGuide/images/ottprocess_step4.png" />

The process works as follows:

* The Merchant manages the user subscription directly, so they can simply stop sending the transaction to MarketONE for recurring charges. However, making a `POST /partnerSubscription/{id}/cancel` request keeps the subscription status in MarketONE in sync.

**Parent topic:**[Merchant-Managed and Platform-Managed Flows](partnerAPIFlows_r)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.