Payment Links

A payment link provides a URL that renders a page for the users to pay for an invoice.

Properties

  • Name
    object
    Type
    string
    Description

    Type of object is always paymentLink.

    Allowed values: paymentLink
  • Name
    id
    Type
    string
    Description

    Unique identifier for the payment link.

    Example: "pml_0SNlurA049MEWV1x2CfC8u8im5xU"
  • Name
    canceledAt
    Type
    nullable string
    Description

    Time when the payment link was canceled and became invalid.

    Example: "2024-08-14T19:40:34Z"
  • Name
    completedAt
    Type
    nullable string
    Description

    Time when the payment link was used for a payment and thus completed.

    Example: "2024-08-14T19:40:34Z"
  • Name
    createdAt
    Type
    string
    Description

    Time when the payment link was created.

    Example: "2024-08-14T19:38:34Z"
  • Name
    ebanx
    Type
    nullable object
    Description
    The details for an EBANX payment link. Present when type is EBANX.
    • Name
      redirectUrl
      Type
      nullable string
      required
      Description

      The URL the user is redirected to after the payment has been attempted.

      Example: "https://example.com"
  • Name
    invoice
    Type
    string
    Description

    The unique identifier of the Invoice the payment link is for.

    Example: "inv_0SNlurA049MEWV1QTRqvd18YuG25"
  • Name
    paymentUrl
    Type
    string
    Description

    URL that renders a payment page for the user.

    Example: "https://api.ebanx.com/ws/redirect/execute?hash=64f2"
  • Name
    status
    Type
    string
    Description

    Status of the payment link.

    Example: "active"
    Allowed values: active, canceled, completed
  • Name
    type
    Type
    string
    Description

    Type describes the provider of the payment link. Currently only EBANX is supported.

    Example: "ebanx"
    Allowed values: ebanx

Example

{
  "object": "paymentLink",
  "id": "pml_0SNlurA049MEWV1x2CfC8u8im5xU",
  "canceledAt": "2024-08-14T19:40:34Z",
  "completedAt": "2024-08-14T19:40:34Z",
  "createdAt": "2024-08-14T19:38:34.0Z",
  "ebanx": {
    "redirectUrl": "https://example.com"
  },
  "invoice": "inv_0SNlurA049MEWV1QTRqvd18YuG25",
  "paymentUrl": "https://api.ebanx.com/ws/redirect/execute?hash=64f2",
  "status": "active",
  "type": "ebanx"
}

GET/projects/{project}/paymentLinks/{paymentLink}

Retrieves the details of an existing payment link.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: "gigs"
  • Name
    paymentLink
    Type
    string
    required
    Description

    The unique identifier for the payment link.

    Example: "pml_0SNlurA049MEWV1x2CfC8u8im5xU"

Response Schemas

Returns the payment link if it exists.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always paymentLink.

    Allowed values: paymentLink
  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the payment link.

    Example: "pml_0SNlurA049MEWV1x2CfC8u8im5xU"
  • Name
    canceledAt
    Type
    nullable string
    required
    Description

    Time when the payment link was canceled and became invalid.

    Example: "2024-08-14T19:40:34Z"
  • Name
    completedAt
    Type
    nullable string
    required
    Description

    Time when the payment link was used for a payment and thus completed.

    Example: "2024-08-14T19:40:34Z"
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the payment link was created.

    Example: "2024-08-14T19:38:34Z"
  • Name
    ebanx
    Type
    nullable object
    required
    Description
    The details for an EBANX payment link. Present when type is EBANX.
    • Name
      redirectUrl
      Type
      nullable string
      required
      Description

      The URL the user is redirected to after the payment has been attempted.

      Example: "https://example.com"
  • Name
    invoice
    Type
    string
    required
    Description

    The unique identifier of the Invoice the payment link is for.

    Example: "inv_0SNlurA049MEWV1QTRqvd18YuG25"
  • Name
    paymentUrl
    Type
    string
    required
    Description

    URL that renders a payment page for the user.

    Example: "https://api.ebanx.com/ws/redirect/execute?hash=64f2"
  • Name
    status
    Type
    string
    required
    Description

    Status of the payment link.

    Example: "active"
    Allowed values: active, canceled, completed
  • Name
    type
    Type
    string
    required
    Description

    Type describes the provider of the payment link. Currently only EBANX is supported.

    Example: "ebanx"
    Allowed values: ebanx

Request

GET
/projects/{project}/paymentLinks/{paymentLink}
curl https://api.gigs.com/projects/{project}/paymentLinks/{paymentLink} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"

Response

{
  "object": "paymentLink",
  "id": "pml_0SNlurA049MEWV1x2CfC8u8im5xU",
  "canceledAt": "2024-08-14T19:40:34Z",
  "completedAt": "2024-08-14T19:40:34Z",
  "createdAt": "2024-08-14T19:38:34Z",
  "ebanx": {
    "redirectUrl": "https://example.com"
  },
  "invoice": "inv_0SNlurA049MEWV1QTRqvd18YuG25",
  "paymentUrl": "https://api.ebanx.com/ws/redirect/execute?hash=64f2",
  "status": "active",
  "type": "ebanx"
}

