POST
/
api
/
v2
/
order
/
create
curl --request POST \
  --url https://api.paytring.com/api/v2/order/create \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "test_123",
  "amount": 100,
  "cname": "Jhon Doe",
  "phone": "9897969594",
  "receipt_id": "xx00011",
  "callback_url": "https://httpbin.org/post",
  "hash": "<string>",
  "email": "<string>",
  "currency": "INR",
  "billing_address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "zipcode": 123,
    "country": "<string>",
    "phone": "<string>",
    "firstname": "<string>",
    "lastname": "<string>"
  },
  "shipping_address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "zipcode": 123,
    "country": "<string>",
    "phone": "<string>",
    "firstname": "<string>",
    "lastname": "<string>"
  },
  "notes": {
    "udf1": "<string>",
    "udf2": "<string>",
    "udf3": "<string>",
    "udf4": "<string>",
    "udf5": "<string>"
  },
  "pg": "<string>",
  "pg_pool_id": "<string>",
  "tpv": [
    {
      "account_number": "<string>",
      "name": "<string>",
      "ifsc": "<string>"
    }
  ],
  "split_settlement": [
    {
      "vendor_id": "<string>",
      "amount": "<string>"
    }
  ],
  "split_type": "percent",
  "autocapture": "true"
}'
"{\n  \"status\": true,\n  \"url\": \"aHR0cHM6Ly91YXQubWNzYW0uaW4vcGVnYXN1cy9hc0b2tlbi80ODg2NDUxNjAxODQzMTYwMTE=\",\n  \"order_id\": \"48864xxxxxxxxxx\"\n}"

This API is used to initiate a payment request for a specific order.

Request Body

{
  "email": "string", // End User Email
  "callback_url": "https://httpbin.org/post", // Default callback URL
  "currency": "INR", // Default currency
  "pg": "string", // Payment gateway code (optional)
  "pg_pool_id": "string", // Payment gateway pool ID (optional)
  "hash": "string" // Calculated hash for request validation
}

Responses

200 OK

{
  "status": true,
  "order_id": "string",
  "message": "Order created successfully"
}

400 Bad Request

{
  "status": false,
  "error": {
    "message": "Invalid request",
    "code": 400
  }
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Response

200
application/json

200

The response is of type object.