Get subscription invoice payment
GEThttps://euwest.api.elasticpath.com/v2/subscriptions/subscriptions/:subscription_uuid/invoices/:invoice_uuid/payments/:payment_uuid
Gets a specific payment for a given invoice.
Request
Path Parameters
The unique identifier of the subscription.
The unique identifier of the invoice.
The unique identifier of the payment.
Responses
- 200
- 404
Success. Specific payment for the invoice is returned.
- application/json
- Schema
- Example (auto)
Schema
data SubscriptionInvoicePayment
The unique identifier.
11111111-2222-3333-4444-555555555555
This represents the type of resource object being returned. Always subscription_invoice_payment
.
Possible values: [subscription_invoice_payment
]
subscription_invoice_payment
attributes SubscriptionInvoicePaymentAttributesrequired
Whether the payment was successful.
true
Whether the payment is pending (only for manual payments).
true
Specifies the payment gateway.
Possible values: <= 1024 characters
elastic_path_payments_stripe
An optional external ID that is specific to the gateway used.
Possible values: <= 1024 characters
33e7ec6b-8b34-4c92-a95b-2e2647922e47
failure_detail object
The reason the payment failed.
Card Failure
amount SingleCurrencyPricerequired
A price in a single currency.
The three-letter ISO currency code in uppercase, associated with a price.
Possible values: <= 1024 characters
USD
The value as a whole number of the currency's smallest subdivision.
100
Whether the amount includes any taxes.
true
meta SubscriptionInvoicePaymentMetarequired
The owner of a resource, either store
or organization
.
store
The unique identifier.
11111111-2222-3333-4444-555555555555
The unique identifier.
11111111-2222-3333-4444-555555555555
The unique identifier.
11111111-2222-3333-4444-555555555555
timestamps InvoicePaymentTimestamps
The date and time a resource was updated.
2017-01-10T11:41:19.244842Z
The date and time a resource was created.
2017-01-10T11:41:19.244842Z
The date and time a payment was taken.
2017-01-10T11:41:19.244842Z
Whether manual payments are enabled or the payment will be handled by the configured gateway.
false
{
"data": {
"id": "11111111-2222-3333-4444-555555555555",
"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": "11111111-2222-3333-4444-555555555555",
"invoice_id": "11111111-2222-3333-4444-555555555555",
"job_id": "11111111-2222-3333-4444-555555555555",
"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
}
}
}
Not found. The requested entity does not exist.
- application/json
- Schema
- Example (auto)
- not-found
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
500
A brief summary of the error.
Internal server error
Optional additional detail about the error.
An internal error has occurred.
Additional supporting meta data for the error.
{"missing_ids":["e7d50bd5-1833-43c0-9848-f9d325b08be8"]}
{
"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"
}
]
}
Authorization: http
name: BearerTokentype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://euwest.api.elasticpath.com/v2/subscriptions/subscriptions/:subscription_uuid/invoices/:invoice_uuid/payments/:payment_uuid");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());