GET
/
payment-requests
/
status
/
{id}
cURL
curl --request GET \
  --url https://gateway.cyrexa.com/ipg/2.0.0/payment-requests/status/{id}
This response does not have an example.

Overview

Monitor and track payment requests using the status endpoint and handle payment notifications.

Get Payment Request Status

Retrieve the current status of a payment request using its identifier.

API Endpoint

GET https://apay.cyrexa.io/payment-requests/status/{id}

Authentication

  • HTTP Header: X-API-Key with your API key obtained from the dashboard
  • Content Type: application/json

Request Parameters

ParameterDescriptionRequired
{id}Payment request identifier from payment creation responseYES

Response Fields

FieldDescriptionType
idPayment request identifierstring/integer
recipientNamePayment recipient namestring
paymentRequestStatusIdPayment request status:
1 – paid
2 – unpaid
3 – cancelled
integer
transactionIdCreated transaction internal identifierstring/integer
transactionNumberCreated transaction public identifierstring
transactionStatusIdCreated transaction status:
0 – waiting
1 – approved
2 – declined
3 – pending
integer
linkPayment request link to customer-facing web pagestring
unitPayment currencystring
amountPayment amountnumber
referenceIdCustom reference detailsstring
notesPayment notesstring
clientPayment sender customer objectobject
notifyUrlWebhook URL for payment status notificationsstring
successUrlRedirect URL on successful paymentstring
failureUrlRedirect URL on failed paymentstring
lastLogLast payment attempt status and messageobject

Last Log Object

FieldDescriptionType
transactionStatusIdLast payment attempt status:
0 – waiting
1 – approved
2 – declined
3 – pending
integer
messageLast payment attempt messagestring
codeLast payment attempt codestring

Example Request

curl -X GET \
  "https://apay.cyrexa.io/payment-requests/status/16772761082427695" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json"

Payment Through SFTP

Process batch payments using SFTP file uploads for high-volume transactions.

SFTP Configuration

  • Credentials: Obtain SFTP address and credentials from the dashboard profile page
  • Multiple Providers: Different SFTP addresses may be available for different payment providers
  • File Format: Semicolon-delimited CSV without header row

CSV File Format

Each row represents a separate payment with the following fields in order:
OrderFieldDescriptionRequired
1Card holder nameDebit/credit card holder nameYES
2Card numberDebit/credit card numberYES
3Card expirationCard expiration date (MM/YY format)YES
4Card CVVDebit/credit card CVV codeYES
5EmailPayer email addressYES
6PhonePayer phone numberYES
7AddressPayer addressYES
8CityPayer city nameYES
9StatePayer state name or code (e.g., Florida or FL)YES
10Postal CodePayer postal codeYES
11CountryPayer country 2-letter ISO-3166-1 alpha-2 code (e.g., US)YES
12AmountPayment amount (e.g., 10.50)YES
13UnitPayment currency (e.g., USD, EUR, BTC, USDT)YES
14Reference IDMerchant custom reference ID (free text)NO

CSV Example

Test User;4111111111111111;10/25;123;testu@email.com;972540000000;10 Unknown Street;Far Town;NA;123456;IL;10.50;USD;RI12345
Important: Field order is critical and must be maintained exactly as specified.

Payment Notifications

Receive automated notifications about payment status changes via webhooks.

Notification Setup

  • Configuration: Set notify URL in dashboard profile page
  • Method: HTTP POST with application/x-www-form-urlencoded content type
  • Requirement: Notifications only sent if notify URL is configured

Notification Fields

FieldDescription
idPayment request identifier
transactionIdPayment request transaction identifier
transactionStatusIdTransaction status: 1 – approved, 2 – declined
paymentRequestStatusIdPayment status: 1 – paid, 2 – unpaid
merchantIdMerchant identifier (from control panel)
unitPayment currency
grossAmountPayment gross amount including fees
feePayment fee amount
netAmountNet amount deposited to merchant wallet
referenceIdCustom reference details
notesPayment notes
clientIdPayment sender customer identifier
clientNamePayment sender customer name
clientEmailPayment sender customer email
clientPhonePayment sender customer phone
clientMemberIdPayment sender customer member identifier
messagePayment failure reason message
codePayment failure reason code

