Skip to content

Instantly share code, notes, and snippets.

@charleyhine
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charleyhine/04f8374966fa1985df4e to your computer and use it in GitHub Desktop.
Save charleyhine/04f8374966fa1985df4e to your computer and use it in GitHub Desktop.
Create Payment Address (URL argument)

Create Payment Address (revised)

Create with new URL (POST)

https://api.chain.com/v1/payments

{
    "block_chain": "bitcoin",
    "destination_address": "1dk2l...",
    "webhook_url": "http://coinsafe.com/chain/random_id_here/",
    "webhook_event_confirmations": 4
}

Create with existing URL (POST)

https://api.chain.com/v1/payments

{
    "block_chain": "bitcoin",
    "destination_address": "1dk2l...",
    "webhook_id": "234234-28786-8811119",
    "webhook_event_confirmations": 4
}

Response

201 Accepted
{
    "block_chain": "bitcoin",
    "payment_address": {
        "address": "1kf93...",
        "received": 0,
        "sent": 0,
        "balance": "0",
        "unconfirmed_received": 0,
        "unconfirmed_sent": 0,
        "unconfirmed_balance": 0
    },
    "destination_address": {
        "address": "1dk2l...",
        "received": 483923,
        "sent": 0,
        "balance": "483923",
        "unconfirmed_received": 0,
        "unconfirmed_sent": 0,
        "unconfirmed_balance": 0
    },
    "webhook_id": "29CDE78E-7BFA-4401-BC0A-3071C88A86F0",
    "webhook_event_confirmations": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment