Charge API

POST services.onlinesales.ai/osBillingServiceV2/marketplace/charge

Request Body

Name
Type
Description

amount*

Double

The amount for which the transaction is done. The amount should be a non-negative number greater than or equal to 1.

merchantId

String

Merchant id of seller/brand. The merchant should be a valid merchant in OS systems.

currency*

String

Currency of the amount specified in the request:

Valid currency format : INR, USD, AED Currency cannot be null or empty.

Should be a 3 letter valid value.

token*

String

Valid app token shared by Onlinesales.ai NOTE: do not use this token in any application on the client side.

partnerTransactionId

String

Transaction id for this transaction at marketplace’s side. OS will handle duplicates with this id. valid string. Maximum of 128 characters

merchantType*

String

Merchant type of the merchant for which the transaction is being carried out. Expected Values (case insensitive) brand OR seller

transactionTime(epoch time)*

Integer

The time at which the transaction for this merchant took place. The transaction time will be a epoch time (in milliseconds)

Description

String

Description of the transaction if any The description should not be greater than 128 character

marketplaceClientId*

Integer

Unique client id defined by OS for the marketplace. It will be different for staging and production. Expected Values Shared by OS

creditType

String

This indicates the type of charge. Should be one of Prepaid OR INCENTIVE Default Value: Prepaid

{
    "clientId": 92172,
    "merchantId": "KAKASJ-123",
    "partnerTransactionId": "87645364"
    "id": 2434, // transaction id generated by OS  
    "status" : "SUCCESS" ,
    "marketplaceClientId":<Marketplace Client Id>,
    "details" : {}
}

Request Body

{
    "amount": 100000
    "currency": "USD",
    "merchantId": "XYZ-123",
    "partnerTransactionId": "87645364", // this will be used to handle duplicates
    "merchantType": "seller",
    "transactionTime": 1585191090000, // epoch in ms
    "description": "description if any regarding the transaction. This will be shown on the UI to merchants",
    "token": <token>,  //token shared by onlinesales.
    "marketplaceClientId": <Marketplace Client Id>//clientId provided by OS
    "creditType": "INCENTIVE"  // Default - Prepaid 
}

Response Field Description

Field
Data Type
Description

clientId

Integer

OS created id for merchant

merchantId

String

Marketplace merchant id

merchantType

String

Expected Values (case insensitive) brand OR seller

id

Integer

OS transaction id

partnerTransactionId

String

Transaction id for this transaction at Marketplace’s side. OS will handle duplicates with this id.

valid string. Maximum of 128 characters

status

String

status of the request SUCCESS, FAILED

details

JSON

Any details regarding the transaction

"details": { "error": { "code": "IP0000", "message": "Invalid Parameters Error", "description": [ ā€œ<error message>ā€ ] }

marketplaceClientId

Integer

Unique client id defined by OS for the marketplace. It will be different for staging and production.

Last updated