Pay-ins
Generated from the OpenAPI document, API version 2026-12-01. Money is always a decimal string with a currency code.
- POST
/v1/payinsCreate a pay-in - GET
/v1/payinsList pay-ins - GET
/v1/payins/{id}Retrieve a pay-in - POST
/v1/payins/{id}/cancelCancel a pending pay-in - POST
/v1/payins/{id}/referenceSubmit the customer's payment reference (UTR) for a desk pay-in
Create a pay-in
POST /v1/payins
- Scope:
payins:write Idempotency-Keyrequired — use your own id- SDK:
createPayin() - Success: HTTP 201
Body
| Field | Type | Required | Notes |
|---|---|---|---|
merchant_order_id | string | yes | pattern ^[A-Za-z0-9_.:-]{1,64}$ |
amount | money string | yes | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
currency | enum | yes | one of INR USDT |
method | enum | yes | one of upi bank_transfer usdt_trc20 usdt_bep20 auto |
customer | object | yes | |
customer.ref | string | yes | pattern ^[A-Za-z0-9_.:-]{1,64}$ |
customer.name | string | at most 100 characters | |
customer.phone | string | pattern ^\+?[0-9]{6,15}$ | |
customer.ip | IPv4 address or IPv6 address | ||
return_url | URL | at most 2048 characters | |
expires_in | integer | min 60; max 86400 | |
metadata | map | default {} |
Example
const result = await nicepay.createPayin({
"merchant_order_id": "merchant-order-id-1",
"amount": "10000.00",
"currency": "INR",
"method": "upi",
"customer": {
"ref": "ref-1"
}
}, { idempotencyKey: "your-own-id" });$result = $nicepay->createPayin([
'merchant_order_id' => 'merchant-order-id-1',
'amount' => '10000.00',
'currency' => 'INR',
'method' => 'upi',
'customer' => [
'ref' => 'ref-1',
],
], ['idempotency_key' => 'your-own-id']);Response — the Payin object
| Field | Type | Notes |
|---|---|---|
id | string | |
object | "payin" | |
livemode | boolean | |
merchant_order_id | string | null | |
amount | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
amount_received | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
currency | enum | one of INR USDT |
status | enum | one of pending processing succeeded failed expired cancelled |
late | boolean | |
method | enum | one of upi bank_transfer usdt_trc20 usdt_bep20 auto |
rail | string | |
checkout_url | string | null | |
instructions | object | |
instructions.type | enum | one of redirect upi_qr bank_details crypto_address simulated |
transfers | array of object | |
transfers[].tx_hash | string | |
transfers[].log_index | integer | |
transfers[].amount | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
transfers[].status | string | |
transfers[].block_time | timestamp | |
fee | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
net_amount | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
reversed_at | timestamp or null | may be null |
reversed_amount | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
customer | object | |
customer.ref | string | null | |
expires_at | timestamp | |
created_at | timestamp | |
metadata | map |
Example response
{
"id": "pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3",
"object": "payin",
"livemode": true,
"merchant_order_id": "merchant_order_id",
"amount": "10000.00",
"amount_received": "10000.00",
"currency": "INR",
"status": "pending",
"late": true,
"method": "upi",
"rail": "rail",
"checkout_url": "checkout_url",
"instructions": {
"type": "redirect"
},
"fee": "10000.00",
"net_amount": "10000.00",
"reversed_at": "2026-11-23T10:00:00.000Z",
"reversed_amount": "10000.00",
"customer": {
"ref": "ref"
},
"expires_at": "2026-11-23T10:00:00.000Z",
"created_at": "2026-11-23T10:00:00.000Z",
"metadata": {}
}List pay-ins
GET /v1/payins
- Scope:
payins:read - SDK:
listPayins() - Success: HTTP 200
Query
| Field | Type | Notes |
|---|---|---|
limit | integer | min 1; max 100; default 20 |
starting_after | string | at most 40 characters |
ending_before | string | at most 40 characters |
merchant_order_id | string | pattern ^[A-Za-z0-9_.:-]{1,64}$ |
status | enum | one of pending processing succeeded failed expired cancelled |
Example
const result = await nicepay.listPayins();$result = $nicepay->listPayins();Response — a list of Payin objects
| Field | Type | Notes |
|---|---|---|
object | "list" | |
data | array of object | |
data[].id | string | |
data[].object | "payin" | |
data[].livemode | boolean | |
data[].merchant_order_id | string | null | |
data[].amount | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
data[].amount_received | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
data[].currency | enum | one of INR USDT |
data[].status | enum | one of pending processing succeeded failed expired cancelled |
data[].late | boolean | |
data[].method | enum | one of upi bank_transfer usdt_trc20 usdt_bep20 auto |
data[].rail | string | |
data[].checkout_url | string | null | |
data[].instructions | object | |
data[].instructions.type | enum | one of redirect upi_qr bank_details crypto_address simulated |
data[].transfers | array of object | |
data[].transfers[].tx_hash | string | |
data[].transfers[].log_index | integer | |
data[].transfers[].amount | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
data[].transfers[].status | string | |
data[].transfers[].block_time | timestamp | |
data[].fee | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
data[].net_amount | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
data[].reversed_at | timestamp or null | may be null |
data[].reversed_amount | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
data[].customer | object | |
data[].customer.ref | string | null | |
data[].expires_at | timestamp | |
data[].created_at | timestamp | |
data[].metadata | map | |
has_more | boolean |
Example response
{
"object": "list",
"data": [
{
"id": "pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3",
"object": "payin",
"livemode": true,
"merchant_order_id": "merchant_order_id",
"amount": "10000.00",
"amount_received": "10000.00",
"currency": "INR",
"status": "pending",
"late": true,
"method": "upi",
"rail": "rail",
"checkout_url": "checkout_url",
"instructions": {
"type": "redirect"
},
"fee": "10000.00",
"net_amount": "10000.00",
"reversed_at": "2026-11-23T10:00:00.000Z",
"reversed_amount": "10000.00",
"customer": {
"ref": "ref"
},
"expires_at": "2026-11-23T10:00:00.000Z",
"created_at": "2026-11-23T10:00:00.000Z",
"metadata": {}
}
],
"has_more": true
}Retrieve a pay-in
GET /v1/payins/{id}
- Scope:
payins:read - SDK:
getPayin() - Success: HTTP 200
Path
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Example
const result = await nicepay.getPayin("pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3");$result = $nicepay->getPayin('pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3');Response — the Payin object
| Field | Type | Notes |
|---|---|---|
id | string | |
object | "payin" | |
livemode | boolean | |
merchant_order_id | string | null | |
amount | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
amount_received | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
currency | enum | one of INR USDT |
status | enum | one of pending processing succeeded failed expired cancelled |
late | boolean | |
method | enum | one of upi bank_transfer usdt_trc20 usdt_bep20 auto |
rail | string | |
checkout_url | string | null | |
instructions | object | |
instructions.type | enum | one of redirect upi_qr bank_details crypto_address simulated |
transfers | array of object | |
transfers[].tx_hash | string | |
transfers[].log_index | integer | |
transfers[].amount | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
transfers[].status | string | |
transfers[].block_time | timestamp | |
fee | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
net_amount | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
reversed_at | timestamp or null | may be null |
reversed_amount | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
customer | object | |
customer.ref | string | null | |
expires_at | timestamp | |
created_at | timestamp | |
metadata | map |
Example response
{
"id": "pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3",
"object": "payin",
"livemode": true,
"merchant_order_id": "merchant_order_id",
"amount": "10000.00",
"amount_received": "10000.00",
"currency": "INR",
"status": "pending",
"late": true,
"method": "upi",
"rail": "rail",
"checkout_url": "checkout_url",
"instructions": {
"type": "redirect"
},
"fee": "10000.00",
"net_amount": "10000.00",
"reversed_at": "2026-11-23T10:00:00.000Z",
"reversed_amount": "10000.00",
"customer": {
"ref": "ref"
},
"expires_at": "2026-11-23T10:00:00.000Z",
"created_at": "2026-11-23T10:00:00.000Z",
"metadata": {}
}Cancel a pending pay-in
POST /v1/payins/{id}/cancel
- Scope:
payins:write - SDK:
cancelPayin() - Success: HTTP 200
Path
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Example
const result = await nicepay.cancelPayin("pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3");$result = $nicepay->cancelPayin('pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3');Response — the Payin object
| Field | Type | Notes |
|---|---|---|
id | string | |
object | "payin" | |
livemode | boolean | |
merchant_order_id | string | null | |
amount | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
amount_received | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
currency | enum | one of INR USDT |
status | enum | one of pending processing succeeded failed expired cancelled |
late | boolean | |
method | enum | one of upi bank_transfer usdt_trc20 usdt_bep20 auto |
rail | string | |
checkout_url | string | null | |
instructions | object | |
instructions.type | enum | one of redirect upi_qr bank_details crypto_address simulated |
transfers | array of object | |
transfers[].tx_hash | string | |
transfers[].log_index | integer | |
transfers[].amount | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
transfers[].status | string | |
transfers[].block_time | timestamp | |
fee | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
net_amount | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
reversed_at | timestamp or null | may be null |
reversed_amount | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
customer | object | |
customer.ref | string | null | |
expires_at | timestamp | |
created_at | timestamp | |
metadata | map |
Example response
{
"id": "pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3",
"object": "payin",
"livemode": true,
"merchant_order_id": "merchant_order_id",
"amount": "10000.00",
"amount_received": "10000.00",
"currency": "INR",
"status": "pending",
"late": true,
"method": "upi",
"rail": "rail",
"checkout_url": "checkout_url",
"instructions": {
"type": "redirect"
},
"fee": "10000.00",
"net_amount": "10000.00",
"reversed_at": "2026-11-23T10:00:00.000Z",
"reversed_amount": "10000.00",
"customer": {
"ref": "ref"
},
"expires_at": "2026-11-23T10:00:00.000Z",
"created_at": "2026-11-23T10:00:00.000Z",
"metadata": {}
}Submit the customer's payment reference (UTR) for a desk pay-in
POST /v1/payins/{id}/reference
- Scope:
payins:write - SDK:
submitPayinReference() - Success: HTTP 200
Path
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Body
| Field | Type | Required | Notes |
|---|---|---|---|
reference | string | yes | at most 64 characters |
Example
const result = await nicepay.submitPayinReference("pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3", {
"reference": "reference"
});$result = $nicepay->submitPayinReference('pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3', [
'reference' => 'reference',
]);Response — the Payin object
| Field | Type | Notes |
|---|---|---|
id | string | |
object | "payin" | |
livemode | boolean | |
merchant_order_id | string | null | |
amount | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
amount_received | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
currency | enum | one of INR USDT |
status | enum | one of pending processing succeeded failed expired cancelled |
late | boolean | |
method | enum | one of upi bank_transfer usdt_trc20 usdt_bep20 auto |
rail | string | |
checkout_url | string | null | |
instructions | object | |
instructions.type | enum | one of redirect upi_qr bank_details crypto_address simulated |
transfers | array of object | |
transfers[].tx_hash | string | |
transfers[].log_index | integer | |
transfers[].amount | money string | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00" |
transfers[].status | string | |
transfers[].block_time | timestamp | |
fee | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
net_amount | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
reversed_at | timestamp or null | may be null |
reversed_amount | money string or null | decimal string with its currency's decimal places (INR 2, USDT 6), e.g. "10000.00"; may be null |
customer | object | |
customer.ref | string | null | |
expires_at | timestamp | |
created_at | timestamp | |
metadata | map |
Example response
{
"id": "pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3",
"object": "payin",
"livemode": true,
"merchant_order_id": "merchant_order_id",
"amount": "10000.00",
"amount_received": "10000.00",
"currency": "INR",
"status": "pending",
"late": true,
"method": "upi",
"rail": "rail",
"checkout_url": "checkout_url",
"instructions": {
"type": "redirect"
},
"fee": "10000.00",
"net_amount": "10000.00",
"reversed_at": "2026-11-23T10:00:00.000Z",
"reversed_amount": "10000.00",
"customer": {
"ref": "ref"
},
"expires_at": "2026-11-23T10:00:00.000Z",
"created_at": "2026-11-23T10:00:00.000Z",
"metadata": {}
}