---
page_title: Order Create [Encrypted]
product: API Reference
page_source: https://juspay.io/in/docs/api-reference/docs/payout/order-create-encrypted
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fapi-reference%2Fdocs%2Fpayout%2Forder-create-encrypted
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/api-reference/llms.txt
---

## API Version: default


# Order Create [Encrypted] 



This API is used to create a payout request with Juspay for plain card and tokenized card where Juspay is not the token requester

> **Warning**
> Request data has to be sent in encrypted format. Please follow the steps mentioned [here](https://docs.juspay.in/payout/docs/resources/encryption-guide)



The below params have to be stringified before encryption: ## Endpoints:
- Sandbox: https://sandbox.juspay.in/payout/merchant/v1.1/orders

- Production: https://api.juspay.in/payout/merchant/v1.1/orders

## Request Type: 
POST

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string

Example:- Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: String, Mandatory
## Headers:

#### x-merchantid:
Please pass merchant-id given for your merchant
- Tags: string

#### x-routing-id:
We recommend passing the customer_id as the x-routing-id. If the customer is checking out as a guest, you can pass an alternative ID that helps track the payment session lifecycle. For example, this could be an Order ID or Cart ID.

> **Warning**
> This ID is associated with the customer. It plays a key role in ensuring consistency and maintaining connections across different systems. If you fail to pass the same x-routing-id for the same customer in all related API calls, it could lead to issues with API functionality. Therefore, it’s crucial that you use the same x-routing-id for all requests tied to the same customer.


- Value: customer_1122
- Tags: String, Required
## Sample Code Snippets:
### Sample Request:

#### Encrypted Request Code Snippet:

```encrypted request
curl --location 'https://sandbox.juspay.in/payout/merchant/v1.1/orders' \
--header 'x-merchantid: <merchant id>' \
--header 'Content-Type: application/json' \
--header 'x-routing-id: customer_1122'\
--header 'Authorization: Basic (b64 encoded API key)' \
--data '{
    "payload": "eyJlbmMiOiJBMTI4Q0xxxxxxxxxxxxwiYWxnIjoiUlNBLU9BRVAiLCJraWQiOiJhbWF6b25rZXkxIn0.ZOkZg-CxCvVbC-uX-QphJW0LWBKymxFEF2deYncqYwC-7py8NgjSehE7HufNfQdHe6YE3i2a_veugtO6K1MzpsHltH8N4he-cJ8zuFsnSIaFeDnLL-AyCXcztwIAx7eaJM36lJea_V1mPqFdIbDVO7M1Pi7QIPzzM3r4bK7E3yPxI2mVvqMai86OToHWaXH8vP7HEKoGXlTf_Ldeb93-uOpGzyrP836NbsP7lYm5XdsXeNOHnaAP645XTBUGvYPd1huFne91vPmxIiEZnaYAFcyxeDDwsc-yWiLyNGUSo8P8Ukw-8WJvMcbMAL4BcX8pLDQcacegGfGpx_M9943JOg.Ge18ShQX6dpAdJFJeeZyfQ.u2bTacQhX6rc5WdSkXEzFyyqwXQiOtm_LmA03fvleHi-dAoVefPmahP2lBzwQNt6NK_uVoztRvtfqpGR1yPLuZ7havx0NtWeIJIBCHJWnDyBYF7ECnrXbNbWj3XHdUq8N20c50aWEW3Iz9YjbUNizg.M3I3FfCNdFDhIal4VqccNw",
    "kid": "kid", //Reference to Juspay private key
    "sid": "sid", //Reference to Merchant public key
    "format": "compact"
}'

```

#### Decrypted Payload for Non-Tokenized Card Code Snippet:

```decrypted payload for non-tokenized card
{
    "orderId": "1803665523",
    "fulfillments": [
        {
            "amount": 1,
            "beneficiaryDetails": {
                "details": {
                    "name": "Aditya Kadrolkar",
                    "cardType": "CREDIT",
                    "brand": "VISA",
                    "bankCode": "508534",
                    "cardNumber": "4111111111111111",
                    "cardSecurityCode": "123",
                    "cardExpiry": {
                        "month": "02",
                        "year": "2028"
                    }
                },
                "type": "PLAIN_CARD"
            },
            "udf1": "String1",
            "udf2": "String2",
            "udf3": "String3",
            "udf4": "String4",
            "udf5": "String5",
            "additionalInfo": {
                "remark": "Payout Transaction"
            }
        }
    ],
    "amount": 1,
    "customerId": "cth_59Yibs1JauYP6WJP",
    "customerPhone": "9999999999",
    "customerEmail": "test@gmail.com",
    "type": "FULFILL_ONLY",
    "udf1": "udf1",
    "udf2": "udf2",
    "udf3": "udf3",
    "udf4": "udf4",
    "udf5": "udf5"
}
```

#### Decrypted Payload for Card Tokenized outside Juspay Code Snippet:

```decrypted payload for card tokenized outside juspay
{
  "orderId": "1903665523",
  "fulfillments": [
    {
      "amount": 1,
      "beneficiaryDetails": {
        "details": {
          "name": "Aditya Kadrolkar",
          "cardType": "CREDIT",
          "brand": "VISA",
          "bankCode": "508534",
          "cardToken": "5513651111111111"
        },
        "type": "PLAIN_CARD"
      },
      "additionalInfo": {
        "remark": "Payout Transaction"
      }
    }
  ],
  "amount": 1,
  "customerId": "cth_59Yibs1JauYP6WJP",
  "customerPhone": "9999999999",
  "customerEmail": "test@gmail.com",
  "type": "FULFILL_ONLY"
}
```

### Sample Response:

#### Plain Card (Non-tokenized):
```json
{
    "udf5": "udf5",
    "udf4": "udf4",
    "udf3": "udf3",
    "udf2": "udf2",
    "udf1": "udf1",
    "type": "FULFILL_ONLY",
    "status": "READY_FOR_FULFILLMENT",
    "payments": [],
    "orderId": "1803665523",
    "fulfillments": [
        {
            "updatedBy": "DEFAULT",
            "updatedAt": "2023-12-27T13:42:32Z",
            "udf5": "String5",
            "udf4": "String4",
            "udf3": "String3",
            "udf2": "String2",
            "udf1": "String1",
            "type": "ORDER",
            "statusUpdatedAt": "2023-12-27T13:42:32Z",
            "status": "CREATED",
            "id": "9bf34656bbb4e7096f9f9ba0f0ea17-f1",
            "fulfillmentMethodList": [],
            "createdAt": "2023-12-27T13:42:32Z",
            "beneficiaryDetails": {
                "details": {
                    "name": "Piyush Begwani",
                    "last4ofCard": "1111",
                    "cardType": "CREDIT",
                    "brand": "VISA",
                    "bankCode": "508534"
                },
                "type": "PLAIN_CARD"
            },
            "amount": 1,
            "additionalInfo": {
                "remark": "Payout Transaction"
            }
        }
    ],
    "customerId": "cth_59Yibs1JauYP6WJP",
    "amount": 1
}
```

#### Plain Card (Tokenized outside Juspay):
```json
{
    "udf5": "udf5",
    "udf4": "udf4",
    "udf3": "udf3",
    "udf2": "udf2",
    "udf1": "udf1",
    "type": "FULFILL_ONLY",
    "status": "READY_FOR_FULFILLMENT",
    "payments": [],
    "orderId": "1903665523",
    "fulfillments": [
        {
            "updatedBy": "DEFAULT",
            "updatedAt": "2023-12-27T14:04:18Z",
            "udf5": "String5",
            "udf4": "String4",
            "udf3": "String3",
            "udf2": "String2",
            "udf1": "String1",
            "type": "ORDER",
            "statusUpdatedAt": "2023-12-27T14:04:18Z",
            "status": "CREATED",
            "id": "64f2a6a10a543f0856586dadbd90ad-f1",
            "fulfillmentMethodList": [],
            "createdAt": "2023-12-27T14:04:18Z",
            "beneficiaryDetails": {
                "details": {
                    "name": "Aditya Kadrolkar",
                    "cardType": "CREDIT",
                    "brand": "VISA",
                    "bankCode": "508534"
                },
                "type": "PLAIN_CARD"
            },
            "amount": 1,
            "additionalInfo": {
                "remark": "Payout Transaction"
            }
        }
    ],
    "customerId": "cth_59Yibs1JauYP6WJP",
    "amount": 1
}
```

## Body Parameters:
### Parameters:

#### orderId:
- Description: Unique Reference for the order. This will be the ID for any subsequent communications. 

Min length = 4, Max length = 64 

orderId can contain alphanumeric values. It can also contain special characters _ , - and @
- Tags: string, Mandatory

#### amount:
- Description: Total order amount. Amount can be passed up to 2 decimal points.Minimum amount of Rs 1Example: 1,2.5,3.80
- Tags: Double, Mandatory

#### customerId:
- Description: Unique ID for the customer generated by the merchant. 

Max length = 64 

For CARD payouts, please provide same customer ID used while adding / tokenizing card. 

For BENE ID payouts please use same customer ID passed while creating / validating beneficiary.
- Tags: string, Mandatory

#### customerPhone:
- Description: Customer mobile number - you may pass a dummy value in case this information is not available at your end
- Tags: string, Mandatory

#### customerEmail:
- Description: Customer email address - you may pass a dummy value in case this information is not available at your end
- Tags: string, Mandatory

#### type:
- Description: Pass FULFILL_ONLY for payout order creation
- Tags: string, Mandatory

#### fulfillments:
- Description: fulfilment related details
- Value:
  - **PreferredMethodList**:
    - Description: Note: This is an optional param and should be used only in some specific cases and routing requirements.Please do not pass this field unless there is an specific routing need.This will define the list of methods to be used for fulfillments for instance - [“DUMMY_IMPS”]
      
      preferredMethodList carries a higher priority than distribution logic set on Juspay dashboard.
    - Tags: array
  - **Amount**:
    - Description: Amount to be processed for the particular fulfillment. Sum of all the fulfilment amount should be equal to order amount.Minimum amount of Rs 1
    - Tags: Double, Mandatory
  - **BeneficiaryDetails**:
    - Value:
      - **Type**:
        - Description: Pass “CARD” / “UPI_ID” / “ACCOUNT_IFSC” / "WALLET" / "BENE_ID" / “PLAIN_CARD” / “PAYOUT_LINK“ based on required method. CARD for card transfer of tokenized cards with Juspay as token requester, UPI_ID for transfer to vpa, and ACCOUNT_IFSC for transfer to bank account, WALLET for transfer to Paytm Wallet, BENE_ID for transfer to beneficiary already created / validated with Juspay. PLAIN_CARD for direct card based payout / token based payouts where Juspay will not be the token requester, PAYOUT_LINK for generating a payout link.
        - Tags: String, Mandatory
      - **Details**:
        - Value:
          - **Name**:
            - Description: Name of beneficiaryRequired in case of NEFT / RTGS rails due to beneficiary name check done by beneficiary banks.
            - Tags: String
          - **Account**:
            - Description: Account of beneficiary. Required for payout of type ACCOUNT_IFSC
            - Tags: String
          - **Ifsc**:
            - Description: IFSC of beneficiary. Required for payout of type ACCOUNT_IFSC
            - Tags: String
          - **CardReference**:
            - Description: CardReference to the card details stored in Juspay Card Vault. One of the below two fields is required for payout type CARD: tempToken or cardReference .
            - Tags: String
          - **BankCode**:
            - Description: IIN of the card issuer - a list of bankCode & bankNames is provided. Required for payout type CARD .Please refer to Resources Section for the List of Bank Codes.
            - Tags: String
          - **Brand**:
            - Description: Card brand - VISA / MASTERCARD / AMEX etc. Required for payout type CARD 
              
              Wallet brand - PAYTM. Required for payout type WALLET
            - Tags: String, Conditional
          - **CardType**:
            - Description: CREDIT / DEBIT. Required for payout type CARD
            - Tags: String, Conditional
          - **Vpa**:
            - Description: UPI id of beneficiary. Required for payout type UPI_ID
            - Tags: String, Conditional
          - **WalletIdentifier**:
            - Description: Number with which user has registered Paytm Wallet.
            - Tags: String
          - **Id**:
            - Description: Beneficiary ID passed in the request while creating / validating beneficiary. Required for payout type BENE_ID
            - Tags: String
          - **MobileNo**:
            - Description: Required for payout type UPI_ID / PAYOUT_LINKUPI_ID : Mobile number on which payout should be attempted. Juspay will fetch the primary vpa linked to the mobile number and attempt UPI Payout. PAYOUT_LINK : Payout link will be sent to the provided mobile number.
            - Tags: String
          - **CardNumber**:
            - Description: Value of actual card number to be passed. Required for payout type PLAIN_CARD.If payout type is PLAIN_CARD, one of the below fields are required:cardNumber/cardToken.
            - Tags: String, Conditional
          - **CardToken**:
            - Description: Value of actual card token to be passed. Required for payout type PLAIN_CARD.Value of actual card number to be passed. Required for payout type PLAIN_CARD.If payout type is PLAIN_CARD, one of the below fields are required:cardNumber/cardToken.
            - Tags: String, Conditional
          - **CardExpiry**:
            - Description: Expiry details for user’s card. This will be used for creation of alt ID for PLAIN_CARD transactions where merchant is passing non-tokenized card details
            - Value:
              - **Month**:
                - Description: Expiry month for users card (MM)
                - Tags: String
              - **Year**:
                - Description: Expiry year for users card (YYYY)
                - Tags: String
            - Tags: String
          - **TempToken**:
            - Description: Temporary Token generated against card details. One of the below two fields is required for payout type CARD: tempToken or cardReference .
            - Tags: String
        - Tags: Object
    - Tags: object
  - **Udf1-5**:
    - Description: Fulfillment level user defined fields. These fields can be used for analytics and routing of fulfillment of the order
    - Tags: String
  - **AdditionalInfo**:
    - Value:
      - **Remark**:
        - Description: The parameter will be passed as narration to the downstream gateways (if supported)
        - Tags: String
      - **ScheduleTime**:
        - Description: Time at which fulfillment should be attempted by Juspay. This is UTC format. Example: “2025-02-05T11:53:40Z”
        - Tags: String
      - **AttemptThreshold**:
        - Description: This is the time after which juspay will not initiate attempt with underlying gateway.Merchants can use this field to set custom attempt threshold for an order. This is in minutes. Attempt threshold can be set on the dashboard as well.
        - Tags: Integer
      - **IsRetriable**:
        - Description: Merchants can pass true / false depending upon whether order should be retried on technical failure. Applicable only for payout type PLAIN_CARD.
        - Tags: Boolean
      - **WebhookDetails**:
        - Description: Merchants can provide dynamic webhook details for the order if required. This is an optional field.Use this field only if you want to receive webhooks on seperate URLs for orders.If you want to use only one URL for webhooks, please set webhook URL on payouts Dashboard.
        - Value:
          - **Url**:
            - Description: https URL corresponding to webhook endpoint to which webhook events should be triggered for this order
            - Tags: String
          - **Username / password**:
            - Description: Input values of username and password in corresponding fields. Base 64 encoded value of username:password will be sent as Authorization for webhook
            - Tags: String
          - **CustomHeader**:
            - Description: Merchant can pass custom header if required for webhook to be triggered
            - Tags: String
        - Tags: Object, Optional
      - **OriginalTxnRef**:
        - Description: Transaction Reference pointing to original transaction for refund payout. Applicable only for Visa Direct / Mastercard Send rails .This field is mandatory if you want to initiate a refund transaction on Mastersend rail.Please pass the value in this field as mentioned below:**1. For Mastercard Refund Transactions:** It should be a 19 characters string as mentioned below:If Purchase transaction originated on the Dual Message System:[POS 1] Origination system for purchase transaction: ‘D’ for Dual Message.[POS 2-5] DE 15 (Date, Settlement). Example: 1209[POS 6-8] DE 63, subfield 1 (Financial Network Code). Example: MCW[POS 9 -14] DE 63, subfield 2 (BankNet Reference Number). Example: WTDPHE[POS 15-19] 00000If Purchase transaction originated on the Single Message System:[POS 1]: Origination system for purchase transaction: ‘S’ for Single Message[POS 2-5] DE 15 (Date, Settlement). Example: 1209[POS 6-14] DE 63, subfield 3 (Network Reference Number) [POS 15-19] 00000**2. For Visa Refund Transactions:** Please pass Transaction Identifier of original purchase transaction. Example : 394030104165147
        - Tags: String
    - Tags: Object
  - **SenderDetails**:
    - Description: This will consist sender details. This is Mandatory fields for Credit Card Bill Payment Transactions via MASTERSEND Rail
    - Value:
      - **Type**:
        - Description: Indicates the type of the payment doneAllowed Values : PAY_CARD, NETBANKING, UPI
        - Tags: String
      - **Details**:
        - Value:
          - **Name**:
            - Description: Name of the sender
            - Tags: String
          - **Account**:
            - Description: Please populate this field with the accountNumber of the remitter if the paymentType is NETBANKING
            - Tags: String
          - **Pan**:
            - Description: Please populate this with the card number or Token if the Type is PAY_CARD
            - Tags: String
          - **Expiry**:
            - Description: Expiry details for sender’s card. This is an optional field
            - Value:
              - **Month**:
                - Description: Expiry month for sender’s card (MM)
                - Tags: String
              - **Year**:
                - Description: Expiry year for sender’s card (YYYY)
                - Tags: String
            - Tags: JSON Object, Optional
          - **CardSecurityCode**:
            - Description: Please populate this with the card security code if the paymentType is PAY_CARD
            - Tags: String, Optional
          - **TransactionReference**:
            - Description: Please populate this filed with the unique transaction reference number if the paymentType is UPI
            - Tags: String
        - Tags: Object
    - Tags: Object
- Tags: object

#### udf1-5:
- Description: Order level user defined field. Field can be used for analytics.
- Tags: string
## API Responses:
### 200:

#### 200 : Payout Response:
- Value:
  - **Type**:
    - Description: Payout type passed in order create request
    - Value: FULFILL_ONLY
    - Tags: String
  - **Status**:
    - Description: Relays the current status of order created at Juspay end
    - Value: READY_FOR_FULFILLMENT
    - Tags: String
  - **Orderid**:
    - Description: orderId passed during order creation
    - Value: 1703593449
    - Tags: String
  - **Fullfilments**:
    - Value:
      - **Amount**:
        - Description: Amount passed in the fulfillment block
        - Value: 1.0
        - Tags: String
      - **UpdatedBy**:
        - Description: Medium via which payout status was updated. Will be DEFAULT in response of create order
        - Value: DEFAULT
        - Tags: String
      - **UpdatedAt**:
        - Description: Timestamp at which fulfillment payload was last updated at Juspay end
        - Value: 2023-12-23T16:54:27Z
        - Tags: String
      - **Udf1-5**:
        - Description: Fulfillment level user defined fields passed in order creation request
        - Tags: String
      - **Status**:
        - Description: Relays the current status of fulfillment created at Juspay end
        - Value: CREATED
        - Tags: String
      - **PreferredMethodList**:
        - Description: Array passed during order create for preferredMethodList
        - Value: DUMMY_VISADIRECT
        - Tags: Array of Strings
      - **Id**:
        - Description: Fulfilment ID created by Juspay for fulfillment payload received in order create request
        - Value: 25cbcf3454a445789309dc0b54e681-f1
        - Tags: String
      - **StatusUpdatedAt**:
        - Description: Timestamp at which status of fulfillment was updated at Juspay end
        - Value: 2023-12-26T12:24:08Z
        - Tags: String
      - **BeneficiaryDetails**:
        - Description: Beneficiary details provided in order create by merchant
        - Tags: Object
      - **Type**:
        - Description: Payout type initiated by merchant
        - Value: ACCOUNT_IFSC | UPI_ID | PLAIN_CARD | CARD | BENE_ID | WALLET
        - Tags: String
      - **AdditionalInfo**:
        - Description: Additional Information sent by merchant in create order request
        - Tags: Object
    - Tags: Array
  - **CustomerId**:
    - Description: Customer ID passed during order creation
    - Value: cth_59Yibs1JauYP6WJP
    - Tags: String
  - **Amount**:
    - Description: Amount passed for the order
    - Value: 1.0
    - Tags: String
  - **Udf1-5**:
    - Description: Order level udfs passed in order create request
    - Tags: String
- Tags: Object
### 400:

#### error:
- Description: Boolean reflecting error in request of create order API
- Value:  true
- Tags: Boolean

#### errorCode:
- Description: Error code provided by Juspay
- Value:  E01
- Tags: String

#### errorMessage:
- Description: Error message provided by Juspay. Share this message with Juspay POC for debugging
- Value: Amount0.0 cannot be less than 1.0Amount0.0 cannot be less than 1.0
- Tags: String

#### userMessage:
- Description: Error message that will be shown on dashboard / analytics
- Tags: String
### 401:

#### error:
- Description: Boolean reflecting error in request of create order API
- Value:  true
- Tags: String

#### errorCode:
- Description: Error code provided by Juspay
- Value:  E02
- Tags: String

#### errorMessage:
- Description: Error message provided by Juspay. Share this message with Juspay POC for debugging
- Value:  Invalid API key passed in request.
- Tags: String

#### userMessage:
- Description: Error message that will be shown on dashboard / analytics
- Value:  Invalid API Key
- Tags: String, Mandatory


---

## See Also

- [Order Create](https://juspay.io/in/docs/api-reference/docs/payout/order-create)
- [Order Status](https://juspay.io/in/docs/api-reference/docs/payout/order-status)
