A Payment in the Paylias network represents a transaction between two parties. It contains detailed information about the transaction participants, amounts, and contextual data to facilitate secure money movement.
Each Payment:
When creating a payment through the /api/v1/csp/payments
endpoint, it's important to understand that this only stores the payment record and performs basic validations such as:
To actually process the payment through the Paylias network, you must make a separate call to the Submit Payment endpoint. This endpoint performs deep validation checks and initiates the actual payment processing. Please refer to the Submit Payment API documentation for details on this process.
Property | Type | Required | Description | Notes |
---|---|---|---|---|
payment_id |
string | Yes | Unique identifier for the payment | UUID format recommended |
organization_id |
string | Yes | Organization initiating the payment | Auto-populated from auth |
partner_id |
string | Yes | Partner under organization initiating payment | Auto-populated from auth |
reference |
string | Yes | External reference number | e.g., Invoice number |
initiated_at |
int64 | Yes | Transaction initiation timestamp | Unix timestamp |
expires_at |
int64 | No | Transaction expiration timestamp | Unix timestamp |
amount |
object | Yes | Transaction amount details | See Amount Properties |
debtor_party |
object | Yes | Information about the paying party | See Entity Properties |
beneficiary_party |
object | Yes | Information about the receiving party | See Entity Properties |
metadata |
array | No | Key-value pairs for additional data | Max 5 entries |
device |
object | No | Device information for risk assessment | See Device Properties |
location |
object | No | Location data for risk assessment | See Location Properties |
Property | Type | Required | Description |
---|---|---|---|
currency |
string | Yes | ISO 4217 currency code |
total |
string | Yes | Amount in minor units |
Property | Type | Required | Description |
---|---|---|---|
payment_address |
string | Yes | Unique payment address |
first_name |
string | Yes | First name |
last_name |
string | Yes | Last name |
email |
string | Yes | Email address |
phone |
string | Yes | Phone number with country code |
type |
string | Yes | Entity type (Individual/Business) |
category_code |
string | Conditional | Required for business entities |
billing |
object | Yes | Billing address information |
Property | Type | Required | Description | Format/Constraints |
---|---|---|---|---|
street_1 |
string | No | Primary street address | Max 60 characters |
street_2 |
string | No | Secondary street address | Max 60 characters |
city |
string | No | City name | Max 40 characters |
province |
string | No | Province/State | Max 40 characters |
postal_code |
string | No | Postal/ZIP code | Max 20 characters |
country |
string | Yes | Country code | ISO 3166 2-letter code |
Property | Type | Required | Description | Format/Constraints |
---|---|---|---|---|
key |
string | Yes | Metadata identifier | Alphanumeric, max 45 characters |
value |
string | Yes | Metadata value | Alphanumeric, max 45 characters |
Property | Type | Required | Description | Format/Constraints |
---|---|---|---|---|
user_agent |
string | No | Browser/device user agent | Max 500 characters |
entity |
string | No | Entity associated with device | |
browser |
string | No | Browser name | |
browser_version |
string | No | Browser version | |
device |
string | No | Device model/name | |
device_type |
string | No | Type of device | e.g., smartphone, tablet, desktop |
platform |
string | No | Operating system | |
is_mobile |
boolean | No | Mobile device indicator | |
is_crawler |
boolean | No | Web crawler indicator |
Property | Type | Required | Description | Format/Constraints |
---|---|---|---|---|
ip_address |
string | No | Client IP address | Valid IPv4/IPv6 format |
city |
string | No | City name derived from IP | |
country |
string | No | Country derived from IP | |
latitude |
float32 | No | Geographic latitude | |
longitude |
float32 | No | Geographic longitude | |
region |
string | No | Region/state derived from IP |
{
"ok": true,
"data": {
"payment_id": "cjes76vsemvj3obsnc52",
"organization_id": "org_ct239n420or249k5bo90",
"partner_id": "part_ct23b6420or249k5boag",
"reference": "INV0001",
"initiated_at": 1743270060,
"expires_at": 1743273661,
"amount": {
"currency": "USD",
"total": "10000"
},
"debtor_party": {
"payment_address": "john@stripe-platinum",
"first_name": "John",
"last_name": "Collison",
"email": "johnc@stripe.com",
"phone": "+16462442945",
"type": "Payee_Individual",
"billing": {
"country": "US"
}
},
"beneficiary_party": {
"payment_address": "ziyad@safepay-platinum",
"first_name": "Ziyad",
"last_name": "Parekh",
"email": "ziyad.parekh@gmail.com",
"phone": "+923008277879",
"type": "Payee_Individual",
"billing": {
"country": "US"
}
},
"device": {},
"location": {}
}
}
Creates a new payment transaction.
Header | Description |
---|---|
X-Org-ID |
Organization identifier |
X-Partner-ID |
Partner identifier |
X-Sfpy-Api-Key |
API key for authentication |
Content-Type |
Must be application/json |
POST /api/v1/csp/payments
curl --location 'http://localhost:9001/api/v1/csp/payments' \
--header 'X-Org-ID: org_ct239n420or249k5bo90' \
--header 'X-Partner-ID: part_ct23b6420or249k5boag' \
--header 'Content-Type: application/json' \
--header 'X-Sfpy-Api-Key: AA5B7256D7E228329F9A7D6E58880D48' \
--data '{
"payment_id": "cjes76vsemvj3obsnc52",
"reference": "INV0001",
"initiated_at": 1743270454,
"amount": {
"currency": "USD",
"total": "10000"
},
"beneficiary_party": {
"payment_address": "ziyad@safepay-platinum",
"first_name": "Ziyad",
"last_name": "Parekh",
"email": "ziyad.parekh@gmail.com",
"phone": "+923008277879",
"type": "Payee_Individual",
"billing": {
"street_1": "",
"country": "US"
}
},
"debtor_party": {
"payment_address": "john@stripe-platinum",
"first_name": "John",
"last_name": "Collison",
"email": "johnc@stripe.com",
"phone": "+16462442945",
"type": "Payee_Individual",
"billing": {
"street_1": "",
"country": "US"
}
}
}'
Retrieves details of a specific payment.
Parameter | Type | Required | Description |
---|---|---|---|
paymentId |
string | Yes | Payment ID to retrieve |
Header | Description |
---|---|
X-Org-ID |
Organization identifier |
X-Partner-ID |
Partner identifier |
X-Sfpy-Api-Key |
API key for authentication |
GET /api/v1/csp/payments/{paymentId}
curl --location 'http://localhost:9001/api/v1/csp/payments/cjes76vsemvj3obsnc53' \
--header 'X-Org-ID: org_ct239n420or249k5bo90' \
--header 'X-Partner-ID: part_ct23b6420or249k5boag' \
--header 'X-Sfpy-Api-Key: AA5B7256D7E228329F9A7D6E58880D48'
Error Code | Description |
---|---|
error.bad_request |
Invalid or missing required parameters |
error.resource_not_found |
Payment not found |
error.unauthorized_access |
Invalid or missing authentication |
500 , 502 , 503 , 504 |
Server-side errors |
Timestamps
initiated_at
must not be in the futureexpires_at
must be after initiated_at
expires_at
must not be expiredAmount
Entities
Metadata
Billing
Metadata
Device
Location
Billing Information
Metadata Usage
Device Information
Location Data