A template for Make or n8n that gives a reward of credit in your own tool the moment Bolt Claw says it is ready, then tells Bolt Claw it was given. It is for a reward that is not cash of the kind credit, given to one of your own users: a referrer you made, or the friend who bought.
What it does
- Bolt Claw sends
referral.grant.readywhen a grant finishes the program's hold. The template checks the delivery's signature and time first, and does nothing else with one that fails. - It reads the grant with
GET /v1/referrals/grants/{id}: what it is now, not what the delivery said. - Only when the grant is
ready, itsreward_typeiscreditand it belongs to one of your own users (recipient.kindreferrerorcustomer, with yourexternal_id), it asks your tool to give the credit. - Then it records it with
POST /v1/referrals/grants/{id}/fulfiland the referencecredit-<grant id>. The person sees the reward as given on their page, and Bolt Claw sendsreferral.grant.fulfilled.
Every other grant (a free month, a perk, an affiliate's reward) stays ready on the program's Grants tab for you to give.
What your tool receives
A POST to the address you put in Give the credit, with your tool's own
key, and the header Idempotency-Key: boltclaw-grant-<grant id>:
| Field | Example |
|---|---|
user_id |
user-1042: your own id for the person |
amount_minor |
1000 |
currency |
USD |
description |
10.00 USD in credit |
boltclaw_grant_id |
the grant's id |
test |
true for a grant from test data: give nothing |
n8n sends it as JSON; Make sends it as form fields. Give the credit once per
Idempotency-Key. That is what makes a repeat safe: if the step runs twice,
the second must find the first and change nothing.
Before you start
- A key with
referrals:readandreferrals:write, made by somebody who holds Adjust commissions and pay partners (owners and admins do by default): marking a grant given is a payout decision. - An endpoint in Settings, Developers, Webhooks for the event
referral.grant.ready, added once you have the template's address. Copy its signing secret: it is shown once.
In Make
- Download
https://boltclaw.ai/referrals/templates/make/grant-ready-to-credit.jsonand import it (... menu, Import Blueprint). - In the first module, Add a webhook. Under Show advanced settings, set Get request headers and JSON pass-through to Yes. Copy its address and add it as the endpoint in Bolt Claw.
- Expected signature: replace
PASTE_THE_ENDPOINT_SIGNING_SECRETwith the signing secret. Keep the quotes. - Read the grant and Mark the grant fulfilled: replace
bc_live_PASTE_YOUR_KEYin theAuthorizationheader. - Give the credit in your tool: your tool's address, its key, and the field names it expects.
- Switch the scenario on.
Each call retries three times, 15 minutes apart, before the run is kept as an incomplete execution for you to look at.
In n8n
- Download
https://boltclaw.ai/referrals/templates/n8n/grant-ready-to-credit.jsonand import it (Import from File). - Verify signature: put the signing secret in an n8n Variable
BOLTCLAW_WEBHOOK_SECRET, or between the quotes at the top of the node. - Read the grant and Mark the grant fulfilled: a Header Auth
credential, Name
Authorization, ValueBearer bc_live_.... - Give the credit: your tool's address and its own credential.
- Publish the workflow and add the Bolt Claw webhook node's production address as the endpoint.
Test it
- The signature. Press Test on the endpoint in Settings, Developers, Webhooks. The test event passes the signature check and stops at the event check (Make: the Only referral.grant.ready filter; n8n: Grant ready event?). That is the result you want: the secret is right.
- A grant. Switch on Also send test events for the endpoint, and in a
program that gives credit, press Send a test sale on its Setup tab.
The test grant waits out the program's hold like a real one; when it is
ready, the delivery arrives with
testset, and your tool should give nothing.
When something goes wrong
- Your tool failed. Nothing was recorded in Bolt Claw, so the grant is
still
ready: retry the run, or give it on the Grants tab. - Bolt Claw answered
409to the fulfil. The grant is no longer ready: usually its sale was refunded or disputed and the grant was cancelled. Take the credit back in your tool if your own terms allow. - Bolt Claw answered
428. The key belongs to an AI assistant, and a person must approve marking a grant given. Use a key a person made instead.