Skip to content
SprintPay
API Reference
API Reference v1.6

SprintPay Payments API

Full REST API reference for the SprintPay payments platform — customers, orders, payments, refunds, payouts, webhooks and more.

Base URL (Production)

https://api.sprintpay.io

Content-Type

application/json

Authentication

All API requests require two header credentials. These are applied to every endpoint without exception.

HeaderTypeRequiredDescription
X-API-KEYStringRequiredYour API key for authentication.
X-API-SECRETStringRequiredYour API secret for authentication. Also used as the HMAC-SHA256 signing key.
Example Headers
X-API-KEY: your_api_key_here
X-API-SECRET: your_api_secret_here
Content-Type: application/json
POST/customer/create

Create Customer

Creates a new customer profile. Returns the details of the newly created customer, including the system-assigned customer ID.

Notes

  • merchantCustomerId must be unique per customer.

Request Body

FieldTypeRequiredDescription
firstNameStringRequiredCustomer's first name.
lastNameStringRequiredCustomer's last name.
customerEmailStringRequiredCustomer's email address.
countryCodeStringRequiredISO 2-letter country code (e.g. IN, US).
residenceCountryStringOptionalISO 2-letter residence country code.
birthDateStringRequiredDate of birth in YYYY-MM-DD format.
merchantCustomerIdStringRequiredYour unique identifier for this customer. Must be unique.
phoneNoStringRequiredCustomer's phone number (min 10 digits).
address1StringOptionalPrimary address line.
address2StringOptionalSecondary address line.
cityStringOptionalCity.
stateCodeStringOptionalState code (2 characters).
zipCodeStringOptionalPostal or ZIP code.
Example RequestJSON
{
  "data": {
    "firstName": "Sridhar",
    "lastName": "Sethuraman",
    "customerEmail": "sridhar@example.com",
    "countryCode": "US",
    "residenceCountry": "US",
    "birthDate": "1985-06-15",
    "merchantCustomerId": "CUST-001",
    "phoneNo": "14155552671",
    "address1": "123 Market Street",
    "city": "San Francisco",
    "stateCode": "CA",
    "zipCode": "94105"
  }
}
Success Response200 OK
{
  "data": {
    "customerId": "dcc5c2a8-1151-4f39-921a-8ce6058e64ab",
    "firstName": "Sridhar",
    "lastName": "Sethuraman",
    "customerEmail": "sridhar@example.com",
    "phoneNo": "14155552671",
    "countryCode": "US",
    "merchantCustomerId": "CUST-001"
  },
  "errorMessage": "Success",
  "errorData": null
}
POST/customer/update-address

Update Customer Address

Updates the address fields (address1, address2, city, stateCode, zipCode) for an existing customer.

Request Body

FieldTypeRequiredDescription
customerIdStringRequiredThe system-issued customer ID.
address1StringRequiredPrimary address line.
address2StringRequiredSecondary address line.
cityStringRequiredCity.
stateCodeStringRequiredState code (2 characters).
zipCodeStringRequiredPostal or ZIP code.
Success Response200 OK
{
  "data": null,
  "errorMessage": "Success",
  "errorData": null
}
GET/customer/{customerId}

Get Customer

Fetches the complete details of a specific customer by their system-issued ID.

Path Parameters

FieldTypeRequiredDescription
customerIdStringRequiredUnique system ID of the customer.
Success Response200 OK
{
  "data": {
    "customerId": "dcc5c2a8-1151-4f39-921a-8ce6058e64ab",
    "firstName": "Sridhar",
    "lastName": "Sethuraman",
    "customerEmail": "sridhar@example.com",
    "phoneNo": "14155552671",
    "countryCode": "US",
    "residenceCountry": "US",
    "birthDate": "1985-06-15",
    "merchantCustomerId": "CUST-001",
    "address1": "123 Market Street",
    "city": "San Francisco",
    "stateCode": "CA",
    "zipCode": "94105"
  },
  "errorMessage": "Success",
  "errorData": null
}
GET/customer

List Customers

Fetches a paginated list of customers.

Query Parameters

