Create an order is an API call to register a request for making a fulfillments. Order contains important information like amount, customer, beneficiary details.
Juspay Payout
There are two types of orders merchant can create for payouts at Juspay.
- Pay and Fulfill
- Fulfill Only
Pay and Fulfill
Merchants who wants to collect money and do the payout can use this type of order.
- Merchant->Juspay(morpheus):Merchant creates order in Morpheus (Juspay Payout)
- Juspay(morpheus) -> Juspay(express checkout) : Morpheus creates order in Express checkout (Juspay Collection)
- Juspay(morpheus)->Merchant: OrderCreate response
- Merchant -> user : Merchant gives response to end user for payment
- User -> Merchant->Juspay : User initiates payment
- Juspay(express checkout) ->Juspay(morpheus) : On successful completion of payment Express checkout gives payment webhook to morpheus
- Juspay(morpheus)->Gateway: Fulfillment Attempt - Juspay will process attempts asynchronously
- Juspay(morpheus)<->Gateway: Juspay polls for fulfillment status - Juspay will mark the transaction as failure/success based on the gateway's response
- Juspay(morpheus)->Merchant: Juspay sends a callback post status update
- Juspay(morpheus)->Gateway: Juspay retry attempt - Juspay retries the transaction if the transaction has failed and retry_attempt_policy mentions a retry for the particular scenario
- Juspay(morpheus)->Merchant: Final order level callback - Merchant to have a fallback for polling the status for order - this can be done for handling rare cases where callback would be missed
Fulfill Only
Merchants who wants to use only payout feature can use this type of order.
- Merchant->Juspay(morpheus): OrderCreate request
- Juspay(morpheus)->Merchant: OrderCreate response
- Juspay(morpheus)->Gateway: Fulfillment Attempt - Juspay will process attempts asynchronously
- Juspay(morpheus)<->Gateway: Juspay polls for fulfillment status - Juspay will mark the 5. transaction as failure/success based on the gateway's response
- Juspay(morpheus)->Merchant: Juspay sends a callback post status update
- Juspay(morpheus)->Gateway: Juspay retry attempt - Juspay retries the transaction if the transaction has failed and retry_attempt_policy mentions a retry for the particular scenario
- Juspay(morpheus)->Merchant: Final order level callback - Merchant to have a fallback for polling the status for order - this can be done for handling rare cases where callback would be missed
Integration Specifications
Authentication:
All the APIs use Basic HTTP authentication scheme to authenticate the requests and identify your account. API key will be shared by Juspay team with the merchant. Provide your API key as the basic auth username value. You do not need to provide a password.
Note: API Key is like password to your account. You must never send this information to browser or application clients. Also, do not publish your API Key in publicly accessible areas such as Git repositories, Android/iOS clients, support forums, etc.
To authorize, use this code:
curl https://api.juspay.in/payout/merchant/v1/orders
-u your API Key :
curl tool uses the option -u to accept the username and password. The username & password are separated by :. Notice that the password is empty in the above request and your_api_key should be updated in the place of username
Sandbox Base URL: https://sandbox.juspay.in/payout Production Base URL: https://api.juspay.in/payout