LogoLogo
LogoLogo
  • FORMLESS NETWORK
    • Overview
  • SHARE
    • SHARE SDK
      • Authentication
      • Payouts
      • Smart Contracts
      • Prepaying for API Credits
    • SHARE App
      • Smart Contract Creation
        • Sell a Beat
        • Sell a Song
        • Sell a Video
        • Sell an Album
        • Sell a Collection with Community Splits
        • Create a Community Splits Contract
      • Frequently Asked Questions
    • SHARE Protocol
  • TUTORIALS
    • Cashing Out to Your Bank
    • Collections Revenue Flow
    • For Symphonic Customers
      • Get Your Streaming Money Paid Out Same Day
      • Share Streaming Money with Fans
      • Add SHARE Protocol as a Payee
      • Assign Royalty Splits to SHARE Protocol
      • Connect Track Earnings to a Smart Contract using a Form
      • Connect Track Earnings to a Smart Contract using SHARE SDK
      • Receiving Realtime Royalty Payouts
    • For Distribution Businesses
      • Getting Started
      • SHARE Enterprise Dashboard
        • Your Custom Branded Portal
        • Logging in and Adding Authorized Users
        • Viewing Your Revenue Analytics and Balance
        • Viewing Customers
        • How Revenue Splits Work on D2C Sales
      • SHARE API and SDK Access
        • Shared Ownership and Large-Scale Fractionalized Payouts
        • Connect DSP Earnings to SHARE with No-Code
        • How Your Customers Can Create Splits Contracts
        • Create a Community Splits Contract using SHARE UI
        • Execute a Programmatic Payment
        • How to Verify FORMLESS Account IDs
        • Add SHARE Protocol Split Contract as a Payee
Powered by GitBook
On this page
  • Response
  • Response
  • Here are a few things to keep in mind due to the nature of blockchain technology:
  1. TUTORIALS
  2. For Distribution Businesses
  3. SHARE API and SDK Access

Execute a Programmatic Payment

This guide provides step by step instructions for delivering a programmatic payment to a smart contract.

PreviousCreate a Community Splits Contract using SHARE UINextHow to Verify FORMLESS Account IDs

Last updated 4 months ago

  1. Ensure you've followed steps in to obtain a smart contract ID which will receive and distribute payments.

  2. Ensure you've funded your business account by . You'll need at least $1.00 USD in credits to complete this guide.

  3. Execute a payout using the cURL command below with your contract ID as the recipient_id .

curl -v -X POST 'https://share-ddn.formless.xyz/v1' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $API_KEY" \
-d '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "payouts",
    "params": {
        "idempotency_key" : "0af4989b-96fe-4203-9f40-2b58c9f6e078",
        "recipient_type": "smart_contract",
        "recipient_id": "32843127-d5d9-41d7-b1ad-508de4f86693",
        "amount": {
            "value" : 1.00,
            "currency" : "USD"
        }
    }
}'

The idempotency_key is an optional value that guarantees calls execute only once, e.g. in the event of a retry within your system. In production you should always supply a unique UUID V4 value here.

Response

{
    "jsonrpc": "2.0",
    "id": "2",
    "result": {
        "batch_id": "02473ddd-c09c-475f-a120-7d771b6ae43e",
        "status": "pending",
        "message": "Your payouts are being processed and you will receive an email upon completion."
    }
}
  1. Query the server to check on the status of the payout using the batch_id.

curl -v -X POST 'https://share-ddn.formless.xyz/v1' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $API_KEY" \
--data '{
    "jsonrpc": "2.0",
    "id": "2",
    "method": "payouts",
    "params": {
        "batch_id" : "89de4f6d-a8e5-4808-9c29-ebac29dec4cb"
    }
}'

Response

{
    "jsonrpc": "2.0",
    "id": "1",
    "result": {
        "details": {
            "contract_address": "0xb1303e1cAffC4A0dfA4D67227D53aA384d7f962d",
            "network_id": 137,
            "amount_usd": 10.00
        },
        "submitter": "00000003XG",
        "payout_batch_id": "89de4f6d-a8e5-4808-9c29-ebac29dec4cb",
        "status": "complete"
    }
}
  1. Done! You've now distributed realtime payouts to a smart contract, which will instantly route payments to payees. Over time, even as payees change within the contract, your system will continue to distribute payments to the correct stakeholders.

Here are a few things to keep in mind due to the nature of blockchain technology:

Payments made using the SHARE API are instant, irreversible and final. Payments should not be made until the API caller is confident that there is no fraud on the metric used to determine the payment amount.

Splits contracts used as a payout recipient require verified identities. In order to join splits and receive payments, payees must verify using email and SMS based 2FA.

Payment conversion to local currencies and tax compliance is done in partnership with Beam. Payees cash out using a process known as off-ramping in partnership with . Beam converts cryptocurrency into USD securely, efficiently, and instantly sends funds to a bank account.

Create a Community Splits Contract Using SHARE UI
Prepaying for API Credits
Beam