Transfers

Create a transfer

Atomically transfer an ACTIVE asset from one participant or group to one or more recipients. Archived assets reject new transfers.

post/v1/transfers

Request

  • Base URL: https://api.scrip.dev
  • URL: https://api.scrip.dev/v1/transfers
  • Auth: HTTP bearer

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

asset_idstring uuid required

Asset being transferred

descriptionstring required

Human-readable explanation of the transfer's purpose

idempotency_keystring

Your key for this transfer. You can send it in the Idempotency-Key header instead; when both are sent they must match.

program_idstring uuid required

Program this transfer belongs to

source_external_idstring

Source participant's external ID (mutually exclusive with source_group_id and source_participant_id)

source_group_idstring uuid

Source group UUID (mutually exclusive with source_external_id and source_participant_id)

source_participant_idstring uuid

Source participant UUID (mutually exclusive with source_external_id and source_group_id)

Example request

{
  "asset_id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02",
  "description": "Monthly bonus distribution",
  "idempotency_key": "txn_abc123",
  "program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01",
  "recipients": [
    {
      "amount": "100.00",
      "external_id": "user_123",
      "group_id": "0b9e7d3c-5a41-4f68-a2c7-81e4d6b3f907",
      "participant_id": "f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b006"
    }
  ],
  "source_external_id": "user_123",
  "source_group_id": "0b9e7d3c-5a41-4f68-a2c7-81e4d6b3f907",
  "source_participant_id": "f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b006"
}

Response

Transfer completed with journal entry ID

asset_idstring uuid

Asset that was transferred

journal_entry_idstring uuid

Journal entry created for this transfer (use for audit trails)

recipient_countinteger

Number of recipients in this transfer

source_idstring uuid

Scrip's id for the source participant or group

total_amountstring

Sum of all recipient amounts

Example response

{
  "asset_id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02",
  "journal_entry_id": "657a0312-1aaa-4ba7-842b-edfbb39edf14",
  "recipient_count": 5,
  "source_id": "f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b006",
  "total_amount": "500.00"
}

Changes

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