---
page_source: https://docs.juspay.io/payout-sea/docs/integration/order-create-encrypted
page_title: Order Create [Encrypted]
---

## 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:
- 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
## 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": [
        {
            "preferredMethodList": ["DUMMY_VISADIRECT"],
            "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": [
    {
      "preferredMethodList": [
        "DUMMY_VISADIRECT"
      ],
      "amount": 1,
      "beneficiaryDetails": {
        "details": {
          "name": "Aditya Kadrolkar",
          "cardType": "CREDIT",
          "brand": "VISA",
          "bankCode": "508534",
          "cardToken": "5513651111111111"
        },
        "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"
}

```

### 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",
            "preferredMethodList": [
                "DUMMY_VISADIRECT"
            ],
            "id": "9bf34656bbb4e7096f9f9ba0f0ea17-f1",
            "fulfillmentMethodList": [],
            "createdAt": "2023-12-27T13:42:32Z",
            "beneficiaryDetails": {
                "details": {
                    "name": "Aditya Kadrolkar",
                    "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",
            "preferredMethodList": [
                "DUMMY_VISADIRECT"
            ],
            "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
- 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: 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. This is an optional param and should be used only in case of unique routing requirements
    - Tags: array
  - **Amount**:
    - Description: Amount to be processed for the particular fulfillment. Sum of all the fulfilment amount should be equal to order amount,
    - 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 beneficiary
            - 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
            - 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
          - **CardType**:
            - Description: CREDIT / DEBIT. Required for payout type CARD
            - Tags: String
          - **Vpa**:
            - Description: UPI id of beneficiary. Required for payout type UPI_ID
            - Tags: String
          - **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
            - Tags: String
          - **CardToken**:
            - Description: Value of actual card token to be passed. Required for payout type PLAIN_CARD
            - Tags: String
          - **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
          - **CardSecurityCode**:
            - Description: CVV for users card. This will be used for creation of alt ID for PLAIN_CARD transactions where merchant is passing non-tokenized card details
            - 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
      - **UseThisAsTR**:
        - Description: Merchants can use this field to pass custom transaction reference for the attempt
        - Tags: String
      - **ScheduleTime**:
        - Description: Time at which fulfillment should be attempted by Juspay
        - Tags: String
      - **AttemptThreshold**:
        - Description: Merchants can use this field to set custom attempt threshold for an order
        - Tags: Integer
      - **IsRetriable**:
        - Description: Merchants can pass true / false depending upon whether order should be retried on technical failure. Applicable only for PLAIN_CARD
        - Tags: Boolean
      - **WebhookDetails**:
        - Description: Merchants can provide dynamic webhook URL for the order if required
        - 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
      - **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
      - **SenderName**:
        - Description: Name of sender paying the credit card bill. Applicable only for Visa Direct / Mastercard Send rails for Credit Card Bill Payments
        - Tags: String
    - Tags: Object
  - **SenderDetails**:
    - 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: String
- 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
