Orders

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
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    lastPayment
    Type
    nullable object
    Description
    State of the latest payment attempt for a `subscription` or `order`.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always payment.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the payment.

      Example: pay_0SNlurA049MEWV2HRA0slWFuS8DV
    • Name
      amount
      Type
      object
      required
      Description
      The total amount paid.
    • Name
      discount
      Type
      object
      required
      Description
      The total discount applied to this payment.
    • Name
      disputeOutcome
      Type
      nullable string
      required
      Description

      The outcome of a payment dispute. Otherwise null.

      Allowed values: , lost, won
    • Name
      failedAttempts
      Type
      integer
      required
      Description

      The number of failed payment attempts so far.

      Example: 3
      >= 0
    • Name
      failureCode
      Type
      nullable string
      required
      Description

      An error code indicating the reason for the payment failure.

      Example: paymentCardDeclined
    • Name
      failureMessage
      Type
      nullable string
      required
      Description

      A human-readable message indicating the reason for the payment failure.

      Example: The card has been declined.
    • Name
      invoiceNumber
      Type
      string
      required
      Description

      The number of the invoice from the payment provider

      Example: B74BDB55-0555
    • Name
      method
      Type
      nullable object
      required
      Description
      The payment method describes how a payment can be made.
    • Name
      reason
      Type
      string
      required
      Description

      The reason for this payment.

      Allowed values: subscriptionCreation, subscriptionRenewal, other
    • Name
      receipt
      Type
      nullable string
      required
      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
    • Name
      references
      Type
      array
      required
      Description

      List of payment references. Supported reference types are order and subscription.

    • Name
      refunded
      Type
      object
      required
      Description
      The sum of all refunds related to this payment. Cannot be greater than the paid sum.
    • Name
      status
      Type
      string
      required
      Description

      The status of the payment. Can be succeeded, requiresConfirmation, failed, refunded or disputed.

      Allowed values: succeeded, requiresConfirmation, failed, refunded, disputed, requiresPaymentMethod
    • Name
      subtotal
      Type
      object
      required
      Description
      The total amount to be paid before any applied discounts.
    • Name
      taxes
      Type
      array
      PREVIEW
      required
      Description

      List of taxes.

      Example: [object Object]
    • Name
      total
      Type
      object
      PREVIEW
      required
      Description
      The total amount paid.
    • Name
      user
      Type
      object
      required
      Description
    • Name
      voucher
      Type
      nullable object
      required
      Description
      Voucher applied to the payment.
    • Name
      voucherCode
      Type
      nullable object
      required
      Description
      Voucher code applied to the payment.
    • Name
      attemptedAt
      Type
      string
      required
      Description

      Time when the payment was last attempted.

      Example: 2021-02-14T19:38:34Z
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the payment was created.

      Example: 2021-02-14T19:38:34Z
    • Name
      disputeClosedAt
      Type
      nullable string
      required
      Description

      Time when the payment dispute was closed. Otherwise null.

      Example: 2021-02-14T19:38:34Z
    • Name
      refundedAt
      Type
      nullable string
      required
      Description

      Time when the payment was fully refunded. Otherwise null.

      Example: 2021-02-14T19:38:34Z
  • Name
    plan
    Type
    nullable object
    Description
    Plan that is part of the order, if any.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always plan.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the plan.

      Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
    • Name
      metadata
      Type
      object
      PREVIEW
      required
      Description
      A set of key-value pairs, to store metadata related to the resource.
    • Name
      allowances
      Type
      object
      required
      Description
      The allowances included in the plan.
    • Name
      coverage
      Type
      object
      required
      Description
      The geographic coverage of the plan.
    • Name
      data
      Type
      integer
      DEPRECATED
      required
      Description

      The data allowance in bytes included in this plan. A value of -1 indicates unlimited data.

      Example: 10000000000
    • Name
      dataUnit
      Type
      string
      DEPRECATED
      required
      Description

      The unit of the data value is always byte.

    • Name
      description
      Type
      nullable string
      required
      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.
    • Name
      image
      Type
      nullable string
      required
      Description

      The plan's image, meant to be displayable to the users.

      Example: https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
    • Name
      limits
      Type
      object
      required
      Description
      The limitations of the plan.
    • Name
      name
      Type
      string
      required
      Description

      The plan's name, meant to be displayable to the users.

      Example: Gigs Global
    • Name
      price
      Type
      object
      required
      Description
      The price of the plan.
    • Name
      provider
      Type
      string
      required
      Description

      The ID of the network provider supported by this plan.

      Example: p5
    • Name
      requirements
      Type
      object
      required
      Description
    • Name
      simTypes
      Type
      array
      required
      Description

      List of SIM types supported by this plan. Can be eSIM, pSIM, or both.

      Example: eSIM,pSIM
    • Name
      sms
      Type
      integer
      DEPRECATED
      required
      Description

      The sms allowance included in this plan. A value of -1 indicates unlimited sms.

      Example: 100
    • Name
      smsUnit
      Type
      string
      DEPRECATED
      required
      Description

      The unit of the sms value is always message.

    • Name
      status
      Type
      string
      required
      Description
      Allowed values: available, archived, pending, draft
    • Name
      validity
      Type
      object
      required
      Description
      The validity of the plan.
    • Name
      voice
      Type
      integer
      DEPRECATED
      required
      Description

      The voice allowance included in this plan. A value of -1 indicates unlimited voice.

      Example: 30000
    • Name
      voiceUnit
      Type
      string
      DEPRECATED
      required
      Description

      The unit of the voice value is always second.

    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the plan was created.

      Example: 2021-01-21T19:38:34Z
  • Name
    price
    Type
    object
    Description
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    status
    Type
    string
    Description

    The current status of the order. Every order starts in status pending and can transition to the final states completed or canceled. A possible intermediate status is paid.

    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
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • 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
      required
      Description

      Type of object is always user.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the user.

      Example: usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
    • Name
      metadata
      Type
      object
      PREVIEW
      required
      Description
      A set of key-value pairs, to store metadata related to the resource.
    • Name
      birthday
      Type
      nullable string
      required
      Description

      The birthday of the user.

      Example: 2017-07-21
    • Name
      email
      Type
      string
      required
      Description

      The primary email address of the user.

      Example: jerry@example.com
    • Name
      emailVerified
      Type
      boolean
      required
      Description

      Whether the user's primary email address is verified or not.

      Example: true
    • Name
      fullName
      Type
      nullable string
      required
      Description

      The user's full name. Required for some Plans.

      Example: Jerry Seinfeld
    • Name
      preferredLocale
      Type
      string
      required
      Description

      The user's locale preference represented as an IETF language tag.

      Example: en-US
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the user was created.

      Example: 2021-01-21T19:38:34Z
  • Name
    voucher
    Type
    nullable object
    Description
    Voucher applied to the order, if any.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always voucher.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the voucher.

      Example: vou_0SNlurA049MEWV0h2jfjkdiOdplN
    • Name
      name
      Type
      string
      required
      Description

      The voucher's name.

      Example: Monthly Basic 15%
    • Name
      priceDiscount
      Type
      nullable object
      required
      Description
      The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
    • Name
      priceDiscountPercentage
      Type
      nullable number
      required
      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
    • Name
      recurrence
      Type
      object
      required
      Description
      Details on whether and for how long the discounts applied via the voucher recur.
    • Name
      redemptions
      Type
      integer
      required
      Description

      Number of times the voucher has been redeemed.

      Example: 2
    • Name
      restrictions
      Type
      object
      required
      Description
      Conditions under which the voucher can be used.
    • Name
      retiredReason
      Type
      nullable string
      required
      Description

      Label indicating the reason why the voucher is retired.

      Allowed values: , manualAction, expired, maxRedemptionsReached, unknown
    • Name
      status
      Type
      string
      required
      Description
      Allowed values: available, retired
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the voucher was created.

      Example: 2021-02-14T19:38:34Z
  • 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"
}