FieldTypeRequiredDescription
pageIntegerRequiredPage number to retrieve (starts at 1).
sizeIntegerRequiredNumber of records to return per page.
Success Response200 OK
{
  "data": {
    "totalPages": 1,
    "totalElements": 7,
    "size": 50,
    "customerList": [
      {
        "customerId": "51a8561f-77e4-458d-be43-171b910297cc",
        "firstName": "Sridhar",
        "lastName": "Sethuraman",
        "customerEmail": "sridhar@example.com",
        "phoneNo": "14155552671",
        "countryCode": "US",
        "merchantCustomerId": "CUST-001"
      }
    ]
  },
  "errorMessage": "Success",
  "errorData": null
}
POST/api/order

Create Order

Creates a new order. Returns a checkout URL and order ID. The customer is redirected to the checkout URL to complete payment.

Notes

  • merchantRef must be unique per order.
  • All monetary fields (amount, discountValue, shippingValue, taxValue) must be positive numbers.

Request Body

FieldTypeRequiredDescription
amountDecimalRequiredTotal order amount.
currencyStringRequiredCurrency code (e.g. "INR", "USD").
merchantRefStringRequiredYour unique reference/order ID.
discountValueDecimalOptionalDiscount applied to the order.
shippingValueDecimalOptionalShipping charges.
taxValueDecimalOptionalTax applied to the order.
notesStringRequiredCustomer-facing notes.
callbackUrlStringOptionalURL to redirect customer after transaction. If omitted, stays on our page.
clientIpStringRequiredIP address of the client initiating the request.
customerIdStringRequiredCustomer ID from Create Customer.
Example RequestJSON
{
  "amount": 1200.50,
  "currency": "INR",
  "merchantRef": "ORD-20250609-001",
  "discountValue": 100.00,
  "shippingValue": 50.00,
  "taxValue": 18.00,
  "notes": "Order for SprintPay demo",
  "callbackUrl": "https://yoursite.com/payment/callback",
  "clientIp": "192.168.1.1",
  "customerId": "7e5b6ac5-27c2-4710-b8b8-5a17a361a5b9"
}
Success Response200 OK
{
  "data": {
    "orderId": "ac7859aa-8967-4551-bab0-1f03d01c5af4",
    "checkoutUrl": "https://api.sprintpay.io/order/payment-checkout/ac7859aa-8967-4551-bab0-1f03d01c5af4",
    "orderStatus": "PENDING"
  },
  "errorMessage": "Success",
  "errorData": null
}
Error Response400 / 404
{
  "data": null,
  "errorMessage": "Failed",
  "errorData": [
    {
      "errorCode": 3014,
      "fieldName": "currency",
      "errorDescription": "Currency is required when Order ID is not provided"
    }
  ]
}
GET/api/payment/payment-methods

Get Available Payment Methods

Returns available payment methods based on the transaction amount and currency.

Query Parameters

FieldTypeRequiredDescription
amountDecimalRequiredTransaction amount used to filter eligible methods.
currencyStringRequiredCurrency code (e.g. "INR").
Success Response200 OK
{
  "data": {
    "paymentMethods": [
      {
        "value": "UPI",
        "displayValue": "UPI",
        "minAmount": 50.00,
        "maxAmount": 100000.00
      },
      {
        "value": "UPI_SEAMLESS",
        "displayValue": "UPI Seamless",
        "minAmount": 50.00,
        "maxAmount": 100000.00
      },
      {
        "value": "CARD",
        "displayValue": "Card",
        "minAmount": 1.00,
        "maxAmount": 50000.00
      }
    ]
  },
  "errorMessage": "Success",
  "errorData": null
}
GET/api/order

List Orders

Fetches orders filtered by date range and status.

Query Parameters

