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
    lastPayment
    Type
    nullable object
    Description
    State of the latest payment attempt for a `subscription` or `order`.
  • Name
    plan
    Type
    nullable object
    Description
    Plan that is part of the order, if any.
  • Name
    price
    Type
    object
    Description
  • 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
    subtotal
    Type
    object
    Description
    The total amount to be paid before any applied discounts and taxes.
  • Name
    taxes
    Type
    array
    PREVIEW
    Description
    List of taxes applied, aggregated by tax.
  • Name
    user
    Type
    object
    Description
    User the order belongs to.
  • Name
    voucher
    Type
    nullable object
    Description
    Voucher applied to the order, if any.
  • 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/{order}

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
    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
    lastPayment
    Type
    nullable object
    required
    Description
    State of the latest payment attempt for a `subscription` or `order`.
  • Name
    plan
    Type
    nullable object
    required
    Description
    Plan that is part of the order, if any.
  • Name
    price
    Type
    object
    required
    Description
  • 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
    subtotal
    Type
    object
    required
    Description
    The total amount to be paid before any applied discounts and taxes.
  • 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
    voucher
    Type
    nullable object
    required
    Description
    Voucher applied to the order, if any.
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the order was created.

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

Request

GET
/projects/{project}/orders/{order}
curl https://api.gigs.com/projects/{project}/orders/{order} \
-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",
      "plans": [
        "pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
      ],
      "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",
          "plans": [
            "pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
          ],
          "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
    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
    lastPayment
    Type
    nullable object
    required
    Description
    State of the latest payment attempt for a `subscription` or `order`.
  • Name
    plan
    Type
    nullable object
    required
    Description
    Plan that is part of the order, if any.
  • Name
    price
    Type
    object
    required
    Description
  • 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
    subtotal
    Type
    object
    required
    Description
    The total amount to be paid before any applied discounts and taxes.
  • 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
    voucher
    Type
    nullable object
    required
    Description
    Voucher applied to the order, if any.
  • 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",
      "plans": [
        "pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
      ],
      "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
    lastPayment
    Type
    nullable object
    required
    Description
    State of the latest payment attempt for a `subscription` or `order`.
  • Name
    plan
    Type
    nullable object
    required
    Description
    Plan that is part of the order, if any.
  • Name
    price
    Type
    object
    required
    Description
  • 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
    subtotal
    Type
    object
    required
    Description
    The total amount to be paid before any applied discounts and taxes.
  • 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
    voucher
    Type
    nullable object
    required
    Description
    Voucher applied to the order, if any.
  • 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",
      "plans": [
        "pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
      ],
      "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"
}