Payments

This resource represents a payment.

A payment is associated with an invoice and contains details about the payment method used, payment status, and any applicable fees.

Note: All amounts are in the minor unit of the currency. For example, 1000 represents $10.00 for USD, £10.00 for GBP, or ¥1000 for JPY.

Properties

id string
The unique identifier for this payment.

createdAt string
The date this payment was created in RFC3339 format.

object string
The object type of this resource.

invoiceId string
The ID of the invoice this payment is associated with.

status string

The current status of the payment. One of:

StatusDescription
pendingFurther action required by the customer
processingPayment is being processed by the bank (for ACH payments
succededPayment has been successfully received
failedPayment failed to process

amount integer
The payment amount in cents. Will be 0 for failed payments.

message string
A message describing why the payment failed, if applicable.

declineCode string
The decline code from the payment processor in case of payment failure.

paymentMethod string
The type of payment method used. One of:

Payment MethodDescription
creditCardCredit card payment
bankAccountBank account/ACH payment

last4Digits string
The last 4 digits of the payment method used.

brand string
The brand of the payment method:

BrandPayment method
Visa, Mastercard, etc.creditCard
Bank namebankAccount

feeAmount object
Details of fees applied to successful payments:

  • paidByPlatform integer
    Transaction fee which was passed on to the SB
  • paidByClient integer
    Transaction fee passed on to the client
{
    "id": "py_01HN4V8K5P7RNQJ6MGXKDZ8T2W",
    "object": "payment",
    "createdAt": "2024-02-21T15:31:16.789Z",
    "invoiceId": "inv_01HN4V8K5P7RNQJ6MGXKDZ8T2W",
    "status": "succeeded",
    "amount": 107635,
    "message": null,
    "declineCode": null,
    "paymentMethod": "creditCard",
    "last4Digits": "4242",
    "brand": "visa",
    "feeAmount": {
        "paidByPlatform": 2500,
        "paidByClient": 0
    }
}