Gank Logo
Essentials

Gank webhooks

Receives update for successful payments for payments going to your Gank account

This can be configured via Creator Settings on Ganknow dashboard, via the Widgets menu

Payment webhooks

Webhook for Gank payments going into your Gank account. Can be configured via Payment Webhook menu inside Widgets.

User membership

Sample webhook payload

{
    "data": {
        "human_id": "UM-250925-NWKBIKATC",
        "usecase_data": {
            "data": {
                "billing_period": 1,
                "is_fee_covered": true,
                "price_event_id": "2f0f05c6-9760-41af-8201-1cec61aa2421",
                "creator_user_id": "fba1aaba-ffb5-42ae-8571-6ec0eb337802",
                "membership_title": "Test Membership! <>&...",
                "subscriber_user_id": "4758a84f-c541-4e7a-b2b1-8bf76e05f177",
                "custom_reference_id": null,
                "creator_user_nickname": "notruff4",
                "subscriber_user_email": "...",
                "is_fee_covered_forever": true,
                "subscriber_user_nickname": "notruffX9VpAK6"
            },
            "usecase": "USER_MEMBERSHIP_RECURRING"
        },
        "payment_status": "SUCCEED"
    },
    "event": "USER_MEMBERSHIP.TX_SUCCEED"
}

Digital Goods (Will need to be manually enabled for now)

Sample webhook payload

{
    "event": "DIGITAL_GOODS.TX_SUCCEED",
    "data": {
        "human_id": "DG-260227-5U7OZOIXN",
        "usecase_data": {
            "data": {
                "catalog_id": "4ae9d5c2-959f-42d6-a463-6c0003c95c8c",
                "buyer_user_id": "211376af-da75-4592-b0ab-d92216cb6101",
                "catalog_title": "Test Listing 26/02/27T10:14!",
                "discount_code": null,
                "is_fee_covered": true,
                "creator_user_id": "fba1aaba-ffb5-42ae-8571-6ec0eb337802",
                "buyer_user_email": "[email protected]",
                "catalog_price_id": "77b2db34-6ea5-40e6-bb7b-ad62e3efcf2c",
                "buyer_user_nickname": "notruff5",
                "custom_reference_id": null,
                "creator_user_nickname": "notruff4"
            },
            "usecase": "DIGITAL_GOODS"
        },
        "payment_status": "SUCCEED"
    }
}

You can contact us at [email protected] if you want to enable digital goods listing webhook for your Gank account

Signature verification

We sign the webhook requests going out into your configured URL inside the Gank-Signature request header, where we takes the request body & sign it with keys that are associated with secret key that are generated on the webhook setting page. The signature is calculated similar to how Stripe handles its signature, which you can read more here.

One on the easiest way to integrate it can be done via Stripe official library such as stripe-go, with just the difference being that their header is saved on Stripe-Signature. Specific implementation on that library is on ComputeSignature() function call

Webhook test triggers

You can trigger a test webhook payload for whenever you want to use it to test your integration. A custom target URL can be specified that can differ from your current registered webhook URL.

You'll need to setup your webhook accounts on Gank first, since we need the secret key to be generated first for the signing process

User membership payment

Need to have at least 1 membership tier created on your account

Sample request

curl -XPOST "${V2_API}/payment/webhook/gank/test-trigger" \
    -H "Authorization: Bearer ${LOGIN_TOKEN}" \
    -H "Content-Type: application/json" \
    --data '{"event": "USER_MEMBERSHIP.TX_SUCCEED", "custom_reference_id": "custom-ref-id-260302T1921Z", "target": "https://your-testing-url.com"}'

Digital listing payment

Need to have at least 1 listing created on your account

Sample request

curl -XPOST "${V2_API}/payment/webhook/gank/test-trigger" \
    -H "Authorization: Bearer ${LOGIN_TOKEN}" \
    -H "Content-Type: application/json" \
    --data '{"event": "DIGITAL_GOODS.TX_SUCCEED", "custom_reference_id": "custom-ref-id-260302T1921Z", "target": "https://your-testing-url.com"}'