FieldTypeRequiredDescription
startDateStringRequiredStart date in YYYY-MM-DD format.
endDateStringRequiredEnd date in YYYY-MM-DD format.
statusStringRequiredPENDING · COMPLETED · FAILED · REFUNDED · CANCELED · EXPIRED · PARTIALLY_REFUNDED
Success Response200 OK
{
  "data": {
    "totalPages": 1,
    "totalElements": 2,
    "size": 10,
    "orderList": [
      {
        "orderId": "46eed875-82ba-42b1-9ac7-bd0e394ca69a",
        "amount": 1200.50,
        "currency": "INR",
        "orderStatus": "PENDING",
        "merchantOrderRef": "ORD-20250609-001",
        "customerName": "Sridhar Sethuraman",
        "createdOn": "2025-06-09T10:00:00",
        "expiredAt": "2025-06-09T10:20:00"
      }
    ]
  },
  "errorMessage": "Success",
  "errorData": null
}
GET/api/order/{orderId}

Get Order Details

Fetches the complete details of a specific order.

Path Parameters

FieldTypeRequiredDescription
orderIdStringRequiredUnique ID of the order.
Success Response200 OK
{
  "data": {
    "orderId": "f3b6fe94-336e-441c-80ea-a26fcfd4dd46",
    "amount": 500.00,
    "currency": "INR",
    "expiredAt": "2025-04-30T23:59:59",
    "discountValue": 50,
    "taxValue": 18,
    "shippingCharges": 20,
    "merchantOrderRef": "ORD-20250430-1234",
    "customerName": "Sridhar Sethuraman",
    "orderStatus": "PENDING",
    "createdOn": "2025-04-30T10:00:00",
    "items": [
      { "itemId": "item-1234", "name": "Product 1", "quantity": 2, "price": 250.00 }
    ]
  },
  "errorMessage": "Success",
  "errorData": null
}
Error Response400 / 404
{
  "data": null,
  "errorMessage": "Failed",
  "errorData": [
    { "errorCode": 3014, "fieldName": null, "errorDescription": "Order not found" }
  ]
}
GET/api/order/cancel/{orderId}

Cancel Order

Cancels an existing order. Sets orderStatus to CANCELED, checkoutUrl becomes null, and the order can no longer be used for payment.

Notes

  • Completed or expired orders cannot be cancelled (error 5014).

Path Parameters

FieldTypeRequiredDescription
orderIdStringRequiredUnique ID of the order to cancel.
Success Response200 OK
{
  "data": {
    "orderId": "d3369d56-49d1-443a-a9c6-f471d43e19c4",
    "checkoutUrl": null,
    "orderStatus": "CANCELED"
  },
  "errorMessage": "Success",
  "errorData": null
}
POST/api/payment

Initiate Payment — UPI

Initiates a UPI payment. Can create a new payment directly or use an existing orderId. Returns a redirectUrl for the customer to complete payment.

Notes

  • If orderId is provided, only paymentMethod is required.
  • If orderId is not provided, all payment details are mandatory.
  • For UPI_SEAMLESS: the redirectUrl contains AES-256-CBC encrypted data — decrypt to get the QR/UPI link.
  • Payment status starts as PENDING until completed.

Request Body

FieldTypeRequiredDescription
amountDecimalRequiredAmount to pay.
currencyStringRequiredCurrency code (e.g. "INR").
merchantRefStringRequiredYour unique reference ID.
notesStringRequiredPayment notes.
paymentMethodStringRequired"UPI" or "UPI_SEAMLESS". For UPI_SEAMLESS the redirectUrl is encrypted.
callbackUrlStringOptionalRedirect URL after transaction.
clientIpStringRequiredIP address of the initiating client.
customerIdStringRequiredSystem-issued customer ID.

Request Body — With orderId (minimal)

FieldTypeRequiredDescription
orderIdStringRequiredExisting order ID.
paymentMethodStringRequired"UPI" or "UPI_SEAMLESS".
Example RequestJSON
{
  "amount": 220,
  "paymentMethod": "UPI",
  "currency": "INR",
  "merchantRef": "PAY-20250609-001",
  "discountValue": 0,
  "shippingValue": 0,
  "taxValue": 0,
  "clientIp": "192.168.1.1",
  "callbackUrl": "https://yoursite.com/payment/callback",
  "notes": "Invoice #INV-001",
  "customerId": "5bfa8217-1a0c-473b-886f-3935de8fbf5f"
}
Success Response200 OK
{
  "data": {
    "paymentId": "6d66761c-f3d9-465e-a127-b30cbeddbbf3",
    "isRedirectRequired": true,
    "redirectUrl": "https://api.sprintpay.io/payment/6d66761c-f3d9-465e-a127-b30cbeddbbf3",
    "paymentMethod": "UPI",
    "status": "PENDING",
    "merchantRef": "PAY-20250609-001"
  },
  "errorMessage": "Success",
  "errorData": null
}
Error Response400 / 404
{
  "data": null,
  "errorMessage": "Failed",
  "errorData": [
    { "errorCodes": 3022, "fieldName": "notes", "errorDescription": "Notes is required" }
  ]
}
POST/api/payment