GET/projects/{project}/paymentLinks

Returns a list of payment links.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: "gigs"

Query Parameters

  • 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
  • Name
    invoice
    Type
    string
    Description

    The unique identifier for the invoice to be filtered by.

    Example: "inv_0SNlurA049MEWV1QTRqvd18YuG25"
  • Name
    status
    Type
    array
    Description

    A comma-separated list of statuses to be filtered by.

Response Schemas

Returns a dictionary with an items property that contains an array of payment links.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always list.

    Allowed values: list
  • Name
    items
    Type
    array
    required
    Description
    List of objects of type `paymentLink`.
  • 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}/paymentLinks
curl https://api.gigs.com/projects/{project}/paymentLinks \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"

Response

{
  "object": "list",
  "items": [
    {
      "object": "paymentLink",
      "id": "pml_0SNlurA049MEWV1x2CfC8u8im5xU",
      "canceledAt": "2024-08-14T19:40:34Z",
      "completedAt": "2024-08-14T19:40:34Z",
      "createdAt": "2024-08-14T19:38:34Z",
      "ebanx": {
        "redirectUrl": "https://example.com"
      },
      "invoice": "inv_0SNlurA049MEWV1QTRqvd18YuG25",
      "paymentUrl": "https://api.ebanx.com/ws/redirect/execute?hash=64f2",
      "status": "active",
      "type": "ebanx"
    }
  ],
  "moreItemsAfter": null,
  "moreItemsBefore": null
}

POST/projects/{project}/paymentLinks

Creates a new payment link for an invoice.

Body

  • Name
    ebanx
    Type
    nullable object
    Description
    The details needed to create a payment link with EBANX. Required for type EBANX.
    • Name
      user
      Type
      object
      required
      Description
      The user information needed for the payment link.
    • Name
      redirectUrl
      Type
      string
      Description

      The URL to redirect the user to after the payment has been attempted.

      Example: "https://example.com"
  • Name
    invoice
    Type
    string
    required
    Description

    The unique identifier of the Invoice the payment link is for.

    Example: "inv_0SNlurA049MEWV1QTRqvd18YuG25"
  • Name
    type
    Type
    string
    required
    Description

    Type describes the provider of the payment link.

    Example: "ebanx"
    Allowed values: ebanx

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: "gigs"

Response Schemas

Returns the created payment link.

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always paymentLink.

    Allowed values: paymentLink
  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the payment link.

    Example: "pml_0SNlurA049MEWV1x2CfC8u8im5xU"
  • Name
    canceledAt
    Type
    nullable string
    required
    Description

    Time when the payment link was canceled and became invalid.

    Example: "2024-08-14T19:40:34Z"
  • Name
    completedAt
    Type
    nullable string
    required
    Description

    Time when the payment link was used for a payment and thus completed.

    Example: "2024-08-14T19:40:34Z"
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the payment link was created.

    Example: "2024-08-14T19:38:34Z"
  • Name
    ebanx
    Type
    nullable object
    required
    Description
    The details for an EBANX payment link. Present when type is EBANX.
    • Name
      redirectUrl
      Type
      nullable string
      required
      Description

      The URL the user is redirected to after the payment has been attempted.

      Example: "https://example.com"
  • Name
    invoice
    Type
    string
    required
    Description

    The unique identifier of the Invoice the payment link is for.

    Example: "inv_0SNlurA049MEWV1QTRqvd18YuG25"
  • Name
    paymentUrl
    Type
    string
    required
    Description

    URL that renders a payment page for the user.

    Example: "https://api.ebanx.com/ws/redirect/execute?hash=64f2"
  • Name
    status
    Type
    string
    required
    Description

    Status of the payment link.

    Example: "active"
    Allowed values: active, canceled, completed
  • Name
    type
    Type
    string
    required
    Description

    Type describes the provider of the payment link. Currently only EBANX is supported.

    Example: "ebanx"
    Allowed values: ebanx

Request

POST
/projects/{project}/paymentLinks
curl https://api.gigs.com/projects/{project}/paymentLinks \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"ebanx\":{\"user\":{\"fullName\":\"Elaine Benes\",\"email\":\"elaine@example.com\",\"taxNumber\":\"290.063.072-03\"},\"redirectUrl\":\"https://example.com\"},\"invoice\":\"inv_0SNlurA049MEWV1QTRqvd18YuG25\",\"type\":\"ebanx\"}"

Response

{
  "object": "paymentLink",
  "id": "pml_0SNlurA049MEWV1x2CfC8u8im5xU",
  "canceledAt": "2024-08-14T19:40:34Z",
  "completedAt": "2024-08-14T19:40:34Z",
  "createdAt": "2024-08-14T19:38:34Z",
  "ebanx": {
    "redirectUrl": "https://example.com"
  },
  "invoice": "inv_0SNlurA049MEWV1QTRqvd18YuG25",
  "paymentUrl": "https://api.ebanx.com/ws/redirect/execute?hash=64f2",
  "status": "active",
  "type": "ebanx"
}