Payout Workflow

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.

  1. Pay and Fulfill
  2. Fulfill Only

Pay and Fulfill

Merchants who wants to collect money and do the payout can use this type of order.

  1. Merchant->Juspay(morpheus):Merchant creates order in Morpheus (Juspay Payout)
  2. Juspay(morpheus) -> Juspay(express checkout) : Morpheus creates order in Express checkout (Juspay Collection)
  3. Juspay(morpheus)->Merchant: OrderCreate response
  4. Merchant -> user : Merchant gives response to end user for payment
  5. User -> Merchant->Juspay : User initiates payment
  6. Juspay(express checkout) ->Juspay(morpheus) : On successful completion of payment Express checkout gives payment webhook to morpheus
  7. Juspay(morpheus)->Gateway: Fulfillment Attempt - Juspay will process attempts asynchronously
  8. Juspay(morpheus)<->Gateway: Juspay polls for fulfillment status - Juspay will mark the transaction as failure/success based on the gateway's response
  9. Juspay(morpheus)->Merchant: Juspay sends a callback post status update
  10. 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
  11. 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.

  1. Merchant->Juspay(morpheus): OrderCreate request
  2. Juspay(morpheus)->Merchant: OrderCreate response
  3. Juspay(morpheus)->Gateway: Fulfillment Attempt - Juspay will process attempts asynchronously
  4. Juspay(morpheus)<->Gateway: Juspay polls for fulfillment status - Juspay will mark the 5. transaction as failure/success based on the gateway's response
  5. Juspay(morpheus)->Merchant: Juspay sends a callback post status update
  6. 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
  7. 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