$yieldfabric-ai>

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

  • curl and jq installed
  • YieldFabric account credentials
  • Access to YieldFabric production services
1

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}..."
2

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" | jq

What to look for:

  • private_balance - Your encrypted balance
  • public_balance - Your public balance
  • locked_out - Payments you've sent (pending acceptance)
  • locked_in - Payments you've received (awaiting your acceptance)
  • outstanding - Total locked in outgoing payments
3

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 } }"
    }' | jq

Response includes:

  • paymentId - ID for tracking
  • messageId - Message queue ID
  • accountAddress - Your account address
4

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 } }"
    }' | jq

Use the id_hash from the locked_in array as the paymentId.

5

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" | jq

You should now see: Payment moved from locked_out (sender) or locked_in (recipient), and balance updated to reflect the transfer.

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