GET/projects/{project}/orders/{id}

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
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    id
    Type
    string
    required
    Description

    The unique identifier for the order.

    Example: ord_0SNlurA049MEWV0SiRFOw0dmChqN

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always order.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the order.

    Example: ord_0SNlurA049MEWV0SiRFOw0dmChqN
  • Name
    addons
    Type
    array
    required
    Description

    List of add-ons that are part of the order, if any.

  • Name
    discount
    Type
    object
    required
    Description
    The total discount applied to this order.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    lastPayment
    Type
    nullable object
    required
    Description
    State of the latest payment attempt for a `subscription` or `order`.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always payment.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the payment.

      Example: pay_0SNlurA049MEWV2HRA0slWFuS8DV
    • Name
      amount
      Type
      object
      required
      Description
      The total amount paid.
    • Name
      discount
      Type
      object
      required
      Description
      The total discount applied to this payment.
    • Name
      disputeOutcome
      Type
      nullable string
      required
      Description

      The outcome of a payment dispute. Otherwise null.

      Allowed values: , lost, won
    • Name
      failedAttempts
      Type
      integer
      required
      Description

      The number of failed payment attempts so far.

      Example: 3
      >= 0
    • Name
      failureCode
      Type
      nullable string
      required
      Description

      An error code indicating the reason for the payment failure.

      Example: paymentCardDeclined
    • Name
      failureMessage
      Type
      nullable string
      required
      Description

      A human-readable message indicating the reason for the payment failure.

      Example: The card has been declined.
    • Name
      invoiceNumber
      Type
      string
      required
      Description

      The number of the invoice from the payment provider

      Example: B74BDB55-0555
    • Name
      method
      Type
      nullable object
      required
      Description
      The payment method describes how a payment can be made.
    • Name
      reason
      Type
      string
      required
      Description

      The reason for this payment.

      Allowed values: subscriptionCreation, subscriptionRenewal, other
    • Name
      receipt
      Type
      nullable string
      required
      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
    • Name
      references
      Type
      array
      required
      Description

      List of payment references. Supported reference types are order and subscription.

    • Name
      refunded
      Type
      object
      required
      Description
      The sum of all refunds related to this payment. Cannot be greater than the paid sum.
    • Name
      status
      Type
      string
      required
      Description

      The status of the payment. Can be succeeded, requiresConfirmation, failed, refunded or disputed.

      Allowed values: succeeded, requiresConfirmation, failed, refunded, disputed, requiresPaymentMethod
    • Name
      subtotal
      Type
      object
      required
      Description
      The total amount to be paid before any applied discounts.
    • Name
      taxes
      Type
      array
      PREVIEW
      required
      Description

      List of taxes.

      Example: [object Object]
    • Name
      total
      Type
      object
      PREVIEW
      required
      Description
      The total amount paid.
    • Name
      user
      Type
      object
      required
      Description
    • Name
      voucher
      Type
      nullable object
      required
      Description
      Voucher applied to the payment.
    • Name
      voucherCode
      Type
      nullable object
      required
      Description
      Voucher code applied to the payment.
    • Name
      attemptedAt
      Type
      string
      required
      Description

      Time when the payment was last attempted.

      Example: 2021-02-14T19:38:34Z
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the payment was created.

      Example: 2021-02-14T19:38:34Z
    • Name
      disputeClosedAt
      Type
      nullable string
      required
      Description

      Time when the payment dispute was closed. Otherwise null.

      Example: 2021-02-14T19:38:34Z
    • Name
      refundedAt
      Type
      nullable string
      required
      Description

      Time when the payment was fully refunded. Otherwise null.

      Example: 2021-02-14T19:38:34Z
  • Name
    plan
    Type
    nullable object
    required
    Description
    Plan that is part of the order, if any.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always plan.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the plan.

      Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
    • Name
      metadata
      Type
      object
      PREVIEW
      required
      Description
      A set of key-value pairs, to store metadata related to the resource.
    • Name
      allowances
      Type
      object
      required
      Description
      The allowances included in the plan.
    • Name
      coverage
      Type
      object
      required
      Description
      The geographic coverage of the plan.
    • Name
      data
      Type
      integer
      DEPRECATED
      required
      Description

      The data allowance in bytes included in this plan. A value of -1 indicates unlimited data.

      Example: 10000000000
    • Name
      dataUnit
      Type
      string
      DEPRECATED
      required
      Description

      The unit of the data value is always byte.

    • Name
      description
      Type
      nullable string
      required
      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.
    • Name
      image
      Type
      nullable string
      required
      Description

      The plan's image, meant to be displayable to the users.

      Example: https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
    • Name
      limits
      Type
      object
      required
      Description
      The limitations of the plan.
    • Name
      name
      Type
      string
      required
      Description

      The plan's name, meant to be displayable to the users.

      Example: Gigs Global
    • Name
      price
      Type
      object
      required
      Description
      The price of the plan.
    • Name
      provider
      Type
      string
      required
      Description

      The ID of the network provider supported by this plan.

      Example: p5
    • Name
      requirements
      Type
      object
      required
      Description
    • Name
      simTypes
      Type
      array
      required
      Description

      List of SIM types supported by this plan. Can be eSIM, pSIM, or both.

      Example: eSIM,pSIM
    • Name
      sms
      Type
      integer
      DEPRECATED
      required
      Description

      The sms allowance included in this plan. A value of -1 indicates unlimited sms.

      Example: 100
    • Name
      smsUnit
      Type
      string
      DEPRECATED
      required
      Description

      The unit of the sms value is always message.

    • Name
      status
      Type
      string
      required
      Description
      Allowed values: available, archived, pending, draft
    • Name
      validity
      Type
      object
      required
      Description
      The validity of the plan.
    • Name
      voice
      Type
      integer
      DEPRECATED
      required
      Description

      The voice allowance included in this plan. A value of -1 indicates unlimited voice.

      Example: 30000
    • Name
      voiceUnit
      Type
      string
      DEPRECATED
      required
      Description

      The unit of the voice value is always second.

    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the plan was created.

      Example: 2021-01-21T19:38:34Z
  • Name
    price
    Type
    object
    required
    Description
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    status
    Type
    string
    required
    Description

    The current status of the order. Every order starts in status pending and can transition to the final states completed or canceled. A possible intermediate status is paid.

    Allowed values: canceled, completed, paid, pending, quoted
  • Name
    subscription
    Type
    nullable string
    required
    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
    required
    Description

    List of unique identifiers for the subscription add-ons that the order applies to, if any.

  • Name
    subscriptionDetails
    Type
    nullable object
    required
    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
    required
    Description
    The total amount to be paid before any applied discounts and taxes.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    taxes
    Type
    array
    PREVIEW
    required
    Description

    List of taxes applied, aggregated by tax.

  • Name
    user
    Type
    object
    required
    Description
    User the order belongs to.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always user.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the user.

      Example: usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
    • Name
      metadata
      Type
      object
      PREVIEW
      required
      Description
      A set of key-value pairs, to store metadata related to the resource.
    • Name
      birthday
      Type
      nullable string
      required
      Description

      The birthday of the user.

      Example: 2017-07-21
    • Name
      email
      Type
      string
      required
      Description

      The primary email address of the user.

      Example: jerry@example.com
    • Name
      emailVerified
      Type
      boolean
      required
      Description

      Whether the user's primary email address is verified or not.

      Example: true
    • Name
      fullName
      Type
      nullable string
      required
      Description

      The user's full name. Required for some Plans.

      Example: Jerry Seinfeld
    • Name
      preferredLocale
      Type
      string
      required
      Description

      The user's locale preference represented as an IETF language tag.

      Example: en-US
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the user was created.

      Example: 2021-01-21T19:38:34Z
  • Name
    voucher
    Type
    nullable object
    required
    Description
    Voucher applied to the order, if any.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always voucher.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the voucher.

      Example: vou_0SNlurA049MEWV0h2jfjkdiOdplN
    • Name
      name
      Type
      string
      required
      Description

      The voucher's name.

      Example: Monthly Basic 15%
    • Name
      priceDiscount
      Type
      nullable object
      required
      Description
      The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
    • Name
      priceDiscountPercentage
      Type
      nullable number
      required
      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
    • Name
      recurrence
      Type
      object
      required
      Description
      Details on whether and for how long the discounts applied via the voucher recur.
    • Name
      redemptions
      Type
      integer
      required
      Description

      Number of times the voucher has been redeemed.

      Example: 2
    • Name
      restrictions
      Type
      object
      required
      Description
      Conditions under which the voucher can be used.
    • Name
      retiredReason
      Type
      nullable string
      required
      Description

      Label indicating the reason why the voucher is retired.

      Allowed values: , manualAction, expired, maxRedemptionsReached, unknown
    • Name
      status
      Type
      string
      required
      Description
      Allowed values: available, retired
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the voucher was created.

      Example: 2021-02-14T19:38:34Z
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the order was created.

    Example: 2021-01-21T19:38:34Z

