Payment Intents
Inspect the amounts the platform is collecting, including attempts, refunds, and billed items.
List payment intents
/payment-intentsRetrieve a paginated list of payment intents with optional filtering by status, customer, or date range.
Query parameters
limitinteger>= 1<= 1000default 100The maximum number of items to return.
cursorstringOpaque pagination token from a previous response's nextCursor.
customer Idarray of stringFilter payment intents by customer IDs
statusarray of PaymentIntentStatusFilter payment intents by status
Responses
200Payment intents retrieved successfully
application/json
Payment intents retrieved successfully
Payment intents retrieved successfully
object
itemsarray of PaymentIntentListItemrequiredShow child attributes
payment Intent IdstringrequiredThe unique identifier for this payment intent.
customer IdstringrequiredThe customer this payment intent collects from.
statusenum<string>requiredCurrent stage of a payment intent as it is collected through the payment provider.
- UNKNOWN: The platform has no supported mapping for the current provider state.
- PENDING: Created, no charge attempted yet.
- REQUIRES_ACTION: The customer must take action to continue (e.g., 3D Secure authentication).
- PROCESSING: A charge is in flight with the payment provider.
- SUCCEEDED: The full amount has been collected.
- REQUIRES_PAYMENT_METHOD: The last charge attempt failed; a new or updated payment method is needed to retry.
- CANCELED: Collection was canceled and no further charges will be attempted.
values
UNKNOWNPENDINGREQUIRES_ACTIONPROCESSINGSUCCEEDEDREQUIRES_PAYMENT_METHODCANCELED
typeenum<string>requiredWhat the payment intent collects.
- UNKNOWN: The platform does not have a supported type for this intent.
- PREPAID_RENEWAL: A scheduled prepaid subscription renewal.
- TOPUP: An immediate prepaid balance or allowance top-up.
- INITIAL_ORDER: Payment collected while placing an order.
values
UNKNOWNPREPAID_RENEWALTOPUPINITIAL_ORDER
amount Minorintegerint64requiredThe total amount to collect, in minor units of the currency (e.g., 2900 = $29.00 when the currency is USD).
currencystringrequiredThe ISO 4217 currency code the amount is collected in (e.g., "USD").
descriptionstringA human-readable description of what is being collected.
due Atstringdate-timeWhen the amount is due.
created Atstringdate-timerequiredWhen the payment intent was created.
updated Atstringdate-timerequiredWhen the payment intent was last updated.
paginationobjectrequiredCursor-based pagination information returned by list endpoints.
Pass nextCursor as the cursor query parameter of the next request to fetch the following page.
Show child attributes
next Cursorstring | nullrequiredOpaque token for fetching the next page. Null when no more results.
400The request was malformed or invalid.
application/json
The request was malformed or invalid.
The request was malformed or invalid.
objectError
The error body returned by every endpoint when a request fails. Use internalCode for programmatic
handling, show message to a human, and check details for field-level problems when the request
was invalid.
messagestringrequiredA human-readable message providing more details about the error.
codestringdeprecatedrequiredDeprecated. Use internalCode.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
internal CodestringNames the condition that failed, from our own registry. It is independent of which system reported the failure and of the HTTP status, and it is stable across releases. Branch on this field. An unexpected failure on our side can carry no code. Then use the HTTP status.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
messagestringrequiredA human-readable message providing more details about the error.
codestringrequiredA machine-readable code for the specific detail.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
hintstringA hint to help resolve the error.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
span IdstringThe span within the trace that failed.
401Authentication is required to access this resource.
application/json
Authentication is required to access this resource.
Authentication is required to access this resource.
objectError
The error body returned by every endpoint when a request fails. Use internalCode for programmatic
handling, show message to a human, and check details for field-level problems when the request
was invalid.
messagestringrequiredA human-readable message providing more details about the error.
codestringdeprecatedrequiredDeprecated. Use internalCode.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
internal CodestringNames the condition that failed, from our own registry. It is independent of which system reported the failure and of the HTTP status, and it is stable across releases. Branch on this field. An unexpected failure on our side can carry no code. Then use the HTTP status.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
messagestringrequiredA human-readable message providing more details about the error.
codestringrequiredA machine-readable code for the specific detail.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
hintstringA hint to help resolve the error.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
span IdstringThe span within the trace that failed.
403Access to this resource is forbidden.
application/json
Access to this resource is forbidden.
Access to this resource is forbidden.
objectError
The error body returned by every endpoint when a request fails. Use internalCode for programmatic
handling, show message to a human, and check details for field-level problems when the request
was invalid.
messagestringrequiredA human-readable message providing more details about the error.
codestringdeprecatedrequiredDeprecated. Use internalCode.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
internal CodestringNames the condition that failed, from our own registry. It is independent of which system reported the failure and of the HTTP status, and it is stable across releases. Branch on this field. An unexpected failure on our side can carry no code. Then use the HTTP status.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
messagestringrequiredA human-readable message providing more details about the error.
codestringrequiredA machine-readable code for the specific detail.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
hintstringA hint to help resolve the error.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
span IdstringThe span within the trace that failed.
500An unexpected error occurred on the server.
application/json
An unexpected error occurred on the server.
An unexpected error occurred on the server.
objectError
The error body returned by every endpoint when a request fails. Use internalCode for programmatic
handling, show message to a human, and check details for field-level problems when the request
was invalid.
messagestringrequiredA human-readable message providing more details about the error.
codestringdeprecatedrequiredDeprecated. Use internalCode.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
internal CodestringNames the condition that failed, from our own registry. It is independent of which system reported the failure and of the HTTP status, and it is stable across releases. Branch on this field. An unexpected failure on our side can carry no code. Then use the HTTP status.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
messagestringrequiredA human-readable message providing more details about the error.
codestringrequiredA machine-readable code for the specific detail.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
hintstringA hint to help resolve the error.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
span IdstringThe span within the trace that failed.
Auth required
Send one of
X-Api-KeyBearer JWT+X-Api-Key
The API key is always required; the bearer token is optional.
curl https://apiv2.example.com/api/v2/payment-intents \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'X-Api-Key: YOUR_API_KEY'fetch('https://apiv2.example.com/api/v2/payment-intents', {
headers: {
Authorization: 'Bearer YOUR_ACCESS_TOKEN',
'X-Api-Key': 'YOUR_API_KEY'
}
})requests.get(
"https://apiv2.example.com/api/v2/payment-intents",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"X-Api-Key": "YOUR_API_KEY"
}
)package main
import (
"fmt"
"io"
"net/http"
)
func main() {
requestUrl := "https://apiv2.example.com/api/v2/payment-intents"
req, _ := http.NewRequest("GET", requestUrl, nil)
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Add("X-Api-Key", "YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}{
"items": [
{
"paymentIntentId": "64870b5c-fb61-4c9a-955a-e148e0826c20",
"customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
"status": "SUCCEEDED",
"type": "PREPAID_RENEWAL",
"amountMinor": 2900,
"currency": "USD",
"description": "Mobile subscription renewal",
"dueAt": "2024-01-15T10:00:00Z",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z"
}
],
"pagination": {
"nextCursor": "eyJvZmZzZXQiOjEwMH0"
}
}{
"message": "The request body is invalid.",
"code": "bad_request",
"details": [
{
"message": "Email format is invalid.",
"code": "invalid_email",
"property": "contact.email"
}
],
"hint": "Check the request payload and correct the highlighted fields."
}{
"message": "Authentication is required to access this resource.",
"code": "unauthorized",
"hint": "Provide a valid API key in the X-Api-Key header."
}{
"message": "You do not have permission to perform this action.",
"code": "forbidden",
"hint": "Ensure your API key or user has the required permissions."
}{
"message": "An unexpected error occurred on the server.",
"code": "internal_server_error",
"hint": "Retry the request later. If the problem persists, contact support."
}Get payment intent
/payment-intents/{paymentIntentId}Get a payment intent by ID, including its charge attempts, refunds, and line items.
Path parameters
payment Intent IdstringrequiredThe unique identifier of the payment intent to retrieve.
Responses
200Payment intent retrieved successfully
application/json
Payment intent retrieved successfully
Payment intent retrieved successfully
objectPaymentIntent
The amount the platform is collecting from a customer, with its payment attempts, refunds, and billed line items.
A payment intent is created automatically when payment collection starts for an order or invoice; you do not create one directly. Read it to see what is due, what was attempted, and what was refunded. Card collection starts through a payment session or payment link; invoice collection creates the payment intent as part of issuing the invoice.
payment Intent IdstringrequiredThe unique identifier for this payment intent.
customer IdstringrequiredThe customer this payment intent collects from.
statusenum<string>requiredCurrent stage of a payment intent as it is collected through the payment provider.
- UNKNOWN: The platform has no supported mapping for the current provider state.
- PENDING: Created, no charge attempted yet.
- REQUIRES_ACTION: The customer must take action to continue (e.g., 3D Secure authentication).
- PROCESSING: A charge is in flight with the payment provider.
- SUCCEEDED: The full amount has been collected.
- REQUIRES_PAYMENT_METHOD: The last charge attempt failed; a new or updated payment method is needed to retry.
- CANCELED: Collection was canceled and no further charges will be attempted.
values
UNKNOWNPENDINGREQUIRES_ACTIONPROCESSINGSUCCEEDEDREQUIRES_PAYMENT_METHODCANCELED
amount Minorintegerint64requiredThe total amount to collect, in minor units of the currency (e.g., 2900 = $29.00 when the currency is USD).
currencystringrequiredThe ISO 4217 currency code the amount is collected in (e.g., "USD").
descriptionstringA human-readable description of what is being collected.
due Atstringdate-timeWhen the amount is due.
line Itemsarray of PaymentIntentLineItemrequiredThe items that make up the collected amount.
Show child attributes
descriptionstringrequiredWhat this line item represents.
amount Minorintegerint64requiredThe base cost of the line item before discounts, in minor units of the payment intent's
currency (e.g., 2900 = $29.00 when the currency is USD). The taxes are added to it, unless
includesTax is true and they are a part of it.
includes TaxbooleanWhether the taxes are a part of amountMinor rather than added to it.
subscription IdstringThe subscription this line item is associated with, if any.
license IdstringThe license this line item is associated with, if any.
discountsarray of objectDiscounts applied to this line item.
Show child attributes
descriptionstringrequiredWhat the discount is for.
amount Minorintegerint64requiredThe discounted amount (positive value), in minor units of the payment intent's currency.
taxesarray of objectTaxes applied to this line item.
Show child attributes
descriptionstringrequiredThe tax component applied (e.g., a named tax and its rate).
amount Minorintegerint64requiredThe tax amount, in minor units of the payment intent's currency.
discountsarray of PaymentIntentDiscountrequiredReductions applied to the payment intent as a whole rather than to one billed line.
Show child attributes
descriptionstringrequiredWhy the payment intent was reduced.
amount Minorintegerint64requiredThe positive amount deducted, in minor units of the payment intent currency.
attemptsarray of PaymentAttemptrequiredCharge attempts made against this payment intent, most recent first.
Show child attributes
payment Attempt IdstringrequiredThe unique identifier for this charge attempt.
amount Minorintegerint64requiredThe amount charged in this attempt, in minor units of the currency (e.g., 2900 = $29.00 when the currency is USD).
currencystringrequiredThe ISO 4217 currency code the attempt was charged in (e.g., "USD").
resultenum<string>requiredWhether the charge attempt succeeded or failed.
values
SUCCEEDEDFAILED
reasonstringFailure reason when the attempt did not succeed.
charged Atstringdate-timeWhen the charge was made.
created Atstringdate-timerequiredWhen the attempt was created.
refundsarray of PaymentRefundrequiredRefunds issued against this payment intent.
Show child attributes
refund IdstringrequiredThe unique identifier for this refund.
amount Minorintegerint64requiredThe refunded amount, in minor units of the currency (e.g., 2900 = $29.00 when the currency is USD).
currencystringrequiredThe ISO 4217 currency code the refund is issued in (e.g., "USD").
reasonenum<string>Why the refund was issued.
values
UNKNOWNDUPLICATEFRAUDULENTREQUESTED_BY_CUSTOMERDISPUTE_LOST
statusenum<string>requiredCurrent stage of the refund.
values
PENDINGSUCCEEDEDFAILEDCANCELEDREQUIRES_ACTION
created Atstringdate-timerequiredWhen the refund was created.
created Atstringdate-timerequiredWhen the payment intent was created.
updated Atstringdate-timerequiredWhen the payment intent was last updated.
400The request was malformed or invalid.
application/json
The request was malformed or invalid.
The request was malformed or invalid.
objectError
The error body returned by every endpoint when a request fails. Use internalCode for programmatic
handling, show message to a human, and check details for field-level problems when the request
was invalid.
messagestringrequiredA human-readable message providing more details about the error.
codestringdeprecatedrequiredDeprecated. Use internalCode.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
internal CodestringNames the condition that failed, from our own registry. It is independent of which system reported the failure and of the HTTP status, and it is stable across releases. Branch on this field. An unexpected failure on our side can carry no code. Then use the HTTP status.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
messagestringrequiredA human-readable message providing more details about the error.
codestringrequiredA machine-readable code for the specific detail.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
hintstringA hint to help resolve the error.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
span IdstringThe span within the trace that failed.
401Authentication is required to access this resource.
application/json
Authentication is required to access this resource.
Authentication is required to access this resource.
objectError
The error body returned by every endpoint when a request fails. Use internalCode for programmatic
handling, show message to a human, and check details for field-level problems when the request
was invalid.
messagestringrequiredA human-readable message providing more details about the error.
codestringdeprecatedrequiredDeprecated. Use internalCode.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
internal CodestringNames the condition that failed, from our own registry. It is independent of which system reported the failure and of the HTTP status, and it is stable across releases. Branch on this field. An unexpected failure on our side can carry no code. Then use the HTTP status.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
messagestringrequiredA human-readable message providing more details about the error.
codestringrequiredA machine-readable code for the specific detail.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
hintstringA hint to help resolve the error.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
span IdstringThe span within the trace that failed.
403Access to this resource is forbidden.
application/json
Access to this resource is forbidden.
Access to this resource is forbidden.
objectError
The error body returned by every endpoint when a request fails. Use internalCode for programmatic
handling, show message to a human, and check details for field-level problems when the request
was invalid.
messagestringrequiredA human-readable message providing more details about the error.
codestringdeprecatedrequiredDeprecated. Use internalCode.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
internal CodestringNames the condition that failed, from our own registry. It is independent of which system reported the failure and of the HTTP status, and it is stable across releases. Branch on this field. An unexpected failure on our side can carry no code. Then use the HTTP status.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
messagestringrequiredA human-readable message providing more details about the error.
codestringrequiredA machine-readable code for the specific detail.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
hintstringA hint to help resolve the error.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
span IdstringThe span within the trace that failed.
404The requested resource was not found.
application/json
The requested resource was not found.
The requested resource was not found.
objectError
The error body returned by every endpoint when a request fails. Use internalCode for programmatic
handling, show message to a human, and check details for field-level problems when the request
was invalid.
messagestringrequiredA human-readable message providing more details about the error.
codestringdeprecatedrequiredDeprecated. Use internalCode.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
internal CodestringNames the condition that failed, from our own registry. It is independent of which system reported the failure and of the HTTP status, and it is stable across releases. Branch on this field. An unexpected failure on our side can carry no code. Then use the HTTP status.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
messagestringrequiredA human-readable message providing more details about the error.
codestringrequiredA machine-readable code for the specific detail.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
hintstringA hint to help resolve the error.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
span IdstringThe span within the trace that failed.
500An unexpected error occurred on the server.
application/json
An unexpected error occurred on the server.
An unexpected error occurred on the server.
objectError
The error body returned by every endpoint when a request fails. Use internalCode for programmatic
handling, show message to a human, and check details for field-level problems when the request
was invalid.
messagestringrequiredA human-readable message providing more details about the error.
codestringdeprecatedrequiredDeprecated. Use internalCode.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
internal CodestringNames the condition that failed, from our own registry. It is independent of which system reported the failure and of the HTTP status, and it is stable across releases. Branch on this field. An unexpected failure on our side can carry no code. Then use the HTTP status.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
messagestringrequiredA human-readable message providing more details about the error.
codestringrequiredA machine-readable code for the specific detail.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
hintstringA hint to help resolve the error.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
span IdstringThe span within the trace that failed.
Auth required
Send one of
X-Api-KeyBearer JWT+X-Api-Key
The API key is always required; the bearer token is optional.
curl https://apiv2.example.com/api/v2/payment-intents/64870b5c-fb61-4c9a-955a-e148e0826c20 \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'X-Api-Key: YOUR_API_KEY'fetch('https://apiv2.example.com/api/v2/payment-intents/64870b5c-fb61-4c9a-955a-e148e0826c20', {
headers: {
Authorization: 'Bearer YOUR_ACCESS_TOKEN',
'X-Api-Key': 'YOUR_API_KEY'
}
})requests.get(
"https://apiv2.example.com/api/v2/payment-intents/64870b5c-fb61-4c9a-955a-e148e0826c20",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"X-Api-Key": "YOUR_API_KEY"
}
)package main
import (
"fmt"
"io"
"net/http"
)
func main() {
requestUrl := "https://apiv2.example.com/api/v2/payment-intents/64870b5c-fb61-4c9a-955a-e148e0826c20"
req, _ := http.NewRequest("GET", requestUrl, nil)
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Add("X-Api-Key", "YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}{
"paymentIntentId": "64870b5c-fb61-4c9a-955a-e148e0826c20",
"customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
"status": "SUCCEEDED",
"amountMinor": 2900,
"currency": "USD",
"description": "Mobile subscription renewal",
"dueAt": "2024-01-15T10:00:00Z",
"lineItems": [
{
"description": "Mobile subscription - Premium Plan",
"amountMinor": 2900,
"includesTax": false,
"subscriptionId": "a8174435-6378-4be5-a9f5-8b4aaadae5d4",
"licenseId": "ffb19d4f-b3b6-4f2b-9365-dd80bdcf0a77",
"discounts": [
{
"description": "Loyalty discount",
"amountMinor": 500
}
],
"taxes": [
{
"description": "VAT 25%",
"amountMinor": 725
}
]
}
],
"discounts": [
{
"description": "Goodwill credit",
"amountMinor": 1000
}
],
"attempts": [
{
"paymentAttemptId": "a4da2b04-aa79-4b40-8987-048d6caf118f",
"amountMinor": 2900,
"currency": "USD",
"result": "SUCCEEDED",
"reason": "card_declined",
"chargedAt": "2024-01-15T10:00:00Z",
"createdAt": "2024-01-15T10:00:00Z"
}
],
"refunds": [
{
"refundId": "c014b666-22e4-430e-bb18-9257a383dfe2",
"amountMinor": 2900,
"currency": "USD",
"reason": "REQUESTED_BY_CUSTOMER",
"status": "SUCCEEDED",
"createdAt": "2024-01-15T10:00:00Z"
}
],
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z"
}{
"message": "The request body is invalid.",
"code": "bad_request",
"details": [
{
"message": "Email format is invalid.",
"code": "invalid_email",
"property": "contact.email"
}
],
"hint": "Check the request payload and correct the highlighted fields."
}{
"message": "Authentication is required to access this resource.",
"code": "unauthorized",
"hint": "Provide a valid API key in the X-Api-Key header."
}{
"message": "You do not have permission to perform this action.",
"code": "forbidden",
"hint": "Ensure your API key or user has the required permissions."
}{
"message": "The requested customer could not be found.",
"code": "not_found",
"hint": "Verify the customerId and try again."
}{
"message": "An unexpected error occurred on the server.",
"code": "internal_server_error",
"hint": "Retry the request later. If the problem persists, contact support."
}