Payments
Learn more about the Payment resource
The Payment resource represents an individual attempt to move money to your PayRex merchant account balance. When your customer successfully completed a transaction, a Payment resource represents the actual payment of your customer.
Endpoints
The Payment Resource
{
"id": "pay_bJdGt2XC3XNRjps3WdzjKixWfs7Zb4sa",
"resource": "payment",
"amount": 4569600,
"amount_refunded": 0,
"billing": {
"name": "Juan Dela Cruz",
"email": "juan@email.com",
"phone": null,
"address": {
"line1": "123453",
"line2": null,
"city": "Pasay",
"state": "Metro Manila",
"postal_code": "1829",
"country": "PH"
}
},
"currency": "PHP",
"description": null,
"fee": 2500,
"livemode": false,
"metadata": null,
"net_amount": 4549257,
"payment_intent_id": "pi_nzxCsMb2FQ4WitBZAaQgw3CSTJBnW8id",
"status": "paid",
"customer": null,
"payment_method": {
"type": "qrph"
},
"refunded": false,
"created_at": 1747235098,
"updated_at": 1747263620
}
Attributes
id string
Unique identifier for the resource. The prefix is pay_
.
resource string
Represents the resource's type. The value is payment
.
amount string
The amount of the payment to be transferred to your PayRex merchant account. This is a positive integer that your customer paid in the smallest currency unit, cents. If the customer paid ₱ 120.50, the amount of the Payment should be 12050.
The minimum amount is ₱ 20 (2000 in cents) and the maximum amount is ₱ 59,999,999.99 (5999999999 in cents).
amount_refunded string
If the payment is either partially or fully refunded, the amount_refunded represents the successful refunded attempts. This is a positive integer that you can refund from the available amount of the Payment resource.
billing hash
Show child attributes
name string
The billing name of the customer
email string
The billing e-mail address of the customer
phone string
The billing phone of the customer
address hash
Show child attribute
line1 string
The billing Address Line1 of the customer
line2 string
The billing address line2 of the customer
city string
The billing address city of the customer
state string
The billing address state of the customer
postal_code string
The billing address postal code of the customer
country string
The billing address country of the customer in two-letter ISO format.
currency string
A three-letter ISO currency code in uppercase. As of the moment, we only support PHP.
description string
An arbitrary string attached to the Payment. Useful reference when viewing Payment from PayRex Dashboard.
fee string
The fee that PayRex will deduct from the amount of the Payment. This is a positive integer in the smallest currency unit, cents. If the fee is ₱ 120.50, the fee of the Payment should be 12050.
livemode boolean
The value is true
if the resource's mode is live or the value is false
if the resource is in test mode.
metadata hash
A set of key-value pairs attached to the Payment. This is useful for storing additional information about the Payment.
net_amount string
The net_amount of the payment is the final computed amount that will be transferred to the bank account of the merchant. This is a positive integer in the smallest currency unit, cents. If the net_amount is ₱ 120.50, the net_amount of the Payment should be 12050.
payment_intent_id string
The ID of the PaymentIntent resource that generated the Payment resource.
status string
The status of the Payment. Possible values are paid
, or failed
.
customer hash
The Customer resource related to the Payment resource.
payment_method hash
Holds the details of the payment method of the Payment.
Show child attributes
type string
Defines the payment method of the Payment.
refunded boolean
Defines if the payment is already refunded or not. A partially or fully refunded Payment has corresponding Refund resources. The value is true
if the payment is either partially or fully refunded while the value is false
if the payment has no refunds.
created_at timestamp
The time the resource was created and measured in seconds since the Unix epoch.
updated_at timestamp
The time the resource was updated and measured in seconds since the Unix epoch.