POST /partnerSubscription
This API is used to create a billing partner relationship. In addition to the request body, the Merchant must also provide the Reseller (Service Provider) organization code in the HTTP header or query parameter. Request Body- The Merchant should support at least one of the following account identifier types: email or mobile. The Reseller (Service Provider) uses the identifier(s) for account validation.
- The Merchant is required to handle error responses from account validation on the Reseller’s (Service Provider’s) side.
-
Idempotency and fraud prevention
POST /partnerSubscriptionis idempotent (that is, it doesn’t alter or change the result for the same call). The Merchant must be able to detect potential fraud by analyzing the result ofPOST /partnerSubscription. Example scenario:-
User A selects pay with bill and provides an account identifier (for example, a mobile number). The Merchant calls
POST /partnerSubscriptionto do the account validation. Upon checking with the Reseller’s (Service Provider’s) BSS system for account eligibility, MarketONE returns apartnerSubscriptionIDandPENDING-VALIDATIONstatus. The Merchant goes through PIN validation and confirmation before posting a charge, as per the standard flow. At this point, thepartnerSubscriptionstatus isACTIVE. -
Now User B signs up with the Merchant and selects pay with bill, but instead of entering their own account identifier, they enter the identifier of User A. (They knew or stole User A’s account identifier.) Now
POST /partnerSubscriptionhas exactly the same parameter as it does for User A, so MarketONE returns the samepartnerSubscriptionIDand anACTIVEstatus. From the Merchant’s perspective, thepartnerSubscriptionis meant to be inPENDING-VALIDATIONstatus. The samepartnerSubscriptionIDhas been associated with User A, but now User B is trying to link their purchase with the samepartnerSubscriptionID, and it should be marked as potential fraud by the Merchant. There are two assumptions that help with fraud detection: - The Merchant is managing the users. When the user either signs in or signs up, the Merchant receives unique user identities and therefore should be able to differentiate User A and User B in the above example scenario.
-
The Merchant needs to persist the
partnerSubscriptionIDfor a given user/subscription because the same ID is required not only for PIN validation and confirmation, but also for the recurring charges (partnerSubscriptionIDmust be provided forPOST /transactioncalls). As such, the Merchant is able to detect whether apartnerSubscriptionIDis being associated with a second user.
-
User A selects pay with bill and provides an account identifier (for example, a mobile number). The Merchant calls
POST /partnerSubscription/{id}/validate
This API is used to validate the PIN generated by MarketONE against the value entered by the user. This API verifies the user’s identity. The PIN is generated by MarketONE OpenAPI. However, the Reseller (Service Provider) notification system sends the PIN to the user. The Reseller (Service Provider) notification system has the contact information of the account owner. Theid parameter is the partnerSubscriptionID from the original POST /partnerSubscription call.
Request Body
- It’s a best practice to verify the user identity via the PIN (that is, to include this call in the subscription flow design).
- The Merchant is responsible for handing retries if the user entered the wrong PIN.
POST /partnerSubscription/{id}/confirm
This API is used to confirm the billing partner subscription. Theid parameter is the partnerSubscriptionID from the original POST /partnerSubscription call. No request body is required for this call.
Note: This API is optional. If the Merchant chooses not to use this API, it will be configured in MarketONE so that POST partnerSubscription/{id}/validate returns an ACTIVE status instead.
Response Body
- The Merchant must be able to handle error scenarios.
POST /partnerSubscription/{id}/resend
This API is used to request that the PIN be re-sent to the user. Theid parameter is the partnerSubscriptionID from the original POST /partnerSubscription call. No request body is required for this call.
Response Body
- The Merchant is responsible for offering the resend option in case the user didn’t receive the PIN.
- The Merchant is also responsible for letting the user know whether the PIN validation is successful or needs a retry.
POST /transaction
The Merchant uses this API to post the charges of a subscription to MarketONE and MarketONE relays the charge to the Reseller (Service Provider). This API is used for one-time charges and recurring charges. For recurring charges, Merchants are responsible for posting the charge at the beginning of each billing cycle. Request Body- It’s the responsibility of the Merchant to post the charge whenever the recurring charge is due. For example, if a user subscribed to the Merchant’s monthly service on November 1, the first
POST /transactionhappens at the point of subscription. Going forward, whenever it’s the first day of the month, the Merchant must callPOST /transactionto post charges for that particular subscription of the same user.
POST /transaction/{id}/refund
The Merchant uses this API to post the refund of the subscription to MarketONE and MarketONE relays the refund to the Reseller (Service Provider). Theid in the parameter is the original transaction id of POST /transaction call.
Request Body
- After the Merchant posts a refund for a subscription, MarketONE performs the validation to make sure the refund amount doesn’t exceed the original charge amount on the same Partner subscription.
- The Merchant is required to handle any potential error responses from MarketONE.
POST /partnerSubscription/{id}/cancel
This API is used to cancel an active billing partner subscription relationship. Theid in the parameter is the original partnerSubscriptionID. No response body is required for this call.
Response Body
- Technically, when a subscription is canceled through the Merchant, the Merchant can stop sending the recurring
POST /transactioncall for that subscription. However, in MarketONE, the Partner subscription is still active, so this incurs a data discrepancy. This cancellation call makes sure the status in MarketONE is in sync. - The Merchant is required to handle any potential error response from MarketONE.

