Payment
Payments describe the amount charged for an order or subscription using a given payment method.
- Name
- object
- Type
- string
- Description
Type of object is always
payment.Allowed values:payment
- Name
- id
- Type
- string
- Description
Unique identifier for the payment.
Example:"pay_0SNlurA049MEWV2HRA0slWFuS8DV"
- Name
- amount
- Type
- Price
- Description
- The total amount charged for this payment.Example:
{"amount":990,"currency":"USD"}- Name
- amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Most currencies have two decimals, so USD 9.99 is
999. These currencies have a different number of decimals, e.g. JPY 28,500 is28500:- 0 decimals: CLP, ISK, JPY, KRW
Example:999>= 0
- Name
- currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:"USD"
- Name
- attemptedAt
- Type
- nullable string
- Description
Time when the payment was last attempted.
nullif the payment has never been attempted.Example:"2021-02-14T19:38:34Z"
- Name
- createdAt
- Type
- string
- Description
Time when the payment was created.
Example:"2021-02-14T19:38:34Z"
- Name
- disputeClosedAt
- Type
- nullable string
- Description
Time when the payment dispute was closed. Only present if the payment is disputed.
Example:"2021-02-14T19:38:34Z"
- Name
- disputeOutcome
- Type
- nullable string
- Description
The outcome of a payment dispute. Only present if the payment is disputed.
Allowed values:lostwon
- Name
- failedAttempts
- Type
- integer
- Description
The number of failed payment attempts so far.
Example:3>= 0
- Name
- failureCode
- Type
- nullable string
- Description
An error code indicating the reason for the payment failure. Only present if the payment failed.
Example:"paymentCardDeclined"
- Name
- failureMessage
- Type
- nullable string
- Description
A human-readable message indicating the reason for the payment failure. Only present if the payment failed.
Example:"The card has been declined."
- Name
- method
- Type
- nullable PaymentMethod
- Description
- Name
- reason
- Type
- string
- Description
The reason for this payment. It can have one of the following values:
- `subscriptionCreation`: The payment is due to a new subscription. - `subscriptionRenewal`: The payment is due to a recurring subscription renewal. - `other`: The invoice is not related to a subscription but due an e.g. one-time addon.Allowed values:subscriptionCreationsubscriptionRenewalother
- Name
- references
- Type
- array
- Description
- List of payment references. Supported reference types are
orderandsubscription.- Name
- object
- Type
- string
- Description
The type of the referenced object.
Optional: This property may not always be included.Allowed values:ordersubscriptionsubscriptionAddon
- Name
- id
- Type
- string
- Description
Unique identifier of the referenced object.
Optional: This property may not always be included.Example:"ord_0SNlurA049MEWV0SiRFOw0dmChqN"
- Name
- refunded
- Type
- Price
- Description
- The total amount refunded from this payment.Example:
{"amount":0,"currency":"USD"}- Name
- amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Most currencies have two decimals, so USD 9.99 is
999. These currencies have a different number of decimals, e.g. JPY 28,500 is28500:- 0 decimals: CLP, ISK, JPY, KRW
Example:999>= 0
- Name
- currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:"USD"
- Name
- refundedAt
- Type
- nullable string
- Description
Time when the payment was fully refunded. Only present if the payment was refunded.
Example:"2021-02-14T19:38:34Z"
- Name
- status
- Type
- string
- Description
The status of the payment. It can have one of the following values:
- `pending`: The payment has been created but not yet processed by the payment provider. - `succeeded`: The payment was completed successfully. - `failed`: The payment failed. Payments are retried automatically for up to 3 weeks. - `refunded`: The payment was fully refunded. Partially refunded payments do not have this status. - `disputed`: The payment is under dispute. - `requiresConfirmation`: The payment requires user confirmation before being processed. - `requiresPaymentMethod`: The payment is awaiting for a payment method to be attached.Allowed values:pendingsucceededrequiresConfirmationfailedrefundeddisputedrequiresPaymentMethod
- Name
- user
- Type
- User
- Description
- Users are end consumers of subscriptions. Users can have multiple devices, SIMs, and subscriptions.
Payment object
{
"object": "payment",
"id": "pay_0SNlurA049MEWV2HRA0slWFuS8DV",
"amount": {
"amount": 990,
"currency": "USD"
},
"attemptedAt": "2021-02-14T19:38:34Z",
"createdAt": "2021-02-14T19:38:34.0Z",
"disputeClosedAt": "2021-02-14T19:38:34Z",
"disputeOutcome": null,
"failedAttempts": 3,
"failureCode": "paymentCardDeclined",
"failureMessage": "The card has been declined.",
"method": {
"object": "paymentMethod",
"id": "pm_1IHCiiI2m82Dc6YnhqGWH6JX",
"brand": "visa",
"createdAt": "2021-02-14T19:38:34.0Z",
"last4": "4242",
"provider": "stripe",
"status": "available",
"type": "card",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d"
},
"reason": "subscriptionCreation",
"references": [
{
"object": "order",
"id": "ord_0SNlurA049MEWV0SiRFOw0dmChqN"
}
],
"refunded": {
"amount": 0,
"currency": "USD"
},
"refundedAt": "2021-02-14T19:38:34Z",
"status": "pending",
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"createdAt": "2021-01-21T19:38:34.0Z",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"status": "active"
}
}