Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Payment

Index

Functions

Functions

  • description

    Retrieves a payment, given its id. Called asynchronously with await. All data is provided as-is from the server, with the addition of an ok boolean for error handling.

    docs

    https://docs.hyper.co/reference/retrieve-payment

    example
    import { Client, Payment } from 'hyper'
    const client = Hyper('my-api-key')

    let payment = "my-payment-id"

    const res = await Payment.get(client, payment)

    Parameters

    • client: HyperApiClient

      (HyperApiClient) The client to use for the request

    • payment: string

      (string) The id of the payment to fetch

    Returns Promise<HyperApiResponse>

    HyperApiResponse

  • description

    Refunds a payment, given its id. Called asynchronously with await. All data is provided as-is from the server, with the addition of an ok boolean for error handling.

    docs

    https://docs.hyper.co/reference/refund-payment

    example
    import { Client, Payment } from 'hyper'
    const client = Hyper('my-api-key')

    let payment = "my-payment-id"

    const res = await Payment.refund(client, payment)

    Parameters

    • client: HyperApiClient

      (HyperApiClient) The client to use for the request

    • payment: string

      (string) The id of the payment to refund

    Returns Promise<HyperApiResponse>

    HyperApiResponse

Generated using TypeDoc