Initiate Payment — Card

Initiates a card payment. Same endpoint as UPI payment — pass paymentMethod: "CARD" and include the cardData object.

Notes

  • Card number must be 16 digits.
  • Expiry date must be in MM/YY format.
  • CVV must be exactly 3 digits.

Request Body

FieldTypeRequiredDescription
amountDecimalRequiredAmount to pay.
currencyStringRequiredCurrency code (e.g. "EUR", "USD").
merchantRefStringRequiredYour unique reference ID.
notesStringRequiredPayment notes.
paymentMethodStringRequired"CARD"
callbackUrlStringOptionalRedirect URL after transaction.
clientIpStringRequiredIP address of the initiating client.
customerIdStringRequiredSystem-issued customer ID.
cardData.cardNumberStringRequired16-digit card number.
cardData.cardholderNameStringRequiredName on the card.
cardData.expiryDateStringRequiredCard expiry in MM/YY format.
cardData.cvvStringRequired3-digit CVV security code.
Example RequestJSON
{
  "amount": 220,
  "paymentMethod": "CARD",
  "currency": "EUR",
  "merchantRef": "PAY-20250609-002",
  "notes": "Invoice #INV-002",
  "clientIp": "192.168.1.1",
  "customerId": "5bfa8217-1a0c-473b-886f-3935de8fbf5f",
  "cardData": {
    "cardNumber": "4444333322221111",
    "cardholderName": "Sridhar Sethuraman",
    "expiryDate": "08/29",
    "cvv": "345"
  }
}
Success Response200 OK
{
  "data": {
    "paymentId": "ea5b0a18-56be-4c2d-82c7-0937921e8aeb",
    "isRedirectRequired": true,
    "redirectUrl": "https://api.sprintpay.io/payment/ea5b0a18-56be-4c2d-82c7-0937921e8aeb",
    "paymentMethod": "CARD",
    "status": "PENDING",
    "merchantRef": "PAY-20250609-002"
  },
  "errorMessage": "Success",
  "errorData": null
}
GET/api/transaction

Get Transaction List

Returns a paginated list of transactions. All parameters are optional — if none provided, all transactions are returned with default pagination.

Notes

  • transactionStatus can be: PENDING, COMPLETED, FAILED, REFUNDED, CANCELLED, EXPIRED, PARTIALLY_REFUNDED.
  • settlementStatus will be null until the transaction is settled.

Query Parameters

FieldTypeRequiredDescription
pageIntegerOptionalPage number (default: 1).
sizeIntegerOptionalItems per page (default: 10).
currencyStringOptionalCurrency filter (e.g. "INR").
startDateDateOptionalStart date filter (YYYY-MM-DD).
endDateDateOptionalEnd date filter (YYYY-MM-DD).
Success Response200 OK
{
  "data": {
    "totalPages": 3,
    "totalElements": 21,
    "size": 10,
    "transactionList": [
      {
        "amount": 220,
        "currency": "INR",
        "paymentMethod": "UPI",
        "paymentId": "3ba28f88-cd15-42b3-9b25-ca67541017c4",
        "transactionDate": "2025-06-09T10:17:57",
        "txCharge": 0,
        "txChargeType": "FIXED_RATE",
        "settlementStatus": null,
        "transactionStatus": "COMPLETED",
        "customerName": "Sridhar Sethuraman"
      }
    ]
  },
  "errorCode": 0,
  "errorMessage": "Success",
  "errorData": null
}
GET/api/transaction/{paymentId}

Get Transaction Detail