Example Notification

id=16772761082427695&transactionId=265111&transactionStatusId=1&paymentRequestStatusId=1&merchantId=16762420400394816&unit=USD&grossAmount=10&fee=0.5&netAmount=9.5&referenceId=12345&notes=Payment notes&clientId=16772748432912191&clientName=Client Name&clientEmail=client@email.com&clientPhone=1234567890&clientMemberId=12345&message=Stolen Card&code=008

Notification Verification

Verify notification authenticity using HMAC SHA512 signature.

Signature Verification

  1. Header: Check X-Signature header in notification request
  2. Algorithm: HMAC SHA512 hash in Base64 format
  3. Key: Use your API key from the control panel

Verification Process

// Pseudo code for signature verification
const crypto = require('crypto');

function verifySignature(payload, signature, apiKey) {
  const hash = crypto
    .createHmac('sha512', apiKey)
    .update(payload)
    .digest('base64');
  
  return hash === signature;
}

// Usage
const isValid = verifySignature(requestBody, xSignatureHeader, yourApiKey);

Error Codes

Complete list of error codes and descriptions for troubleshooting.

Payment Processing Errors (001-020)

CodeDescription
001Bank system error. Try again later
002Invalid or expired card
003Card is blocked or restricted
0043DS system decline
005Insufficient funds
006Security code (CVV/PIN) incorrect
007Transaction blocked due to risk control
008Unsupported card type
009Invalid email address format
010Invalid postal/zip code
011Invalid credentials or encryption error
012Transaction was cancelled
013Authentication timed out
014Declined: Origin domain is blocked
015Declined: Callback URL is not allowed
016Declined: Email is blocked due high CHB history
017Declined: Card is blocked due high CHB history
018Declined: Transaction exceeds max amount
019Declined: Transaction less than min amount
020Declined: Currency is not allowed

Limit and Validation Errors (021-048)

CodeDescription
021Declined: Number of transactions exceeded for today
022Declined: Number of transactions exceeded this month
023Declined: Total transaction amount exceeded for today
024Declined: Total transaction amount exceeded this month
025Invalid name
026Invalid total amount
027Invalid currency
028Invalid reference
029Invalid notify URL
030Invalid success URL
031Invalid failure URL
032Invalid origin domain
033Invalid phone number
034Invalid address
035Invalid city
036Invalid state
037Invalid country
038Invalid UPI
039Invalid capture delay hours
040Invalid card number
041Invalid card expiration
042Invalid card CVV
043Entity not found
044Invalid customer
045Invalid payment method
046Invalid payment provider
047Declined: Country is not allowed
048Invalid token

System Errors (998-999)

CodeDescription
998System internal error. Contact system administrator
999Transaction declined. Contact your card issuer

Best Practices

Status Checking

  • Polling: Check status periodically, not continuously
  • Rate Limiting: Respect API rate limits
  • Error Handling: Handle network timeouts and API errors gracefully

SFTP Batch Processing

  • File Validation: Validate CSV format before upload
  • Error Monitoring: Monitor notification responses for batch failures
  • Batch Size: Consider optimal batch sizes for your volume

Notification Handling

  • Signature Verification: Always verify notification signatures
  • Idempotency: Handle duplicate notifications gracefully
  • Response Time: Respond to notifications quickly (< 30 seconds)
  • Error Handling: Return appropriate HTTP status codes

Security

  • API Key Protection: Keep API keys secure and rotate regularly
  • HTTPS Only: Use HTTPS for all API communications
  • Signature Verification: Always verify webhook signatures
  • Error Logging: Log errors without exposing sensitive data

Path Parameters

id
integer
required

Response

200

OK