Quick Start
Get up and running with YieldFabric in 5 minutes
What You'll Learn
- Authenticate and get a JWT token
- Check your account balance
- Send an instant payment
- Accept an incoming payment
Prerequisites
curlandjqinstalled- YieldFabric account credentials
- Access to YieldFabric production services
Login and Save Token
Authenticate with YieldFabric and save your JWT token for subsequent requests.
export TOKEN=$(curl -s -X POST https://auth.yieldfabric.com/auth/login/with-services \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "your-password",
"services": ["vault", "payments"]
}' | jq -r '.token')
echo "Token: ${TOKEN:0:50}..."Check Your Balance
Query your account balance to see available funds and pending transactions.
curl -s -X GET "https://pay.yieldfabric.com/balance?denomination=aud-token-asset&obligor=null" \
-H "Authorization: Bearer $TOKEN" | jqWhat to look for:
private_balance- Your encrypted balancepublic_balance- Your public balancelocked_out- Payments you've sent (pending acceptance)locked_in- Payments you've received (awaiting your acceptance)outstanding- Total locked in outgoing payments
Send an Instant Payment
Transfer funds instantly to another user. The payment will be locked until the recipient accepts it.
curl -s -X POST https://pay.yieldfabric.com/graphql \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation { instant(input: { assetId: \"aud-token-asset\", amount: \"10\", destinationId: \"recipient@yieldfabric.com\" }) { success paymentId messageId accountAddress } }"
}' | jqResponse includes:
paymentId- ID for trackingmessageId- Message queue IDaccountAddress- Your account address
Accept an Incoming Payment
As the recipient, first check your balance to see incoming payments, then accept them.
Check for incoming payments:
curl -s -X GET "https://pay.yieldfabric.com/balance?denomination=aud-token-asset&obligor=null" \
-H "Authorization: Bearer $RECIPIENT_TOKEN" | jq '.locked_in'Accept the payment:
curl -s -X POST https://pay.yieldfabric.com/graphql \
-H "Authorization: Bearer $RECIPIENT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation { accept(input: { paymentId: \"PAY-INSTANT-1759048183145\" }) { success message messageId } }"
}' | jqUse the id_hash from the locked_in array as the paymentId.
Verify the Transfer
Check your balance again to confirm the transfer completed successfully.
curl -s -X GET "https://pay.yieldfabric.com/balance?denomination=aud-token-asset&obligor=null" \
-H "Authorization: Bearer $TOKEN" | jqYou should now see: Payment moved from locked_out (sender) or locked_in (recipient), and balance updated to reflect the transfer.
🎉 Congratulations!
You've successfully completed your first YieldFabric payment workflow!
Next Steps:
Troubleshooting
Token Invalid or Expired
If you get authentication errors, get a fresh token:
export TOKEN=$(curl -s -X POST https://auth.yieldfabric.com/auth/login/with-services \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"password","services":["vault","payments"]}' \
| jq -r '.token')Payment Amount Error
Make sure amount is an integer string: "10" not "10.00" or 10. No decimal points allowed.
Payment Not Showing
- Check you're using the correct denomination and obligor
- Verify the payment was actually sent (check sender's locked_out)
- Ensure you're querying as the correct entity