$yieldfabric-ai>

Payments

Send and accept instant payments

01

Send Instant Payment

Transfer funds instantly to another user. Payment is locked until the recipient accepts.

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

⚠️ Important:

  • Amount must be an integer string (e.g., "10")
  • Use either destinationId (email) or destinationWalletId
  • No decimal points allowed in amount
02

Accept Payment

Accept an incoming payment to claim the funds:

curl -X POST https://pay.yieldfabric.com/graphql \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation { accept(input: { paymentId: \"PAY-INSTANT-1759048183145\" }) { success message accountAddress idHash } }"
  }'

Use the id_hash from your balance's locked_in array as the paymentId.

03

Payment Lifecycle

StepActionDescription
1CreateSender creates payment
2LockPayment locked in sender's account
3NotifyRecipient sees payment in locked_in
4AcceptRecipient accepts payment
5SettleFunds transfer to recipient
6CompleteMarked as completed on-chain
04

Query Payments

Get all payments for your account:

curl -X POST https://pay.yieldfabric.com/graphql \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query GetTransactions($currentEntityId: ID) { paymentsByEntity(currentEntityId: $currentEntityId) { id amount assetId paymentType status dueDate description } }",
    "variables": {
      "currentEntityId": "your-entity-id"
    }
  }'