circle-0.1.0.0: Circle API client for Haskell
Copyright(c) Dylan Martin 2022
Maintainerdmarticus@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Circle.Client

Description

Synopsis

Documentation

getBusinessWireAccount :: UUID -> CircleAPIRequest WireAccountRequest TupleBS8 ByteString Source #

Get a single business account wire account, accepts the wire account Id as a parameter https://developers.circle.com/reference/getbusinesswireaccount

listAllBusinessAccountTransfers :: CircleAPIRequest TransfersRequest TupleBS8 ByteString Source #

Searches for transfers from your business account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided. https://developers.circle.com/reference/listbusinesstransfers

createBusinessAccountDepositAddress :: DepositAddressRequestBody -> CircleAPIRequest DepositAddressRequest TupleBS8 ByteString Source #

Create new business account deposit address Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you're requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. https://developers.circle.com/developer/v1/reference/createbusinessdepositaddress

listAllBusinessAccountRecipientAddresses :: CircleAPIRequest RecipientAddressesRequest TupleBS8 ByteString Source #

List all recipient addresses Returns a list of recipient addresses that have each been verified and are eligible for transfers. Any recipient addresses pending verification are not included in the response. https://developers.circle.com/developer/v1/reference/listbusinessrecipientaddresses

createBusinessAccountRecipientAddress :: RecipientAddressRequestBody -> CircleAPIRequest RecipientAddressRequest TupleBS8 ByteString Source #

Create a new recipient address Stores an external blockchain address. Once added, the recipient address must be verified to ensure that you know and trust each new address. https://developers.circle.com/developer/v1/reference/createbusinessrecipientaddress

listAllBusinessAccountDeposits :: CircleAPIRequest DepositsRequest TupleBS8 ByteString Source #

List all deposits Searches for deposits sent to your business account. If the date parameters are omitted, returns the most recent deposits. This endpoint returns up to 50 deposits in descending chronological order or pageSize, if provided. https://developers.circle.com/developer/v1/reference/listbusinessdeposits

getSignetAccountInstructions :: UUID -> CircleAPIRequest SignetBankInstructionsResponseData TupleBS8 ByteString Source #

Get the Signet transfer instructions into the Circle bank account given your bank account id (only available on Production now). https://developers.circle.com/developer/v1/reference/getbusinesssignetaccountinstructions

createMockWirePayment :: MockSenOrWirePaymentRequestBody -> CircleAPIRequest MockPaymentRequest TupleBS8 ByteString Source #

Create mock wire payment SANDBOX ONLY In the sandbox environment, initiate a mock wire payment that mimics the behavior of funds sent through the bank (wire) account linked to master wallet. https://developers.circle.com/developer/v1/reference/createmockwirepayment

createMockSEPAPayment :: MockSEPAPaymentRequestBody -> CircleAPIRequest MockPaymentRequest TupleBS8 ByteString Source #

Create mock SEPA payment SANDBOX ONLY (in Beta) In the sandbox environment, initiate a mock SEPA payment that mimics the behavior of funds sent through the bank (SEPA) account linked to master wallet. https://developers.circle.com/developer/v1/reference/createmocksepapayment

createMockSilvergatePayment :: MockSenOrWirePaymentRequestBody -> CircleAPIRequest MockPaymentRequest TupleBS8 ByteString Source #

Create mock Silvergate payment SANDBOX ONLY In the sandbox environment, initiate a mock SEN transfer that mimics the behavior of funds sent through the Silvergate SEN account linked to master wallet. https://developers.circle.com/developer/v1/reference/createmocksenpayment

createMockACHBankAccount :: CreateMockACHBankAccountRequestBody -> CircleAPIRequest MockAccountRequest TupleBS8 ByteString Source #

Create mock ACH account SANDBOX ONLY In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account. https://developers.circle.com/developer/v1/reference/createmockachaccount-1

createMockChargeback :: UUID -> CircleAPIRequest MockChargebackRequest TupleBS8 ByteString Source #

Create mock chargeback SANDBOX ONLY In the sandbox environment, initiate a mock chargeback of a specified payment. The entire payment will be charged back for its full value. The payment must be in the paid state (otherwise the endpoint will return a 404), and each payment can only be charged back once (otherwise the endpoint will return a 409). This endpoint is only available in the sandbox environment. https://developers.circle.com/developer/v1/reference/payments-chargebacks-mock-create

listAllOnChainTransfers :: CircleAPIRequest OnChainTransfersRequest TupleBS8 ByteString Source #

Searches for transfers. Searches for transfers involving the provided wallets. If no wallet ids are provided, searches all wallets associated with your Circle API account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided. https://developers.circle.com/developer/v1/reference/listtransfers-1

listAllACHReversals :: CircleAPIRequest ReversalsRequest TupleBS8 ByteString Source #

Retrieve a list of ACH payment reversals. Results will be sorted by create date descending; more recent reversals will be at the beginning of the list https://developers.circle.com/developer/v1/reference/listreversals

listAllBalances :: CircleAPIRequest BalanceRequest TupleBS8 ByteString Source #

Retrieves the balance of merchant funds that have settled and also of funds that have been sent for processing but have not yet settled. https://developers.circle.com/developer/v1/reference/listbalances

listAllTransfers :: CircleAPIRequest TransfersRequest TupleBS8 ByteString Source #

Searches for transfers from your account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided. https://developers.circle.com/developer/v1/reference/listtransfers

listAllReturns :: CircleAPIRequest ReturnsRequest TupleBS8 ByteString Source #

Retrieve a list of Wire and ACH payout returns. Results will be sorted by create date descending; more recent returns will be at the beginning of the list. https://developers.circle.com/developer/v1/reference/listreturns

createDepositAddress :: UUID -> DepositAddressRequestBody -> CircleAPIRequest DepositAddressRequest TupleBS8 ByteString Source #

Create new blockchain deposit address Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you're requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. https://developers.circle.com/developer/v1/reference/payments-on-chain-addresses-create

listAllAddresses :: UUID -> CircleAPIRequest RecipientAddressesRequest TupleBS8 ByteString Source #

List all recipient addresses associated with a wallet Id Retrieves a list of addresses associated with a wallet. https://developers.circle.com/developer/v1/reference/listaddresses

circleTest :: FromJSON (CircleRequest a) => CircleConfig -> Manager -> CircleAPIRequest a TupleBS8 ByteString -> IO (Either CircleError (CircleRequest a)) Source #

This function is only used internally to speed up the test suite. Instead of creating a new Manager we reuse the same one.

paramsToByteString :: [Query] -> ByteString Source #

Conversion of a key value pair to a query parameterized string