Update Invoice Payment
PUT/subscriptions/invoices/:invoice_uuid/payments/:payment_uuid
External payment methods are payment methods not offered by Elastic Path Subscriptions (such as Elastic Path Payments powered by Stripe or Authorize.net), but they can still be integrated with Subscriptions. You can use the Update Invoice Payment
endpoint to manually update a payment against an invoice where an external payment method is handling the payment of your invoices. See External Payments.
Request
Path Parameters
The unique identifier of the invoice.
The unique identifier of the payment.
- application/json
Body
data UpdateInvoicePaymentrequired
The unique identifier.
Possible values: [subscription_invoice_payment
]
This represents the type of resource object being returned. Always subscription_invoice_payment
.
attributes UpdateInvoicePaymentAttributesrequired
Whether the payment was successful.
Possible values: <= 1024 characters
An optional external ID that is specific to the gateway used.
A message generated by an external payment method that describes why a payment fails.
The date and time the invoice payment was taken at.
Responses
- 200
- 400
- 404
- 409
- 500
Success. Invoice payment has been updated.
- application/json
- Schema
- Example (from schema)
Schema
data SubscriptionInvoicePaymentrequired
The unique identifier.
Possible values: [subscription_invoice_payment
]
This represents the type of resource object being returned. Always subscription_invoice_payment
.
attributes SubscriptionInvoicePaymentAttributesrequired
Whether the payment was successful.
Whether the payment is pending (only for manual payments).
Possible values: <= 1024 characters
Specifies the payment gateway.
Possible values: <= 1024 characters
An optional external ID that is specific to the gateway used.
failure_detail object
The reason the payment failed.
amount SingleCurrencyPricerequired
A price in a single currency.
Possible values: <= 1024 characters
The three-letter ISO currency code in uppercase, associated with a price.
The value as a whole number of the currency's smallest subdivision.
Whether the amount includes any taxes.
meta SubscriptionInvoicePaymentMetarequired
The owner of a resource, either store
or organization
.
The unique identifier.
The unique identifier.
The unique identifier.
timestamps Timestampsrequired
The date and time a resource was updated.
The date and time a resource was created.
The date and time a payment was taken.
Whether manual payments are enabled or the payment will be handled by the configured gateway.
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "subscription_invoice_payment",
"attributes": {
"success": true,
"pending": true,
"gateway": "elastic_path_payments_stripe",
"external_payment_id": "33e7ec6b-8b34-4c92-a95b-2e2647922e47",
"failure_detail": {
"reason": "Card Failure"
},
"amount": {
"currency": "USD",
"amount": 100,
"includes_tax": false
}
},
"meta": {
"owner": "store",
"subscription_id": "00000000-0000-0000-0000-000000000000",
"invoice_id": "00000000-0000-0000-0000-000000000000",
"job_id": "00000000-0000-0000-0000-000000000000",
"timestamps": {
"updated_at": "2017-01-10T11:41:19.244842Z",
"created_at": "2017-01-10T11:41:19.244842Z",
"payment_taken_at": "2017-01-10T11:41:19.244842Z"
},
"manual_payment": false
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Validation Error",
"status": "400",
"detail": "data.attributes.name: \"name\" is required"
}
]
}
Not found. The requested entity does not exist.
- application/json
- Schema
- Example (from schema)
- not-found
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Not Found",
"status": "404",
"detail": "No plan found"
}
]
}
Write conflict. Unable to perform the operation at this time.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Write Conflict",
"status": "409"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Internal Server Error",
"status": "500"
}
]
}