Skip to main content
POST
Create Order
Create a collection order and receive a checkout URL. Authenticate with HTTP Basic Auth using your API key and secret. Do not include key or hash in the request body.

Request example

amount is an integer in minor units. For INR, 10000 means INR 100.00. receipt_id is your alphanumeric order reference, and callback_url is the URL to return the customer to after checkout, not your webhook endpoint.
If your integration already sends pg_pool_id, keep the existing valid pool ID as a string. It is optional and does not change when migrating from V1 to V2.

Success response

url is Base64-encoded. Decode the returned value before redirecting the customer. The URL above is an illustrative example, not a working checkout link. order_id is Paytring’s identifier and is distinct from your receipt_id. Fetch the order using your receipt ID or the Paytring order ID. Check the fetched order_status before treating the order as paid. Creating an order does not mean the payment succeeded.

Errors

Check the response body’s status, not only the HTTP status code. Known validation and authentication errors can return HTTP 200 with status: false and an error object. Validation failures may also include field details in validation. For V1 compatibility, credential reuse, and collection webhook considerations, see Migrating collection requests from V1.

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
amount
integer<int32>
default:100
required

Integer amount in minor units, such as paise for INR. 10000 means INR 100.00.

Required range: x >= 100
receipt_id
string
required

Your alphanumeric order reference. Use at least 5 characters if you will fetch the order by receipt ID.

Required string length: 1 - 75
Example:

"DEMO202611030001"

callback_url
string<uri>
required

Customer return URL after checkout, not the collection webhook endpoint.

Maximum string length: 255
Example:

"https://merchant.example.com/payment/callback"

cname
string
default:Jhon Doe

End User/Payes Name

phone
string
default:9897969594

End Users Phone

email
string

End User Email

currency
string
default:INR

Please Get Currency Active by our team

billing_address
object
shipping_address
object
notes
object

These fields can be used for reporting

pg
string

if you pass a pg code then only that payment gateway will be used to process this transection. eg, payu

pg_pool_id
string

Optional existing gateway pool ID for your business. Reuse the same valid value when migrating from V1. Omit it to use the default pool.

tpv
object[]

add tpv info

split_settlement
object[]
split_type
enum<string>
default:percent
Available options:
"percent",
"fixed"
autocapture
string
default:true

if merchant wan't they can disable autocapture by sending false in request

Response

Inspect status. A successful create returns url and order_id. Known authentication and validation errors can also return HTTP 200 with status false and error.

status
boolean
default:true
Example:

true

url
string

Base64-encoded checkout URL. Decode the returned value before redirecting the customer.

Example:

"aHR0cHM6Ly9jaGVja291dC5leGFtcGxlLmNvbS9vcmRlci8xMTExMTExMTExMTExMTEx"

order_id
string

Paytring order ID, distinct from your receipt_id.

Example:

"1111111111111111"

error
object

Present for a handled API error when status is false.