Properties
- Name
object
- Type
- string
- Description
Type of object is always
order
.
- Name
id
- Type
- string
- Description
Unique identifier for the order.
Example:ord_0SNlurA049MEWV0SiRFOw0dmChqN
- Name
addons
- Type
- array
- Description
List of add-ons that are part of the order, if any.
- Name
discount
- Type
- object
- Description
- The total discount applied to this order.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
- Name
lastPayment
- Type
- nullable object
- Description
- State of the latest payment attempt for a `subscription` or `order`.
- Name
object
- Type
- string
- Description
Type of object is always
payment
.
required- Name
id
- Type
- string
- Description
Unique identifier for the payment.
Example:pay_0SNlurA049MEWV2HRA0slWFuS8DV
required- Name
amount
- Type
- object
- Description
- The total amount paid.
required- Name
discount
- Type
- object
- Description
- The total discount applied to this payment.
required- Name
disputeOutcome
- Type
- nullable string
- Description
The outcome of a payment dispute. Otherwise
null
.Allowed values:, lost, won
required- Name
failedAttempts
- Type
- integer
- Description
The number of failed payment attempts so far.
Example:3
>= 0
required- Name
failureCode
- Type
- nullable string
- Description
An error code indicating the reason for the payment failure.
Example:paymentCardDeclined
required- Name
failureMessage
- Type
- nullable string
- Description
A human-readable message indicating the reason for the payment failure.
Example:The card has been declined.
required- Name
invoiceNumber
- Type
- string
- Description
The number of the invoice from the payment provider
Example:B74BDB55-0555
required- Name
method
- Type
- nullable object
- Description
- The payment method describes how a payment can be made.
required- Name
reason
- Type
- string
- Description
The reason for this payment.
Allowed values:subscriptionCreation, subscriptionRenewal, other
required- Name
receipt
- Type
- nullable string
- Description
The URL of a PDF receipt. The URL and the content it links to might change whenever the payment transitions to another state. The URL is signed, but care should be taken when sharing it, as it is publicly accessible.
Example:https://files.gigs.com/receipts/pay_0SNlurA049MEWV2HRA0slWFuS8DV.pdf
required- Name
references
- Type
- array
- Description
List of payment references. Supported reference types are
order
andsubscription
.
required- Name
refunded
- Type
- object
- Description
- The sum of all refunds related to this payment. Cannot be greater than the paid sum.
required- Name
status
- Type
- string
- Description
The status of the payment. Can be
succeeded
,requiresConfirmation
,failed
,refunded
ordisputed
.Allowed values:succeeded, requiresConfirmation, failed, refunded, disputed, requiresPaymentMethod
required- Name
subtotal
- Type
- object
- Description
- The total amount to be paid before any applied discounts.
required- Name
taxes
- Type
- array PREVIEW
- Description
List of taxes.
Example:[object Object]
required- Name
total
- Type
- object PREVIEW
- Description
- The total amount paid.
required- Name
user
- Type
- object
- Description
required- Name
voucher
- Type
- nullable object
- Description
- Voucher applied to the payment.
required- Name
voucherCode
- Type
- nullable object
- Description
- Voucher code applied to the payment.
required- Name
attemptedAt
- Type
- string
- Description
Time when the payment was last attempted.
Example:2021-02-14T19:38:34Z
required- Name
createdAt
- Type
- string
- Description
Time when the payment was created.
Example:2021-02-14T19:38:34Z
required- Name
disputeClosedAt
- Type
- nullable string
- Description
Time when the payment dispute was closed. Otherwise
null
.Example:2021-02-14T19:38:34Z
required- Name
refundedAt
- Type
- nullable string
- Description
Time when the payment was fully refunded. Otherwise
null
.Example:2021-02-14T19:38:34Z
required
- Name
plan
- Type
- nullable object
- Description
- Plan that is part of the order, if any.
- Name
object
- Type
- string
- Description
Type of object is always
plan
.
required- Name
id
- Type
- string
- Description
Unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
allowances
- Type
- object
- Description
- The allowances included in the plan.
required- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
required- Name
data
- Type
- integer DEPRECATED
- Description
The data allowance in bytes included in this plan. A value of
-1
indicates unlimited data.Example:10000000000
required- Name
dataUnit
- Type
- string DEPRECATED
- Description
The unit of the data value is always
byte
.
required- Name
description
- Type
- nullable string
- Description
The plan's description, meant to be displayable to the users.
Example:A data plan you will love! Operates in most countries of the world.
required- Name
image
- Type
- nullable string
- Description
The plan's image, meant to be displayable to the users.
Example:https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
required- Name
limits
- Type
- object
- Description
- The limitations of the plan.
required- Name
name
- Type
- string
- Description
The plan's name, meant to be displayable to the users.
Example:Gigs Global
required- Name
price
- Type
- object
- Description
- The price of the plan.
required- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this plan.
Example:p5
required- Name
requirements
- Type
- object
- Description
required- Name
simTypes
- Type
- array
- Description
List of SIM types supported by this plan. Can be
eSIM
,pSIM
, or both.Example:eSIM,pSIM
required- Name
sms
- Type
- integer DEPRECATED
- Description
The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
The unit of the sms value is always
message
.
required- Name
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
required- Name
validity
- Type
- object
- Description
- The validity of the plan.
required- Name
voice
- Type
- integer DEPRECATED
- Description
The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
The unit of the voice value is always
second
.
required- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
required
- Name
price
- Type
- object
- Description
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
- Name
status
- Type
- string
- Description
The current status of the order. Every order starts in status
pending
and can transition to the final statescompleted
orcanceled
. A possible intermediate status ispaid
.Allowed values:canceled, completed, paid, pending, quoted
- Name
subscription
- Type
- nullable string
- Description
The unique identifier for the subscription that the order applies to, if any. Orders for new plans will not have a subscription until they are confirmed.
Example:sub_0SNlurA049MEWV2gSfSxi00xlPIi
- Name
subscriptionAddons
- Type
- array
- Description
List of unique identifiers for the subscription add-ons that the order applies to, if any.
- Name
subscriptionDetails
- Type
- nullable object
- Description
- The details of the subscription that will be created as result of this order. Present for quoted orders for new plans.
- Name
sim
- Type
- nullable string
- Description
The unique identifier of the SIM, if any.
Example:sim_0SNlurA049MEWV1BAAmWZULA4lf6
- Name
address
- Type
- nullable string
- Description
The unique identifier of the address, if any.
Example:adr_0SNlurA049MEWV5ELDmnaqVXgTFT
- Name
device
- Type
- nullable string
- Description
The unique identifier of the device, if any.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
- Name
deviceModel
- Type
- nullable string
- Description
The unique identifier of the device model, if any.
Example:dmd_0SNlurA04OUskUGfGAn3Rh
- Name
porting
- Type
- nullable string
- Description
The unique identifier of the porting, if any.
Example:prt_0SNlurA049MEWV39s2kSYqaat7ZS
- Name
subtotal
- Type
- object
- Description
- The total amount to be paid before any applied discounts and taxes.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
- Name
taxes
- Type
- array PREVIEW
- Description
List of taxes applied, aggregated by tax.
- Name
user
- Type
- object
- Description
- User the order belongs to.
- Name
object
- Type
- string
- Description
Type of object is always
user
.
required- Name
id
- Type
- string
- Description
Unique identifier for the user.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
birthday
- Type
- nullable string
- Description
The birthday of the user.
Example:2017-07-21
required- Name
email
- Type
- string
- Description
The primary email address of the user.
Example:jerry@example.com
required- Name
emailVerified
- Type
- boolean
- Description
Whether the user's primary email address is verified or not.
Example:true
required- Name
fullName
- Type
- nullable string
- Description
The user's full name. Required for some Plans.
Example:Jerry Seinfeld
required- Name
preferredLocale
- Type
- string
- Description
The user's locale preference represented as an IETF language tag.
Example:en-US
required- Name
createdAt
- Type
- string
- Description
Time when the user was created.
Example:2021-01-21T19:38:34Z
required
- Name
voucher
- Type
- nullable object
- Description
- Voucher applied to the order, if any.
- Name
object
- Type
- string
- Description
Type of object is always
voucher
.
required- Name
id
- Type
- string
- Description
Unique identifier for the voucher.
Example:vou_0SNlurA049MEWV0h2jfjkdiOdplN
required- Name
name
- Type
- string
- Description
The voucher's name.
Example:Monthly Basic 15%
required- Name
priceDiscount
- Type
- nullable object
- Description
- The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
required- Name
priceDiscountPercentage
- Type
- nullable number
- Description
The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
Example:30.12
>= 1
<= 100
required- Name
recurrence
- Type
- object
- Description
- Details on whether and for how long the discounts applied via the voucher recur.
required- Name
redemptions
- Type
- integer
- Description
Number of times the voucher has been redeemed.
Example:2
required- Name
restrictions
- Type
- object
- Description
- Conditions under which the voucher can be used.
required- Name
retiredReason
- Type
- nullable string
- Description
Label indicating the reason why the voucher is retired.
Allowed values:, manualAction, expired, maxRedemptionsReached, unknown
required- Name
status
- Type
- string
- Description
- Allowed values:
available, retired
required- Name
createdAt
- Type
- string
- Description
Time when the voucher was created.
Example:2021-02-14T19:38:34Z
required
- Name
createdAt
- Type
- string
- Description
Time when the order was created.
Example:2021-01-21T19:38:34Z
Response
{
"object": "order",
"id": "ord_0SNlurA049MEWV0SiRFOw0dmChqN",
"discount": {
"amount": 999,
"currency": "USD"
},
"lastPayment": {
"object": "payment",
"id": "pay_0SNlurA049MEWV2HRA0slWFuS8DV",
"amount": {
"amount": 999,
"currency": "USD"
},
"discount": {
"amount": 999,
"currency": "USD"
},
"disputeOutcome": null,
"failedAttempts": 3,
"failureCode": "paymentCardDeclined",
"failureMessage": "The card has been declined.",
"invoiceNumber": "B74BDB55-0555",
"method": {
"object": "paymentMethod",
"id": "pm_1IHCiiI2m82Dc6YnhqGWH6JX",
"brand": "visa",
"last4": "4242",
"provider": "stripe",
"status": "available",
"type": "card",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"createdAt": "2021-02-14T19:38:34Z"
},
"reason": "subscriptionCreation",
"receipt": "https://files.gigs.com/receipts/pay_0SNlurA049MEWV2HRA0slWFuS8DV.pdf",
"refunded": {
"amount": 999,
"currency": "USD"
},
"status": "succeeded",
"subtotal": {
"amount": 999,
"currency": "USD"
},
"taxes": [
{
"object": "tax",
"inclusive": false,
"name": "State Sales Tax",
"value": {
"amount": 90,
"currency": "USD"
}
}
],
"total": {
"amount": 999,
"currency": "USD"
},
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"birthday": "2017-07-21",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"createdAt": "2021-01-21T19:38:34Z"
},
"voucher": {
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once"
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z"
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
},
"voucherCode": {
"object": "voucherCode",
"id": "voc_0SNlurA049MEWV0Q5vaTJnKoXc1v",
"code": "BlackFriday22",
"redemptions": 2,
"restrictions": {
"firstTimeTransaction": true,
"minimumPrice": {
"amount": 999,
"currency": "USD"
},
"expiresAt": "2021-04-14T19:38:34Z"
},
"retiredReason": null,
"status": "active",
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"createdAt": "2021-02-14T19:38:34Z"
},
"attemptedAt": "2021-02-14T19:38:34Z",
"createdAt": "2021-02-14T19:38:34Z",
"disputeClosedAt": "2021-02-14T19:38:34Z",
"refundedAt": "2021-02-14T19:38:34Z"
},
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"data": 10000000000,
"dataUnit": "byte",
"description": "A data plan you will love! Operates in most countries of the world.",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"sms": 100,
"smsUnit": "message",
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:38:34Z"
},
"price": {
"amount": 999,
"currency": "USD"
},
"status": "canceled",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"subscriptionDetails": {
"sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"device": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"deviceModel": "dmd_0SNlurA04OUskUGfGAn3Rh",
"porting": "prt_0SNlurA049MEWV39s2kSYqaat7ZS"
},
"subtotal": {
"amount": 999,
"currency": "USD"
},
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"birthday": "2017-07-21",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"createdAt": "2021-01-21T19:38:34Z"
},
"voucher": {
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once"
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z"
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
},
"createdAt": "2021-01-21T19:38:34Z"
}
Retrieve an order
Retrieves the details of an existing order. You need only supply the unique order identifier that was returned upon order creation.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
id
- Type
- string
- Description
The unique identifier for the order.
Example:ord_0SNlurA049MEWV0SiRFOw0dmChqN
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
order
.
required- Name
id
- Type
- string
- Description
Unique identifier for the order.
Example:ord_0SNlurA049MEWV0SiRFOw0dmChqN
required- Name
addons
- Type
- array
- Description
List of add-ons that are part of the order, if any.
required- Name
discount
- Type
- object
- Description
- The total discount applied to this order.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
required- Name
lastPayment
- Type
- nullable object
- Description
- State of the latest payment attempt for a `subscription` or `order`.
- Name
object
- Type
- string
- Description
Type of object is always
payment
.
required- Name
id
- Type
- string
- Description
Unique identifier for the payment.
Example:pay_0SNlurA049MEWV2HRA0slWFuS8DV
required- Name
amount
- Type
- object
- Description
- The total amount paid.
required- Name
discount
- Type
- object
- Description
- The total discount applied to this payment.
required- Name
disputeOutcome
- Type
- nullable string
- Description
The outcome of a payment dispute. Otherwise
null
.Allowed values:, lost, won
required- Name
failedAttempts
- Type
- integer
- Description
The number of failed payment attempts so far.
Example:3
>= 0
required- Name
failureCode
- Type
- nullable string
- Description
An error code indicating the reason for the payment failure.
Example:paymentCardDeclined
required- Name
failureMessage
- Type
- nullable string
- Description
A human-readable message indicating the reason for the payment failure.
Example:The card has been declined.
required- Name
invoiceNumber
- Type
- string
- Description
The number of the invoice from the payment provider
Example:B74BDB55-0555
required- Name
method
- Type
- nullable object
- Description
- The payment method describes how a payment can be made.
required- Name
reason
- Type
- string
- Description
The reason for this payment.
Allowed values:subscriptionCreation, subscriptionRenewal, other
required- Name
receipt
- Type
- nullable string
- Description
The URL of a PDF receipt. The URL and the content it links to might change whenever the payment transitions to another state. The URL is signed, but care should be taken when sharing it, as it is publicly accessible.
Example:https://files.gigs.com/receipts/pay_0SNlurA049MEWV2HRA0slWFuS8DV.pdf
required- Name
references
- Type
- array
- Description
List of payment references. Supported reference types are
order
andsubscription
.
required- Name
refunded
- Type
- object
- Description
- The sum of all refunds related to this payment. Cannot be greater than the paid sum.
required- Name
status
- Type
- string
- Description
The status of the payment. Can be
succeeded
,requiresConfirmation
,failed
,refunded
ordisputed
.Allowed values:succeeded, requiresConfirmation, failed, refunded, disputed, requiresPaymentMethod
required- Name
subtotal
- Type
- object
- Description
- The total amount to be paid before any applied discounts.
required- Name
taxes
- Type
- array PREVIEW
- Description
List of taxes.
Example:[object Object]
required- Name
total
- Type
- object PREVIEW
- Description
- The total amount paid.
required- Name
user
- Type
- object
- Description
required- Name
voucher
- Type
- nullable object
- Description
- Voucher applied to the payment.
required- Name
voucherCode
- Type
- nullable object
- Description
- Voucher code applied to the payment.
required- Name
attemptedAt
- Type
- string
- Description
Time when the payment was last attempted.
Example:2021-02-14T19:38:34Z
required- Name
createdAt
- Type
- string
- Description
Time when the payment was created.
Example:2021-02-14T19:38:34Z
required- Name
disputeClosedAt
- Type
- nullable string
- Description
Time when the payment dispute was closed. Otherwise
null
.Example:2021-02-14T19:38:34Z
required- Name
refundedAt
- Type
- nullable string
- Description
Time when the payment was fully refunded. Otherwise
null
.Example:2021-02-14T19:38:34Z
required
required- Name
plan
- Type
- nullable object
- Description
- Plan that is part of the order, if any.
- Name
object
- Type
- string
- Description
Type of object is always
plan
.
required- Name
id
- Type
- string
- Description
Unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
allowances
- Type
- object
- Description
- The allowances included in the plan.
required- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
required- Name
data
- Type
- integer DEPRECATED
- Description
The data allowance in bytes included in this plan. A value of
-1
indicates unlimited data.Example:10000000000
required- Name
dataUnit
- Type
- string DEPRECATED
- Description
The unit of the data value is always
byte
.
required- Name
description
- Type
- nullable string
- Description
The plan's description, meant to be displayable to the users.
Example:A data plan you will love! Operates in most countries of the world.
required- Name
image
- Type
- nullable string
- Description
The plan's image, meant to be displayable to the users.
Example:https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
required- Name
limits
- Type
- object
- Description
- The limitations of the plan.
required- Name
name
- Type
- string
- Description
The plan's name, meant to be displayable to the users.
Example:Gigs Global
required- Name
price
- Type
- object
- Description
- The price of the plan.
required- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this plan.
Example:p5
required- Name
requirements
- Type
- object
- Description
required- Name
simTypes
- Type
- array
- Description
List of SIM types supported by this plan. Can be
eSIM
,pSIM
, or both.Example:eSIM,pSIM
required- Name
sms
- Type
- integer DEPRECATED
- Description
The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
The unit of the sms value is always
message
.
required- Name
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
required- Name
validity
- Type
- object
- Description
- The validity of the plan.
required- Name
voice
- Type
- integer DEPRECATED
- Description
The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
The unit of the voice value is always
second
.
required- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
required
required- Name
price
- Type
- object
- Description
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
required- Name
status
- Type
- string
- Description
The current status of the order. Every order starts in status
pending
and can transition to the final statescompleted
orcanceled
. A possible intermediate status ispaid
.Allowed values:canceled, completed, paid, pending, quoted
required- Name
subscription
- Type
- nullable string
- Description
The unique identifier for the subscription that the order applies to, if any. Orders for new plans will not have a subscription until they are confirmed.
Example:sub_0SNlurA049MEWV2gSfSxi00xlPIi
required- Name
subscriptionAddons
- Type
- array
- Description
List of unique identifiers for the subscription add-ons that the order applies to, if any.
required- Name
subscriptionDetails
- Type
- nullable object
- Description
- The details of the subscription that will be created as result of this order. Present for quoted orders for new plans.
- Name
sim
- Type
- nullable string
- Description
The unique identifier of the SIM, if any.
Example:sim_0SNlurA049MEWV1BAAmWZULA4lf6
- Name
address
- Type
- nullable string
- Description
The unique identifier of the address, if any.
Example:adr_0SNlurA049MEWV5ELDmnaqVXgTFT
- Name
device
- Type
- nullable string
- Description
The unique identifier of the device, if any.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
- Name
deviceModel
- Type
- nullable string
- Description
The unique identifier of the device model, if any.
Example:dmd_0SNlurA04OUskUGfGAn3Rh
- Name
porting
- Type
- nullable string
- Description
The unique identifier of the porting, if any.
Example:prt_0SNlurA049MEWV39s2kSYqaat7ZS
required- Name
subtotal
- Type
- object
- Description
- The total amount to be paid before any applied discounts and taxes.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
required- Name
taxes
- Type
- array PREVIEW
- Description
List of taxes applied, aggregated by tax.
required- Name
user
- Type
- object
- Description
- User the order belongs to.
- Name
object
- Type
- string
- Description
Type of object is always
user
.
required- Name
id
- Type
- string
- Description
Unique identifier for the user.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
birthday
- Type
- nullable string
- Description
The birthday of the user.
Example:2017-07-21
required- Name
email
- Type
- string
- Description
The primary email address of the user.
Example:jerry@example.com
required- Name
emailVerified
- Type
- boolean
- Description
Whether the user's primary email address is verified or not.
Example:true
required- Name
fullName
- Type
- nullable string
- Description
The user's full name. Required for some Plans.
Example:Jerry Seinfeld
required- Name
preferredLocale
- Type
- string
- Description
The user's locale preference represented as an IETF language tag.
Example:en-US
required- Name
createdAt
- Type
- string
- Description
Time when the user was created.
Example:2021-01-21T19:38:34Z
required
required- Name
voucher
- Type
- nullable object
- Description
- Voucher applied to the order, if any.
- Name
object
- Type
- string
- Description
Type of object is always
voucher
.
required- Name
id
- Type
- string
- Description
Unique identifier for the voucher.
Example:vou_0SNlurA049MEWV0h2jfjkdiOdplN
required- Name
name
- Type
- string
- Description
The voucher's name.
Example:Monthly Basic 15%
required- Name
priceDiscount
- Type
- nullable object
- Description
- The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
required- Name
priceDiscountPercentage
- Type
- nullable number
- Description
The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
Example:30.12
>= 1
<= 100
required- Name
recurrence
- Type
- object
- Description
- Details on whether and for how long the discounts applied via the voucher recur.
required- Name
redemptions
- Type
- integer
- Description
Number of times the voucher has been redeemed.
Example:2
required- Name
restrictions
- Type
- object
- Description
- Conditions under which the voucher can be used.
required- Name
retiredReason
- Type
- nullable string
- Description
Label indicating the reason why the voucher is retired.
Allowed values:, manualAction, expired, maxRedemptionsReached, unknown
required- Name
status
- Type
- string
- Description
- Allowed values:
available, retired
required- Name
createdAt
- Type
- string
- Description
Time when the voucher was created.
Example:2021-02-14T19:38:34Z
required
required- Name
createdAt
- Type
- string
- Description
Time when the order was created.
Example:2021-01-21T19:38:34Z
required
Request
curl https://api.gigs.com/projects/{project}/orders/{id} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Responses
{
"object": "order",
"id": "ord_0SNlurA049MEWV0SiRFOw0dmChqN",
"addons": [
{
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"data": 10000000000,
"dataUnit": "byte",
"description": "Disable international roaming.",
"name": "1GB Data Top-up",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"recurrenceType": "oneTime",
"sms": 100,
"smsUnit": "message",
"status": "draft",
"type": "topUp",
"validity": {
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:12:28Z"
}
],
"discount": {
"amount": 999,
"currency": "USD"
},
"lastPayment": {
"object": "payment",
"id": "pay_0SNlurA049MEWV2HRA0slWFuS8DV",
"amount": {
"amount": 990,
"currency": "USD"
},
"discount": {
"amount": 100,
"currency": "USD"
},
"disputeOutcome": null,
"failedAttempts": 3,
"failureCode": "paymentCardDeclined",
"failureMessage": "The card has been declined.",
"invoiceNumber": "B74BDB55-0555",
"method": {
"object": "paymentMethod",
"id": "pm_1IHCiiI2m82Dc6YnhqGWH6JX",
"brand": "visa",
"clientSecret": null,
"last4": "4242",
"provider": "stripe",
"status": "available",
"type": "card",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"createdAt": "2021-02-14T19:38:34Z"
},
"reason": "subscriptionCreation",
"receipt": "https://files.gigs.com/receipts/pay_0SNlurA049MEWV2HRA0slWFuS8DV.pdf",
"references": [
{
"object": "order",
"id": "ord_0SNlurA049MEWV0SiRFOw0dmChqN"
}
],
"refunded": {
"amount": 0,
"currency": "USD"
},
"status": "succeeded",
"subtotal": {
"amount": 1000,
"currency": "USD"
},
"taxes": [
{
"object": "tax",
"inclusive": false,
"name": "State Sales Tax",
"value": {
"amount": 90,
"currency": "USD"
}
}
],
"total": {
"amount": 990,
"currency": "USD"
},
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"createdAt": "2021-01-21T19:38:34Z"
},
"voucher": {
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 100,
"currency": "USD"
},
"priceDiscountPercentage": null,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z",
"maximumRedemptions": null
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
},
"voucherCode": {
"object": "voucherCode",
"id": "voc_0SNlurA049MEWV0Q5vaTJnKoXc1v",
"code": "BlackFriday22",
"redemptions": 2,
"restrictions": {
"firstTimeTransaction": true,
"maximumRedemptions": null,
"minimumPrice": {
"amount": 999,
"currency": "USD"
},
"expiresAt": "2021-04-14T19:38:34Z"
},
"retiredReason": null,
"status": "active",
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"createdAt": "2021-02-14T19:38:34Z"
},
"attemptedAt": "2021-02-14T19:38:34Z",
"createdAt": "2021-02-14T19:38:34Z",
"disputeClosedAt": "2021-02-14T19:38:34Z",
"refundedAt": "2021-02-14T19:38:34Z"
},
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"data": 10000000000,
"dataUnit": "byte",
"description": "A data plan you will love! Operates in most countries of the world.",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": null,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"sms": 100,
"smsUnit": "message",
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:38:34Z"
},
"price": {
"amount": 999,
"currency": "USD"
},
"status": "canceled",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"subscriptionAddons": [
"sad_0SNlurA049MEWV2UNWPbDfW5B40U"
],
"subscriptionDetails": {
"sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"device": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"deviceModel": "dmd_0SNlurA04OUskUGfGAn3Rh",
"porting": "prt_0SNlurA049MEWV39s2kSYqaat7ZS"
},
"subtotal": {
"amount": 999,
"currency": "USD"
},
"taxes": [
{
"object": "tax",
"inclusive": false,
"name": "State Sales Tax",
"value": {
"amount": 100,
"currency": "USD"
}
}
],
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"createdAt": "2021-01-21T19:38:34Z"
},
"voucher": {
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z",
"maximumRedemptions": null
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
},
"createdAt": "2021-01-21T19:38:34Z"
}
List all orders
Returns a list of orders. The orders returned are sorted by creation date, with the most recently created orders appearing first.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Query Parameters
- Name
status
- Type
- array
- Description
The status to filter the orders by.
- Name
user
- Type
- string
- Description
The unique identifier for the user to be filtered by.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
- Name
after
- Type
- string
- Description
A cursor for use in pagination. The
after
parameter takes an object ID that defines the position in the list, only items immediately following the item with that ID will be returned.
- Name
before
- Type
- string
- Description
A cursor for use in pagination. The
before
parameter takes an object ID that defines the position in the list, only items immediately preceding the item with that ID will be returned.
- Name
limit
- Type
- integer
- Description
The limit of items to be returned in the list, between 0 and 200.
Default:10
>= 0
<= 200
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
list
.
required- Name
items
- Type
- array
- Description
List of objects of type
order
.
required- Name
moreItemsAfter
- Type
- nullable string
- Description
A unique identifier to be used as
after
pagination parameter if more items are available sorted after the current batch of items.
required- Name
moreItemsBefore
- Type
- nullable string
- Description
A unique identifier to be used as
before
pagination parameter if more items are available sorted before the current batch of items.
required
Request
curl https://api.gigs.com/projects/{project}/orders \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Responses
{
"object": "list",
"items": [
{
"object": "order",
"id": "ord_0SNlurA049MEWV0SiRFOw0dmChqN",
"addons": [
{
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"data": 10000000000,
"dataUnit": "byte",
"description": "Disable international roaming.",
"name": "1GB Data Top-up",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"recurrenceType": "oneTime",
"sms": 100,
"smsUnit": "message",
"status": "draft",
"type": "topUp",
"validity": {
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:12:28Z"
}
],
"discount": {
"amount": 999,
"currency": "USD"
},
"lastPayment": {
"object": "payment",
"id": "pay_0SNlurA049MEWV2HRA0slWFuS8DV",
"amount": {
"amount": 990,
"currency": "USD"
},
"discount": {
"amount": 100,
"currency": "USD"
},
"disputeOutcome": null,
"failedAttempts": 3,
"failureCode": "paymentCardDeclined",
"failureMessage": "The card has been declined.",
"invoiceNumber": "B74BDB55-0555",
"method": {
"object": "paymentMethod",
"id": "pm_1IHCiiI2m82Dc6YnhqGWH6JX",
"brand": "visa",
"clientSecret": null,
"last4": "4242",
"provider": "stripe",
"status": "available",
"type": "card",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"createdAt": "2021-02-14T19:38:34Z"
},
"reason": "subscriptionCreation",
"receipt": "https://files.gigs.com/receipts/pay_0SNlurA049MEWV2HRA0slWFuS8DV.pdf",
"references": [
{
"object": "order",
"id": "ord_0SNlurA049MEWV0SiRFOw0dmChqN"
}
],
"refunded": {
"amount": 0,
"currency": "USD"
},
"status": "succeeded",
"subtotal": {
"amount": 1000,
"currency": "USD"
},
"taxes": [
{
"object": "tax",
"inclusive": false,
"name": "State Sales Tax",
"value": {
"amount": 90,
"currency": "USD"
}
}
],
"total": {
"amount": 990,
"currency": "USD"
},
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"createdAt": "2021-01-21T19:38:34Z"
},
"voucher": {
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 100,
"currency": "USD"
},
"priceDiscountPercentage": null,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z",
"maximumRedemptions": null
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
},
"voucherCode": {
"object": "voucherCode",
"id": "voc_0SNlurA049MEWV0Q5vaTJnKoXc1v",
"code": "BlackFriday22",
"redemptions": 2,
"restrictions": {
"firstTimeTransaction": true,
"maximumRedemptions": null,
"minimumPrice": {
"amount": 999,
"currency": "USD"
},
"expiresAt": "2021-04-14T19:38:34Z"
},
"retiredReason": null,
"status": "active",
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"createdAt": "2021-02-14T19:38:34Z"
},
"attemptedAt": "2021-02-14T19:38:34Z",
"createdAt": "2021-02-14T19:38:34Z",
"disputeClosedAt": "2021-02-14T19:38:34Z",
"refundedAt": "2021-02-14T19:38:34Z"
},
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"data": 10000000000,
"dataUnit": "byte",
"description": "A data plan you will love! Operates in most countries of the world.",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": null,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"sms": 100,
"smsUnit": "message",
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:38:34Z"
},
"price": {
"amount": 999,
"currency": "USD"
},
"status": "canceled",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"subscriptionAddons": [
"sad_0SNlurA049MEWV2UNWPbDfW5B40U"
],
"subscriptionDetails": {
"sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"device": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"deviceModel": "dmd_0SNlurA04OUskUGfGAn3Rh",
"porting": "prt_0SNlurA049MEWV39s2kSYqaat7ZS"
},
"subtotal": {
"amount": 999,
"currency": "USD"
},
"taxes": [
{
"object": "tax",
"inclusive": false,
"name": "State Sales Tax",
"value": {
"amount": 100,
"currency": "USD"
}
}
],
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"createdAt": "2021-01-21T19:38:34Z"
},
"voucher": {
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z",
"maximumRedemptions": null
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
},
"createdAt": "2021-01-21T19:38:34Z"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Create an order
Creates a new order.
The order will be created in status pending
. Orders automatically transition to paid
upon successful payment processing. Once the order is fulfilled, its status changes to completed
.
Orders can be created for plans, addons, or both. Creating an order for a plan will create a new subscription with the specified subscription details. To order an addon for an existing subscription, the subscription ID must be provided.
Body
- Name
addons
- Type
- array
- Description
List of unique identifiers for the add-ons to order, if any.
- Name
confirmationBehavior
- Type
- string
- Description
The behavior specifying how the order will be confirmed.
Default:immediate
Allowed values:immediate, manual
- Name
plan
- Type
- string
- Description
The unique identifier for the plan to order, if any.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
- Name
subscription
- Type
- string
- Description
The unique identifier for the subscription the order should be created for. Required when ordering add-ons for an existing subscription.
Example:sub_0SNlurA049MEWV2gSfSxi00xlPIi
- Name
subscriptionDetails
- Type
- object
- Description
- The details of the subscription that will be created as result of this order. Required when ordering a plan for a new subscription.
- Name
device
- Type
- nullable string
- Description
The unique identifier for the device to be linked with the passed SIM. Some network providers require this field for activation. Trying to link a pSIM to a second device will cause an error.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
- Name
sim
- Type
- nullable string
- Description
The unique identifier for the SIM to be used for the subscription. In combination with an eSIM plan, it can be omitted to request a new eSIM.
Example:sim_0SNlurA049MEWV1BAAmWZULA4lf6
- Name
user
- Type
- string
- Description
The unique identifier for the user to be used for the subscription.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
required- Name
userAddress
- Type
- nullable string
- Description
The unique identifier for the user address to be used for the subscription. Only needed if the plan requires an address.
Example:adr_0SNlurA049MEWV5ELDmnaqVXgTFT
- Name
porting
- Type
- nullable string PREVIEW
- Description
The unique identifier for the draft porting to be used for the subscription.
Example:prt_0SNlurA049MEWV39s2kSYqaat7ZS
- Name
voucherCode
- Type
- nullable string
- Description
The voucher code for a redeemable voucher.
Example:BlackFriday2022
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
order
.
required- Name
id
- Type
- string
- Description
Unique identifier for the order.
Example:ord_0SNlurA049MEWV0SiRFOw0dmChqN
required- Name
addons
- Type
- array
- Description
List of add-ons that are part of the order, if any.
required- Name
discount
- Type
- object
- Description
- The total discount applied to this order.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
required- Name
lastPayment
- Type
- nullable object
- Description
- State of the latest payment attempt for a `subscription` or `order`.
- Name
object
- Type
- string
- Description
Type of object is always
payment
.
required- Name
id
- Type
- string
- Description
Unique identifier for the payment.
Example:pay_0SNlurA049MEWV2HRA0slWFuS8DV
required- Name
amount
- Type
- object
- Description
- The total amount paid.
required- Name
discount
- Type
- object
- Description
- The total discount applied to this payment.
required- Name
disputeOutcome
- Type
- nullable string
- Description
The outcome of a payment dispute. Otherwise
null
.Allowed values:, lost, won
required- Name
failedAttempts
- Type
- integer
- Description
The number of failed payment attempts so far.
Example:3
>= 0
required- Name
failureCode
- Type
- nullable string
- Description
An error code indicating the reason for the payment failure.
Example:paymentCardDeclined
required- Name
failureMessage
- Type
- nullable string
- Description
A human-readable message indicating the reason for the payment failure.
Example:The card has been declined.
required- Name
invoiceNumber
- Type
- string
- Description
The number of the invoice from the payment provider
Example:B74BDB55-0555
required- Name
method
- Type
- nullable object
- Description
- The payment method describes how a payment can be made.
required- Name
reason
- Type
- string
- Description
The reason for this payment.
Allowed values:subscriptionCreation, subscriptionRenewal, other
required- Name
receipt
- Type
- nullable string
- Description
The URL of a PDF receipt. The URL and the content it links to might change whenever the payment transitions to another state. The URL is signed, but care should be taken when sharing it, as it is publicly accessible.
Example:https://files.gigs.com/receipts/pay_0SNlurA049MEWV2HRA0slWFuS8DV.pdf
required- Name
references
- Type
- array
- Description
List of payment references. Supported reference types are
order
andsubscription
.
required- Name
refunded
- Type
- object
- Description
- The sum of all refunds related to this payment. Cannot be greater than the paid sum.
required- Name
status
- Type
- string
- Description
The status of the payment. Can be
succeeded
,requiresConfirmation
,failed
,refunded
ordisputed
.Allowed values:succeeded, requiresConfirmation, failed, refunded, disputed, requiresPaymentMethod
required- Name
subtotal
- Type
- object
- Description
- The total amount to be paid before any applied discounts.
required- Name
taxes
- Type
- array PREVIEW
- Description
List of taxes.
Example:[object Object]
required- Name
total
- Type
- object PREVIEW
- Description
- The total amount paid.
required- Name
user
- Type
- object
- Description
required- Name
voucher
- Type
- nullable object
- Description
- Voucher applied to the payment.
required- Name
voucherCode
- Type
- nullable object
- Description
- Voucher code applied to the payment.
required- Name
attemptedAt
- Type
- string
- Description
Time when the payment was last attempted.
Example:2021-02-14T19:38:34Z
required- Name
createdAt
- Type
- string
- Description
Time when the payment was created.
Example:2021-02-14T19:38:34Z
required- Name
disputeClosedAt
- Type
- nullable string
- Description
Time when the payment dispute was closed. Otherwise
null
.Example:2021-02-14T19:38:34Z
required- Name
refundedAt
- Type
- nullable string
- Description
Time when the payment was fully refunded. Otherwise
null
.Example:2021-02-14T19:38:34Z
required
required- Name
plan
- Type
- nullable object
- Description
- Plan that is part of the order, if any.
- Name
object
- Type
- string
- Description
Type of object is always
plan
.
required- Name
id
- Type
- string
- Description
Unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
allowances
- Type
- object
- Description
- The allowances included in the plan.
required- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
required- Name
data
- Type
- integer DEPRECATED
- Description
The data allowance in bytes included in this plan. A value of
-1
indicates unlimited data.Example:10000000000
required- Name
dataUnit
- Type
- string DEPRECATED
- Description
The unit of the data value is always
byte
.
required- Name
description
- Type
- nullable string
- Description
The plan's description, meant to be displayable to the users.
Example:A data plan you will love! Operates in most countries of the world.
required- Name
image
- Type
- nullable string
- Description
The plan's image, meant to be displayable to the users.
Example:https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
required- Name
limits
- Type
- object
- Description
- The limitations of the plan.
required- Name
name
- Type
- string
- Description
The plan's name, meant to be displayable to the users.
Example:Gigs Global
required- Name
price
- Type
- object
- Description
- The price of the plan.
required- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this plan.
Example:p5
required- Name
requirements
- Type
- object
- Description
required- Name
simTypes
- Type
- array
- Description
List of SIM types supported by this plan. Can be
eSIM
,pSIM
, or both.Example:eSIM,pSIM
required- Name
sms
- Type
- integer DEPRECATED
- Description
The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
The unit of the sms value is always
message
.
required- Name
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
required- Name
validity
- Type
- object
- Description
- The validity of the plan.
required- Name
voice
- Type
- integer DEPRECATED
- Description
The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
The unit of the voice value is always
second
.
required- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
required
required- Name
price
- Type
- object
- Description
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
required- Name
status
- Type
- string
- Description
The current status of the order. Every order starts in status
pending
and can transition to the final statescompleted
orcanceled
. A possible intermediate status ispaid
.Allowed values:canceled, completed, paid, pending, quoted
required- Name
subscription
- Type
- nullable string
- Description
The unique identifier for the subscription that the order applies to, if any. Orders for new plans will not have a subscription until they are confirmed.
Example:sub_0SNlurA049MEWV2gSfSxi00xlPIi
required- Name
subscriptionAddons
- Type
- array
- Description
List of unique identifiers for the subscription add-ons that the order applies to, if any.
required- Name
subscriptionDetails
- Type
- nullable object
- Description
- The details of the subscription that will be created as result of this order. Present for quoted orders for new plans.
- Name
sim
- Type
- nullable string
- Description
The unique identifier of the SIM, if any.
Example:sim_0SNlurA049MEWV1BAAmWZULA4lf6
- Name
address
- Type
- nullable string
- Description
The unique identifier of the address, if any.
Example:adr_0SNlurA049MEWV5ELDmnaqVXgTFT
- Name
device
- Type
- nullable string
- Description
The unique identifier of the device, if any.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
- Name
deviceModel
- Type
- nullable string
- Description
The unique identifier of the device model, if any.
Example:dmd_0SNlurA04OUskUGfGAn3Rh
- Name
porting
- Type
- nullable string
- Description
The unique identifier of the porting, if any.
Example:prt_0SNlurA049MEWV39s2kSYqaat7ZS
required- Name
subtotal
- Type
- object
- Description
- The total amount to be paid before any applied discounts and taxes.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
required- Name
taxes
- Type
- array PREVIEW
- Description
List of taxes applied, aggregated by tax.
required- Name
user
- Type
- object
- Description
- User the order belongs to.
- Name
object
- Type
- string
- Description
Type of object is always
user
.
required- Name
id
- Type
- string
- Description
Unique identifier for the user.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
birthday
- Type
- nullable string
- Description
The birthday of the user.
Example:2017-07-21
required- Name
email
- Type
- string
- Description
The primary email address of the user.
Example:jerry@example.com
required- Name
emailVerified
- Type
- boolean
- Description
Whether the user's primary email address is verified or not.
Example:true
required- Name
fullName
- Type
- nullable string
- Description
The user's full name. Required for some Plans.
Example:Jerry Seinfeld
required- Name
preferredLocale
- Type
- string
- Description
The user's locale preference represented as an IETF language tag.
Example:en-US
required- Name
createdAt
- Type
- string
- Description
Time when the user was created.
Example:2021-01-21T19:38:34Z
required
required- Name
voucher
- Type
- nullable object
- Description
- Voucher applied to the order, if any.
- Name
object
- Type
- string
- Description
Type of object is always
voucher
.
required- Name
id
- Type
- string
- Description
Unique identifier for the voucher.
Example:vou_0SNlurA049MEWV0h2jfjkdiOdplN
required- Name
name
- Type
- string
- Description
The voucher's name.
Example:Monthly Basic 15%
required- Name
priceDiscount
- Type
- nullable object
- Description
- The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
required- Name
priceDiscountPercentage
- Type
- nullable number
- Description
The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
Example:30.12
>= 1
<= 100
required- Name
recurrence
- Type
- object
- Description
- Details on whether and for how long the discounts applied via the voucher recur.
required- Name
redemptions
- Type
- integer
- Description
Number of times the voucher has been redeemed.
Example:2
required- Name
restrictions
- Type
- object
- Description
- Conditions under which the voucher can be used.
required- Name
retiredReason
- Type
- nullable string
- Description
Label indicating the reason why the voucher is retired.
Allowed values:, manualAction, expired, maxRedemptionsReached, unknown
required- Name
status
- Type
- string
- Description
- Allowed values:
available, retired
required- Name
createdAt
- Type
- string
- Description
Time when the voucher was created.
Example:2021-02-14T19:38:34Z
required
required- Name
createdAt
- Type
- string
- Description
Time when the order was created.
Example:2021-01-21T19:38:34Z
required
Request
curl https://api.gigs.com/projects/{project}/orders \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"addons\":[\"add_0SNlurA049MEWV4VxLfwJc7PJtHc\"],\"confirmationBehavior\":\"immediate\",\"plan\":\"pln_0SNlurA049MEWV3V0q7gjQbM4EVo\",\"subscription\":\"sub_0SNlurA049MEWV2gSfSxi00xlPIi\",\"subscriptionDetails\":{\"device\":\"dev_0SNlurA049MEWV55CrA9qMvI2FVJ\",\"deviceModel\":\"dmd_0SNlurA04OUskUGfGAn3Rh\",\"sim\":\"sim_0SNlurA049MEWV1BAAmWZULA4lf6\",\"user\":\"usr_0SNlurA049MEWV4OpCwsNyC9Kn2d\",\"userAddress\":\"adr_0SNlurA049MEWV5ELDmnaqVXgTFT\",\"porting\":\"prt_0SNlurA049MEWV39s2kSYqaat7ZS\"},\"voucherCode\":\"BlackFriday2022\"}"
Responses
{
"object": "order",
"id": "ord_0SNlurA049MEWV0SiRFOw0dmChqN",
"addons": [
{
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"data": 10000000000,
"dataUnit": "byte",
"description": "Disable international roaming.",
"name": "1GB Data Top-up",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"recurrenceType": "oneTime",
"sms": 100,
"smsUnit": "message",
"status": "draft",
"type": "topUp",
"validity": {
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:12:28Z"
}
],
"discount": {
"amount": 999,
"currency": "USD"
},
"lastPayment": {
"object": "payment",
"id": "pay_0SNlurA049MEWV2HRA0slWFuS8DV",
"amount": {
"amount": 990,
"currency": "USD"
},
"discount": {
"amount": 100,
"currency": "USD"
},
"disputeOutcome": null,
"failedAttempts": 3,
"failureCode": "paymentCardDeclined",
"failureMessage": "The card has been declined.",
"invoiceNumber": "B74BDB55-0555",
"method": {
"object": "paymentMethod",
"id": "pm_1IHCiiI2m82Dc6YnhqGWH6JX",
"brand": "visa",
"clientSecret": null,
"last4": "4242",
"provider": "stripe",
"status": "available",
"type": "card",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"createdAt": "2021-02-14T19:38:34Z"
},
"reason": "subscriptionCreation",
"receipt": "https://files.gigs.com/receipts/pay_0SNlurA049MEWV2HRA0slWFuS8DV.pdf",
"references": [
{
"object": "order",
"id": "ord_0SNlurA049MEWV0SiRFOw0dmChqN"
}
],
"refunded": {
"amount": 0,
"currency": "USD"
},
"status": "succeeded",
"subtotal": {
"amount": 1000,
"currency": "USD"
},
"taxes": [
{
"object": "tax",
"inclusive": false,
"name": "State Sales Tax",
"value": {
"amount": 90,
"currency": "USD"
}
}
],
"total": {
"amount": 990,
"currency": "USD"
},
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"createdAt": "2021-01-21T19:38:34Z"
},
"voucher": {
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 100,
"currency": "USD"
},
"priceDiscountPercentage": null,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z",
"maximumRedemptions": null
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
},
"voucherCode": {
"object": "voucherCode",
"id": "voc_0SNlurA049MEWV0Q5vaTJnKoXc1v",
"code": "BlackFriday22",
"redemptions": 2,
"restrictions": {
"firstTimeTransaction": true,
"maximumRedemptions": null,
"minimumPrice": {
"amount": 999,
"currency": "USD"
},
"expiresAt": "2021-04-14T19:38:34Z"
},
"retiredReason": null,
"status": "active",
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"createdAt": "2021-02-14T19:38:34Z"
},
"attemptedAt": "2021-02-14T19:38:34Z",
"createdAt": "2021-02-14T19:38:34Z",
"disputeClosedAt": "2021-02-14T19:38:34Z",
"refundedAt": "2021-02-14T19:38:34Z"
},
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"data": 10000000000,
"dataUnit": "byte",
"description": "A data plan you will love! Operates in most countries of the world.",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": null,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"sms": 100,
"smsUnit": "message",
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:38:34Z"
},
"price": {
"amount": 999,
"currency": "USD"
},
"status": "canceled",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"subscriptionAddons": [
"sad_0SNlurA049MEWV2UNWPbDfW5B40U"
],
"subscriptionDetails": {
"sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"device": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"deviceModel": "dmd_0SNlurA04OUskUGfGAn3Rh",
"porting": "prt_0SNlurA049MEWV39s2kSYqaat7ZS"
},
"subtotal": {
"amount": 999,
"currency": "USD"
},
"taxes": [
{
"object": "tax",
"inclusive": false,
"name": "State Sales Tax",
"value": {
"amount": 100,
"currency": "USD"
}
}
],
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"createdAt": "2021-01-21T19:38:34Z"
},
"voucher": {
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z",
"maximumRedemptions": null
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
},
"createdAt": "2021-01-21T19:38:34Z"
}
Confirm an order quote
Confirms an order quote. Order needs to be confirmed before they can be paid.
Preview
This endpoint is currently in preview and might change in the future.
We’re excited to hear your feedback and ideas. Please send an email to support@gigs.com to share your thoughts.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
order
- Type
- string
- Description
The unique identifier for the order.
Example:ord_0SNlurA049MEWV0SiRFOw0dmChqN
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
order
.
required- Name
id
- Type
- string
- Description
Unique identifier for the order.
Example:ord_0SNlurA049MEWV0SiRFOw0dmChqN
required- Name
addons
- Type
- array
- Description
List of add-ons that are part of the order, if any.
required- Name
discount
- Type
- object
- Description
- The total discount applied to this order.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
required- Name
lastPayment
- Type
- nullable object
- Description
- State of the latest payment attempt for a `subscription` or `order`.
- Name
object
- Type
- string
- Description
Type of object is always
payment
.
required- Name
id
- Type
- string
- Description
Unique identifier for the payment.
Example:pay_0SNlurA049MEWV2HRA0slWFuS8DV
required- Name
amount
- Type
- object
- Description
- The total amount paid.
required- Name
discount
- Type
- object
- Description
- The total discount applied to this payment.
required- Name
disputeOutcome
- Type
- nullable string
- Description
The outcome of a payment dispute. Otherwise
null
.Allowed values:, lost, won
required- Name
failedAttempts
- Type
- integer
- Description
The number of failed payment attempts so far.
Example:3
>= 0
required- Name
failureCode
- Type
- nullable string
- Description
An error code indicating the reason for the payment failure.
Example:paymentCardDeclined
required- Name
failureMessage
- Type
- nullable string
- Description
A human-readable message indicating the reason for the payment failure.
Example:The card has been declined.
required- Name
invoiceNumber
- Type
- string
- Description
The number of the invoice from the payment provider
Example:B74BDB55-0555
required- Name
method
- Type
- nullable object
- Description
- The payment method describes how a payment can be made.
required- Name
reason
- Type
- string
- Description
The reason for this payment.
Allowed values:subscriptionCreation, subscriptionRenewal, other
required- Name
receipt
- Type
- nullable string
- Description
The URL of a PDF receipt. The URL and the content it links to might change whenever the payment transitions to another state. The URL is signed, but care should be taken when sharing it, as it is publicly accessible.
Example:https://files.gigs.com/receipts/pay_0SNlurA049MEWV2HRA0slWFuS8DV.pdf
required- Name
references
- Type
- array
- Description
List of payment references. Supported reference types are
order
andsubscription
.
required- Name
refunded
- Type
- object
- Description
- The sum of all refunds related to this payment. Cannot be greater than the paid sum.
required- Name
status
- Type
- string
- Description
The status of the payment. Can be
succeeded
,requiresConfirmation
,failed
,refunded
ordisputed
.Allowed values:succeeded, requiresConfirmation, failed, refunded, disputed, requiresPaymentMethod
required- Name
subtotal
- Type
- object
- Description
- The total amount to be paid before any applied discounts.
required- Name
taxes
- Type
- array PREVIEW
- Description
List of taxes.
Example:[object Object]
required- Name
total
- Type
- object PREVIEW
- Description
- The total amount paid.
required- Name
user
- Type
- object
- Description
required- Name
voucher
- Type
- nullable object
- Description
- Voucher applied to the payment.
required- Name
voucherCode
- Type
- nullable object
- Description
- Voucher code applied to the payment.
required- Name
attemptedAt
- Type
- string
- Description
Time when the payment was last attempted.
Example:2021-02-14T19:38:34Z
required- Name
createdAt
- Type
- string
- Description
Time when the payment was created.
Example:2021-02-14T19:38:34Z
required- Name
disputeClosedAt
- Type
- nullable string
- Description
Time when the payment dispute was closed. Otherwise
null
.Example:2021-02-14T19:38:34Z
required- Name
refundedAt
- Type
- nullable string
- Description
Time when the payment was fully refunded. Otherwise
null
.Example:2021-02-14T19:38:34Z
required
required- Name
plan
- Type
- nullable object
- Description
- Plan that is part of the order, if any.
- Name
object
- Type
- string
- Description
Type of object is always
plan
.
required- Name
id
- Type
- string
- Description
Unique identifier for the plan.
Example:pln_0SNlurA049MEWV3V0q7gjQbM4EVo
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
allowances
- Type
- object
- Description
- The allowances included in the plan.
required- Name
coverage
- Type
- object
- Description
- The geographic coverage of the plan.
required- Name
data
- Type
- integer DEPRECATED
- Description
The data allowance in bytes included in this plan. A value of
-1
indicates unlimited data.Example:10000000000
required- Name
dataUnit
- Type
- string DEPRECATED
- Description
The unit of the data value is always
byte
.
required- Name
description
- Type
- nullable string
- Description
The plan's description, meant to be displayable to the users.
Example:A data plan you will love! Operates in most countries of the world.
required- Name
image
- Type
- nullable string
- Description
The plan's image, meant to be displayable to the users.
Example:https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
required- Name
limits
- Type
- object
- Description
- The limitations of the plan.
required- Name
name
- Type
- string
- Description
The plan's name, meant to be displayable to the users.
Example:Gigs Global
required- Name
price
- Type
- object
- Description
- The price of the plan.
required- Name
provider
- Type
- string
- Description
The ID of the network provider supported by this plan.
Example:p5
required- Name
requirements
- Type
- object
- Description
required- Name
simTypes
- Type
- array
- Description
List of SIM types supported by this plan. Can be
eSIM
,pSIM
, or both.Example:eSIM,pSIM
required- Name
sms
- Type
- integer DEPRECATED
- Description
The sms allowance included in this plan. A value of
-1
indicates unlimited sms.Example:100
required- Name
smsUnit
- Type
- string DEPRECATED
- Description
The unit of the sms value is always
message
.
required- Name
status
- Type
- string
- Description
- Allowed values:
available, archived, pending, draft
required- Name
validity
- Type
- object
- Description
- The validity of the plan.
required- Name
voice
- Type
- integer DEPRECATED
- Description
The voice allowance included in this plan. A value of
-1
indicates unlimited voice.Example:30000
required- Name
voiceUnit
- Type
- string DEPRECATED
- Description
The unit of the voice value is always
second
.
required- Name
createdAt
- Type
- string
- Description
Time when the plan was created.
Example:2021-01-21T19:38:34Z
required
required- Name
price
- Type
- object
- Description
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
required- Name
status
- Type
- string
- Description
The current status of the order. Every order starts in status
pending
and can transition to the final statescompleted
orcanceled
. A possible intermediate status ispaid
.Allowed values:canceled, completed, paid, pending, quoted
required- Name
subscription
- Type
- nullable string
- Description
The unique identifier for the subscription that the order applies to, if any. Orders for new plans will not have a subscription until they are confirmed.
Example:sub_0SNlurA049MEWV2gSfSxi00xlPIi
required- Name
subscriptionAddons
- Type
- array
- Description
List of unique identifiers for the subscription add-ons that the order applies to, if any.
required- Name
subscriptionDetails
- Type
- nullable object
- Description
- The details of the subscription that will be created as result of this order. Present for quoted orders for new plans.
- Name
sim
- Type
- nullable string
- Description
The unique identifier of the SIM, if any.
Example:sim_0SNlurA049MEWV1BAAmWZULA4lf6
- Name
address
- Type
- nullable string
- Description
The unique identifier of the address, if any.
Example:adr_0SNlurA049MEWV5ELDmnaqVXgTFT
- Name
device
- Type
- nullable string
- Description
The unique identifier of the device, if any.
Example:dev_0SNlurA049MEWV55CrA9qMvI2FVJ
- Name
deviceModel
- Type
- nullable string
- Description
The unique identifier of the device model, if any.
Example:dmd_0SNlurA04OUskUGfGAn3Rh
- Name
porting
- Type
- nullable string
- Description
The unique identifier of the porting, if any.
Example:prt_0SNlurA049MEWV39s2kSYqaat7ZS
required- Name
subtotal
- Type
- object
- Description
- The total amount to be paid before any applied discounts and taxes.
- Name
amount
- Type
- integer
- Description
The price amount in the currency's minor unit, e.g. "cents" for many currencies.
Example:999
>= 0
required- Name
currency
- Type
- string
- Description
Three-letter ISO 4217 currency code. Must be a supported currency.
Example:USD
required
required- Name
taxes
- Type
- array PREVIEW
- Description
List of taxes applied, aggregated by tax.
required- Name
user
- Type
- object
- Description
- User the order belongs to.
- Name
object
- Type
- string
- Description
Type of object is always
user
.
required- Name
id
- Type
- string
- Description
Unique identifier for the user.
Example:usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
required- Name
metadata
- Type
- object PREVIEW
- Description
- A set of key-value pairs, to store metadata related to the resource.
required- Name
birthday
- Type
- nullable string
- Description
The birthday of the user.
Example:2017-07-21
required- Name
email
- Type
- string
- Description
The primary email address of the user.
Example:jerry@example.com
required- Name
emailVerified
- Type
- boolean
- Description
Whether the user's primary email address is verified or not.
Example:true
required- Name
fullName
- Type
- nullable string
- Description
The user's full name. Required for some Plans.
Example:Jerry Seinfeld
required- Name
preferredLocale
- Type
- string
- Description
The user's locale preference represented as an IETF language tag.
Example:en-US
required- Name
createdAt
- Type
- string
- Description
Time when the user was created.
Example:2021-01-21T19:38:34Z
required
required- Name
voucher
- Type
- nullable object
- Description
- Voucher applied to the order, if any.
- Name
object
- Type
- string
- Description
Type of object is always
voucher
.
required- Name
id
- Type
- string
- Description
Unique identifier for the voucher.
Example:vou_0SNlurA049MEWV0h2jfjkdiOdplN
required- Name
name
- Type
- string
- Description
The voucher's name.
Example:Monthly Basic 15%
required- Name
priceDiscount
- Type
- nullable object
- Description
- The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
required- Name
priceDiscountPercentage
- Type
- nullable number
- Description
The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
Example:30.12
>= 1
<= 100
required- Name
recurrence
- Type
- object
- Description
- Details on whether and for how long the discounts applied via the voucher recur.
required- Name
redemptions
- Type
- integer
- Description
Number of times the voucher has been redeemed.
Example:2
required- Name
restrictions
- Type
- object
- Description
- Conditions under which the voucher can be used.
required- Name
retiredReason
- Type
- nullable string
- Description
Label indicating the reason why the voucher is retired.
Allowed values:, manualAction, expired, maxRedemptionsReached, unknown
required- Name
status
- Type
- string
- Description
- Allowed values:
available, retired
required- Name
createdAt
- Type
- string
- Description
Time when the voucher was created.
Example:2021-02-14T19:38:34Z
required
required- Name
createdAt
- Type
- string
- Description
Time when the order was created.
Example:2021-01-21T19:38:34Z
required
Request
curl https://api.gigs.com/projects/{project}/orders/{order}/confirm \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Responses
{
"object": "order",
"id": "ord_0SNlurA049MEWV0SiRFOw0dmChqN",
"addons": [
{
"object": "addon",
"id": "add_0SNlurA049MEWV4VxLfwJc7PJtHc",
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"data": 10000000000,
"dataUnit": "byte",
"description": "Disable international roaming.",
"name": "1GB Data Top-up",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"recurrenceType": "oneTime",
"sms": 100,
"smsUnit": "message",
"status": "draft",
"type": "topUp",
"validity": {
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:12:28Z"
}
],
"discount": {
"amount": 999,
"currency": "USD"
},
"lastPayment": {
"object": "payment",
"id": "pay_0SNlurA049MEWV2HRA0slWFuS8DV",
"amount": {
"amount": 990,
"currency": "USD"
},
"discount": {
"amount": 100,
"currency": "USD"
},
"disputeOutcome": null,
"failedAttempts": 3,
"failureCode": "paymentCardDeclined",
"failureMessage": "The card has been declined.",
"invoiceNumber": "B74BDB55-0555",
"method": {
"object": "paymentMethod",
"id": "pm_1IHCiiI2m82Dc6YnhqGWH6JX",
"brand": "visa",
"clientSecret": null,
"last4": "4242",
"provider": "stripe",
"status": "available",
"type": "card",
"user": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"createdAt": "2021-02-14T19:38:34Z"
},
"reason": "subscriptionCreation",
"receipt": "https://files.gigs.com/receipts/pay_0SNlurA049MEWV2HRA0slWFuS8DV.pdf",
"references": [
{
"object": "order",
"id": "ord_0SNlurA049MEWV0SiRFOw0dmChqN"
}
],
"refunded": {
"amount": 0,
"currency": "USD"
},
"status": "succeeded",
"subtotal": {
"amount": 1000,
"currency": "USD"
},
"taxes": [
{
"object": "tax",
"inclusive": false,
"name": "State Sales Tax",
"value": {
"amount": 90,
"currency": "USD"
}
}
],
"total": {
"amount": 990,
"currency": "USD"
},
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"createdAt": "2021-01-21T19:38:34Z"
},
"voucher": {
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 100,
"currency": "USD"
},
"priceDiscountPercentage": null,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z",
"maximumRedemptions": null
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
},
"voucherCode": {
"object": "voucherCode",
"id": "voc_0SNlurA049MEWV0Q5vaTJnKoXc1v",
"code": "BlackFriday22",
"redemptions": 2,
"restrictions": {
"firstTimeTransaction": true,
"maximumRedemptions": null,
"minimumPrice": {
"amount": 999,
"currency": "USD"
},
"expiresAt": "2021-04-14T19:38:34Z"
},
"retiredReason": null,
"status": "active",
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"createdAt": "2021-02-14T19:38:34Z"
},
"attemptedAt": "2021-02-14T19:38:34Z",
"createdAt": "2021-02-14T19:38:34Z",
"disputeClosedAt": "2021-02-14T19:38:34Z",
"refundedAt": "2021-02-14T19:38:34Z"
},
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"data": 10000000000,
"dataUnit": "byte",
"description": "A data plan you will love! Operates in most countries of the world.",
"image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
"limits": {
"dataBytes": 100000000000,
"bandwidthBitsPerSecond": null,
"throttling": {
"thresholdBytes": 10000000000,
"bandwidthBitsPerSecond": 512000
}
},
"name": "Gigs Global",
"price": {
"amount": 999,
"currency": "USD"
},
"provider": "p5",
"requirements": {
"address": "present",
"device": "none",
"user.birthday": "none",
"user.fullName": "present"
},
"simTypes": [
"eSIM",
"pSIM"
],
"sms": 100,
"smsUnit": "message",
"status": "available",
"validity": {
"minimumPeriods": 12,
"type": "recurring",
"unit": "day",
"value": 7
},
"voice": 30000,
"voiceUnit": "second",
"createdAt": "2021-01-21T19:38:34Z"
},
"price": {
"amount": 999,
"currency": "USD"
},
"status": "canceled",
"subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
"subscriptionAddons": [
"sad_0SNlurA049MEWV2UNWPbDfW5B40U"
],
"subscriptionDetails": {
"sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
"address": "adr_0SNlurA049MEWV5ELDmnaqVXgTFT",
"device": "dev_0SNlurA049MEWV55CrA9qMvI2FVJ",
"deviceModel": "dmd_0SNlurA04OUskUGfGAn3Rh",
"porting": "prt_0SNlurA049MEWV39s2kSYqaat7ZS"
},
"subtotal": {
"amount": 999,
"currency": "USD"
},
"taxes": [
{
"object": "tax",
"inclusive": false,
"name": "State Sales Tax",
"value": {
"amount": 100,
"currency": "USD"
}
}
],
"user": {
"object": "user",
"id": "usr_0SNlurA049MEWV4OpCwsNyC9Kn2d",
"metadata": {},
"birthday": "2017-07-21",
"email": "jerry@example.com",
"emailVerified": true,
"fullName": "Jerry Seinfeld",
"preferredLocale": "en-US",
"createdAt": "2021-01-21T19:38:34Z"
},
"voucher": {
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z",
"maximumRedemptions": null
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
},
"createdAt": "2021-01-21T19:38:34Z"
}