Request

GET
/projects/{project}/orders/{id}
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"
}

GET/projects/{project}/orders

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
    required
    Description

    The unique identifier for the project.

    Example: gigs

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
    required
    Description

    Type of object is always list.

  • Name
    items
    Type
    array
    required
    Description

    List of objects of type order.

  • Name
    moreItemsAfter
    Type
    nullable string
    required
    Description

    A unique identifier to be used as after pagination parameter if more items are available sorted after the current batch of items.

  • Name
    moreItemsBefore
    Type
    nullable string
    required
    Description

    A unique identifier to be used as before pagination parameter if more items are available sorted before the current batch of items.

Request

GET
/projects/{project}/orders
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
}

POST/projects/{project}/orders

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
      required
      Description

      The unique identifier for the user to be used for the subscription.

      Example: usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
    • 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
    required
    Description

    The unique identifier for the project.

    Example: gigs

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always order.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the order.

    Example: ord_0SNlurA049MEWV0SiRFOw0dmChqN
  • Name
    addons
    Type
    array
    required
    Description

    List of add-ons that are part of the order, if any.

  • Name
    discount
    Type
    object
    required
    Description
    The total discount applied to this order.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    lastPayment
    Type
    nullable object
    required
    Description
    State of the latest payment attempt for a `subscription` or `order`.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always payment.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the payment.

      Example: pay_0SNlurA049MEWV2HRA0slWFuS8DV
    • Name
      amount
      Type
      object
      required
      Description
      The total amount paid.
    • Name
      discount
      Type
      object
      required
      Description
      The total discount applied to this payment.
    • Name
      disputeOutcome
      Type
      nullable string
      required
      Description

      The outcome of a payment dispute. Otherwise null.

      Allowed values: , lost, won
    • Name
      failedAttempts
      Type
      integer
      required
      Description

      The number of failed payment attempts so far.

      Example: 3
      >= 0
    • Name
      failureCode
      Type
      nullable string
      required
      Description

      An error code indicating the reason for the payment failure.

      Example: paymentCardDeclined
    • Name
      failureMessage
      Type
      nullable string
      required
      Description

      A human-readable message indicating the reason for the payment failure.

      Example: The card has been declined.
    • Name
      invoiceNumber
      Type
      string
      required
      Description

      The number of the invoice from the payment provider

      Example: B74BDB55-0555
    • Name
      method
      Type
      nullable object
      required
      Description
      The payment method describes how a payment can be made.
    • Name
      reason
      Type
      string
      required
      Description

      The reason for this payment.

      Allowed values: subscriptionCreation, subscriptionRenewal, other
    • Name
      receipt
      Type
      nullable string
      required
      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
    • Name
      references
      Type
      array
      required
      Description

      List of payment references. Supported reference types are order and subscription.

    • Name
      refunded
      Type
      object
      required
      Description
      The sum of all refunds related to this payment. Cannot be greater than the paid sum.
    • Name
      status
      Type
      string
      required
      Description

      The status of the payment. Can be succeeded, requiresConfirmation, failed, refunded or disputed.

      Allowed values: succeeded, requiresConfirmation, failed, refunded, disputed, requiresPaymentMethod
    • Name
      subtotal
      Type
      object
      required
      Description
      The total amount to be paid before any applied discounts.
    • Name
      taxes
      Type
      array
      PREVIEW
      required
      Description

      List of taxes.

      Example: [object Object]
    • Name
      total
      Type
      object
      PREVIEW
      required
      Description
      The total amount paid.
    • Name
      user
      Type
      object
      required
      Description
    • Name
      voucher
      Type
      nullable object
      required
      Description
      Voucher applied to the payment.
    • Name
      voucherCode
      Type
      nullable object
      required
      Description
      Voucher code applied to the payment.
    • Name
      attemptedAt
      Type
      string
      required
      Description

      Time when the payment was last attempted.

      Example: 2021-02-14T19:38:34Z
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the payment was created.

      Example: 2021-02-14T19:38:34Z
    • Name
      disputeClosedAt
      Type
      nullable string
      required
      Description

      Time when the payment dispute was closed. Otherwise null.

      Example: 2021-02-14T19:38:34Z
    • Name
      refundedAt
      Type
      nullable string
      required
      Description

      Time when the payment was fully refunded. Otherwise null.

      Example: 2021-02-14T19:38:34Z
  • Name
    plan
    Type
    nullable object
    required
    Description
    Plan that is part of the order, if any.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always plan.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the plan.

      Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
    • Name
      metadata
      Type
      object
      PREVIEW
      required
      Description
      A set of key-value pairs, to store metadata related to the resource.
    • Name
      allowances
      Type
      object
      required
      Description
      The allowances included in the plan.
    • Name
      coverage
      Type
      object
      required
      Description
      The geographic coverage of the plan.
    • Name
      data
      Type
      integer
      DEPRECATED
      required
      Description

      The data allowance in bytes included in this plan. A value of -1 indicates unlimited data.

      Example: 10000000000
    • Name
      dataUnit
      Type
      string
      DEPRECATED
      required
      Description

      The unit of the data value is always byte.

    • Name
      description
      Type
      nullable string
      required
      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.
    • Name
      image
      Type
      nullable string
      required
      Description

      The plan's image, meant to be displayable to the users.

      Example: https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
    • Name
      limits
      Type
      object
      required
      Description
      The limitations of the plan.
    • Name
      name
      Type
      string
      required
      Description

      The plan's name, meant to be displayable to the users.

      Example: Gigs Global
    • Name
      price
      Type
      object
      required
      Description
      The price of the plan.
    • Name
      provider
      Type
      string
      required
      Description

      The ID of the network provider supported by this plan.

      Example: p5
    • Name
      requirements
      Type
      object
      required
      Description
    • Name
      simTypes
      Type
      array
      required
      Description

      List of SIM types supported by this plan. Can be eSIM, pSIM, or both.

      Example: eSIM,pSIM
    • Name
      sms
      Type
      integer
      DEPRECATED
      required
      Description

      The sms allowance included in this plan. A value of -1 indicates unlimited sms.

      Example: 100
    • Name
      smsUnit
      Type
      string
      DEPRECATED
      required
      Description

      The unit of the sms value is always message.

    • Name
      status
      Type
      string
      required
      Description
      Allowed values: available, archived, pending, draft
    • Name
      validity
      Type
      object
      required
      Description
      The validity of the plan.
    • Name
      voice
      Type
      integer
      DEPRECATED
      required
      Description

      The voice allowance included in this plan. A value of -1 indicates unlimited voice.

      Example: 30000
    • Name
      voiceUnit
      Type
      string
      DEPRECATED
      required
      Description

      The unit of the voice value is always second.

    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the plan was created.

      Example: 2021-01-21T19:38:34Z
  • Name
    price
    Type
    object
    required
    Description
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    status
    Type
    string
    required
    Description

    The current status of the order. Every order starts in status pending and can transition to the final states completed or canceled. A possible intermediate status is paid.

    Allowed values: canceled, completed, paid, pending, quoted
  • Name
    subscription
    Type
    nullable string
    required
    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
    required
    Description

    List of unique identifiers for the subscription add-ons that the order applies to, if any.

  • Name
    subscriptionDetails
    Type
    nullable object
    required
    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
    required
    Description
    The total amount to be paid before any applied discounts and taxes.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    taxes
    Type
    array
    PREVIEW
    required
    Description

    List of taxes applied, aggregated by tax.

  • Name
    user
    Type
    object
    required
    Description
    User the order belongs to.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always user.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the user.

      Example: usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
    • Name
      metadata
      Type
      object
      PREVIEW
      required
      Description
      A set of key-value pairs, to store metadata related to the resource.
    • Name
      birthday
      Type
      nullable string
      required
      Description

      The birthday of the user.

      Example: 2017-07-21
    • Name
      email
      Type
      string
      required
      Description

      The primary email address of the user.

      Example: jerry@example.com
    • Name
      emailVerified
      Type
      boolean
      required
      Description

      Whether the user's primary email address is verified or not.

      Example: true
    • Name
      fullName
      Type
      nullable string
      required
      Description

      The user's full name. Required for some Plans.

      Example: Jerry Seinfeld
    • Name
      preferredLocale
      Type
      string
      required
      Description

      The user's locale preference represented as an IETF language tag.

      Example: en-US
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the user was created.

      Example: 2021-01-21T19:38:34Z
  • Name
    voucher
    Type
    nullable object
    required
    Description
    Voucher applied to the order, if any.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always voucher.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the voucher.

      Example: vou_0SNlurA049MEWV0h2jfjkdiOdplN
    • Name
      name
      Type
      string
      required
      Description

      The voucher's name.

      Example: Monthly Basic 15%
    • Name
      priceDiscount
      Type
      nullable object
      required
      Description
      The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
    • Name
      priceDiscountPercentage
      Type
      nullable number
      required
      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
    • Name
      recurrence
      Type
      object
      required
      Description
      Details on whether and for how long the discounts applied via the voucher recur.
    • Name
      redemptions
      Type
      integer
      required
      Description

      Number of times the voucher has been redeemed.

      Example: 2
    • Name
      restrictions
      Type
      object
      required
      Description
      Conditions under which the voucher can be used.
    • Name
      retiredReason
      Type
      nullable string
      required
      Description

      Label indicating the reason why the voucher is retired.

      Allowed values: , manualAction, expired, maxRedemptionsReached, unknown
    • Name
      status
      Type
      string
      required
      Description
      Allowed values: available, retired
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the voucher was created.

      Example: 2021-02-14T19:38:34Z
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the order was created.

    Example: 2021-01-21T19:38:34Z

