Programs

Fund a program

Add funds to a program's wallet for a PREFUNDED asset.

post/v1/programs/{program_id}/balances/fund

Request

  • Base URL: https://api.scrip.dev
  • URL: https://api.scrip.dev/v1/programs/{program_id}/balances/fund
  • Auth: HTTP bearer

Path parameters

program_idstring uuid required

The program's id.

Headers

Idempotency-Keystring

A key you choose to make this request safe to retry: 1 to 255 printable ASCII characters. Send the same key with the same request to get the first response again, marked Idempotent-Replayed: true. Routes that return a secret once, and claim links, do not replay a response. Event ingest uses the key as the event's identity.

Request body

amountstring required

Decimal amount to add to the wallet

asset_idstring uuid required

The id of the PREFUNDED asset to fund

descriptionstring

Reason for this funding

Example request

{
  "amount": "10000.00",
  "asset_id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02",
  "description": "Initial program funding for Q1"
}

Response

Funding successful

availablestring

Wallet balance after the operation

journal_entry_idstring uuid

Ledger journal entry created by this operation

messagestring

Confirmation message

Example response

{
  "available": "10000.00",
  "journal_entry_id": "657a0312-1aaa-4ba7-842b-edfbb39edf14",
  "message": "Program funded successfully"
}

Changes

No recorded changes to this operation across all 1 revision of this API.