- Retrieve an order
Retrieves an order with a specified ID.
Expand a response to receive a full related object in the _embedded path.
To expand multiple objects, use a comma-separated list. Example: expand=customer,activationInvoice.
Available arguments are:
customeractivationInvoicerecentInvoiceupcomingInvoicepaymentInstrumentwebsite
For more information, see Embedded resources.
- Mock serverhttps://www.rebilly.com/_mock/catalog/all/orders/{id}
- Sandbox serverhttps://api-sandbox.rebilly.com/organizations/{organizationId}/orders/{id}
- Live serverhttps://api.rebilly.com/organizations/{organizationId}/orders/{id}
- SecretApiKey
- JWT
- ApplicationJWT
curl -i -X GET \
'https://www.rebilly.com/_mock/catalog/all/orders/{id}?expand=string' \
-H 'REB-APIKEY: YOUR_API_KEY_HERE'Order retrieved.
Unique organization identifier. An organization is an entity that represents a company. For more information, see Obtain an organization ID.
ID of the customer resource.
ID of the website. A website is where an organization obtains a customer. For more information, see Obtain an organization ID and website ID.
ID of the activation invoice.
ID of the most recently issued invoice. The invoice might not be paid yet.
Status of the order.
Details of the trial. To use plan defaults, omit the trial key or set this value to null.
Specifies if a subscription ends after a trial period. If this value is true, recurring settings are ignored.
Date and time when the subscription had a trial conversion. Trial conversion occurs when the first successful payment is made after a trial period.
Invoice issue time shift interval in ISO-8601 format.
This field adjusts the issue date and time of renewal invoices for the order.
This interval value supports the - symbol.
Invoice due time shift interval in ISO-8601 format.
Use this field to adjust when payment is due for the order. If autopay is configured, payment is collected automatically on this date.
This interval value supports the + symbol.
ID of the payment instrument to use for autopay. If this value is not provided, or if the payment instrument is inactive, the customer's default payment instrument is used.
Purchase order number that is displayed on the issued invoices.
Length of time, in ISO-8601 durations format, which is added to the due time of the order when setting the delinquency time for all related invoices. When the delinquency time of an invoice is reached, the order is automatically canceled.
If the provided value is null, the order does not change state.
Date and time when the subscription starts. If this value is null, the current time is used. This value cannot be more than one service period in the past.
Specifies if payment attempts are made automatically. If autopay is enabled, the payment is retrieved from the customer on the renewal date using the payment instrument that is set at paymentInstrumentId, or the default payment instrument on the order.
Date and time when the pending order is automatically abandoned. If this value is not passed during order creation, a pending order TTL setting is used to calculate the value.
Date and time when the abandon order reminder event triggers.
Number of abandon order reminder events that are triggered.
Specifies who initiated the cancellation.
Category of the cancellation.
Description of the cancellation reason in free form.
Customer JWT to access a billing portal. This field is presented only if a billing portal exists. This is an experimental field and can be changed or removed in the future.
Use custom fields to extend a resource scheme to include custom data that is not provided as a common field. For more information, see Custom fields.
{ "foo": "bar" }
Number of times the order data has been modified.
The revision is useful when analyzing webhook data to determine if the change takes precedence over the current representation.
Date and time of the current service period start.
Date and time of the current service period end. If subscriptions have different recurring settings or the order is not active, providing this field causes the request to be rejected with a conflict. This field is ignored if the order is in trial.
Date and time when the next subscription in this recurring order renews.
Date and time when the resource is created. This value is set automatically when the resource is created.
Date and time when the resource is updated. This value is set automatically when the resource is updated.
- recurring
- one-time
{ "id": "ord_01HVKA5975PJBSQ1SX72G3MSZC", "type": "recurring", "organizationId": "org_0YVDM8RC7GDADADSBSMW124JA8", "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG", "activationInvoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT", "recentInvoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT", "status": "pending", "inTrial": true, "trial": { "enabled": true, "endTime": "2019-08-24T14:15:22Z" }, "isTrialOnly": false, "trialConversionTime": "2019-08-24T14:15:22Z", "items": [ { … } ], "invoiceIssueTimeShift": "+P00Y00M00DT00H00M00S", "invoiceDueTimeShift": "+P00Y00M00DT00H00M00S", "paymentInstrumentId": "inst_0YVB8KPKNXCBR9EDX7JHSED75N", "poNumber": "PO123456", "notes": "string", "billingAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "phoneNumbers": [ … ], "emails": [ … ], "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "deliveryAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "phoneNumbers": [ … ], "emails": [ … ], "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "delinquencyPeriod": "+P00Y00M07DT00H00M00S", "riskMetadata": { "ipAddress": "93.92.91.90", "fingerprint": "pIUt3xbgX3l9g3YDiLbx", "httpHeaders": { … }, "browserData": { … }, "extraData": { … }, "isProxy": true, "isVpn": true, "isTor": true, "isHosting": true, "hostingName": "string", "isp": "string", "country": "US", "region": "NY", "city": "New York", "latitude": 0.1, "longitude": 0, "postalCode": "string", "timeZone": "America/New_York", "accuracyRadius": 0, "distance": 0, "hasMismatchedBillingAddressCountry": true, "hasMismatchedBankCountry": true, "hasMismatchedTimeZone": true, "hasMismatchedHolderName": true, "hasFakeName": true, "isHighRiskCountry": true, "paymentInstrumentVelocity": 0, "declinedPaymentInstrumentVelocity": 0, "deviceVelocity": 0, "ipVelocity": 0, "emailVelocity": 0, "billingAddressVelocity": 0, "paymentInstrumentApprovedTransactionCount": 0, "score": 0 }, "startTime": null, "activationTime": "2019-08-24T14:15:22Z", "currency": "USD", "shipping": { "amount": 0.1, "calculator": "manual" }, "autopay": true, "abandonTime": "2019-08-24T14:15:22Z", "abandonReminderTime": "2019-08-24T14:15:22Z", "abandonReminderNumber": 0, "voidTime": "2019-08-24T14:15:22Z", "churnTime": "2019-08-24T14:15:22Z", "cancellationTime": "2019-08-24T14:15:22Z", "canceledBy": "merchant", "cancelCategory": "billing-failure", "cancelDescription": "string", "billingPortalToken": "string", "customFields": { "foo": "bar" }, "mrr": 49.95, "revision": 0, "currentPeriodStart": "2019-08-24T14:15:22Z", "currentPeriodEnd": "2019-08-24T14:15:22Z", "renewalTime": "2019-08-24T14:15:22Z", "isNewOrder": true, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ { … } ], "_embedded": { "customer": { … }, "activationInvoice": { … }, "recentInvoice": { … }, "upcomingInvoice": { … }, "paymentInstrument": { … }, "website": { … } } }