Request

POST
/projects/{project}/orders
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"
}

POST/projects/{project}/orders/{order}/confirm

Confirm an order quote

Confirms an order quote. Order needs to be confirmed before they can be paid.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    order
    Type
    string
    required
    Description

    The unique identifier for the order.

    Example: ord_0SNlurA049MEWV0SiRFOw0dmChqN

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always order.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the order.

    Example: ord_0SNlurA049MEWV0SiRFOw0dmChqN
  • Name
    addons
    Type
    array
    required
    Description

    List of add-ons that are part of the order, if any.

  • Name
    discount
    Type
    object
    required
    Description
    The total discount applied to this order.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    lastPayment
    Type
    nullable object
    required
    Description
    State of the latest payment attempt for a `subscription` or `order`.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always payment.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the payment.

      Example: pay_0SNlurA049MEWV2HRA0slWFuS8DV
    • Name
      amount
      Type
      object
      required
      Description
      The total amount paid.
    • Name
      discount
      Type
      object
      required
      Description
      The total discount applied to this payment.
    • Name
      disputeOutcome
      Type
      nullable string
      required
      Description

      The outcome of a payment dispute. Otherwise null.

      Allowed values: , lost, won
    • Name
      failedAttempts
      Type
      integer
      required
      Description

      The number of failed payment attempts so far.

      Example: 3
      >= 0
    • Name
      failureCode
      Type
      nullable string
      required
      Description

      An error code indicating the reason for the payment failure.

      Example: paymentCardDeclined
    • Name
      failureMessage
      Type
      nullable string
      required
      Description

      A human-readable message indicating the reason for the payment failure.

      Example: The card has been declined.
    • Name
      invoiceNumber
      Type
      string
      required
      Description

      The number of the invoice from the payment provider

      Example: B74BDB55-0555
    • Name
      method
      Type
      nullable object
      required
      Description
      The payment method describes how a payment can be made.
    • Name
      reason
      Type
      string
      required
      Description

      The reason for this payment.

      Allowed values: subscriptionCreation, subscriptionRenewal, other
    • Name
      receipt
      Type
      nullable string
      required
      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
    • Name
      references
      Type
      array
      required
      Description

      List of payment references. Supported reference types are order and subscription.

    • Name
      refunded
      Type
      object
      required
      Description
      The sum of all refunds related to this payment. Cannot be greater than the paid sum.
    • Name
      status
      Type
      string
      required
      Description

      The status of the payment. Can be succeeded, requiresConfirmation, failed, refunded or disputed.

      Allowed values: succeeded, requiresConfirmation, failed, refunded, disputed, requiresPaymentMethod
    • Name
      subtotal
      Type
      object
      required
      Description
      The total amount to be paid before any applied discounts.
    • Name
      taxes
      Type
      array
      PREVIEW
      required
      Description

      List of taxes.

      Example: [object Object]
    • Name
      total
      Type
      object
      PREVIEW
      required
      Description
      The total amount paid.
    • Name
      user
      Type
      object
      required
      Description
    • Name
      voucher
      Type
      nullable object
      required
      Description
      Voucher applied to the payment.
    • Name
      voucherCode
      Type
      nullable object
      required
      Description
      Voucher code applied to the payment.
    • Name
      attemptedAt
      Type
      string
      required
      Description

      Time when the payment was last attempted.

      Example: 2021-02-14T19:38:34Z
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the payment was created.

      Example: 2021-02-14T19:38:34Z
    • Name
      disputeClosedAt
      Type
      nullable string
      required
      Description

      Time when the payment dispute was closed. Otherwise null.

      Example: 2021-02-14T19:38:34Z
    • Name
      refundedAt
      Type
      nullable string
      required
      Description

      Time when the payment was fully refunded. Otherwise null.

      Example: 2021-02-14T19:38:34Z
  • Name
    plan
    Type
    nullable object
    required
    Description
    Plan that is part of the order, if any.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always plan.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the plan.

      Example: pln_0SNlurA049MEWV3V0q7gjQbM4EVo
    • Name
      metadata
      Type
      object
      PREVIEW
      required
      Description
      A set of key-value pairs, to store metadata related to the resource.
    • Name
      allowances
      Type
      object
      required
      Description
      The allowances included in the plan.
    • Name
      coverage
      Type
      object
      required
      Description
      The geographic coverage of the plan.
    • Name
      data
      Type
      integer
      DEPRECATED
      required
      Description

      The data allowance in bytes included in this plan. A value of -1 indicates unlimited data.

      Example: 10000000000
    • Name
      dataUnit
      Type
      string
      DEPRECATED
      required
      Description

      The unit of the data value is always byte.

    • Name
      description
      Type
      nullable string
      required
      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.
    • Name
      image
      Type
      nullable string
      required
      Description

      The plan's image, meant to be displayable to the users.

      Example: https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png
    • Name
      limits
      Type
      object
      required
      Description
      The limitations of the plan.
    • Name
      name
      Type
      string
      required
      Description

      The plan's name, meant to be displayable to the users.

      Example: Gigs Global
    • Name
      price
      Type
      object
      required
      Description
      The price of the plan.
    • Name
      provider
      Type
      string
      required
      Description

      The ID of the network provider supported by this plan.

      Example: p5
    • Name
      requirements
      Type
      object
      required
      Description
    • Name
      simTypes
      Type
      array
      required
      Description

      List of SIM types supported by this plan. Can be eSIM, pSIM, or both.

      Example: eSIM,pSIM
    • Name
      sms
      Type
      integer
      DEPRECATED
      required
      Description

      The sms allowance included in this plan. A value of -1 indicates unlimited sms.

      Example: 100
    • Name
      smsUnit
      Type
      string
      DEPRECATED
      required
      Description

      The unit of the sms value is always message.

    • Name
      status
      Type
      string
      required
      Description
      Allowed values: available, archived, pending, draft
    • Name
      validity
      Type
      object
      required
      Description
      The validity of the plan.
    • Name
      voice
      Type
      integer
      DEPRECATED
      required
      Description

      The voice allowance included in this plan. A value of -1 indicates unlimited voice.

      Example: 30000
    • Name
      voiceUnit
      Type
      string
      DEPRECATED
      required
      Description

      The unit of the voice value is always second.

    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the plan was created.

      Example: 2021-01-21T19:38:34Z
  • Name
    price
    Type
    object
    required
    Description
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    status
    Type
    string
    required
    Description

    The current status of the order. Every order starts in status pending and can transition to the final states completed or canceled. A possible intermediate status is paid.

    Allowed values: canceled, completed, paid, pending, quoted
  • Name
    subscription
    Type
    nullable string
    required
    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
    required
    Description

    List of unique identifiers for the subscription add-ons that the order applies to, if any.

  • Name
    subscriptionDetails
    Type
    nullable object
    required
    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
    required
    Description
    The total amount to be paid before any applied discounts and taxes.
    • Name
      amount
      Type
      integer
      required
      Description

      The price amount in the currency's minor unit, e.g. "cents" for many currencies.

      Example: 999
      >= 0
    • Name
      currency
      Type
      string
      required
      Description

      Three-letter ISO 4217 currency code. Must be a supported currency.

      Example: USD
  • Name
    taxes
    Type
    array
    PREVIEW
    required
    Description

    List of taxes applied, aggregated by tax.

  • Name
    user
    Type
    object
    required
    Description
    User the order belongs to.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always user.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the user.

      Example: usr_0SNlurA049MEWV4OpCwsNyC9Kn2d
    • Name
      metadata
      Type
      object
      PREVIEW
      required
      Description
      A set of key-value pairs, to store metadata related to the resource.
    • Name
      birthday
      Type
      nullable string
      required
      Description

      The birthday of the user.

      Example: 2017-07-21
    • Name
      email
      Type
      string
      required
      Description

      The primary email address of the user.

      Example: jerry@example.com
    • Name
      emailVerified
      Type
      boolean
      required
      Description

      Whether the user's primary email address is verified or not.

      Example: true
    • Name
      fullName
      Type
      nullable string
      required
      Description

      The user's full name. Required for some Plans.

      Example: Jerry Seinfeld
    • Name
      preferredLocale
      Type
      string
      required
      Description

      The user's locale preference represented as an IETF language tag.

      Example: en-US
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the user was created.

      Example: 2021-01-21T19:38:34Z
  • Name
    voucher
    Type
    nullable object
    required
    Description
    Voucher applied to the order, if any.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always voucher.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the voucher.

      Example: vou_0SNlurA049MEWV0h2jfjkdiOdplN
    • Name
      name
      Type
      string
      required
      Description

      The voucher's name.

      Example: Monthly Basic 15%
    • Name
      priceDiscount
      Type
      nullable object
      required
      Description
      The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
    • Name
      priceDiscountPercentage
      Type
      nullable number
      required
      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
    • Name
      recurrence
      Type
      object
      required
      Description
      Details on whether and for how long the discounts applied via the voucher recur.
    • Name
      redemptions
      Type
      integer
      required
      Description

      Number of times the voucher has been redeemed.

      Example: 2
    • Name
      restrictions
      Type
      object
      required
      Description
      Conditions under which the voucher can be used.
    • Name
      retiredReason
      Type
      nullable string
      required
      Description

      Label indicating the reason why the voucher is retired.

      Allowed values: , manualAction, expired, maxRedemptionsReached, unknown
    • Name
      status
      Type
      string
      required
      Description
      Allowed values: available, retired
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the voucher was created.

      Example: 2021-02-14T19:38:34Z
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the order was created.

    Example: 2021-01-21T19:38:34Z

Request

POST
/projects/{project}/orders/{order}/confirm
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"
}