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

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"
}

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"
}