Skip to content

Payments

CreateSubscription

LookupPaymentAddress

LookupPaymentIdentities

local ls = core.LookupPaymentIdentities({
    userId="<user uuid>",
})

LookupPaymentMethods

Example

ls = core.LookupPaymentMethods({
    userId="<user uuid>",
    provider="Stripe"
})

PerformPayment

Example

local result = core.PerformPayment({
    methodHandle="stripe-test",
    paymentIdentity="c0e3d605-0b18-4cb7-9e00-96d5bf84b530",
    paymentMethod="f93f2579-d631-40c7-9402-39dbdcaf848b",
    amount=2000,
    ccy="USD",
    tracker="31856c3a-ccc3-41a2-9d9d-68e1b0c0356c",
    body="Test payment",
    sku="1000",
    description="Test description"
},
"<user uuid>")

CreateSubscription

    core.CreateSubscription({...Subscription Mutation...})

CreatePaymentCoupon

    core.CreatePaymentCoupon({...Payment Mutation...})

Create a coupon

  • Object
    • paymentProvider: Option[String] (payment provider)
    • providerHandle: String (Org specific payment method handle)
    • paymentIdentity: Option[SafeUuid] (Uuid for user payment identity (persistent methods))
    • paymentMethod: Option[SafeUuid] (Uuid for user payment method (persistent methods))
    • subscriptionIdentifier: Option[String] (Provider opaque token)
    • amount: Int (Amount (integer CCY))
    • currency: String (CCY code)
    • status: Option[String] (Status: active | retired)
    • providerStatus: Option[String] (Status: provider)
    • startDate: Option[LocalDate] (Start date)
    • endDate: Option[LocalDate] (End date)
    • activationDate: Option[LocalDate] (Activation date)
    • frequency: Option[String] (Frequency)
    • renewal: Option[String] (Renewal status)
    • subscriptionName: Option[String] (Subscription descriptive name)
    • tracker: Option[String],
    • body: Option[String],
    • sku: Option[String],
    • description: Option[String]

Id from the handle

core.CreatePaymentCoupon(
    {
        handle="TEST10",
        name="First time coupon",
        discountKind="percent",
        discountAmount=20,
        limitKind="none",
        expiration="2025-01-01",
        applicationScopeKind="opaque",
        applicationScope="trainer:xxxxxxx-5bc3-41bf-9573-2d67b51632a6",
        userScopeKind="any",
        ownerScopeKind="user",
        ownerScope="xxxxxxxx-5bc3-41bf-9573-2d67b51632a6"

    }, "a89f784b-5bc3-41bf-9573-2d67b51632a6"
)

UpdatePaymentCoupon

ListPaymentCoupons

FindPaymentCoupons

DeletePaymentCoupon

CalcDiscount