Guides
DocumentationLog In

Payment methods

Payment method resource

Payment method resource represents the different kinds of payment methods that can be used when buying and selling bitcoin, bitcoin cash, litecoin or ethereum.

As fiat accounts can be used for buying and selling, they have an associated payment method. This type of a payment method will also have a fiat_account reference to the actual account.

Currently available type values:

  • ach_bank_account - Regular US bank account
  • sepa_bank_account - European SEPA bank account
  • ideal_bank_account - iDeal bank account (Europe)
  • fiat_account - Fiat nominated Coinbase account
  • bank_wire - Bank wire (US only)
  • credit_card - Credit card (can't be used for buying/selling)
  • secure3d_card - Secure3D verified payment card
  • eft_bank_account - Canadian EFT bank account
  • interac - Interac Online for Canadian bank accounts

If the user has obtained optional wallet:payment-methods:limits permission, an additional field, limits, will be embedded into payment method data. It will contain information about buy, instant buy, sell and deposit limits (there's no limits for withdrawals at this time). As each one of these can have several limits you should always look for the lowest remaining value when performing the relevant action.

FieldsDescription
id stringResource ID
type string, enumerablePayment method type
Name stringPayment method type
currency stringPayment method's native currency
primary_buy booleanIs primary buying method?
primary_sell booleanIs primary selling method?
allow_buy booleanIs buying allowed with this method?
allow_sell booleanIs selling allowed with this method?
instant_buy booleanDoes this method allow for instant buys?
instant_sell booleanDoes this method allow for instant sells?
created_at timestamp
updated_at timestamp
resource string, constant payment_method
resource_path string

Payment method information (default)

{
  "id": "83562370-3e5c-51db-87da-752af5ab9559",
  "type": "ach_bank_account",
  "name": "International Bank *****1111",
  "currency": "USD",
  "primary_buy": true,
  "primary_sell": true,
  "allow_buy": true,
  "allow_sell": true,
  "allow_deposit": true,
  "allow_withdraw": true,
  "instant_buy": false,
  "instant_sell": false,
  "created_at": "2015-01-31T20:49:02Z",
  "updated_at": "2015-02-11T16:53:57-08:00",
  "resource": "payment_method",
  "resource_path": "/v2/payment-methods/83562370-3e5c-51db-87da-752af5ab9559"
}

Additional payment method limit information (wallet:payment-methods:limits permission)

{
  ...
  "limits": {
    "buy": [
      {
        "period_in_days": 1,
        "total": {
          "amount": "3000.00",
          "currency": "USD"
        },
        "remaining": {
          "amount": "3000.00",
          "currency": "USD"
        }
      }
    ],
    "instant_buy": [
      {
        "period_in_days": 7,
        "total": {
          "amount": "0.00",
          "currency": "USD"
        },
        "remaining": {
          "amount": "0.00",
          "currency": "USD"
        }
      }
    ],
    "sell": [
      {
        "period_in_days": 1,
        "total": {
          "amount": "3000.00",
          "currency": "USD"
        },
        "remaining": {
          "amount": "3000.00",
          "currency": "USD"
        }
      }
    ],
    "deposit": [
      {
        "period_in_days": 1,
        "total": {
          "amount": "3000.00",
          "currency": "USD"
        },
        "remaining": {
          "amount": "3000.00",
          "currency": "USD"
        }
      }
    ]
  },
}

List payment methods

Lists current user's payment methods.

HTTP Request

GET https://api.coinbase.com/v2/payment-methods

Scopes

  • wallet:payment-methods:read

Example request

curl https://api.coinbase.com/v2/payment-methods \
  -H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'
require 'coinbase/wallet'
client = Coinbase::Wallet::Client.new(api_key: <api key>, api_secret: <api secret>)

pms = client.payment_methods
from coinbase.wallet.client import Client
client = Client(<api_key>, <api_secret>)

pms = client.get_payment_methods()
var Client = require('coinbase').Client;

var client = new Client({'apiKey': 'API KEY',
                         'apiSecret': 'API SECRET'});

client.getPaymentMethods(function(err, pms) {
  console.log(pms);
});

Example response

{
  "pagination": {
    "ending_before": null,
    "starting_after": null,
    "limit": 25,
    "order": "desc",
    "previous_uri": null,
    "next_uri": null
  },
  "data": [
    {
      "id": "127b4d76-a1a0-5de7-8185-3657d7b526ec",
      "type": "fiat_account",
      "name": "USD Wallet",
      "currency": "USD",
      "primary_buy": false,
      "primary_sell": false,
      "allow_buy": true,
      "allow_sell": true,
      "allow_deposit": true,
      "allow_withdraw": true,
      "instant_buy": true,
      "instant_sell": true,
      "created_at": "2015-02-24T14:30:30-08:00",
      "updated_at": "2015-02-24T14:30:30-08:00",
      "resource": "payment_method",
      "resource_path": "/v2/payment-methods/127b4d76-a1a0-5de7-8185-3657d7b526ec",
      "fiat_account": {
          "id": "a077fff9-312b-559b-af98-146c33e27388",
          "resource": "account",
          "resource_path": "/v2/accounts/a077fff9-312b-559b-af98-146c33e27388"
      }
    },
    {
      "id": "83562370-3e5c-51db-87da-752af5ab9559",
      "type": "ach_bank_account",
      "name": "International Bank *****1111",
      "currency": "USD",
      "primary_buy": true,
      "primary_sell": true,
      "allow_buy": true,
      "allow_sell": true,
      "allow_deposit": true,
      "allow_withdraw": true,
      "instant_buy": false,
      "instant_sell": false,
      "created_at": "2015-01-31T20:49:02Z",
      "updated_at": "2015-02-11T16:53:57-08:00",
      "resource": "payment_method",
      "resource_path": "/v2/payment-methods/83562370-3e5c-51db-87da-752af5ab9559"
    }
  ]
}

Show a payment method

Show current user's payment method.

HTTP Request

GET https://api.coinbase.com/v2/payment-methods/:payment_method_id/

Scopes

  • wallet:payment-methods:read

Example request

curl https://api.coinbase.com/v2/payment-methods/83562370-3e5c-51db-87da-752af5ab9559 /
  -H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'
require 'coinbase/wallet'
client = Coinbase::Wallet::Client.new(api_key: <api key>, api_secret: <api secret>)

pm = client.payment_method("83562370-3e5c-51db-87da-752af5ab9559")
from coinbase.wallet.client import Client
client = Client(<api_key>, <api_secret>)

pm = client.get_payment_method("83562370-3e5c-51db-87da-752af5ab9559")
var Client = require('coinbase').Client;

var client = new Client({'apiKey': 'API KEY',
                         'apiSecret': 'API SECRET'});

client.getPaymentMethod('83562370-3e5c-51db-87da-752af5ab9559', function(err, pm) {
  console.log(pm);
});

Example response

{
  "data": {
    "id": "83562370-3e5c-51db-87da-752af5ab9559",
    "type": "ach_bank_account",
    "name": "International Bank *****1111",
    "currency": "USD",
    "primary_buy": true,
    "primary_sell": true,
    "allow_buy": true,
    "allow_sell": true,
    "allow_deposit": true,
    "allow_withdraw": true,
    "instant_buy": false,
    "instant_sell": false,
    "created_at": "2015-01-31T20:49:02Z",
    "updated_at": "2015-02-11T16:53:57-08:00",
    "resource": "payment_method",
    "resource_path": "/v2/payment-methods/83562370-3e5c-51db-87da-752af5ab9559"
  }
}