Fetches details of a single transaction. If the transaction is linked to an order, orderDto will contain order details; otherwise it is null.

Path Parameters

FieldTypeRequiredDescription
paymentIdStringRequiredUnique identifier of the transaction.
Success Response200 OK
{
  "data": {
    "amount": 222,
    "currency": "INR",
    "paymentMethod": "UPI",
    "clientRef": "82f330ca-fb80-4420-838a-f5b54a4de06f",
    "transactionDate": "2025-06-09T14:56:10",
    "txCharge": 22.2,
    "txChargeType": "PERCENTAGE",
    "settlementStatus": "PENDING",
    "transactionStatus": "COMPLETED",
    "orderDto": null
  },
  "errorCode": 0,
  "errorMessage": "Success",
  "errorData": null
}
GET/api/payment/cancel/{paymentId}

Cancel Payment

Cancels an existing payment. Only PENDING payments can be cancelled.

Path Parameters

FieldTypeRequiredDescription
paymentIdUUIDRequiredUnique identifier of the payment.
Success Response200 OK
{
  "data": {
    "transactionStatus": "CANCELLED",
    "paymentId": "5e262225-cd12-4202-a6ff-a3087546a307",
    "merchantOrderRef": "ORD-20250609-001"
  },
  "errorMessage": "Success",
  "errorData": null
}
POST/api/refund

Create Refund

Initiates a refund for a completed payment. refundStatus starts as PENDING.

Notes

  • paymentId must reference a successfully completed payment.
  • Refund amount cannot exceed the available refundable balance.

Request Body

FieldTypeRequiredDescription
amountDecimalRequiredAmount to refund.
paymentIdUUIDRequiredPayment ID for which refund is requested.
notesStringOptionalAdditional information about the refund.
merchantRefStringRequiredYour reference ID.
reasonStringRequiredPRODUCT_DEFECT · WRONG_ITEM_SHIPPED · LATE_DELIVERY · CUSTOMER_CHANGE_MIND · DUPLICATE_ORDER · CANCELLED_ORDER · PRICE_MISMATCH · RETURNED_DAMAGED · UNSATISFIED_WITH_PRODUCT · OTHER
Success Response200 OK
{
  "data": {
    "refundId": "210b5687-9d7f-4b37-b7cc-38fedf7f6457",
    "merchantRef": "REF-001",
    "refundStatus": "PENDING"
  },
  "errorMessage": "Success",
  "errorData": null
}
GET/api/refund

List Refunds

Retrieves a paginated list of all refunds for the merchant.

Query Parameters

FieldTypeRequiredDescription
pageIntegerOptionalPage number.
sizeIntegerOptionalItems per page.
currencyStringOptionalCurrency filter.
Success Response200 OK
{
  "data": {
    "totalPages": 1,
    "totalElements": 2,
    "size": 10,
    "refundList": [
      {
        "amount": 5,
        "currency": "INR",
        "paymentId": "434f0bcd-3ea4-4c55-84a1-2770fbed3b2c",
        "refundId": "25ff3058-31bd-42ba-96a5-deb74347561b",
        "merchantOrderRef": "ORD-001",
        "reason": "OTHER",
        "refundStatus": "REFUNDED"
      }
    ]
  },
  "errorMessage": "Success",
  "errorData": null
}
GET/api/refund/{refundId}

Get Refund Details

Retrieves detailed information about a specific refund.

Path Parameters

FieldTypeRequiredDescription
refundIdStringRequiredUnique ID of the refund.
Success Response200 OK
{
  "data": {
    "amount": 5,
    "currency": "INR",
    "paymentId": "434f0bcd-3ea4-4c55-84a1-2770fbed3b2c",
    "refundId": "25ff3058-31bd-42ba-96a5-deb74347561b",
    "merchantOrderRef": "ORD-001",
    "notes": "Product returned",
    "reason": "OTHER",
    "refundStatus": "REFUNDED"
  },
  "errorMessage": "Success",
  "errorData": null
}
POST/api/beneficiaries

Add Beneficiary

Adds a bank account beneficiary for payouts.

Request Body

