Skip to content

Instantly share code, notes, and snippets.

@mjallday
Created November 21, 2013 21:04
Show Gist options
  • Save mjallday/7589592 to your computer and use it in GitHub Desktop.
Save mjallday/7589592 to your computer and use it in GitHub Desktop.
Untokenized card debit

curl http://api.balancedpayments.com/debits -XPOST -u ak-test-2DBryLFR3BBam1CipbWEGSO6gqVOBKghP: -d "source[number]=4111111111111111" -d "source[expiration_month]=12" -d "source[expiration_year]=2016" -d amount=100

{
  "debits": [
    {
      "status": "succeeded",
      "description": null,
      "links": {
        "customer": "CU6wJUpqcVWf2JwgyfIsRy1z",
        "source": "CCEEiRYllr8Hy6reTKbjnQR",
        "order": null
      },
      "href": "/debits/WDEGSbw0nmjl4HgP8Hc61PP",
      "created_at": "2013-11-21T21:01:25.873452Z",
      "updated_at": "2013-11-21T21:01:26.995929Z",
      "failure_reason": null,
      "currency": "USD",
      "amount": 100,
      "failure_reason_code": null,
      "meta": {},
      "appears_on_statement_as": "BAL*example.com",
      "id": "WDEGSbw0nmjl4HgP8Hc61PP"
    }
  ],
  "links": {
    "debits.source": "/resources/{debits.source}",
    "debits.customer": "/customers/{debits.customer}",
    "debits.order": "/orders/{debits.order}",
    "debits.refunds": "/debits/{debits.id}/refunds",
    "debits.events": "/debits/{debits.id}/events"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment