Transfers API

The transfers API allows you to send money to Australian bank accounts and retrieve details of previous transfers.

POST /transfers

Creates a new transfer and returns its details.

Parameters

description A description of the amount being transfered (e.g. Earnings for may). This description is intended for your records and will not be displayed on the recipient’s bank statement.
amount The amount to transfer in the currency’s base unit (e.g. cents for AUD, yen for JPY). Must be greater than or equal to 0.
currency The currency to transfer. Currently, only AUD is supported.
recipient The recipient’s token (as returned from the recipients API) or self. If self is passed, the funds will be transferred to your own bank account.

Example

curl https://test-api.pinpayments.com/1/transfers -u your-secret-api-key: \
 -d "amount=400" \
 -d "currency=AUD" \
 -d "description=Earnings for may" \
 -d "recipient=rp_a98a4fafROQCOT5PdwLkQ"
201 Created
{
  "response": {
    "token": "tfer_lfUYEBK14zotCTykezJkfg",
    "status": "succeeded",
    "currency": "AUD",
    "description": "Earnings for may",
    "amount": 400,
    "total_debits": 200,
    "total_credits": 600,
    "created_at": "2012-06-20T03:10:49Z",
    "paid_at": "2012-06-20T03:10:49Z",
    "reference": "Test Business",
    "bank_account": {
      "token": "ba_nytGw7koRg23EEp9NTmz9w",
      "name": "Mr Roland Robot",
      "bsb": "123456",
      "number": "XXXXXX321",
      "bank_name": "",
      "branch": ""
    },
    "recipient": "rp_a98a4fafROQCOT5PdwLkQ"
  }
}

Error Responses

422 invalid_resource {...}
{
  "error": "invalid_resource",
  "error_description": "One or more parameters were missing or invalid",
  "messages": [
    {
      "code": "description_invalid",
      "message": "Description can't be blank",
      "param": "description"
    }
  ]
}
402 insufficient_pin_balance {...}
[
  {
    "error": "insufficient_pin_balance",
    "error_description": "There are not enough funds available to process this transfer"
  }
]

GET /transfers

Returns a paginated list of all transfers.

Example

curl https://test-api.pinpayments.com/1/transfers -u your-secret-api-key:
200 OK
{
  "response": [
    {
      "token": "tfer_lfUYEBK14zotCTykezJkfg",
      "status": "succeeded",
      "currency": "AUD",
      "description": "Earnings for may",
      "amount": 400,
      "total_debits": 200,
      "total_credits": 600,
      "created_at": "2012-06-20T03:10:49Z",
      "paid_at": "2012-06-20T03:10:49Z",
      "reference": "Test Business",
      "bank_account": {
        "token": "ba_nytGw7koRg23EEp9NTmz9w",
        "name": "Mr Roland Robot",
        "bsb": "123456",
        "number": "XXXXXX321",
        "bank_name": "",
        "branch": ""
      },
      "recipient": "rp_a98a4fafROQCOT5PdwLkQ"
    }
  ],
  "count": 1,
  "pagination": {
    "current": 1,
    "previous": null,
    "next": null,
    "per_page": 25,
    "pages": 1,
    "count": 1
  }
}

GET /transfers/search

Returns a paginated list of transfers matching the search criteria.

Optional query Return only transfers whose token, description, amount or recipient details match the supplied query.
Optional start_date Return only transfers created on or after this date (e.g. 2012/12/25).
Optional end_date Return only transfers created before this date (e.g. 2013/12/25).
Optional sort The field used to sort the transfers (only option: paid_at). Default value is paid_at.
Optional direction The direction in which to sort the transfers (1 for ascending or -1 for descending). Default value is 1.

Example

curl https://test-api.pinpayments.com/1/transfers/search?query=Earnings -u your-secret-api-key:
200 OK
{
  "response": [
    {
      "token": "tfer_lfUYEBK14zotCTykezJkfg",
      "status": "succeeded",
      "currency": "AUD",
      "description": "Earnings for may",
      "amount": 400,
      "total_debits": 200,
      "total_credits": 600,
      "created_at": "2012-06-20T03:10:49Z",
      "paid_at": "2012-06-20T03:10:49Z",
      "reference": "Test Business",
      "bank_account": {
        "token": "ba_nytGw7koRg23EEp9NTmz9w",
        "name": "Mr Roland Robot",
        "bsb": "123456",
        "number": "XXXXXX321",
        "bank_name": "",
        "branch": ""
      },
      "recipient": "rp_a98a4fafROQCOT5PdwLkQ"
    }
  ],
  "count": 1,
  "pagination": {
    "current": 1,
    "previous": null,
    "next": null,
    "per_page": 25,
    "pages": 1,
    "count": 1
  }
}

GET /transfers/transfer-token

Returns the details of the specified transfer.

Example

curl https://test-api.pinpayments.com/1/transfers/tfer_bZ3RhJnIUZ8HhfvH8CCvfA -u your-secret-api-key:
200 OK
{
  "response": {
    "token": "tfer_lfUYEBK14zotCTykezJkfg",
    "status": "succeeded",
    "currency": "AUD",
    "description": "Earnings for may",
    "amount": 400,
    "total_debits": 200,
    "total_credits": 600,
    "created_at": "2012-06-20T03:10:49Z",
    "paid_at": "2012-06-20T03:10:49Z",
    "reference": "Test Business",
    "bank_account": {
      "token": "ba_nytGw7koRg23EEp9NTmz9w",
      "name": "Mr Roland Robot",
      "bsb": "123456",
      "number": "XXXXXX321",
      "bank_name": "",
      "branch": ""
    },
    "recipient": "rp_a98a4fafROQCOT5PdwLkQ"
  }
}

Error Responses

404 not_found {...}
{
  "error": "not_found",
  "error_description": "The requested resource could not be found."
}

GET /transfers/transfer-token/line_items

Returns a paginated list of line items associated with the specified transfer.

Example

curl https://test-api.pinpayments.com/1/transfers/tfer_bZ3RhJnIUZ8HhfvH8CCvfA/line_items -u your-secret-api-key:
200 OK
{
  "response": [
    {
      "type": "charge_merchant_entitlement",
      "amount": 400,
      "currency": "AUD",
      "created_at": "2012-06-18T09:00:29Z",
      "object": "charge",
      "token": "ch_lfUYEBK14zotCTykezJkfg",
      "record": {
        "description": "test charge",
        "amount": 400,
        "total_fees": 62,
        "merchant_entitlement": 338
      }
    },
    {
      "type": "adjustment",
      "amount": 30,
      "currency": "AUD",
      "created_at": "2012-06-19T15:22:45Z"
    }
  ],
  "count": 2,
  "pagination": {
    "current": 1,
    "previous": null,
    "next": null,
    "per_page": 25,
    "pages": 1,
    "count": 2
  }
}

Error Responses

404 not_found {...}
{
  "error": "not_found",
  "error_description": "The requested resource could not be found."
}

Pin Payments is owned and operated by
Southern Payment Systems Pty Ltd
ABN: 46 154 451 582
Level 1, 34 Queen St,
Melbourne VIC 3000

Privacy Policy Terms Security Status

Australia