FieldTypeRequiredDescription
accountNumberTypeStringRequiredAccount type (e.g. "ACCOUNT_NUMBER").
accountNumberStringRequiredBank account number (6–20 characters, alphanumeric only).
routingTypeStringRequiredRouting type (e.g. "IFSC").
routingCodeStringRequired11-character routing/IFSC code.
firstNameStringRequiredAccount holder first name.
lastNameStringRequiredAccount holder last name.
emailStringRequiredValid email address for reference.
phoneStringRequiredValid phone number for reference.
bankNameStringRequiredName of the bank.
Example RequestJSON
{
  "accountNumberType": "ACCOUNT_NUMBER",
  "accountNumber": "123456789012",
  "routingType": "IFSC",
  "routingCode": "SBIN0000123",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "phone": "1234567890",
  "bankName": "State Bank of India"
}
Success Response200 OK
{
  "data": {
    "id": "d7ff29e9-2a22-4ed0-bf16-ee11308428c6"
  },
  "errorMessage": "Success",
  "errorData": null
}
POST/api/beneficiaries/{id}

Update Beneficiary

Updates an existing beneficiary's contact details.

Path Parameters

FieldTypeRequiredDescription
idStringRequiredUnique ID of the beneficiary.

Request Body

FieldTypeRequiredDescription
firstNameStringRequiredUpdated first name.
lastNameStringRequiredUpdated last name.
emailStringRequiredUpdated email address.
phoneStringRequiredUpdated phone number.
bankNameStringRequiredUpdated bank name.
Success Response200 OK
{
  "data": { "id": "d7ff29e9-2a22-4ed0-bf16-ee11308428c6" },
  "errorMessage": "Success",
  "errorData": null
}
GET/api/beneficiaries

List Beneficiaries

Fetches a list of beneficiaries within a date range.

Query Parameters

FieldTypeRequiredDescription
startDateStringRequiredStart date (YYYY-MM-DD).
endDateStringRequiredEnd date (YYYY-MM-DD).
Success Response200 OK
{
  "data": {
    "totalPages": 1,
    "totalElements": 4,
    "size": 10,
    "beneficiaryList": [
      {
        "id": "1842e3a9-42e2-49b6-b146-c694a5e92b6d",
        "accountNumberType": "ACCOUNT_NUMBER",
        "accountNumber": "123456789012",
        "routingType": "IFSC",
        "routingCode": "SBIN0000123",
        "firstName": "John",
        "lastName": "Doe",
        "email": "john.doe@example.com",
        "phone": "1234567890",
        "bankName": "State Bank of India"
      }
    ]
  },
  "errorMessage": "Success",
  "errorData": null
}
GET/api/beneficiaries/{id}

Get Beneficiary

Fetches complete details of a specific beneficiary.

Path Parameters

FieldTypeRequiredDescription
idStringRequiredUnique ID of the beneficiary.
Success Response200 OK
{
  "data": {
    "id": "d7ff29e9-2a22-4ed0-bf16-ee11308428c6",
    "accountNumberType": "ACCOUNT_NUMBER",
    "accountNumber": "123455674879012",
    "routingType": "IFSC",
    "routingCode": "SBIN0000123",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "phone": "1234567890",
    "bankName": "State Bank of India"
  },
  "errorMessage": "Success",
  "errorData": null
}
POST/api/payout

Initiate Payout

Initiates a new payout to a beneficiary using their beneficiaryId.

Request Body

FieldTypeRequiredDescription
amountDecimalRequiredAmount to pay out.
currencyStringRequiredCurrency code (e.g. "INR").
countryCodeStringRequiredISO 2-letter country code.
notesStringRequiredPayout notes/description.
payoutMethodStringRequiredPayment method (e.g. "NET_BANKING").
beneficiaryIdStringRequiredBeneficiary ID returned from Add Beneficiary.
Example RequestJSON
{
  "amount": 100.50,
  "currency": "INR",
  "countryCode": "IN",
  "notes": "Payment for invoice #12345",
  "payoutMethod": "NET_BANKING",
  "beneficiaryId": "d7ff29e9-2a22-4ed0-bf16-ee11308428c6"
}
Success Response200 OK
{
  "data": {
    "payoutId": "01b35954-556e-4988-8a37-c721df365f08",
    "payoutStatus": "PENDING",
    "merchantRef": "49867677675"
  },
  "errorMessage": "Success",
  "errorData": null
}
GET/api/payout

List Payouts

Fetches a list of payouts within a date range.

Query Parameters

FieldTypeRequiredDescription
startDateStringRequiredStart date (YYYY-MM-DD).
endDateStringRequiredEnd date (YYYY-MM-DD).
Success Response200 OK
{
  "data": {
    "totalPages": 1,
    "totalElements": 3,
    "size": 10,
    "payoutList": [
      {
        "payoutId": "7aae73cd-3837-4cc0-8ca2-a53127251f0c",
        "merchantRef": "qwertpxsy",
        "currency": "INR",
        "countryCode": "IN",
        "amount": 56.50,
        "notes": "Payment for invoice #12345",
        "status": "PENDING",
        "createdOn": "2025-05-29T10:37:38"
      }
    ]
  },
  "errorMessage": "Success",
  "errorData": null
}
GET/api/payout/{payoutId}

Get Payout

Fetches complete details of a specific payout.

Path Parameters

FieldTypeRequiredDescription
payoutIdStringRequiredUnique ID of the payout.
Success Response200 OK
{
  "data": {
    "payoutId": "a0ab1270-e7a0-41e7-bc88-2bfafac60f96",
    "merchantRef": "4986777675",
    "currency": "INR",
    "countryCode": "IN",
    "amount": 51.50,
    "notes": "Payment for invoice #12345",
    "status": "PENDING",
    "createdOn": "2025-05-29T10:38:56"
  },
  "errorMessage": "Success",
  "errorData": null
}

Webhooks

SprintPay sends signed webhook payloads to your configured endpoint URL when key payment events occur. Your endpoint must return HTTP 200 — any other status marks the webhook as failed.

EventwebhookTypeStatusDescription
Payment SuccessPAYMENTCOMPLETEDPayment completed successfully.
Payment CancelledPAYMENTCANCELLEDPayment was cancelled.
Payment ExpiredPAYMENTEXPIREDPayment link timed out without completion.
Refund SuccessREFUNDCOMPLETEDRefund processed successfully.
Refund FailedREFUNDFAILEDRefund attempt failed.
Payout SuccessPAYOUTCOMPLETEDPayout to beneficiary completed.
Payout CancelledPAYOUTCANCELLEDPayout was cancelled.
Payout FailedPAYOUTFAILEDPayout processing failed.
Webhook Payload Structure
{
  "eventType": "COMPLETED",
  "webhookType": "PAYMENT",
  "requestPayload": "{"transactionDate":"2025-06-09T17:39:20","amount":300.0000,"currency":"INR","paymentMethod":"UPI","clientRef":"abc123","merchantRef":"ORD-001","status":"COMPLETED"}"
}

Important

The requestPayload field is a JSON-encoded string. Parse it after receiving the webhook. Always verify the signature before processing.

Signature Verification

SprintPay signs both callbacks and webhooks using your X-API-SECRET. Always verify signatures to prevent spoofed payloads.

Callback Signature

When a payment completes and redirects to your callbackUrl, query parameters will include a signature field.

1. Collect fields: amount, currency, merchant_ref, payment_id, payment_method, status

2. Sort alphabetically by field name, take the values only.

3. Concatenate values with & as delimiter.

4. Hash the string using HMAC-SHA256 with your X-API-SECRET.

5. Compare to the received signature parameter (timing-safe comparison).

Signature Construction Example
// Fields sorted alphabetically by name:
// amount=190.00, currency=INR, merchant_ref=starbucksPay3,
// payment_id=a6e5fb2b-f51a-4adb-ae52-64080198c46d,
// payment_method=UPI, status=COMPLETED

const string = "190.00&INR&starbucksPay3&a6e5fb2b-f51a-4adb-ae52-64080198c46d&UPI&COMPLETED";
const signature = HMAC_SHA256(string, X_API_SECRET);

Webhook Signature

When a webhook fires, the signature is delivered in the HTTP headers.

1. Read the raw request body — do not parse, re-serialize, or modify it.

2. Hash the raw body using HMAC-SHA256 with your X-API-SECRET.

3. Compare to the Signature HTTP header (timing-safe comparison).

Ensure UTF-8 encoding when generating the hash.

AES Decryption (UPI_SEAMLESS)

When using UPI_SEAMLESS, the redirectUrl contains AES-encrypted data to retrieve the QR/UPI link.

Algorithm: AES · Key Size: 256-bit · Mode: CBC · Padding: PKCS5

Key: uppercase(X-API-SECRET), first 32 characters

IV: first 16 characters of the uppercase secret

Error Codes

All API responses include errorMessage and errorData. On failure, errorData is an array with errorCode, fieldName, and errorDescription.

CodeMessageDescription
2000Missing required header parametersRequired headers (X-API-KEY or X-API-SECRET) are missing.
3000Data type mismatchThe provided data type does not match the expected type.
3001Validation ErrorGeneral validation error in request fields.
3002Invalid FormatInput format does not match the expected pattern.
3003Missing required fieldsMandatory fields are missing.
3004Amount must be greater than 1The amount must be greater than 1.
3005Amount exceeds maximum limitAmount exceeds the maximum for the selected payment method.
3007Maximum 36 characters requiredMerchant reference must not exceed 36 characters.
3008Amount is requiredThe amount field is mandatory.
3009Payment ID is requiredPayment ID must be provided.
3010Merchant Ref is requiredMerchant reference is required.
3012Insufficient FundsAccount has insufficient funds.
3014Currency is requiredCurrency must be provided when Order ID is not given.
3015Currency must be ISO 3-letter codeCurrency must follow ISO three-letter standard.
3019Invalid email formatEmail format is incorrect.
3021Invalid phone number formatPhone number is not in valid format.
3022Notes is requiredNotes field must not be empty.
3023Invalid callback URLCallback URL must start with http:// or https://.
3032Payment Method is requiredPayment method selection is mandatory.
3033Card data is requiredCard data must be provided for card-based transactions.
3035Card number must be 16 digitsCard number must have exactly 16 digits.
3038Expiry date must be in MM/YY formatCard expiry date must be formatted as MM/YY.
3040CVV must be 3 digitsCVV must be exactly 3 digits.
3053Refund amount must equal deposit amountRefund amount must equal the completed transaction amount.
3068Amount below minimumAmount is below the minimum for the selected payment method.
3070Daily limit exceededCompleted transactions total exceeds daily limit.
3071Weekly limit exceededCompleted transactions total exceeds weekly limit.
3072Monthly limit exceededCompleted transactions total exceeds monthly limit.
4001Merchant authentication failedCredentials are invalid or missing.
4002Merchant configuration pendingPayment provider configuration is pending.
5000Payment order not foundThe payment order could not be found.
5002Unsupported Payment methodSelected payment method is not supported.
5003Payment not foundThe requested payment could not be found.
5004Payment already completedPayment has already been made for this order.
5007Duplicate merchant referenceMerchant reference already used in a previous order.
5009Order is already completedNo further action allowed on completed orders.
5010Duplicate transactionDuplicate transaction with same merchant reference.
5011Refund exceeds transaction amountRefund cannot exceed the transaction amount.
5013Refund already completedPayment refund has already been processed.
5014Completed/Expired orders cannot be cancelledCannot cancel completed or expired orders.
5018Customer already existsA customer with this merchantCustomerId already exists.
5020Customer not foundNo customer found with the given ID.
5022Beneficiary not foundNo beneficiary found with the provided ID.
5023Payout not foundNo payout found with the provided ID.
5024Account number already existsA beneficiary with this account number already exists.
5029Transaction DeclinedTransaction was declined by the bank.
5030Transaction FailedUnknown exception during transaction or bank server issue.
5031Payout DeclinedPayout was declined by the bank.
5033Refund DeclinedRefund was declined by the bank.
5035Refund only for completed transactionsOnly completed transactions can be refunded.
8000Signature verification failedSignature does not match. Payload may have been altered.

SprintPay Payments API v1.6 · Developer Hub · Contact Support