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) ordestinationWalletId - 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
| Step | Action | Description |
|---|---|---|
| 1 | Create | Sender creates payment |
| 2 | Lock | Payment locked in sender's account |
| 3 | Notify | Recipient sees payment in locked_in |
| 4 | Accept | Recipient accepts payment |
| 5 | Settle | Funds transfer to recipient |
| 6 | Complete | Marked 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"
}
}'