From c89fa0231569b0b12a4ec901265bcc568bf0c79c Mon Sep 17 00:00:00 2001 From: Ashutosh Ukey Date: Mon, 26 Sep 2022 11:05:27 -0400 Subject: [PATCH] Update OpenAPI specification (#8) --- CHANGELOG.md | 9 +- VERSION | 2 +- openapi/json/account.json | 4 +- openapi/json/accounts.json | 2 +- openapi/json/circle-apis.json | 13240 ++++++++++++++-------------- openapi/json/crypto-payments.json | 2 +- openapi/json/general.json | 4 +- openapi/json/payments.json | 10 +- openapi/json/payouts.json | 4 +- openapi/yaml/account.yaml | 4 +- openapi/yaml/accounts.yaml | 2 +- openapi/yaml/circle-apis.yaml | 9908 +++++++++++---------- openapi/yaml/crypto-payments.yaml | 2 +- openapi/yaml/general.yaml | 4 +- openapi/yaml/payments.yaml | 10 +- openapi/yaml/payouts.yaml | 4 +- 16 files changed, 11955 insertions(+), 11256 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f152ce0..82af737 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,16 @@ # Changelog +## [1.0.2] (2022-09-22) + + +### Bug Fixes + +* explicitly define combined OpenAPI file +* rename operationIds mock endpoints + ## 1.0.1 (2022-09-09) ### Bug Fixes * include all usdc supported chains - diff --git a/VERSION b/VERSION index 7dea76e..6d7de6e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.1 +1.0.2 diff --git a/openapi/json/account.json b/openapi/json/account.json index eabe996..ef76507 100644 --- a/openapi/json/account.json +++ b/openapi/json/account.json @@ -6,7 +6,7 @@ } ], "info": { - "version": "1.0.1", + "version": "1.0.2", "title": "Core Functionality", "description": "APIs for managing your account balance. These endpoints are available with all Circle APIs." }, @@ -1917,7 +1917,7 @@ ], "summary": "Create a mock Silvergate SEN payment", "description": "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.", - "operationId": "createSenPayment", + "operationId": "createMockSenPayment", "tags": [ "Deposits" ], diff --git a/openapi/json/accounts.json b/openapi/json/accounts.json index ed6de2f..211a50f 100644 --- a/openapi/json/accounts.json +++ b/openapi/json/accounts.json @@ -6,7 +6,7 @@ } ], "info": { - "version": "1.0.1", + "version": "1.0.2", "title": "Accounts API", "description": "APIs to manage custodial wallets." }, diff --git a/openapi/json/circle-apis.json b/openapi/json/circle-apis.json index c197f7d..c6c1ec8 100644 --- a/openapi/json/circle-apis.json +++ b/openapi/json/circle-apis.json @@ -6,54 +6,61 @@ } ], "info": { - "version": "1.0.1", - "title": "Circle API" + "version": "1.0.2", + "title": "All Circle APIs", + "description": "Circle's General, Core Functionality, Payments, Payouts, and Accounts APIs bundled into one OpenAPI Specification." }, "tags": [ { - "name": "Balances" + "name": "Health" }, { - "name": "Payouts" + "name": "Management" }, { - "name": "Wires" + "name": "Encryption" }, { - "name": "Signet" + "name": "Subscriptions" }, { - "name": "SEN" + "name": "Stablecoins" }, { - "name": "Transfers" + "name": "Channels" + }, + { + "name": "Balances" }, { "name": "Addresses" }, { - "name": "Deposits" + "name": "Cards" }, { - "name": "On-chain payouts" + "name": "Wires" }, { - "name": "ACH" + "name": "SEN" }, { "name": "SEPA" }, { - "name": "Returns" + "name": "ACH" }, { - "name": "Payments" + "name": "Signet" }, { - "name": "On-chain payments" + "name": "Deposits" }, { - "name": "Cards" + "name": "Payment Intents" + }, + { + "name": "Payments" }, { "name": "Settlements" @@ -65,181 +72,64 @@ "name": "Reversals" }, { - "name": "Health", - "description": "Inspect the health of the API." - }, - { - "name": "Management", - "description": "General account and management information." - }, - { - "name": "Encryption", - "description": "Encrypt sensitive data." - }, - { - "name": "Subscriptions", - "description": "Manage subscriptions to notifications." + "name": "Payouts" }, { - "name": "Stablecoins", - "description": "Retrieve stablecoins and their respective names, symbols, circulating total and per-chain amounts." + "name": "Returns" }, { - "name": "Channels", - "description": "View a list of channels." + "name": "Wallets" }, { - "name": "Wallets" + "name": "Transfers" } ], "paths": { - "/v1/paymentIntents": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a payment intent", - "operationId": "createPaymentIntent", + "/ping": { + "get": { + "summary": "Ping", + "description": "Checks that the service is running.", + "operationId": "rootPing", "tags": [ - "Payment Intents" + "Health" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentIntent" - } - } - } - }, "responses": { - "201": { - "description": "Successfully created a payment intent.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, + "200": { + "description": "Successful ping.", "content": { "application/json": { "schema": { - "title": "CreatePaymentIntentResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/PaymentIntent" - } - } + "$ref": "#/components/schemas/Ping" }, "examples": { "response": { "value": { - "data": { - "id": "8755d0ea-14f9-4259-b092-de23c14b6568", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "amountPaid": { - "amount": "0.00", - "currency": "USD" - }, - "settlementCurrency": "USD", - "paymentMethods": [ - { - "type": "blockchain", - "chain": "ETH" - } - ], - "paymentIds": [], - "timeline": [ - { - "status": "created", - "time": "2022-07-21T20:13:35.579331Z" - } - ], - "createDate": "2022-07-21T20:13:35.578678Z", - "updateDate": "2022-07-21T20:19:24.859052Z" - } + "message": "pong" } } } } } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" } } - }, + } + }, + "/v1/configuration": { "get": { "security": [ { "bearerAuth": [] } ], - "summary": "List all payment intents", - "operationId": "getPaymentIntents", + "summary": "Get configuration info", + "description": "Retrieves general configuration information.", + "operationId": "getAccountConfig", "tags": [ - "Payment Intents" - ], - "parameters": [ - { - "name": "status", - "description": "Filters by the most recent `timeline.status` within the payment intent.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "pending", - "complete", - "expired", - "failed" - ] - } - }, - { - "name": "context", - "description": "Filters by the most recent `timeline.context` within the payment intent.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "underpaid", - "paid", - "overpaid" - ] - } - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } + "Management" ], "responses": { "200": { - "description": "Successfully retrieved a list of payment intents.", + "description": "Successfully retrieved configuration information.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -248,93 +138,46 @@ "content": { "application/json": { "schema": { - "title": "GetPaymentIntentsResponse", + "title": "GetConfigResponse", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentIntent" - } + "$ref": "#/components/schemas/AccountConfiguration" } } }, "examples": { "response": { "value": { - "data": [ - { - "idempotencyKey": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "amountPaid": { - "amount": "3.14", - "currency": "USD" - }, - "settlementCurrency": "USD", - "paymentMethods": [ - { - "type": "blockchain", - "chain": "ALGO", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" - } - ], - "fees": [ - { - "type": "blockchainLeaseFee", - "amount": "3.14", - "currency": "USD" - } - ], - "paymentIds": [ - "69808f36-3e5e-4f37-bf82-ca79e4d70fc1" - ], - "timeline": [ - { - "status": "created", - "context": "underpaid", - "time": "2020-04-10T02:13:30.000Z" - } - ], - "expiresOn": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z", - "createDate": "2020-04-10T02:13:30.000Z" + "data": { + "payments": { + "masterWalletId": "212000" } - ] + } } } } } } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" } } } }, - "/v1/paymentIntents/{id}": { + "/v1/encryption/public": { "get": { "security": [ { "bearerAuth": [] } ], - "summary": "Get a payment intent", - "operationId": "getPaymentIntent", + "summary": "Get public key", + "description": "Retrieves an RSA public key to be used in encrypting data sent to the API. Your public keys change infrequently, so we encourage you to cache this response value locally for a duration of 24 hours or more.", + "operationId": "getPublicKey", "tags": [ - "Payment Intents" - ], - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } + "Encryption" ], "responses": { "200": { - "description": "Successfully retrieved a payment intent.", + "description": "Successfully retrieved the RSA public key.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -343,10 +186,10 @@ "content": { "application/json": { "schema": { - "title": "GetPaymentIntentResponse", + "title": "GetPublicKeyResponse", "properties": { "data": { - "$ref": "#/components/schemas/PaymentIntent" + "$ref": "#/components/schemas/PublicKey" } } }, @@ -354,88 +197,105 @@ "response": { "value": { "data": { - "id": "8755d0ea-14f9-4259-b092-de23c14b6568", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "amountPaid": { - "amount": "0.00", - "currency": "USD" - }, - "settlementCurrency": "USD", - "paymentMethods": [ - { - "type": "blockchain", - "chain": "ETH" - } - ], - "paymentIds": [], - "timeline": [ - { - "status": "created", - "time": "2022-07-21T20:13:35.579331Z" - } - ], - "createDate": "2022-07-21T20:13:35.578678Z", - "updateDate": "2022-07-21T20:19:24.859052Z" + "keyId": "key1", + "publicKey": "LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEJDUEcgdjEuNTQKCm1RRU5CRjAxdmk0QkNBQ3JzMDNLS1Y0Qk9SRkYyT0Z4bUdvb0UyaTZMbnNneE5UL1dsV2s1ZTl2RDd2NENkSm0KcGJJbENmZ0U4WFlnYmhKUTE4YStaTzlPM0RFYUp2dGhJSEtjL0l1UEIvZmdEYUJUT285NkJzL2pVRFp6ZGxaVApQazNFUjliNFZPeGVwMFNPSHFMcmxTVFY4ZXB3M1R3SEdaL3NpSWdBYXEwRGdJdlZxUTY4TGVaMnorUFJWZm04CmhhSnJpb05SRU5Ja2ZNTWY5aFdySlowSW1zUk1aVmpDMVVrd2FSSHdrTTMwQUlia1dYcFJ5R205SXhQaXdGa08Kb1RnWlpwUFpsdVczckdkWER0NHZqL24za09hczV1dFdoNFovMlhjWHBiSUUyU0FPK0hycUdIclRnK1ZmZ05JNwpZcVZqYW5MOEN1bm83UkxmcDhKZlZDNXBLUm5ySVNCTnphN1ZBQkVCQUFHMEJrTnBjbU5zWllrQkhBUVFBUWtBCkJnVUNYVFcrTGdBS0NSQ3EzaHNwWjBMeGEwdnpCLzQvQTJpdk1CWW1aZXV2bEJZMm5ZZnNXek9Sb28vU3BIYkQKY2Y0UmtxZzZ0RERJSkUzNHhDVit0MzJydmJkM0ZOdVZseWs1MDVZRkpESnI4cVc2S0tkQVRXdU16eW5mMVVoUAo1M25hTlc0cXdrdSt3b0RWWjJpci9lUVI1WUc4L0RGcnd3bXdaa0dRd0Ftc3h5ZHd5anBnLzBrQ3lpZHkxdVBkCmVVWGgwdWt4dS9Dais4UFl5cHcwdit5V2tzbjdSZ2dVbkJFMWhiQ2pEV3FweHZjMEpDNVAxdmx6L2xRcWQrR3oKRC9Td1FJTVdRVElnV3BHRVVvQTRDc3drbU5PdHhsRVF1U0tueXNtTG02S0ExUmRhTzd6V2IrdWNLN21FZ2VoSwpXU2hHZExqRVNNZlVRUTczemNqMXg2amxLUFNhRlJyLzhXcHhrVXYzVHYvQzZMb0JpejRLCj1WSWg3Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K" } } } } } } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" } } } }, - "/v1/paymentIntents/{id}/expire": { - "post": { + "/v1/notifications/subscriptions": { + "get": { "security": [ { "bearerAuth": [] } ], - "summary": "Expire a payment intent", - "operationId": "expirePaymentIntent", + "summary": "List all notification subscriptions", + "description": "Retrieve a list of existing notification subscriptions with details.", + "parameters": [], + "operationId": "listSubscriptions", "tags": [ - "Payment Intents" + "Subscriptions" ], - "parameters": [ + "responses": { + "200": { + "description": "Successfully retrieved a list of notification subscriptions.", + "content": { + "application/json": { + "schema": { + "title": "GetListSubscriptionsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriptionResponse" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "endpoint": "https://example.org/handler/for/notifications", + "subscriptionDetails": [ + { + "url": "arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17", + "status": "confirmed" + } + ] + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "post": { + "security": [ { - "$ref": "#/components/parameters/IdPath" + "bearerAuth": [] } ], + "summary": "Create a notification subscription", + "description": "Subscribe to receiving notifications at a given endpoint. The endpoint should be able to handle AWS SNS subscription requests. For more details see https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/sns-send-http.html. Note, the sandbox environment allows a maximum of 3 active subscriptions; otherwise, this is limited to 1 active subscription and subsequent create requests will be rejected with a Limit Exceeded error.\n", + "operationId": "subscribe", + "tags": [ + "Subscriptions" + ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/SubscriptionRequest" } } } }, "responses": { - "201": { - "description": "Successfully expired a payment intent.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, + "200": { + "description": "Successfully created a notification subscription.", "content": { "application/json": { "schema": { - "title": "ExpirePaymentIntentResponse", + "title": "SubscribeResponse", "properties": { "data": { - "$ref": "#/components/schemas/PaymentIntent" + "$ref": "#/components/schemas/SubscriptionResponse" } } }, @@ -443,37 +303,14 @@ "response": { "value": { "data": { - "id": "8755d0ea-14f9-4259-b092-de23c14b6568", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "amountPaid": { - "amount": "3.14", - "currency": "USD" - }, - "settlementCurrency": "USD", - "paymentMethods": [ - { - "type": "blockchain", - "chain": "ETH" - } - ], - "paymentIds": [], - "timeline": [ - { - "status": "expired", - "context": "underpaid", - "reason": "requested_by_merchant", - "time": "2022-07-21T21:45:54.569Z" - }, + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "endpoint": "https://example.org/handler/for/notifications", + "subscriptionDetails": [ { - "status": "created", - "time": "2022-07-21T20:13:35.579331Z" + "url": "arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17", + "status": "confirmed" } - ], - "createDate": "2022-07-21T20:13:35.578678Z", - "updateDate": "2022-07-21T20:19:24.859052Z" + ] } } } @@ -487,264 +324,158 @@ "401": { "$ref": "#/components/responses/NotAuthorized" }, - "404": { - "$ref": "#/components/responses/NotFound" + "429": { + "$ref": "#/components/responses/LimitExceeded" } } } }, - "/v1/payments": { - "get": { - "security": [ + "/v1/notifications/subscriptions/{id}": { + "delete": { + "parameters": [ { - "bearerAuth": [] + "$ref": "#/components/parameters/IdPath" } ], - "parameters": [ - { - "$ref": "#/components/parameters/Source" - }, - { - "$ref": "#/components/parameters/SettlementId" - }, - { - "$ref": "#/components/parameters/PaymentIntentId" - }, - { - "$ref": "#/components/parameters/PaymentSourceType" - }, - { - "$ref": "#/components/parameters/PaymentStatus" - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, + "security": [ { - "$ref": "#/components/parameters/PageSize" + "bearerAuth": [] } ], - "summary": "List all payments", - "operationId": "getPayments", + "summary": "Remove a notification subscription", + "description": "To remove a subscription, all its subscription requests' statuses must be either 'confirmed', 'deleted' or a combination of those. A subscription with at least one 'pending' subscription request cannot be removed.", + "operationId": "unsubscribe", "tags": [ - "Payments" + "Subscriptions" ], "responses": { "200": { - "description": "Successfully retrieved a list of payments.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, + "description": "Successfully removed a subscription.", "content": { "application/json": { "schema": { - "title": "GetPaymentsResponse", + "title": "DeleteUnsubscribeResponse", "properties": { "data": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/FiatPayment" - }, - { - "$ref": "#/components/schemas/CryptoPayment" - }, - { - "$ref": "#/components/schemas/FiatCancel" - }, - { - "$ref": "#/components/schemas/FiatRefund" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "Fiat Payment": "#/components/schemas/FiatPayment", - "Crypto Payment": "#/components/schemas/CryptoPayment", - "Fiat Cancel": "#/components/schemas/FiatCancel", - "Fiat Refund": "#/components/schemas/FiatRefund" - } - } - } + "$ref": "#/components/schemas/UnsubscribeResponse" } } }, "examples": { - "Fiat Payment": { + "response": { "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "captured": false, - "captureAmount": { - "amount": "3.14", - "currency": "USD" - }, - "captureDate": "2020-04-10T02:13:30.000Z", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "description": "Payment", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - }, - "refunds": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - } - ], - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] + "data": {} } - }, - "Crypto Payment": { - "value": { - "data": [ - { - "id": "66c56b6a-fc79-338b-8b94-aacc4f0f18de", - "type": "payment", - "status": "paid", - "amount": { - "amount": "1.00", - "currency": "USD" - }, - "fees": { - "amount": "0.01", - "currency": "USD" - }, - "merchantId": "f1397191-56e6-42fd-be86-0a7b9bd91522", - "merchantWalletId": "1000999922", - "paymentIntentId": "6e4d4047-db14-4c09-b238-1215aee50d03", - "settlementAmount": { - "amount": "1.00", - "currency": "USD" - }, - "depositAddress": { - "chain": "ETH", - "address": "0x97de855690955e0da79ce5c1b6804847e7070c7f" - }, - "transactionHash": "0x7351585460bd657f320b9afa02a52c26d89272d0d10cc29913eb8b28e64fd906", - "createDate": "2022-07-21T20:16:35.092852Z", - "updateDate": "2022-07-21T20:19:24.719313Z" - } - ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/channels": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "List all channels", + "description": "Retrieve a list of channels with details (e.g. `cardDescriptor`, `achDescriptor`, etc.).", + "parameters": [], + "operationId": "listChannels", + "tags": [ + "Channels" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of channels.", + "content": { + "application/json": { + "schema": { + "title": "ListChannelsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelResponse" + } } - }, - "Fiat Cancel": { + } + }, + "examples": { + "response": { "value": { "data": [ { - "id": "2dc266f5-0658-48ec-a81f-9c768279564d", - "type": "cancel", - "status": "confirmed", - "description": "Cancel Payment", - "amount": { - "amount": "10.00", - "currency": "USD" - }, - "createDate": "2022-04-21T21:50:34.274Z", - "updateDate": "2022-04-21T21:50:34.647839Z", - "merchantId": "b1e4e9fe-0bf1-43ad-86c7-3ab993b0051b", - "merchantWalletId": "1000174786", - "source": { - "id": "bc9157fe-5d73-48fe-9e77-9f6723bdcfeb", - "type": "card" - }, - "originalPayment": { - "id": "2812f549-062a-4bdd-8ee5-b521aa48a84d", - "type": "payment", - "status": "failed", - "createDate": "2022-04-21T21:47:41.501Z", - "updateDate": "2022-04-21T21:50:34.669012Z" - }, - "reason": "requested_by_customer" + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "default": true, + "cardDescriptor": "CIRCLE LLC.", + "achDescriptor": "CIRCLE LLC." } ] } - }, - "Fiat Refund": { + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/stablecoins": { + "get": { + "summary": "List all stablecoins", + "description": "Retrieves total circulating supply for supported stablecoins across all chains. This endpoint is rate limited to one call per minute (based on IP).", + "operationId": "getStablecoins", + "tags": [ + "Stablecoins" + ], + "responses": { + "200": { + "description": "Successfully retrieved all stablecoin supplies across all chains.", + "content": { + "application/json": { + "schema": { + "title": "GetStablecoinsResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Stablecoins" + } + } + }, + "examples": { + "response": { "value": { "data": [ { - "id": "03fbe7da-096a-4763-af77-e43006cd83be", - "type": "refund", - "status": "paid", - "description": "Refund Payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "0.00", - "currency": "USD" - }, - "createDate": "2022-04-21T12:49:21.146Z", - "updateDate": "2022-04-21T12:54:10.596976Z", - "merchantId": "b1e4e9fe-0bf1-43ad-86c7-3ab993b0051b", - "merchantWalletId": "1000174786", - "source": { - "id": "45fa5524-41b9-48ca-94cd-f45cb36cce4d", - "type": "card" - }, - "originalPayment": { - "id": "895f8db5-1d8c-407d-9533-b5ca3fbcc74e", - "type": "payment", - "status": "paid", - "createDate": "2022-04-06T19:33:29.690Z", - "updateDate": "2022-04-06T19:47:23.681180Z" - }, - "reason": "requested_by_customer" + "name": "USD Coin", + "symbol": "USDC", + "totalAmount": "132.584192", + "chains": [ + { + "amount": "132.584192", + "chain": "ALGO" + } + ] } ] } @@ -753,294 +484,59 @@ } } }, - "401": { - "$ref": "#/components/responses/NotAuthorized" + "429": { + "$ref": "#/components/responses/LimitExceeded" } } } }, - "/v1/payments/{id}": { + "/v1/businessAccount/balances": { "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], "security": [ { "bearerAuth": [] } ], - "summary": "Get a payment", - "operationId": "getPayment", + "summary": "List all balances", + "description": "Retrieves the balance of funds that are available for use.", + "operationId": "getBusinessAccountBalances", "tags": [ - "Payments" + "Balances" ], "responses": { "200": { + "description": "Successfully retrieved balances.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, - "description": "Successfully retrieved a payment.", "content": { "application/json": { "schema": { - "title": "GetPaymentResponse", + "title": "GetBusinessAccountBalancesResponse", "properties": { "data": { - "oneOf": [ - { - "$ref": "#/components/schemas/FiatPaymentPolymorphic" - }, - { - "$ref": "#/components/schemas/CryptoPayment" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "Fiat Payment": "#/components/schemas/FiatPayment", - "Crypto Payment": "#/components/schemas/CryptoPayment" - } - } + "$ref": "#/components/schemas/Balances" } } }, "examples": { - "Fiat Payment": { + "response": { "value": { "data": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { + "available": [ + { "amount": "3.14", "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "verification": { - "avs": "D", - "cvv": "not_requested", - "threeDSecure": "pass", - "eci": "00" - }, - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "captured": false, - "captureAmount": { - "amount": "3.14", - "currency": "USD" - }, - "captureDate": "2020-04-10T02:13:30.000Z", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "description": "Payment", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - }, - "refunds": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - } - ], - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "refunds": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "refund", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "description": "Payment", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ], - "fees": { + } + ], + "unsettled": [ + { "amount": "3.14", "currency": "USD" - }, - "trackingRef": "24910599141085313498894", - "externalRef": "YYYYMMDDXXXXXXXX012345", - "errorCode": "payment_failed", - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - }, - "Crypto Payment": { - "value": { - "data": { - "id": "66c56b6a-fc79-338b-8b94-aacc4f0f18de", - "type": "payment", - "status": "paid", - "amount": { - "amount": "1.00", - "currency": "USD" - }, - "fees": { - "amount": "0.01", - "currency": "USD" - }, - "merchantId": "f1397191-56e6-42fd-be86-0a7b9bd91522", - "merchantWalletId": "1000999922", - "paymentIntentId": "6e4d4047-db14-4c09-b238-1215aee50d03", - "settlementAmount": { - "amount": "1.00", - "currency": "USD" - }, - "depositAddress": { - "chain": "ETH", - "address": "0x97de855690955e0da79ce5c1b6804847e7070c7f" - }, - "transactionHash": "0x7351585460bd657f320b9afa02a52c26d89272d0d10cc29913eb8b28e64fd906", - "createDate": "2022-07-21T20:16:35.092852Z", - "updateDate": "2022-07-21T20:19:24.719313Z" + } + ] } } } @@ -1050,14 +546,11 @@ }, "401": { "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" } } } }, - "/v1/businessAccount/balances": { + "/v1/balances": { "get": { "security": [ { @@ -1065,8 +558,8 @@ } ], "summary": "List all balances", - "description": "Retrieves the balance of funds that are available for use.", - "operationId": "getBusinessAccountBalances", + "description": "Retrieves the balance of merchant funds that have settled and also of funds that have been sent for processing but have not yet settled.", + "operationId": "getBalances", "tags": [ "Balances" ], @@ -1081,7 +574,7 @@ "content": { "application/json": { "schema": { - "title": "GetBusinessAccountBalancesResponse", + "title": "GetBalancesResponse", "properties": { "data": { "$ref": "#/components/schemas/Balances" @@ -1117,47 +610,110 @@ } } }, - "/v1/businessAccount/payouts": { - "get": { + "/v1/cards": { + "post": { "security": [ { "bearerAuth": [] } ], - "parameters": [ - { - "$ref": "#/components/parameters/destination" - }, - { - "name": "type", - "description": "Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "wire" - ] + "summary": "Create a card", + "operationId": "createCard", + "tags": [ + "Cards" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CardCreationRequest" + } } - }, - { - "name": "status", - "description": "Queries items with the specified status. Matches any status if unspecified.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayoutStatus" + } + }, + "responses": { + "201": { + "description": "Successfully created a card.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateCardResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Card" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "expMonth": 1, + "expYear": 2020, + "network": "VISA", + "last4": "0123", + "bin": "401230", + "issuerCountry": "US", + "fundingType": "credit", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "errorCode": "verification_failed", + "verification": { + "avs": "D", + "cvv": "not_requested" + }, + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } } } }, - { - "$ref": "#/components/parameters/From" + "400": { + "$ref": "#/components/responses/BadRequest" }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "get": { + "security": [ { - "$ref": "#/components/parameters/To" - }, + "bearerAuth": [] + } + ], + "summary": "List all cards", + "operationId": "getCards", + "tags": [ + "Cards" + ], + "parameters": [ { "$ref": "#/components/parameters/PageBefore" }, @@ -1168,14 +724,9 @@ "$ref": "#/components/parameters/PageSize" } ], - "summary": "List all payouts", - "operationId": "getBusinessAccountPayouts", - "tags": [ - "Payouts" - ], "responses": { "200": { - "description": "Successfully retrieved a list of payouts.", + "description": "Successfully retrieved a list of cards.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -1184,12 +735,12 @@ "content": { "application/json": { "schema": { - "title": "GetBusinessAccountPayoutsResponse", + "title": "GetCardsResponse", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/PayoutBusinessAccount" + "$ref": "#/components/schemas/SimpleCard" } } } @@ -1200,53 +751,25 @@ "data": [ { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "53535335", - "destination": { - "type": "wire", - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "name": "COMMERZBANK AG ****3000" - }, - "amount": { - "amount": "3.14", - "currency": "USD" + "status": "pending", + "billingDetails": { + "country": "US", + "district": "MA" }, - "fees": { - "amount": "3.14", - "currency": "USD" + "expMonth": 1, + "expYear": 2020, + "network": "VISA", + "bin": "401230", + "issuerCountry": "US", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "verification": { + "avs": "D", + "cvv": "not_requested" }, - "status": "pending", - "trackingRef": "CIR-6ESOQANEP3NAO", - "errorCode": "insufficient_funds", "riskEvaluation": { "decision": "approved", "reason": "3000" }, - "adjustments": { - "fxCredit": { - "amount": "3.14", - "currency": "USD" - }, - "fxDebit": { - "amount": "3.14", - "currency": "USD" - } - }, - "return": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "reason": "payout_returned", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" } @@ -1261,30 +784,28 @@ "$ref": "#/components/responses/NotAuthorized" } } - }, - "post": { + } + }, + "/v1/cards/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], "security": [ { "bearerAuth": [] } ], - "summary": "Create a payout", - "operationId": "createBusinessAccountPayout", + "summary": "Get a card", + "operationId": "getCard", "tags": [ - "Payouts" + "Cards" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BusinessAccountPayoutCreationRequest" - } - } - } - }, "responses": { - "201": { - "description": "Successfully created a payout.", + "200": { + "description": "Successfully retrieved a card.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -1293,10 +814,10 @@ "content": { "application/json": { "schema": { - "title": "CreateBusinessAccountPayoutResponse", + "title": "GetCardResponse", "properties": { "data": { - "$ref": "#/components/schemas/PayoutBusinessAccount" + "$ref": "#/components/schemas/Card" } } }, @@ -1305,52 +826,36 @@ "value": { "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "53535335", - "destination": { - "type": "wire", - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "name": "COMMERZBANK AG ****3000" - }, - "amount": { - "amount": "3.14", - "currency": "USD" + "status": "pending", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" }, - "fees": { - "amount": "3.14", - "currency": "USD" + "expMonth": 1, + "expYear": 2020, + "network": "VISA", + "last4": "0123", + "bin": "401230", + "issuerCountry": "US", + "fundingType": "credit", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "errorCode": "verification_failed", + "verification": { + "avs": "D", + "cvv": "not_requested" }, - "status": "pending", - "trackingRef": "CIR-6ESOQANEP3NAO", - "errorCode": "insufficient_funds", "riskEvaluation": { "decision": "approved", "reason": "3000" }, - "adjustments": { - "fxCredit": { - "amount": "3.14", - "currency": "USD" - }, - "fxDebit": { - "amount": "3.14", - "currency": "USD" - } - }, - "return": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "reason": "payout_returned", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" }, "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" @@ -1361,17 +866,15 @@ } } }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, "401": { "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } - } - }, - "/v1/businessAccount/payouts/{id}": { - "get": { + }, + "put": { "parameters": [ { "$ref": "#/components/parameters/IdPath" @@ -1382,14 +885,23 @@ "bearerAuth": [] } ], - "summary": "Get a payout", - "operationId": "getBusinessAccountPayout", + "summary": "Update a card", + "operationId": "updateCard", "tags": [ - "Payouts" + "Cards" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CardUpdate" + } + } + } + }, "responses": { "200": { - "description": "Successfully retrieved a payout.", + "description": "Succesfully modified a card.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -1398,10 +910,10 @@ "content": { "application/json": { "schema": { - "title": "GetBusinessAccountPayoutResponse", + "title": "UpdateCardResponse", "properties": { "data": { - "$ref": "#/components/schemas/PayoutBusinessAccount" + "$ref": "#/components/schemas/Card" } } }, @@ -1410,52 +922,36 @@ "value": { "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "53535335", - "destination": { - "type": "wire", - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "name": "COMMERZBANK AG ****3000" - }, - "amount": { - "amount": "3.14", - "currency": "USD" + "status": "pending", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" }, - "fees": { - "amount": "3.14", - "currency": "USD" + "expMonth": 1, + "expYear": 2020, + "network": "VISA", + "last4": "0123", + "bin": "401230", + "issuerCountry": "US", + "fundingType": "credit", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "errorCode": "verification_failed", + "verification": { + "avs": "D", + "cvv": "not_requested" }, - "status": "pending", - "trackingRef": "CIR-6ESOQANEP3NAO", - "errorCode": "insufficient_funds", "riskEvaluation": { "decision": "approved", "reason": "3000" }, - "adjustments": { - "fxCredit": { - "amount": "3.14", - "currency": "USD" - }, - "fxDebit": { - "amount": "3.14", - "currency": "USD" - } - }, - "return": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "reason": "payout_returned", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" }, "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" @@ -1465,12 +961,6 @@ } } } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" } } } @@ -1787,30 +1277,30 @@ } } }, - "/v1/businessAccount/banks/signet": { + "/v1/banks/wires": { "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Create a Signet bank account (Production Only)", - "operationId": "createBusinessAccountSignetBankAccount", + "summary": "Create a Wire bank account", + "operationId": "createWireBankAccount", "tags": [ - "Signet" + "Wires" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignetFiatAccountCreationRequest" + "$ref": "#/components/schemas/WireCreationRequest" } } } }, "responses": { "201": { - "description": "Successfully created a bank account for Signet transfers.", + "description": "Successfully created a bank account for wire transfers.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -1819,10 +1309,10 @@ "content": { "application/json": { "schema": { - "title": "CreateBusinessAccountSignetBankAccountResponse", + "title": "CreateWireBankAccountResponse", "properties": { "data": { - "$ref": "#/components/schemas/SignetFiatAccountResponse" + "$ref": "#/components/schemas/Wire" } } }, @@ -1832,8 +1322,26 @@ "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", "status": "pending", - "trackingRef": "CIR13FB14A", - "walletAddress": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd", + "description": "WELLS FARGO BANK, NA ****0010", + "trackingRef": "CIR13FB13A", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "bankAddress": { + "bankName": "SAN FRANCISCO", + "city": "SAN FRANCISCO", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "CA" + }, "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" } @@ -1850,21 +1358,28 @@ "$ref": "#/components/responses/NotAuthorized" } } - }, + } + }, + "/v1/banks/wires/{id}": { "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], "security": [ { "bearerAuth": [] } ], - "summary": "List all Signet bank accounts (Production Only).", - "operationId": "getBusinessAccountSignetBankAccounts", + "summary": "Get a Wire bank account", + "operationId": "getWireBankAccount", "tags": [ - "Signet" + "Wires" ], "responses": { "200": { - "description": "Successfully retrieved all bank accounts for Signet transfers.", + "description": "Successfully retrieved a bank account for wire transfers.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -1873,29 +1388,42 @@ "content": { "application/json": { "schema": { - "title": "GetBusinessAccountSignetBankAccountsResponse", + "title": "GetWireBankAccountResponse", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SignetFiatAccountResponse" - } + "$ref": "#/components/schemas/Wire" } } }, "examples": { "response": { "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "trackingRef": "CIR13FB14A", - "walletAddress": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "WELLS FARGO BANK, NA ****0010", + "trackingRef": "CIR13FB13A", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "bankAddress": { + "bankName": "SAN FRANCISCO", + "city": "SAN FRANCISCO", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "CA" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } } } } @@ -1904,11 +1432,14 @@ }, "401": { "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } } }, - "/v1/businessAccount/banks/signet/{id}": { + "/v1/banks/wires/{id}/instructions": { "get": { "parameters": [ { @@ -1920,14 +1451,15 @@ "bearerAuth": [] } ], - "summary": "Get a Signet bank account (Production Only)", - "operationId": "getBusinessAccountSignetBankAccount", + "summary": "Get Wire instructions", + "description": "Get the wire transfer instructions into the Circle bank account given your bank account id", + "operationId": "getWireInstructionsBankAccount", "tags": [ - "Signet" + "Wires" ], "responses": { "200": { - "description": "Successfully retrieved a bank account for Signet transfers.", + "description": "Successfully retrieved wire transfer instructions for the bank account.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -1936,10 +1468,10 @@ "content": { "application/json": { "schema": { - "title": "GetBusinessAccountSignetBankAccountResponse", + "title": "GetWireInstructionsBankAccountResponse", "properties": { "data": { - "$ref": "#/components/schemas/SignetFiatAccountResponse" + "$ref": "#/components/schemas/WireInstruction" } } }, @@ -1947,70 +1479,23 @@ "response": { "value": { "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "trackingRef": "CIR13FB14A", - "walletAddress": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/businessAccount/banks/signet/{id}/instructions": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get Signet instructions (Production Only)", - "description": "Get the Signet transfer instructions into the Circle bank account given your bank account id (only available on Production now).", - "operationId": "getBusinessAccountSignetInstructionsBankAccount", - "tags": [ - "Signet" - ], - "responses": { - "200": { - "description": "Successfully retrieved Signet transfer instructions for the bank account.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountSignetInstructionsBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/SignetInstruction" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "trackingRef": "CIR13FB14A", - "walletAddress": "0x7e4f4fe03243ac7b291ebaee90b2bb27025a1234" + "trackingRef": "CIR13FB13A", + "beneficiary": { + "name": "CIRCLE INTERNET FINANCIAL INC", + "address1": "99 HIGH STREET", + "address2": "BOSTON MA 02110" + }, + "beneficiaryBank": { + "name": "SILVERGATE BANK", + "swiftCode": "SIVGUS66XXX", + "routingNumber": "322286803", + "accountNumber": "****7427", + "currency": "USD", + "address": "4250 EXECUTIVE SQUARE SUITE 300", + "city": "LA JOLLA", + "postalCode": "02110", + "country": "US" + } } } } @@ -2271,43 +1756,42 @@ } } }, - "/v1/businessAccount/transfers": { + "/v1/banks/ach": { "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Create a transfer", - "description": "A transfer can be made from an existing business account to a blockchain location.", - "operationId": "createBusinessAccountTransfer", + "summary": "Create a ACH bank account", + "operationId": "createACHBankAccount", "tags": [ - "Transfers" + "ACH" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BusinessAccountTransferCreationRequest" + "$ref": "#/components/schemas/ACHCreationRequest" } } } }, "responses": { "201": { + "description": "Successfully created a bank account for ACH transfers.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, - "description": "Successfully created a transfer.", "content": { "application/json": { "schema": { - "title": "CreateBusinessAccountTransferResponse", + "title": "CreateACHBankAccountResponse", "properties": { "data": { - "$ref": "#/components/schemas/Transfer" + "$ref": "#/components/schemas/ACH" } } }, @@ -2316,88 +1800,75 @@ "value": { "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] + "status": "pending", + "accountNumber": "****6789", + "routingNumber": "613334455", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO" + "bankAccountType": "retail", + "bankAddress": { + "bankName": "SAN FRANCISCO", + "city": "SAN FRANCISCO", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "CA" }, - "amount": { - "amount": "3.14", - "currency": "USD" + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "errorCode": "bank_account_authorization_expired", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" }, - "fees": [ - { - "amount": "10.00", - "currency": "USD", - "type": "network" - } - ], - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "errorCode": "transfer_failed", - "createDate": "2020-04-10T02:13:30.000Z" + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z", + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + } } } } } } } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" } } - }, + } + }, + "/v1/banks/ach/{id}": { "get": { - "security": [ + "parameters": [ { - "bearerAuth": [] + "$ref": "#/components/parameters/IdPath" } ], - "parameters": [ - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, + "security": [ { - "$ref": "#/components/parameters/PageSize" + "bearerAuth": [] } ], - "summary": "List all transfers", - "description": "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.", - "operationId": "searchBusinessAccountTransfers", + "summary": "Get a ACH bank account", + "operationId": "getACHBankAccount", "tags": [ - "Transfers" + "ACH" ], "responses": { "200": { - "description": "Successfully retrieved a list of transfers.", + "description": "Successfully retrieved a bank account for ACH transfers.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -2406,109 +1877,10 @@ "content": { "application/json": { "schema": { - "title": "SearchBusinessAccountTransfersResponse", + "title": "GetACHBankAccountResponse", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": [ - { - "amount": "10.00", - "currency": "USD", - "type": "network" - } - ], - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "errorCode": "transfer_failed", - "createDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/businessAccount/transfers/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a transfer", - "operationId": "getBusinessAccountTransfer", - "tags": [ - "Transfers" - ], - "responses": { - "200": { - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "description": "Successfully retrieved a transfer.", - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountTransferResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Transfer" + "$ref": "#/components/schemas/ACH" } } }, @@ -2517,82 +1889,79 @@ "value": { "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] + "status": "pending", + "accountNumber": "****6789", + "routingNumber": "613334455", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO" + "bankAccountType": "retail", + "bankAddress": { + "bankName": "SAN FRANCISCO", + "city": "SAN FRANCISCO", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "CA" }, - "amount": { - "amount": "3.14", - "currency": "USD" + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "errorCode": "bank_account_authorization_expired", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" }, - "fees": [ - { - "amount": "10.00", - "currency": "USD", - "type": "network" - } - ], - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "errorCode": "transfer_failed", - "createDate": "2020-04-10T02:13:30.000Z" + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z", + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + } } } } } } } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } } }, - "/v1/businessAccount/wallets/addresses/deposit": { + "/v1/banks/sepa": { "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Create a deposit address", - "description": "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.\n", - "operationId": "generateBusinessAccountDepositAddress", + "summary": "Create a SEPA bank account (BETA)", + "operationId": "createSEPABankAccount", "tags": [ - "Addresses" + "SEPA" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BusinessAccountGenerateAddressRequest" + "$ref": "#/components/schemas/SEPACreationRequest" } } } }, "responses": { "201": { - "description": "Successfully generated a new deposit address.", + "description": "Successfully created a bank account for SEPA transfers.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -2601,10 +1970,10 @@ "content": { "application/json": { "schema": { - "title": "GenerateBusinessAccountDepositAddressResponse", + "title": "CreateSEPABankAccountResponse", "properties": { "data": { - "$ref": "#/components/schemas/AddressObject" + "$ref": "#/components/schemas/SEPA" } } }, @@ -2612,10 +1981,26 @@ "response": { "value": { "data": { - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "currency": "USD", - "chain": "ALGO" + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "Bank of Ireland ****0010", + "trackingRef": "CIR13FB13A", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" } } } @@ -2630,21 +2015,28 @@ "$ref": "#/components/responses/NotAuthorized" } } - }, + } + }, + "/v1/banks/sepa/{id}": { "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], "security": [ { "bearerAuth": [] } ], - "summary": "List all deposit addresses", - "operationId": "getBusinessAccountDepositAddresses", + "summary": "Get a SEPA bank account (BETA)", + "operationId": "getSEPABankAccount", "tags": [ - "Addresses" + "SEPA" ], "responses": { "200": { - "description": "Successfully retrieved a list of deposit addresses.", + "description": "Successfully retrieved a bank account for SEPA transfers.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -2653,27 +2045,38 @@ "content": { "application/json": { "schema": { - "title": "GetBusinessAccountDepositAddressesResponse", + "title": "GetSEPABankAccountResponse", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressObject" - } + "$ref": "#/components/schemas/SEPA" } } }, "examples": { "response": { "value": { - "data": [ - { - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "currency": "USD", - "chain": "ALGO" - } - ] + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "Bank of Ireland ****0010", + "trackingRef": "CIR13FB13A", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } } } } @@ -2682,35 +2085,34 @@ }, "401": { "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } } }, - "/v1/businessAccount/wallets/addresses/recipient": { - "post": { + "/v1/banks/sepa/{id}/instructions": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], "security": [ { "bearerAuth": [] } ], - "summary": "Create a recipient address", - "description": "Stores an external blockchain address. Once added, the recipient address must be verified to ensure that you know and trust each new address.\n", - "operationId": "createBusinessAccountRecipientAddress", + "summary": "Get SEPA instructions (BETA)", + "description": "Get the SEPA transfer instructions into the Circle bank account given your bank account id (BETA).", + "operationId": "getSEPAInstructionsBankAccount", "tags": [ - "Addresses" + "SEPA" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BusinessAccountRecipientAddressCreationRequest" - } - } - } - }, "responses": { "200": { - "description": "Successfully added a recipient address.", + "description": "Successfully retrieved SEPA transfer instructions for the bank account.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -2719,10 +2121,10 @@ "content": { "application/json": { "schema": { - "title": "CreateBusinessAccountRecipientAddressResponse", + "title": "GetSEPAInstructionsBankAccountResponse", "properties": { "data": { - "$ref": "#/components/schemas/BusinessAccountRecipientAddressObject" + "$ref": "#/components/schemas/SEPAInstruction" } } }, @@ -2730,12 +2132,21 @@ "response": { "value": { "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO", - "currency": "USD", - "description": "My USDC address at a cryptocurrency exchange" + "trackingRef": "CIR13FB13A", + "beneficiary": { + "name": "CIRCLE INTERNET FINANCIAL INC", + "address1": "99 HIGH STREET", + "address2": "BOSTON MA 02110" + }, + "beneficiaryBank": { + "name": "LHV Bank", + "bic": "LHVBEE22XXX", + "iban": "****6789", + "address": "Tartu mnt 2, 10145 Tallinn", + "city": "Tallinn", + "postalCode": "10017", + "country": "EE" + } } } } @@ -2743,46 +2154,93 @@ } } }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, "401": { "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } - }, - "get": { + } + }, + "/v1/businessAccount/banks/signet": { + "post": { "security": [ { "bearerAuth": [] } ], - "parameters": [ - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" + "summary": "Create a Signet bank account (Production Only)", + "operationId": "createBusinessAccountSignetBankAccount", + "tags": [ + "Signet" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignetFiatAccountCreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a bank account for Signet transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateBusinessAccountSignetBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/SignetFiatAccountResponse" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "trackingRef": "CIR13FB14A", + "walletAddress": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } }, - { - "$ref": "#/components/parameters/PageAfter" + "400": { + "$ref": "#/components/responses/BadRequest" }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "get": { + "security": [ { - "$ref": "#/components/parameters/PageSize" + "bearerAuth": [] } ], - "summary": "List all recipient addresses", - "description": "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.\n", - "operationId": "getBusinessAccountRecipientAddresses", + "summary": "List all Signet bank accounts (Production Only).", + "operationId": "getBusinessAccountSignetBankAccounts", "tags": [ - "Addresses" + "Signet" ], "responses": { "200": { - "description": "Successfully retrieved a list of recipient addresses.", + "description": "Successfully retrieved all bank accounts for Signet transfers.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -2791,12 +2249,12 @@ "content": { "application/json": { "schema": { - "title": "GetBusinessAccountRecipientAddressesResponse", + "title": "GetBusinessAccountSignetBankAccountsResponse", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BusinessAccountRecipientAddressObject" + "$ref": "#/components/schemas/SignetFiatAccountResponse" } } } @@ -2807,11 +2265,11 @@ "data": [ { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO", - "currency": "USD", - "description": "My USDC address at a cryptocurrency exchange" + "status": "pending", + "trackingRef": "CIR13FB14A", + "walletAddress": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" } ] } @@ -2826,50 +2284,26 @@ } } }, - "/v1/businessAccount/deposits": { + "/v1/businessAccount/banks/signet/{id}": { "get": { - "security": [ + "parameters": [ { - "bearerAuth": [] + "$ref": "#/components/parameters/IdPath" } ], - "parameters": [ - { - "name": "type", - "description": "Unique identifier for the deposit type. Filters results to fetch deposits made by this specific type.", - "in": "query", - "schema": { - "type": "string", - "enum": [ - "wire" - ] - } - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, + "security": [ { - "$ref": "#/components/parameters/PageSize" + "bearerAuth": [] } ], - "summary": "List all deposits", - "description": "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.", - "operationId": "searchBusinessAccountDeposits", + "summary": "Get a Signet bank account (Production Only)", + "operationId": "getBusinessAccountSignetBankAccount", "tags": [ - "Deposits" + "Signet" ], "responses": { "200": { - "description": "Successfully retrieved a list of deposits.", + "description": "Successfully retrieved a bank account for Signet transfers.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -2878,44 +2312,24 @@ "content": { "application/json": { "schema": { - "title": "SearchBusinessAccountDepositsResponse", + "title": "GetBusinessAccountSignetBankAccountResponse", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BusinessAccountDeposit" - } + "$ref": "#/components/schemas/SignetFiatAccountResponse" } } }, "examples": { "response": { "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "9b57048d-2365-4ff5-956b-0199170d1035", - "destination": { - "type": "wallet", - "id": "12345" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fee": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "trackingRef": "CIR13FB14A", + "walletAddress": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } } } } @@ -2924,35 +2338,34 @@ }, "401": { "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } } }, - "/v1/mocks/payments/sen": { - "post": { + "/v1/businessAccount/banks/signet/{id}/instructions": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], "security": [ { "bearerAuth": [] } ], - "summary": "Create a mock Silvergate SEN payment", - "description": "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.", - "operationId": "createSenPayment", + "summary": "Get Signet instructions (Production Only)", + "description": "Get the Signet transfer instructions into the Circle bank account given your bank account id (only available on Production now).", + "operationId": "getBusinessAccountSignetInstructionsBankAccount", "tags": [ - "Deposits" + "Signet" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MockSenPaymentRequest" - } - } - } - }, "responses": { - "201": { - "description": "Successfully created a mock SEN transfer.", + "200": { + "description": "Successfully retrieved Signet transfer instructions for the bank account.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -2961,10 +2374,10 @@ "content": { "application/json": { "schema": { - "title": "CreateSenPaymentResponse", + "title": "GetBusinessAccountSignetInstructionsBankAccountResponse", "properties": { "data": { - "$ref": "#/components/schemas/MockSenPaymentResponse" + "$ref": "#/components/schemas/SignetInstruction" } } }, @@ -2972,15 +2385,8 @@ "response": { "value": { "data": { - "trackingRef": "CIR13FB13A", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "beneficiaryBank": { - "accountNumber": "11111111" - }, - "status": "pending" + "trackingRef": "CIR13FB14A", + "walletAddress": "0x7e4f4fe03243ac7b291ebaee90b2bb27025a1234" } } } @@ -2988,85 +2394,92 @@ } } }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, "401": { "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } } }, - "/v1/payouts": { - "get": { + "/v1/businessAccount/wallets/addresses/deposit": { + "post": { "security": [ { "bearerAuth": [] } ], - "parameters": [ - { - "name": "source", - "description": "Universally unique identifier (UUID v4) for the source wallet. Filters the results to fetch all payouts made from a source wallet. If not provided, payouts from all wallets will be returned.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "example": "54c1cbab-c419-450f-ad23-906fa03af7f0" - } - }, - { - "name": "type", - "description": "Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayoutDestinationType" + "summary": "Create a deposit address", + "description": "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.\n", + "operationId": "generateBusinessAccountDepositAddress", + "tags": [ + "Addresses" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BusinessAccountGenerateAddressRequest" } } - }, - { - "name": "status", - "description": "Queries items with the specified status. Matches any status if unspecified.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayoutStatus" + } + }, + "responses": { + "201": { + "description": "Successfully generated a new deposit address.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GenerateBusinessAccountDepositAddressResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/AddressObject" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "currency": "USD", + "chain": "ALGO" + } + } + } + } } } }, - { - "$ref": "#/components/parameters/destination" - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" + "400": { + "$ref": "#/components/responses/BadRequest" }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "get": { + "security": [ { - "$ref": "#/components/parameters/PageSize" + "bearerAuth": [] } ], - "summary": "List all payouts", - "operationId": "getPayouts", + "summary": "List all deposit addresses", + "operationId": "getBusinessAccountDepositAddresses", "tags": [ - "Payouts" + "Addresses" ], "responses": { "200": { - "description": "Successfully retrieved a list of payouts.", + "description": "Successfully retrieved a list of deposit addresses.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -3075,12 +2488,12 @@ "content": { "application/json": { "schema": { - "title": "GetPayoutsResponse", + "title": "GetBusinessAccountDepositAddressesResponse", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Payout" + "$ref": "#/components/schemas/AddressObject" } } } @@ -3090,56 +2503,10 @@ "value": { "data": [ { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "53535335", - "destination": { - "type": "wire", - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "name": "COMMERZBANK AG ****3000" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending", - "trackingRef": "CIR-6ESOQANEP3NAO", - "errorCode": "insufficient_funds", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "adjustments": { - "fxCredit": { - "amount": "3.14", - "currency": "USD" - }, - "fxDebit": { - "amount": "3.14", - "currency": "USD" - } - }, - "return": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "reason": "payout_returned", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "currency": "USD", + "chain": "ALGO" } ] } @@ -3152,30 +2519,33 @@ "$ref": "#/components/responses/NotAuthorized" } } - }, + } + }, + "/v1/businessAccount/wallets/addresses/recipient": { "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Create a payout", - "operationId": "createPayout", + "summary": "Create a recipient address", + "description": "Stores an external blockchain address. Once added, the recipient address must be verified to ensure that you know and trust each new address.\n", + "operationId": "createBusinessAccountRecipientAddress", "tags": [ - "Payouts" + "Addresses" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PayoutCreationRequest" + "$ref": "#/components/schemas/BusinessAccountRecipientAddressCreationRequest" } } } }, "responses": { - "201": { - "description": "Successfully created a payout.", + "200": { + "description": "Successfully added a recipient address.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -3184,10 +2554,10 @@ "content": { "application/json": { "schema": { - "title": "CreatePayoutResponse", + "title": "CreateBusinessAccountRecipientAddressResponse", "properties": { "data": { - "$ref": "#/components/schemas/Payout" + "$ref": "#/components/schemas/BusinessAccountRecipientAddressObject" } } }, @@ -3196,55 +2566,11 @@ "value": { "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "53535335", - "destination": { - "type": "wire", - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "name": "COMMERZBANK AG ****3000" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending", - "trackingRef": "CIR-6ESOQANEP3NAO", - "errorCode": "insufficient_funds", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "adjustments": { - "fxCredit": { - "amount": "3.14", - "currency": "USD" - }, - "fxDebit": { - "amount": "3.14", - "currency": "USD" - } - }, - "return": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "reason": "payout_returned", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO", + "currency": "USD", + "description": "My USDC address at a cryptocurrency exchange" } } } @@ -3259,28 +2585,39 @@ "$ref": "#/components/responses/NotAuthorized" } } - } - }, - "/v1/payouts/{id}": { + }, "get": { - "parameters": [ + "security": [ { - "$ref": "#/components/parameters/IdPath" + "bearerAuth": [] } ], - "security": [ + "parameters": [ { - "bearerAuth": [] + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" } ], - "summary": "Get a payout", - "operationId": "getPayout", + "summary": "List all recipient addresses", + "description": "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.\n", + "operationId": "getBusinessAccountRecipientAddresses", "tags": [ - "Payouts" + "Addresses" ], "responses": { "200": { - "description": "Successfully retrieved a payout.", + "description": "Successfully retrieved a list of recipient addresses.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -3289,69 +2626,131 @@ "content": { "application/json": { "schema": { - "title": "GetPayoutResponse", + "title": "GetBusinessAccountRecipientAddressesResponse", "properties": { "data": { - "$ref": "#/components/schemas/DetailedPayout" + "type": "array", + "items": { + "$ref": "#/components/schemas/BusinessAccountRecipientAddressObject" + } } } }, "examples": { "response": { "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "53535335", - "destination": { - "type": "wire", + "data": [ + { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "name": "COMMERZBANK AG ****3000" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending", - "trackingRef": "CIR-6ESOQANEP3NAO", - "externalRef": "YYYYMMDDXXXXXXXX012345", - "errorCode": "insufficient_funds", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "adjustments": { - "fxCredit": { - "amount": "3.14", - "currency": "USD" - }, - "fxDebit": { - "amount": "3.14", - "currency": "USD" - } - }, - "return": { + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO", + "currency": "USD", + "description": "My USDC address at a cryptocurrency exchange" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/businessAccount/deposits": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Unique identifier for the deposit type. Filters results to fetch deposits made by this specific type.", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "wire" + ] + } + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all deposits", + "description": "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.", + "operationId": "searchBusinessAccountDeposits", + "tags": [ + "Deposits" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of deposits.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "SearchBusinessAccountDepositsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BusinessAccountDeposit" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "sourceWalletId": "9b57048d-2365-4ff5-956b-0199170d1035", + "destination": { + "type": "wallet", + "id": "12345" + }, "amount": { "amount": "3.14", "currency": "USD" }, - "fees": { + "fee": { "amount": "3.14", "currency": "USD" }, - "reason": "payout_returned", "status": "pending", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } + } + ] } } } @@ -3360,104 +2759,46 @@ }, "401": { "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" } } } }, - "/v1/transfers": { + "/v1/paymentIntents": { "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Create a transfer", - "description": "A transfer can be made from an existing funded wallet to a blockchain address or another wallet.", - "operationId": "createTransfer", + "summary": "Create a payment intent", + "operationId": "createPaymentIntent", "tags": [ - "On-chain payouts" + "Payment Intents" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TransferCreationRequest" - }, - "examples": { - "request": { - "value": { - "idempotencyKey": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "source": { - "type": "wallet", - "id": "12345" - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "chain": "ETH" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - } - } - }, - "travel rule": { - "value": { - "idempotencyKey": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "chain": "ETH" - }, - "amount": { - "amount": "3000.00", - "currency": "USD" - } - } - } + "$ref": "#/components/schemas/PaymentIntent" } } } }, "responses": { "201": { + "description": "Successfully created a payment intent.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, - "description": "Successfully created a transfer.", "content": { "application/json": { "schema": { - "title": "CreateTransferResponse", + "title": "CreatePaymentIntentResponse", "properties": { "data": { - "$ref": "#/components/schemas/Transfer" + "$ref": "#/components/schemas/PaymentIntent" } } }, @@ -3465,68 +2806,46 @@ "response": { "value": { "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345" - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "chain": "ETH" - }, + "id": "8755d0ea-14f9-4259-b092-de23c14b6568", "amount": { "amount": "3.14", "currency": "USD" }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - } - } - }, - "travel rule": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "chain": "ETH" - }, - "amount": { - "amount": "3000.00", + "amountPaid": { + "amount": "0.00", "currency": "USD" }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" + "settlementCurrency": "USD", + "paymentMethods": [ + { + "type": "blockchain", + "chain": "ETH" + } + ], + "paymentIds": [], + "timeline": [ + { + "status": "created", + "time": "2022-07-21T20:13:35.579331Z" + } + ], + "createDate": "2022-07-21T20:13:35.578678Z", + "updateDate": "2022-07-21T20:19:24.859052Z" } } } } } } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } }, @@ -3536,40 +2855,42 @@ "bearerAuth": [] } ], + "summary": "List all payment intents", + "operationId": "getPaymentIntents", + "tags": [ + "Payment Intents" + ], "parameters": [ { - "name": "walletId", - "description": "Unique identifier for the source or destination wallet of transfers, if any. May not be used in conjunction with destinationWalletId or sourceWalletId. Useful for fetching all transfers related to a wallet.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "example": "12345" - } - }, - { - "name": "sourceWalletId", - "description": "Unique identifier for the source wallet of transfers, if any.", + "name": "status", + "description": "Filters by the most recent `timeline.status` within the payment intent.", "in": "query", "required": false, "schema": { "type": "string", - "example": "12345" + "enum": [ + "created", + "pending", + "complete", + "expired", + "failed" + ] } }, { - "name": "destinationWalletId", - "description": "Unique identifier for the destination wallet of transfers, if any.", + "name": "context", + "description": "Filters by the most recent `timeline.context` within the payment intent.", "in": "query", "required": false, "schema": { "type": "string", - "example": "12345" + "enum": [ + "underpaid", + "paid", + "overpaid" + ] } }, - { - "$ref": "#/components/parameters/ReturnIdentities" - }, { "$ref": "#/components/parameters/From" }, @@ -3586,15 +2907,9 @@ "$ref": "#/components/parameters/PageSize" } ], - "summary": "List all transfers", - "description": "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.", - "operationId": "searchTransfers", - "tags": [ - "On-chain payouts" - ], "responses": { "200": { - "description": "Successfully retrieved a list of transfers.", + "description": "Successfully retrieved a list of payment intents.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -3603,12 +2918,12 @@ "content": { "application/json": { "schema": { - "title": "SearchTransfersResponse", + "title": "GetPaymentIntentsResponse", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Transfer" + "$ref": "#/components/schemas/PaymentIntent" } } } @@ -3618,65 +2933,43 @@ "value": { "data": [ { + "idempotencyKey": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345" - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO" - }, "amount": { "amount": "3.14", "currency": "USD" }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - } - ] - } - }, - "travel rule": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO" - }, - "amount": { - "amount": "3000.00", + "amountPaid": { + "amount": "3.14", "currency": "USD" }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", + "settlementCurrency": "USD", + "paymentMethods": [ + { + "type": "blockchain", + "chain": "ALGO", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" + } + ], + "fees": [ + { + "type": "blockchainLeaseFee", + "amount": "3.14", + "currency": "USD" + } + ], + "paymentIds": [ + "69808f36-3e5e-4f37-bf82-ca79e4d70fc1" + ], + "timeline": [ + { + "status": "created", + "context": "underpaid", + "time": "2020-04-10T02:13:30.000Z" + } + ], + "expiresOn": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z", "createDate": "2020-04-10T02:13:30.000Z" } ] @@ -3692,41 +2985,38 @@ } } }, - "/v1/transfers/{id}": { + "/v1/paymentIntents/{id}": { "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - }, - { - "$ref": "#/components/parameters/ReturnIdentities" - } - ], "security": [ { "bearerAuth": [] } ], - "summary": "Get a transfer", - "operationId": "getTransfer", + "summary": "Get a payment intent", + "operationId": "getPaymentIntent", "tags": [ - "On-chain payouts" + "Payment Intents" + ], + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } ], "responses": { "200": { + "description": "Successfully retrieved a payment intent.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, - "description": "Successfully retrieved a transfer.", "content": { "application/json": { "schema": { - "title": "GetTransferResponse", + "title": "GetPaymentIntentResponse", "properties": { "data": { - "$ref": "#/components/schemas/TransferDetailedTransfer" + "$ref": "#/components/schemas/PaymentIntent" } } }, @@ -3734,96 +3024,76 @@ "response": { "value": { "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345" - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "chain": "ETH" - }, + "id": "8755d0ea-14f9-4259-b092-de23c14b6568", "amount": { "amount": "3.14", "currency": "USD" }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - } - } - }, - "travel rule": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "chain": "ETH" - }, - "amount": { - "amount": "3000.00", + "amountPaid": { + "amount": "0.00", "currency": "USD" }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" + "settlementCurrency": "USD", + "paymentMethods": [ + { + "type": "blockchain", + "chain": "ETH" + } + ], + "paymentIds": [], + "timeline": [ + { + "status": "created", + "time": "2022-07-21T20:13:35.579331Z" + } + ], + "createDate": "2022-07-21T20:13:35.578678Z", + "updateDate": "2022-07-21T20:19:24.859052Z" } } } } } } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } } }, - "/v1/banks/wires": { + "/v1/paymentIntents/{id}/expire": { "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Create a Wire bank account", - "operationId": "createWireBankAccount", + "summary": "Expire a payment intent", + "operationId": "expirePaymentIntent", "tags": [ - "Wires" + "Payment Intents" + ], + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WireCreationRequest" + "type": "object" } } } }, "responses": { "201": { - "description": "Successfully created a bank account for wire transfers.", + "description": "Successfully expired a payment intent.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -3832,10 +3102,10 @@ "content": { "application/json": { "schema": { - "title": "CreateWireBankAccountResponse", + "title": "ExpirePaymentIntentResponse", "properties": { "data": { - "$ref": "#/components/schemas/Wire" + "$ref": "#/components/schemas/PaymentIntent" } } }, @@ -3843,30 +3113,37 @@ "response": { "value": { "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "WELLS FARGO BANK, NA ****0010", - "trackingRef": "CIR13FB13A", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" + "id": "8755d0ea-14f9-4259-b092-de23c14b6568", + "amount": { + "amount": "3.14", + "currency": "USD" }, - "bankAddress": { - "bankName": "SAN FRANCISCO", - "city": "SAN FRANCISCO", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "CA" + "amountPaid": { + "amount": "3.14", + "currency": "USD" }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" + "settlementCurrency": "USD", + "paymentMethods": [ + { + "type": "blockchain", + "chain": "ETH" + } + ], + "paymentIds": [], + "timeline": [ + { + "status": "expired", + "context": "underpaid", + "reason": "requested_by_merchant", + "time": "2022-07-21T21:45:54.569Z" + }, + { + "status": "created", + "time": "2022-07-21T20:13:35.579331Z" + } + ], + "createDate": "2022-07-21T20:13:35.578678Z", + "updateDate": "2022-07-21T20:19:24.859052Z" } } } @@ -3879,113 +3156,60 @@ }, "401": { "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } } }, - "/v1/banks/wires/{id}": { + "/v1/payments": { "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], "security": [ { "bearerAuth": [] } ], - "summary": "Get a Wire bank account", - "operationId": "getWireBankAccount", - "tags": [ - "Wires" - ], - "responses": { - "200": { - "description": "Successfully retrieved a bank account for wire transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetWireBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Wire" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "WELLS FARGO BANK, NA ****0010", - "trackingRef": "CIR13FB13A", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "bankAddress": { - "bankName": "SAN FRANCISCO", - "city": "SAN FRANCISCO", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "CA" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } + "parameters": [ + { + "$ref": "#/components/parameters/Source" }, - "401": { - "$ref": "#/components/responses/NotAuthorized" + { + "$ref": "#/components/parameters/SettlementId" }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/banks/ach": { - "post": { - "security": [ { - "bearerAuth": [] + "$ref": "#/components/parameters/PaymentIntentId" + }, + { + "$ref": "#/components/parameters/PaymentSourceType" + }, + { + "$ref": "#/components/parameters/PaymentStatus" + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" } ], - "summary": "Create a ACH bank account", - "operationId": "createACHBankAccount", + "summary": "List all payments", + "operationId": "getPayments", "tags": [ - "ACH" + "Payments" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ACHCreationRequest" - } - } - } - }, "responses": { - "201": { - "description": "Successfully created a bank account for ACH transfers.", + "200": { + "description": "Successfully retrieved a list of payments.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -3994,87 +3218,239 @@ "content": { "application/json": { "schema": { - "title": "CreateACHBankAccountResponse", + "title": "GetPaymentsResponse", "properties": { "data": { - "$ref": "#/components/schemas/ACH" + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/FiatPayment" + }, + { + "$ref": "#/components/schemas/CryptoPayment" + }, + { + "$ref": "#/components/schemas/FiatCancel" + }, + { + "$ref": "#/components/schemas/FiatRefund" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "Fiat Payment": "#/components/schemas/FiatPayment", + "Crypto Payment": "#/components/schemas/CryptoPayment", + "Fiat Cancel": "#/components/schemas/FiatCancel", + "Fiat Refund": "#/components/schemas/FiatRefund" + } + } + } } } }, "examples": { - "response": { + "Fiat Payment": { "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "accountNumber": "****6789", - "routingNumber": "613334455", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "bankAccountType": "retail", - "bankAddress": { - "bankName": "SAN FRANCISCO", - "city": "SAN FRANCISCO", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "CA" - }, - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "errorCode": "bank_account_authorization_expired", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z", - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "captured": false, + "captureAmount": { + "amount": "3.14", + "currency": "USD" + }, + "captureDate": "2020-04-10T02:13:30.000Z", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "description": "Payment", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + }, + "refunds": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + } + ], + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" } - } + ] + } + }, + "Crypto Payment": { + "value": { + "data": [ + { + "id": "66c56b6a-fc79-338b-8b94-aacc4f0f18de", + "type": "payment", + "status": "paid", + "amount": { + "amount": "1.00", + "currency": "USD" + }, + "fees": { + "amount": "0.01", + "currency": "USD" + }, + "merchantId": "f1397191-56e6-42fd-be86-0a7b9bd91522", + "merchantWalletId": "1000999922", + "paymentIntentId": "6e4d4047-db14-4c09-b238-1215aee50d03", + "settlementAmount": { + "amount": "1.00", + "currency": "USD" + }, + "depositAddress": { + "chain": "ETH", + "address": "0x97de855690955e0da79ce5c1b6804847e7070c7f" + }, + "transactionHash": "0x7351585460bd657f320b9afa02a52c26d89272d0d10cc29913eb8b28e64fd906", + "createDate": "2022-07-21T20:16:35.092852Z", + "updateDate": "2022-07-21T20:19:24.719313Z" + } + ] + } + }, + "Fiat Cancel": { + "value": { + "data": [ + { + "id": "2dc266f5-0658-48ec-a81f-9c768279564d", + "type": "cancel", + "status": "confirmed", + "description": "Cancel Payment", + "amount": { + "amount": "10.00", + "currency": "USD" + }, + "createDate": "2022-04-21T21:50:34.274Z", + "updateDate": "2022-04-21T21:50:34.647839Z", + "merchantId": "b1e4e9fe-0bf1-43ad-86c7-3ab993b0051b", + "merchantWalletId": "1000174786", + "source": { + "id": "bc9157fe-5d73-48fe-9e77-9f6723bdcfeb", + "type": "card" + }, + "originalPayment": { + "id": "2812f549-062a-4bdd-8ee5-b521aa48a84d", + "type": "payment", + "status": "failed", + "createDate": "2022-04-21T21:47:41.501Z", + "updateDate": "2022-04-21T21:50:34.669012Z" + }, + "reason": "requested_by_customer" + } + ] + } + }, + "Fiat Refund": { + "value": { + "data": [ + { + "id": "03fbe7da-096a-4763-af77-e43006cd83be", + "type": "refund", + "status": "paid", + "description": "Refund Payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "0.00", + "currency": "USD" + }, + "createDate": "2022-04-21T12:49:21.146Z", + "updateDate": "2022-04-21T12:54:10.596976Z", + "merchantId": "b1e4e9fe-0bf1-43ad-86c7-3ab993b0051b", + "merchantWalletId": "1000174786", + "source": { + "id": "45fa5524-41b9-48ca-94cd-f45cb36cce4d", + "type": "card" + }, + "originalPayment": { + "id": "895f8db5-1d8c-407d-9533-b5ca3fbcc74e", + "type": "payment", + "status": "paid", + "createDate": "2022-04-06T19:33:29.690Z", + "updateDate": "2022-04-06T19:47:23.681180Z" + }, + "reason": "requested_by_customer" + } + ] } } } } } }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, "401": { "$ref": "#/components/responses/NotAuthorized" } } - } - }, - "/v1/banks/ach/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], + }, + "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Get a ACH bank account", - "operationId": "getACHBankAccount", + "summary": "Create a payment", + "operationId": "createPayment", "tags": [ - "ACH" + "Payments" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentCreationRequest" + } + } + } + }, "responses": { - "200": { - "description": "Successfully retrieved a bank account for ACH transfers.", + "201": { + "description": "Successfully created a payment.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -4083,10 +3459,10 @@ "content": { "application/json": { "schema": { - "title": "GetACHBankAccountResponse", + "title": "CreatePaymentResponse", "properties": { "data": { - "$ref": "#/components/schemas/ACH" + "$ref": "#/components/schemas/DetailedPayment" } } }, @@ -4095,39 +3471,145 @@ "value": { "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", "status": "pending", - "accountNumber": "****6789", - "routingNumber": "613334455", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" + "captured": false, + "captureAmount": { + "amount": "3.14", + "currency": "USD" }, - "bankAccountType": "retail", - "bankAddress": { - "bankName": "SAN FRANCISCO", - "city": "SAN FRANCISCO", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "CA" + "captureDate": "2020-04-10T02:13:30.000Z", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "verification": { + "avs": "D", + "cvv": "not_requested", + "threeDSecure": "pass", + "eci": "00" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "refunds": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "refund", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "description": "Payment", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ], + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "trackingRef": "24910599141085313498894", + "errorCode": "payment_failed", + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" }, - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "errorCode": "bank_account_authorization_expired", "riskEvaluation": { "decision": "approved", "reason": "3000" }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z", - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - } + "updateDate": "2020-04-10T02:13:30.000Z" } } } @@ -4135,6 +3617,9 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/NotAuthorized" }, @@ -4144,157 +3629,511 @@ } } }, - "/v1/mocks/ach/accounts": { - "post": { - "security": [ + "/v1/payments/{id}": { + "get": { + "parameters": [ { - "bearerAuth": [] + "$ref": "#/components/parameters/IdPath" } ], - "summary": "Create a mock ACH bank account", - "description": "In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account.", - "operationId": "createAchAccount", - "tags": [ - "ACH" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MockAchAccountCreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a mock ach payment.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateAchAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/MockAchAccountResponse" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "processorToken": "processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621", - "balance": { - "amount": "3.14", - "currency": "USD" - }, - "account": { - "accountNumber": "123456789", - "routingNumber": "011000028", - "description": "My ACH account" - } - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/banks/sepa": { - "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Create a SEPA bank account (BETA)", - "operationId": "createSEPABankAccount", + "summary": "Get a payment", + "operationId": "getPayment", "tags": [ - "SEPA" + "Payments" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SEPACreationRequest" - } - } - } - }, "responses": { - "201": { - "description": "Successfully created a bank account for SEPA transfers.", + "200": { "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, + "description": "Successfully retrieved a payment.", "content": { "application/json": { "schema": { - "title": "CreateSEPABankAccountResponse", + "title": "GetPaymentResponse", "properties": { "data": { - "$ref": "#/components/schemas/SEPA" + "oneOf": [ + { + "$ref": "#/components/schemas/FiatPaymentPolymorphic" + }, + { + "$ref": "#/components/schemas/CryptoPayment" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "Fiat Payment": "#/components/schemas/FiatPayment", + "Crypto Payment": "#/components/schemas/CryptoPayment" + } + } } } }, "examples": { - "response": { + "Fiat Payment": { "value": { "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "Bank of Ireland ****0010", - "trackingRef": "CIR13FB13A", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "verification": { + "avs": "D", + "cvv": "not_requested", + "threeDSecure": "pass", + "eci": "00" + }, + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "captured": false, + "captureAmount": { + "amount": "3.14", + "currency": "USD" + }, + "captureDate": "2020-04-10T02:13:30.000Z", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "description": "Payment", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + }, + "refunds": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + } + ], + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "refunds": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "refund", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "description": "Payment", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ], + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "trackingRef": "24910599141085313498894", + "externalRef": "YYYYMMDDXXXXXXXX012345", + "errorCode": "payment_failed", + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + }, + "Crypto Payment": { + "value": { + "data": { + "id": "66c56b6a-fc79-338b-8b94-aacc4f0f18de", + "type": "payment", + "status": "paid", + "amount": { + "amount": "1.00", + "currency": "USD" + }, + "fees": { + "amount": "0.01", + "currency": "USD" + }, + "merchantId": "f1397191-56e6-42fd-be86-0a7b9bd91522", + "merchantWalletId": "1000999922", + "paymentIntentId": "6e4d4047-db14-4c09-b238-1215aee50d03", + "settlementAmount": { + "amount": "1.00", + "currency": "USD" + }, + "depositAddress": { + "chain": "ETH", + "address": "0x97de855690955e0da79ce5c1b6804847e7070c7f" + }, + "transactionHash": "0x7351585460bd657f320b9afa02a52c26d89272d0d10cc29913eb8b28e64fd906", + "createDate": "2022-07-21T20:16:35.092852Z", + "updateDate": "2022-07-21T20:19:24.719313Z" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/payments/{id}/capture": { + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CaptureCreationRequest" + } + } + } + }, + "summary": "Capture a payment (BETA)", + "description": "Warning: Please contact Circle support if you are planning on using this feature.\n\nThe given amount will be captured for the authorized payment if possible. If no amount is specified, the full amount\nwill be captured. You can only capture once per authorization.\n\nA successful response does *not* mean the payment has been captured. It only means the capture request was successfully submitted.\n", + "operationId": "capturePayment", + "tags": [ + "Payments" + ], + "responses": { + "202": { + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Payment capture successfully initiated." + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/payments/{id}/cancel": { + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CancelCreationRequest" + } + } + } + }, + "summary": "Cancel a payment", + "description": "The payment will be voided if possible meaning the payment source will not be charged & the payment will never settle.\nOtherwise, the payment will be refunded meaning the payment source will be charged & the payment will be refunded from deductions of future settlements.\nNot all payments are eligible to be cancelled.\n\nA successful response does *not* mean the payment has been cancelled; it only means the cancellation request is successfully submitted.\n", + "operationId": "cancelPayment", + "tags": [ + "Payments" + ], + "responses": { + "200": { + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Payment cancellation successfully initiated.", + "content": { + "application/json": { + "schema": { + "title": "CancelPaymentResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/DetailedCancel" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "captured": false, + "captureAmount": { + "amount": "3.14", + "currency": "USD" + }, + "captureDate": "2020-04-10T02:13:30.000Z", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "description": "Payment", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + }, + "refunds": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + } + ], + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "trackingRef": "24910599141085313498894", + "errorCode": "payment_failed", + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + }, + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "refund": false, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, "401": { "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } } }, - "/v1/banks/sepa/{id}": { - "get": { + "/v1/payments/{id}/refund": { + "post": { "parameters": [ { "$ref": "#/components/parameters/IdPath" @@ -4305,26 +4144,36 @@ "bearerAuth": [] } ], - "summary": "Get a SEPA bank account (BETA)", - "operationId": "getSEPABankAccount", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefundCreationRequest" + } + } + } + }, + "summary": "Refund a payment", + "description": "The payment source will be refunded if possible. Not all payments are eligible to be cancelled.\n\nA successful response does *not* mean the payment has been refunded; it only means the refund request is successfully submitted.\n", + "operationId": "refundPayment", "tags": [ - "SEPA" + "Payments" ], "responses": { "200": { - "description": "Successfully retrieved a bank account for SEPA transfers.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, + "description": "Payment refund successfully initiated.", "content": { "application/json": { "schema": { - "title": "GetSEPABankAccountResponse", + "title": "RefundPaymentResponse", "properties": { "data": { - "$ref": "#/components/schemas/SEPA" + "$ref": "#/components/schemas/DetailedRefund" } } }, @@ -4333,23 +4182,136 @@ "value": { "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "refund", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", "status": "pending", - "description": "Bank of Ireland ****0010", - "trackingRef": "CIR13FB13A", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "captured": false, + "captureAmount": { + "amount": "3.14", + "currency": "USD" + }, + "captureDate": "2020-04-10T02:13:30.000Z", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "description": "Payment", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + }, + "refunds": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + } + ], + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "trackingRef": "24910599141085313498894", + "errorCode": "payment_failed", + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + }, "riskEvaluation": { "decision": "approved", "reason": "3000" }, - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" } @@ -4368,7 +4330,7 @@ } } }, - "/v1/returns": { + "/v1/businessAccount/payouts": { "get": { "security": [ { @@ -4376,6 +4338,33 @@ } ], "parameters": [ + { + "$ref": "#/components/parameters/destination" + }, + { + "name": "type", + "description": "Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "wire" + ] + } + }, + { + "name": "status", + "description": "Queries items with the specified status. Matches any status if unspecified.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayoutStatus" + } + } + }, { "$ref": "#/components/parameters/From" }, @@ -4392,15 +4381,14 @@ "$ref": "#/components/parameters/PageSize" } ], - "summary": "List all payout returns", - "description": "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.", - "operationId": "getReturns", + "summary": "List all payouts", + "operationId": "getBusinessAccountPayouts", "tags": [ - "Returns" + "Payouts" ], "responses": { "200": { - "description": "Successfully retrieved a list of payout returns.", + "description": "Successfully retrieved a list of payouts.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -4409,12 +4397,12 @@ "content": { "application/json": { "schema": { - "title": "GetReturnsResponse", + "title": "GetBusinessAccountPayoutsResponse", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/UnwithdrawalObject" + "$ref": "#/components/schemas/PayoutBusinessAccount" } } } @@ -4425,7 +4413,12 @@ "data": [ { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "sourceWalletId": "53535335", + "destination": { + "type": "wire", + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "name": "COMMERZBANK AG ****3000" + }, "amount": { "amount": "3.14", "currency": "USD" @@ -4434,8 +4427,39 @@ "amount": "3.14", "currency": "USD" }, - "reason": "payout_returned", "status": "pending", + "trackingRef": "CIR-6ESOQANEP3NAO", + "errorCode": "insufficient_funds", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "adjustments": { + "fxCredit": { + "amount": "3.14", + "currency": "USD" + }, + "fxDebit": { + "amount": "3.14", + "currency": "USD" + } + }, + "return": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "reason": "payout_returned", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" } @@ -4446,105 +4470,46 @@ } } }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, "401": { "$ref": "#/components/responses/NotAuthorized" } } - } - }, - "/v1/payments/{id}/capture": { + }, "post": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], "security": [ { "bearerAuth": [] } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CaptureCreationRequest" - } - } - } - }, - "summary": "Capture a payment (BETA)", - "description": "Warning: Please contact Circle support if you are planning on using this feature.\n\nThe given amount will be captured for the authorized payment if possible. If no amount is specified, the full amount\nwill be captured. You can only capture once per authorization.\n\nA successful response does *not* mean the payment has been captured. It only means the capture request was successfully submitted.\n", - "operationId": "capturePayment", + "summary": "Create a payout", + "operationId": "createBusinessAccountPayout", "tags": [ - "Payments" - ], - "responses": { - "202": { - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "description": "Payment capture successfully initiated." - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/payments/{id}/cancel": { - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } + "Payouts" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CancelCreationRequest" + "$ref": "#/components/schemas/BusinessAccountPayoutCreationRequest" } } } }, - "summary": "Cancel a payment", - "description": "The payment will be voided if possible meaning the payment source will not be charged & the payment will never settle.\nOtherwise, the payment will be refunded meaning the payment source will be charged & the payment will be refunded from deductions of future settlements.\nNot all payments are eligible to be cancelled.\n\nA successful response does *not* mean the payment has been cancelled; it only means the cancellation request is successfully submitted.\n", - "operationId": "cancelPayment", - "tags": [ - "Payments" - ], "responses": { - "200": { + "201": { + "description": "Successfully created a payout.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, - "description": "Payment cancellation successfully initiated.", "content": { "application/json": { "schema": { - "title": "CancelPaymentResponse", + "title": "CreateBusinessAccountPayoutResponse", "properties": { "data": { - "$ref": "#/components/schemas/DetailedCancel" + "$ref": "#/components/schemas/PayoutBusinessAccount" } } }, @@ -4553,95 +4518,53 @@ "value": { "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", + "sourceWalletId": "53535335", + "destination": { + "type": "wire", + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "name": "COMMERZBANK AG ****3000" + }, "amount": { "amount": "3.14", "currency": "USD" }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" + "fees": { + "amount": "3.14", + "currency": "USD" }, - "description": "Payment", "status": "pending", - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { + "trackingRef": "CIR-6ESOQANEP3NAO", + "errorCode": "insufficient_funds", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "adjustments": { + "fxCredit": { "amount": "3.14", "currency": "USD" }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "captured": false, - "captureAmount": { + "fxDebit": { + "amount": "3.14", + "currency": "USD" + } + }, + "return": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { "amount": "3.14", "currency": "USD" }, - "captureDate": "2020-04-10T02:13:30.000Z", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "description": "Payment", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - }, - "refunds": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - } - ], "fees": { "amount": "3.14", "currency": "USD" }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "trackingRef": "24910599141085313498894", - "errorCode": "payment_failed", - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - }, - "riskEvaluation": { - "decision": "approved", - "reason": "3000" + "reason": "payout_returned", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" }, - "refund": false, "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" } @@ -4651,17 +4574,17 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" } } } }, - "/v1/payments/{id}/refund": { - "post": { + "/v1/businessAccount/payouts/{id}": { + "get": { "parameters": [ { "$ref": "#/components/parameters/IdPath" @@ -4672,36 +4595,26 @@ "bearerAuth": [] } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefundCreationRequest" - } - } - } - }, - "summary": "Refund a payment", - "description": "The payment source will be refunded if possible. Not all payments are eligible to be cancelled.\n\nA successful response does *not* mean the payment has been refunded; it only means the refund request is successfully submitted.\n", - "operationId": "refundPayment", + "summary": "Get a payout", + "operationId": "getBusinessAccountPayout", "tags": [ - "Payments" + "Payouts" ], "responses": { "200": { + "description": "Successfully retrieved a payout.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, - "description": "Payment refund successfully initiated.", "content": { "application/json": { "schema": { - "title": "RefundPaymentResponse", + "title": "GetBusinessAccountPayoutResponse", "properties": { "data": { - "$ref": "#/components/schemas/DetailedRefund" + "$ref": "#/components/schemas/PayoutBusinessAccount" } } }, @@ -4710,136 +4623,53 @@ "value": { "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "refund", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", + "sourceWalletId": "53535335", + "destination": { + "type": "wire", + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "name": "COMMERZBANK AG ****3000" + }, "amount": { "amount": "3.14", "currency": "USD" }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" + "fees": { + "amount": "3.14", + "currency": "USD" }, - "description": "Payment", "status": "pending", - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "captured": false, - "captureAmount": { + "trackingRef": "CIR-6ESOQANEP3NAO", + "errorCode": "insufficient_funds", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "adjustments": { + "fxCredit": { "amount": "3.14", "currency": "USD" }, - "captureDate": "2020-04-10T02:13:30.000Z", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "description": "Payment", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - }, - "refunds": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - } - ], - "fees": { + "fxDebit": { "amount": "3.14", "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" + } }, - "cancel": { + "return": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", "amount": { "amount": "3.14", "currency": "USD" }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - }, "fees": { "amount": "3.14", "currency": "USD" }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "reason": "payout_returned", + "status": "pending", "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "trackingRef": "24910599141085313498894", - "errorCode": "payment_failed", - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - }, - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" } @@ -4858,107 +4688,76 @@ } } }, - "/v1/mocks/payments/wire": { - "post": { + "/v1/payouts": { + "get": { "security": [ { "bearerAuth": [] } ], - "summary": "Create a mock Wire payment", - "description": "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.", - "operationId": "createWirePayment", - "tags": [ - "Payments" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MockWirePaymentRequest" - } + "parameters": [ + { + "name": "source", + "description": "Universally unique identifier (UUID v4) for the source wallet. Filters the results to fetch all payouts made from a source wallet. If not provided, payouts from all wallets will be returned.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "54c1cbab-c419-450f-ad23-906fa03af7f0" } - } - }, - "responses": { - "201": { - "description": "Successfully created a mock wire payment.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" + }, + { + "name": "type", + "description": "Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayoutDestinationType" } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateWirePaymentResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/MockWirePaymentResponse" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "trackingRef": "CIR13FB13A", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "beneficiaryBank": { - "accountNumber": "11111111" - }, - "status": "pending" - } - } - } - } + } + }, + { + "name": "status", + "description": "Queries items with the specified status. Matches any status if unspecified.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayoutStatus" } } }, - "400": { - "$ref": "#/components/responses/BadRequest" + { + "$ref": "#/components/parameters/destination" + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/mocks/payments/sepa": { - "post": { - "security": [ { - "bearerAuth": [] + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" } ], - "summary": "Create a mock SEPA payment", - "description": "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.", - "operationId": "createSepaPayment", + "summary": "List all payouts", + "operationId": "getPayouts", "tags": [ - "Payments" + "Payouts" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MockSepaPaymentRequest" - }, - "example": { - "trackingRef": "CIR13FB13A", - "amount": { - "amount": 3.14, - "currency": "EUR" - } - } - } - } - }, "responses": { - "201": { - "description": "Successfully created a mock SEPA payment.", + "200": { + "description": "Successfully retrieved a list of payouts.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -4967,69 +4766,107 @@ "content": { "application/json": { "schema": { - "title": "CreateSepaPaymentResponse", + "title": "GetPayoutsResponse", "properties": { "data": { - "$ref": "#/components/schemas/MockSepaPaymentResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/Payout" + } } } }, "examples": { "response": { "value": { - "data": { - "trackingRef": "CIR13FB13A", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending" - } + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "sourceWalletId": "53535335", + "destination": { + "type": "wire", + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "name": "COMMERZBANK AG ****3000" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "status": "pending", + "trackingRef": "CIR-6ESOQANEP3NAO", + "errorCode": "insufficient_funds", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "adjustments": { + "fxCredit": { + "amount": "3.14", + "currency": "USD" + }, + "fxDebit": { + "amount": "3.14", + "currency": "USD" + } + }, + "return": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "reason": "payout_returned", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ] } } } } } }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, "401": { "$ref": "#/components/responses/NotAuthorized" } } - } - }, - "/v1/wallets/{walletId}/addresses": { + }, "post": { - "parameters": [ - { - "$ref": "#/components/parameters/WalletId" - } - ], "security": [ { "bearerAuth": [] } ], - "summary": "Create a blockchain address", - "description": "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.\n", - "operationId": "generateAddress", + "summary": "Create a payout", + "operationId": "createPayout", "tags": [ - "On-chain payments" + "Payouts" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GenerateAddressRequest" + "$ref": "#/components/schemas/PayoutCreationRequest" } } } }, "responses": { "201": { - "description": "Successfully generated a new address.", + "description": "Successfully created a payout.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -5038,10 +4875,10 @@ "content": { "application/json": { "schema": { - "title": "GenerateAddressResponse", + "title": "CreatePayoutResponse", "properties": { "data": { - "$ref": "#/components/schemas/AddressObject" + "$ref": "#/components/schemas/Payout" } } }, @@ -5049,94 +4886,59 @@ "response": { "value": { "data": { - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "currency": "USD", - "chain": "ALGO" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - } - } - }, - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/WalletId" - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all addresses", - "description": "Retrieves a list of addresses associated with a wallet.", - "operationId": "getAddresses", - "tags": [ - "On-chain payments" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of addresses.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetAddressesResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressObject" + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "sourceWalletId": "53535335", + "destination": { + "type": "wire", + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "name": "COMMERZBANK AG ****3000" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "status": "pending", + "trackingRef": "CIR-6ESOQANEP3NAO", + "errorCode": "insufficient_funds", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "adjustments": { + "fxCredit": { + "amount": "3.14", + "currency": "USD" + }, + "fxDebit": { + "amount": "3.14", + "currency": "USD" + } + }, + "return": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "reason": "payout_returned", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" } } } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "currency": "USD", - "chain": "ALGO" - } - ] - } - } } } } @@ -5144,36 +4946,32 @@ "400": { "$ref": "#/components/responses/BadRequest" }, - "404": { - "$ref": "#/components/responses/NotFound" + "401": { + "$ref": "#/components/responses/NotAuthorized" } } } }, - "/v1/cards": { - "post": { + "/v1/payouts/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], "security": [ { "bearerAuth": [] } ], - "summary": "Create a card", - "operationId": "createCard", + "summary": "Get a payout", + "operationId": "getPayout", "tags": [ - "Cards" + "Payouts" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CardCreationRequest" - } - } - } - }, "responses": { - "201": { - "description": "Successfully created a card.", + "200": { + "description": "Successfully retrieved a payout.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -5182,10 +4980,10 @@ "content": { "application/json": { "schema": { - "title": "CreateCardResponse", + "title": "GetPayoutResponse", "properties": { "data": { - "$ref": "#/components/schemas/Card" + "$ref": "#/components/schemas/DetailedPayout" } } }, @@ -5194,36 +4992,53 @@ "value": { "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" + "sourceWalletId": "53535335", + "destination": { + "type": "wire", + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "name": "COMMERZBANK AG ****3000" }, - "expMonth": 1, - "expYear": 2020, - "network": "VISA", - "last4": "0123", - "bin": "401230", - "issuerCountry": "US", - "fundingType": "credit", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "errorCode": "verification_failed", - "verification": { - "avs": "D", - "cvv": "not_requested" + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" }, + "status": "pending", + "trackingRef": "CIR-6ESOQANEP3NAO", + "externalRef": "YYYYMMDDXXXXXXXX012345", + "errorCode": "insufficient_funds", "riskEvaluation": { "decision": "approved", "reason": "3000" }, - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" + "adjustments": { + "fxCredit": { + "amount": "3.14", + "currency": "USD" + }, + "fxDebit": { + "amount": "3.14", + "currency": "USD" + } + }, + "return": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "reason": "payout_returned", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" }, "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" @@ -5234,26 +5049,29 @@ } } }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, "401": { "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } - }, + } + }, + "/v1/returns": { "get": { "security": [ { "bearerAuth": [] } ], - "summary": "List all cards", - "operationId": "getCards", - "tags": [ - "Cards" - ], "parameters": [ + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, { "$ref": "#/components/parameters/PageBefore" }, @@ -5264,9 +5082,15 @@ "$ref": "#/components/parameters/PageSize" } ], + "summary": "List all payout returns", + "description": "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.", + "operationId": "getReturns", + "tags": [ + "Returns" + ], "responses": { "200": { - "description": "Successfully retrieved a list of cards.", + "description": "Successfully retrieved a list of payout returns.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -5275,12 +5099,12 @@ "content": { "application/json": { "schema": { - "title": "GetCardsResponse", + "title": "GetReturnsResponse", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/SimpleCard" + "$ref": "#/components/schemas/UnwithdrawalObject" } } } @@ -5291,25 +5115,17 @@ "data": [ { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "billingDetails": { - "country": "US", - "district": "MA" - }, - "expMonth": 1, - "expYear": 2020, - "network": "VISA", - "bin": "401230", - "issuerCountry": "US", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "verification": { - "avs": "D", - "cvv": "not_requested" + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { + "amount": "3.14", + "currency": "USD" }, - "riskEvaluation": { - "decision": "approved", - "reason": "3000" + "fees": { + "amount": "3.14", + "currency": "USD" }, + "reason": "payout_returned", + "status": "pending", "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" } @@ -5320,32 +5136,47 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/NotAuthorized" } } } }, - "/v1/cards/{id}": { + "/v1/settlements": { "get": { - "parameters": [ + "security": [ { - "$ref": "#/components/parameters/IdPath" + "bearerAuth": [] } ], - "security": [ + "parameters": [ { - "bearerAuth": [] + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" } ], - "summary": "Get a card", - "operationId": "getCard", + "summary": "List all settlements", + "operationId": "getSettlements", "tags": [ - "Cards" + "Settlements" ], "responses": { "200": { - "description": "Successfully retrieved a card.", + "description": "Successfully retrieved a list of settlements.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -5353,68 +5184,59 @@ }, "content": { "application/json": { - "schema": { - "title": "GetCardResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Card" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "expMonth": 1, - "expYear": 2020, - "network": "VISA", - "last4": "0123", - "bin": "401230", - "issuerCountry": "US", - "fundingType": "credit", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "errorCode": "verification_failed", - "verification": { - "avs": "D", - "cvv": "not_requested" - }, - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" + "schema": { + "title": "GetSettlementsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Settlement" } } } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "merchantWalletId": "212000", + "walletId": "12345", + "totalDebits": { + "amount": "3.14", + "currency": "USD" + }, + "totalCredits": { + "amount": "3.14", + "currency": "USD" + }, + "paymentFees": { + "amount": "3.14", + "currency": "USD" + }, + "chargebackFees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } } } } }, "401": { "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" } } - }, - "put": { + } + }, + "/v1/settlements/{id}": { + "get": { "parameters": [ { "$ref": "#/components/parameters/IdPath" @@ -5425,23 +5247,14 @@ "bearerAuth": [] } ], - "summary": "Update a card", - "operationId": "UpdateCard", + "summary": "Get a settlement", + "operationId": "getSettlement", "tags": [ - "Cards" + "Settlements" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CardUpdate" - } - } - } - }, "responses": { "200": { - "description": "Succesfully modified a card.", + "description": "Successfully retrieved a settlement.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -5450,10 +5263,10 @@ "content": { "application/json": { "schema": { - "title": "UpdateCardResponse", + "title": "GetSettlementResponse", "properties": { "data": { - "$ref": "#/components/schemas/Card" + "$ref": "#/components/schemas/Settlement" } } }, @@ -5462,36 +5275,23 @@ "value": { "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" + "merchantWalletId": "212000", + "walletId": "12345", + "totalDebits": { + "amount": "3.14", + "currency": "USD" }, - "expMonth": 1, - "expYear": 2020, - "network": "VISA", - "last4": "0123", - "bin": "401230", - "issuerCountry": "US", - "fundingType": "credit", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "errorCode": "verification_failed", - "verification": { - "avs": "D", - "cvv": "not_requested" + "totalCredits": { + "amount": "3.14", + "currency": "USD" }, - "riskEvaluation": { - "decision": "approved", - "reason": "3000" + "paymentFees": { + "amount": "3.14", + "currency": "USD" }, - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" + "chargebackFees": { + "amount": "3.14", + "currency": "USD" }, "createDate": "2020-04-10T02:13:30.000Z", "updateDate": "2020-04-10T02:13:30.000Z" @@ -5501,31 +5301,52 @@ } } } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" } } } }, - "/v1/banks/wires/{id}/instructions": { + "/v1/chargebacks": { "get": { - "parameters": [ + "security": [ { - "$ref": "#/components/parameters/IdPath" + "bearerAuth": [] } ], - "security": [ + "parameters": [ { - "bearerAuth": [] + "$ref": "#/components/parameters/PaymentId" + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" } ], - "summary": "Get Wire instructions", - "description": "Get the wire transfer instructions into the Circle bank account given your bank account id", - "operationId": "getWireInstructionsBankAccount", + "summary": "List all chargebacks", + "description": "Retrieve list of chargebacks. Results will be sorted by create date descending: more recent chargebacks will be at the beginning of the list.\n", + "operationId": "getChargebacks", "tags": [ - "Wires" + "Chargebacks" ], "responses": { "200": { - "description": "Successfully retrieved wire transfer instructions for the bank account.", + "description": "Successfully retrieved a list of chargebacks.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -5534,51 +5355,60 @@ "content": { "application/json": { "schema": { - "title": "GetWireInstructionsBankAccountResponse", + "title": "GetChargebacksResponse", "properties": { "data": { - "$ref": "#/components/schemas/WireInstruction" + "type": "array", + "items": { + "$ref": "#/components/schemas/BasicChargeback" + } } } }, "examples": { "response": { "value": { - "data": { - "trackingRef": "CIR13FB13A", - "beneficiary": { - "name": "CIRCLE INTERNET FINANCIAL INC", - "address1": "99 HIGH STREET", - "address2": "BOSTON MA 02110" - }, - "beneficiaryBank": { - "name": "SILVERGATE BANK", - "swiftCode": "SIVGUS66XXX", - "routingNumber": "322286803", - "accountNumber": "****7427", - "currency": "USD", - "address": "4250 EXECUTIVE SQUARE SUITE 300", - "city": "LA JOLLA", - "postalCode": "02110", - "country": "US" + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "paymentId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "reasonCode": "10.4", + "category": "Canceled Recurring Payment", + "history": [ + { + "type": "1st Chargeback", + "chargebackAmount": { + "amount": "3.14", + "currency": "USD" + }, + "fee": { + "amount": "3.14", + "currency": "USD" + }, + "description": "The cardholder claims an unauthorized transaction occurred.", + "settlementId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "createDate": "2020-04-10T02:13:30.000Z" + } + ] } - } + ] } } } } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" } } } }, - "/v1/banks/sepa/{id}/instructions": { + "/v1/chargebacks/{id}": { "get": { "parameters": [ { @@ -5590,15 +5420,14 @@ "bearerAuth": [] } ], - "summary": "Get SEPA instructions (BETA)", - "description": "Get the SEPA transfer instructions into the Circle bank account given your bank account id (BETA).", - "operationId": "getSEPAInstructionsBankAccount", + "summary": "Get a chargeback", + "operationId": "getChargeback", "tags": [ - "SEPA" + "Chargebacks" ], "responses": { "200": { - "description": "Successfully retrieved SEPA transfer instructions for the bank account.", + "description": "Successfully retrieved a chargeback.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -5607,10 +5436,10 @@ "content": { "application/json": { "schema": { - "title": "GetSEPAInstructionsBankAccountResponse", + "title": "GetChargebackResponse", "properties": { "data": { - "$ref": "#/components/schemas/SEPAInstruction" + "$ref": "#/components/schemas/BasicChargeback" } } }, @@ -5618,21 +5447,27 @@ "response": { "value": { "data": { - "trackingRef": "CIR13FB13A", - "beneficiary": { - "name": "CIRCLE INTERNET FINANCIAL INC", - "address1": "99 HIGH STREET", - "address2": "BOSTON MA 02110" - }, - "beneficiaryBank": { - "name": "LHV Bank", - "bic": "LHVBEE22XXX", - "iban": "****6789", - "address": "Tartu mnt 2, 10145 Tallinn", - "city": "Tallinn", - "postalCode": "10017", - "country": "EE" - } + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "paymentId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "reasonCode": "10.4", + "category": "Canceled Recurring Payment", + "history": [ + { + "type": "1st Chargeback", + "chargebackAmount": { + "amount": "3.14", + "currency": "USD" + }, + "fee": { + "amount": "3.14", + "currency": "USD" + }, + "description": "The cardholder claims an unauthorized transaction occurred.", + "settlementId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "createDate": "2020-04-10T02:13:30.000Z" + } + ] } } } @@ -5649,7 +5484,7 @@ } } }, - "/v1/settlements": { + "/v1/reversals": { "get": { "security": [ { @@ -5657,6 +5492,9 @@ } ], "parameters": [ + { + "$ref": "#/components/parameters/PaymentStatus" + }, { "$ref": "#/components/parameters/From" }, @@ -5673,14 +5511,15 @@ "$ref": "#/components/parameters/PageSize" } ], - "summary": "List all settlements", - "operationId": "getSettlements", + "summary": "List all ACH payment reversals.", + "description": "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", + "operationId": "getReversals", "tags": [ - "Settlements" + "Reversals" ], "responses": { "200": { - "description": "Successfully retrieved a list of settlements.", + "description": "Successfully retrieved a list of ACH payment reversals.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -5689,12 +5528,12 @@ "content": { "application/json": { "schema": { - "title": "GetSettlementsResponse", + "title": "GetReversalsResponse", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Settlement" + "$ref": "#/components/schemas/Reversal" } } } @@ -5704,22 +5543,16 @@ "value": { "data": [ { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "merchantWalletId": "212000", - "walletId": "12345", - "totalDebits": { - "amount": "3.14", - "currency": "USD" - }, - "totalCredits": { - "amount": "3.14", - "currency": "USD" - }, - "paymentFees": { + "id": "key1", + "paymentId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "amount": { "amount": "3.14", "currency": "USD" }, - "chargebackFees": { + "description": "Merchant Payment Reversal", + "status": "pending", + "reason": "duplicate", + "fees": { "amount": "3.14", "currency": "USD" }, @@ -5733,44 +5566,52 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/NotAuthorized" } } } }, - "/v1/settlements/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], + "/v1/wallets": { + "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Get a settlement", - "operationId": "getSettlement", + "summary": "Create a wallet", + "description": "Creates an end user wallet.", + "operationId": "createWallet", "tags": [ - "Settlements" + "Wallets" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WalletCreationRequest" + } + } + } + }, "responses": { - "200": { - "description": "Successfully retrieved a settlement.", + "201": { "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, + "description": "Successfully created a wallet.", "content": { "application/json": { "schema": { - "title": "GetSettlementResponse", + "title": "CreateWalletResponse", "properties": { "data": { - "$ref": "#/components/schemas/Settlement" + "$ref": "#/components/schemas/Wallet" } } }, @@ -5778,44 +5619,25 @@ "response": { "value": { "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "merchantWalletId": "212000", - "walletId": "12345", - "totalDebits": { - "amount": "3.14", - "currency": "USD" - }, - "totalCredits": { - "amount": "3.14", - "currency": "USD" - }, - "paymentFees": { - "amount": "3.14", - "currency": "USD" - }, - "chargebackFees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" + "walletId": "434000", + "entityId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "type": "end_user_wallet", + "description": "Treasury Wallet", + "balances": [ + { + "amount": "3.14", + "currency": "USD" + } + ] } } } } } } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" } } - } - }, - "/v1/chargebacks": { + }, "get": { "security": [ { @@ -5823,9 +5645,6 @@ } ], "parameters": [ - { - "$ref": "#/components/parameters/PaymentId" - }, { "$ref": "#/components/parameters/From" }, @@ -5842,15 +5661,15 @@ "$ref": "#/components/parameters/PageSize" } ], - "summary": "List all chargebacks", - "description": "Retrieve list of chargebacks. Results will be sorted by create date descending: more recent chargebacks will be at the beginning of the list.\n", - "operationId": "getChargebacks", + "summary": "List all wallets", + "description": "Retrieves a list of a user's wallets.", + "operationId": "getWallets", "tags": [ - "Chargebacks" + "Wallets" ], "responses": { "200": { - "description": "Successfully retrieved a list of chargebacks.", + "description": "Successfully retrieved a list of wallets.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -5859,12 +5678,12 @@ "content": { "application/json": { "schema": { - "title": "GetChargebacksResponse", + "title": "GetWalletsResponse", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BasicChargeback" + "$ref": "#/components/schemas/Wallet" } } } @@ -5874,25 +5693,14 @@ "value": { "data": [ { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "paymentId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "reasonCode": "10.4", - "category": "Canceled Recurring Payment", - "history": [ + "walletId": "434000", + "entityId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "type": "end_user_wallet", + "description": "Treasury Wallet", + "balances": [ { - "type": "1st Chargeback", - "chargebackAmount": { - "amount": "3.14", - "currency": "USD" - }, - "fee": { - "amount": "3.14", - "currency": "USD" - }, - "description": "The cardholder claims an unauthorized transaction occurred.", - "settlementId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "createDate": "2020-04-10T02:13:30.000Z" + "amount": "3.14", + "currency": "USD" } ] } @@ -5905,18 +5713,15 @@ }, "400": { "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" } } } }, - "/v1/chargebacks/{id}": { + "/v1/wallets/{walletId}": { "get": { "parameters": [ { - "$ref": "#/components/parameters/IdPath" + "$ref": "#/components/parameters/WalletId" } ], "security": [ @@ -5924,14 +5729,14 @@ "bearerAuth": [] } ], - "summary": "Get a chargeback", - "operationId": "getChargeback", + "summary": "Get a wallet", + "operationId": "getWallet", "tags": [ - "Chargebacks" + "Wallets" ], "responses": { "200": { - "description": "Successfully retrieved a chargeback.", + "description": "Successfully retrieved a wallet.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -5940,10 +5745,10 @@ "content": { "application/json": { "schema": { - "title": "GetChargebackResponse", + "title": "GetWalletResponse", "properties": { "data": { - "$ref": "#/components/schemas/BasicChargeback" + "$ref": "#/components/schemas/Wallet" } } }, @@ -5951,25 +5756,14 @@ "response": { "value": { "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "paymentId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "reasonCode": "10.4", - "category": "Canceled Recurring Payment", - "history": [ + "walletId": "434000", + "entityId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "type": "end_user_wallet", + "description": "Treasury Wallet", + "balances": [ { - "type": "1st Chargeback", - "chargebackAmount": { - "amount": "3.14", - "currency": "USD" - }, - "fee": { - "amount": "3.14", - "currency": "USD" - }, - "description": "The cardholder claims an unauthorized transaction occurred.", - "settlementId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "createDate": "2020-04-10T02:13:30.000Z" + "amount": "3.14", + "currency": "USD" } ] } @@ -5979,40 +5773,42 @@ } } }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, "404": { "$ref": "#/components/responses/NotFound" } } } }, - "/v1/mocks/cards/chargebacks": { + "/v1/wallets/{walletId}/addresses": { "post": { + "parameters": [ + { + "$ref": "#/components/parameters/WalletId" + } + ], "security": [ { "bearerAuth": [] } ], - "summary": "Create a mock chargeback", - "description": "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.", - "operationId": "createMockChargeback", + "summary": "Create a blockchain address", + "description": "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.\n", + "operationId": "generateAddress", "tags": [ - "Chargebacks" + "Wallets" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MockChargebackCreationRequest" + "$ref": "#/components/schemas/GenerateAddressRequest" } } } }, "responses": { "201": { - "description": "Successfully created a mock chargeback.", + "description": "Successfully generated a new address.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -6021,17 +5817,22 @@ "content": { "application/json": { "schema": { - "title": "CreateMockChargebackResponse", + "title": "GenerateAddressResponse", "properties": { "data": { - "$ref": "#/components/schemas/MockChargeback" + "$ref": "#/components/schemas/AddressObject" } } }, "examples": { "response": { "value": { - "data": {} + "data": { + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "currency": "USD", + "chain": "ALGO" + } } } } @@ -6041,9 +5842,6 @@ "400": { "$ref": "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, "404": { "$ref": "#/components/responses/NotFound" }, @@ -6051,9 +5849,7 @@ "$ref": "#/components/responses/Conflict" } } - } - }, - "/v1/reversals": { + }, "get": { "security": [ { @@ -6062,7 +5858,7 @@ ], "parameters": [ { - "$ref": "#/components/parameters/PaymentStatus" + "$ref": "#/components/parameters/WalletId" }, { "$ref": "#/components/parameters/From" @@ -6080,15 +5876,15 @@ "$ref": "#/components/parameters/PageSize" } ], - "summary": "List all ACH payment reversals.", - "description": "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", - "operationId": "getReversals", + "summary": "List all addresses", + "description": "Retrieves a list of addresses associated with a wallet.", + "operationId": "getAddresses", "tags": [ - "Reversals" + "Wallets" ], "responses": { "200": { - "description": "Successfully retrieved a list of ACH payment reversals.", + "description": "Successfully retrieved a list of addresses.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -6097,12 +5893,12 @@ "content": { "application/json": { "schema": { - "title": "GetReversalsResponse", + "title": "GetAddressesResponse", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Reversal" + "$ref": "#/components/schemas/AddressObject" } } } @@ -6112,21 +5908,10 @@ "value": { "data": [ { - "id": "key1", - "paymentId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Merchant Payment Reversal", - "status": "pending", - "reason": "duplicate", - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "currency": "USD", + "chain": "ALGO" } ] } @@ -6138,40 +5923,49 @@ "400": { "$ref": "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/NotAuthorized" + "404": { + "$ref": "#/components/responses/NotFound" } } } }, - "/v1/balances": { - "get": { + "/v1/businessAccount/transfers": { + "post": { "security": [ { "bearerAuth": [] } ], - "summary": "List all balances", - "description": "Retrieves the balance of merchant funds that have settled and also of funds that have been sent for processing but have not yet settled.", - "operationId": "getBalances", + "summary": "Create a transfer", + "description": "A transfer can be made from an existing business account to a blockchain location.", + "operationId": "createBusinessAccountTransfer", "tags": [ - "Balances" + "Transfers" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BusinessAccountTransferCreationRequest" + } + } + } + }, "responses": { - "200": { - "description": "Successfully retrieved balances.", + "201": { "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, + "description": "Successfully created a transfer.", "content": { "application/json": { "schema": { - "title": "GetBalancesResponse", + "title": "CreateBusinessAccountTransferResponse", "properties": { "data": { - "$ref": "#/components/schemas/Balances" + "$ref": "#/components/schemas/Transfer" } } }, @@ -6179,88 +5973,200 @@ "response": { "value": { "data": { - "available": [ + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": [ { - "amount": "3.14", - "currency": "USD" + "amount": "10.00", + "currency": "USD", + "type": "network" } ], - "unsettled": [ - { - "amount": "3.14", - "currency": "USD" - } - ] + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "errorCode": "transfer_failed", + "createDate": "2020-04-10T02:13:30.000Z" } } } } } } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" } } - } - }, - "/ping": { + }, "get": { - "summary": "Ping", - "description": "Checks that the service is running.", - "operationId": "rootPing", + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all transfers", + "description": "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.", + "operationId": "searchBusinessAccountTransfers", "tags": [ - "Health" + "Transfers" ], "responses": { "200": { - "description": "Successful ping.", + "description": "Successfully retrieved a list of transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Ping" + "title": "SearchBusinessAccountTransfersResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" + } + } + } }, "examples": { "response": { "value": { - "message": "pong" + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": [ + { + "amount": "10.00", + "currency": "USD", + "type": "network" + } + ], + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "errorCode": "transfer_failed", + "createDate": "2020-04-10T02:13:30.000Z" + } + ] } } } } } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" } } } }, - "/v1/configuration": { + "/v1/businessAccount/transfers/{id}": { "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], "security": [ { "bearerAuth": [] } ], - "summary": "Get configuration info", - "description": "Retrieves general configuration information.", - "operationId": "getConfig", + "summary": "Get a transfer", + "operationId": "getBusinessAccountTransfer", "tags": [ - "Management" + "Transfers" ], "responses": { "200": { - "description": "Successfully retrieved configuration information.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, + "description": "Successfully retrieved a transfer.", "content": { "application/json": { "schema": { - "title": "GetConfigResponse", + "title": "GetBusinessAccountTransferResponse", "properties": { "data": { - "$ref": "#/components/schemas/AccountConfiguration" + "$ref": "#/components/schemas/Transfer" } } }, @@ -6268,9 +6174,48 @@ "response": { "value": { "data": { - "payments": { - "masterWalletId": "212000" - } + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": [ + { + "amount": "10.00", + "currency": "USD", + "type": "network" + } + ], + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "errorCode": "transfer_failed", + "createDate": "2020-04-10T02:13:30.000Z" } } } @@ -6281,34 +6226,97 @@ } } }, - "/v1/encryption/public": { - "get": { + "/v1/transfers": { + "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Get public key", - "description": "Retrieves an RSA public key to be used in encrypting data sent to the API. Your public keys change infrequently, so we encourage you to cache this response value locally for a duration of 24 hours or more.", - "operationId": "getPublicKey", + "summary": "Create a transfer", + "description": "A transfer can be made from an existing funded wallet to a blockchain address or another wallet.", + "operationId": "createTransfer", "tags": [ - "Encryption" + "Transfers" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransferCreationRequest" + }, + "examples": { + "request": { + "value": { + "idempotencyKey": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "source": { + "type": "wallet", + "id": "12345" + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "chain": "ETH" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + } + } + }, + "travel rule": { + "value": { + "idempotencyKey": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "chain": "ETH" + }, + "amount": { + "amount": "3000.00", + "currency": "USD" + } + } + } + } + } + } + }, "responses": { - "200": { - "description": "Successfully retrieved the RSA public key.", + "201": { "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, + "description": "Successfully created a transfer.", "content": { "application/json": { "schema": { - "title": "GetPublicKeyResponse", + "title": "CreateTransferResponse", "properties": { "data": { - "$ref": "#/components/schemas/PublicKey" + "$ref": "#/components/schemas/Transfer" } } }, @@ -6316,8 +6324,62 @@ "response": { "value": { "data": { - "keyId": "key1", - "publicKey": "LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEJDUEcgdjEuNTQKCm1RRU5CRjAxdmk0QkNBQ3JzMDNLS1Y0Qk9SRkYyT0Z4bUdvb0UyaTZMbnNneE5UL1dsV2s1ZTl2RDd2NENkSm0KcGJJbENmZ0U4WFlnYmhKUTE4YStaTzlPM0RFYUp2dGhJSEtjL0l1UEIvZmdEYUJUT285NkJzL2pVRFp6ZGxaVApQazNFUjliNFZPeGVwMFNPSHFMcmxTVFY4ZXB3M1R3SEdaL3NpSWdBYXEwRGdJdlZxUTY4TGVaMnorUFJWZm04CmhhSnJpb05SRU5Ja2ZNTWY5aFdySlowSW1zUk1aVmpDMVVrd2FSSHdrTTMwQUlia1dYcFJ5R205SXhQaXdGa08Kb1RnWlpwUFpsdVczckdkWER0NHZqL24za09hczV1dFdoNFovMlhjWHBiSUUyU0FPK0hycUdIclRnK1ZmZ05JNwpZcVZqYW5MOEN1bm83UkxmcDhKZlZDNXBLUm5ySVNCTnphN1ZBQkVCQUFHMEJrTnBjbU5zWllrQkhBUVFBUWtBCkJnVUNYVFcrTGdBS0NSQ3EzaHNwWjBMeGEwdnpCLzQvQTJpdk1CWW1aZXV2bEJZMm5ZZnNXek9Sb28vU3BIYkQKY2Y0UmtxZzZ0RERJSkUzNHhDVit0MzJydmJkM0ZOdVZseWs1MDVZRkpESnI4cVc2S0tkQVRXdU16eW5mMVVoUAo1M25hTlc0cXdrdSt3b0RWWjJpci9lUVI1WUc4L0RGcnd3bXdaa0dRd0Ftc3h5ZHd5anBnLzBrQ3lpZHkxdVBkCmVVWGgwdWt4dS9Dais4UFl5cHcwdit5V2tzbjdSZ2dVbkJFMWhiQ2pEV3FweHZjMEpDNVAxdmx6L2xRcWQrR3oKRC9Td1FJTVdRVElnV3BHRVVvQTRDc3drbU5PdHhsRVF1U0tueXNtTG02S0ExUmRhTzd6V2IrdWNLN21FZ2VoSwpXU2hHZExqRVNNZlVRUTczemNqMXg2amxLUFNhRlJyLzhXcHhrVXYzVHYvQzZMb0JpejRLCj1WSWg3Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K" + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345" + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "chain": "ETH" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + } + } + }, + "travel rule": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "chain": "ETH" + }, + "amount": { + "amount": "3000.00", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" } } } @@ -6326,34 +6388,86 @@ } } } - } - }, - "/v1/notifications/subscriptions": { + }, "get": { "security": [ { "bearerAuth": [] } ], - "summary": "List all notification subscriptions", - "description": "Retrieve a list of existing notification subscriptions with details.", - "parameters": [], - "operationId": "listSubscriptions", + "parameters": [ + { + "name": "walletId", + "description": "Unique identifier for the source or destination wallet of transfers, if any. May not be used in conjunction with destinationWalletId or sourceWalletId. Useful for fetching all transfers related to a wallet.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "example": "12345" + } + }, + { + "name": "sourceWalletId", + "description": "Unique identifier for the source wallet of transfers, if any.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "example": "12345" + } + }, + { + "name": "destinationWalletId", + "description": "Unique identifier for the destination wallet of transfers, if any.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "example": "12345" + } + }, + { + "$ref": "#/components/parameters/ReturnIdentities" + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all transfers", + "description": "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.", + "operationId": "searchTransfers", "tags": [ - "Subscriptions" + "Transfers" ], "responses": { "200": { - "description": "Successfully retrieved a list of notification subscriptions.", + "description": "Successfully retrieved a list of transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, "content": { "application/json": { "schema": { - "title": "GetListSubscriptionsResponse", + "title": "SearchTransfersResponse", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/SubscriptionResponse" + "$ref": "#/components/schemas/Transfer" } } } @@ -6364,13 +6478,65 @@ "data": [ { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "endpoint": "https://example.org/handler/for/notifications", - "subscriptionDetails": [ - { - "url": "arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17", - "status": "confirmed" - } - ] + "source": { + "type": "wallet", + "id": "12345" + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + } + ] + } + }, + "travel rule": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO" + }, + "amount": { + "amount": "3000.00", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" } ] } @@ -6383,38 +6549,43 @@ "$ref": "#/components/responses/NotAuthorized" } } - }, - "post": { + } + }, + "/v1/transfers/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + }, + { + "$ref": "#/components/parameters/ReturnIdentities" + } + ], "security": [ { "bearerAuth": [] } ], - "summary": "Create a notification subscription", - "description": "Subscribe to receiving notifications at a given endpoint. The endpoint should be able to handle AWS SNS subscription requests. For more details see https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/sns-send-http.html. Note, the sandbox environment allows a maximum of 3 active subscriptions; otherwise, this is limited to 1 active subscription and subsequent create requests will be rejected with a Limit Exceeded error.\n", - "operationId": "subscribe", + "summary": "Get a transfer", + "operationId": "getTransfer", "tags": [ - "Subscriptions" + "Transfers" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionRequest" - } - } - } - }, "responses": { "200": { - "description": "Successfully created a notification subscription.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Successfully retrieved a transfer.", "content": { "application/json": { "schema": { - "title": "SubscribeResponse", + "title": "GetTransferResponse", "properties": { "data": { - "$ref": "#/components/schemas/SubscriptionResponse" + "$ref": "#/components/schemas/TransferDetailedTransfer" } } }, @@ -6423,65 +6594,108 @@ "value": { "data": { "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "endpoint": "https://example.org/handler/for/notifications", - "subscriptionDetails": [ - { - "url": "arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17", - "status": "confirmed" - } - ] + "source": { + "type": "wallet", + "id": "12345" + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "chain": "ETH" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + } + } + }, + "travel rule": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "chain": "ETH" + }, + "amount": { + "amount": "3000.00", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" } } } } } } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "429": { - "$ref": "#/components/responses/LimitExceeded" } } } }, - "/v1/notifications/subscriptions/{id}": { - "delete": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], + "/v1/mocks/cards/chargebacks": { + "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Remove a notification subscription", - "description": "To remove a subscription, all its subscription requests' statuses must be either 'confirmed', 'deleted' or a combination of those. A subscription with at least one 'pending' subscription request cannot be removed.", - "operationId": "unsubscribe", + "summary": "Create a mock chargeback", + "description": "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.", + "operationId": "createMockChargeback", "tags": [ - "Subscriptions" + "Chargebacks" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MockChargebackCreationRequest" + } + } + } + }, "responses": { - "200": { + "201": { + "description": "Successfully created a mock chargeback.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, - "description": "Successfully removed a subscription.", "content": { "application/json": { "schema": { - "title": "DeleteUnsubscribeResponse", + "title": "CreateMockChargebackResponse", "properties": { "data": { - "$ref": "#/components/schemas/UnsubscribeResponse" + "$ref": "#/components/schemas/MockChargeback" } } }, @@ -6503,149 +6717,119 @@ }, "404": { "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" } } } }, - "/v1/channels": { - "get": { + "/v1/mocks/payments/sen": { + "post": { "security": [ { "bearerAuth": [] } ], - "summary": "List all channels", - "description": "Retrieve a list of channels with details (e.g. `cardDescriptor`, `achDescriptor`, etc.).", - "parameters": [], - "operationId": "listChannels", + "summary": "Create a mock Silvergate SEN payment", + "description": "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.", + "operationId": "createMockSenPayment", "tags": [ - "Channels" + "Deposits" ], - "responses": { - "200": { - "description": "Successfully retrieved a list of channels.", - "content": { - "application/json": { - "schema": { - "title": "ListChannelsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChannelResponse" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "default": true, - "cardDescriptor": "CIRCLE LLC.", - "achDescriptor": "CIRCLE LLC." - } - ] - } - } - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MockSenPaymentRequest" } } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" } - } - } - }, - "/v1/stablecoins": { - "get": { - "summary": "List all stablecoins", - "description": "Retrieves total circulating supply for supported stablecoins across all chains. This endpoint is rate limited to one call per minute (based on IP).", - "operationId": "getStablecoins", - "tags": [ - "Stablecoins" - ], + }, "responses": { - "200": { - "description": "Successfully retrieved all stablecoin supplies across all chains.", + "201": { + "description": "Successfully created a mock SEN transfer.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, "content": { "application/json": { "schema": { - "title": "GetStablecoinsResponse", + "title": "CreateSenPaymentResponse", "properties": { "data": { - "$ref": "#/components/schemas/Stablecoins" + "$ref": "#/components/schemas/MockSenPaymentResponse" } } }, "examples": { "response": { "value": { - "data": [ - { - "name": "USD Coin", - "symbol": "USDC", - "totalAmount": "132.584192", - "chains": [ - { - "amount": "132.584192", - "chain": "ALGO" - } - ] - } - ] + "data": { + "trackingRef": "CIR13FB13A", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "beneficiaryBank": { + "accountNumber": "11111111" + }, + "status": "pending" + } } } } } } }, - "429": { - "$ref": "#/components/responses/LimitExceeded" + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" } } } }, - "/v1/wallets": { + "/v1/mocks/ach/accounts": { "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Create a wallet", - "description": "Creates an end user wallet.", - "operationId": "createWallet", + "summary": "Create a mock ACH bank account", + "description": "In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account.", + "operationId": "createMockACHBankAccount", "tags": [ - "Wallets" + "ACH" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WalletCreationRequest" + "$ref": "#/components/schemas/MockAchAccountCreationRequest" } } } }, "responses": { "201": { + "description": "Successfully created a mock ach payment.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, - "description": "Successfully created a wallet.", "content": { "application/json": { "schema": { - "title": "CreateWalletResponse", + "title": "CreateAchAccountResponse", "properties": { "data": { - "$ref": "#/components/schemas/Wallet" + "$ref": "#/components/schemas/MockAchAccountResponse" } } }, @@ -6653,57 +6837,57 @@ "response": { "value": { "data": { - "walletId": "434000", - "entityId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "type": "end_user_wallet", - "description": "Treasury Wallet", - "balances": [ - { - "amount": "3.14", - "currency": "USD" - } - ] + "processorToken": "processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621", + "balance": { + "amount": "3.14", + "currency": "USD" + }, + "account": { + "accountNumber": "123456789", + "routingNumber": "011000028", + "description": "My ACH account" + } } } } } } } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" } } - }, - "get": { + } + }, + "/v1/mocks/payments/wire": { + "post": { "security": [ { "bearerAuth": [] } ], - "parameters": [ - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all wallets", - "description": "Retrieves a list of a user's wallets.", - "operationId": "getWallets", + "summary": "Create a mock Wire payment", + "description": "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.", + "operationId": "createMockWirePayment", "tags": [ - "Wallets" + "Payments" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MockWirePaymentRequest" + } + } + } + }, "responses": { - "200": { - "description": "Successfully retrieved a list of wallets.", + "201": { + "description": "Successfully created a mock wire payment.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -6712,33 +6896,27 @@ "content": { "application/json": { "schema": { - "title": "GetWalletsResponse", + "title": "CreateWirePaymentResponse", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Wallet" - } + "$ref": "#/components/schemas/MockWirePaymentResponse" } } }, "examples": { "response": { "value": { - "data": [ - { - "walletId": "434000", - "entityId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "type": "end_user_wallet", - "description": "Treasury Wallet", - "balances": [ - { - "amount": "3.14", - "currency": "USD" - } - ] - } - ] + "data": { + "trackingRef": "CIR13FB13A", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "beneficiaryBank": { + "accountNumber": "11111111" + }, + "status": "pending" + } } } } @@ -6747,30 +6925,45 @@ }, "400": { "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" } } } }, - "/v1/wallets/{walletId}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/WalletId" - } - ], + "/v1/mocks/payments/sepa": { + "post": { "security": [ { "bearerAuth": [] } ], - "summary": "Get a wallet", - "operationId": "getWallet", + "summary": "Create a mock SEPA payment", + "description": "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.", + "operationId": "createMockSepaPayment", "tags": [ - "Wallets" + "Payments" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MockSepaPaymentRequest" + }, + "example": { + "trackingRef": "CIR13FB13A", + "amount": { + "amount": 3.14, + "currency": "EUR" + } + } + } + } + }, "responses": { - "200": { - "description": "Successfully retrieved a wallet.", + "201": { + "description": "Successfully created a mock SEPA payment.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -6779,10 +6972,10 @@ "content": { "application/json": { "schema": { - "title": "GetWalletResponse", + "title": "CreateSepaPaymentResponse", "properties": { "data": { - "$ref": "#/components/schemas/Wallet" + "$ref": "#/components/schemas/MockSepaPaymentResponse" } } }, @@ -6790,16 +6983,12 @@ "response": { "value": { "data": { - "walletId": "434000", - "entityId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "type": "end_user_wallet", - "description": "Treasury Wallet", - "balances": [ - { - "amount": "3.14", - "currency": "USD" - } - ] + "trackingRef": "CIR13FB13A", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "status": "pending" } } } @@ -6807,244 +6996,162 @@ } } }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - } - }, - "components": { - "securitySchemes": { - "bearerAuth": { - "type": "http", - "scheme": "bearer" - } - }, - "parameters": { - "From": { - "name": "from", - "description": "Queries items created since the specified date-time (inclusive).", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time", - "example": "2020-04-10T02:13:30.000Z" - } - }, - "To": { - "name": "to", - "description": "Queries items created before the specified date-time (inclusive).", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time", - "example": "2020-04-10T02:13:30.000Z" - } - }, - "PageBefore": { - "name": "pageBefore", - "description": "A collection ID value used for pagination.\n\nIt marks the exclusive end of a page. When provided, the collection resource will return the next `n` items before\nthe id, with `n` being specified by `pageSize`.\n\nThe items will be returned in the natural order of the collection.\n\nThe resource will return the first page if neither `pageAfter` nor `pageBefore` are specified.\n\nSHOULD NOT be used in conjuction with pageAfter.\n", - "in": "query", - "required": false, - "schema": { - "type": "string" + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } } - }, - "PageAfter": { - "name": "pageAfter", - "description": "A collection ID value used for pagination.\n\nIt marks the exclusive begin of a page. When provided, the collection resource will return the next `n` items after\nthe id, with `n` being specified by `pageSize`.\n\nThe items will be returned in the natural order of the collection.\n\nThe resource will return the first page if neither `pageAfter` nor `pageBefore` are specified.\n\nSHOULD NOT be used in conjuction with pageBefore.\n", - "in": "query", - "required": false, - "schema": { - "type": "string" + } + } + }, + "components": { + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Ping": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "example": "pong" + } } }, - "PageSize": { - "name": "pageSize", - "description": "Limits the number of items to be returned.\n\nSome collections have a strict upper bound that will disregard this value. In case the specified value is higher\nthan the allowed limit, the collection limit will be used.\n\nIf avoided, the collection will determine the page size itself.\n", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "example": 5 - } + "MerchantWalletId": { + "type": "string", + "description": "Unique system generated identifier for the wallet of the merchant.", + "maxLength": 36, + "example": "212000" }, - "IdPath": { - "name": "id", - "description": "Universally unique identifier (UUID v4) of a resource.", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "example": "b3d9d2d5-4c12-4946-a09d-953e82fae2b0" + "AccountConfiguration": { + "type": "object", + "properties": { + "payments": { + "title": "WalletConfig", + "type": "object", + "properties": { + "masterWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + } + } + } } }, - "Source": { - "name": "source", - "description": "Universally unique identifier (UUID v4) for the source. Filters results to fetch only payments made from the provdided source.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "example": "b3d9d2d5-4c12-4946-a09d-953e82fae2b0" - } + "IdKey": { + "type": "string", + "description": "Universally unique identifier (UUID v4) of the public key used in encryption. NOTE the sandbox environment uses the default value of `key1`. For this reason the example supplied is `key1` rather than a UUID.", + "format": "uuid", + "example": "key1" }, - "SettlementId": { - "name": "settlementId", - "description": "Queries items with the specified settlement id. Matches any settlement id if unspecified.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "example": "b48c8962-8e9f-40c3-9f1d-d9adde2ffe61" + "PublicKey": { + "type": "object", + "required": [ + "keyId", + "publicKey" + ], + "properties": { + "keyId": { + "$ref": "#/components/schemas/IdKey" + }, + "publicKey": { + "type": "string", + "description": "A PGP ascii-armor encoded public key.", + "example": "LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEJDUEcgdjEuNTQKCm1RRU5CRjAxdmk0QkNBQ3JzMDNLS1Y0Qk9SRkYyT0Z4bUdvb0UyaTZMbnNneE5UL1dsV2s1ZTl2RDd2NENkSm0KcGJJbENmZ0U4WFlnYmhKUTE4YStaTzlPM0RFYUp2dGhJSEtjL0l1UEIvZmdEYUJUT285NkJzL2pVRFp6ZGxaVApQazNFUjliNFZPeGVwMFNPSHFMcmxTVFY4ZXB3M1R3SEdaL3NpSWdBYXEwRGdJdlZxUTY4TGVaMnorUFJWZm04CmhhSnJpb05SRU5Ja2ZNTWY5aFdySlowSW1zUk1aVmpDMVVrd2FSSHdrTTMwQUlia1dYcFJ5R205SXhQaXdGa08Kb1RnWlpwUFpsdVczckdkWER0NHZqL24za09hczV1dFdoNFovMlhjWHBiSUUyU0FPK0hycUdIclRnK1ZmZ05JNwpZcVZqYW5MOEN1bm83UkxmcDhKZlZDNXBLUm5ySVNCTnphN1ZBQkVCQUFHMEJrTnBjbU5zWllrQkhBUVFBUWtBCkJnVUNYVFcrTGdBS0NSQ3EzaHNwWjBMeGEwdnpCLzQvQTJpdk1CWW1aZXV2bEJZMm5ZZnNXek9Sb28vU3BIYkQKY2Y0UmtxZzZ0RERJSkUzNHhDVit0MzJydmJkM0ZOdVZseWs1MDVZRkpESnI4cVc2S0tkQVRXdU16eW5mMVVoUAo1M25hTlc0cXdrdSt3b0RWWjJpci9lUVI1WUc4L0RGcnd3bXdaa0dRd0Ftc3h5ZHd5anBnLzBrQ3lpZHkxdVBkCmVVWGgwdWt4dS9Dais4UFl5cHcwdit5V2tzbjdSZ2dVbkJFMWhiQ2pEV3FweHZjMEpDNVAxdmx6L2xRcWQrR3oKRC9Td1FJTVdRVElnV3BHRVVvQTRDc3drbU5PdHhsRVF1U0tueXNtTG02S0ExUmRhTzd6V2IrdWNLN21FZ2VoSwpXU2hHZExqRVNNZlVRUTczemNqMXg2amxLUFNhRlJyLzhXcHhrVXYzVHYvQzZMb0JpejRLCj1WSWg3Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K" + } } }, - "PaymentIntentId": { - "name": "paymentIntentId", - "description": "Queries items with the specified payment intent id.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "example": "b48c8962-8e9f-40c3-9f1d-d9adde2ffe61" - } + "Id": { + "type": "string", + "description": "Unique system generated identifier for the entity.", + "format": "uuid", + "example": "b8627ae8-732b-4d25-b947-1df8f4007a29" }, - "PaymentSourceType": { - "name": "type", - "description": "Source account type. Filters the results to fetch all payments made from a specified account type. Matches any source type if unspecified.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { + "SubscriptionDetail": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Identifier for created subscription.", + "example": "arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17" + }, + "status": { "type": "string", + "description": "Status of the subscription request.", "enum": [ - "card", - "wire", - "ach", - "sepa" + "confirmed", + "pending", + "deleted" ] } } }, - "PaymentStatus": { - "name": "status", - "description": "Queries items with the specified status. Matches any status if unspecified.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "pending", - "confirmed", - "paid", - "failed", - "action_required" - ] - } - }, - "destination": { - "name": "destination", - "description": "Universally unique identifier (UUID v4) for the destination bank account. Filters the results to fetch all payouts made to a destination bank account.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "example": "e3d0a838-d732-49d0-bf44-73a668e38973" - } - }, - "Currency": { - "name": "currency", - "description": "Queries beneficiary bank account currency. Default is USD.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "USD", - "EUR" - ] - } - }, - "ReturnIdentities": { - "name": "returnIdentities", - "description": "Specify if you would like to see identities in the response. Restricts maximum returned items to 5. By default returnIdentities is false, resulting in the response not returning `data.source.identities`.", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "example": "true", - "default": false - } - }, - "WalletId": { - "name": "walletId", - "description": "Identifier for the wallet.", - "in": "path", - "required": true, - "schema": { - "type": "string", - "example": "0123456789" - } - }, - "PaymentId": { - "name": "paymentId", - "description": "The payment ID associated with the chargeback.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "example": "202ad9ce-974c-49ca-8d34-3afb7d7247ae" - } - } - }, - "headers": { - "XRequestId": { - "description": "Universally unique identifier (UUID v4) for the request. Helpful for identifying a request when communicating with Circle support.", - "schema": { - "type": "string", - "format": "uuid", - "example": "2adba88e-9d63-44bc-b975-9b6ae3440dde" + "SubscriptionResponse": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "endpoint": { + "type": "string", + "description": "URL of the endpoint.", + "example": "https://example.org/handler/for/notifications" + }, + "subscriptionDetails": { + "type": "array", + "description": "List of subscriptions details for created subscriptions.", + "items": { + "$ref": "#/components/schemas/SubscriptionDetail" + } + } } - } - }, - "schemas": { - "IdempotencyKey": { - "type": "string", - "description": "Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests.", - "format": "uuid", - "example": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7" }, - "CryptoPaymentsMoney": { + "SubscriptionRequest": { "type": "object", "required": [ - "amount", - "currency" + "endpoint" ], "properties": { - "amount": { - "description": "Magnitude of the amount, in units of the currency, with a `.`.", + "endpoint": { "type": "string", - "example": "3.14" + "description": "URL of the subscriber endpoint. Must be publicly accessible and utilize HTTPS.", + "example": "https://example.org/handler/for/notifications" + } + } + }, + "UnsubscribeResponse": { + "type": "object", + "description": "Unsubscribe response object. No fields as of now.", + "example": {} + }, + "ChannelResponse": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" }, - "currency": { - "description": "Currency code.", + "default": { + "type": "boolean", + "description": "Flag to indicate whether the channel is configured as default. At most one of the channels will have this flag set to true and the default channel is used when a payment request does not have the `channel` property set.", + "example": true + }, + "cardDescriptor": { "type": "string", - "enum": [ - "USD", - "ETH", - "BTC" - ] + "description": "Descriptor that appears on cardholders' bank statements for card payments submitted through this channel.", + "example": "CIRCLE LLC." + }, + "achDescriptor": { + "type": "string", + "description": "Descriptor that appears on end-users' bank statements for ACH payments submitted through this channel.", + "example": "CIRCLE LLC." } } }, @@ -7064,448 +7171,664 @@ "XLM" ] }, - "PaymentMethodBlockchain": { + "TokenAmount": { "type": "object", "required": [ - "type", + "amount", "chain" ], "properties": { - "type": { + "amount": { "type": "string", - "enum": [ - "blockchain" - ] + "description": "Magnitude of the amount, in units of the currency, with a `.`.", + "example": "132.584192" }, "chain": { "$ref": "#/components/schemas/Chain" + } + } + }, + "Stablecoin": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the stablecoin.", + "example": "USD Coin" }, - "address": { + "symbol": { "type": "string", - "readOnly": true, - "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" + "description": "Symbol of the stablecoin.", + "example": "USDC" + }, + "totalAmount": { + "type": "string", + "description": "Total circulating amount of the stablecoin.", + "example": "132.584192" + }, + "chains": { + "type": "array", + "description": "A list of the broken down totalAmount by chain of the stablecoin.", + "items": { + "$ref": "#/components/schemas/TokenAmount" + } } } }, - "PaymentIntentFees": { + "Stablecoins": { + "type": "array", + "description": "A list of stablecoin objects containing its name, symbol, total amount, and per-chain amount.", + "items": { + "$ref": "#/components/schemas/Stablecoin" + } + }, + "Money": { "type": "object", - "readOnly": true, "required": [ - "type", "amount", "currency" ], "properties": { - "type": { + "amount": { "type": "string", + "description": "Magnitude of the amount, in units of the currency, with a `.`.", + "example": "3.14" + }, + "currency": { + "type": "string", + "description": "Currency code for the amount.", "enum": [ - "blockchainLeaseFee", - "totalPaymentFees" + "USD", + "EUR", + "BTC", + "ETH" ] + } + } + }, + "Balances": { + "type": "object", + "description": "Available and unsettled balances of the merchant.", + "required": [ + "available", + "unsettled" + ], + "properties": { + "available": { + "type": "array", + "description": "List of currency balances (one for each currency) that are currently available to spend.", + "items": { + "$ref": "#/components/schemas/Money" + } }, - "amount": { - "description": "Magnitude of the amount, in units of the currency, with a `.`.", + "unsettled": { + "type": "array", + "description": "List of currency balances (one for each currency) that have been captured but are currently in the process of settling and will become available to spend at some point in the future.", + "items": { + "$ref": "#/components/schemas/Money" + } + } + } + }, + "ExternalFiatAccountStatus": { + "description": "Status of the account. A `pending` status indicates that the linking is in-progress; `complete` indicates the account was linked successfully; `failed` indicates it failed.", + "type": "string", + "enum": [ + "pending", + "complete", + "failed" + ] + }, + "SimpleBillingDetails": { + "type": "object", + "description": "Billing details of the card holder.", + "required": [ + "country", + "district" + ], + "properties": { + "country": { "type": "string", - "example": "3.14" + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" }, - "currency": { - "description": "Currency code.", + "district": { + "type": "string", + "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", + "maxLength": 16, + "example": "MA" + } + } + }, + "Fingerprint": { + "type": "string", + "description": "A UUID that uniquely identifies the account number. If the same account is used more than once, each card object will have a different id, but the fingerprint will stay the same.", + "example": "eb170539-9e1c-4e92-bf4f-1d09534fdca2" + }, + "AvsResults": { + "type": "string", + "description": "Status of the AVS check. Raw AVS response, expressed as an upper-case letter. `not_requested` indicates check was not made. `pending` is pending/processing.", + "example": "D" + }, + "CvvResults": { + "description": "Enumerated status of the check. `not_requested` indicates check was not made. `pass` indicates value is correct. `fail` indicates value is incorrect. `unavailable` indicates card issuer did not do the provided check. `pending` indicates check is pending/processing.", + "type": "string", + "enum": [ + "not_requested", + "pass", + "fail", + "unavailable", + "pending" + ] + }, + "CardVerificationResponse": { + "type": "object", + "description": "Indicates the status of the card for verification purposes.", + "required": [ + "avs", + "cvv" + ], + "properties": { + "avs": { + "$ref": "#/components/schemas/AvsResults" + }, + "cvv": { + "$ref": "#/components/schemas/CvvResults" + } + } + }, + "RiskEvaluation": { + "type": "object", + "description": "Results of risk evaluation. Only present if the payment is denied by Circle's risk service.", + "nullable": true, + "properties": { + "decision": { + "description": "Enumerated decision of the account.", "type": "string", "enum": [ - "USD" + "approved", + "denied", + "review" ] + }, + "reason": { + "description": "Risk reason for the definitive decision outcome.", + "type": "string", + "nullable": true, + "example": "3000" } } }, - "Timeline": { + "UTCTimestamp": { + "type": "string", + "description": "ISO-8601 UTC date/time format.", + "example": "2020-04-10T02:13:30.000Z" + }, + "SimpleCard": { "type": "object", - "readOnly": true, "required": [ + "id", "status", - "time" + "fingerprint", + "billingDetails", + "expMonth", + "expYear", + "network", + "verification", + "createDate", + "updateDate" ], "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, "status": { + "$ref": "#/components/schemas/ExternalFiatAccountStatus" + }, + "billingDetails": { + "$ref": "#/components/schemas/SimpleBillingDetails" + }, + "expMonth": { + "type": "integer", + "description": "Two digit number representing the card's expiration month.", + "example": 1 + }, + "expYear": { + "type": "integer", + "description": "Four digit number representing the card's expiration year.", + "example": 2020 + }, + "network": { "type": "string", + "description": "The network of the card.", "enum": [ - "created", - "pending", - "complete", - "expired", - "failed" + "VISA", + "MASTERCARD", + "AMEX", + "UNKNOWN" ] }, - "context": { + "bin": { "type": "string", - "enum": [ - "underpaid", - "paid", - "overpaid" - ] + "description": "The bank identification number (BIN), the first 6 digits of the card.", + "example": "401230" }, - "time": { - "description": "ISO-8601 UTC date/time format.", + "issuerCountry": { "type": "string", - "format": "date-time" + "description": "The country code of the issuer bank. Follows the ISO 3166-1 alpha-2 standard.", + "example": "US" + }, + "fingerprint": { + "$ref": "#/components/schemas/Fingerprint" + }, + "verification": { + "$ref": "#/components/schemas/CardVerificationResponse" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" } } }, - "UTCTimestampReadOnly": { + "IdempotencyKey": { "type": "string", - "readOnly": true, - "description": "ISO-8601 UTC date/time format.", - "example": "2020-04-10T02:13:30.000Z" + "description": "Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests.", + "format": "uuid", + "example": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7" }, - "PaymentIntent": { + "BillingDetails": { "type": "object", "required": [ - "idempotencyKey", - "amount", - "settlementCurrency", - "paymentMethods" + "name", + "city", + "country", + "line1", + "postalCode" ], "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "id": { + "name": { "type": "string", - "readOnly": true, - "description": "Unique system generated identifier for the entity.", - "format": "uuid", - "example": "b8627ae8-732b-4d25-b947-1df8f4007a29" - }, - "amount": { - "$ref": "#/components/schemas/CryptoPaymentsMoney" - }, - "amountPaid": { - "description": "Sum of the the amount paid.", - "type": "object", - "readOnly": true, - "required": [ - "amount", - "currency" - ], - "properties": { - "amount": { - "description": "Magnitude of the amount, in units of the currency, with a `.`.", - "type": "string", - "example": "3.14" - }, - "currency": { - "description": "Currency code.", - "type": "string", - "enum": [ - "USD" - ] - } - } + "description": "Full name of the card or bank account holder.", + "maxLength": 1024, + "example": "Satoshi Nakamoto" }, - "settlementCurrency": { - "description": "Desired currency for the payments to settle in.", + "city": { "type": "string", - "enum": [ - "USD", - "BTC", - "ETH" - ] - }, - "paymentMethods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentMethodBlockchain" - } - }, - "fees": { - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/components/schemas/PaymentIntentFees" - } + "description": "City portion of the address.", + "maxLength": 1024, + "example": "Boston" }, - "paymentIds": { - "description": "List of associated payments.", - "type": "array", - "readOnly": true, - "items": { - "type": "string", - "format": "uuid", - "example": "69808f36-3e5e-4f37-bf82-ca79e4d70fc1" - } + "country": { + "type": "string", + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" }, - "timeline": { - "description": "State management timeline.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/components/schemas/Timeline" - } + "line1": { + "type": "string", + "description": "Line one of the street address.", + "maxLength": 1024, + "example": "100 Money Street" }, - "expiresOn": { - "$ref": "#/components/schemas/UTCTimestampReadOnly" + "line2": { + "type": "string", + "description": "Line two of the street address.", + "maxLength": 1024, + "example": "Suite 1" }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestampReadOnly" + "district": { + "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.", + "type": "string", + "maxLength": 16, + "example": "MA" }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestampReadOnly" + "postalCode": { + "type": "string", + "description": "Postal / ZIP code of the address.", + "maxLength": 16, + "example": "01234" } } }, - "Id": { + "CardExpMonth": { + "type": "integer", + "description": "Two digit number representing the card's expiration month.", + "minimum": 1, + "maximum": 12, + "example": 1 + }, + "CardExpYear": { + "type": "integer", + "description": "Four digit number representing the card's expiration year.", + "minimum": 1, + "maximum": 9999, + "example": 2020 + }, + "Email": { "type": "string", - "description": "Unique system generated identifier for the entity.", - "format": "uuid", - "example": "b8627ae8-732b-4d25-b947-1df8f4007a29" + "description": "Email of the user.", + "maxLength": 1024, + "example": "satoshi@circle.com" }, - "IdMerchant": { + "PhoneNumber": { "type": "string", - "description": "Unique system generated identifier for the merchant.", - "format": "uuid", - "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" + "description": "Phone number of the user in E.164 format. We recommend using a library such as [libphonenumber](https://github.com/google/libphonenumber) to parse and validate phone numbers.", + "maxLength": 16, + "pattern": "/\\+?[1-9]\\d{1,14}/", + "example": "+14155555555" }, - "MerchantWalletId": { + "SessionId": { + "description": "Hash of the session identifier; typically of the end user. This helps us make risk decisions and prevent fraud. IMPORTANT: Please hash the session identifier to prevent sending us actual session identifiers.\n", "type": "string", - "description": "Unique system generated identifier for the wallet of the merchant.", - "maxLength": 36, - "example": "212000" + "maxLength": 50, + "example": "DE6FA86F60BB47B379307F851E238617" }, - "FiatMoneyUsd": { + "IpAddress": { + "type": "string", + "description": "Single IPv4 or IPv6 address of user'", + "example": "244.28.239.130" + }, + "MetadataCardAndAch": { "type": "object", "required": [ - "amount", - "currency" + "email", + "sessionId", + "ipAddress" ], "properties": { - "amount": { - "description": "Magnitude of the amount, in units of the currency, with a `.`.", - "type": "string", - "example": "3.14" + "email": { + "$ref": "#/components/schemas/Email" }, - "currency": { - "description": "Currency code.", - "type": "string", - "enum": [ - "USD" - ] + "phoneNumber": { + "$ref": "#/components/schemas/PhoneNumber" + }, + "sessionId": { + "$ref": "#/components/schemas/SessionId" + }, + "ipAddress": { + "$ref": "#/components/schemas/IpAddress" } } }, - "SourceResponse": { + "CardCreationRequest": { "type": "object", - "description": "The payment source.", - "properties": { - "id": { - "$ref": "#/components/schemas/Id" + "required": [ + "idempotencyKey", + "expMonth", + "expYear", + "encryptedData", + "billingDetails", + "metadata" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" }, - "type": { + "keyId": { + "$ref": "#/components/schemas/IdKey" + }, + "encryptedData": { "type": "string", - "description": "Type of the source.", - "enum": [ - "card", - "ach", - "wire", - "sepa" - ] + "format": "byte", + "description": "PGP encrypted base64 encoded string. Contains Number and CVV.\n* **Number**: Card number. No spaces or other separators. REQUIRED\n* **CVV (Card Verification Number)**: Three or four digit security code. REQUIRED'\n", + "example": "LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tCgp3Y0JNQTBYV1NGbEZScFZoQVFmL2J2bVVkNG5LZ3dkbExKVTlEdEFEK0p5c0VOTUxuOUlRUWVGWnZJUWEKMGgzQklpRFNRU0RMZmI0NEs2SXZMeTZRbm54bmFLcWx0MjNUSmtPd2hGWFIrdnNSMU5IbnVHN0lUNWJECmZzeVdleXlNK1JLNUVHV0thZ3NmQ2tWamh2NGloY29xUnlTTGtJbWVmRzVaR0tMRkJTTTBsTFNPWFRURQpiMy91eU1zMVJNb3ZiclNvbXkxa3BybzUveWxabWVtV2ZsU1pWQlhNcTc1dGc1YjVSRVIraXM5ckc0cS8KMXl0M0FOYXA3UDhKekFhZVlyTnVNZGhGZFhvK0NFMC9CQnN3L0NIZXdhTDk4SmRVUEV0NjA5WFRHTG9kCjZtamY0YUtMQ01xd0RFMkNVb3dPdE8vMzVIMitnVDZKS3FoMmtjQUQyaXFlb3luNWcralRHaFNyd3NKWgpIdEphQWVZZXpGQUVOaFo3Q01IOGNsdnhZVWNORnJuNXlMRXVGTkwwZkczZy95S3loclhxQ0o3UFo5b3UKMFVxQjkzQURKWDlJZjRBeVQ2bU9MZm9wUytpT2lLall4bG1NLzhlVWc3OGp1OVJ5T1BXelhyTzdLWTNHClFSWm8KPXc1dEYKLS0tLS1FTkQgUEdQIE1FU1NBR0UtLS0tLQo" + }, + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + }, + "expMonth": { + "$ref": "#/components/schemas/CardExpMonth" + }, + "expYear": { + "$ref": "#/components/schemas/CardExpYear" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataCardAndAch" } } }, - "PaymentStatus": { + "VerificationErrorCode": { "type": "string", - "description": "Enumerated status of the payment. `pending` means the payment is waiting to be processed. `confirmed` means the payment has been approved by the bank and the merchant can treat it as successful, but settlement funds are not yet available to the merchant. `paid` means settlement funds have been received and are available to the merchant. `failed` means something went wrong (most commonly that the payment was denied). `action_required` means that additional steps are required to process this payment; refer to `requiredAction` for more details. Terminal states are `paid` and `failed`.", + "description": "Indicates the failure reason of the card verification. Only present on cards with failed verification. Possible values are [verification_failed, verification_fraud_detected, verification_denied, verification_not_supported_by_issuer, verification_stopped_by_issuer, card_failed, card_invalid, card_address_mismatch, card_zip_mismatch, card_cvv_invalid, card_expired, card_limit_violated, card_not_honored, card_cvv_required, credit_card_not_allowed, card_account_ineligible, card_network_unsupported]'", + "nullable": true, "enum": [ - "pending", - "confirmed", - "paid", - "failed", - "action_required" + "verification_failed", + "verification_fraud_detected", + "verification_denied", + "verification_not_supported_by_issuer", + "verification_stopped_by_issuer", + "card_failed", + "card_invalid", + "card_address_mismatch", + "card_zip_mismatch", + "card_cvv_invalid", + "card_expired", + "card_limit_violated", + "card_not_honored", + "card_cvv_required", + "credit_card_not_allowed", + "card_account_ineligible", + "card_network_unsupported" ] }, - "UTCTimestamp": { - "type": "string", - "description": "ISO-8601 UTC date/time format.", - "example": "2020-04-10T02:13:30.000Z" - }, - "RequiredAction": { + "MetadataPhoneEmail": { "type": "object", - "description": "When the payment status is `action_required`, this object summarizes the required additional steps.", "required": [ - "type", - "redirectUrl" + "email" ], "properties": { - "type": { - "type": "string", - "description": "The type of action that is required to proceed with the payment. Currently only one type is supported.", - "enum": [ - "three_d_secure_required" - ] + "email": { + "$ref": "#/components/schemas/Email" }, - "redirectUrl": { - "type": "string", - "description": "The URL to bring the user to in order to complete the payment.", - "example": "https://example.org" + "phoneNumber": { + "$ref": "#/components/schemas/PhoneNumber" } } }, - "CancelRefundReversalStatus": { - "type": "string", - "enum": [ - "pending", - "confirmed", - "paid", - "failed" - ], - "description": "Enumerated status of the payment. `pending` means the payment is waiting to be processed. `confirmed` means the payment has been approved by the bank and the merchant can treat it as successful, but settlement funds are not yet available to the merchant. `paid` means settlement funds have been received and are available to the merchant. `failed` means something went wrong (most commonly that the payment was denied). Terminal states are `paid` and `failed`." - }, - "PaymentInfoCancel": { + "Card": { "type": "object", - "description": "Status information of the related cancel. This property is only present on canceled payment or refund items.", - "nullable": true, + "required": [ + "id", + "status", + "billingDetails", + "expMonth", + "expYear", + "network", + "last4", + "fingerprint", + "verification", + "metadata", + "createDate", + "updateDate" + ], "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "type": { + "status": { + "$ref": "#/components/schemas/ExternalFiatAccountStatus" + }, + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + }, + "expMonth": { + "$ref": "#/components/schemas/CardExpMonth" + }, + "expYear": { + "$ref": "#/components/schemas/CardExpYear" + }, + "network": { "type": "string", - "description": "Type of the payment object.", + "description": "The network of the card.", "enum": [ - "cancel" + "VISA", + "MASTERCARD", + "AMEX", + "UNKNOWN" ] }, - "description": { - "description": "Enumerated description of the payment item.", + "last4": { + "type": "string", + "description": "The last 4 digits of the card.", + "example": "0123" + }, + "bin": { + "type": "string", + "description": "The bank identification number (BIN), the first 6 digits of the card.", + "example": "401230" + }, + "issuerCountry": { + "type": "string", + "description": "The country code of the issuer bank. Follows the ISO 3166-1 alpha-2 standard.", + "example": "US" + }, + "fundingType": { + "description": "The funding type of the card. Possible values are `credit`, `debit`, `prepaid`, and `unknown`.", "type": "string", - "nullable": true, "enum": [ - "Payment" + "credit", + "debit", + "prepaid", + "unknown" ] }, - "status": { - "$ref": "#/components/schemas/CancelRefundReversalStatus" + "fingerprint": { + "$ref": "#/components/schemas/Fingerprint" + }, + "errorCode": { + "$ref": "#/components/schemas/VerificationErrorCode" + }, + "verification": { + "$ref": "#/components/schemas/CardVerificationResponse" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPhoneEmail" }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" } } }, - "PaymentInfoPaymentAndRefund": { + "CardUpdate": { "type": "object", - "description": "Status information of the related payment. This property is only present on refund or cancel items.", + "required": [ + "keyId", + "encryptedData", + "expMonth", + "expYear" + ], "properties": { - "id": { - "$ref": "#/components/schemas/Id" + "keyId": { + "$ref": "#/components/schemas/IdKey" }, - "type": { + "encryptedData": { "type": "string", - "description": "Type of the payment object.", - "enum": [ - "payment", - "refund" - ] + "format": "byte", + "description": "PGP encrypted base64 encoded string. Contains CVV.\n* **CVV (Card Verification Number)**: Three or four digit security code. REQUIRED'\n", + "example": "UHVibGljS2V5QmFzZTY0RW5jb2RlZA==" }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "expMonth": { + "$ref": "#/components/schemas/CardExpMonth" }, - "description": { + "expYear": { + "$ref": "#/components/schemas/CardExpYear" + } + } + }, + "BankAddress": { + "type": "object", + "description": "The address details for the bank, as provided during bank account creation.", + "required": [ + "country" + ], + "properties": { + "bankName": { "type": "string", - "description": "Enumerated description of the payment item.", - "nullable": true, - "enum": [ - "Payment" - ] + "description": "Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN'", + "maxLength": 35, + "example": "SAN FRANCISCO" }, - "status": { - "$ref": "#/components/schemas/PaymentStatus" + "city": { + "type": "string", + "description": "City portion of the address. This property is required for bank accounts outside of the US.", + "maxLength": 35, + "example": "SAN FRANCISCO" }, - "requiredAction": { - "$ref": "#/components/schemas/RequiredAction" + "country": { + "type": "string", + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "line1": { + "type": "string", + "description": "Line one of the street address.", + "maxLength": 35, + "example": "100 Money Street" }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "line2": { + "type": "string", + "description": "Line two of the street address.", + "maxLength": 35, + "example": "Suite 1" + }, + "district": { + "type": "string", + "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", + "maxLength": 16, + "example": "CA" } } }, - "Channel": { - "type": "string", - "format": "uuid", - "description": "The channel identifier that can be set for the payment. When not provided, the default channel is used.", - "example": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7" - }, - "FiatPayment": { + "Wire": { "type": "object", - "description": "Status information of the related payment. This property is only present on refund or cancel items.", "required": [ "id", - "type", - "merchantId", - "amount", - "source", - "status" + "status", + "description", + "trackingRef", + "fingerprint", + "billingDetails", + "createDate", + "updateDate" ], "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "type": { - "description": "Type of the payment object.", - "type": "string", - "enum": [ - "payment" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "source": { - "$ref": "#/components/schemas/SourceResponse" + "status": { + "$ref": "#/components/schemas/ExternalFiatAccountStatus" }, "description": { - "description": "Enumerated description of the payment.", "type": "string", - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/PaymentStatus" - }, - "captured": { - "description": "Determines if a payment has successfully been captured. This property is only present for payments that did not use auto capture.", - "type": "boolean" - }, - "captureAmount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "captureDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "requiredAction": { - "$ref": "#/components/schemas/RequiredAction" + "description": "Bank name plus last four digits of the bank account number or IBAN.", + "example": "WELLS FARGO BANK, NA ****0010" }, - "cancel": { - "$ref": "#/components/schemas/PaymentInfoCancel" + "trackingRef": { + "type": "string", + "description": "Wire tracking ref that needs to be set in the wire reference to beneficiary field.", + "example": "CIR13FB13A" }, - "refunds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentInfoPaymentAndRefund" - } + "fingerprint": { + "$ref": "#/components/schemas/Fingerprint" }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" }, - "channel": { - "$ref": "#/components/schemas/Channel" + "bankAddress": { + "$ref": "#/components/schemas/BankAddress" }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" @@ -7515,676 +7838,606 @@ } } }, - "CryptoPayment": { + "WireCreationRequestUS": { "type": "object", - "description": "Status information of the related payment. This property is only present on refund or cancel items.", + "title": "US Bank Account", + "description": "Relevant fields for U.S. bank accounts.", "required": [ - "id", - "type", - "merchantId", - "amount", - "source", - "status" + "idempotencyKey", + "accountNumber", + "routingNumber", + "billingDetails", + "bankAddress" ], "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "description": "Type of the payment object.", - "type": "string", - "enum": [ - "payment" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "status": { - "$ref": "#/components/schemas/PaymentStatus" - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" }, - "paymentIntentId": { + "accountNumber": { + "description": "Account number that identifies the bank account.", "type": "string", - "format": "uuid", - "example": "6e4d4047-db14-4c09-b238-1215aee50d03" - }, - "settlementAmount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "depositAddress": { - "type": "object", - "properties": { - "chain": { - "$ref": "#/components/schemas/Chain" - }, - "address": { - "type": "string", - "example": "0x97de855690955e0da79ce5c1b6804847e7070c7f" - } - } + "example": "12340010", + "minLength": 6, + "maxLength": 35 }, - "transactionHash": { + "routingNumber": { + "description": "ABA routing number for the bank account. Note this has to be specific for bank wire transfers.", "type": "string", - "example": "0x7351585460bd657f320b9afa02a52c26d89272d0d10cc29913eb8b28e64fd906" + "example": "121000248" }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "bankAddress": { + "$ref": "#/components/schemas/BankAddress" } } }, - "FiatCancel": { + "BankAddressIbanSupported": { "type": "object", - "description": "Status information of the related cancel. This property is only present on canceled payment or refund items.", - "nullable": true, + "description": "The address of the bank. City and country fields are required.", "required": [ - "id", - "type", - "merchantId", - "amount", - "source", - "status" + "city", + "country" ], "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { + "bankName": { "type": "string", - "description": "Type of the payment object.", - "enum": [ - "cancel" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "description": "Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN'", + "maxLength": 35, + "example": "SAN FRANCISCO" }, - "source": { - "$ref": "#/components/schemas/SourceResponse" + "city": { + "type": "string", + "description": "City portion of the address. This property is required for bank accounts outside of the US.", + "maxLength": 1024, + "example": "SAN FRANCISCO" }, - "description": { - "description": "Enumerated description of the payment.", + "country": { "type": "string", - "enum": [ - "Payment" - ] + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" }, - "status": { - "$ref": "#/components/schemas/CancelRefundReversalStatus" + "line1": { + "type": "string", + "description": "Line one of the street address.", + "maxLength": 35, + "example": "100 Money Street" }, - "originalPayment": { - "$ref": "#/components/schemas/PaymentInfoPaymentAndRefund" + "line2": { + "type": "string", + "description": "Line two of the street address.", + "maxLength": 35, + "example": "Suite 1" }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "district": { + "type": "string", + "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", + "maxLength": 16, + "example": "CA" + } + } + }, + "WireCreationRequestIban": { + "type": "object", + "title": "Non US Bank Account - IBAN Supported", + "description": "Relevant fields for non-U.S. bank accounts that support IBAN.", + "required": [ + "idempotencyKey", + "iban", + "billingDetails", + "bankAddress" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" }, - "channel": { - "$ref": "#/components/schemas/Channel" + "iban": { + "description": "International Bank Account Number (IBAN) for the bank account.", + "type": "string", + "example": "DE31100400480532013000" }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "bankAddress": { + "$ref": "#/components/schemas/BankAddressIbanSupported" } } }, - "FiatRefund": { + "BankAddressNonIban": { "type": "object", + "description": "The address of the bank. BankName, City and Country fields are required.", "required": [ - "id", - "type", - "merchantId", - "amount", - "source", - "status" + "bankName", + "city", + "country" ], "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "description": "Type of the payment object.", + "bankName": { "type": "string", - "enum": [ - "refund" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "source": { - "$ref": "#/components/schemas/SourceResponse" + "description": "Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN'", + "maxLength": 35, + "example": "SAN FRANCISCO" }, - "description": { - "description": "Enumerated description of the payment.", + "city": { "type": "string", - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/CancelRefundReversalStatus" - }, - "originalPayment": { - "$ref": "#/components/schemas/PaymentInfoPaymentAndRefund" - }, - "cancel": { - "$ref": "#/components/schemas/PaymentInfoCancel" + "description": "City portion of the address. This property is required for bank accounts outside of the US.", + "maxLength": 1024, + "example": "SAN FRANCISCO" }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "country": { + "type": "string", + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" }, - "channel": { - "$ref": "#/components/schemas/Channel" + "line1": { + "type": "string", + "description": "Line one of the street address.", + "maxLength": 35, + "example": "100 Money Street" }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "line2": { + "type": "string", + "description": "Line two of the street address.", + "maxLength": 35, + "example": "Suite 1" }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "district": { + "type": "string", + "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", + "maxLength": 16, + "example": "CA" } } }, - "AvsResults": { - "type": "string", - "description": "Status of the AVS check. Raw AVS response, expressed as an upper-case letter. `not_requested` indicates check was not made. `pending` is pending/processing.", - "example": "D" - }, - "CvvResults": { - "description": "Enumerated status of the check. `not_requested` indicates check was not made. `pass` indicates value is correct. `fail` indicates value is incorrect. `unavailable` indicates card issuer did not do the provided check. `pending` indicates check is pending/processing.", - "type": "string", - "enum": [ - "not_requested", - "pass", - "fail", - "unavailable", - "pending" - ] - }, - "ThreeDSResult": { - "type": "string", - "description": "Enumerated status of the check. `pass` indicates successful 3DS authentication. `fail` indicates failed 3DS authentication.", - "enum": [ - "pass", - "fail" - ] - }, - "Eci": { - "type": "string", - "description": "ECI (electronic commerce indicator) value returned by Directory Servers (namely Visa, MasterCard, JCB, and American Express) indicating the outcome of authentication attempted on transactions enforced by 3DS.", - "enum": [ - "00", - "01", - "02", - "05", - "06", - "07" - ] - }, - "PaymentVerificationResponse": { + "WireCreationRequestAccountNumber": { "type": "object", - "description": "Indicates the status of the payment verification. This property will be present once the payment is confirmed.", + "title": "Non US Bank Account - IBAN Not Supported", + "description": "Relevant fields for non-U.S. banks that do NOT support IBAN.", "required": [ - "avs", - "cvv" + "idempotencyKey", + "accountNumber", + "routingNumber", + "billingDetails", + "bankAddress" ], "properties": { - "avs": { - "$ref": "#/components/schemas/AvsResults" + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" }, - "cvv": { - "$ref": "#/components/schemas/CvvResults" + "accountNumber": { + "description": "Account number that identifies the bank account.", + "type": "string", + "example": "0321800123", + "minLength": 6, + "maxLength": 35 }, - "threeDSecure": { - "$ref": "#/components/schemas/ThreeDSResult" + "routingNumber": { + "description": "The bank's SWIFT / BIC code.", + "type": "string", + "example": "SBININBB354" }, - "eci": { - "$ref": "#/components/schemas/Eci" + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + }, + "bankAddress": { + "$ref": "#/components/schemas/BankAddressNonIban" } } }, - "ExternalRef": { - "type": "string", - "description": "External network identifier which will be present once provided from the applicable network. \n\nExamples:\n* **Input/Output Message Accountability Data (IMAD/OMAD)**: unique number given to each FedWire payment when using the Federal Reserve Bank Service which can be used to investigate and track wire transfers.\n", - "example": "YYYYMMDDXXXXXXXX012345" - }, - "PaymentErrorCode": { - "type": "string", - "description": "Indicates the failure reason of a payment. Only present for payments in failed state. Possible values are [`payment_failed`, `payment_fraud_detected`, `payment_denied`, `payment_not_supported_by_issuer`, `payment_not_funded`, `payment_unprocessable`, `payment_stopped_by_issuer`, `payment_canceled`, `payment_returned`, `payment_failed_balance_check`, `card_failed`, `card_invalid`, `card_address_mismatch`, `card_zip_mismatch`, `card_cvv_invalid`, `card_expired`, `card_limit_violated`, `card_not_honored`, `card_cvv_required`, `credit_card_not_allowed`, `card_account_ineligible`, `card_network_unsupported`, `channel_invalid`, `unauthorized_transaction`, `bank_account_ineligible`, `bank_transaction_error`, `invalid_account_number`, `invalid_wire_rtn`, `invalid_ach_rtn`, `vendor_inactive`]'", - "nullable": true, - "enum": [ - "payment_failed", - "payment_fraud_detected", - "payment_denied", - "payment_not_supported_by_issuer", - "payment_not_funded", - "payment_unprocessable", - "payment_stopped_by_issuer", - "payment_canceled", - "payment_returned", - "payment_failed_balance_check", - "card_failed", - "card_invalid", - "card_address_mismatch", - "card_zip_mismatch", - "card_cvv_invalid", - "card_expired", - "card_limit_violated", - "card_not_honored", - "card_cvv_required", - "card_restricted,", - "card_account_ineligible", - "card_network_unsupported", - "channel_invalid", - "unauthorized_transaction", - "bank_account_ineligible", - "bank_transaction_error", - "invalid_account_number", - "invalid_wire_rtn", - "invalid_ach_rtn", - "ref_id_invalid", - "account_name_mismatch", - "account_number_mismatch", - "account_ineligible", - "wallet_address_mismatch", - "customer_name_mismatch", - "institution_name_mismatch", - "vendor_inactive" + "WireCreationRequest": { + "type": "object", + "description": "Request object used to create a bank account (wires). Different fields are required depending on the bank country, see the guide documentation for the list of supported bank countries along with which ones support IBAN.", + "oneOf": [ + { + "$ref": "#/components/schemas/WireCreationRequestUS" + }, + { + "$ref": "#/components/schemas/WireCreationRequestIban" + }, + { + "$ref": "#/components/schemas/WireCreationRequestAccountNumber" + } ] }, - "Email": { - "type": "string", - "description": "Email of the user.", - "maxLength": 1024, - "example": "satoshi@circle.com" - }, - "PhoneNumber": { - "type": "string", - "description": "Phone number of the user in E.164 format. We recommend using a library such as [libphonenumber](https://github.com/google/libphonenumber) to parse and validate phone numbers.", - "maxLength": 16, - "pattern": "/\\+?[1-9]\\d{1,14}/", - "example": "+14155555555" + "WireInstructionBeneficiary": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the beneficiary.", + "example": "CIRCLE INTERNET FINANCIAL INC" + }, + "address1": { + "type": "string", + "description": "Address line 1 of the beneficiary's address.", + "example": "99 HIGH STREET" + }, + "address2": { + "type": "string", + "description": "Address line 2 of the beneficiary's address.", + "example": "BOSTON MA 02110" + } + } }, - "MetadataPhoneEmail": { + "WireInstructionBeneficiaryBank": { "type": "object", - "required": [ - "email" - ], "properties": { - "email": { - "$ref": "#/components/schemas/Email" + "name": { + "type": "string", + "description": "Name of the beneficiary's bank.", + "example": "SILVERGATE BANK" }, - "phoneNumber": { - "$ref": "#/components/schemas/PhoneNumber" + "swiftCode": { + "type": "string", + "description": "SWIFT code of the beneficiary's bank account.", + "example": "SIVGUS66XXX" + }, + "routingNumber": { + "type": "string", + "description": "ABA Routing number of the beneficiary's bank account.", + "example": "322286803" + }, + "accountNumber": { + "type": "string", + "description": "Account number of the beneficiary's bank account.", + "example": "****7427" + }, + "currency": { + "type": "string", + "description": "Currency of the beneficiary's bank account.", + "example": "USD" + }, + "address": { + "type": "string", + "description": "Address of the beneficiary's bank.", + "example": "4250 EXECUTIVE SQUARE SUITE 300" + }, + "city": { + "type": "string", + "description": "City of the beneficiary's bank.", + "example": "LA JOLLA" + }, + "postalCode": { + "type": "string", + "description": "Postal code of the beneficiary's bank.", + "example": "02110" + }, + "country": { + "type": "string", + "description": "Country code of the beneficiary's bank. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "example": "US" } } }, - "RiskEvaluation": { + "WireInstruction": { "type": "object", - "description": "Results of risk evaluation. Only present if the payment is denied by Circle's risk service.", - "nullable": true, "properties": { - "decision": { - "description": "Enumerated decision of the account.", + "trackingRef": { "type": "string", - "enum": [ - "approved", - "denied", - "review" - ] + "description": "Circle tracking reference that needs to be set in the wire reference field.", + "example": "CIR13FB13A" }, - "reason": { - "description": "Risk reason for the definitive decision outcome.", - "type": "string", - "nullable": true, - "example": "3000" + "beneficiary": { + "$ref": "#/components/schemas/WireInstructionBeneficiary" + }, + "beneficiaryBank": { + "$ref": "#/components/schemas/WireInstructionBeneficiaryBank" } } }, - "FiatPaymentPolymorphic": { + "SenFiatAccountResponse": { "type": "object", "required": [ "id", - "type", - "merchantId", - "amount", - "source", - "status" + "status", + "description", + "trackingRef", + "createDate", + "updateDate" ], "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "type": { - "description": "Type of the payment object.", - "type": "string", - "enum": [ - "payment", - "refund", - "cancel" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "source": { - "$ref": "#/components/schemas/SourceResponse" + "status": { + "$ref": "#/components/schemas/ExternalFiatAccountStatus" }, "description": { - "description": "Enumerated description of the payment.", "type": "string", - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/PaymentStatus" - }, - "requiredAction": { - "$ref": "#/components/schemas/RequiredAction" - }, - "verification": { - "$ref": "#/components/schemas/PaymentVerificationResponse" - }, - "originalPayment": { - "$ref": "#/components/schemas/FiatPayment" - }, - "cancel": { - "$ref": "#/components/schemas/FiatCancel" - }, - "refunds": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/FiatRefund" - } - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "description": "Bank name plus last four digits of the bank account number.", + "example": "SILVERGATE BANK ****1111" }, "trackingRef": { - "description": "Payment tracking reference. Will be present once known.", "type": "string", - "nullable": true, - "example": "24910599141085313498894" - }, - "externalRef": { - "$ref": "#/components/schemas/ExternalRef" - }, - "errorCode": { - "$ref": "#/components/schemas/PaymentErrorCode" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPhoneEmail" - }, - "channel": { - "$ref": "#/components/schemas/Channel" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" + "description": "Circle tracking reference that needs to be set in the memo field..", + "example": "CIR13FB14A" }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" }, "updateDate": { "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "Money": { - "type": "object", - "required": [ - "amount", - "currency" - ], - "properties": { - "amount": { - "type": "string", - "description": "Magnitude of the amount, in units of the currency, with a `.`.", - "example": "3.14" }, "currency": { "type": "string", - "description": "Currency code for the amount.", - "enum": [ - "USD", - "EUR", - "BTC", - "ETH" - ] + "description": "Currency of the fiat account.", + "example": "USD" } } }, - "Balances": { + "SenFiatAccountCreationRequest": { "type": "object", - "description": "Available and unsettled balances of the merchant.", "required": [ - "available", - "unsettled" + "idempotencyKey", + "accountNumber" ], "properties": { - "available": { - "type": "array", - "description": "List of currency balances (one for each currency) that are currently available to spend.", - "items": { - "$ref": "#/components/schemas/Money" - } + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" }, - "unsettled": { - "type": "array", - "description": "List of currency balances (one for each currency) that have been captured but are currently in the process of settling and will become available to spend at some point in the future.", - "items": { - "$ref": "#/components/schemas/Money" - } + "accountNumber": { + "type": "string", + "description": "Silvergate SEN account number.", + "example": "12345678" + }, + "currency": { + "type": "string", + "description": "Currency of the Silvergate SEN account.", + "example": "USD" } } }, - "PayoutStatus": { - "type": "string", - "description": "Status of the payout. Status `pending` indicates that the payout is in process; `complete` indicates it finished successfully; `failed` indicates it failed.", - "enum": [ - "pending", - "complete", - "failed" - ] - }, - "PayoutDestinationType": { - "type": "string", - "description": "The destination bank account type.", - "enum": [ - "wire", - "ach", - "sepa" - ] - }, - "BankDestination": { + "SenInstruction": { "type": "object", - "description": "The destination bank account.", - "required": [ - "type", - "id" - ], "properties": { - "type": { - "$ref": "#/components/schemas/PayoutDestinationType" - }, - "id": { - "$ref": "#/components/schemas/Id" + "trackingRef": { + "type": "string", + "description": "Circle tracking reference that needs to be set in the memo field.", + "example": "CIR13FB14A" }, - "name": { + "accountNumber": { "type": "string", - "description": "Bank name plus last four digits of the bank account number or IBAN.", - "readOnly": true, - "example": "COMMERZBANK AG ****3000" + "description": "Circle corporate Silvergate SEN account number that needs to be set as destination.", + "example": "11111111" + }, + "currency": { + "type": "string", + "description": "Currency of Circle corporate Silvergate SEN account.", + "example": "USD" } } }, - "FiatMoney": { + "ACHBillingDetails": { "type": "object", + "description": "Billing details of the account holder.", "required": [ - "amount", - "currency" + "name" ], "properties": { - "amount": { - "description": "Magnitude of the amount, in units of the currency, with a `.`.", + "name": { "type": "string", - "example": "3.14" + "description": "Full name of the card or bank account holder.", + "maxLength": 1024, + "example": "Satoshi Nakamoto" }, - "currency": { - "description": "Currency code.", + "city": { "type": "string", - "enum": [ - "USD", - "EUR" - ] + "description": "City portion of the address.", + "maxLength": 1024, + "example": "Boston" + }, + "country": { + "type": "string", + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" + }, + "line1": { + "type": "string", + "description": "Line one of the street address.", + "maxLength": 1024, + "example": "100 Money Street" + }, + "line2": { + "type": "string", + "description": "Line two of the street address.", + "maxLength": 1024, + "example": "Suite 1" + }, + "district": { + "type": "string", + "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.", + "maxLength": 16, + "example": "MA" + }, + "postalCode": { + "type": "string", + "description": "Postal / ZIP code of the address.", + "maxLength": 16, + "example": "01234" } } }, - "PayoutErrorCode": { + "ACHBankAccountType": { "type": "string", + "description": "Retail account (individual consumer account) or Business account (e.g. sole prop, LLC, corporation).", "nullable": true, - "description": "Indicates the failure reason of a payout. Only present for payouts in failed state. Possible values are [`insufficient_funds`, `transaction_denied`, `transaction_failed`, `transaction_returned`, `bank_transaction_error`, `fiat_account_limit_exceeded`, `invalid_bank_account_number`, `invalid_ach_rtn`, `invalid_wire_rtn`, `vendor_inactive`]'", "enum": [ - "insufficient_funds", - "transaction_denied", - "transaction_failed", - "transaction_returned", - "bank_transaction_error", - "fiat_account_limit_exceeded", - "invalid_bank_account_number", - "invalid_ach_rtn", - "invalid_wire_rtn", - "vendor_inactive" + "retail", + "business" ] }, - "FinalAdjustments": { + "ACHCreationRequest": { "type": "object", - "description": "Final adjustment which increases (credits) or decreases (debits) the total returned amount to the source wallet.", - "nullable": true, + "required": [ + "idempotencyKey", + "plaidProcessorToken", + "billingDetails", + "metadata" + ], "properties": { - "fxCredit": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" }, - "fxDebit": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "plaidProcessorToken": { + "type": "string", + "description": "The token for the ACH account provided by the processor (Plaid).", + "example": "processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621" + }, + "billingDetails": { + "$ref": "#/components/schemas/ACHBillingDetails" + }, + "bankAccountType": { + "$ref": "#/components/schemas/ACHBankAccountType" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataCardAndAch" } } }, - "IdPayout": { + "AccountNumberMasked": { "type": "string", - "description": "Universally unique identifier (UUID v4) of the payout that is associated with the return.", - "format": "uuid", - "example": "abdb500d-4a59-457c-801f-2d418c8703ac" + "description": "The redacted account number of the ACH account.", + "example": "****6789" }, - "UnwithdrawalObject": { - "type": "object", - "description": "Return information if the payout is returned by bank. Only present if `errorCode` of payout is `transaction_returned`.", + "RoutingNumber": { + "type": "string", + "description": "The routing number of the ACH account.", + "example": "613334455" + }, + "AchVerificationErrorCodes": { + "type": "string", + "description": "Indicates the failure reason of the ACH account. Only present on failed accounts. Possible values are [bank_account_authorization_expired, bank_account_error, bank_account_ineligible, bank_account_not_found, bank_account_unauthorized, unsupported_routing_number, verification_failed].", "nullable": true, + "enum": [ + "bank_account_authorization_expired", + "bank_account_error", + "bank_account_ineligible", + "bank_account_not_found", + "bank_account_unauthorized", + "unsupported_routing_number", + "verification_failed" + ] + }, + "ACH": { + "type": "object", + "required": [ + "id", + "accountNumber", + "routingNumber", + "description", + "billingDetails", + "bankAddress", + "fingerprint", + "metadata", + "createDate", + "updateDate" + ], "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "payoutId": { - "$ref": "#/components/schemas/IdPayout" + "status": { + "$ref": "#/components/schemas/ExternalFiatAccountStatus" }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "accountNumber": { + "$ref": "#/components/schemas/AccountNumberMasked" }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "routingNumber": { + "$ref": "#/components/schemas/RoutingNumber" }, - "reason": { - "type": "string", - "description": "Reason for the return.", - "example": "payout_returned" + "billingDetails": { + "$ref": "#/components/schemas/ACHBillingDetails" }, - "status": { - "type": "string", - "description": "Status of the return. A `pending` status indicates that the return is in process; `complete` indicates it finished successfully; `failed` indicates it failed.", - "enum": [ - "pending", - "complete", - "failed" - ] + "bankAccountType": { + "$ref": "#/components/schemas/ACHBankAccountType" + }, + "bankAddress": { + "$ref": "#/components/schemas/BankAddress" + }, + "fingerprint": { + "$ref": "#/components/schemas/Fingerprint" + }, + "errorCode": { + "$ref": "#/components/schemas/AchVerificationErrorCodes" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" }, "updateDate": { "$ref": "#/components/schemas/UTCTimestamp" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPhoneEmail" } } }, - "PayoutBusinessAccount": { + "SEPACreationRequest": { "type": "object", + "required": [ + "idempotencyKey", + "accountName", + "iban", + "billingDetails" + ], "properties": { - "id": { - "$ref": "#/components/schemas/Id" + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" }, - "sourceWalletId": { + "iban": { "type": "string", - "description": "The identifier of the source wallet used to fund a payout.", - "example": "53535335" - }, - "destination": { - "$ref": "#/components/schemas/BankDestination" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoney" + "description": "International Bank Account Number (IBAN) for the bank account.", + "example": "DE31100400480532013000" }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + } + } + }, + "SEPA": { + "type": "object", + "required": [ + "id", + "status", + "description", + "trackingRef", + "fingerprint", + "billingDetails", + "createDate", + "updateDate" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" }, "status": { - "$ref": "#/components/schemas/PayoutStatus" + "$ref": "#/components/schemas/ExternalFiatAccountStatus" + }, + "description": { + "type": "string", + "description": "Bank name plus last four digits of the IBAN.", + "example": "Bank of Ireland ****0010" }, "trackingRef": { - "description": "A payout tracking reference. Will be present once known.", - "nullable": true, - "example": "CIR-6ESOQANEP3NAO" + "type": "string", + "description": "Tracking reference that needs to be set in the payment details or description.", + "example": "CIR13FB13A" }, - "errorCode": { - "$ref": "#/components/schemas/PayoutErrorCode" + "fingerprint": { + "$ref": "#/components/schemas/Fingerprint" }, "riskEvaluation": { "$ref": "#/components/schemas/RiskEvaluation" }, - "adjustments": { - "$ref": "#/components/schemas/FinalAdjustments" - }, - "return": { - "$ref": "#/components/schemas/UnwithdrawalObject" + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" @@ -8194,167 +8447,89 @@ } } }, - "BusinessAccountDestinationRequest": { + "SEPAInstructionBeneficiary": { "type": "object", - "description": "The destination bank account.", - "required": [ - "type", - "id" - ], "properties": { - "type": { + "name": { "type": "string", - "enum": [ - "wire", - "sen" - ] - }, - "id": { - "$ref": "#/components/schemas/Id" - } - } - }, - "BusinessAccountPayoutCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "destination", - "amount" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" + "description": "Name of the beneficiary.", + "example": "CIRCLE INTERNET FINANCIAL INC" }, - "destination": { - "$ref": "#/components/schemas/BusinessAccountDestinationRequest" + "address1": { + "type": "string", + "description": "Address line 1 of the beneficiary's address.", + "example": "99 HIGH STREET" }, - "amount": { - "$ref": "#/components/schemas/FiatMoney" + "address2": { + "type": "string", + "description": "Address line 2 of the beneficiary's address.", + "example": "BOSTON MA 02110" } } }, - "ExternalFiatAccountStatus": { - "description": "Status of the account. A `pending` status indicates that the linking is in-progress; `complete` indicates the account was linked successfully; `failed` indicates it failed.", - "type": "string", - "enum": [ - "pending", - "complete", - "failed" - ] - }, - "Fingerprint": { - "type": "string", - "description": "A UUID that uniquely identifies the account number. If the same account is used more than once, each card object will have a different id, but the fingerprint will stay the same.", - "example": "eb170539-9e1c-4e92-bf4f-1d09534fdca2" - }, - "BillingDetails": { + "SEPAInstructionBeneficiaryBank": { "type": "object", - "required": [ - "name", - "city", - "country", - "line1", - "postalCode" - ], "properties": { "name": { "type": "string", - "description": "Full name of the card or bank account holder.", - "maxLength": 1024, - "example": "Satoshi Nakamoto" + "description": "Name of the beneficiary's bank.", + "example": "LHV Bank" }, - "city": { + "bic": { "type": "string", - "description": "City portion of the address.", - "maxLength": 1024, - "example": "Boston" + "description": "BIC code of the beneficiary's bank account.", + "example": "LHVBEE22XXX" }, - "country": { + "iban": { + "description": "IBAN of the beneficiary's bank account.", "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" + "example": "****6789" }, - "line1": { + "address": { + "description": "Address of the beneficiary's bank.", "type": "string", - "description": "Line one of the street address.", - "maxLength": 1024, - "example": "100 Money Street" + "example": "Tartu mnt 2, 10145 Tallinn" }, - "line2": { + "city": { + "description": "City of the beneficiary's bank.", "type": "string", - "description": "Line two of the street address.", - "maxLength": 1024, - "example": "Suite 1" + "example": "Tallinn" }, - "district": { - "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.", + "postalCode": { + "description": "Postal code of the beneficiary's bank.", "type": "string", - "maxLength": 16, - "example": "MA" + "example": "10017" }, - "postalCode": { + "country": { + "description": "Country code of the beneficiary's bank. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", "type": "string", - "description": "Postal / ZIP code of the address.", - "maxLength": 16, - "example": "01234" + "example": "EE" } } }, - "BankAddress": { + "SEPAInstruction": { "type": "object", - "description": "The address details for the bank, as provided during bank account creation.", - "required": [ - "country" - ], "properties": { - "bankName": { - "type": "string", - "description": "Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN'", - "maxLength": 35, - "example": "SAN FRANCISCO" - }, - "city": { - "type": "string", - "description": "City portion of the address. This property is required for bank accounts outside of the US.", - "maxLength": 35, - "example": "SAN FRANCISCO" - }, - "country": { - "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" - }, - "line1": { + "trackingRef": { "type": "string", - "description": "Line one of the street address.", - "maxLength": 35, - "example": "100 Money Street" + "description": "Circle tracking reference that needs to be set in the SEPA transfer reference field.", + "example": "CIR13FB13A" }, - "line2": { - "type": "string", - "description": "Line two of the street address.", - "maxLength": 35, - "example": "Suite 1" + "beneficiary": { + "$ref": "#/components/schemas/SEPAInstructionBeneficiary" }, - "district": { - "type": "string", - "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", - "maxLength": 16, - "example": "CA" + "beneficiaryBank": { + "$ref": "#/components/schemas/SEPAInstructionBeneficiaryBank" } } }, - "Wire": { + "SignetFiatAccountResponse": { "type": "object", "required": [ "id", "status", - "description", "trackingRef", - "fingerprint", - "billingDetails", + "walletAddress", "createDate", "updateDate" ], @@ -8365,24 +8540,15 @@ "status": { "$ref": "#/components/schemas/ExternalFiatAccountStatus" }, - "description": { - "type": "string", - "description": "Bank name plus last four digits of the bank account number or IBAN.", - "example": "WELLS FARGO BANK, NA ****0010" - }, "trackingRef": { "type": "string", - "description": "Wire tracking ref that needs to be set in the wire reference to beneficiary field.", - "example": "CIR13FB13A" - }, - "fingerprint": { - "$ref": "#/components/schemas/Fingerprint" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" + "description": "Tracking ref that needs to be set in the public description field when you send the funds to Circle Signet wallet.", + "example": "CIR13FB14A" }, - "bankAddress": { - "$ref": "#/components/schemas/BankAddress" + "walletAddress": { + "type": "string", + "description": "Your signet wallet address.", + "example": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd" }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" @@ -8392,323 +8558,257 @@ } } }, - "WireCreationRequestUS": { + "SignetFiatAccountCreationRequest": { "type": "object", - "title": "US Bank Account", - "description": "Relevant fields for U.S. bank accounts.", "required": [ "idempotencyKey", - "accountNumber", - "routingNumber", - "billingDetails", - "bankAddress" + "walletAddress" ], "properties": { "idempotencyKey": { "$ref": "#/components/schemas/IdempotencyKey" }, - "accountNumber": { - "description": "Account number that identifies the bank account.", - "type": "string", - "example": "12340010", - "minLength": 6, - "maxLength": 35 - }, - "routingNumber": { - "description": "ABA routing number for the bank account. Note this has to be specific for bank wire transfers.", + "walletAddress": { "type": "string", - "example": "121000248" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" - }, - "bankAddress": { - "$ref": "#/components/schemas/BankAddress" + "description": "Signet wallet address.", + "example": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd" } } }, - "BankAddressIbanSupported": { + "SignetInstruction": { "type": "object", - "description": "The address of the bank. City and country fields are required.", - "required": [ - "city", - "country" - ], "properties": { - "bankName": { - "type": "string", - "description": "Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN'", - "maxLength": 35, - "example": "SAN FRANCISCO" - }, - "city": { + "trackingRef": { "type": "string", - "description": "City portion of the address. This property is required for bank accounts outside of the US.", - "maxLength": 1024, - "example": "SAN FRANCISCO" + "description": "Circle tracking reference that needs to be set in the signet public description field.", + "example": "CIR13FB14A" }, - "country": { + "walletAddress": { "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" + "description": "Circle wallet address that needs to be set in the signet recipient wallet field.", + "example": "0x7e4f4fe03243ac7b291ebaee90b2bb27025a1234" + } + } + }, + "Address": { + "type": "string", + "description": "An alphanumeric string representing a blockchain address. Will be in different formats for different chains. It is important to preserve the exact formatting and capitalization of the address.", + "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" + }, + "AddressTag": { + "type": "string", + "description": "The secondary identifier for a blockchain address. An example of this is the memo field on the Stellar network, which can be text, id, or hash format.", + "nullable": true, + "example": "123456789" + }, + "Currency": { + "type": "string", + "description": "A currency associated with a balance or address.", + "nullable": true, + "enum": [ + "USD", + "EUR", + "BTC", + "ETH" + ] + }, + "AddressObject": { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/Address" }, - "line1": { - "type": "string", - "description": "Line one of the street address.", - "maxLength": 35, - "example": "100 Money Street" + "addressTag": { + "$ref": "#/components/schemas/AddressTag" }, - "line2": { - "type": "string", - "description": "Line two of the street address.", - "maxLength": 35, - "example": "Suite 1" + "currency": { + "$ref": "#/components/schemas/Currency" }, - "district": { - "type": "string", - "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", - "maxLength": 16, - "example": "CA" + "chain": { + "$ref": "#/components/schemas/Chain" } } }, - "WireCreationRequestIban": { + "BusinessAccountGenerateAddressRequest": { "type": "object", - "title": "Non US Bank Account - IBAN Supported", - "description": "Relevant fields for non-U.S. bank accounts that support IBAN.", "required": [ "idempotencyKey", - "iban", - "billingDetails", - "bankAddress" + "currency", + "chain" ], "properties": { "idempotencyKey": { "$ref": "#/components/schemas/IdempotencyKey" }, - "iban": { - "description": "International Bank Account Number (IBAN) for the bank account.", - "type": "string", - "example": "DE31100400480532013000" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" + "currency": { + "$ref": "#/components/schemas/Currency" }, - "bankAddress": { - "$ref": "#/components/schemas/BankAddressIbanSupported" + "chain": { + "$ref": "#/components/schemas/Chain" } } }, - "BankAddressNonIban": { + "BusinessAccountDescription": { + "type": "string", + "description": "An identifier or sentence that describes the recipient.", + "example": "My USDC address at a cryptocurrency exchange" + }, + "BusinessAccountRecipientAddressObject": { "type": "object", - "description": "The address of the bank. BankName, City and Country fields are required.", - "required": [ - "bankName", - "city", - "country" - ], "properties": { - "bankName": { - "type": "string", - "description": "Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN'", - "maxLength": 35, - "example": "SAN FRANCISCO" + "id": { + "$ref": "#/components/schemas/Id" }, - "city": { - "type": "string", - "description": "City portion of the address. This property is required for bank accounts outside of the US.", - "maxLength": 1024, - "example": "SAN FRANCISCO" + "address": { + "$ref": "#/components/schemas/Address" }, - "country": { - "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" + "addressTag": { + "$ref": "#/components/schemas/AddressTag" }, - "line1": { - "type": "string", - "description": "Line one of the street address.", - "maxLength": 35, - "example": "100 Money Street" + "chain": { + "$ref": "#/components/schemas/Chain" }, - "line2": { - "type": "string", - "description": "Line two of the street address.", - "maxLength": 35, - "example": "Suite 1" + "currency": { + "$ref": "#/components/schemas/Currency" }, - "district": { - "type": "string", - "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", - "maxLength": 16, - "example": "CA" + "description": { + "$ref": "#/components/schemas/BusinessAccountDescription" } } }, - "WireCreationRequestAccountNumber": { + "BusinessAccountRecipientAddressCreationRequest": { "type": "object", - "title": "Non US Bank Account - IBAN Not Supported", - "description": "Relevant fields for non-U.S. banks that do NOT support IBAN.", + "description": "Adds a recipient address. The currency parameter will default to USD for all chains except for BTC where it defaults to BTC.", "required": [ "idempotencyKey", - "accountNumber", - "routingNumber", - "billingDetails", - "bankAddress" + "address", + "chain", + "description" ], "properties": { "idempotencyKey": { "$ref": "#/components/schemas/IdempotencyKey" }, - "accountNumber": { - "description": "Account number that identifies the bank account.", - "type": "string", - "example": "0321800123", - "minLength": 6, - "maxLength": 35 - }, - "routingNumber": { - "description": "The bank's SWIFT / BIC code.", - "type": "string", - "example": "SBININBB354" + "address": { + "$ref": "#/components/schemas/Address" }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" + "addressTag": { + "$ref": "#/components/schemas/AddressTag" }, - "bankAddress": { - "$ref": "#/components/schemas/BankAddressNonIban" - } - } - }, - "WireCreationRequest": { - "type": "object", - "description": "Request object used to create a bank account (wires). Different fields are required depending on the bank country, see the guide documentation for the list of supported bank countries along with which ones support IBAN.", - "oneOf": [ - { - "$ref": "#/components/schemas/WireCreationRequestUS" + "chain": { + "$ref": "#/components/schemas/Chain" }, - { - "$ref": "#/components/schemas/WireCreationRequestIban" + "currency": { + "$ref": "#/components/schemas/Currency" }, - { - "$ref": "#/components/schemas/WireCreationRequestAccountNumber" + "description": { + "$ref": "#/components/schemas/BusinessAccountDescription" } - ] + } }, - "WireInstructionBeneficiary": { + "WalletLocation": { "type": "object", + "required": [ + "type", + "id" + ], "properties": { - "name": { - "type": "string", - "description": "Name of the beneficiary.", - "example": "CIRCLE INTERNET FINANCIAL INC" - }, - "address1": { + "type": { "type": "string", - "description": "Address line 1 of the beneficiary's address.", - "example": "99 HIGH STREET" + "enum": [ + "wallet" + ] }, - "address2": { + "id": { "type": "string", - "description": "Address line 2 of the beneficiary's address.", - "example": "BOSTON MA 02110" + "description": "The id of the wallet.", + "example": "12345" } } }, - "WireInstructionBeneficiaryBank": { + "FiatMoney": { "type": "object", + "required": [ + "amount", + "currency" + ], "properties": { - "name": { - "type": "string", - "description": "Name of the beneficiary's bank.", - "example": "SILVERGATE BANK" - }, - "swiftCode": { - "type": "string", - "description": "SWIFT code of the beneficiary's bank account.", - "example": "SIVGUS66XXX" - }, - "routingNumber": { - "type": "string", - "description": "ABA Routing number of the beneficiary's bank account.", - "example": "322286803" - }, - "accountNumber": { + "amount": { + "description": "Magnitude of the amount, in units of the currency, with a `.`.", "type": "string", - "description": "Account number of the beneficiary's bank account.", - "example": "****7427" + "example": "3.14" }, "currency": { + "description": "Currency code.", "type": "string", - "description": "Currency of the beneficiary's bank account.", - "example": "USD" - }, - "address": { - "type": "string", - "description": "Address of the beneficiary's bank.", - "example": "4250 EXECUTIVE SQUARE SUITE 300" - }, - "city": { - "type": "string", - "description": "City of the beneficiary's bank.", - "example": "LA JOLLA" - }, - "postalCode": { - "type": "string", - "description": "Postal code of the beneficiary's bank.", - "example": "02110" - }, - "country": { - "type": "string", - "description": "Country code of the beneficiary's bank. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "example": "US" + "enum": [ + "USD", + "EUR" + ] } } }, - "WireInstruction": { + "FiatMoneyUsd": { "type": "object", + "required": [ + "amount", + "currency" + ], "properties": { - "trackingRef": { - "type": "string", - "description": "Circle tracking reference that needs to be set in the wire reference field.", - "example": "CIR13FB13A" - }, - "beneficiary": { - "$ref": "#/components/schemas/WireInstructionBeneficiary" + "amount": { + "description": "Magnitude of the amount, in units of the currency, with a `.`.", + "type": "string", + "example": "3.14" }, - "beneficiaryBank": { - "$ref": "#/components/schemas/WireInstructionBeneficiaryBank" + "currency": { + "description": "Currency code.", + "type": "string", + "enum": [ + "USD" + ] } } }, - "SignetFiatAccountResponse": { + "BusinessAccountDeposit": { "type": "object", + "description": "A deposit", "required": [ "id", + "destination", + "amount", "status", - "trackingRef", - "walletAddress", - "createDate", - "updateDate" + "createDate" ], "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" - }, - "trackingRef": { + "sourceWalletId": { "type": "string", - "description": "Tracking ref that needs to be set in the public description field when you send the funds to Circle Signet wallet.", - "example": "CIR13FB14A" + "description": "The identifier for the bank account where the funds were deposited from.", + "format": "uuid", + "example": "9b57048d-2365-4ff5-956b-0199170d1035" }, - "walletAddress": { + "destination": { + "$ref": "#/components/schemas/WalletLocation" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoney" + }, + "fee": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "status": { "type": "string", - "description": "Your signet wallet address.", - "example": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd" + "description": "Status of the deposit. Status `pending` indicates that the deposit is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed.", + "enum": [ + "pending", + "complete", + "failed" + ] + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" @@ -8718,643 +8818,1016 @@ } } }, - "SignetFiatAccountCreationRequest": { + "CryptoPaymentsMoney": { "type": "object", "required": [ - "idempotencyKey", - "walletAddress" + "amount", + "currency" ], "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" + "amount": { + "description": "Magnitude of the amount, in units of the currency, with a `.`.", + "type": "string", + "example": "3.14" }, - "walletAddress": { + "currency": { + "description": "Currency code.", "type": "string", - "description": "Signet wallet address.", - "example": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd" + "enum": [ + "USD", + "ETH", + "BTC" + ] } } }, - "SignetInstruction": { + "PaymentMethodBlockchain": { "type": "object", + "required": [ + "type", + "chain" + ], "properties": { - "trackingRef": { + "type": { "type": "string", - "description": "Circle tracking reference that needs to be set in the signet public description field.", - "example": "CIR13FB14A" + "enum": [ + "blockchain" + ] }, - "walletAddress": { + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "address": { "type": "string", - "description": "Circle wallet address that needs to be set in the signet recipient wallet field.", - "example": "0x7e4f4fe03243ac7b291ebaee90b2bb27025a1234" + "readOnly": true, + "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" } } }, - "SenFiatAccountResponse": { + "PaymentIntentFees": { "type": "object", + "readOnly": true, "required": [ - "id", - "status", - "description", - "trackingRef", - "createDate", - "updateDate" + "type", + "amount", + "currency" ], "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" - }, - "description": { + "type": { "type": "string", - "description": "Bank name plus last four digits of the bank account number.", - "example": "SILVERGATE BANK ****1111" + "enum": [ + "blockchainLeaseFee", + "totalPaymentFees" + ] }, - "trackingRef": { + "amount": { + "description": "Magnitude of the amount, in units of the currency, with a `.`.", "type": "string", - "description": "Circle tracking reference that needs to be set in the memo field..", - "example": "CIR13FB14A" + "example": "3.14" }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "currency": { + "description": "Currency code.", + "type": "string", + "enum": [ + "USD" + ] + } + } + }, + "Timeline": { + "type": "object", + "readOnly": true, + "required": [ + "status", + "time" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "created", + "pending", + "complete", + "expired", + "failed" + ] }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "context": { + "type": "string", + "enum": [ + "underpaid", + "paid", + "overpaid" + ] }, - "currency": { + "time": { + "description": "ISO-8601 UTC date/time format.", "type": "string", - "description": "Currency of the fiat account.", - "example": "USD" + "format": "date-time" } } }, - "SenFiatAccountCreationRequest": { + "UTCTimestampReadOnly": { + "type": "string", + "readOnly": true, + "description": "ISO-8601 UTC date/time format.", + "example": "2020-04-10T02:13:30.000Z" + }, + "PaymentIntent": { "type": "object", "required": [ "idempotencyKey", - "accountNumber" + "amount", + "settlementCurrency", + "paymentMethods" ], "properties": { "idempotencyKey": { "$ref": "#/components/schemas/IdempotencyKey" }, - "accountNumber": { - "type": "string", - "description": "Silvergate SEN account number.", - "example": "12345678" + "id": { + "type": "string", + "readOnly": true, + "description": "Unique system generated identifier for the entity.", + "format": "uuid", + "example": "b8627ae8-732b-4d25-b947-1df8f4007a29" + }, + "amount": { + "$ref": "#/components/schemas/CryptoPaymentsMoney" + }, + "amountPaid": { + "description": "Sum of the the amount paid.", + "type": "object", + "readOnly": true, + "required": [ + "amount", + "currency" + ], + "properties": { + "amount": { + "description": "Magnitude of the amount, in units of the currency, with a `.`.", + "type": "string", + "example": "3.14" + }, + "currency": { + "description": "Currency code.", + "type": "string", + "enum": [ + "USD" + ] + } + } + }, + "settlementCurrency": { + "description": "Desired currency for the payments to settle in.", + "type": "string", + "enum": [ + "USD", + "BTC", + "ETH" + ] + }, + "paymentMethods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentMethodBlockchain" + } + }, + "fees": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/PaymentIntentFees" + } + }, + "paymentIds": { + "description": "List of associated payments.", + "type": "array", + "readOnly": true, + "items": { + "type": "string", + "format": "uuid", + "example": "69808f36-3e5e-4f37-bf82-ca79e4d70fc1" + } + }, + "timeline": { + "description": "State management timeline.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/Timeline" + } + }, + "expiresOn": { + "$ref": "#/components/schemas/UTCTimestampReadOnly" }, - "currency": { - "type": "string", - "description": "Currency of the Silvergate SEN account.", - "example": "USD" + "updateDate": { + "$ref": "#/components/schemas/UTCTimestampReadOnly" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestampReadOnly" } } }, - "SenInstruction": { + "IdMerchant": { + "type": "string", + "description": "Unique system generated identifier for the merchant.", + "format": "uuid", + "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" + }, + "SourceResponse": { "type": "object", + "description": "The payment source.", "properties": { - "trackingRef": { - "type": "string", - "description": "Circle tracking reference that needs to be set in the memo field.", - "example": "CIR13FB14A" - }, - "accountNumber": { - "type": "string", - "description": "Circle corporate Silvergate SEN account number that needs to be set as destination.", - "example": "11111111" + "id": { + "$ref": "#/components/schemas/Id" }, - "currency": { + "type": { "type": "string", - "description": "Currency of Circle corporate Silvergate SEN account.", - "example": "USD" + "description": "Type of the source.", + "enum": [ + "card", + "ach", + "wire", + "sepa" + ] } } }, - "IdentityAddress": { + "PaymentStatus": { + "type": "string", + "description": "Enumerated status of the payment. `pending` means the payment is waiting to be processed. `confirmed` means the payment has been approved by the bank and the merchant can treat it as successful, but settlement funds are not yet available to the merchant. `paid` means settlement funds have been received and are available to the merchant. `failed` means something went wrong (most commonly that the payment was denied). `action_required` means that additional steps are required to process this payment; refer to `requiredAction` for more details. Terminal states are `paid` and `failed`.", + "enum": [ + "pending", + "confirmed", + "paid", + "failed", + "action_required" + ] + }, + "RequiredAction": { "type": "object", + "description": "When the payment status is `action_required`, this object summarizes the required additional steps.", "required": [ - "line1", - "city", - "district", - "postalCode", - "country" + "type", + "redirectUrl" ], "properties": { - "line1": { - "type": "string", - "description": "Line one of the street address.", - "maxLength": 1024, - "example": "100 Money Street" - }, - "line2": { - "type": "string", - "description": "Line two of the street address.", - "maxLength": 1024, - "example": "Suite 1" - }, - "city": { - "type": "string", - "description": "City portion of the address.", - "maxLength": 1024, - "example": "Boston" - }, - "district": { - "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.", - "type": "string", - "maxLength": 16, - "example": "MA" - }, - "postalCode": { + "type": { "type": "string", - "description": "Postal / ZIP code of the address.", - "maxLength": 16, - "example": "01234" + "description": "The type of action that is required to proceed with the payment. Currently only one type is supported.", + "enum": [ + "three_d_secure_required" + ] }, - "country": { + "redirectUrl": { "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" + "description": "The URL to bring the user to in order to complete the payment.", + "example": "https://example.org" } } }, - "Identity": { - "type": "object", - "description": "The identity of the originator. Identities are required when:\n * `destination.type: \"blockchain\"`\n * `destination.chain: \"ETH\"`\n * `amount.amount` >= $3,000 in value\n", - "required": [ - "type", - "name", - "addresses" + "CancelRefundReversalStatus": { + "type": "string", + "enum": [ + "pending", + "confirmed", + "paid", + "failed" ], + "description": "Enumerated status of the payment. `pending` means the payment is waiting to be processed. `confirmed` means the payment has been approved by the bank and the merchant can treat it as successful, but settlement funds are not yet available to the merchant. `paid` means settlement funds have been received and are available to the merchant. `failed` means something went wrong (most commonly that the payment was denied). Terminal states are `paid` and `failed`." + }, + "PaymentInfoCancel": { + "type": "object", + "description": "Status information of the related cancel. This property is only present on canceled payment or refund items.", + "nullable": true, "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, "type": { "type": "string", - "description": "The type of identity for the originator.\n* `individual` - A uniquely distinguishable individual.\n* `business` - Any entity other than a natural person that can establish a permanent customer relationship with an affected entity or otherwise own property. This can include companies, foundations, anstalt, partnerships, associations and other relevantly similar entities.\n", + "description": "Type of the payment object.", "enum": [ - "individual", - "business" + "cancel" ] }, - "name": { + "description": { + "description": "Enumerated description of the payment item.", "type": "string", - "description": "Full name of the identity.", - "example": "Satoshi Nakamoto", - "maxLength": 1024 + "nullable": true, + "enum": [ + "Payment" + ] }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IdentityAddress" - } + "status": { + "$ref": "#/components/schemas/CancelRefundReversalStatus" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" } } }, - "TransferSourceWalletLocation": { - "description": "A source wallet location.", + "PaymentInfoPaymentAndRefund": { "type": "object", - "required": [ - "type", - "id" - ], + "description": "Status information of the related payment. This property is only present on refund or cancel items.", "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, "type": { "type": "string", + "description": "Type of the payment object.", "enum": [ - "wallet" + "payment", + "refund" ] }, - "id": { + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "description": { "type": "string", - "description": "The id of the wallet.", - "example": "12345" + "description": "Enumerated description of the payment item.", + "nullable": true, + "enum": [ + "Payment" + ] }, - "identities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Identity" - } + "status": { + "$ref": "#/components/schemas/PaymentStatus" + }, + "requiredAction": { + "$ref": "#/components/schemas/RequiredAction" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" } } }, - "TransferSourceBlockchainLocation": { - "description": "A source blockchain address.", + "Channel": { + "type": "string", + "format": "uuid", + "description": "The channel identifier that can be set for the payment. When not provided, the default channel is used.", + "example": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7" + }, + "FiatPayment": { "type": "object", + "description": "Status information of the related payment. This property is only present on refund or cancel items.", "required": [ + "id", "type", - "chain" + "merchantId", + "amount", + "source", + "status" ], "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, "type": { + "description": "Type of the payment object.", "type": "string", "enum": [ - "blockchain" + "payment" + ] + }, + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "source": { + "$ref": "#/components/schemas/SourceResponse" + }, + "description": { + "description": "Enumerated description of the payment.", + "type": "string", + "enum": [ + "Payment" ] }, - "chain": { - "$ref": "#/components/schemas/Chain" + "status": { + "$ref": "#/components/schemas/PaymentStatus" + }, + "captured": { + "description": "Determines if a payment has successfully been captured. This property is only present for payments that did not use auto capture.", + "type": "boolean" + }, + "captureAmount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "captureDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "requiredAction": { + "$ref": "#/components/schemas/RequiredAction" + }, + "cancel": { + "$ref": "#/components/schemas/PaymentInfoCancel" }, - "identities": { + "refunds": { "type": "array", "items": { - "$ref": "#/components/schemas/Identity" + "$ref": "#/components/schemas/PaymentInfoPaymentAndRefund" } - } - } - }, - "TransferSourceLocation": { - "description": "A source of funds.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferSourceWalletLocation" }, - { - "$ref": "#/components/schemas/TransferSourceBlockchainLocation" - } - ], - "discriminator": { - "propertyName": "type" - } - }, - "Address": { - "type": "string", - "description": "An alphanumeric string representing a blockchain address. Will be in different formats for different chains. It is important to preserve the exact formatting and capitalization of the address.", - "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" - }, - "AddressTag": { - "type": "string", - "description": "The secondary identifier for a blockchain address. An example of this is the memo field on the Stellar network, which can be text, id, or hash format.", - "nullable": true, - "example": "123456789" - }, - "TransferDestinationBlockchainLocation": { - "description": "A destination blockchain address.", - "type": "object", - "required": [ - "type", - "chain", - "address" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "blockchain" - ] + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" }, - "address": { - "$ref": "#/components/schemas/Address" + "channel": { + "$ref": "#/components/schemas/Channel" }, - "addressTag": { - "$ref": "#/components/schemas/AddressTag" + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" }, - "chain": { - "$ref": "#/components/schemas/Chain" + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" } } }, - "TransferDestinationWalletLocation": { - "description": "A destination wallet location.", + "CryptoPayment": { "type": "object", + "description": "Status information of the related payment. This property is only present on refund or cancel items.", "required": [ + "id", "type", - "id" + "merchantId", + "amount", + "source", + "status" ], "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, "type": { + "description": "Type of the payment object.", "type": "string", "enum": [ - "wallet" + "payment" ] }, - "id": { + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "status": { + "$ref": "#/components/schemas/PaymentStatus" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "paymentIntentId": { "type": "string", - "description": "The id of the wallet.", - "example": "12345" + "format": "uuid", + "example": "6e4d4047-db14-4c09-b238-1215aee50d03" }, - "address": { + "settlementAmount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "depositAddress": { + "type": "object", + "properties": { + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "address": { + "type": "string", + "example": "0x97de855690955e0da79ce5c1b6804847e7070c7f" + } + } + }, + "transactionHash": { "type": "string", - "description": "An alphanumeric string which indicates the wallet address used to receive the transfer. Will only be set when the transfer source is a blockchain address.", - "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" + "example": "0x7351585460bd657f320b9afa02a52c26d89272d0d10cc29913eb8b28e64fd906" }, - "addressTag": { - "$ref": "#/components/schemas/AddressTag" - } - } - }, - "TransferDestinationLocation": { - "description": "A destination of funds.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationBlockchainLocation" + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" }, - { - "$ref": "#/components/schemas/TransferDestinationWalletLocation" + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" } - ], - "discriminator": { - "propertyName": "type" } }, - "Fee": { + "FiatCancel": { "type": "object", + "description": "Status information of the related cancel. This property is only present on canceled payment or refund items.", + "nullable": true, "required": [ + "id", + "type", + "merchantId", "amount", - "currency", - "type" + "source", + "status" ], "properties": { - "amount": { - "type": "string", - "description": "Magnitude of the fee amount, in units of the currency, with a `.`.", - "example": "10.00" + "id": { + "$ref": "#/components/schemas/Id" }, - "currency": { + "type": { "type": "string", - "description": "Currency code for the amount.", + "description": "Type of the payment object.", "enum": [ - "USD" + "cancel" ] }, - "type": { + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "source": { + "$ref": "#/components/schemas/SourceResponse" + }, + "description": { + "description": "Enumerated description of the payment.", "type": "string", - "description": "Category of the fee.", "enum": [ - "network" + "Payment" ] + }, + "status": { + "$ref": "#/components/schemas/CancelRefundReversalStatus" + }, + "originalPayment": { + "$ref": "#/components/schemas/PaymentInfoPaymentAndRefund" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "channel": { + "$ref": "#/components/schemas/Channel" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" } } }, - "TransferErrorCode": { - "type": "string", - "description": "Indicates the failure reason of a transfer. Only present for transfers in a `failed` state. Possible values are `insufficient_funds`, `blockchain_error` and `transfer_denied` and `transfer_failed`", - "nullable": true, - "enum": [ - "transfer_failed", - "transfer_denied", - "blockchain_error", - "insufficient_funds" - ] - }, - "Transfer": { + "FiatRefund": { "type": "object", - "description": "A transfer of funds.", "required": [ "id", - "source", - "destination", + "type", + "merchantId", "amount", + "source", "status" ], "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "source": { - "$ref": "#/components/schemas/TransferSourceLocation" + "type": { + "description": "Type of the payment object.", + "type": "string", + "enum": [ + "refund" + ] }, - "destination": { - "$ref": "#/components/schemas/TransferDestinationLocation" + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" }, - "amount": { - "$ref": "#/components/schemas/Money" + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" }, - "fees": { - "description": "An array of fees applied to a transaction. This is only available when there is at least one non-zero fee.", - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/Fee" - } + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" }, - "transactionHash": { - "description": "A hash that uniquely identifies the onchain transaction. This is only available where either source or destination are of type blockchain.", - "type": "string", - "example": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63" + "source": { + "$ref": "#/components/schemas/SourceResponse" }, - "status": { - "description": "Status of the transfer. Status `pending` indicates that the transfer is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed.", + "description": { + "description": "Enumerated description of the payment.", "type": "string", - "enum": [ - "pending", - "complete", - "failed" + "enum": [ + "Payment" ] }, - "errorCode": { - "$ref": "#/components/schemas/TransferErrorCode" + "status": { + "$ref": "#/components/schemas/CancelRefundReversalStatus" + }, + "originalPayment": { + "$ref": "#/components/schemas/PaymentInfoPaymentAndRefund" + }, + "cancel": { + "$ref": "#/components/schemas/PaymentInfoCancel" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "channel": { + "$ref": "#/components/schemas/Channel" }, "createDate": { - "description": "The create date of the transfer.", - "type": "string", - "format": "date-time" + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" } } }, - "TransferRequestVerifiedBlockchainLocation": { + "MetadataPayment": { "type": "object", "required": [ - "type", - "addressId" + "email", + "sessionId", + "ipAddress" ], "properties": { + "email": { + "$ref": "#/components/schemas/Email" + }, + "phoneNumber": { + "$ref": "#/components/schemas/PhoneNumber" + }, + "sessionId": { + "$ref": "#/components/schemas/SessionId" + }, + "ipAddress": { + "$ref": "#/components/schemas/IpAddress" + } + } + }, + "Source": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, "type": { "type": "string", + "description": "Type of the source.", "enum": [ - "verified_blockchain" + "card", + "ach" ] - }, - "addressId": { - "type": "string", - "description": "The ID of the verified blockchain recipient address.", - "example": "f1f36b85-cafe-484e-a46b-02340bfdb927", - "format": "uuid" } } }, - "BusinessAccountTransferCreationRequest": { + "PaymentCreationRequest": { "type": "object", "required": [ "idempotencyKey", - "destination", - "amount" + "amount", + "verification", + "source", + "metadata" ], "properties": { "idempotencyKey": { "$ref": "#/components/schemas/IdempotencyKey" }, - "destination": { - "$ref": "#/components/schemas/TransferRequestVerifiedBlockchainLocation" + "keyId": { + "$ref": "#/components/schemas/IdKey" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPayment" }, "amount": { - "$ref": "#/components/schemas/Money" + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "autoCapture": { + "type": "boolean", + "description": "Triggers the automatic capture of the full payment amount. If set to false the payment will only be authorized but not captured.", + "default": true, + "example": true + }, + "verification": { + "type": "string", + "description": "Indicates the verification method for this payment.", + "enum": [ + "none", + "cvv", + "three_d_secure" + ] + }, + "verificationSuccessUrl": { + "type": "string", + "description": "The URL to redirect users to after successful 3DS authentication.", + "format": "url", + "example": "https://www.example.com/3ds/verificationsuccessful" + }, + "verificationFailureUrl": { + "type": "string", + "description": "The URL to redirect users to after failed 3DS authentication.", + "format": "url", + "example": "https://www.example.com/3ds/verificationfailure" + }, + "source": { + "$ref": "#/components/schemas/Source" + }, + "description": { + "type": "string", + "description": "Description of the payment with length restriction of 240 characters.", + "example": "Payment" + }, + "encryptedData": { + "type": "string", + "format": "byte", + "description": "PGP encrypted base64 encoded string. Contains CVV.\n* **CVV (Card Verification Number)**: Three or four digit security code. Only required if `verification` is `cvv`.\n", + "example": "UHVibGljS2V5QmFzZTY0RW5jb2RlZA==" + }, + "channel": { + "$ref": "#/components/schemas/Channel" } } }, - "Currency": { + "ThreeDSResult": { "type": "string", - "description": "A currency associated with a balance or address.", - "nullable": true, + "description": "Enumerated status of the check. `pass` indicates successful 3DS authentication. `fail` indicates failed 3DS authentication.", "enum": [ - "USD", - "EUR", - "BTC", - "ETH" + "pass", + "fail" ] }, - "AddressObject": { - "type": "object", - "properties": { - "address": { - "$ref": "#/components/schemas/Address" - }, - "addressTag": { - "$ref": "#/components/schemas/AddressTag" - }, - "currency": { - "$ref": "#/components/schemas/Currency" - }, - "chain": { - "$ref": "#/components/schemas/Chain" - } - } + "Eci": { + "type": "string", + "description": "ECI (electronic commerce indicator) value returned by Directory Servers (namely Visa, MasterCard, JCB, and American Express) indicating the outcome of authentication attempted on transactions enforced by 3DS.", + "enum": [ + "00", + "01", + "02", + "05", + "06", + "07" + ] }, - "BusinessAccountGenerateAddressRequest": { + "PaymentVerificationResponse": { "type": "object", + "description": "Indicates the status of the payment verification. This property will be present once the payment is confirmed.", "required": [ - "idempotencyKey", - "currency", - "chain" + "avs", + "cvv" ], "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" + "avs": { + "$ref": "#/components/schemas/AvsResults" }, - "currency": { - "$ref": "#/components/schemas/Currency" + "cvv": { + "$ref": "#/components/schemas/CvvResults" }, - "chain": { - "$ref": "#/components/schemas/Chain" + "threeDSecure": { + "$ref": "#/components/schemas/ThreeDSResult" + }, + "eci": { + "$ref": "#/components/schemas/Eci" } } }, - "BusinessAccountDescription": { + "PaymentErrorCode": { "type": "string", - "description": "An identifier or sentence that describes the recipient.", - "example": "My USDC address at a cryptocurrency exchange" + "description": "Indicates the failure reason of a payment. Only present for payments in failed state. Possible values are [`payment_failed`, `payment_fraud_detected`, `payment_denied`, `payment_not_supported_by_issuer`, `payment_not_funded`, `payment_unprocessable`, `payment_stopped_by_issuer`, `payment_canceled`, `payment_returned`, `payment_failed_balance_check`, `card_failed`, `card_invalid`, `card_address_mismatch`, `card_zip_mismatch`, `card_cvv_invalid`, `card_expired`, `card_limit_violated`, `card_not_honored`, `card_cvv_required`, `credit_card_not_allowed`, `card_account_ineligible`, `card_network_unsupported`, `channel_invalid`, `unauthorized_transaction`, `bank_account_ineligible`, `bank_transaction_error`, `invalid_account_number`, `invalid_wire_rtn`, `invalid_ach_rtn`, `vendor_inactive`]'", + "nullable": true, + "enum": [ + "payment_failed", + "payment_fraud_detected", + "payment_denied", + "payment_not_supported_by_issuer", + "payment_not_funded", + "payment_unprocessable", + "payment_stopped_by_issuer", + "payment_canceled", + "payment_returned", + "payment_failed_balance_check", + "card_failed", + "card_invalid", + "card_address_mismatch", + "card_zip_mismatch", + "card_cvv_invalid", + "card_expired", + "card_limit_violated", + "card_not_honored", + "card_cvv_required", + "card_restricted,", + "card_account_ineligible", + "card_network_unsupported", + "channel_invalid", + "unauthorized_transaction", + "bank_account_ineligible", + "bank_transaction_error", + "invalid_account_number", + "invalid_wire_rtn", + "invalid_ach_rtn", + "ref_id_invalid", + "account_name_mismatch", + "account_number_mismatch", + "account_ineligible", + "wallet_address_mismatch", + "customer_name_mismatch", + "institution_name_mismatch", + "vendor_inactive" + ] }, - "BusinessAccountRecipientAddressObject": { + "DetailedPayment": { "type": "object", + "required": [ + "id", + "type", + "merchantId", + "amount", + "source", + "status" + ], "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "address": { - "$ref": "#/components/schemas/Address" + "type": { + "description": "Type of the payment object.", + "type": "string", + "enum": [ + "payment" + ] + }, + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "source": { + "$ref": "#/components/schemas/SourceResponse" + }, + "description": { + "type": "string", + "description": "Enumerated description of the payment.", + "enum": [ + "Payment" + ] + }, + "status": { + "$ref": "#/components/schemas/PaymentStatus" + }, + "captured": { + "type": "boolean", + "description": "Determines if a payment has successfully been captured. This property is only present for payments that did not use auto capture." + }, + "captureAmount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "captureDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "requiredAction": { + "$ref": "#/components/schemas/RequiredAction" + }, + "verification": { + "$ref": "#/components/schemas/PaymentVerificationResponse" }, - "addressTag": { - "$ref": "#/components/schemas/AddressTag" + "cancel": { + "$ref": "#/components/schemas/FiatCancel" }, - "chain": { - "$ref": "#/components/schemas/Chain" + "refunds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FiatRefund" + } }, - "currency": { - "$ref": "#/components/schemas/Currency" + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" }, - "description": { - "$ref": "#/components/schemas/BusinessAccountDescription" - } - } - }, - "BusinessAccountRecipientAddressCreationRequest": { - "type": "object", - "description": "Adds a recipient address. The currency parameter will default to USD for all chains except for BTC where it defaults to BTC.", - "required": [ - "idempotencyKey", - "address", - "chain", - "description" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" + "trackingRef": { + "description": "Payment tracking reference. Will be present once known.", + "type": "string", + "nullable": true, + "example": "24910599141085313498894" }, - "address": { - "$ref": "#/components/schemas/Address" + "errorCode": { + "$ref": "#/components/schemas/PaymentErrorCode", + "nullable": true }, - "addressTag": { - "$ref": "#/components/schemas/AddressTag" + "metadata": { + "$ref": "#/components/schemas/MetadataPhoneEmail" }, - "chain": { - "$ref": "#/components/schemas/Chain" + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" }, - "currency": { - "$ref": "#/components/schemas/Currency" + "channel": { + "$ref": "#/components/schemas/Channel" }, - "description": { - "$ref": "#/components/schemas/BusinessAccountDescription" - } - } - }, - "WalletLocation": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "wallet" - ] + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" }, - "id": { - "type": "string", - "description": "The id of the wallet.", - "example": "12345" + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" } } }, - "BusinessAccountDeposit": { + "ExternalRef": { + "type": "string", + "description": "External network identifier which will be present once provided from the applicable network. \n\nExamples:\n* **Input/Output Message Accountability Data (IMAD/OMAD)**: unique number given to each FedWire payment when using the Federal Reserve Bank Service which can be used to investigate and track wire transfers.\n", + "example": "YYYYMMDDXXXXXXXX012345" + }, + "FiatPaymentPolymorphic": { "type": "object", - "description": "A deposit", "required": [ "id", - "destination", + "type", + "merchantId", "amount", - "status", - "createDate" + "source", + "status" ], "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "sourceWalletId": { + "type": { + "description": "Type of the payment object.", "type": "string", - "description": "The identifier for the bank account where the funds were deposited from.", - "format": "uuid", - "example": "9b57048d-2365-4ff5-956b-0199170d1035" + "enum": [ + "payment", + "refund", + "cancel" + ] }, - "destination": { - "$ref": "#/components/schemas/WalletLocation" + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" }, - "amount": { - "$ref": "#/components/schemas/FiatMoney" + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" }, - "fee": { + "amount": { "$ref": "#/components/schemas/FiatMoneyUsd" }, - "status": { + "source": { + "$ref": "#/components/schemas/SourceResponse" + }, + "description": { + "description": "Enumerated description of the payment.", "type": "string", - "description": "Status of the deposit. Status `pending` indicates that the deposit is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed.", "enum": [ - "pending", - "complete", - "failed" + "Payment" ] }, + "status": { + "$ref": "#/components/schemas/PaymentStatus" + }, + "requiredAction": { + "$ref": "#/components/schemas/RequiredAction" + }, + "verification": { + "$ref": "#/components/schemas/PaymentVerificationResponse" + }, + "originalPayment": { + "$ref": "#/components/schemas/FiatPayment" + }, + "cancel": { + "$ref": "#/components/schemas/FiatCancel" + }, + "refunds": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/FiatRefund" + } + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "trackingRef": { + "description": "Payment tracking reference. Will be present once known.", + "type": "string", + "nullable": true, + "example": "24910599141085313498894" + }, + "externalRef": { + "$ref": "#/components/schemas/ExternalRef" + }, + "errorCode": { + "$ref": "#/components/schemas/PaymentErrorCode" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPhoneEmail" + }, + "channel": { + "$ref": "#/components/schemas/Channel" + }, "riskEvaluation": { "$ref": "#/components/schemas/RiskEvaluation" }, @@ -9366,104 +9839,120 @@ } } }, - "MockSenPaymentBeneficiaryBankInstruction": { - "type": "object", - "required": [ - "accountNumber" - ], - "properties": { - "accountNumber": { - "type": "string", - "description": "Circle corporate Silvergate SEN account number that needs to be set as destination.", - "example": "11111111" - } - } - }, - "MockSenPaymentRequest": { + "CaptureCreationRequest": { "type": "object", "required": [ - "trackingRef", - "amount", - "beneficiaryBank" + "idempotencyKey" ], "properties": { - "trackingRef": { - "type": "string", - "description": "Circle tracking reference that needs to be set in the memo filed. This field is retrievable through the response during SEN account creation or via the bank instruction endpoint.", - "example": "CIR13FB13A" + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" }, "amount": { - "$ref": "#/components/schemas/FiatMoney" - }, - "beneficiaryBank": { - "$ref": "#/components/schemas/MockSenPaymentBeneficiaryBankInstruction" + "$ref": "#/components/schemas/FiatMoneyUsd" } } }, - "MockSenPaymentResponse": { + "ReversalReason": { + "type": "string", + "description": "Enumerated reason for a returned payment. Providing this reason in the request is recommended (to improve risk evaluation) but not required.", + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer", + "bank_transaction_error", + "invalid_account_number", + "insufficient_funds", + "payment_stopped_by_issuer", + "payment_returned", + "bank_account_ineligible", + "invalid_ach_rtn", + "unauthorized_transaction", + "payment_failed" + ] + }, + "CancelCreationRequest": { "type": "object", + "required": [ + "idempotencyKey" + ], "properties": { - "trackingRef": { - "type": "string", - "description": "Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint.", - "example": "CIR13FB13A" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "beneficiaryBank": { - "$ref": "#/components/schemas/MockSenPaymentBeneficiaryBankInstruction" + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" }, - "status": { - "type": "string", - "description": "Enumerated status of the wire payment. Status `pending` indicates that the wire payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed.", - "enum": [ - "pending", - "processed", - "failed" - ] + "reason": { + "$ref": "#/components/schemas/ReversalReason" } } }, - "Payout": { + "DetailedCancel": { "type": "object", + "required": [ + "id", + "type", + "merchantId", + "amount", + "source", + "status" + ], "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "sourceWalletId": { + "type": { + "description": "Type of the payment object.", "type": "string", - "description": "The identifier of the source wallet used to fund a payout.", - "example": "53535335" + "enum": [ + "cancel" + ] }, - "destination": { - "$ref": "#/components/schemas/BankDestination" + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" }, "amount": { "$ref": "#/components/schemas/FiatMoneyUsd" }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "source": { + "$ref": "#/components/schemas/SourceResponse" + }, + "description": { + "description": "Enumerated description of the payment.", + "type": "string", + "enum": [ + "Payment" + ] }, "status": { - "$ref": "#/components/schemas/PayoutStatus" + "$ref": "#/components/schemas/CancelRefundReversalStatus" + }, + "originalPayment": { + "$ref": "#/components/schemas/FiatPayment" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" }, "trackingRef": { - "description": "A payout tracking reference. Will be present once known.", + "description": "Payment tracking reference. Will be present once known.", + "type": "string", "nullable": true, - "example": "CIR-6ESOQANEP3NAO" + "example": "24910599141085313498894" }, "errorCode": { - "$ref": "#/components/schemas/PayoutErrorCode" + "$ref": "#/components/schemas/PaymentErrorCode" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPhoneEmail" }, "riskEvaluation": { "$ref": "#/components/schemas/RiskEvaluation" }, - "adjustments": { - "$ref": "#/components/schemas/FinalAdjustments" - }, - "return": { - "$ref": "#/components/schemas/UnwithdrawalObject" + "refund": { + "description": "If the cancel was made after a cutoff time period, it will be processed as a refund. This flag indicates that the cancel was processed as a refund'", + "type": "boolean", + "default": false }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" @@ -9473,93 +9962,91 @@ } } }, - "MetadataPayout": { - "type": "object", - "description": "Additional properties related to the payout beneficiary.", - "required": [ - "beneficiaryEmail" - ], - "properties": { - "beneficiaryEmail": { - "$ref": "#/components/schemas/Email" - } - } - }, - "PayoutCreationRequest": { + "RefundCreationRequest": { "type": "object", "required": [ "idempotencyKey", - "destination", - "amount", - "metadata" + "amount" ], "properties": { "idempotencyKey": { "$ref": "#/components/schemas/IdempotencyKey" }, - "source": { - "$ref": "#/components/schemas/WalletLocation" - }, - "destination": { - "$ref": "#/components/schemas/BankDestination" - }, "amount": { "$ref": "#/components/schemas/FiatMoneyUsd" }, - "metadata": { - "$ref": "#/components/schemas/MetadataPayout" + "reason": { + "$ref": "#/components/schemas/ReversalReason" } } }, - "DetailedPayout": { + "DetailedRefund": { "type": "object", + "required": [ + "id", + "type", + "merchantId", + "amount", + "source", + "status" + ], "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "sourceWalletId": { - "description": "The identifier of the source wallet used to fund a payout.", + "type": { + "description": "Type of the payment object.", "type": "string", - "example": "53535335" + "enum": [ + "refund" + ] }, - "destination": { - "$ref": "#/components/schemas/BankDestination" + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" }, "amount": { "$ref": "#/components/schemas/FiatMoneyUsd" }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "source": { + "$ref": "#/components/schemas/SourceResponse" }, - "status": { - "description": "Status of the payout. Status `pending` indicates that the payout is in process; `complete` indicates it finished successfully; `failed` indicates it failed.", + "description": { + "description": "Enumerated description of the payment.", "type": "string", "enum": [ - "pending", - "complete", - "failed" + "Payment" ] }, + "status": { + "$ref": "#/components/schemas/CancelRefundReversalStatus" + }, + "originalPayment": { + "$ref": "#/components/schemas/FiatPayment" + }, + "cancel": { + "$ref": "#/components/schemas/FiatCancel" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, "trackingRef": { - "description": "A payout tracking reference. Will be present once known.", + "description": "Payment tracking reference. Will be present once known.", + "type": "string", "nullable": true, - "example": "CIR-6ESOQANEP3NAO" - }, - "externalRef": { - "$ref": "#/components/schemas/ExternalRef" + "example": "24910599141085313498894" }, "errorCode": { - "$ref": "#/components/schemas/PayoutErrorCode" + "$ref": "#/components/schemas/PaymentErrorCode" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPhoneEmail" }, "riskEvaluation": { "$ref": "#/components/schemas/RiskEvaluation" }, - "adjustments": { - "$ref": "#/components/schemas/FinalAdjustments" - }, - "return": { - "$ref": "#/components/schemas/UnwithdrawalObject" - }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" }, @@ -9568,461 +10055,342 @@ } } }, - "TransferRequestSourceWalletLocation": { + "PayoutStatus": { + "type": "string", + "description": "Status of the payout. Status `pending` indicates that the payout is in process; `complete` indicates it finished successfully; `failed` indicates it failed.", + "enum": [ + "pending", + "complete", + "failed" + ] + }, + "PayoutDestinationType": { + "type": "string", + "description": "The destination bank account type.", + "enum": [ + "wire", + "ach", + "sepa" + ] + }, + "BankDestination": { "type": "object", + "description": "The destination bank account.", "required": [ "type", "id" ], "properties": { "type": { - "type": "string", - "enum": [ - "wallet" - ] + "$ref": "#/components/schemas/PayoutDestinationType" }, "id": { - "type": "string", - "description": "The id of the wallet.", - "example": "12345" - }, - "identities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Identity" - } - } - } - }, - "TransferRequestBlockchainLocation": { - "type": "object", - "required": [ - "type", - "address", - "chain" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "blockchain" - ] + "$ref": "#/components/schemas/Id" }, - "address": { + "name": { "type": "string", - "description": "The blockchain address.", - "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" - }, - "addressTag": { - "$ref": "#/components/schemas/AddressTag" - }, - "chain": { - "$ref": "#/components/schemas/Chain" + "description": "Bank name plus last four digits of the bank account number or IBAN.", + "readOnly": true, + "example": "COMMERZBANK AG ****3000" } } }, - "TransferCreationRequest": { + "PayoutErrorCode": { + "type": "string", + "nullable": true, + "description": "Indicates the failure reason of a payout. Only present for payouts in failed state. Possible values are [`insufficient_funds`, `transaction_denied`, `transaction_failed`, `transaction_returned`, `bank_transaction_error`, `fiat_account_limit_exceeded`, `invalid_bank_account_number`, `invalid_ach_rtn`, `invalid_wire_rtn`, `vendor_inactive`]'", + "enum": [ + "insufficient_funds", + "transaction_denied", + "transaction_failed", + "transaction_returned", + "bank_transaction_error", + "fiat_account_limit_exceeded", + "invalid_bank_account_number", + "invalid_ach_rtn", + "invalid_wire_rtn", + "vendor_inactive" + ] + }, + "FinalAdjustments": { "type": "object", - "required": [ - "idempotencyKey", - "source", - "destination", - "amount" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "source": { - "$ref": "#/components/schemas/TransferRequestSourceWalletLocation" - }, - "destination": { - "oneOf": [ - { - "$ref": "#/components/schemas/TransferRequestBlockchainLocation" - }, - { - "$ref": "#/components/schemas/WalletLocation" - } - ] + "description": "Final adjustment which increases (credits) or decreases (debits) the total returned amount to the source wallet.", + "nullable": true, + "properties": { + "fxCredit": { + "$ref": "#/components/schemas/FiatMoneyUsd" }, - "amount": { - "$ref": "#/components/schemas/Money" + "fxDebit": { + "$ref": "#/components/schemas/FiatMoneyUsd" } } }, - "TransferDetailedTransfer": { + "IdPayout": { + "type": "string", + "description": "Universally unique identifier (UUID v4) of the payout that is associated with the return.", + "format": "uuid", + "example": "abdb500d-4a59-457c-801f-2d418c8703ac" + }, + "UnwithdrawalObject": { "type": "object", - "description": "A transfer of funds.", - "required": [ - "id", - "source", - "destination", - "amount", - "status" - ], + "description": "Return information if the payout is returned by bank. Only present if `errorCode` of payout is `transaction_returned`.", + "nullable": true, "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "source": { - "$ref": "#/components/schemas/TransferSourceLocation" - }, - "destination": { - "$ref": "#/components/schemas/TransferDestinationLocation" + "payoutId": { + "$ref": "#/components/schemas/IdPayout" }, "amount": { - "$ref": "#/components/schemas/Money" + "$ref": "#/components/schemas/FiatMoneyUsd" }, "fees": { - "description": "An array of fees applied to a transaction. This is only available when there is at least one non-zero fee.", - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/Fee" - } + "$ref": "#/components/schemas/FiatMoneyUsd" }, - "transactionHash": { + "reason": { "type": "string", - "description": "A hash that uniquely identifies the onchain transaction. This is only available where either source or destination are of type blockchain.", - "example": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63" + "description": "Reason for the return.", + "example": "payout_returned" }, "status": { "type": "string", - "description": "Status of the transfer. Status `pending` indicates that the transfer is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed.", + "description": "Status of the return. A `pending` status indicates that the return is in process; `complete` indicates it finished successfully; `failed` indicates it failed.", "enum": [ - "failed", "pending", - "complete" + "complete", + "failed" ] }, - "errorCode": { - "$ref": "#/components/schemas/TransferErrorCode" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" } } }, - "ACHBillingDetails": { + "PayoutBusinessAccount": { "type": "object", - "description": "Billing details of the account holder.", - "required": [ - "name" - ], "properties": { - "name": { - "type": "string", - "description": "Full name of the card or bank account holder.", - "maxLength": 1024, - "example": "Satoshi Nakamoto" + "id": { + "$ref": "#/components/schemas/Id" }, - "city": { + "sourceWalletId": { "type": "string", - "description": "City portion of the address.", - "maxLength": 1024, - "example": "Boston" + "description": "The identifier of the source wallet used to fund a payout.", + "example": "53535335" }, - "country": { - "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" + "destination": { + "$ref": "#/components/schemas/BankDestination" }, - "line1": { - "type": "string", - "description": "Line one of the street address.", - "maxLength": 1024, - "example": "100 Money Street" + "amount": { + "$ref": "#/components/schemas/FiatMoney" }, - "line2": { - "type": "string", - "description": "Line two of the street address.", - "maxLength": 1024, - "example": "Suite 1" + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" }, - "district": { - "type": "string", - "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.", - "maxLength": 16, - "example": "MA" + "status": { + "$ref": "#/components/schemas/PayoutStatus" }, - "postalCode": { - "type": "string", - "description": "Postal / ZIP code of the address.", - "maxLength": 16, - "example": "01234" + "trackingRef": { + "description": "A payout tracking reference. Will be present once known.", + "nullable": true, + "example": "CIR-6ESOQANEP3NAO" + }, + "errorCode": { + "$ref": "#/components/schemas/PayoutErrorCode" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "adjustments": { + "$ref": "#/components/schemas/FinalAdjustments" + }, + "return": { + "$ref": "#/components/schemas/UnwithdrawalObject" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" } } }, - "ACHBankAccountType": { - "type": "string", - "description": "Retail account (individual consumer account) or Business account (e.g. sole prop, LLC, corporation).", - "nullable": true, - "enum": [ - "retail", - "business" - ] - }, - "SessionId": { - "description": "Hash of the session identifier; typically of the end user. This helps us make risk decisions and prevent fraud. IMPORTANT: Please hash the session identifier to prevent sending us actual session identifiers.\n", - "type": "string", - "maxLength": 50, - "example": "DE6FA86F60BB47B379307F851E238617" - }, - "IpAddress": { - "type": "string", - "description": "Single IPv4 or IPv6 address of user'", - "example": "244.28.239.130" - }, - "MetadataCardAndAch": { + "BusinessAccountDestinationRequest": { "type": "object", + "description": "The destination bank account.", "required": [ - "email", - "sessionId", - "ipAddress" + "type", + "id" ], "properties": { - "email": { - "$ref": "#/components/schemas/Email" - }, - "phoneNumber": { - "$ref": "#/components/schemas/PhoneNumber" - }, - "sessionId": { - "$ref": "#/components/schemas/SessionId" + "type": { + "type": "string", + "enum": [ + "wire", + "sen" + ] }, - "ipAddress": { - "$ref": "#/components/schemas/IpAddress" + "id": { + "$ref": "#/components/schemas/Id" } } }, - "ACHCreationRequest": { + "BusinessAccountPayoutCreationRequest": { "type": "object", "required": [ "idempotencyKey", - "plaidProcessorToken", - "billingDetails", - "metadata" + "destination", + "amount" ], "properties": { "idempotencyKey": { "$ref": "#/components/schemas/IdempotencyKey" }, - "plaidProcessorToken": { - "type": "string", - "description": "The token for the ACH account provided by the processor (Plaid).", - "example": "processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621" - }, - "billingDetails": { - "$ref": "#/components/schemas/ACHBillingDetails" - }, - "bankAccountType": { - "$ref": "#/components/schemas/ACHBankAccountType" + "destination": { + "$ref": "#/components/schemas/BusinessAccountDestinationRequest" }, - "metadata": { - "$ref": "#/components/schemas/MetadataCardAndAch" + "amount": { + "$ref": "#/components/schemas/FiatMoney" } } }, - "AccountNumberMasked": { - "type": "string", - "description": "The redacted account number of the ACH account.", - "example": "****6789" - }, - "RoutingNumber": { - "type": "string", - "description": "The routing number of the ACH account.", - "example": "613334455" - }, - "AchVerificationErrorCodes": { - "type": "string", - "description": "Indicates the failure reason of the ACH account. Only present on failed accounts. Possible values are [bank_account_authorization_expired, bank_account_error, bank_account_ineligible, bank_account_not_found, bank_account_unauthorized, unsupported_routing_number, verification_failed].", - "nullable": true, - "enum": [ - "bank_account_authorization_expired", - "bank_account_error", - "bank_account_ineligible", - "bank_account_not_found", - "bank_account_unauthorized", - "unsupported_routing_number", - "verification_failed" - ] - }, - "ACH": { + "Payout": { "type": "object", - "required": [ - "id", - "accountNumber", - "routingNumber", - "description", - "billingDetails", - "bankAddress", - "fingerprint", - "metadata", - "createDate", - "updateDate" - ], "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" - }, - "accountNumber": { - "$ref": "#/components/schemas/AccountNumberMasked" + "sourceWalletId": { + "type": "string", + "description": "The identifier of the source wallet used to fund a payout.", + "example": "53535335" }, - "routingNumber": { - "$ref": "#/components/schemas/RoutingNumber" + "destination": { + "$ref": "#/components/schemas/BankDestination" }, - "billingDetails": { - "$ref": "#/components/schemas/ACHBillingDetails" + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" }, - "bankAccountType": { - "$ref": "#/components/schemas/ACHBankAccountType" + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" }, - "bankAddress": { - "$ref": "#/components/schemas/BankAddress" + "status": { + "$ref": "#/components/schemas/PayoutStatus" }, - "fingerprint": { - "$ref": "#/components/schemas/Fingerprint" + "trackingRef": { + "description": "A payout tracking reference. Will be present once known.", + "nullable": true, + "example": "CIR-6ESOQANEP3NAO" }, "errorCode": { - "$ref": "#/components/schemas/AchVerificationErrorCodes" + "$ref": "#/components/schemas/PayoutErrorCode" }, "riskEvaluation": { "$ref": "#/components/schemas/RiskEvaluation" }, + "adjustments": { + "$ref": "#/components/schemas/FinalAdjustments" + }, + "return": { + "$ref": "#/components/schemas/UnwithdrawalObject" + }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" }, "updateDate": { "$ref": "#/components/schemas/UTCTimestamp" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPhoneEmail" - } - } - }, - "MockAchAccount": { - "type": "object", - "required": [ - "accountNumber", - "routingNumber", - "description" - ], - "properties": { - "accountNumber": { - "type": "string", - "description": "The account number of the ACH account.", - "example": "123456789" - }, - "routingNumber": { - "type": "string", - "description": "The routing number of the ACH account.\n\nFor sandbox testing, valid routing numbers include `011000028`, `011201762`, `011500120`, `021214862`, `121000248`, `121140399`, `211073473`, `221172610`, and `011000138`.\n", - "example": "011000028" - }, - "description": { - "type": "string", - "description": "A description for the ACH account.", - "example": "My ACH account" } } }, - "MockAchAccountCreationRequest": { + "MetadataPayout": { "type": "object", + "description": "Additional properties related to the payout beneficiary.", "required": [ - "account", - "balance" + "beneficiaryEmail" ], "properties": { - "account": { - "$ref": "#/components/schemas/MockAchAccount" - }, - "balance": { - "$ref": "#/components/schemas/FiatMoneyUsd" - } - } - }, - "MockAchAccountResponse": { - "type": "object", - "properties": { - "processorToken": { - "type": "string", - "description": "The processor token needs to be provided when linking an ACH account against this mock.", - "example": "processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621" - }, - "balance": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "account": { - "$ref": "#/components/schemas/MockAchAccount" + "beneficiaryEmail": { + "$ref": "#/components/schemas/Email" } } }, - "SEPACreationRequest": { + "PayoutCreationRequest": { "type": "object", "required": [ "idempotencyKey", - "accountName", - "iban", - "billingDetails" + "destination", + "amount", + "metadata" ], "properties": { "idempotencyKey": { "$ref": "#/components/schemas/IdempotencyKey" }, - "iban": { - "type": "string", - "description": "International Bank Account Number (IBAN) for the bank account.", - "example": "DE31100400480532013000" + "source": { + "$ref": "#/components/schemas/WalletLocation" }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" + "destination": { + "$ref": "#/components/schemas/BankDestination" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPayout" } } }, - "SEPA": { + "DetailedPayout": { "type": "object", - "required": [ - "id", - "status", - "description", - "trackingRef", - "fingerprint", - "billingDetails", - "createDate", - "updateDate" - ], "properties": { "id": { "$ref": "#/components/schemas/Id" }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" + "sourceWalletId": { + "description": "The identifier of the source wallet used to fund a payout.", + "type": "string", + "example": "53535335" }, - "description": { + "destination": { + "$ref": "#/components/schemas/BankDestination" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "status": { + "description": "Status of the payout. Status `pending` indicates that the payout is in process; `complete` indicates it finished successfully; `failed` indicates it failed.", "type": "string", - "description": "Bank name plus last four digits of the IBAN.", - "example": "Bank of Ireland ****0010" + "enum": [ + "pending", + "complete", + "failed" + ] }, "trackingRef": { - "type": "string", - "description": "Tracking reference that needs to be set in the payment details or description.", - "example": "CIR13FB13A" + "description": "A payout tracking reference. Will be present once known.", + "nullable": true, + "example": "CIR-6ESOQANEP3NAO" }, - "fingerprint": { - "$ref": "#/components/schemas/Fingerprint" + "externalRef": { + "$ref": "#/components/schemas/ExternalRef" + }, + "errorCode": { + "$ref": "#/components/schemas/PayoutErrorCode" }, "riskEvaluation": { "$ref": "#/components/schemas/RiskEvaluation" }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" + "adjustments": { + "$ref": "#/components/schemas/FinalAdjustments" + }, + "return": { + "$ref": "#/components/schemas/UnwithdrawalObject" }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" @@ -10032,214 +10400,177 @@ } } }, - "CaptureCreationRequest": { + "Settlement": { "type": "object", - "required": [ - "idempotencyKey" - ], "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" + "id": { + "$ref": "#/components/schemas/Id" }, - "amount": { + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "walletId": { + "description": "If this settlement was used for a marketplace payment, the wallet involved in the settlement. Not included for standard merchant settlements.", + "type": "string", + "example": "12345" + }, + "totalDebits": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "totalCredits": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "paymentFees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "chargebackFees": { "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" } } }, - "ReversalReason": { + "IdPayment": { "type": "string", - "description": "Enumerated reason for a returned payment. Providing this reason in the request is recommended (to improve risk evaluation) but not required.", + "description": "Unique system generated identifier for the payment that is associated to the chargeback item.", + "format": "uuid", + "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" + }, + "ChargebackCategories": { + "type": "string", + "description": "Enumerated category of the chargeback status codes based on the chargeback status code.", "enum": [ - "duplicate", - "fraudulent", - "requested_by_customer", - "bank_transaction_error", - "invalid_account_number", - "insufficient_funds", - "payment_stopped_by_issuer", - "payment_returned", - "bank_account_ineligible", - "invalid_ach_rtn", - "unauthorized_transaction", - "payment_failed" + "Canceled Recurring Payment", + "Customer Dispute", + "Fraudulent", + "General", + "Processing Error", + "Not Defined" ] }, - "CancelCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "reason": { - "$ref": "#/components/schemas/ReversalReason" - } - } + "IdSettlement": { + "type": "string", + "description": "Unique system generated identifier for the settlement related to the chargeback history.", + "format": "uuid", + "nullable": true, + "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" }, - "DetailedCancel": { + "BasicChargebackHistory": { "type": "object", - "required": [ - "id", - "type", - "merchantId", - "amount", - "source", - "status" + "required": [ + "type", + "chargebackAmount", + "description" ], "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, "type": { - "description": "Type of the payment object.", "type": "string", + "description": "Enumerated type of the chargeback history event. `1st Chargeback` represents the first stage of the dispute procedure initiated by the cardholder’s issuing bank.\n `2nd Chargeback` represents the second stage of the dispute procedure initiated by the cardholder’s issuing bank (This stage is MasterCard only).\n `Chargeback Reversal` represents when 1st Chargeback or 2nd Chargeback is withdrawn by the issuer.\n `Representment` represents the stage when merchants decided to dispute 1st Chargeback or 2nd Chargeback.\n `Chargeback Settlement` can imply one of the two: 1) If merchant or marketplace is taking the lost of the chargeback, money will be debit from the wallet during this stage.\n 2) If merchant of marketplace successfully dispute the chargeback, money will be credit back to the wallet during this stage.\n", "enum": [ - "cancel" + "1st Chargeback", + "2nd Chargeback", + "Chargeback Reversal", + "Representment", + "Chargeback Settlement" ] }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { + "chargebackAmount": { "$ref": "#/components/schemas/FiatMoneyUsd" }, - "source": { - "$ref": "#/components/schemas/SourceResponse" - }, - "description": { - "description": "Enumerated description of the payment.", - "type": "string", - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/CancelRefundReversalStatus" - }, - "originalPayment": { - "$ref": "#/components/schemas/FiatPayment" - }, - "fees": { + "fee": { "$ref": "#/components/schemas/FiatMoneyUsd" }, - "trackingRef": { - "description": "Payment tracking reference. Will be present once known.", + "description": { "type": "string", - "nullable": true, - "example": "24910599141085313498894" - }, - "errorCode": { - "$ref": "#/components/schemas/PaymentErrorCode" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPhoneEmail" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" + "description": "The reason the chargeback was created.", + "example": "The cardholder claims an unauthorized transaction occurred." }, - "refund": { - "description": "If the cancel was made after a cutoff time period, it will be processed as a refund. This flag indicates that the cancel was processed as a refund'", - "type": "boolean", - "default": false + "settlementId": { + "$ref": "#/components/schemas/IdSettlement" }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" } } }, - "RefundCreationRequest": { + "BasicChargeback": { "type": "object", "required": [ - "idempotencyKey", - "amount" + "id", + "paymentId", + "merchantId", + "history", + "reasonCode" ], "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" + "id": { + "$ref": "#/components/schemas/Id" }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "paymentId": { + "$ref": "#/components/schemas/IdPayment" }, - "reason": { - "$ref": "#/components/schemas/ReversalReason" + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "reasonCode": { + "description": "Reason code given by the card network for the chargeback item.", + "type": "string", + "example": "10.4" + }, + "category": { + "$ref": "#/components/schemas/ChargebackCategories" + }, + "history": { + "type": "array", + "description": "The chargeback item's history list will be sorted by create date descending: more recent chargeback statuses will be at the beginning of the list.\n", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/BasicChargebackHistory" + } } } }, - "DetailedRefund": { + "Reversal": { "type": "object", "required": [ "id", - "type", - "merchantId", + "paymentId", "amount", - "source", - "status" + "description", + "status", + "reason", + "fees", + "createDate", + "updateDate" ], "properties": { "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "description": "Type of the payment object.", - "type": "string", - "enum": [ - "refund" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" + "$ref": "#/components/schemas/IdKey" }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" + "paymentId": { + "$ref": "#/components/schemas/IdPayment" }, "amount": { "$ref": "#/components/schemas/FiatMoneyUsd" }, - "source": { - "$ref": "#/components/schemas/SourceResponse" - }, "description": { - "description": "Enumerated description of the payment.", "type": "string", - "enum": [ - "Payment" - ] + "description": "Enumerated description of the payment.", + "example": "Merchant Payment Reversal" }, "status": { "$ref": "#/components/schemas/CancelRefundReversalStatus" }, - "originalPayment": { - "$ref": "#/components/schemas/FiatPayment" - }, - "cancel": { - "$ref": "#/components/schemas/FiatCancel" + "reason": { + "$ref": "#/components/schemas/ReversalReason" }, "fees": { "$ref": "#/components/schemas/FiatMoneyUsd" }, - "trackingRef": { - "description": "Payment tracking reference. Will be present once known.", - "type": "string", - "nullable": true, - "example": "24910599141085313498894" - }, - "errorCode": { - "$ref": "#/components/schemas/PaymentErrorCode" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPhoneEmail" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" }, @@ -10248,101 +10579,55 @@ } } }, - "MockWirePaymentBeneficiaryBankInstruction": { - "type": "object", - "required": [ - "accountNumber" - ], - "properties": { - "accountNumber": { - "type": "string", - "description": "Virtual account number or Circle corporate Silvergate Wire account number that needs to be set as destination.", - "example": "11111111" - } - } - }, - "MockWirePaymentRequest": { + "Wallet": { "type": "object", - "required": [ - "trackingRef", - "amount", - "beneficiaryBank" - ], "properties": { - "trackingRef": { + "walletId": { "type": "string", - "description": "Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint.", - "example": "CIR13FB13A" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "description": "Wallet identifier. Numeric value but should be treated as a string as format may change in the future'", + "example": "434000" }, - "beneficiaryBank": { - "$ref": "#/components/schemas/MockWirePaymentBeneficiaryBankInstruction" - } - } - }, - "MockWirePaymentResponse": { - "type": "object", - "properties": { - "trackingRef": { + "entityId": { "type": "string", - "description": "Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint.", - "example": "CIR13FB13A" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "beneficiaryBank": { - "$ref": "#/components/schemas/MockWirePaymentBeneficiaryBankInstruction" + "description": "Universally unique identifier (UUID v4) of the entity that owns the wallet.", + "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" }, - "status": { + "type": { "type": "string", - "description": "Enumerated status of the wire payment. Status `pending` indicates that the wire payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed.", + "description": "Wallet type.", "enum": [ - "pending", - "processed", - "failed" + "end_user_wallet" ] - } - } - }, - "MockSepaPaymentRequest": { - "type": "object", - "required": [ - "trackingRef", - "amount" - ], - "properties": { - "trackingRef": { + }, + "description": { "type": "string", - "description": "SEPA tracking reference that needs to be set in the payment details or description.", - "example": "CIR13FB13A" + "description": "A human-friendly, non-unique identifier for a wallet.", + "example": "Treasury Wallet", + "maxLength": 255 }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "balances": { + "description": "A list of balances for currencies owned by the wallet.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Money" + } } } }, - "MockSepaPaymentResponse": { - "type": "object", - "properties": { - "trackingRef": { - "type": "string", - "description": "SEPA tracking reference that needs to be set in the payment details or description.", - "example": "CIR13FB13A" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "WalletCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" }, - "status": { + "description": { "type": "string", - "description": "Enumerated status of the SEPA payment. Status `pending` indicates that the SEPA payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed.", - "enum": [ - "pending", - "processed", - "failed" - ] + "description": "A human-friendly, non-unique identifier for a wallet.", + "example": "Treasury Wallet", + "maxLength": 255 } } }, @@ -10365,812 +10650,736 @@ } } }, - "SimpleBillingDetails": { + "IdentityAddress": { "type": "object", - "description": "Billing details of the card holder.", "required": [ - "country", - "district" + "line1", + "city", + "district", + "postalCode", + "country" ], "properties": { - "country": { + "line1": { "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" + "description": "Line one of the street address.", + "maxLength": 1024, + "example": "100 Money Street" + }, + "line2": { + "type": "string", + "description": "Line two of the street address.", + "maxLength": 1024, + "example": "Suite 1" + }, + "city": { + "type": "string", + "description": "City portion of the address.", + "maxLength": 1024, + "example": "Boston" }, "district": { + "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.", "type": "string", - "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", "maxLength": 16, "example": "MA" - } - } - }, - "CardVerificationResponse": { - "type": "object", - "description": "Indicates the status of the card for verification purposes.", - "required": [ - "avs", - "cvv" - ], - "properties": { - "avs": { - "$ref": "#/components/schemas/AvsResults" }, - "cvv": { - "$ref": "#/components/schemas/CvvResults" + "postalCode": { + "type": "string", + "description": "Postal / ZIP code of the address.", + "maxLength": 16, + "example": "01234" + }, + "country": { + "type": "string", + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" } } }, - "SimpleCard": { + "Identity": { "type": "object", + "description": "The identity of the originator. Identities are required when:\n * `destination.type: \"blockchain\"`\n * `destination.chain: \"ETH\"`\n * `amount.amount` >= $3,000 in value\n", "required": [ - "id", - "status", - "fingerprint", - "billingDetails", - "expMonth", - "expYear", - "network", - "verification", - "createDate", - "updateDate" + "type", + "name", + "addresses" ], "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" - }, - "billingDetails": { - "$ref": "#/components/schemas/SimpleBillingDetails" - }, - "expMonth": { - "type": "integer", - "description": "Two digit number representing the card's expiration month.", - "example": 1 - }, - "expYear": { - "type": "integer", - "description": "Four digit number representing the card's expiration year.", - "example": 2020 - }, - "network": { + "type": { "type": "string", - "description": "The network of the card.", + "description": "The type of identity for the originator.\n* `individual` - A uniquely distinguishable individual.\n* `business` - Any entity other than a natural person that can establish a permanent customer relationship with an affected entity or otherwise own property. This can include companies, foundations, anstalt, partnerships, associations and other relevantly similar entities.\n", "enum": [ - "VISA", - "MASTERCARD", - "AMEX", - "UNKNOWN" + "individual", + "business" ] }, - "bin": { - "type": "string", - "description": "The bank identification number (BIN), the first 6 digits of the card.", - "example": "401230" - }, - "issuerCountry": { + "name": { "type": "string", - "description": "The country code of the issuer bank. Follows the ISO 3166-1 alpha-2 standard.", - "example": "US" - }, - "fingerprint": { - "$ref": "#/components/schemas/Fingerprint" - }, - "verification": { - "$ref": "#/components/schemas/CardVerificationResponse" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "description": "Full name of the identity.", + "example": "Satoshi Nakamoto", + "maxLength": 1024 }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "addresses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IdentityAddress" + } } } }, - "IdKey": { - "type": "string", - "description": "Universally unique identifier (UUID v4) of the public key used in encryption. NOTE the sandbox environment uses the default value of `key1`. For this reason the example supplied is `key1` rather than a UUID.", - "format": "uuid", - "example": "key1" - }, - "CardExpMonth": { - "type": "integer", - "description": "Two digit number representing the card's expiration month.", - "minimum": 1, - "maximum": 12, - "example": 1 - }, - "CardExpYear": { - "type": "integer", - "description": "Four digit number representing the card's expiration year.", - "minimum": 1, - "maximum": 9999, - "example": 2020 - }, - "CardCreationRequest": { + "TransferSourceWalletLocation": { + "description": "A source wallet location.", "type": "object", "required": [ - "idempotencyKey", - "expMonth", - "expYear", - "encryptedData", - "billingDetails", - "metadata" + "type", + "id" ], "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "keyId": { - "$ref": "#/components/schemas/IdKey" - }, - "encryptedData": { + "type": { "type": "string", - "format": "byte", - "description": "PGP encrypted base64 encoded string. Contains Number and CVV.\n* **Number**: Card number. No spaces or other separators. REQUIRED\n* **CVV (Card Verification Number)**: Three or four digit security code. REQUIRED'\n", - "example": "LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tCgp3Y0JNQTBYV1NGbEZScFZoQVFmL2J2bVVkNG5LZ3dkbExKVTlEdEFEK0p5c0VOTUxuOUlRUWVGWnZJUWEKMGgzQklpRFNRU0RMZmI0NEs2SXZMeTZRbm54bmFLcWx0MjNUSmtPd2hGWFIrdnNSMU5IbnVHN0lUNWJECmZzeVdleXlNK1JLNUVHV0thZ3NmQ2tWamh2NGloY29xUnlTTGtJbWVmRzVaR0tMRkJTTTBsTFNPWFRURQpiMy91eU1zMVJNb3ZiclNvbXkxa3BybzUveWxabWVtV2ZsU1pWQlhNcTc1dGc1YjVSRVIraXM5ckc0cS8KMXl0M0FOYXA3UDhKekFhZVlyTnVNZGhGZFhvK0NFMC9CQnN3L0NIZXdhTDk4SmRVUEV0NjA5WFRHTG9kCjZtamY0YUtMQ01xd0RFMkNVb3dPdE8vMzVIMitnVDZKS3FoMmtjQUQyaXFlb3luNWcralRHaFNyd3NKWgpIdEphQWVZZXpGQUVOaFo3Q01IOGNsdnhZVWNORnJuNXlMRXVGTkwwZkczZy95S3loclhxQ0o3UFo5b3UKMFVxQjkzQURKWDlJZjRBeVQ2bU9MZm9wUytpT2lLall4bG1NLzhlVWc3OGp1OVJ5T1BXelhyTzdLWTNHClFSWm8KPXc1dEYKLS0tLS1FTkQgUEdQIE1FU1NBR0UtLS0tLQo" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" - }, - "expMonth": { - "$ref": "#/components/schemas/CardExpMonth" + "enum": [ + "wallet" + ] }, - "expYear": { - "$ref": "#/components/schemas/CardExpYear" + "id": { + "type": "string", + "description": "The id of the wallet.", + "example": "12345" }, - "metadata": { - "$ref": "#/components/schemas/MetadataCardAndAch" + "identities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Identity" + } } } }, - "VerificationErrorCode": { - "type": "string", - "description": "Indicates the failure reason of the card verification. Only present on cards with failed verification. Possible values are [verification_failed, verification_fraud_detected, verification_denied, verification_not_supported_by_issuer, verification_stopped_by_issuer, card_failed, card_invalid, card_address_mismatch, card_zip_mismatch, card_cvv_invalid, card_expired, card_limit_violated, card_not_honored, card_cvv_required, credit_card_not_allowed, card_account_ineligible, card_network_unsupported]'", - "nullable": true, - "enum": [ - "verification_failed", - "verification_fraud_detected", - "verification_denied", - "verification_not_supported_by_issuer", - "verification_stopped_by_issuer", - "card_failed", - "card_invalid", - "card_address_mismatch", - "card_zip_mismatch", - "card_cvv_invalid", - "card_expired", - "card_limit_violated", - "card_not_honored", - "card_cvv_required", - "credit_card_not_allowed", - "card_account_ineligible", - "card_network_unsupported" - ] - }, - "Card": { + "TransferSourceBlockchainLocation": { + "description": "A source blockchain address.", "type": "object", "required": [ - "id", - "status", - "billingDetails", - "expMonth", - "expYear", - "network", - "last4", - "fingerprint", - "verification", - "metadata", - "createDate", - "updateDate" + "type", + "chain" ], "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" - }, - "expMonth": { - "$ref": "#/components/schemas/CardExpMonth" - }, - "expYear": { - "$ref": "#/components/schemas/CardExpYear" - }, - "network": { + "type": { "type": "string", - "description": "The network of the card.", "enum": [ - "VISA", - "MASTERCARD", - "AMEX", - "UNKNOWN" + "blockchain" ] }, - "last4": { - "type": "string", - "description": "The last 4 digits of the card.", - "example": "0123" - }, - "bin": { - "type": "string", - "description": "The bank identification number (BIN), the first 6 digits of the card.", - "example": "401230" + "chain": { + "$ref": "#/components/schemas/Chain" }, - "issuerCountry": { - "type": "string", - "description": "The country code of the issuer bank. Follows the ISO 3166-1 alpha-2 standard.", - "example": "US" + "identities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Identity" + } + } + } + }, + "TransferSourceLocation": { + "description": "A source of funds.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferSourceWalletLocation" }, - "fundingType": { - "description": "The funding type of the card. Possible values are `credit`, `debit`, `prepaid`, and `unknown`.", + { + "$ref": "#/components/schemas/TransferSourceBlockchainLocation" + } + ], + "discriminator": { + "propertyName": "type" + } + }, + "TransferDestinationBlockchainLocation": { + "description": "A destination blockchain address.", + "type": "object", + "required": [ + "type", + "chain", + "address" + ], + "properties": { + "type": { "type": "string", "enum": [ - "credit", - "debit", - "prepaid", - "unknown" + "blockchain" ] }, - "fingerprint": { - "$ref": "#/components/schemas/Fingerprint" - }, - "errorCode": { - "$ref": "#/components/schemas/VerificationErrorCode" - }, - "verification": { - "$ref": "#/components/schemas/CardVerificationResponse" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPhoneEmail" + "address": { + "$ref": "#/components/schemas/Address" }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "addressTag": { + "$ref": "#/components/schemas/AddressTag" }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "chain": { + "$ref": "#/components/schemas/Chain" } } }, - "CardUpdate": { + "TransferDestinationWalletLocation": { + "description": "A destination wallet location.", "type": "object", "required": [ - "keyId", - "encryptedData", - "expMonth", - "expYear" + "type", + "id" ], "properties": { - "keyId": { - "$ref": "#/components/schemas/IdKey" + "type": { + "type": "string", + "enum": [ + "wallet" + ] }, - "encryptedData": { + "id": { "type": "string", - "format": "byte", - "description": "PGP encrypted base64 encoded string. Contains CVV.\n* **CVV (Card Verification Number)**: Three or four digit security code. REQUIRED'\n", - "example": "UHVibGljS2V5QmFzZTY0RW5jb2RlZA==" + "description": "The id of the wallet.", + "example": "12345" }, - "expMonth": { - "$ref": "#/components/schemas/CardExpMonth" + "address": { + "type": "string", + "description": "An alphanumeric string which indicates the wallet address used to receive the transfer. Will only be set when the transfer source is a blockchain address.", + "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" }, - "expYear": { - "$ref": "#/components/schemas/CardExpYear" + "addressTag": { + "$ref": "#/components/schemas/AddressTag" } } }, - "SEPAInstructionBeneficiary": { + "TransferDestinationLocation": { + "description": "A destination of funds.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationBlockchainLocation" + }, + { + "$ref": "#/components/schemas/TransferDestinationWalletLocation" + } + ], + "discriminator": { + "propertyName": "type" + } + }, + "Fee": { "type": "object", + "required": [ + "amount", + "currency", + "type" + ], "properties": { - "name": { + "amount": { "type": "string", - "description": "Name of the beneficiary.", - "example": "CIRCLE INTERNET FINANCIAL INC" + "description": "Magnitude of the fee amount, in units of the currency, with a `.`.", + "example": "10.00" }, - "address1": { + "currency": { "type": "string", - "description": "Address line 1 of the beneficiary's address.", - "example": "99 HIGH STREET" + "description": "Currency code for the amount.", + "enum": [ + "USD" + ] }, - "address2": { + "type": { "type": "string", - "description": "Address line 2 of the beneficiary's address.", - "example": "BOSTON MA 02110" + "description": "Category of the fee.", + "enum": [ + "network" + ] } } }, - "SEPAInstructionBeneficiaryBank": { + "TransferErrorCode": { + "type": "string", + "description": "Indicates the failure reason of a transfer. Only present for transfers in a `failed` state. Possible values are `insufficient_funds`, `blockchain_error` and `transfer_denied` and `transfer_failed`", + "nullable": true, + "enum": [ + "transfer_failed", + "transfer_denied", + "blockchain_error", + "insufficient_funds" + ] + }, + "Transfer": { "type": "object", + "description": "A transfer of funds.", + "required": [ + "id", + "source", + "destination", + "amount", + "status" + ], "properties": { - "name": { - "type": "string", - "description": "Name of the beneficiary's bank.", - "example": "LHV Bank" + "id": { + "$ref": "#/components/schemas/Id" }, - "bic": { - "type": "string", - "description": "BIC code of the beneficiary's bank account.", - "example": "LHVBEE22XXX" + "source": { + "$ref": "#/components/schemas/TransferSourceLocation" }, - "iban": { - "description": "IBAN of the beneficiary's bank account.", - "type": "string", - "example": "****6789" + "destination": { + "$ref": "#/components/schemas/TransferDestinationLocation" }, - "address": { - "description": "Address of the beneficiary's bank.", - "type": "string", - "example": "Tartu mnt 2, 10145 Tallinn" + "amount": { + "$ref": "#/components/schemas/Money" }, - "city": { - "description": "City of the beneficiary's bank.", + "fees": { + "description": "An array of fees applied to a transaction. This is only available when there is at least one non-zero fee.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/Fee" + } + }, + "transactionHash": { + "description": "A hash that uniquely identifies the onchain transaction. This is only available where either source or destination are of type blockchain.", "type": "string", - "example": "Tallinn" + "example": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63" }, - "postalCode": { - "description": "Postal code of the beneficiary's bank.", + "status": { + "description": "Status of the transfer. Status `pending` indicates that the transfer is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed.", "type": "string", - "example": "10017" + "enum": [ + "pending", + "complete", + "failed" + ] }, - "country": { - "description": "Country code of the beneficiary's bank. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "errorCode": { + "$ref": "#/components/schemas/TransferErrorCode" + }, + "createDate": { + "description": "The create date of the transfer.", "type": "string", - "example": "EE" + "format": "date-time" } } }, - "SEPAInstruction": { + "TransferRequestVerifiedBlockchainLocation": { "type": "object", + "required": [ + "type", + "addressId" + ], "properties": { - "trackingRef": { + "type": { "type": "string", - "description": "Circle tracking reference that needs to be set in the SEPA transfer reference field.", - "example": "CIR13FB13A" - }, - "beneficiary": { - "$ref": "#/components/schemas/SEPAInstructionBeneficiary" + "enum": [ + "verified_blockchain" + ] }, - "beneficiaryBank": { - "$ref": "#/components/schemas/SEPAInstructionBeneficiaryBank" + "addressId": { + "type": "string", + "description": "The ID of the verified blockchain recipient address.", + "example": "f1f36b85-cafe-484e-a46b-02340bfdb927", + "format": "uuid" } } }, - "Settlement": { + "BusinessAccountTransferCreationRequest": { "type": "object", + "required": [ + "idempotencyKey", + "destination", + "amount" + ], "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "walletId": { - "description": "If this settlement was used for a marketplace payment, the wallet involved in the settlement. Not included for standard merchant settlements.", - "type": "string", - "example": "12345" - }, - "totalDebits": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "totalCredits": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "paymentFees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "chargebackFees": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "destination": { + "$ref": "#/components/schemas/TransferRequestVerifiedBlockchainLocation" }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "amount": { + "$ref": "#/components/schemas/Money" } } }, - "IdPayment": { - "type": "string", - "description": "Unique system generated identifier for the payment that is associated to the chargeback item.", - "format": "uuid", - "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" - }, - "ChargebackCategories": { - "type": "string", - "description": "Enumerated category of the chargeback status codes based on the chargeback status code.", - "enum": [ - "Canceled Recurring Payment", - "Customer Dispute", - "Fraudulent", - "General", - "Processing Error", - "Not Defined" - ] - }, - "IdSettlement": { - "type": "string", - "description": "Unique system generated identifier for the settlement related to the chargeback history.", - "format": "uuid", - "nullable": true, - "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" - }, - "BasicChargebackHistory": { + "TransferRequestSourceWalletLocation": { "type": "object", "required": [ "type", - "chargebackAmount", - "description" + "id" ], "properties": { "type": { "type": "string", - "description": "Enumerated type of the chargeback history event. `1st Chargeback` represents the first stage of the dispute procedure initiated by the cardholder’s issuing bank.\n `2nd Chargeback` represents the second stage of the dispute procedure initiated by the cardholder’s issuing bank (This stage is MasterCard only).\n `Chargeback Reversal` represents when 1st Chargeback or 2nd Chargeback is withdrawn by the issuer.\n `Representment` represents the stage when merchants decided to dispute 1st Chargeback or 2nd Chargeback.\n `Chargeback Settlement` can imply one of the two: 1) If merchant or marketplace is taking the lost of the chargeback, money will be debit from the wallet during this stage.\n 2) If merchant of marketplace successfully dispute the chargeback, money will be credit back to the wallet during this stage.\n", "enum": [ - "1st Chargeback", - "2nd Chargeback", - "Chargeback Reversal", - "Representment", - "Chargeback Settlement" + "wallet" ] }, - "chargebackAmount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "fee": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "description": { + "id": { "type": "string", - "description": "The reason the chargeback was created.", - "example": "The cardholder claims an unauthorized transaction occurred." - }, - "settlementId": { - "$ref": "#/components/schemas/IdSettlement" + "description": "The id of the wallet.", + "example": "12345" }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" + "identities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Identity" + } } } }, - "BasicChargeback": { + "TransferRequestBlockchainLocation": { "type": "object", "required": [ - "id", - "paymentId", - "merchantId", - "history", - "reasonCode" + "type", + "address", + "chain" ], "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "paymentId": { - "$ref": "#/components/schemas/IdPayment" - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" + "type": { + "type": "string", + "enum": [ + "blockchain" + ] }, - "reasonCode": { - "description": "Reason code given by the card network for the chargeback item.", + "address": { "type": "string", - "example": "10.4" + "description": "The blockchain address.", + "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" }, - "category": { - "$ref": "#/components/schemas/ChargebackCategories" + "addressTag": { + "$ref": "#/components/schemas/AddressTag" }, - "history": { - "type": "array", - "description": "The chargeback item's history list will be sorted by create date descending: more recent chargeback statuses will be at the beginning of the list.\n", - "minItems": 1, - "items": { - "$ref": "#/components/schemas/BasicChargebackHistory" - } + "chain": { + "$ref": "#/components/schemas/Chain" } } }, - "MockChargebackCreationRequest": { + "TransferCreationRequest": { "type": "object", "required": [ - "paymentId" + "idempotencyKey", + "source", + "destination", + "amount" ], "properties": { - "paymentId": { - "type": "string", - "format": "uuid", - "description": "The id of the payment to be charged back. Each payment can only be charged back once.", - "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "source": { + "$ref": "#/components/schemas/TransferRequestSourceWalletLocation" + }, + "destination": { + "oneOf": [ + { + "$ref": "#/components/schemas/TransferRequestBlockchainLocation" + }, + { + "$ref": "#/components/schemas/WalletLocation" + } + ] + }, + "amount": { + "$ref": "#/components/schemas/Money" } } }, - "MockChargeback": { - "type": "object", - "properties": {} - }, - "Reversal": { + "TransferDetailedTransfer": { "type": "object", + "description": "A transfer of funds.", "required": [ "id", - "paymentId", + "source", + "destination", "amount", - "description", - "status", - "reason", - "fees", - "createDate", - "updateDate" + "status" ], "properties": { "id": { - "$ref": "#/components/schemas/IdKey" + "$ref": "#/components/schemas/Id" }, - "paymentId": { - "$ref": "#/components/schemas/IdPayment" + "source": { + "$ref": "#/components/schemas/TransferSourceLocation" + }, + "destination": { + "$ref": "#/components/schemas/TransferDestinationLocation" }, "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "$ref": "#/components/schemas/Money" }, - "description": { + "fees": { + "description": "An array of fees applied to a transaction. This is only available when there is at least one non-zero fee.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/Fee" + } + }, + "transactionHash": { "type": "string", - "description": "Enumerated description of the payment.", - "example": "Merchant Payment Reversal" + "description": "A hash that uniquely identifies the onchain transaction. This is only available where either source or destination are of type blockchain.", + "example": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63" }, "status": { - "$ref": "#/components/schemas/CancelRefundReversalStatus" + "type": "string", + "description": "Status of the transfer. Status `pending` indicates that the transfer is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed.", + "enum": [ + "failed", + "pending", + "complete" + ] }, - "reason": { - "$ref": "#/components/schemas/ReversalReason" + "errorCode": { + "$ref": "#/components/schemas/TransferErrorCode" }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" }, "createDate": { "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" } } }, - "Ping": { + "MockChargebackCreationRequest": { "type": "object", "required": [ - "message" + "paymentId" ], "properties": { - "message": { + "paymentId": { "type": "string", - "example": "pong" + "format": "uuid", + "description": "The id of the payment to be charged back. Each payment can only be charged back once.", + "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" } } }, - "AccountConfiguration": { + "MockChargeback": { + "type": "object", + "properties": {} + }, + "MockSenPaymentBeneficiaryBankInstruction": { "type": "object", + "required": [ + "accountNumber" + ], "properties": { - "payments": { - "title": "WalletConfig", - "type": "object", - "properties": { - "masterWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - } - } + "accountNumber": { + "type": "string", + "description": "Circle corporate Silvergate SEN account number that needs to be set as destination.", + "example": "11111111" } } }, - "PublicKey": { + "MockSenPaymentRequest": { "type": "object", "required": [ - "keyId", - "publicKey" + "trackingRef", + "amount", + "beneficiaryBank" ], "properties": { - "keyId": { - "$ref": "#/components/schemas/IdKey" - }, - "publicKey": { + "trackingRef": { "type": "string", - "description": "A PGP ascii-armor encoded public key.", - "example": "LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEJDUEcgdjEuNTQKCm1RRU5CRjAxdmk0QkNBQ3JzMDNLS1Y0Qk9SRkYyT0Z4bUdvb0UyaTZMbnNneE5UL1dsV2s1ZTl2RDd2NENkSm0KcGJJbENmZ0U4WFlnYmhKUTE4YStaTzlPM0RFYUp2dGhJSEtjL0l1UEIvZmdEYUJUT285NkJzL2pVRFp6ZGxaVApQazNFUjliNFZPeGVwMFNPSHFMcmxTVFY4ZXB3M1R3SEdaL3NpSWdBYXEwRGdJdlZxUTY4TGVaMnorUFJWZm04CmhhSnJpb05SRU5Ja2ZNTWY5aFdySlowSW1zUk1aVmpDMVVrd2FSSHdrTTMwQUlia1dYcFJ5R205SXhQaXdGa08Kb1RnWlpwUFpsdVczckdkWER0NHZqL24za09hczV1dFdoNFovMlhjWHBiSUUyU0FPK0hycUdIclRnK1ZmZ05JNwpZcVZqYW5MOEN1bm83UkxmcDhKZlZDNXBLUm5ySVNCTnphN1ZBQkVCQUFHMEJrTnBjbU5zWllrQkhBUVFBUWtBCkJnVUNYVFcrTGdBS0NSQ3EzaHNwWjBMeGEwdnpCLzQvQTJpdk1CWW1aZXV2bEJZMm5ZZnNXek9Sb28vU3BIYkQKY2Y0UmtxZzZ0RERJSkUzNHhDVit0MzJydmJkM0ZOdVZseWs1MDVZRkpESnI4cVc2S0tkQVRXdU16eW5mMVVoUAo1M25hTlc0cXdrdSt3b0RWWjJpci9lUVI1WUc4L0RGcnd3bXdaa0dRd0Ftc3h5ZHd5anBnLzBrQ3lpZHkxdVBkCmVVWGgwdWt4dS9Dais4UFl5cHcwdit5V2tzbjdSZ2dVbkJFMWhiQ2pEV3FweHZjMEpDNVAxdmx6L2xRcWQrR3oKRC9Td1FJTVdRVElnV3BHRVVvQTRDc3drbU5PdHhsRVF1U0tueXNtTG02S0ExUmRhTzd6V2IrdWNLN21FZ2VoSwpXU2hHZExqRVNNZlVRUTczemNqMXg2amxLUFNhRlJyLzhXcHhrVXYzVHYvQzZMb0JpejRLCj1WSWg3Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K" + "description": "Circle tracking reference that needs to be set in the memo filed. This field is retrievable through the response during SEN account creation or via the bank instruction endpoint.", + "example": "CIR13FB13A" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoney" + }, + "beneficiaryBank": { + "$ref": "#/components/schemas/MockSenPaymentBeneficiaryBankInstruction" } } }, - "SubscriptionDetail": { + "MockSenPaymentResponse": { "type": "object", "properties": { - "url": { + "trackingRef": { "type": "string", - "description": "Identifier for created subscription.", - "example": "arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17" + "description": "Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint.", + "example": "CIR13FB13A" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "beneficiaryBank": { + "$ref": "#/components/schemas/MockSenPaymentBeneficiaryBankInstruction" }, "status": { "type": "string", - "description": "Status of the subscription request.", + "description": "Enumerated status of the wire payment. Status `pending` indicates that the wire payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed.", "enum": [ - "confirmed", "pending", - "deleted" + "processed", + "failed" ] } } }, - "SubscriptionResponse": { + "MockAchAccount": { "type": "object", + "required": [ + "accountNumber", + "routingNumber", + "description" + ], "properties": { - "id": { - "$ref": "#/components/schemas/Id" + "accountNumber": { + "type": "string", + "description": "The account number of the ACH account.", + "example": "123456789" }, - "endpoint": { + "routingNumber": { "type": "string", - "description": "URL of the endpoint.", - "example": "https://example.org/handler/for/notifications" + "description": "The routing number of the ACH account.\n\nFor sandbox testing, valid routing numbers include `011000028`, `011201762`, `011500120`, `021214862`, `121000248`, `121140399`, `211073473`, `221172610`, and `011000138`.\n", + "example": "011000028" }, - "subscriptionDetails": { - "type": "array", - "description": "List of subscriptions details for created subscriptions.", - "items": { - "$ref": "#/components/schemas/SubscriptionDetail" - } + "description": { + "type": "string", + "description": "A description for the ACH account.", + "example": "My ACH account" } } }, - "SubscriptionRequest": { + "MockAchAccountCreationRequest": { "type": "object", "required": [ - "endpoint" + "account", + "balance" ], "properties": { - "endpoint": { - "type": "string", - "description": "URL of the subscriber endpoint. Must be publicly accessible and utilize HTTPS.", - "example": "https://example.org/handler/for/notifications" + "account": { + "$ref": "#/components/schemas/MockAchAccount" + }, + "balance": { + "$ref": "#/components/schemas/FiatMoneyUsd" } } }, - "UnsubscribeResponse": { - "type": "object", - "description": "Unsubscribe response object. No fields as of now.", - "example": {} - }, - "ChannelResponse": { + "MockAchAccountResponse": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "default": { - "type": "boolean", - "description": "Flag to indicate whether the channel is configured as default. At most one of the channels will have this flag set to true and the default channel is used when a payment request does not have the `channel` property set.", - "example": true - }, - "cardDescriptor": { + "processorToken": { "type": "string", - "description": "Descriptor that appears on cardholders' bank statements for card payments submitted through this channel.", - "example": "CIRCLE LLC." + "description": "The processor token needs to be provided when linking an ACH account against this mock.", + "example": "processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621" }, - "achDescriptor": { - "type": "string", - "description": "Descriptor that appears on end-users' bank statements for ACH payments submitted through this channel.", - "example": "CIRCLE LLC." + "balance": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "account": { + "$ref": "#/components/schemas/MockAchAccount" } } }, - "TokenAmount": { + "MockWirePaymentBeneficiaryBankInstruction": { "type": "object", "required": [ - "amount", - "chain" + "accountNumber" ], "properties": { - "amount": { + "accountNumber": { "type": "string", - "description": "Magnitude of the amount, in units of the currency, with a `.`.", - "example": "132.584192" - }, - "chain": { - "$ref": "#/components/schemas/Chain" + "description": "Virtual account number or Circle corporate Silvergate Wire account number that needs to be set as destination.", + "example": "11111111" } } }, - "Stablecoin": { + "MockWirePaymentRequest": { "type": "object", + "required": [ + "trackingRef", + "amount", + "beneficiaryBank" + ], "properties": { - "name": { - "type": "string", - "description": "Name of the stablecoin.", - "example": "USD Coin" - }, - "symbol": { + "trackingRef": { "type": "string", - "description": "Symbol of the stablecoin.", - "example": "USDC" + "description": "Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint.", + "example": "CIR13FB13A" }, - "totalAmount": { - "type": "string", - "description": "Total circulating amount of the stablecoin.", - "example": "132.584192" + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" }, - "chains": { - "type": "array", - "description": "A list of the broken down totalAmount by chain of the stablecoin.", - "items": { - "$ref": "#/components/schemas/TokenAmount" - } + "beneficiaryBank": { + "$ref": "#/components/schemas/MockWirePaymentBeneficiaryBankInstruction" } } }, - "Stablecoins": { - "type": "array", - "description": "A list of stablecoin objects containing its name, symbol, total amount, and per-chain amount.", - "items": { - "$ref": "#/components/schemas/Stablecoin" - } - }, - "Wallet": { + "MockWirePaymentResponse": { "type": "object", "properties": { - "walletId": { + "trackingRef": { "type": "string", - "description": "Wallet identifier. Numeric value but should be treated as a string as format may change in the future'", - "example": "434000" + "description": "Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint.", + "example": "CIR13FB13A" }, - "entityId": { - "type": "string", - "description": "Universally unique identifier (UUID v4) of the entity that owns the wallet.", - "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" }, - "type": { + "beneficiaryBank": { + "$ref": "#/components/schemas/MockWirePaymentBeneficiaryBankInstruction" + }, + "status": { "type": "string", - "description": "Wallet type.", + "description": "Enumerated status of the wire payment. Status `pending` indicates that the wire payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed.", "enum": [ - "end_user_wallet" + "pending", + "processed", + "failed" ] - }, - "description": { - "type": "string", - "description": "A human-friendly, non-unique identifier for a wallet.", - "example": "Treasury Wallet", - "maxLength": 255 - }, - "balances": { - "description": "A list of balances for currencies owned by the wallet.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Money" - } } } }, - "WalletCreationRequest": { + "MockSepaPaymentRequest": { "type": "object", "required": [ - "idempotencyKey" + "trackingRef", + "amount" ], "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" + "trackingRef": { + "type": "string", + "description": "SEPA tracking reference that needs to be set in the payment details or description.", + "example": "CIR13FB13A" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + } + } + }, + "MockSepaPaymentResponse": { + "type": "object", + "properties": { + "trackingRef": { + "type": "string", + "description": "SEPA tracking reference that needs to be set in the payment details or description.", + "example": "CIR13FB13A" }, - "description": { + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "status": { "type": "string", - "description": "A human-friendly, non-unique identifier for a wallet.", - "example": "Treasury Wallet", - "maxLength": 255 + "description": "Enumerated status of the SEPA payment. Status `pending` indicates that the SEPA payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed.", + "enum": [ + "pending", + "processed", + "failed" + ] } } } }, + "headers": { + "XRequestId": { + "description": "Universally unique identifier (UUID v4) for the request. Helpful for identifying a request when communicating with Circle support.", + "schema": { + "type": "string", + "format": "uuid", + "example": "2adba88e-9d63-44bc-b975-9b6ae3440dde" + } + } + }, "responses": { "NotAuthorized": { "description": "The request has not been applied because it lacks valid authentication credentials.", @@ -11256,8 +11465,8 @@ } } }, - "NotFound": { - "description": "The specified resource was not found.", + "LimitExceeded": { + "description": "Limit exceeded. See error message for more details.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -11267,7 +11476,7 @@ "application/json": { "schema": { "type": "object", - "title": "NotFound", + "title": "LimitExceeded", "required": [ "code", "message" @@ -11283,23 +11492,23 @@ } }, "example": { - "code": 404, - "message": "Not found." + "code": 429, + "message": "Too many requests." } }, "examples": { "response": { "value": { - "code": 404, - "message": "Not found." + "code": 429, + "message": "Too many requests." } } } } } }, - "Conflict": { - "description": "The request has not been applied because it comes in conflict with another request (such as re-using an idempotencyKey for a different request).", + "NotFound": { + "description": "The specified resource was not found.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -11309,7 +11518,7 @@ "application/json": { "schema": { "type": "object", - "title": "Conflict", + "title": "NotFound", "required": [ "code", "message" @@ -11325,23 +11534,23 @@ } }, "example": { - "code": 409, - "message": "Conflicts with another request." + "code": 404, + "message": "Not found." } }, "examples": { "response": { "value": { - "code": 409, - "message": "Conflicts with another request." + "code": 404, + "message": "Not found." } } } } } }, - "LimitExceeded": { - "description": "Limit exceeded. See error message for more details.", + "Conflict": { + "description": "The request has not been applied because it comes in conflict with another request (such as re-using an idempotencyKey for a different request).", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" @@ -11351,7 +11560,7 @@ "application/json": { "schema": { "type": "object", - "title": "LimitExceeded", + "title": "Conflict", "required": [ "code", "message" @@ -11367,21 +11576,208 @@ } }, "example": { - "code": 429, - "message": "Too many requests." + "code": 409, + "message": "Conflicts with another request." } }, "examples": { "response": { "value": { - "code": 429, - "message": "Too many requests." + "code": 409, + "message": "Conflicts with another request." } } } } } } + }, + "parameters": { + "IdPath": { + "name": "id", + "description": "Universally unique identifier (UUID v4) of a resource.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "b3d9d2d5-4c12-4946-a09d-953e82fae2b0" + } + }, + "PageBefore": { + "name": "pageBefore", + "description": "A collection ID value used for pagination.\n\nIt marks the exclusive end of a page. When provided, the collection resource will return the next `n` items before\nthe id, with `n` being specified by `pageSize`.\n\nThe items will be returned in the natural order of the collection.\n\nThe resource will return the first page if neither `pageAfter` nor `pageBefore` are specified.\n\nSHOULD NOT be used in conjuction with pageAfter.\n", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + "PageAfter": { + "name": "pageAfter", + "description": "A collection ID value used for pagination.\n\nIt marks the exclusive begin of a page. When provided, the collection resource will return the next `n` items after\nthe id, with `n` being specified by `pageSize`.\n\nThe items will be returned in the natural order of the collection.\n\nThe resource will return the first page if neither `pageAfter` nor `pageBefore` are specified.\n\nSHOULD NOT be used in conjuction with pageBefore.\n", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + "PageSize": { + "name": "pageSize", + "description": "Limits the number of items to be returned.\n\nSome collections have a strict upper bound that will disregard this value. In case the specified value is higher\nthan the allowed limit, the collection limit will be used.\n\nIf avoided, the collection will determine the page size itself.\n", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "example": 5 + } + }, + "Currency": { + "name": "currency", + "description": "Queries beneficiary bank account currency. Default is USD.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "USD", + "EUR" + ] + } + }, + "From": { + "name": "from", + "description": "Queries items created since the specified date-time (inclusive).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "example": "2020-04-10T02:13:30.000Z" + } + }, + "To": { + "name": "to", + "description": "Queries items created before the specified date-time (inclusive).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "example": "2020-04-10T02:13:30.000Z" + } + }, + "Source": { + "name": "source", + "description": "Universally unique identifier (UUID v4) for the source. Filters results to fetch only payments made from the provdided source.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "b3d9d2d5-4c12-4946-a09d-953e82fae2b0" + } + }, + "SettlementId": { + "name": "settlementId", + "description": "Queries items with the specified settlement id. Matches any settlement id if unspecified.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "b48c8962-8e9f-40c3-9f1d-d9adde2ffe61" + } + }, + "PaymentIntentId": { + "name": "paymentIntentId", + "description": "Queries items with the specified payment intent id.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "b48c8962-8e9f-40c3-9f1d-d9adde2ffe61" + } + }, + "PaymentSourceType": { + "name": "type", + "description": "Source account type. Filters the results to fetch all payments made from a specified account type. Matches any source type if unspecified.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "card", + "wire", + "ach", + "sepa" + ] + } + } + }, + "PaymentStatus": { + "name": "status", + "description": "Queries items with the specified status. Matches any status if unspecified.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "pending", + "confirmed", + "paid", + "failed", + "action_required" + ] + } + }, + "destination": { + "name": "destination", + "description": "Universally unique identifier (UUID v4) for the destination bank account. Filters the results to fetch all payouts made to a destination bank account.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "e3d0a838-d732-49d0-bf44-73a668e38973" + } + }, + "PaymentId": { + "name": "paymentId", + "description": "The payment ID associated with the chargeback.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "202ad9ce-974c-49ca-8d34-3afb7d7247ae" + } + }, + "WalletId": { + "name": "walletId", + "description": "Identifier for the wallet.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "0123456789" + } + }, + "ReturnIdentities": { + "name": "returnIdentities", + "description": "Specify if you would like to see identities in the response. Restricts maximum returned items to 5. By default returnIdentities is false, resulting in the response not returning `data.source.identities`.", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "example": "true", + "default": false + } + } } } } \ No newline at end of file diff --git a/openapi/json/crypto-payments.json b/openapi/json/crypto-payments.json index 3c48981..16c4708 100644 --- a/openapi/json/crypto-payments.json +++ b/openapi/json/crypto-payments.json @@ -6,7 +6,7 @@ } ], "info": { - "version": "1.0.1", + "version": "1.0.2", "title": "Crypto Payments API", "description": "Crypto Payments collection Circle APIs." }, diff --git a/openapi/json/general.json b/openapi/json/general.json index 9c1d489..b622265 100644 --- a/openapi/json/general.json +++ b/openapi/json/general.json @@ -6,7 +6,7 @@ } ], "info": { - "version": "1.0.1", + "version": "1.0.2", "title": "API Overview", "description": "Common endpoints shared across all Circle APIs." }, @@ -75,7 +75,7 @@ ], "summary": "Get configuration info", "description": "Retrieves general configuration information.", - "operationId": "getConfig", + "operationId": "getAccountConfig", "tags": [ "Management" ], diff --git a/openapi/json/payments.json b/openapi/json/payments.json index cd4ec21..4913118 100644 --- a/openapi/json/payments.json +++ b/openapi/json/payments.json @@ -6,7 +6,7 @@ } ], "info": { - "version": "1.0.1", + "version": "1.0.2", "title": "Payments API", "description": "APIs for accepting payments." }, @@ -1219,7 +1219,7 @@ ], "summary": "Create a mock Wire payment", "description": "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.", - "operationId": "createWirePayment", + "operationId": "createMockWirePayment", "tags": [ "Payments" ], @@ -1288,7 +1288,7 @@ ], "summary": "Create a mock SEPA payment", "description": "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.", - "operationId": "createSepaPayment", + "operationId": "createMockSepaPayment", "tags": [ "Payments" ], @@ -1968,7 +1968,7 @@ } ], "summary": "Update a card", - "operationId": "UpdateCard", + "operationId": "updateCard", "tags": [ "Cards" ], @@ -2473,7 +2473,7 @@ ], "summary": "Create a mock ACH bank account", "description": "In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account.", - "operationId": "createAchAccount", + "operationId": "createMockACHBankAccount", "tags": [ "ACH" ], diff --git a/openapi/json/payouts.json b/openapi/json/payouts.json index af32673..5cc55ae 100644 --- a/openapi/json/payouts.json +++ b/openapi/json/payouts.json @@ -6,7 +6,7 @@ } ], "info": { - "version": "1.0.1", + "version": "1.0.2", "title": "Payouts API", "description": "APIs for making payouts." }, @@ -1187,7 +1187,7 @@ ], "summary": "Create a mock ACH bank account", "description": "In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account.", - "operationId": "createAchAccount", + "operationId": "createMockACHBankAccount", "tags": [ "ACH" ], diff --git a/openapi/yaml/account.yaml b/openapi/yaml/account.yaml index 4abf1b9..bef53cd 100644 --- a/openapi/yaml/account.yaml +++ b/openapi/yaml/account.yaml @@ -2,7 +2,7 @@ openapi: 3.0.2 servers: - url: api-sandbox.circle.com info: - version: 1.0.1 + version: 1.0.2 title: Core Functionality description: APIs for managing your account balance. These endpoints are available with all Circle APIs. @@ -1222,7 +1222,7 @@ paths: description: 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. - operationId: createSenPayment + operationId: createMockSenPayment tags: - Deposits requestBody: diff --git a/openapi/yaml/accounts.yaml b/openapi/yaml/accounts.yaml index b8fa083..c2ce966 100644 --- a/openapi/yaml/accounts.yaml +++ b/openapi/yaml/accounts.yaml @@ -2,7 +2,7 @@ openapi: 3.0.2 servers: - url: api-sandbox.circle.com info: - version: 1.0.1 + version: 1.0.2 title: Accounts API description: APIs to manage custodial wallets. tags: diff --git a/openapi/yaml/circle-apis.yaml b/openapi/yaml/circle-apis.yaml index 84eb7c7..a83978d 100644 --- a/openapi/yaml/circle-apis.yaml +++ b/openapi/yaml/circle-apis.yaml @@ -2,679 +2,290 @@ openapi: 3.0.2 servers: - url: api-sandbox.circle.com info: - version: 1.0.1 - title: Circle API + version: 1.0.2 + title: All Circle APIs + description: Circle's General, Core Functionality, Payments, Payouts, and Accounts + APIs bundled into one OpenAPI Specification. tags: +- name: Health +- name: Management +- name: Encryption +- name: Subscriptions +- name: Stablecoins +- name: Channels - name: Balances -- name: Payouts +- name: Addresses +- name: Cards - name: Wires -- name: Signet - name: SEN -- name: Transfers -- name: Addresses -- name: Deposits -- name: On-chain payouts -- name: ACH - name: SEPA -- name: Returns +- name: ACH +- name: Signet +- name: Deposits +- name: Payment Intents - name: Payments -- name: On-chain payments -- name: Cards - name: Settlements - name: Chargebacks - name: Reversals -- name: Health - description: Inspect the health of the API. -- name: Management - description: General account and management information. -- name: Encryption - description: Encrypt sensitive data. -- name: Subscriptions - description: Manage subscriptions to notifications. -- name: Stablecoins - description: Retrieve stablecoins and their respective names, symbols, circulating - total and per-chain amounts. -- name: Channels - description: View a list of channels. +- name: Payouts +- name: Returns - name: Wallets +- name: Transfers paths: - /v1/paymentIntents: - post: + /ping: + get: + summary: Ping + description: Checks that the service is running. + operationId: rootPing + tags: + - Health + responses: + '200': + description: Successful ping. + content: + application/json: + schema: + $ref: '#/components/schemas/Ping' + examples: + response: + value: + message: pong + /v1/configuration: + get: security: - bearerAuth: [] - summary: Create a payment intent - operationId: createPaymentIntent + summary: Get configuration info + description: Retrieves general configuration information. + operationId: getAccountConfig tags: - - Payment Intents - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentIntent' + - Management responses: - '201': - description: Successfully created a payment intent. + '200': + description: Successfully retrieved configuration information. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: CreatePaymentIntentResponse + title: GetConfigResponse properties: data: - $ref: '#/components/schemas/PaymentIntent' + $ref: '#/components/schemas/AccountConfiguration' examples: response: value: data: - id: 8755d0ea-14f9-4259-b092-de23c14b6568 - amount: - amount: '3.14' - currency: USD - amountPaid: - amount: '0.00' - currency: USD - settlementCurrency: USD - paymentMethods: - - type: blockchain - chain: ETH - paymentIds: [] - timeline: - - status: created - time: '2022-07-21T20:13:35.579331Z' - createDate: '2022-07-21T20:13:35.578678Z' - updateDate: '2022-07-21T20:19:24.859052Z' - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' + payments: + masterWalletId: '212000' + /v1/encryption/public: get: security: - bearerAuth: [] - summary: List all payment intents - operationId: getPaymentIntents + summary: Get public key + description: Retrieves an RSA public key to be used in encrypting data sent + to the API. Your public keys change infrequently, so we encourage you to cache + this response value locally for a duration of 24 hours or more. + operationId: getPublicKey tags: - - Payment Intents - parameters: - - name: status - description: Filters by the most recent `timeline.status` within the payment - intent. - in: query - required: false - schema: - type: string - enum: - - created - - pending - - complete - - expired - - failed - - name: context - description: Filters by the most recent `timeline.context` within the payment - intent. - in: query - required: false - schema: - type: string - enum: - - underpaid - - paid - - overpaid - - $ref: '#/components/parameters/From' - - $ref: '#/components/parameters/To' - - $ref: '#/components/parameters/PageBefore' - - $ref: '#/components/parameters/PageAfter' - - $ref: '#/components/parameters/PageSize' + - Encryption responses: '200': - description: Successfully retrieved a list of payment intents. + description: Successfully retrieved the RSA public key. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetPaymentIntentsResponse + title: GetPublicKeyResponse properties: data: - type: array - items: - $ref: '#/components/schemas/PaymentIntent' + $ref: '#/components/schemas/PublicKey' examples: response: value: data: - - idempotencyKey: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - amount: - amount: '3.14' - currency: USD - amountPaid: - amount: '3.14' - currency: USD - settlementCurrency: USD - paymentMethods: - - type: blockchain - chain: ALGO - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - fees: - - type: blockchainLeaseFee - amount: '3.14' - currency: USD - paymentIds: - - 69808f36-3e5e-4f37-bf82-ca79e4d70fc1 - timeline: - - status: created - context: underpaid - time: '2020-04-10T02:13:30.000Z' - expiresOn: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - createDate: '2020-04-10T02:13:30.000Z' - '401': - $ref: '#/components/responses/NotAuthorized' - /v1/paymentIntents/{id}: + keyId: key1 + publicKey: LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEJDUEcgdjEuNTQKCm1RRU5CRjAxdmk0QkNBQ3JzMDNLS1Y0Qk9SRkYyT0Z4bUdvb0UyaTZMbnNneE5UL1dsV2s1ZTl2RDd2NENkSm0KcGJJbENmZ0U4WFlnYmhKUTE4YStaTzlPM0RFYUp2dGhJSEtjL0l1UEIvZmdEYUJUT285NkJzL2pVRFp6ZGxaVApQazNFUjliNFZPeGVwMFNPSHFMcmxTVFY4ZXB3M1R3SEdaL3NpSWdBYXEwRGdJdlZxUTY4TGVaMnorUFJWZm04CmhhSnJpb05SRU5Ja2ZNTWY5aFdySlowSW1zUk1aVmpDMVVrd2FSSHdrTTMwQUlia1dYcFJ5R205SXhQaXdGa08Kb1RnWlpwUFpsdVczckdkWER0NHZqL24za09hczV1dFdoNFovMlhjWHBiSUUyU0FPK0hycUdIclRnK1ZmZ05JNwpZcVZqYW5MOEN1bm83UkxmcDhKZlZDNXBLUm5ySVNCTnphN1ZBQkVCQUFHMEJrTnBjbU5zWllrQkhBUVFBUWtBCkJnVUNYVFcrTGdBS0NSQ3EzaHNwWjBMeGEwdnpCLzQvQTJpdk1CWW1aZXV2bEJZMm5ZZnNXek9Sb28vU3BIYkQKY2Y0UmtxZzZ0RERJSkUzNHhDVit0MzJydmJkM0ZOdVZseWs1MDVZRkpESnI4cVc2S0tkQVRXdU16eW5mMVVoUAo1M25hTlc0cXdrdSt3b0RWWjJpci9lUVI1WUc4L0RGcnd3bXdaa0dRd0Ftc3h5ZHd5anBnLzBrQ3lpZHkxdVBkCmVVWGgwdWt4dS9Dais4UFl5cHcwdit5V2tzbjdSZ2dVbkJFMWhiQ2pEV3FweHZjMEpDNVAxdmx6L2xRcWQrR3oKRC9Td1FJTVdRVElnV3BHRVVvQTRDc3drbU5PdHhsRVF1U0tueXNtTG02S0ExUmRhTzd6V2IrdWNLN21FZ2VoSwpXU2hHZExqRVNNZlVRUTczemNqMXg2amxLUFNhRlJyLzhXcHhrVXYzVHYvQzZMb0JpejRLCj1WSWg3Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K + /v1/notifications/subscriptions: get: security: - bearerAuth: [] - summary: Get a payment intent - operationId: getPaymentIntent + summary: List all notification subscriptions + description: Retrieve a list of existing notification subscriptions with details. + parameters: [] + operationId: listSubscriptions tags: - - Payment Intents - parameters: - - $ref: '#/components/parameters/IdPath' + - Subscriptions responses: '200': - description: Successfully retrieved a payment intent. - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' + description: Successfully retrieved a list of notification subscriptions. content: application/json: schema: - title: GetPaymentIntentResponse + title: GetListSubscriptionsResponse properties: data: - $ref: '#/components/schemas/PaymentIntent' + type: array + items: + $ref: '#/components/schemas/SubscriptionResponse' examples: response: value: data: - id: 8755d0ea-14f9-4259-b092-de23c14b6568 - amount: - amount: '3.14' - currency: USD - amountPaid: - amount: '0.00' - currency: USD - settlementCurrency: USD - paymentMethods: - - type: blockchain - chain: ETH - paymentIds: [] - timeline: - - status: created - time: '2022-07-21T20:13:35.579331Z' - createDate: '2022-07-21T20:13:35.578678Z' - updateDate: '2022-07-21T20:19:24.859052Z' + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + endpoint: https://example.org/handler/for/notifications + subscriptionDetails: + - url: arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17 + status: confirmed '401': $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' - /v1/paymentIntents/{id}/expire: post: security: - bearerAuth: [] - summary: Expire a payment intent - operationId: expirePaymentIntent + summary: Create a notification subscription + description: 'Subscribe to receiving notifications at a given endpoint. The + endpoint should be able to handle AWS SNS subscription requests. For more + details see https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/sns-send-http.html. + Note, the sandbox environment allows a maximum of 3 active subscriptions; + otherwise, this is limited to 1 active subscription and subsequent create + requests will be rejected with a Limit Exceeded error. + + ' + operationId: subscribe tags: - - Payment Intents - parameters: - - $ref: '#/components/parameters/IdPath' + - Subscriptions requestBody: content: application/json: schema: - type: object + $ref: '#/components/schemas/SubscriptionRequest' responses: - '201': - description: Successfully expired a payment intent. - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' + '200': + description: Successfully created a notification subscription. content: application/json: schema: - title: ExpirePaymentIntentResponse + title: SubscribeResponse properties: data: - $ref: '#/components/schemas/PaymentIntent' + $ref: '#/components/schemas/SubscriptionResponse' examples: response: value: data: - id: 8755d0ea-14f9-4259-b092-de23c14b6568 - amount: - amount: '3.14' - currency: USD - amountPaid: - amount: '3.14' - currency: USD - settlementCurrency: USD - paymentMethods: - - type: blockchain - chain: ETH - paymentIds: [] - timeline: - - status: expired - context: underpaid - reason: requested_by_merchant - time: '2022-07-21T21:45:54.569Z' - - status: created - time: '2022-07-21T20:13:35.579331Z' - createDate: '2022-07-21T20:13:35.578678Z' - updateDate: '2022-07-21T20:19:24.859052Z' + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + endpoint: https://example.org/handler/for/notifications + subscriptionDetails: + - url: arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17 + status: confirmed '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' - /v1/payments: - get: + '429': + $ref: '#/components/responses/LimitExceeded' + /v1/notifications/subscriptions/{id}: + delete: + parameters: + - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - parameters: - - $ref: '#/components/parameters/Source' - - $ref: '#/components/parameters/SettlementId' - - $ref: '#/components/parameters/PaymentIntentId' - - $ref: '#/components/parameters/PaymentSourceType' - - $ref: '#/components/parameters/PaymentStatus' - - $ref: '#/components/parameters/From' - - $ref: '#/components/parameters/To' - - $ref: '#/components/parameters/PageBefore' - - $ref: '#/components/parameters/PageAfter' - - $ref: '#/components/parameters/PageSize' - summary: List all payments - operationId: getPayments + summary: Remove a notification subscription + description: To remove a subscription, all its subscription requests' statuses + must be either 'confirmed', 'deleted' or a combination of those. A subscription + with at least one 'pending' subscription request cannot be removed. + operationId: unsubscribe tags: - - Payments + - Subscriptions responses: '200': - description: Successfully retrieved a list of payments. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' + description: Successfully removed a subscription. content: application/json: schema: - title: GetPaymentsResponse + title: DeleteUnsubscribeResponse + properties: + data: + $ref: '#/components/schemas/UnsubscribeResponse' + examples: + response: + value: + data: {} + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/NotAuthorized' + '404': + $ref: '#/components/responses/NotFound' + /v1/channels: + get: + security: + - bearerAuth: [] + summary: List all channels + description: Retrieve a list of channels with details (e.g. `cardDescriptor`, + `achDescriptor`, etc.). + parameters: [] + operationId: listChannels + tags: + - Channels + responses: + '200': + description: Successfully retrieved a list of channels. + content: + application/json: + schema: + title: ListChannelsResponse properties: data: type: array items: - oneOf: - - $ref: '#/components/schemas/FiatPayment' - - $ref: '#/components/schemas/CryptoPayment' - - $ref: '#/components/schemas/FiatCancel' - - $ref: '#/components/schemas/FiatRefund' - discriminator: - propertyName: type - mapping: - Fiat Payment: '#/components/schemas/FiatPayment' - Crypto Payment: '#/components/schemas/CryptoPayment' - Fiat Cancel: '#/components/schemas/FiatCancel' - Fiat Refund: '#/components/schemas/FiatRefund' + $ref: '#/components/schemas/ChannelResponse' examples: - Fiat Payment: + response: value: data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: payment - merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - merchantWalletId: '212000' - amount: - amount: '3.14' - currency: USD - source: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: card - description: Payment - status: pending - captured: false - captureAmount: - amount: '3.14' - currency: USD - captureDate: '2020-04-10T02:13:30.000Z' - requiredAction: - type: three_d_secure_required - redirectUrl: https://example.org - cancel: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: cancel - description: Payment - status: pending - createDate: '2020-04-10T02:13:30.000Z' - refunds: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: payment - amount: - amount: '3.14' - currency: USD - description: Payment - status: pending - requiredAction: - type: three_d_secure_required - redirectUrl: https://example.org - fees: - amount: '3.14' - currency: USD - createDate: '2020-04-10T02:13:30.000Z' - fees: - amount: '3.14' - currency: USD - channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - Crypto Payment: - value: - data: - - id: 66c56b6a-fc79-338b-8b94-aacc4f0f18de - type: payment - status: paid - amount: - amount: '1.00' - currency: USD - fees: - amount: '0.01' - currency: USD - merchantId: f1397191-56e6-42fd-be86-0a7b9bd91522 - merchantWalletId: '1000999922' - paymentIntentId: 6e4d4047-db14-4c09-b238-1215aee50d03 - settlementAmount: - amount: '1.00' - currency: USD - depositAddress: - chain: ETH - address: '0x97de855690955e0da79ce5c1b6804847e7070c7f' - transactionHash: '0x7351585460bd657f320b9afa02a52c26d89272d0d10cc29913eb8b28e64fd906' - createDate: '2022-07-21T20:16:35.092852Z' - updateDate: '2022-07-21T20:19:24.719313Z' - Fiat Cancel: - value: - data: - - id: 2dc266f5-0658-48ec-a81f-9c768279564d - type: cancel - status: confirmed - description: Cancel Payment - amount: - amount: '10.00' - currency: USD - createDate: '2022-04-21T21:50:34.274Z' - updateDate: '2022-04-21T21:50:34.647839Z' - merchantId: b1e4e9fe-0bf1-43ad-86c7-3ab993b0051b - merchantWalletId: '1000174786' - source: - id: bc9157fe-5d73-48fe-9e77-9f6723bdcfeb - type: card - originalPayment: - id: 2812f549-062a-4bdd-8ee5-b521aa48a84d - type: payment - status: failed - createDate: '2022-04-21T21:47:41.501Z' - updateDate: '2022-04-21T21:50:34.669012Z' - reason: requested_by_customer - Fiat Refund: - value: - data: - - id: 03fbe7da-096a-4763-af77-e43006cd83be - type: refund - status: paid - description: Refund Payment - amount: - amount: '3.14' - currency: USD - fees: - amount: '0.00' - currency: USD - createDate: '2022-04-21T12:49:21.146Z' - updateDate: '2022-04-21T12:54:10.596976Z' - merchantId: b1e4e9fe-0bf1-43ad-86c7-3ab993b0051b - merchantWalletId: '1000174786' - source: - id: 45fa5524-41b9-48ca-94cd-f45cb36cce4d - type: card - originalPayment: - id: 895f8db5-1d8c-407d-9533-b5ca3fbcc74e - type: payment - status: paid - createDate: '2022-04-06T19:33:29.690Z' - updateDate: '2022-04-06T19:47:23.681180Z' - reason: requested_by_customer + default: true + cardDescriptor: CIRCLE LLC. + achDescriptor: CIRCLE LLC. '401': $ref: '#/components/responses/NotAuthorized' - /v1/payments/{id}: + /v1/stablecoins: get: - parameters: - - $ref: '#/components/parameters/IdPath' - security: - - bearerAuth: [] - summary: Get a payment - operationId: getPayment + summary: List all stablecoins + description: Retrieves total circulating supply for supported stablecoins across + all chains. This endpoint is rate limited to one call per minute (based on + IP). + operationId: getStablecoins tags: - - Payments + - Stablecoins responses: '200': - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' - description: Successfully retrieved a payment. + description: Successfully retrieved all stablecoin supplies across all chains. content: application/json: schema: - title: GetPaymentResponse + title: GetStablecoinsResponse properties: data: - oneOf: - - $ref: '#/components/schemas/FiatPaymentPolymorphic' - - $ref: '#/components/schemas/CryptoPayment' - discriminator: - propertyName: type - mapping: - Fiat Payment: '#/components/schemas/FiatPayment' - Crypto Payment: '#/components/schemas/CryptoPayment' + $ref: '#/components/schemas/Stablecoins' examples: - Fiat Payment: + response: value: data: - data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: payment - merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - merchantWalletId: '212000' - amount: - amount: '3.14' - currency: USD - source: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: card - description: Payment - status: pending - requiredAction: - type: three_d_secure_required - redirectUrl: https://example.org - verification: - avs: D - cvv: not_requested - threeDSecure: pass - eci: '00' - originalPayment: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: payment - merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - merchantWalletId: '212000' - amount: - amount: '3.14' - currency: USD - source: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: card - description: Payment - status: pending - captured: false - captureAmount: - amount: '3.14' - currency: USD - captureDate: '2020-04-10T02:13:30.000Z' - requiredAction: - type: three_d_secure_required - redirectUrl: https://example.org - cancel: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: cancel - description: Payment - status: pending - createDate: '2020-04-10T02:13:30.000Z' - refunds: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: payment - amount: - amount: '3.14' - currency: USD - description: Payment - status: pending - requiredAction: - type: three_d_secure_required - redirectUrl: https://example.org - fees: - amount: '3.14' - currency: USD - createDate: '2020-04-10T02:13:30.000Z' - fees: - amount: '3.14' - currency: USD - channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - cancel: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: cancel - merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - merchantWalletId: '212000' - amount: - amount: '3.14' - currency: USD - source: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: card - description: Payment - status: pending - originalPayment: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: payment - amount: - amount: '3.14' - currency: USD - description: Payment - status: pending - requiredAction: - type: three_d_secure_required - redirectUrl: https://example.org - fees: - amount: '3.14' - currency: USD - createDate: '2020-04-10T02:13:30.000Z' - fees: - amount: '3.14' - currency: USD - channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - refunds: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: refund - merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - merchantWalletId: '212000' - amount: - amount: '3.14' - currency: USD - source: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: card - description: Payment - status: pending - originalPayment: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: payment - amount: - amount: '3.14' - currency: USD - description: Payment - status: pending - requiredAction: - type: three_d_secure_required - redirectUrl: https://example.org - fees: - amount: '3.14' - currency: USD - createDate: '2020-04-10T02:13:30.000Z' - cancel: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - type: cancel - description: Payment - status: pending - createDate: '2020-04-10T02:13:30.000Z' - fees: - amount: '3.14' - currency: USD - channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - fees: - amount: '3.14' - currency: USD - trackingRef: '24910599141085313498894' - externalRef: YYYYMMDDXXXXXXXX012345 - errorCode: payment_failed - metadata: - email: satoshi@circle.com - phoneNumber: '+14155555555' - channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 - riskEvaluation: - decision: approved - reason: '3000' - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - Crypto Payment: - value: - data: - id: 66c56b6a-fc79-338b-8b94-aacc4f0f18de - type: payment - status: paid - amount: - amount: '1.00' - currency: USD - fees: - amount: '0.01' - currency: USD - merchantId: f1397191-56e6-42fd-be86-0a7b9bd91522 - merchantWalletId: '1000999922' - paymentIntentId: 6e4d4047-db14-4c09-b238-1215aee50d03 - settlementAmount: - amount: '1.00' - currency: USD - depositAddress: - chain: ETH - address: '0x97de855690955e0da79ce5c1b6804847e7070c7f' - transactionHash: '0x7351585460bd657f320b9afa02a52c26d89272d0d10cc29913eb8b28e64fd906' - createDate: '2022-07-21T20:16:35.092852Z' - updateDate: '2022-07-21T20:19:24.719313Z' - '401': - $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' + - name: USD Coin + symbol: USDC + totalAmount: '132.584192' + chains: + - amount: '132.584192' + chain: ALGO + '429': + $ref: '#/components/responses/LimitExceeded' /v1/businessAccount/balances: get: security: @@ -709,281 +320,185 @@ paths: currency: USD '401': $ref: '#/components/responses/NotAuthorized' - /v1/businessAccount/payouts: + /v1/balances: get: security: - bearerAuth: [] - parameters: - - $ref: '#/components/parameters/destination' - - name: type - description: Destination bank account type. Filters the results to fetch all - payouts made to a specified destination bank account type. This query parameter - can be passed multiple times to fetch results matching multiple destination - bank account types. - in: query - required: false - schema: - type: string - enum: - - wire - - name: status - description: Queries items with the specified status. Matches any status if - unspecified. - in: query - required: false - schema: - type: array - items: - $ref: '#/components/schemas/PayoutStatus' - - $ref: '#/components/parameters/From' - - $ref: '#/components/parameters/To' - - $ref: '#/components/parameters/PageBefore' - - $ref: '#/components/parameters/PageAfter' - - $ref: '#/components/parameters/PageSize' - summary: List all payouts - operationId: getBusinessAccountPayouts + summary: List all balances + description: Retrieves the balance of merchant funds that have settled and also + of funds that have been sent for processing but have not yet settled. + operationId: getBalances tags: - - Payouts + - Balances responses: '200': - description: Successfully retrieved a list of payouts. + description: Successfully retrieved balances. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetBusinessAccountPayoutsResponse + title: GetBalancesResponse properties: data: - type: array - items: - $ref: '#/components/schemas/PayoutBusinessAccount' + $ref: '#/components/schemas/Balances' examples: response: value: data: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - sourceWalletId: '53535335' - destination: - type: wire - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - name: COMMERZBANK AG ****3000 - amount: - amount: '3.14' + available: + - amount: '3.14' currency: USD - fees: - amount: '3.14' + unsettled: + - amount: '3.14' currency: USD - status: pending - trackingRef: CIR-6ESOQANEP3NAO - errorCode: insufficient_funds - riskEvaluation: - decision: approved - reason: '3000' - adjustments: - fxCredit: - amount: '3.14' - currency: USD - fxDebit: - amount: '3.14' - currency: USD - return: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - payoutId: abdb500d-4a59-457c-801f-2d418c8703ac - amount: - amount: '3.14' - currency: USD - fees: - amount: '3.14' - currency: USD - reason: payout_returned - status: pending - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' '401': $ref: '#/components/responses/NotAuthorized' + /v1/cards: post: security: - bearerAuth: [] - summary: Create a payout - operationId: createBusinessAccountPayout + summary: Create a card + operationId: createCard tags: - - Payouts + - Cards requestBody: content: application/json: schema: - $ref: '#/components/schemas/BusinessAccountPayoutCreationRequest' + $ref: '#/components/schemas/CardCreationRequest' responses: '201': - description: Successfully created a payout. + description: Successfully created a card. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: CreateBusinessAccountPayoutResponse + title: CreateCardResponse properties: data: - $ref: '#/components/schemas/PayoutBusinessAccount' + $ref: '#/components/schemas/Card' examples: response: value: data: id: b8627ae8-732b-4d25-b947-1df8f4007a29 - sourceWalletId: '53535335' - destination: - type: wire - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - name: COMMERZBANK AG ****3000 - amount: - amount: '3.14' - currency: USD - fees: - amount: '3.14' - currency: USD status: pending - trackingRef: CIR-6ESOQANEP3NAO - errorCode: insufficient_funds + billingDetails: + name: Satoshi Nakamoto + city: Boston + country: US + line1: 100 Money Street + line2: Suite 1 + district: MA + postalCode: '01234' + expMonth: 1 + expYear: 2020 + network: VISA + last4: '0123' + bin: '401230' + issuerCountry: US + fundingType: credit + fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + errorCode: verification_failed + verification: + avs: D + cvv: not_requested riskEvaluation: decision: approved reason: '3000' - adjustments: - fxCredit: - amount: '3.14' - currency: USD - fxDebit: - amount: '3.14' - currency: USD - return: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - payoutId: abdb500d-4a59-457c-801f-2d418c8703ac - amount: - amount: '3.14' - currency: USD - fees: - amount: '3.14' - currency: USD - reason: payout_returned - status: pending - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' + metadata: + email: satoshi@circle.com + phoneNumber: '+14155555555' createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' - /v1/businessAccount/payouts/{id}: get: - parameters: - - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: Get a payout - operationId: getBusinessAccountPayout + summary: List all cards + operationId: getCards tags: - - Payouts + - Cards + parameters: + - $ref: '#/components/parameters/PageBefore' + - $ref: '#/components/parameters/PageAfter' + - $ref: '#/components/parameters/PageSize' responses: '200': - description: Successfully retrieved a payout. + description: Successfully retrieved a list of cards. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetBusinessAccountPayoutResponse + title: GetCardsResponse properties: data: - $ref: '#/components/schemas/PayoutBusinessAccount' + type: array + items: + $ref: '#/components/schemas/SimpleCard' examples: response: value: data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - sourceWalletId: '53535335' - destination: - type: wire - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - name: COMMERZBANK AG ****3000 - amount: - amount: '3.14' - currency: USD - fees: - amount: '3.14' - currency: USD + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 status: pending - trackingRef: CIR-6ESOQANEP3NAO - errorCode: insufficient_funds + billingDetails: + country: US + district: MA + expMonth: 1 + expYear: 2020 + network: VISA + bin: '401230' + issuerCountry: US + fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + verification: + avs: D + cvv: not_requested riskEvaluation: decision: approved reason: '3000' - adjustments: - fxCredit: - amount: '3.14' - currency: USD - fxDebit: - amount: '3.14' - currency: USD - return: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - payoutId: abdb500d-4a59-457c-801f-2d418c8703ac - amount: - amount: '3.14' - currency: USD - fees: - amount: '3.14' - currency: USD - reason: payout_returned - status: pending - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' '401': $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' - /v1/businessAccount/banks/wires: - post: + /v1/cards/{id}: + get: + parameters: + - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: Create a Wire bank account - operationId: createBusinessAccountWireBankAccount + summary: Get a card + operationId: getCard tags: - - Wires - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WireCreationRequest' + - Cards responses: - '201': - description: Successfully created a bank account for wire transfers. + '200': + description: Successfully retrieved a card. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: CreateBusinessAccountWireBankAccountResponse + title: GetCardResponse properties: data: - $ref: '#/components/schemas/Wire' + $ref: '#/components/schemas/Card' examples: response: value: data: id: b8627ae8-732b-4d25-b947-1df8f4007a29 status: pending - description: WELLS FARGO BANK, NA ****0010 - trackingRef: CIR13FB13A - fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 billingDetails: name: Satoshi Nakamoto city: Boston @@ -992,50 +507,63 @@ paths: line2: Suite 1 district: MA postalCode: '01234' - bankAddress: - bankName: SAN FRANCISCO - city: SAN FRANCISCO - country: US - line1: 100 Money Street - line2: Suite 1 - district: CA + expMonth: 1 + expYear: 2020 + network: VISA + last4: '0123' + bin: '401230' + issuerCountry: US + fundingType: credit + fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + errorCode: verification_failed + verification: + avs: D + cvv: not_requested + riskEvaluation: + decision: approved + reason: '3000' + metadata: + email: satoshi@circle.com + phoneNumber: '+14155555555' createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' - '400': - $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' - get: + '404': + $ref: '#/components/responses/NotFound' + put: + parameters: + - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: List all Wire bank accounts - operationId: getBusinessAccountWireBankAccounts + summary: Update a card + operationId: updateCard tags: - - Wires + - Cards + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CardUpdate' responses: '200': - description: Successfully retrieved a list of bank accounts. + description: Succesfully modified a card. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetBusinessAccountWireBankAccountsResponse + title: UpdateCardResponse properties: data: - type: array - items: - $ref: '#/components/schemas/Wire' + $ref: '#/components/schemas/Card' examples: response: value: data: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + id: b8627ae8-732b-4d25-b947-1df8f4007a29 status: pending - description: WELLS FARGO BANK, NA ****0010 - trackingRef: CIR13FB13A - fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 billingDetails: name: Satoshi Nakamoto city: Boston @@ -1044,12 +572,127 @@ paths: line2: Suite 1 district: MA postalCode: '01234' - bankAddress: - bankName: SAN FRANCISCO - city: SAN FRANCISCO - country: US - line1: 100 Money Street - line2: Suite 1 + expMonth: 1 + expYear: 2020 + network: VISA + last4: '0123' + bin: '401230' + issuerCountry: US + fundingType: credit + fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + errorCode: verification_failed + verification: + avs: D + cvv: not_requested + riskEvaluation: + decision: approved + reason: '3000' + metadata: + email: satoshi@circle.com + phoneNumber: '+14155555555' + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + /v1/businessAccount/banks/wires: + post: + security: + - bearerAuth: [] + summary: Create a Wire bank account + operationId: createBusinessAccountWireBankAccount + tags: + - Wires + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WireCreationRequest' + responses: + '201': + description: Successfully created a bank account for wire transfers. + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' + content: + application/json: + schema: + title: CreateBusinessAccountWireBankAccountResponse + properties: + data: + $ref: '#/components/schemas/Wire' + examples: + response: + value: + data: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + status: pending + description: WELLS FARGO BANK, NA ****0010 + trackingRef: CIR13FB13A + fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + billingDetails: + name: Satoshi Nakamoto + city: Boston + country: US + line1: 100 Money Street + line2: Suite 1 + district: MA + postalCode: '01234' + bankAddress: + bankName: SAN FRANCISCO + city: SAN FRANCISCO + country: US + line1: 100 Money Street + line2: Suite 1 + district: CA + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/NotAuthorized' + get: + security: + - bearerAuth: [] + summary: List all Wire bank accounts + operationId: getBusinessAccountWireBankAccounts + tags: + - Wires + responses: + '200': + description: Successfully retrieved a list of bank accounts. + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' + content: + application/json: + schema: + title: GetBusinessAccountWireBankAccountsResponse + properties: + data: + type: array + items: + $ref: '#/components/schemas/Wire' + examples: + response: + value: + data: + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + status: pending + description: WELLS FARGO BANK, NA ****0010 + trackingRef: CIR13FB13A + fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + billingDetails: + name: Satoshi Nakamoto + city: Boston + country: US + line1: 100 Money Street + line2: Suite 1 + district: MA + postalCode: '01234' + bankAddress: + bankName: SAN FRANCISCO + city: SAN FRANCISCO + country: US + line1: 100 Money Street + line2: Suite 1 district: CA createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' @@ -1158,166 +801,177 @@ paths: $ref: '#/components/responses/NotAuthorized' '404': $ref: '#/components/responses/NotFound' - /v1/businessAccount/banks/signet: + /v1/banks/wires: post: security: - bearerAuth: [] - summary: Create a Signet bank account (Production Only) - operationId: createBusinessAccountSignetBankAccount + summary: Create a Wire bank account + operationId: createWireBankAccount tags: - - Signet + - Wires requestBody: content: application/json: schema: - $ref: '#/components/schemas/SignetFiatAccountCreationRequest' + $ref: '#/components/schemas/WireCreationRequest' responses: '201': - description: Successfully created a bank account for Signet transfers. + description: Successfully created a bank account for wire transfers. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: CreateBusinessAccountSignetBankAccountResponse + title: CreateWireBankAccountResponse properties: data: - $ref: '#/components/schemas/SignetFiatAccountResponse' + $ref: '#/components/schemas/Wire' examples: response: value: data: id: b8627ae8-732b-4d25-b947-1df8f4007a29 status: pending - trackingRef: CIR13FB14A - walletAddress: '0xcac04f0069e4ac9314ac4e608e99278a3bebabcd' + description: WELLS FARGO BANK, NA ****0010 + trackingRef: CIR13FB13A + fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + billingDetails: + name: Satoshi Nakamoto + city: Boston + country: US + line1: 100 Money Street + line2: Suite 1 + district: MA + postalCode: '01234' + bankAddress: + bankName: SAN FRANCISCO + city: SAN FRANCISCO + country: US + line1: 100 Money Street + line2: Suite 1 + district: CA createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' + /v1/banks/wires/{id}: get: + parameters: + - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: List all Signet bank accounts (Production Only). - operationId: getBusinessAccountSignetBankAccounts + summary: Get a Wire bank account + operationId: getWireBankAccount tags: - - Signet + - Wires responses: '200': - description: Successfully retrieved all bank accounts for Signet transfers. + description: Successfully retrieved a bank account for wire transfers. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetBusinessAccountSignetBankAccountsResponse + title: GetWireBankAccountResponse properties: data: - type: array - items: - $ref: '#/components/schemas/SignetFiatAccountResponse' + $ref: '#/components/schemas/Wire' examples: response: value: data: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + id: b8627ae8-732b-4d25-b947-1df8f4007a29 status: pending - trackingRef: CIR13FB14A - walletAddress: '0xcac04f0069e4ac9314ac4e608e99278a3bebabcd' + description: WELLS FARGO BANK, NA ****0010 + trackingRef: CIR13FB13A + fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + billingDetails: + name: Satoshi Nakamoto + city: Boston + country: US + line1: 100 Money Street + line2: Suite 1 + district: MA + postalCode: '01234' + bankAddress: + bankName: SAN FRANCISCO + city: SAN FRANCISCO + country: US + line1: 100 Money Street + line2: Suite 1 + district: CA createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' '401': $ref: '#/components/responses/NotAuthorized' - /v1/businessAccount/banks/signet/{id}: + '404': + $ref: '#/components/responses/NotFound' + /v1/banks/wires/{id}/instructions: get: parameters: - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: Get a Signet bank account (Production Only) - operationId: getBusinessAccountSignetBankAccount + summary: Get Wire instructions + description: Get the wire transfer instructions into the Circle bank account + given your bank account id + operationId: getWireInstructionsBankAccount tags: - - Signet + - Wires responses: '200': - description: Successfully retrieved a bank account for Signet transfers. + description: Successfully retrieved wire transfer instructions for the bank + account. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetBusinessAccountSignetBankAccountResponse + title: GetWireInstructionsBankAccountResponse properties: data: - $ref: '#/components/schemas/SignetFiatAccountResponse' + $ref: '#/components/schemas/WireInstruction' examples: response: value: data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - status: pending - trackingRef: CIR13FB14A - walletAddress: '0xcac04f0069e4ac9314ac4e608e99278a3bebabcd' - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' + trackingRef: CIR13FB13A + beneficiary: + name: CIRCLE INTERNET FINANCIAL INC + address1: 99 HIGH STREET + address2: BOSTON MA 02110 + beneficiaryBank: + name: SILVERGATE BANK + swiftCode: SIVGUS66XXX + routingNumber: '322286803' + accountNumber: '****7427' + currency: USD + address: 4250 EXECUTIVE SQUARE SUITE 300 + city: LA JOLLA + postalCode: '02110' + country: US '401': $ref: '#/components/responses/NotAuthorized' '404': $ref: '#/components/responses/NotFound' - /v1/businessAccount/banks/signet/{id}/instructions: - get: - parameters: - - $ref: '#/components/parameters/IdPath' + /v1/businessAccount/banks/sen: + post: security: - bearerAuth: [] - summary: Get Signet instructions (Production Only) - description: Get the Signet transfer instructions into the Circle bank account - given your bank account id (only available on Production now). - operationId: getBusinessAccountSignetInstructionsBankAccount + summary: Create a Silvergate SEN bank account (BETA) + operationId: createBusinessAccountSenBankAccount tags: - - Signet - responses: - '200': - description: Successfully retrieved Signet transfer instructions for the - bank account. - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' - content: - application/json: - schema: - title: GetBusinessAccountSignetInstructionsBankAccountResponse - properties: - data: - $ref: '#/components/schemas/SignetInstruction' - examples: - response: - value: - data: - trackingRef: CIR13FB14A - walletAddress: '0x7e4f4fe03243ac7b291ebaee90b2bb27025a1234' - '401': - $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' - /v1/businessAccount/banks/sen: - post: - security: - - bearerAuth: [] - summary: Create a Silvergate SEN bank account (BETA) - operationId: createBusinessAccountSenBankAccount - tags: - - SEN - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SenFiatAccountCreationRequest' + - SEN + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SenFiatAccountCreationRequest' responses: '201': description: Successfully created a bank account for Silvergate SEN transfers. @@ -1457,310 +1111,315 @@ paths: $ref: '#/components/responses/NotAuthorized' '404': $ref: '#/components/responses/NotFound' - /v1/businessAccount/transfers: + /v1/banks/ach: post: security: - bearerAuth: [] - summary: Create a transfer - description: A transfer can be made from an existing business account to a blockchain - location. - operationId: createBusinessAccountTransfer + summary: Create a ACH bank account + operationId: createACHBankAccount tags: - - Transfers + - ACH requestBody: content: application/json: schema: - $ref: '#/components/schemas/BusinessAccountTransferCreationRequest' + $ref: '#/components/schemas/ACHCreationRequest' responses: '201': + description: Successfully created a bank account for ACH transfers. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' - description: Successfully created a transfer. content: application/json: schema: - title: CreateBusinessAccountTransferResponse + title: CreateACHBankAccountResponse properties: data: - $ref: '#/components/schemas/Transfer' + $ref: '#/components/schemas/ACH' examples: response: value: data: id: b8627ae8-732b-4d25-b947-1df8f4007a29 - source: - type: wallet - id: '12345' - identities: - - type: individual - name: Satoshi Nakamoto - addresses: - - line1: 100 Money Street - line2: Suite 1 - city: Boston - district: MA - postalCode: '01234' - country: US - destination: - type: blockchain - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: '123456789' - chain: ALGO - amount: - amount: '3.14' - currency: USD - fees: - - amount: '10.00' - currency: USD - type: network - transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' status: pending - errorCode: transfer_failed + accountNumber: '****6789' + routingNumber: '613334455' + billingDetails: + name: Satoshi Nakamoto + city: Boston + country: US + line1: 100 Money Street + line2: Suite 1 + district: MA + postalCode: '01234' + bankAccountType: retail + bankAddress: + bankName: SAN FRANCISCO + city: SAN FRANCISCO + country: US + line1: 100 Money Street + line2: Suite 1 + district: CA + fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + errorCode: bank_account_authorization_expired + riskEvaluation: + decision: approved + reason: '3000' createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + metadata: + email: satoshi@circle.com + phoneNumber: '+14155555555' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/NotAuthorized' + /v1/banks/ach/{id}: get: + parameters: + - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - parameters: - - $ref: '#/components/parameters/From' - - $ref: '#/components/parameters/To' - - $ref: '#/components/parameters/PageBefore' - - $ref: '#/components/parameters/PageAfter' - - $ref: '#/components/parameters/PageSize' - summary: List all transfers - description: 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. - operationId: searchBusinessAccountTransfers + summary: Get a ACH bank account + operationId: getACHBankAccount tags: - - Transfers + - ACH responses: '200': - description: Successfully retrieved a list of transfers. + description: Successfully retrieved a bank account for ACH transfers. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: SearchBusinessAccountTransfersResponse + title: GetACHBankAccountResponse properties: data: - type: array - items: - $ref: '#/components/schemas/Transfer' + $ref: '#/components/schemas/ACH' examples: response: value: data: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - source: - type: wallet - id: '12345' - identities: - - type: individual - name: Satoshi Nakamoto - addresses: - - line1: 100 Money Street - line2: Suite 1 - city: Boston - district: MA - postalCode: '01234' - country: US - destination: - type: blockchain - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: '123456789' - chain: ALGO - amount: - amount: '3.14' - currency: USD - fees: - - amount: '10.00' - currency: USD - type: network - transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' + id: b8627ae8-732b-4d25-b947-1df8f4007a29 status: pending - errorCode: transfer_failed + accountNumber: '****6789' + routingNumber: '613334455' + billingDetails: + name: Satoshi Nakamoto + city: Boston + country: US + line1: 100 Money Street + line2: Suite 1 + district: MA + postalCode: '01234' + bankAccountType: retail + bankAddress: + bankName: SAN FRANCISCO + city: SAN FRANCISCO + country: US + line1: 100 Money Street + line2: Suite 1 + district: CA + fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + errorCode: bank_account_authorization_expired + riskEvaluation: + decision: approved + reason: '3000' createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + metadata: + email: satoshi@circle.com + phoneNumber: '+14155555555' '401': $ref: '#/components/responses/NotAuthorized' - /v1/businessAccount/transfers/{id}: - get: - parameters: - - $ref: '#/components/parameters/IdPath' + '404': + $ref: '#/components/responses/NotFound' + /v1/banks/sepa: + post: security: - bearerAuth: [] - summary: Get a transfer - operationId: getBusinessAccountTransfer + summary: Create a SEPA bank account (BETA) + operationId: createSEPABankAccount tags: - - Transfers + - SEPA + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SEPACreationRequest' responses: - '200': + '201': + description: Successfully created a bank account for SEPA transfers. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' - description: Successfully retrieved a transfer. content: application/json: schema: - title: GetBusinessAccountTransferResponse + title: CreateSEPABankAccountResponse properties: data: - $ref: '#/components/schemas/Transfer' + $ref: '#/components/schemas/SEPA' examples: response: value: data: id: b8627ae8-732b-4d25-b947-1df8f4007a29 - source: - type: wallet - id: '12345' - identities: - - type: individual - name: Satoshi Nakamoto - addresses: - - line1: 100 Money Street - line2: Suite 1 - city: Boston - district: MA - postalCode: '01234' - country: US - destination: - type: blockchain - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: '123456789' - chain: ALGO - amount: - amount: '3.14' - currency: USD - fees: - - amount: '10.00' - currency: USD - type: network - transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' status: pending - errorCode: transfer_failed - createDate: '2020-04-10T02:13:30.000Z' - /v1/businessAccount/wallets/addresses/deposit: - post: - security: - - bearerAuth: [] - summary: Create a deposit address - description: '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. - - ' - operationId: generateBusinessAccountDepositAddress + description: Bank of Ireland ****0010 + trackingRef: CIR13FB13A + fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + riskEvaluation: + decision: approved + reason: '3000' + billingDetails: + name: Satoshi Nakamoto + city: Boston + country: US + line1: 100 Money Street + line2: Suite 1 + district: MA + postalCode: '01234' + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/NotAuthorized' + /v1/banks/sepa/{id}: + get: + parameters: + - $ref: '#/components/parameters/IdPath' + security: + - bearerAuth: [] + summary: Get a SEPA bank account (BETA) + operationId: getSEPABankAccount tags: - - Addresses - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BusinessAccountGenerateAddressRequest' + - SEPA responses: - '201': - description: Successfully generated a new deposit address. + '200': + description: Successfully retrieved a bank account for SEPA transfers. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GenerateBusinessAccountDepositAddressResponse + title: GetSEPABankAccountResponse properties: data: - $ref: '#/components/schemas/AddressObject' + $ref: '#/components/schemas/SEPA' examples: response: value: data: - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: '123456789' - currency: USD - chain: ALGO - '400': - $ref: '#/components/responses/BadRequest' + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + status: pending + description: Bank of Ireland ****0010 + trackingRef: CIR13FB13A + fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + riskEvaluation: + decision: approved + reason: '3000' + billingDetails: + name: Satoshi Nakamoto + city: Boston + country: US + line1: 100 Money Street + line2: Suite 1 + district: MA + postalCode: '01234' + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' '401': $ref: '#/components/responses/NotAuthorized' + '404': + $ref: '#/components/responses/NotFound' + /v1/banks/sepa/{id}/instructions: get: + parameters: + - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: List all deposit addresses - operationId: getBusinessAccountDepositAddresses + summary: Get SEPA instructions (BETA) + description: Get the SEPA transfer instructions into the Circle bank account + given your bank account id (BETA). + operationId: getSEPAInstructionsBankAccount tags: - - Addresses + - SEPA responses: '200': - description: Successfully retrieved a list of deposit addresses. + description: Successfully retrieved SEPA transfer instructions for the bank + account. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetBusinessAccountDepositAddressesResponse + title: GetSEPAInstructionsBankAccountResponse properties: data: - type: array - items: - $ref: '#/components/schemas/AddressObject' + $ref: '#/components/schemas/SEPAInstruction' examples: response: value: data: - - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: '123456789' - currency: USD - chain: ALGO + trackingRef: CIR13FB13A + beneficiary: + name: CIRCLE INTERNET FINANCIAL INC + address1: 99 HIGH STREET + address2: BOSTON MA 02110 + beneficiaryBank: + name: LHV Bank + bic: LHVBEE22XXX + iban: '****6789' + address: Tartu mnt 2, 10145 Tallinn + city: Tallinn + postalCode: '10017' + country: EE '401': $ref: '#/components/responses/NotAuthorized' - /v1/businessAccount/wallets/addresses/recipient: + '404': + $ref: '#/components/responses/NotFound' + /v1/businessAccount/banks/signet: post: security: - bearerAuth: [] - summary: Create a recipient address - description: 'Stores an external blockchain address. Once added, the recipient - address must be verified to ensure that you know and trust each new address. - - ' - operationId: createBusinessAccountRecipientAddress + summary: Create a Signet bank account (Production Only) + operationId: createBusinessAccountSignetBankAccount tags: - - Addresses + - Signet requestBody: content: application/json: schema: - $ref: '#/components/schemas/BusinessAccountRecipientAddressCreationRequest' + $ref: '#/components/schemas/SignetFiatAccountCreationRequest' responses: - '200': - description: Successfully added a recipient address. + '201': + description: Successfully created a bank account for Signet transfers. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: CreateBusinessAccountRecipientAddressResponse + title: CreateBusinessAccountSignetBankAccountResponse properties: data: - $ref: '#/components/schemas/BusinessAccountRecipientAddressObject' + $ref: '#/components/schemas/SignetFiatAccountResponse' examples: response: value: data: id: b8627ae8-732b-4d25-b947-1df8f4007a29 - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: '123456789' - chain: ALGO - currency: USD - description: My USDC address at a cryptocurrency exchange + status: pending + trackingRef: CIR13FB14A + walletAddress: '0xcac04f0069e4ac9314ac4e608e99278a3bebabcd' + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' '400': $ref: '#/components/responses/BadRequest' '401': @@ -1768,1127 +1427,1129 @@ paths: get: security: - bearerAuth: [] - parameters: - - $ref: '#/components/parameters/From' - - $ref: '#/components/parameters/To' - - $ref: '#/components/parameters/PageBefore' - - $ref: '#/components/parameters/PageAfter' - - $ref: '#/components/parameters/PageSize' - summary: List all recipient addresses - description: '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. - - ' - operationId: getBusinessAccountRecipientAddresses + summary: List all Signet bank accounts (Production Only). + operationId: getBusinessAccountSignetBankAccounts tags: - - Addresses + - Signet responses: '200': - description: Successfully retrieved a list of recipient addresses. + description: Successfully retrieved all bank accounts for Signet transfers. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetBusinessAccountRecipientAddressesResponse + title: GetBusinessAccountSignetBankAccountsResponse properties: data: type: array items: - $ref: '#/components/schemas/BusinessAccountRecipientAddressObject' + $ref: '#/components/schemas/SignetFiatAccountResponse' examples: response: value: data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: '123456789' - chain: ALGO - currency: USD - description: My USDC address at a cryptocurrency exchange + status: pending + trackingRef: CIR13FB14A + walletAddress: '0xcac04f0069e4ac9314ac4e608e99278a3bebabcd' + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' '401': $ref: '#/components/responses/NotAuthorized' - /v1/businessAccount/deposits: + /v1/businessAccount/banks/signet/{id}: get: + parameters: + - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - parameters: - - name: type - description: Unique identifier for the deposit type. Filters results to fetch - deposits made by this specific type. - in: query - schema: - type: string - enum: - - wire - - $ref: '#/components/parameters/From' - - $ref: '#/components/parameters/To' - - $ref: '#/components/parameters/PageBefore' - - $ref: '#/components/parameters/PageAfter' - - $ref: '#/components/parameters/PageSize' - summary: List all deposits - description: 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. - operationId: searchBusinessAccountDeposits + summary: Get a Signet bank account (Production Only) + operationId: getBusinessAccountSignetBankAccount tags: - - Deposits + - Signet responses: '200': - description: Successfully retrieved a list of deposits. + description: Successfully retrieved a bank account for Signet transfers. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: SearchBusinessAccountDepositsResponse + title: GetBusinessAccountSignetBankAccountResponse properties: data: - type: array - items: - $ref: '#/components/schemas/BusinessAccountDeposit' + $ref: '#/components/schemas/SignetFiatAccountResponse' examples: response: value: data: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - sourceWalletId: 9b57048d-2365-4ff5-956b-0199170d1035 - destination: - type: wallet - id: '12345' - amount: - amount: '3.14' - currency: USD - fee: - amount: '3.14' - currency: USD + id: b8627ae8-732b-4d25-b947-1df8f4007a29 status: pending - riskEvaluation: - decision: approved - reason: '3000' + trackingRef: CIR13FB14A + walletAddress: '0xcac04f0069e4ac9314ac4e608e99278a3bebabcd' createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' '401': $ref: '#/components/responses/NotAuthorized' - /v1/mocks/payments/sen: - post: + '404': + $ref: '#/components/responses/NotFound' + /v1/businessAccount/banks/signet/{id}/instructions: + get: + parameters: + - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: Create a mock Silvergate SEN payment - description: 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. - operationId: createSenPayment + summary: Get Signet instructions (Production Only) + description: Get the Signet transfer instructions into the Circle bank account + given your bank account id (only available on Production now). + operationId: getBusinessAccountSignetInstructionsBankAccount tags: - - Deposits - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MockSenPaymentRequest' + - Signet responses: - '201': - description: Successfully created a mock SEN transfer. + '200': + description: Successfully retrieved Signet transfer instructions for the + bank account. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: CreateSenPaymentResponse + title: GetBusinessAccountSignetInstructionsBankAccountResponse properties: data: - $ref: '#/components/schemas/MockSenPaymentResponse' + $ref: '#/components/schemas/SignetInstruction' examples: response: value: data: - trackingRef: CIR13FB13A - amount: - amount: '3.14' - currency: USD - beneficiaryBank: - accountNumber: '11111111' - status: pending + trackingRef: CIR13FB14A + walletAddress: '0x7e4f4fe03243ac7b291ebaee90b2bb27025a1234' + '401': + $ref: '#/components/responses/NotAuthorized' + '404': + $ref: '#/components/responses/NotFound' + /v1/businessAccount/wallets/addresses/deposit: + post: + security: + - bearerAuth: [] + summary: Create a deposit address + description: '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. + + ' + operationId: generateBusinessAccountDepositAddress + tags: + - Addresses + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BusinessAccountGenerateAddressRequest' + responses: + '201': + description: Successfully generated a new deposit address. + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' + content: + application/json: + schema: + title: GenerateBusinessAccountDepositAddressResponse + properties: + data: + $ref: '#/components/schemas/AddressObject' + examples: + response: + value: + data: + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: '123456789' + currency: USD + chain: ALGO '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' - /v1/payouts: get: security: - bearerAuth: [] - parameters: - - name: source - description: Universally unique identifier (UUID v4) for the source wallet. - Filters the results to fetch all payouts made from a source wallet. If not - provided, payouts from all wallets will be returned. - in: query - required: false - schema: - type: string - format: uuid - example: 54c1cbab-c419-450f-ad23-906fa03af7f0 - - name: type - description: Destination bank account type. Filters the results to fetch all - payouts made to a specified destination bank account type. This query parameter - can be passed multiple times to fetch results matching multiple destination - bank account types. - in: query - required: false - schema: - type: array - items: - $ref: '#/components/schemas/PayoutDestinationType' - - name: status - description: Queries items with the specified status. Matches any status if - unspecified. - in: query - required: false - schema: - type: array - items: - $ref: '#/components/schemas/PayoutStatus' - - $ref: '#/components/parameters/destination' - - $ref: '#/components/parameters/From' - - $ref: '#/components/parameters/To' - - $ref: '#/components/parameters/PageBefore' - - $ref: '#/components/parameters/PageAfter' - - $ref: '#/components/parameters/PageSize' - summary: List all payouts - operationId: getPayouts + summary: List all deposit addresses + operationId: getBusinessAccountDepositAddresses tags: - - Payouts + - Addresses responses: '200': - description: Successfully retrieved a list of payouts. + description: Successfully retrieved a list of deposit addresses. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetPayoutsResponse + title: GetBusinessAccountDepositAddressesResponse properties: data: type: array items: - $ref: '#/components/schemas/Payout' + $ref: '#/components/schemas/AddressObject' examples: response: value: data: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - sourceWalletId: '53535335' - destination: - type: wire - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - name: COMMERZBANK AG ****3000 - amount: - amount: '3.14' - currency: USD - fees: - amount: '3.14' - currency: USD - status: pending - trackingRef: CIR-6ESOQANEP3NAO - errorCode: insufficient_funds - riskEvaluation: - decision: approved - reason: '3000' - adjustments: - fxCredit: - amount: '3.14' - currency: USD - fxDebit: - amount: '3.14' - currency: USD - return: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - payoutId: abdb500d-4a59-457c-801f-2d418c8703ac - amount: - amount: '3.14' - currency: USD - fees: - amount: '3.14' - currency: USD - reason: payout_returned - status: pending - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' + - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: '123456789' + currency: USD + chain: ALGO '401': $ref: '#/components/responses/NotAuthorized' + /v1/businessAccount/wallets/addresses/recipient: post: security: - bearerAuth: [] - summary: Create a payout - operationId: createPayout + summary: Create a recipient address + description: 'Stores an external blockchain address. Once added, the recipient + address must be verified to ensure that you know and trust each new address. + + ' + operationId: createBusinessAccountRecipientAddress tags: - - Payouts + - Addresses requestBody: content: application/json: schema: - $ref: '#/components/schemas/PayoutCreationRequest' + $ref: '#/components/schemas/BusinessAccountRecipientAddressCreationRequest' responses: - '201': - description: Successfully created a payout. + '200': + description: Successfully added a recipient address. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: CreatePayoutResponse + title: CreateBusinessAccountRecipientAddressResponse properties: data: - $ref: '#/components/schemas/Payout' + $ref: '#/components/schemas/BusinessAccountRecipientAddressObject' examples: response: value: data: id: b8627ae8-732b-4d25-b947-1df8f4007a29 - sourceWalletId: '53535335' - destination: - type: wire - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - name: COMMERZBANK AG ****3000 - amount: - amount: '3.14' - currency: USD - fees: - amount: '3.14' - currency: USD - status: pending - trackingRef: CIR-6ESOQANEP3NAO - errorCode: insufficient_funds - riskEvaluation: - decision: approved - reason: '3000' - adjustments: - fxCredit: - amount: '3.14' - currency: USD - fxDebit: - amount: '3.14' - currency: USD - return: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - payoutId: abdb500d-4a59-457c-801f-2d418c8703ac - amount: - amount: '3.14' - currency: USD - fees: - amount: '3.14' - currency: USD - reason: payout_returned - status: pending - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: '123456789' + chain: ALGO + currency: USD + description: My USDC address at a cryptocurrency exchange '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' - /v1/payouts/{id}: get: - parameters: - - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: Get a payout - operationId: getPayout + parameters: + - $ref: '#/components/parameters/From' + - $ref: '#/components/parameters/To' + - $ref: '#/components/parameters/PageBefore' + - $ref: '#/components/parameters/PageAfter' + - $ref: '#/components/parameters/PageSize' + summary: List all recipient addresses + description: '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. + + ' + operationId: getBusinessAccountRecipientAddresses tags: - - Payouts + - Addresses responses: '200': - description: Successfully retrieved a payout. + description: Successfully retrieved a list of recipient addresses. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetPayoutResponse + title: GetBusinessAccountRecipientAddressesResponse properties: data: - $ref: '#/components/schemas/DetailedPayout' + type: array + items: + $ref: '#/components/schemas/BusinessAccountRecipientAddressObject' examples: response: value: data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - sourceWalletId: '53535335' - destination: - type: wire - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - name: COMMERZBANK AG ****3000 + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: '123456789' + chain: ALGO + currency: USD + description: My USDC address at a cryptocurrency exchange + '401': + $ref: '#/components/responses/NotAuthorized' + /v1/businessAccount/deposits: + get: + security: + - bearerAuth: [] + parameters: + - name: type + description: Unique identifier for the deposit type. Filters results to fetch + deposits made by this specific type. + in: query + schema: + type: string + enum: + - wire + - $ref: '#/components/parameters/From' + - $ref: '#/components/parameters/To' + - $ref: '#/components/parameters/PageBefore' + - $ref: '#/components/parameters/PageAfter' + - $ref: '#/components/parameters/PageSize' + summary: List all deposits + description: 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. + operationId: searchBusinessAccountDeposits + tags: + - Deposits + responses: + '200': + description: Successfully retrieved a list of deposits. + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' + content: + application/json: + schema: + title: SearchBusinessAccountDepositsResponse + properties: + data: + type: array + items: + $ref: '#/components/schemas/BusinessAccountDeposit' + examples: + response: + value: + data: + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + sourceWalletId: 9b57048d-2365-4ff5-956b-0199170d1035 + destination: + type: wallet + id: '12345' amount: amount: '3.14' currency: USD - fees: + fee: amount: '3.14' currency: USD status: pending - trackingRef: CIR-6ESOQANEP3NAO - externalRef: YYYYMMDDXXXXXXXX012345 - errorCode: insufficient_funds riskEvaluation: decision: approved reason: '3000' - adjustments: - fxCredit: - amount: '3.14' - currency: USD - fxDebit: - amount: '3.14' - currency: USD - return: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - payoutId: abdb500d-4a59-457c-801f-2d418c8703ac - amount: - amount: '3.14' - currency: USD - fees: - amount: '3.14' - currency: USD - reason: payout_returned - status: pending - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' '401': $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' - /v1/transfers: + /v1/paymentIntents: post: security: - bearerAuth: [] - summary: Create a transfer - description: A transfer can be made from an existing funded wallet to a blockchain - address or another wallet. - operationId: createTransfer + summary: Create a payment intent + operationId: createPaymentIntent tags: - - On-chain payouts + - Payment Intents requestBody: content: application/json: schema: - $ref: '#/components/schemas/TransferCreationRequest' - examples: - request: - value: - idempotencyKey: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 - source: - type: wallet - id: '12345' - destination: - type: blockchain - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - chain: ETH - amount: - amount: '3.14' - currency: USD - travel rule: - value: - idempotencyKey: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 - source: - type: wallet - id: '12345' - identities: - - type: individual - name: Satoshi Nakamoto - addresses: - - line1: 100 Money Street - line2: Suite 1 - city: Boston - district: MA - postalCode: '01234' - country: US - destination: - type: blockchain - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - chain: ETH - amount: - amount: '3000.00' - currency: USD + $ref: '#/components/schemas/PaymentIntent' responses: '201': + description: Successfully created a payment intent. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' - description: Successfully created a transfer. content: application/json: schema: - title: CreateTransferResponse + title: CreatePaymentIntentResponse properties: data: - $ref: '#/components/schemas/Transfer' + $ref: '#/components/schemas/PaymentIntent' examples: response: value: data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - source: - type: wallet - id: '12345' - destination: - type: blockchain - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - chain: ETH + id: 8755d0ea-14f9-4259-b092-de23c14b6568 amount: amount: '3.14' currency: USD - transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' - status: pending - createDate: '2020-04-10T02:13:30.000Z' - travel rule: - value: - data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - source: - type: wallet - id: '12345' - identities: - - type: individual - name: Satoshi Nakamoto - addresses: - - line1: 100 Money Street - line2: Suite 1 - city: Boston - district: MA - postalCode: '01234' - country: US - destination: - type: blockchain - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - chain: ETH - amount: - amount: '3000.00' + amountPaid: + amount: '0.00' currency: USD - transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' - status: pending - createDate: '2020-04-10T02:13:30.000Z' + settlementCurrency: USD + paymentMethods: + - type: blockchain + chain: ETH + paymentIds: [] + timeline: + - status: created + time: '2022-07-21T20:13:35.579331Z' + createDate: '2022-07-21T20:13:35.578678Z' + updateDate: '2022-07-21T20:19:24.859052Z' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/NotAuthorized' + '404': + $ref: '#/components/responses/NotFound' get: security: - bearerAuth: [] + summary: List all payment intents + operationId: getPaymentIntents + tags: + - Payment Intents parameters: - - name: walletId - description: Unique identifier for the source or destination wallet of transfers, - if any. May not be used in conjunction with destinationWalletId or sourceWalletId. - Useful for fetching all transfers related to a wallet. - in: query - required: false - schema: - type: string - example: '12345' - - name: sourceWalletId - description: Unique identifier for the source wallet of transfers, if any. + - name: status + description: Filters by the most recent `timeline.status` within the payment + intent. in: query required: false schema: type: string - example: '12345' - - name: destinationWalletId - description: Unique identifier for the destination wallet of transfers, if - any. + enum: + - created + - pending + - complete + - expired + - failed + - name: context + description: Filters by the most recent `timeline.context` within the payment + intent. in: query required: false schema: type: string - example: '12345' - - $ref: '#/components/parameters/ReturnIdentities' + enum: + - underpaid + - paid + - overpaid - $ref: '#/components/parameters/From' - $ref: '#/components/parameters/To' - $ref: '#/components/parameters/PageBefore' - $ref: '#/components/parameters/PageAfter' - $ref: '#/components/parameters/PageSize' - summary: List all transfers - description: 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. - operationId: searchTransfers - tags: - - On-chain payouts responses: '200': - description: Successfully retrieved a list of transfers. + description: Successfully retrieved a list of payment intents. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: SearchTransfersResponse + title: GetPaymentIntentsResponse properties: data: type: array items: - $ref: '#/components/schemas/Transfer' + $ref: '#/components/schemas/PaymentIntent' examples: response: value: data: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - source: - type: wallet - id: '12345' - destination: - type: blockchain - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: '123456789' - chain: ALGO + - idempotencyKey: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 + id: b8627ae8-732b-4d25-b947-1df8f4007a29 amount: amount: '3.14' currency: USD - transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' - status: pending - createDate: '2020-04-10T02:13:30.000Z' - travel rule: - value: - data: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - source: - type: wallet - id: '12345' - identities: - - type: individual - name: Satoshi Nakamoto - addresses: - - line1: 100 Money Street - line2: Suite 1 - city: Boston - district: MA - postalCode: '01234' - country: US - destination: - type: blockchain - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: '123456789' + amountPaid: + amount: '3.14' + currency: USD + settlementCurrency: USD + paymentMethods: + - type: blockchain chain: ALGO - amount: - amount: '3000.00' + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + fees: + - type: blockchainLeaseFee + amount: '3.14' currency: USD - transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' - status: pending + paymentIds: + - 69808f36-3e5e-4f37-bf82-ca79e4d70fc1 + timeline: + - status: created + context: underpaid + time: '2020-04-10T02:13:30.000Z' + expiresOn: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' createDate: '2020-04-10T02:13:30.000Z' '401': $ref: '#/components/responses/NotAuthorized' - /v1/transfers/{id}: + /v1/paymentIntents/{id}: get: - parameters: - - $ref: '#/components/parameters/IdPath' - - $ref: '#/components/parameters/ReturnIdentities' security: - bearerAuth: [] - summary: Get a transfer - operationId: getTransfer + summary: Get a payment intent + operationId: getPaymentIntent tags: - - On-chain payouts + - Payment Intents + parameters: + - $ref: '#/components/parameters/IdPath' responses: '200': + description: Successfully retrieved a payment intent. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' - description: Successfully retrieved a transfer. content: application/json: schema: - title: GetTransferResponse + title: GetPaymentIntentResponse properties: data: - $ref: '#/components/schemas/TransferDetailedTransfer' + $ref: '#/components/schemas/PaymentIntent' examples: response: value: data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - source: - type: wallet - id: '12345' - destination: - type: blockchain - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - chain: ETH + id: 8755d0ea-14f9-4259-b092-de23c14b6568 amount: amount: '3.14' currency: USD - transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' - status: pending - createDate: '2020-04-10T02:13:30.000Z' - travel rule: - value: - data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - source: - type: wallet - id: '12345' - identities: - - type: individual - name: Satoshi Nakamoto - addresses: - - line1: 100 Money Street - line2: Suite 1 - city: Boston - district: MA - postalCode: '01234' - country: US - destination: - type: blockchain - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - chain: ETH - amount: - amount: '3000.00' + amountPaid: + amount: '0.00' currency: USD - transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' - status: pending - createDate: '2020-04-10T02:13:30.000Z' - /v1/banks/wires: + settlementCurrency: USD + paymentMethods: + - type: blockchain + chain: ETH + paymentIds: [] + timeline: + - status: created + time: '2022-07-21T20:13:35.579331Z' + createDate: '2022-07-21T20:13:35.578678Z' + updateDate: '2022-07-21T20:19:24.859052Z' + '401': + $ref: '#/components/responses/NotAuthorized' + '404': + $ref: '#/components/responses/NotFound' + /v1/paymentIntents/{id}/expire: post: security: - bearerAuth: [] - summary: Create a Wire bank account - operationId: createWireBankAccount + summary: Expire a payment intent + operationId: expirePaymentIntent tags: - - Wires + - Payment Intents + parameters: + - $ref: '#/components/parameters/IdPath' requestBody: content: application/json: schema: - $ref: '#/components/schemas/WireCreationRequest' + type: object responses: '201': - description: Successfully created a bank account for wire transfers. + description: Successfully expired a payment intent. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: CreateWireBankAccountResponse + title: ExpirePaymentIntentResponse properties: data: - $ref: '#/components/schemas/Wire' + $ref: '#/components/schemas/PaymentIntent' examples: response: value: data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - status: pending - description: WELLS FARGO BANK, NA ****0010 - trackingRef: CIR13FB13A - fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 - billingDetails: - name: Satoshi Nakamoto - city: Boston - country: US - line1: 100 Money Street - line2: Suite 1 - district: MA - postalCode: '01234' - bankAddress: - bankName: SAN FRANCISCO - city: SAN FRANCISCO - country: US - line1: 100 Money Street - line2: Suite 1 - district: CA - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' + id: 8755d0ea-14f9-4259-b092-de23c14b6568 + amount: + amount: '3.14' + currency: USD + amountPaid: + amount: '3.14' + currency: USD + settlementCurrency: USD + paymentMethods: + - type: blockchain + chain: ETH + paymentIds: [] + timeline: + - status: expired + context: underpaid + reason: requested_by_merchant + time: '2022-07-21T21:45:54.569Z' + - status: created + time: '2022-07-21T20:13:35.579331Z' + createDate: '2022-07-21T20:13:35.578678Z' + updateDate: '2022-07-21T20:19:24.859052Z' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' - /v1/banks/wires/{id}: + '404': + $ref: '#/components/responses/NotFound' + /v1/payments: get: - parameters: - - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: Get a Wire bank account - operationId: getWireBankAccount + parameters: + - $ref: '#/components/parameters/Source' + - $ref: '#/components/parameters/SettlementId' + - $ref: '#/components/parameters/PaymentIntentId' + - $ref: '#/components/parameters/PaymentSourceType' + - $ref: '#/components/parameters/PaymentStatus' + - $ref: '#/components/parameters/From' + - $ref: '#/components/parameters/To' + - $ref: '#/components/parameters/PageBefore' + - $ref: '#/components/parameters/PageAfter' + - $ref: '#/components/parameters/PageSize' + summary: List all payments + operationId: getPayments tags: - - Wires + - Payments responses: '200': - description: Successfully retrieved a bank account for wire transfers. + description: Successfully retrieved a list of payments. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetWireBankAccountResponse + title: GetPaymentsResponse properties: data: - $ref: '#/components/schemas/Wire' + type: array + items: + oneOf: + - $ref: '#/components/schemas/FiatPayment' + - $ref: '#/components/schemas/CryptoPayment' + - $ref: '#/components/schemas/FiatCancel' + - $ref: '#/components/schemas/FiatRefund' + discriminator: + propertyName: type + mapping: + Fiat Payment: '#/components/schemas/FiatPayment' + Crypto Payment: '#/components/schemas/CryptoPayment' + Fiat Cancel: '#/components/schemas/FiatCancel' + Fiat Refund: '#/components/schemas/FiatRefund' examples: - response: + Fiat Payment: value: data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: payment + merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + merchantWalletId: '212000' + amount: + amount: '3.14' + currency: USD + source: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: card + description: Payment status: pending - description: WELLS FARGO BANK, NA ****0010 - trackingRef: CIR13FB13A - fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 - billingDetails: - name: Satoshi Nakamoto - city: Boston - country: US - line1: 100 Money Street - line2: Suite 1 - district: MA - postalCode: '01234' - bankAddress: - bankName: SAN FRANCISCO - city: SAN FRANCISCO - country: US - line1: 100 Money Street - line2: Suite 1 - district: CA - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - '401': + captured: false + captureAmount: + amount: '3.14' + currency: USD + captureDate: '2020-04-10T02:13:30.000Z' + requiredAction: + type: three_d_secure_required + redirectUrl: https://example.org + cancel: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: cancel + description: Payment + status: pending + createDate: '2020-04-10T02:13:30.000Z' + refunds: + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: payment + amount: + amount: '3.14' + currency: USD + description: Payment + status: pending + requiredAction: + type: three_d_secure_required + redirectUrl: https://example.org + fees: + amount: '3.14' + currency: USD + createDate: '2020-04-10T02:13:30.000Z' + fees: + amount: '3.14' + currency: USD + channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + Crypto Payment: + value: + data: + - id: 66c56b6a-fc79-338b-8b94-aacc4f0f18de + type: payment + status: paid + amount: + amount: '1.00' + currency: USD + fees: + amount: '0.01' + currency: USD + merchantId: f1397191-56e6-42fd-be86-0a7b9bd91522 + merchantWalletId: '1000999922' + paymentIntentId: 6e4d4047-db14-4c09-b238-1215aee50d03 + settlementAmount: + amount: '1.00' + currency: USD + depositAddress: + chain: ETH + address: '0x97de855690955e0da79ce5c1b6804847e7070c7f' + transactionHash: '0x7351585460bd657f320b9afa02a52c26d89272d0d10cc29913eb8b28e64fd906' + createDate: '2022-07-21T20:16:35.092852Z' + updateDate: '2022-07-21T20:19:24.719313Z' + Fiat Cancel: + value: + data: + - id: 2dc266f5-0658-48ec-a81f-9c768279564d + type: cancel + status: confirmed + description: Cancel Payment + amount: + amount: '10.00' + currency: USD + createDate: '2022-04-21T21:50:34.274Z' + updateDate: '2022-04-21T21:50:34.647839Z' + merchantId: b1e4e9fe-0bf1-43ad-86c7-3ab993b0051b + merchantWalletId: '1000174786' + source: + id: bc9157fe-5d73-48fe-9e77-9f6723bdcfeb + type: card + originalPayment: + id: 2812f549-062a-4bdd-8ee5-b521aa48a84d + type: payment + status: failed + createDate: '2022-04-21T21:47:41.501Z' + updateDate: '2022-04-21T21:50:34.669012Z' + reason: requested_by_customer + Fiat Refund: + value: + data: + - id: 03fbe7da-096a-4763-af77-e43006cd83be + type: refund + status: paid + description: Refund Payment + amount: + amount: '3.14' + currency: USD + fees: + amount: '0.00' + currency: USD + createDate: '2022-04-21T12:49:21.146Z' + updateDate: '2022-04-21T12:54:10.596976Z' + merchantId: b1e4e9fe-0bf1-43ad-86c7-3ab993b0051b + merchantWalletId: '1000174786' + source: + id: 45fa5524-41b9-48ca-94cd-f45cb36cce4d + type: card + originalPayment: + id: 895f8db5-1d8c-407d-9533-b5ca3fbcc74e + type: payment + status: paid + createDate: '2022-04-06T19:33:29.690Z' + updateDate: '2022-04-06T19:47:23.681180Z' + reason: requested_by_customer + '401': $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' - /v1/banks/ach: post: security: - bearerAuth: [] - summary: Create a ACH bank account - operationId: createACHBankAccount + summary: Create a payment + operationId: createPayment tags: - - ACH + - Payments requestBody: content: application/json: schema: - $ref: '#/components/schemas/ACHCreationRequest' + $ref: '#/components/schemas/PaymentCreationRequest' responses: '201': - description: Successfully created a bank account for ACH transfers. + description: Successfully created a payment. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: CreateACHBankAccountResponse + title: CreatePaymentResponse properties: data: - $ref: '#/components/schemas/ACH' + $ref: '#/components/schemas/DetailedPayment' examples: response: value: data: id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: payment + merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + merchantWalletId: '212000' + amount: + amount: '3.14' + currency: USD + source: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: card + description: Payment status: pending - accountNumber: '****6789' - routingNumber: '613334455' - billingDetails: - name: Satoshi Nakamoto - city: Boston - country: US - line1: 100 Money Street - line2: Suite 1 - district: MA - postalCode: '01234' - bankAccountType: retail - bankAddress: - bankName: SAN FRANCISCO - city: SAN FRANCISCO - country: US - line1: 100 Money Street - line2: Suite 1 - district: CA - fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 - errorCode: bank_account_authorization_expired + captured: false + captureAmount: + amount: '3.14' + currency: USD + captureDate: '2020-04-10T02:13:30.000Z' + requiredAction: + type: three_d_secure_required + redirectUrl: https://example.org + verification: + avs: D + cvv: not_requested + threeDSecure: pass + eci: '00' + cancel: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: cancel + merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + merchantWalletId: '212000' + amount: + amount: '3.14' + currency: USD + source: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: card + description: Payment + status: pending + originalPayment: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: payment + amount: + amount: '3.14' + currency: USD + description: Payment + status: pending + requiredAction: + type: three_d_secure_required + redirectUrl: https://example.org + fees: + amount: '3.14' + currency: USD + createDate: '2020-04-10T02:13:30.000Z' + fees: + amount: '3.14' + currency: USD + channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + refunds: + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: refund + merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + merchantWalletId: '212000' + amount: + amount: '3.14' + currency: USD + source: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: card + description: Payment + status: pending + originalPayment: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: payment + amount: + amount: '3.14' + currency: USD + description: Payment + status: pending + requiredAction: + type: three_d_secure_required + redirectUrl: https://example.org + fees: + amount: '3.14' + currency: USD + createDate: '2020-04-10T02:13:30.000Z' + cancel: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: cancel + description: Payment + status: pending + createDate: '2020-04-10T02:13:30.000Z' + fees: + amount: '3.14' + currency: USD + channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + fees: + amount: '3.14' + currency: USD + trackingRef: '24910599141085313498894' + errorCode: payment_failed + metadata: + email: satoshi@circle.com + phoneNumber: '+14155555555' riskEvaluation: decision: approved reason: '3000' + channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' - metadata: - email: satoshi@circle.com - phoneNumber: '+14155555555' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' - /v1/banks/ach/{id}: + '404': + $ref: '#/components/responses/NotFound' + /v1/payments/{id}: get: parameters: - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: Get a ACH bank account - operationId: getACHBankAccount + summary: Get a payment + operationId: getPayment tags: - - ACH + - Payments responses: '200': - description: Successfully retrieved a bank account for ACH transfers. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' + description: Successfully retrieved a payment. content: application/json: schema: - title: GetACHBankAccountResponse + title: GetPaymentResponse properties: data: - $ref: '#/components/schemas/ACH' + oneOf: + - $ref: '#/components/schemas/FiatPaymentPolymorphic' + - $ref: '#/components/schemas/CryptoPayment' + discriminator: + propertyName: type + mapping: + Fiat Payment: '#/components/schemas/FiatPayment' + Crypto Payment: '#/components/schemas/CryptoPayment' examples: - response: + Fiat Payment: value: data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - status: pending - accountNumber: '****6789' - routingNumber: '613334455' - billingDetails: - name: Satoshi Nakamoto - city: Boston - country: US - line1: 100 Money Street - line2: Suite 1 - district: MA - postalCode: '01234' - bankAccountType: retail - bankAddress: - bankName: SAN FRANCISCO - city: SAN FRANCISCO - country: US - line1: 100 Money Street - line2: Suite 1 - district: CA - fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 - errorCode: bank_account_authorization_expired - riskEvaluation: - decision: approved - reason: '3000' - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - metadata: - email: satoshi@circle.com - phoneNumber: '+14155555555' + data: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: payment + merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + merchantWalletId: '212000' + amount: + amount: '3.14' + currency: USD + source: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: card + description: Payment + status: pending + requiredAction: + type: three_d_secure_required + redirectUrl: https://example.org + verification: + avs: D + cvv: not_requested + threeDSecure: pass + eci: '00' + originalPayment: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: payment + merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + merchantWalletId: '212000' + amount: + amount: '3.14' + currency: USD + source: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: card + description: Payment + status: pending + captured: false + captureAmount: + amount: '3.14' + currency: USD + captureDate: '2020-04-10T02:13:30.000Z' + requiredAction: + type: three_d_secure_required + redirectUrl: https://example.org + cancel: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: cancel + description: Payment + status: pending + createDate: '2020-04-10T02:13:30.000Z' + refunds: + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: payment + amount: + amount: '3.14' + currency: USD + description: Payment + status: pending + requiredAction: + type: three_d_secure_required + redirectUrl: https://example.org + fees: + amount: '3.14' + currency: USD + createDate: '2020-04-10T02:13:30.000Z' + fees: + amount: '3.14' + currency: USD + channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + cancel: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: cancel + merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + merchantWalletId: '212000' + amount: + amount: '3.14' + currency: USD + source: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: card + description: Payment + status: pending + originalPayment: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: payment + amount: + amount: '3.14' + currency: USD + description: Payment + status: pending + requiredAction: + type: three_d_secure_required + redirectUrl: https://example.org + fees: + amount: '3.14' + currency: USD + createDate: '2020-04-10T02:13:30.000Z' + fees: + amount: '3.14' + currency: USD + channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + refunds: + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: refund + merchantId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + merchantWalletId: '212000' + amount: + amount: '3.14' + currency: USD + source: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: card + description: Payment + status: pending + originalPayment: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: payment + amount: + amount: '3.14' + currency: USD + description: Payment + status: pending + requiredAction: + type: three_d_secure_required + redirectUrl: https://example.org + fees: + amount: '3.14' + currency: USD + createDate: '2020-04-10T02:13:30.000Z' + cancel: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + type: cancel + description: Payment + status: pending + createDate: '2020-04-10T02:13:30.000Z' + fees: + amount: '3.14' + currency: USD + channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + fees: + amount: '3.14' + currency: USD + trackingRef: '24910599141085313498894' + externalRef: YYYYMMDDXXXXXXXX012345 + errorCode: payment_failed + metadata: + email: satoshi@circle.com + phoneNumber: '+14155555555' + channel: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 + riskEvaluation: + decision: approved + reason: '3000' + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + Crypto Payment: + value: + data: + id: 66c56b6a-fc79-338b-8b94-aacc4f0f18de + type: payment + status: paid + amount: + amount: '1.00' + currency: USD + fees: + amount: '0.01' + currency: USD + merchantId: f1397191-56e6-42fd-be86-0a7b9bd91522 + merchantWalletId: '1000999922' + paymentIntentId: 6e4d4047-db14-4c09-b238-1215aee50d03 + settlementAmount: + amount: '1.00' + currency: USD + depositAddress: + chain: ETH + address: '0x97de855690955e0da79ce5c1b6804847e7070c7f' + transactionHash: '0x7351585460bd657f320b9afa02a52c26d89272d0d10cc29913eb8b28e64fd906' + createDate: '2022-07-21T20:16:35.092852Z' + updateDate: '2022-07-21T20:19:24.719313Z' '401': $ref: '#/components/responses/NotAuthorized' '404': $ref: '#/components/responses/NotFound' - /v1/mocks/ach/accounts: + /v1/payments/{id}/capture: post: - security: - - bearerAuth: [] - summary: Create a mock ACH bank account - description: In the sandbox environment, create a mock ACH account and retrieve - a processor token that can be used to link an ACH account. - operationId: createAchAccount - tags: - - ACH - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MockAchAccountCreationRequest' - responses: - '201': - description: Successfully created a mock ach payment. - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' - content: - application/json: - schema: - title: CreateAchAccountResponse - properties: - data: - $ref: '#/components/schemas/MockAchAccountResponse' - examples: - response: - value: - data: - processorToken: processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621 - balance: - amount: '3.14' - currency: USD - account: - accountNumber: '123456789' - routingNumber: 011000028 - description: My ACH account - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/NotAuthorized' - /v1/banks/sepa: - post: - security: - - bearerAuth: [] - summary: Create a SEPA bank account (BETA) - operationId: createSEPABankAccount - tags: - - SEPA - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SEPACreationRequest' - responses: - '201': - description: Successfully created a bank account for SEPA transfers. - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' - content: - application/json: - schema: - title: CreateSEPABankAccountResponse - properties: - data: - $ref: '#/components/schemas/SEPA' - examples: - response: - value: - data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - status: pending - description: Bank of Ireland ****0010 - trackingRef: CIR13FB13A - fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 - riskEvaluation: - decision: approved - reason: '3000' - billingDetails: - name: Satoshi Nakamoto - city: Boston - country: US - line1: 100 Money Street - line2: Suite 1 - district: MA - postalCode: '01234' - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/NotAuthorized' - /v1/banks/sepa/{id}: - get: - parameters: - - $ref: '#/components/parameters/IdPath' - security: - - bearerAuth: [] - summary: Get a SEPA bank account (BETA) - operationId: getSEPABankAccount - tags: - - SEPA - responses: - '200': - description: Successfully retrieved a bank account for SEPA transfers. - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' - content: - application/json: - schema: - title: GetSEPABankAccountResponse - properties: - data: - $ref: '#/components/schemas/SEPA' - examples: - response: - value: - data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - status: pending - description: Bank of Ireland ****0010 - trackingRef: CIR13FB13A - fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 - riskEvaluation: - decision: approved - reason: '3000' - billingDetails: - name: Satoshi Nakamoto - city: Boston - country: US - line1: 100 Money Street - line2: Suite 1 - district: MA - postalCode: '01234' - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - '401': - $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' - /v1/returns: - get: - security: - - bearerAuth: [] - parameters: - - $ref: '#/components/parameters/From' - - $ref: '#/components/parameters/To' - - $ref: '#/components/parameters/PageBefore' - - $ref: '#/components/parameters/PageAfter' - - $ref: '#/components/parameters/PageSize' - summary: List all payout returns - description: 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. - operationId: getReturns - tags: - - Returns - responses: - '200': - description: Successfully retrieved a list of payout returns. - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' - content: - application/json: - schema: - title: GetReturnsResponse - properties: - data: - type: array - items: - $ref: '#/components/schemas/UnwithdrawalObject' - examples: - response: - value: - data: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - payoutId: abdb500d-4a59-457c-801f-2d418c8703ac - amount: - amount: '3.14' - currency: USD - fees: - amount: '3.14' - currency: USD - reason: payout_returned - status: pending - createDate: '2020-04-10T02:13:30.000Z' - updateDate: '2020-04-10T02:13:30.000Z' - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/NotAuthorized' - /v1/payments/{id}/capture: - post: - parameters: - - $ref: '#/components/parameters/IdPath' + parameters: + - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] requestBody: @@ -3200,522 +2861,549 @@ paths: $ref: '#/components/responses/NotAuthorized' '404': $ref: '#/components/responses/NotFound' - /v1/mocks/payments/wire: - post: + /v1/businessAccount/payouts: + get: security: - bearerAuth: [] - summary: Create a mock Wire payment - description: 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. - operationId: createWirePayment + parameters: + - $ref: '#/components/parameters/destination' + - name: type + description: Destination bank account type. Filters the results to fetch all + payouts made to a specified destination bank account type. This query parameter + can be passed multiple times to fetch results matching multiple destination + bank account types. + in: query + required: false + schema: + type: string + enum: + - wire + - name: status + description: Queries items with the specified status. Matches any status if + unspecified. + in: query + required: false + schema: + type: array + items: + $ref: '#/components/schemas/PayoutStatus' + - $ref: '#/components/parameters/From' + - $ref: '#/components/parameters/To' + - $ref: '#/components/parameters/PageBefore' + - $ref: '#/components/parameters/PageAfter' + - $ref: '#/components/parameters/PageSize' + summary: List all payouts + operationId: getBusinessAccountPayouts tags: - - Payments - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MockWirePaymentRequest' + - Payouts responses: - '201': - description: Successfully created a mock wire payment. + '200': + description: Successfully retrieved a list of payouts. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: CreateWirePaymentResponse + title: GetBusinessAccountPayoutsResponse properties: data: - $ref: '#/components/schemas/MockWirePaymentResponse' + type: array + items: + $ref: '#/components/schemas/PayoutBusinessAccount' examples: response: value: data: - trackingRef: CIR13FB13A + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + sourceWalletId: '53535335' + destination: + type: wire + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + name: COMMERZBANK AG ****3000 amount: amount: '3.14' currency: USD - beneficiaryBank: - accountNumber: '11111111' + fees: + amount: '3.14' + currency: USD status: pending - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/NotAuthorized' - /v1/mocks/payments/sepa: - post: - security: - - bearerAuth: [] - summary: Create a mock SEPA payment - description: 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. - operationId: createSepaPayment - tags: - - Payments - requestBody: + trackingRef: CIR-6ESOQANEP3NAO + errorCode: insufficient_funds + riskEvaluation: + decision: approved + reason: '3000' + adjustments: + fxCredit: + amount: '3.14' + currency: USD + fxDebit: + amount: '3.14' + currency: USD + return: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + payoutId: abdb500d-4a59-457c-801f-2d418c8703ac + amount: + amount: '3.14' + currency: USD + fees: + amount: '3.14' + currency: USD + reason: payout_returned + status: pending + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + '401': + $ref: '#/components/responses/NotAuthorized' + post: + security: + - bearerAuth: [] + summary: Create a payout + operationId: createBusinessAccountPayout + tags: + - Payouts + requestBody: content: application/json: schema: - $ref: '#/components/schemas/MockSepaPaymentRequest' - example: - trackingRef: CIR13FB13A - amount: - amount: 3.14 - currency: EUR + $ref: '#/components/schemas/BusinessAccountPayoutCreationRequest' responses: '201': - description: Successfully created a mock SEPA payment. + description: Successfully created a payout. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: CreateSepaPaymentResponse + title: CreateBusinessAccountPayoutResponse properties: data: - $ref: '#/components/schemas/MockSepaPaymentResponse' + $ref: '#/components/schemas/PayoutBusinessAccount' examples: response: value: data: - trackingRef: CIR13FB13A + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + sourceWalletId: '53535335' + destination: + type: wire + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + name: COMMERZBANK AG ****3000 amount: amount: '3.14' currency: USD + fees: + amount: '3.14' + currency: USD status: pending + trackingRef: CIR-6ESOQANEP3NAO + errorCode: insufficient_funds + riskEvaluation: + decision: approved + reason: '3000' + adjustments: + fxCredit: + amount: '3.14' + currency: USD + fxDebit: + amount: '3.14' + currency: USD + return: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + payoutId: abdb500d-4a59-457c-801f-2d418c8703ac + amount: + amount: '3.14' + currency: USD + fees: + amount: '3.14' + currency: USD + reason: payout_returned + status: pending + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' - /v1/wallets/{walletId}/addresses: - post: + /v1/businessAccount/payouts/{id}: + get: parameters: - - $ref: '#/components/parameters/WalletId' + - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: Create a blockchain address - description: '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. - - ' - operationId: generateAddress + summary: Get a payout + operationId: getBusinessAccountPayout tags: - - On-chain payments - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateAddressRequest' + - Payouts responses: - '201': - description: Successfully generated a new address. + '200': + description: Successfully retrieved a payout. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GenerateAddressResponse + title: GetBusinessAccountPayoutResponse properties: data: - $ref: '#/components/schemas/AddressObject' + $ref: '#/components/schemas/PayoutBusinessAccount' examples: response: value: data: - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: '123456789' - currency: USD - chain: ALGO - '400': - $ref: '#/components/responses/BadRequest' + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + sourceWalletId: '53535335' + destination: + type: wire + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + name: COMMERZBANK AG ****3000 + amount: + amount: '3.14' + currency: USD + fees: + amount: '3.14' + currency: USD + status: pending + trackingRef: CIR-6ESOQANEP3NAO + errorCode: insufficient_funds + riskEvaluation: + decision: approved + reason: '3000' + adjustments: + fxCredit: + amount: '3.14' + currency: USD + fxDebit: + amount: '3.14' + currency: USD + return: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + payoutId: abdb500d-4a59-457c-801f-2d418c8703ac + amount: + amount: '3.14' + currency: USD + fees: + amount: '3.14' + currency: USD + reason: payout_returned + status: pending + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' + '401': + $ref: '#/components/responses/NotAuthorized' '404': $ref: '#/components/responses/NotFound' - '409': - $ref: '#/components/responses/Conflict' + /v1/payouts: get: security: - bearerAuth: [] parameters: - - $ref: '#/components/parameters/WalletId' + - name: source + description: Universally unique identifier (UUID v4) for the source wallet. + Filters the results to fetch all payouts made from a source wallet. If not + provided, payouts from all wallets will be returned. + in: query + required: false + schema: + type: string + format: uuid + example: 54c1cbab-c419-450f-ad23-906fa03af7f0 + - name: type + description: Destination bank account type. Filters the results to fetch all + payouts made to a specified destination bank account type. This query parameter + can be passed multiple times to fetch results matching multiple destination + bank account types. + in: query + required: false + schema: + type: array + items: + $ref: '#/components/schemas/PayoutDestinationType' + - name: status + description: Queries items with the specified status. Matches any status if + unspecified. + in: query + required: false + schema: + type: array + items: + $ref: '#/components/schemas/PayoutStatus' + - $ref: '#/components/parameters/destination' - $ref: '#/components/parameters/From' - $ref: '#/components/parameters/To' - $ref: '#/components/parameters/PageBefore' - $ref: '#/components/parameters/PageAfter' - $ref: '#/components/parameters/PageSize' - summary: List all addresses - description: Retrieves a list of addresses associated with a wallet. - operationId: getAddresses + summary: List all payouts + operationId: getPayouts tags: - - On-chain payments + - Payouts responses: '200': - description: Successfully retrieved a list of addresses. + description: Successfully retrieved a list of payouts. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetAddressesResponse + title: GetPayoutsResponse properties: data: type: array items: - $ref: '#/components/schemas/AddressObject' - examples: - response: - value: - data: - - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: '123456789' - currency: USD - chain: ALGO - '400': - $ref: '#/components/responses/BadRequest' - '404': - $ref: '#/components/responses/NotFound' - /v1/cards: - post: - security: - - bearerAuth: [] - summary: Create a card - operationId: createCard - tags: - - Cards - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CardCreationRequest' - responses: - '201': - description: Successfully created a card. - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' - content: - application/json: - schema: - title: CreateCardResponse - properties: - data: - $ref: '#/components/schemas/Card' + $ref: '#/components/schemas/Payout' examples: response: value: data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - status: pending - billingDetails: - name: Satoshi Nakamoto - city: Boston - country: US - line1: 100 Money Street - line2: Suite 1 - district: MA - postalCode: '01234' - expMonth: 1 - expYear: 2020 - network: VISA - last4: '0123' - bin: '401230' - issuerCountry: US - fundingType: credit - fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 - errorCode: verification_failed - verification: - avs: D - cvv: not_requested + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + sourceWalletId: '53535335' + destination: + type: wire + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + name: COMMERZBANK AG ****3000 + amount: + amount: '3.14' + currency: USD + fees: + amount: '3.14' + currency: USD + status: pending + trackingRef: CIR-6ESOQANEP3NAO + errorCode: insufficient_funds riskEvaluation: decision: approved reason: '3000' - metadata: - email: satoshi@circle.com - phoneNumber: '+14155555555' + adjustments: + fxCredit: + amount: '3.14' + currency: USD + fxDebit: + amount: '3.14' + currency: USD + return: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + payoutId: abdb500d-4a59-457c-801f-2d418c8703ac + amount: + amount: '3.14' + currency: USD + fees: + amount: '3.14' + currency: USD + reason: payout_returned + status: pending + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' - '400': - $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' - get: + post: security: - bearerAuth: [] - summary: List all cards - operationId: getCards + summary: Create a payout + operationId: createPayout tags: - - Cards - parameters: - - $ref: '#/components/parameters/PageBefore' - - $ref: '#/components/parameters/PageAfter' - - $ref: '#/components/parameters/PageSize' + - Payouts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PayoutCreationRequest' responses: - '200': - description: Successfully retrieved a list of cards. + '201': + description: Successfully created a payout. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetCardsResponse + title: CreatePayoutResponse properties: data: - type: array - items: - $ref: '#/components/schemas/SimpleCard' + $ref: '#/components/schemas/Payout' examples: response: value: data: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + sourceWalletId: '53535335' + destination: + type: wire + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + name: COMMERZBANK AG ****3000 + amount: + amount: '3.14' + currency: USD + fees: + amount: '3.14' + currency: USD status: pending - billingDetails: - country: US - district: MA - expMonth: 1 - expYear: 2020 - network: VISA - bin: '401230' - issuerCountry: US - fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 - verification: - avs: D - cvv: not_requested + trackingRef: CIR-6ESOQANEP3NAO + errorCode: insufficient_funds riskEvaluation: decision: approved reason: '3000' + adjustments: + fxCredit: + amount: '3.14' + currency: USD + fxDebit: + amount: '3.14' + currency: USD + return: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + payoutId: abdb500d-4a59-457c-801f-2d418c8703ac + amount: + amount: '3.14' + currency: USD + fees: + amount: '3.14' + currency: USD + reason: payout_returned + status: pending + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' - /v1/cards/{id}: + /v1/payouts/{id}: get: parameters: - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: Get a card - operationId: getCard + summary: Get a payout + operationId: getPayout tags: - - Cards + - Payouts responses: '200': - description: Successfully retrieved a card. + description: Successfully retrieved a payout. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetCardResponse + title: GetPayoutResponse properties: data: - $ref: '#/components/schemas/Card' + $ref: '#/components/schemas/DetailedPayout' examples: response: value: data: id: b8627ae8-732b-4d25-b947-1df8f4007a29 + sourceWalletId: '53535335' + destination: + type: wire + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + name: COMMERZBANK AG ****3000 + amount: + amount: '3.14' + currency: USD + fees: + amount: '3.14' + currency: USD status: pending - billingDetails: - name: Satoshi Nakamoto - city: Boston - country: US - line1: 100 Money Street - line2: Suite 1 - district: MA - postalCode: '01234' - expMonth: 1 - expYear: 2020 - network: VISA - last4: '0123' - bin: '401230' - issuerCountry: US - fundingType: credit - fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 - errorCode: verification_failed - verification: - avs: D - cvv: not_requested + trackingRef: CIR-6ESOQANEP3NAO + externalRef: YYYYMMDDXXXXXXXX012345 + errorCode: insufficient_funds riskEvaluation: decision: approved reason: '3000' - metadata: - email: satoshi@circle.com - phoneNumber: '+14155555555' + adjustments: + fxCredit: + amount: '3.14' + currency: USD + fxDebit: + amount: '3.14' + currency: USD + return: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + payoutId: abdb500d-4a59-457c-801f-2d418c8703ac + amount: + amount: '3.14' + currency: USD + fees: + amount: '3.14' + currency: USD + reason: payout_returned + status: pending + createDate: '2020-04-10T02:13:30.000Z' + updateDate: '2020-04-10T02:13:30.000Z' createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' '401': $ref: '#/components/responses/NotAuthorized' '404': $ref: '#/components/responses/NotFound' - put: - parameters: - - $ref: '#/components/parameters/IdPath' + /v1/returns: + get: security: - bearerAuth: [] - summary: Update a card - operationId: UpdateCard + parameters: + - $ref: '#/components/parameters/From' + - $ref: '#/components/parameters/To' + - $ref: '#/components/parameters/PageBefore' + - $ref: '#/components/parameters/PageAfter' + - $ref: '#/components/parameters/PageSize' + summary: List all payout returns + description: 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. + operationId: getReturns tags: - - Cards - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CardUpdate' + - Returns responses: '200': - description: Succesfully modified a card. + description: Successfully retrieved a list of payout returns. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: UpdateCardResponse + title: GetReturnsResponse properties: data: - $ref: '#/components/schemas/Card' + type: array + items: + $ref: '#/components/schemas/UnwithdrawalObject' examples: response: value: data: - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + payoutId: abdb500d-4a59-457c-801f-2d418c8703ac + amount: + amount: '3.14' + currency: USD + fees: + amount: '3.14' + currency: USD + reason: payout_returned status: pending - billingDetails: - name: Satoshi Nakamoto - city: Boston - country: US - line1: 100 Money Street - line2: Suite 1 - district: MA - postalCode: '01234' - expMonth: 1 - expYear: 2020 - network: VISA - last4: '0123' - bin: '401230' - issuerCountry: US - fundingType: credit - fingerprint: eb170539-9e1c-4e92-bf4f-1d09534fdca2 - errorCode: verification_failed - verification: - avs: D - cvv: not_requested - riskEvaluation: - decision: approved - reason: '3000' - metadata: - email: satoshi@circle.com - phoneNumber: '+14155555555' createDate: '2020-04-10T02:13:30.000Z' updateDate: '2020-04-10T02:13:30.000Z' - /v1/banks/wires/{id}/instructions: - get: - parameters: - - $ref: '#/components/parameters/IdPath' - security: - - bearerAuth: [] - summary: Get Wire instructions - description: Get the wire transfer instructions into the Circle bank account - given your bank account id - operationId: getWireInstructionsBankAccount - tags: - - Wires - responses: - '200': - description: Successfully retrieved wire transfer instructions for the bank - account. - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' - content: - application/json: - schema: - title: GetWireInstructionsBankAccountResponse - properties: - data: - $ref: '#/components/schemas/WireInstruction' - examples: - response: - value: - data: - trackingRef: CIR13FB13A - beneficiary: - name: CIRCLE INTERNET FINANCIAL INC - address1: 99 HIGH STREET - address2: BOSTON MA 02110 - beneficiaryBank: - name: SILVERGATE BANK - swiftCode: SIVGUS66XXX - routingNumber: '322286803' - accountNumber: '****7427' - currency: USD - address: 4250 EXECUTIVE SQUARE SUITE 300 - city: LA JOLLA - postalCode: '02110' - country: US - '401': - $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' - /v1/banks/sepa/{id}/instructions: - get: - parameters: - - $ref: '#/components/parameters/IdPath' - security: - - bearerAuth: [] - summary: Get SEPA instructions (BETA) - description: Get the SEPA transfer instructions into the Circle bank account - given your bank account id (BETA). - operationId: getSEPAInstructionsBankAccount - tags: - - SEPA - responses: - '200': - description: Successfully retrieved SEPA transfer instructions for the bank - account. - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' - content: - application/json: - schema: - title: GetSEPAInstructionsBankAccountResponse - properties: - data: - $ref: '#/components/schemas/SEPAInstruction' - examples: - response: - value: - data: - trackingRef: CIR13FB13A - beneficiary: - name: CIRCLE INTERNET FINANCIAL INC - address1: 99 HIGH STREET - address2: BOSTON MA 02110 - beneficiaryBank: - name: LHV Bank - bic: LHVBEE22XXX - iban: '****6789' - address: Tartu mnt 2, 10145 Tallinn - city: Tallinn - postalCode: '10017' - country: EE + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' /v1/settlements: get: security: @@ -3923,49 +3611,6 @@ paths: $ref: '#/components/responses/NotAuthorized' '404': $ref: '#/components/responses/NotFound' - /v1/mocks/cards/chargebacks: - post: - security: - - bearerAuth: [] - summary: Create a mock chargeback - description: 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. - operationId: createMockChargeback - tags: - - Chargebacks - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MockChargebackCreationRequest' - responses: - '201': - description: Successfully created a mock chargeback. - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' - content: - application/json: - schema: - title: CreateMockChargebackResponse - properties: - data: - $ref: '#/components/schemas/MockChargeback' - examples: - response: - value: - data: {} - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' - '409': - $ref: '#/components/responses/Conflict' /v1/reversals: get: security: @@ -4020,1377 +3665,1076 @@ paths: $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/NotAuthorized' - /v1/balances: - get: + /v1/wallets: + post: security: - bearerAuth: [] - summary: List all balances - description: Retrieves the balance of merchant funds that have settled and also - of funds that have been sent for processing but have not yet settled. - operationId: getBalances + summary: Create a wallet + description: Creates an end user wallet. + operationId: createWallet tags: - - Balances + - Wallets + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WalletCreationRequest' responses: - '200': - description: Successfully retrieved balances. + '201': headers: X-Request-Id: $ref: '#/components/headers/XRequestId' + description: Successfully created a wallet. content: application/json: schema: - title: GetBalancesResponse + title: CreateWalletResponse properties: data: - $ref: '#/components/schemas/Balances' + $ref: '#/components/schemas/Wallet' examples: response: value: data: - available: - - amount: '3.14' - currency: USD - unsettled: + walletId: '434000' + entityId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + type: end_user_wallet + description: Treasury Wallet + balances: - amount: '3.14' currency: USD - '401': - $ref: '#/components/responses/NotAuthorized' - /ping: get: - summary: Ping - description: Checks that the service is running. - operationId: rootPing + security: + - bearerAuth: [] + parameters: + - $ref: '#/components/parameters/From' + - $ref: '#/components/parameters/To' + - $ref: '#/components/parameters/PageBefore' + - $ref: '#/components/parameters/PageAfter' + - $ref: '#/components/parameters/PageSize' + summary: List all wallets + description: Retrieves a list of a user's wallets. + operationId: getWallets tags: - - Health + - Wallets responses: '200': - description: Successful ping. + description: Successfully retrieved a list of wallets. + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' content: application/json: schema: - $ref: '#/components/schemas/Ping' + title: GetWalletsResponse + properties: + data: + type: array + items: + $ref: '#/components/schemas/Wallet' examples: response: value: - message: pong - /v1/configuration: + data: + - walletId: '434000' + entityId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + type: end_user_wallet + description: Treasury Wallet + balances: + - amount: '3.14' + currency: USD + '400': + $ref: '#/components/responses/BadRequest' + /v1/wallets/{walletId}: get: + parameters: + - $ref: '#/components/parameters/WalletId' security: - bearerAuth: [] - summary: Get configuration info - description: Retrieves general configuration information. - operationId: getConfig + summary: Get a wallet + operationId: getWallet tags: - - Management + - Wallets responses: '200': - description: Successfully retrieved configuration information. + description: Successfully retrieved a wallet. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetConfigResponse + title: GetWalletResponse properties: data: - $ref: '#/components/schemas/AccountConfiguration' + $ref: '#/components/schemas/Wallet' examples: response: value: data: - payments: - masterWalletId: '212000' - /v1/encryption/public: - get: - security: - - bearerAuth: [] - summary: Get public key - description: Retrieves an RSA public key to be used in encrypting data sent - to the API. Your public keys change infrequently, so we encourage you to cache - this response value locally for a duration of 24 hours or more. - operationId: getPublicKey + walletId: '434000' + entityId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + type: end_user_wallet + description: Treasury Wallet + balances: + - amount: '3.14' + currency: USD + '404': + $ref: '#/components/responses/NotFound' + /v1/wallets/{walletId}/addresses: + post: + parameters: + - $ref: '#/components/parameters/WalletId' + security: + - bearerAuth: [] + summary: Create a blockchain address + description: '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. + + ' + operationId: generateAddress tags: - - Encryption + - Wallets + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateAddressRequest' responses: - '200': - description: Successfully retrieved the RSA public key. + '201': + description: Successfully generated a new address. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetPublicKeyResponse + title: GenerateAddressResponse properties: data: - $ref: '#/components/schemas/PublicKey' + $ref: '#/components/schemas/AddressObject' examples: response: value: data: - keyId: key1 - publicKey: LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEJDUEcgdjEuNTQKCm1RRU5CRjAxdmk0QkNBQ3JzMDNLS1Y0Qk9SRkYyT0Z4bUdvb0UyaTZMbnNneE5UL1dsV2s1ZTl2RDd2NENkSm0KcGJJbENmZ0U4WFlnYmhKUTE4YStaTzlPM0RFYUp2dGhJSEtjL0l1UEIvZmdEYUJUT285NkJzL2pVRFp6ZGxaVApQazNFUjliNFZPeGVwMFNPSHFMcmxTVFY4ZXB3M1R3SEdaL3NpSWdBYXEwRGdJdlZxUTY4TGVaMnorUFJWZm04CmhhSnJpb05SRU5Ja2ZNTWY5aFdySlowSW1zUk1aVmpDMVVrd2FSSHdrTTMwQUlia1dYcFJ5R205SXhQaXdGa08Kb1RnWlpwUFpsdVczckdkWER0NHZqL24za09hczV1dFdoNFovMlhjWHBiSUUyU0FPK0hycUdIclRnK1ZmZ05JNwpZcVZqYW5MOEN1bm83UkxmcDhKZlZDNXBLUm5ySVNCTnphN1ZBQkVCQUFHMEJrTnBjbU5zWllrQkhBUVFBUWtBCkJnVUNYVFcrTGdBS0NSQ3EzaHNwWjBMeGEwdnpCLzQvQTJpdk1CWW1aZXV2bEJZMm5ZZnNXek9Sb28vU3BIYkQKY2Y0UmtxZzZ0RERJSkUzNHhDVit0MzJydmJkM0ZOdVZseWs1MDVZRkpESnI4cVc2S0tkQVRXdU16eW5mMVVoUAo1M25hTlc0cXdrdSt3b0RWWjJpci9lUVI1WUc4L0RGcnd3bXdaa0dRd0Ftc3h5ZHd5anBnLzBrQ3lpZHkxdVBkCmVVWGgwdWt4dS9Dais4UFl5cHcwdit5V2tzbjdSZ2dVbkJFMWhiQ2pEV3FweHZjMEpDNVAxdmx6L2xRcWQrR3oKRC9Td1FJTVdRVElnV3BHRVVvQTRDc3drbU5PdHhsRVF1U0tueXNtTG02S0ExUmRhTzd6V2IrdWNLN21FZ2VoSwpXU2hHZExqRVNNZlVRUTczemNqMXg2amxLUFNhRlJyLzhXcHhrVXYzVHYvQzZMb0JpejRLCj1WSWg3Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K - /v1/notifications/subscriptions: + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: '123456789' + currency: USD + chain: ALGO + '400': + $ref: '#/components/responses/BadRequest' + '404': + $ref: '#/components/responses/NotFound' + '409': + $ref: '#/components/responses/Conflict' get: security: - bearerAuth: [] - summary: List all notification subscriptions - description: Retrieve a list of existing notification subscriptions with details. - parameters: [] - operationId: listSubscriptions + parameters: + - $ref: '#/components/parameters/WalletId' + - $ref: '#/components/parameters/From' + - $ref: '#/components/parameters/To' + - $ref: '#/components/parameters/PageBefore' + - $ref: '#/components/parameters/PageAfter' + - $ref: '#/components/parameters/PageSize' + summary: List all addresses + description: Retrieves a list of addresses associated with a wallet. + operationId: getAddresses tags: - - Subscriptions + - Wallets responses: '200': - description: Successfully retrieved a list of notification subscriptions. + description: Successfully retrieved a list of addresses. + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetListSubscriptionsResponse + title: GetAddressesResponse properties: data: type: array items: - $ref: '#/components/schemas/SubscriptionResponse' + $ref: '#/components/schemas/AddressObject' examples: response: value: data: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - endpoint: https://example.org/handler/for/notifications - subscriptionDetails: - - url: arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17 - status: confirmed - '401': - $ref: '#/components/responses/NotAuthorized' + - address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: '123456789' + currency: USD + chain: ALGO + '400': + $ref: '#/components/responses/BadRequest' + '404': + $ref: '#/components/responses/NotFound' + /v1/businessAccount/transfers: post: security: - bearerAuth: [] - summary: Create a notification subscription - description: 'Subscribe to receiving notifications at a given endpoint. The - endpoint should be able to handle AWS SNS subscription requests. For more - details see https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/sns-send-http.html. - Note, the sandbox environment allows a maximum of 3 active subscriptions; - otherwise, this is limited to 1 active subscription and subsequent create - requests will be rejected with a Limit Exceeded error. - - ' - operationId: subscribe + summary: Create a transfer + description: A transfer can be made from an existing business account to a blockchain + location. + operationId: createBusinessAccountTransfer tags: - - Subscriptions + - Transfers requestBody: content: application/json: schema: - $ref: '#/components/schemas/SubscriptionRequest' + $ref: '#/components/schemas/BusinessAccountTransferCreationRequest' responses: - '200': - description: Successfully created a notification subscription. + '201': + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' + description: Successfully created a transfer. content: application/json: schema: - title: SubscribeResponse + title: CreateBusinessAccountTransferResponse properties: data: - $ref: '#/components/schemas/SubscriptionResponse' + $ref: '#/components/schemas/Transfer' examples: response: value: data: id: b8627ae8-732b-4d25-b947-1df8f4007a29 - endpoint: https://example.org/handler/for/notifications - subscriptionDetails: - - url: arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17 - status: confirmed - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/NotAuthorized' - '429': - $ref: '#/components/responses/LimitExceeded' - /v1/notifications/subscriptions/{id}: - delete: - parameters: - - $ref: '#/components/parameters/IdPath' + source: + type: wallet + id: '12345' + identities: + - type: individual + name: Satoshi Nakamoto + addresses: + - line1: 100 Money Street + line2: Suite 1 + city: Boston + district: MA + postalCode: '01234' + country: US + destination: + type: blockchain + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: '123456789' + chain: ALGO + amount: + amount: '3.14' + currency: USD + fees: + - amount: '10.00' + currency: USD + type: network + transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' + status: pending + errorCode: transfer_failed + createDate: '2020-04-10T02:13:30.000Z' + get: security: - bearerAuth: [] - summary: Remove a notification subscription - description: To remove a subscription, all its subscription requests' statuses - must be either 'confirmed', 'deleted' or a combination of those. A subscription - with at least one 'pending' subscription request cannot be removed. - operationId: unsubscribe + parameters: + - $ref: '#/components/parameters/From' + - $ref: '#/components/parameters/To' + - $ref: '#/components/parameters/PageBefore' + - $ref: '#/components/parameters/PageAfter' + - $ref: '#/components/parameters/PageSize' + summary: List all transfers + description: 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. + operationId: searchBusinessAccountTransfers tags: - - Subscriptions + - Transfers responses: '200': + description: Successfully retrieved a list of transfers. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' - description: Successfully removed a subscription. content: application/json: schema: - title: DeleteUnsubscribeResponse + title: SearchBusinessAccountTransfersResponse properties: data: - $ref: '#/components/schemas/UnsubscribeResponse' + type: array + items: + $ref: '#/components/schemas/Transfer' examples: response: value: - data: {} - '400': - $ref: '#/components/responses/BadRequest' + data: + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + source: + type: wallet + id: '12345' + identities: + - type: individual + name: Satoshi Nakamoto + addresses: + - line1: 100 Money Street + line2: Suite 1 + city: Boston + district: MA + postalCode: '01234' + country: US + destination: + type: blockchain + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: '123456789' + chain: ALGO + amount: + amount: '3.14' + currency: USD + fees: + - amount: '10.00' + currency: USD + type: network + transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' + status: pending + errorCode: transfer_failed + createDate: '2020-04-10T02:13:30.000Z' '401': $ref: '#/components/responses/NotAuthorized' - '404': - $ref: '#/components/responses/NotFound' - /v1/channels: + /v1/businessAccount/transfers/{id}: get: + parameters: + - $ref: '#/components/parameters/IdPath' security: - bearerAuth: [] - summary: List all channels - description: Retrieve a list of channels with details (e.g. `cardDescriptor`, - `achDescriptor`, etc.). - parameters: [] - operationId: listChannels + summary: Get a transfer + operationId: getBusinessAccountTransfer tags: - - Channels + - Transfers responses: '200': - description: Successfully retrieved a list of channels. + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' + description: Successfully retrieved a transfer. content: application/json: schema: - title: ListChannelsResponse + title: GetBusinessAccountTransferResponse properties: data: - type: array - items: - $ref: '#/components/schemas/ChannelResponse' - examples: - response: - value: - data: - - id: b8627ae8-732b-4d25-b947-1df8f4007a29 - default: true - cardDescriptor: CIRCLE LLC. - achDescriptor: CIRCLE LLC. - '401': - $ref: '#/components/responses/NotAuthorized' - /v1/stablecoins: - get: - summary: List all stablecoins - description: Retrieves total circulating supply for supported stablecoins across - all chains. This endpoint is rate limited to one call per minute (based on - IP). - operationId: getStablecoins - tags: - - Stablecoins - responses: - '200': - description: Successfully retrieved all stablecoin supplies across all chains. - content: - application/json: - schema: - title: GetStablecoinsResponse - properties: - data: - $ref: '#/components/schemas/Stablecoins' + $ref: '#/components/schemas/Transfer' examples: response: value: data: - - name: USD Coin - symbol: USDC - totalAmount: '132.584192' - chains: - - amount: '132.584192' + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + source: + type: wallet + id: '12345' + identities: + - type: individual + name: Satoshi Nakamoto + addresses: + - line1: 100 Money Street + line2: Suite 1 + city: Boston + district: MA + postalCode: '01234' + country: US + destination: + type: blockchain + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: '123456789' chain: ALGO - '429': - $ref: '#/components/responses/LimitExceeded' - /v1/wallets: + amount: + amount: '3.14' + currency: USD + fees: + - amount: '10.00' + currency: USD + type: network + transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' + status: pending + errorCode: transfer_failed + createDate: '2020-04-10T02:13:30.000Z' + /v1/transfers: post: security: - bearerAuth: [] - summary: Create a wallet - description: Creates an end user wallet. - operationId: createWallet + summary: Create a transfer + description: A transfer can be made from an existing funded wallet to a blockchain + address or another wallet. + operationId: createTransfer tags: - - Wallets + - Transfers requestBody: content: application/json: schema: - $ref: '#/components/schemas/WalletCreationRequest' + $ref: '#/components/schemas/TransferCreationRequest' + examples: + request: + value: + idempotencyKey: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 + source: + type: wallet + id: '12345' + destination: + type: blockchain + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + chain: ETH + amount: + amount: '3.14' + currency: USD + travel rule: + value: + idempotencyKey: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 + source: + type: wallet + id: '12345' + identities: + - type: individual + name: Satoshi Nakamoto + addresses: + - line1: 100 Money Street + line2: Suite 1 + city: Boston + district: MA + postalCode: '01234' + country: US + destination: + type: blockchain + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + chain: ETH + amount: + amount: '3000.00' + currency: USD responses: '201': headers: X-Request-Id: $ref: '#/components/headers/XRequestId' - description: Successfully created a wallet. + description: Successfully created a transfer. content: application/json: schema: - title: CreateWalletResponse + title: CreateTransferResponse properties: data: - $ref: '#/components/schemas/Wallet' + $ref: '#/components/schemas/Transfer' examples: response: value: data: - walletId: '434000' - entityId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - type: end_user_wallet - description: Treasury Wallet - balances: - - amount: '3.14' + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + source: + type: wallet + id: '12345' + destination: + type: blockchain + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + chain: ETH + amount: + amount: '3.14' + currency: USD + transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' + status: pending + createDate: '2020-04-10T02:13:30.000Z' + travel rule: + value: + data: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + source: + type: wallet + id: '12345' + identities: + - type: individual + name: Satoshi Nakamoto + addresses: + - line1: 100 Money Street + line2: Suite 1 + city: Boston + district: MA + postalCode: '01234' + country: US + destination: + type: blockchain + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + chain: ETH + amount: + amount: '3000.00' currency: USD + transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' + status: pending + createDate: '2020-04-10T02:13:30.000Z' get: security: - bearerAuth: [] parameters: + - name: walletId + description: Unique identifier for the source or destination wallet of transfers, + if any. May not be used in conjunction with destinationWalletId or sourceWalletId. + Useful for fetching all transfers related to a wallet. + in: query + required: false + schema: + type: string + example: '12345' + - name: sourceWalletId + description: Unique identifier for the source wallet of transfers, if any. + in: query + required: false + schema: + type: string + example: '12345' + - name: destinationWalletId + description: Unique identifier for the destination wallet of transfers, if + any. + in: query + required: false + schema: + type: string + example: '12345' + - $ref: '#/components/parameters/ReturnIdentities' - $ref: '#/components/parameters/From' - $ref: '#/components/parameters/To' - $ref: '#/components/parameters/PageBefore' - $ref: '#/components/parameters/PageAfter' - $ref: '#/components/parameters/PageSize' - summary: List all wallets - description: Retrieves a list of a user's wallets. - operationId: getWallets + summary: List all transfers + description: 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. + operationId: searchTransfers tags: - - Wallets + - Transfers responses: '200': - description: Successfully retrieved a list of wallets. + description: Successfully retrieved a list of transfers. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' content: application/json: schema: - title: GetWalletsResponse + title: SearchTransfersResponse properties: data: type: array items: - $ref: '#/components/schemas/Wallet' + $ref: '#/components/schemas/Transfer' examples: response: value: data: - - walletId: '434000' - entityId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - type: end_user_wallet - description: Treasury Wallet - balances: - - amount: '3.14' + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + source: + type: wallet + id: '12345' + destination: + type: blockchain + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: '123456789' + chain: ALGO + amount: + amount: '3.14' currency: USD - '400': - $ref: '#/components/responses/BadRequest' - /v1/wallets/{walletId}: - get: - parameters: - - $ref: '#/components/parameters/WalletId' - security: - - bearerAuth: [] - summary: Get a wallet - operationId: getWallet - tags: - - Wallets - responses: - '200': - description: Successfully retrieved a wallet. - headers: - X-Request-Id: - $ref: '#/components/headers/XRequestId' - content: - application/json: - schema: - title: GetWalletResponse - properties: - data: - $ref: '#/components/schemas/Wallet' - examples: - response: - value: + transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' + status: pending + createDate: '2020-04-10T02:13:30.000Z' + travel rule: + value: data: - walletId: '434000' - entityId: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - type: end_user_wallet - description: Treasury Wallet - balances: - - amount: '3.14' + - id: b8627ae8-732b-4d25-b947-1df8f4007a29 + source: + type: wallet + id: '12345' + identities: + - type: individual + name: Satoshi Nakamoto + addresses: + - line1: 100 Money Street + line2: Suite 1 + city: Boston + district: MA + postalCode: '01234' + country: US + destination: + type: blockchain + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: '123456789' + chain: ALGO + amount: + amount: '3000.00' + currency: USD + transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' + status: pending + createDate: '2020-04-10T02:13:30.000Z' + '401': + $ref: '#/components/responses/NotAuthorized' + /v1/transfers/{id}: + get: + parameters: + - $ref: '#/components/parameters/IdPath' + - $ref: '#/components/parameters/ReturnIdentities' + security: + - bearerAuth: [] + summary: Get a transfer + operationId: getTransfer + tags: + - Transfers + responses: + '200': + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' + description: Successfully retrieved a transfer. + content: + application/json: + schema: + title: GetTransferResponse + properties: + data: + $ref: '#/components/schemas/TransferDetailedTransfer' + examples: + response: + value: + data: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + source: + type: wallet + id: '12345' + destination: + type: blockchain + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + chain: ETH + amount: + amount: '3.14' + currency: USD + transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' + status: pending + createDate: '2020-04-10T02:13:30.000Z' + travel rule: + value: + data: + id: b8627ae8-732b-4d25-b947-1df8f4007a29 + source: + type: wallet + id: '12345' + identities: + - type: individual + name: Satoshi Nakamoto + addresses: + - line1: 100 Money Street + line2: Suite 1 + city: Boston + district: MA + postalCode: '01234' + country: US + destination: + type: blockchain + address: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + chain: ETH + amount: + amount: '3000.00' currency: USD + transactionHash: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' + status: pending + createDate: '2020-04-10T02:13:30.000Z' + /v1/mocks/cards/chargebacks: + post: + security: + - bearerAuth: [] + summary: Create a mock chargeback + description: 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. + operationId: createMockChargeback + tags: + - Chargebacks + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MockChargebackCreationRequest' + responses: + '201': + description: Successfully created a mock chargeback. + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' + content: + application/json: + schema: + title: CreateMockChargebackResponse + properties: + data: + $ref: '#/components/schemas/MockChargeback' + examples: + response: + value: + data: {} + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/NotAuthorized' '404': $ref: '#/components/responses/NotFound' -components: - securitySchemes: - bearerAuth: - type: http - scheme: bearer - parameters: - From: - name: from - description: Queries items created since the specified date-time (inclusive). - in: query - required: false - schema: - type: string - format: date-time - example: '2020-04-10T02:13:30.000Z' - To: - name: to - description: Queries items created before the specified date-time (inclusive). - in: query - required: false - schema: - type: string - format: date-time - example: '2020-04-10T02:13:30.000Z' - PageBefore: - name: pageBefore - description: 'A collection ID value used for pagination. - - - It marks the exclusive end of a page. When provided, the collection resource - will return the next `n` items before - - the id, with `n` being specified by `pageSize`. - - - The items will be returned in the natural order of the collection. - - - The resource will return the first page if neither `pageAfter` nor `pageBefore` - are specified. - - - SHOULD NOT be used in conjuction with pageAfter. - - ' - in: query - required: false - schema: - type: string - PageAfter: - name: pageAfter - description: 'A collection ID value used for pagination. - - - It marks the exclusive begin of a page. When provided, the collection resource - will return the next `n` items after - - the id, with `n` being specified by `pageSize`. - - - The items will be returned in the natural order of the collection. - - - The resource will return the first page if neither `pageAfter` nor `pageBefore` - are specified. - - - SHOULD NOT be used in conjuction with pageBefore. - - ' - in: query - required: false - schema: - type: string - PageSize: - name: pageSize - description: 'Limits the number of items to be returned. - - - Some collections have a strict upper bound that will disregard this value. - In case the specified value is higher - - than the allowed limit, the collection limit will be used. - - - If avoided, the collection will determine the page size itself. - - ' - in: query - required: false - schema: - type: integer - minimum: 1 - example: 5 - IdPath: - name: id - description: Universally unique identifier (UUID v4) of a resource. - in: path - required: true - schema: - type: string - format: uuid - example: b3d9d2d5-4c12-4946-a09d-953e82fae2b0 - Source: - name: source - description: Universally unique identifier (UUID v4) for the source. Filters - results to fetch only payments made from the provdided source. - in: query - required: false - schema: - type: string - format: uuid - example: b3d9d2d5-4c12-4946-a09d-953e82fae2b0 - SettlementId: - name: settlementId - description: Queries items with the specified settlement id. Matches any settlement - id if unspecified. - in: query - required: false - schema: - type: string - format: uuid - example: b48c8962-8e9f-40c3-9f1d-d9adde2ffe61 - PaymentIntentId: - name: paymentIntentId - description: Queries items with the specified payment intent id. - in: query - required: false - schema: - type: string - format: uuid - example: b48c8962-8e9f-40c3-9f1d-d9adde2ffe61 - PaymentSourceType: - name: type - description: Source account type. Filters the results to fetch all payments - made from a specified account type. Matches any source type if unspecified. - in: query - required: false - schema: - type: array - items: - type: string - enum: - - card - - wire - - ach - - sepa - PaymentStatus: - name: status - description: Queries items with the specified status. Matches any status if - unspecified. - in: query - required: false - schema: - type: string - enum: - - pending - - confirmed - - paid - - failed - - action_required - destination: - name: destination - description: Universally unique identifier (UUID v4) for the destination bank - account. Filters the results to fetch all payouts made to a destination bank - account. - in: query - required: false - schema: - type: string - format: uuid - example: e3d0a838-d732-49d0-bf44-73a668e38973 - Currency: - name: currency - description: Queries beneficiary bank account currency. Default is USD. - in: query - required: false - schema: - type: string - enum: - - USD - - EUR - ReturnIdentities: - name: returnIdentities - description: Specify if you would like to see identities in the response. Restricts - maximum returned items to 5. By default returnIdentities is false, resulting - in the response not returning `data.source.identities`. - in: query - required: false - schema: - type: boolean - example: 'true' - default: false - WalletId: - name: walletId - description: Identifier for the wallet. - in: path - required: true - schema: - type: string - example: 0123456789 - PaymentId: - name: paymentId - description: The payment ID associated with the chargeback. - in: query - required: false - schema: - type: string - format: uuid - example: 202ad9ce-974c-49ca-8d34-3afb7d7247ae - headers: - XRequestId: - description: Universally unique identifier (UUID v4) for the request. Helpful - for identifying a request when communicating with Circle support. - schema: - type: string - format: uuid - example: 2adba88e-9d63-44bc-b975-9b6ae3440dde - schemas: - IdempotencyKey: - type: string - description: Universally unique identifier (UUID v4) idempotency key. This key - is utilized to ensure exactly-once execution of mutating requests. - format: uuid - example: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 - CryptoPaymentsMoney: - type: object - required: - - amount - - currency - properties: - amount: - description: Magnitude of the amount, in units of the currency, with a `.`. - type: string - example: '3.14' - currency: - description: Currency code. - type: string - enum: - - USD - - ETH - - BTC - Chain: - type: string - description: A blockchain that a given currency is available on. - enum: - - ALGO - - AVAX - - BTC - - ETH - - FLOW - - HBAR - - MATIC - - SOL - - TRX - - XLM - PaymentMethodBlockchain: - type: object - required: - - type - - chain - properties: - type: - type: string - enum: - - blockchain - chain: - $ref: '#/components/schemas/Chain' - address: - type: string - readOnly: true - example: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - PaymentIntentFees: - type: object - readOnly: true - required: - - type - - amount - - currency - properties: - type: - type: string - enum: - - blockchainLeaseFee - - totalPaymentFees - amount: - description: Magnitude of the amount, in units of the currency, with a `.`. - type: string - example: '3.14' - currency: - description: Currency code. - type: string - enum: - - USD - Timeline: - type: object - readOnly: true - required: - - status - - time - properties: - status: - type: string - enum: - - created - - pending - - complete - - expired - - failed - context: - type: string - enum: - - underpaid - - paid - - overpaid - time: - description: ISO-8601 UTC date/time format. - type: string - format: date-time - UTCTimestampReadOnly: - type: string - readOnly: true - description: ISO-8601 UTC date/time format. - example: '2020-04-10T02:13:30.000Z' - PaymentIntent: - type: object - required: - - idempotencyKey - - amount - - settlementCurrency - - paymentMethods - properties: - idempotencyKey: - $ref: '#/components/schemas/IdempotencyKey' - id: - type: string - readOnly: true - description: Unique system generated identifier for the entity. - format: uuid - example: b8627ae8-732b-4d25-b947-1df8f4007a29 - amount: - $ref: '#/components/schemas/CryptoPaymentsMoney' - amountPaid: - description: Sum of the the amount paid. - type: object - readOnly: true - required: - - amount - - currency - properties: - amount: - description: Magnitude of the amount, in units of the currency, with - a `.`. - type: string - example: '3.14' - currency: - description: Currency code. - type: string - enum: - - USD - settlementCurrency: - description: Desired currency for the payments to settle in. - type: string - enum: - - USD - - BTC - - ETH - paymentMethods: - type: array - items: - $ref: '#/components/schemas/PaymentMethodBlockchain' - fees: - type: array - readOnly: true - items: - $ref: '#/components/schemas/PaymentIntentFees' - paymentIds: - description: List of associated payments. - type: array - readOnly: true - items: - type: string - format: uuid - example: 69808f36-3e5e-4f37-bf82-ca79e4d70fc1 - timeline: - description: State management timeline. - type: array - readOnly: true - items: - $ref: '#/components/schemas/Timeline' - expiresOn: - $ref: '#/components/schemas/UTCTimestampReadOnly' - updateDate: - $ref: '#/components/schemas/UTCTimestampReadOnly' - createDate: - $ref: '#/components/schemas/UTCTimestampReadOnly' - Id: - type: string - description: Unique system generated identifier for the entity. - format: uuid - example: b8627ae8-732b-4d25-b947-1df8f4007a29 - IdMerchant: - type: string - description: Unique system generated identifier for the merchant. - format: uuid - example: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - MerchantWalletId: - type: string - description: Unique system generated identifier for the wallet of the merchant. - maxLength: 36 - example: '212000' - FiatMoneyUsd: - type: object - required: - - amount - - currency - properties: - amount: - description: Magnitude of the amount, in units of the currency, with a `.`. - type: string - example: '3.14' - currency: - description: Currency code. - type: string - enum: - - USD - SourceResponse: - type: object - description: The payment source. - properties: - id: - $ref: '#/components/schemas/Id' - type: - type: string - description: Type of the source. - enum: - - card - - ach - - wire - - sepa - PaymentStatus: - type: string - description: Enumerated status of the payment. `pending` means the payment is - waiting to be processed. `confirmed` means the payment has been approved by - the bank and the merchant can treat it as successful, but settlement funds - are not yet available to the merchant. `paid` means settlement funds have - been received and are available to the merchant. `failed` means something - went wrong (most commonly that the payment was denied). `action_required` - means that additional steps are required to process this payment; refer to - `requiredAction` for more details. Terminal states are `paid` and `failed`. - enum: - - pending - - confirmed - - paid - - failed - - action_required - UTCTimestamp: - type: string - description: ISO-8601 UTC date/time format. - example: '2020-04-10T02:13:30.000Z' - RequiredAction: - type: object - description: When the payment status is `action_required`, this object summarizes - the required additional steps. - required: - - type - - redirectUrl - properties: - type: - type: string - description: The type of action that is required to proceed with the payment. - Currently only one type is supported. - enum: - - three_d_secure_required - redirectUrl: - type: string - description: The URL to bring the user to in order to complete the payment. - example: https://example.org - CancelRefundReversalStatus: - type: string - enum: - - pending - - confirmed - - paid - - failed - description: Enumerated status of the payment. `pending` means the payment is - waiting to be processed. `confirmed` means the payment has been approved by - the bank and the merchant can treat it as successful, but settlement funds - are not yet available to the merchant. `paid` means settlement funds have - been received and are available to the merchant. `failed` means something - went wrong (most commonly that the payment was denied). Terminal states are - `paid` and `failed`. - PaymentInfoCancel: - type: object - description: Status information of the related cancel. This property is only - present on canceled payment or refund items. - nullable: true - properties: - id: - $ref: '#/components/schemas/Id' - type: - type: string - description: Type of the payment object. - enum: - - cancel - description: - description: Enumerated description of the payment item. - type: string - nullable: true - enum: - - Payment - status: - $ref: '#/components/schemas/CancelRefundReversalStatus' - createDate: - $ref: '#/components/schemas/UTCTimestamp' - PaymentInfoPaymentAndRefund: - type: object - description: Status information of the related payment. This property is only - present on refund or cancel items. - properties: - id: - $ref: '#/components/schemas/Id' - type: - type: string - description: Type of the payment object. - enum: - - payment - - refund - amount: - $ref: '#/components/schemas/FiatMoneyUsd' - description: - type: string - description: Enumerated description of the payment item. - nullable: true - enum: - - Payment - status: - $ref: '#/components/schemas/PaymentStatus' - requiredAction: - $ref: '#/components/schemas/RequiredAction' - fees: - $ref: '#/components/schemas/FiatMoneyUsd' - createDate: - $ref: '#/components/schemas/UTCTimestamp' - Channel: - type: string - format: uuid - description: The channel identifier that can be set for the payment. When not - provided, the default channel is used. - example: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 - FiatPayment: - type: object - description: Status information of the related payment. This property is only - present on refund or cancel items. - required: - - id - - type - - merchantId - - amount - - source - - status - properties: - id: - $ref: '#/components/schemas/Id' - type: - description: Type of the payment object. - type: string - enum: - - payment - merchantId: - $ref: '#/components/schemas/IdMerchant' - merchantWalletId: - $ref: '#/components/schemas/MerchantWalletId' - amount: - $ref: '#/components/schemas/FiatMoneyUsd' - source: - $ref: '#/components/schemas/SourceResponse' - description: - description: Enumerated description of the payment. - type: string - enum: - - Payment - status: - $ref: '#/components/schemas/PaymentStatus' - captured: - description: Determines if a payment has successfully been captured. This - property is only present for payments that did not use auto capture. - type: boolean - captureAmount: - $ref: '#/components/schemas/FiatMoneyUsd' - captureDate: - $ref: '#/components/schemas/UTCTimestamp' - requiredAction: - $ref: '#/components/schemas/RequiredAction' - cancel: - $ref: '#/components/schemas/PaymentInfoCancel' - refunds: - type: array - items: - $ref: '#/components/schemas/PaymentInfoPaymentAndRefund' - fees: - $ref: '#/components/schemas/FiatMoneyUsd' - channel: - $ref: '#/components/schemas/Channel' - createDate: - $ref: '#/components/schemas/UTCTimestamp' - updateDate: - $ref: '#/components/schemas/UTCTimestamp' - CryptoPayment: - type: object - description: Status information of the related payment. This property is only - present on refund or cancel items. - required: - - id - - type - - merchantId - - amount - - source - - status - properties: - id: - $ref: '#/components/schemas/Id' - type: - description: Type of the payment object. - type: string - enum: - - payment - merchantId: - $ref: '#/components/schemas/IdMerchant' - merchantWalletId: - $ref: '#/components/schemas/MerchantWalletId' - amount: - $ref: '#/components/schemas/FiatMoneyUsd' - status: - $ref: '#/components/schemas/PaymentStatus' - fees: - $ref: '#/components/schemas/FiatMoneyUsd' - paymentIntentId: - type: string - format: uuid - example: 6e4d4047-db14-4c09-b238-1215aee50d03 - settlementAmount: - $ref: '#/components/schemas/FiatMoneyUsd' - depositAddress: - type: object - properties: - chain: - $ref: '#/components/schemas/Chain' - address: - type: string - example: '0x97de855690955e0da79ce5c1b6804847e7070c7f' - transactionHash: - type: string - example: '0x7351585460bd657f320b9afa02a52c26d89272d0d10cc29913eb8b28e64fd906' - createDate: - $ref: '#/components/schemas/UTCTimestamp' - updateDate: - $ref: '#/components/schemas/UTCTimestamp' - FiatCancel: - type: object - description: Status information of the related cancel. This property is only - present on canceled payment or refund items. - nullable: true - required: - - id - - type - - merchantId - - amount - - source - - status - properties: - id: - $ref: '#/components/schemas/Id' - type: - type: string - description: Type of the payment object. - enum: - - cancel - merchantId: - $ref: '#/components/schemas/IdMerchant' - merchantWalletId: - $ref: '#/components/schemas/MerchantWalletId' - amount: - $ref: '#/components/schemas/FiatMoneyUsd' - source: - $ref: '#/components/schemas/SourceResponse' - description: - description: Enumerated description of the payment. - type: string - enum: - - Payment - status: - $ref: '#/components/schemas/CancelRefundReversalStatus' - originalPayment: - $ref: '#/components/schemas/PaymentInfoPaymentAndRefund' - fees: - $ref: '#/components/schemas/FiatMoneyUsd' - channel: - $ref: '#/components/schemas/Channel' - createDate: - $ref: '#/components/schemas/UTCTimestamp' - updateDate: - $ref: '#/components/schemas/UTCTimestamp' - FiatRefund: - type: object - required: - - id - - type - - merchantId - - amount - - source - - status - properties: - id: - $ref: '#/components/schemas/Id' - type: - description: Type of the payment object. - type: string - enum: - - refund - merchantId: - $ref: '#/components/schemas/IdMerchant' - merchantWalletId: - $ref: '#/components/schemas/MerchantWalletId' - amount: - $ref: '#/components/schemas/FiatMoneyUsd' - source: - $ref: '#/components/schemas/SourceResponse' - description: - description: Enumerated description of the payment. - type: string - enum: - - Payment - status: - $ref: '#/components/schemas/CancelRefundReversalStatus' - originalPayment: - $ref: '#/components/schemas/PaymentInfoPaymentAndRefund' - cancel: - $ref: '#/components/schemas/PaymentInfoCancel' - fees: - $ref: '#/components/schemas/FiatMoneyUsd' - channel: - $ref: '#/components/schemas/Channel' - createDate: - $ref: '#/components/schemas/UTCTimestamp' - updateDate: - $ref: '#/components/schemas/UTCTimestamp' - AvsResults: - type: string - description: Status of the AVS check. Raw AVS response, expressed as an upper-case - letter. `not_requested` indicates check was not made. `pending` is pending/processing. - example: D - CvvResults: - description: Enumerated status of the check. `not_requested` indicates check - was not made. `pass` indicates value is correct. `fail` indicates value is - incorrect. `unavailable` indicates card issuer did not do the provided check. - `pending` indicates check is pending/processing. - type: string - enum: - - not_requested - - pass - - fail - - unavailable - - pending - ThreeDSResult: - type: string - description: Enumerated status of the check. `pass` indicates successful 3DS - authentication. `fail` indicates failed 3DS authentication. - enum: - - pass - - fail - Eci: - type: string - description: ECI (electronic commerce indicator) value returned by Directory - Servers (namely Visa, MasterCard, JCB, and American Express) indicating the - outcome of authentication attempted on transactions enforced by 3DS. - enum: - - '00' - - '01' - - '02' - - '05' - - '06' - - '07' - PaymentVerificationResponse: - type: object - description: Indicates the status of the payment verification. This property - will be present once the payment is confirmed. - required: - - avs - - cvv - properties: - avs: - $ref: '#/components/schemas/AvsResults' - cvv: - $ref: '#/components/schemas/CvvResults' - threeDSecure: - $ref: '#/components/schemas/ThreeDSResult' - eci: - $ref: '#/components/schemas/Eci' - ExternalRef: - type: string - description: "External network identifier which will be present once provided\ - \ from the applicable network. \n\nExamples:\n* **Input/Output Message Accountability\ - \ Data (IMAD/OMAD)**: unique number given to each FedWire payment when using\ - \ the Federal Reserve Bank Service which can be used to investigate and track\ - \ wire transfers.\n" - example: YYYYMMDDXXXXXXXX012345 - PaymentErrorCode: - type: string - description: Indicates the failure reason of a payment. Only present for payments - in failed state. Possible values are [`payment_failed`, `payment_fraud_detected`, - `payment_denied`, `payment_not_supported_by_issuer`, `payment_not_funded`, - `payment_unprocessable`, `payment_stopped_by_issuer`, `payment_canceled`, - `payment_returned`, `payment_failed_balance_check`, `card_failed`, `card_invalid`, - `card_address_mismatch`, `card_zip_mismatch`, `card_cvv_invalid`, `card_expired`, - `card_limit_violated`, `card_not_honored`, `card_cvv_required`, `credit_card_not_allowed`, - `card_account_ineligible`, `card_network_unsupported`, `channel_invalid`, - `unauthorized_transaction`, `bank_account_ineligible`, `bank_transaction_error`, - `invalid_account_number`, `invalid_wire_rtn`, `invalid_ach_rtn`, `vendor_inactive`]' - nullable: true - enum: - - payment_failed - - payment_fraud_detected - - payment_denied - - payment_not_supported_by_issuer - - payment_not_funded - - payment_unprocessable - - payment_stopped_by_issuer - - payment_canceled - - payment_returned - - payment_failed_balance_check - - card_failed - - card_invalid - - card_address_mismatch - - card_zip_mismatch - - card_cvv_invalid - - card_expired - - card_limit_violated - - card_not_honored - - card_cvv_required - - card_restricted, - - card_account_ineligible - - card_network_unsupported - - channel_invalid - - unauthorized_transaction - - bank_account_ineligible - - bank_transaction_error - - invalid_account_number - - invalid_wire_rtn - - invalid_ach_rtn - - ref_id_invalid - - account_name_mismatch - - account_number_mismatch - - account_ineligible - - wallet_address_mismatch - - customer_name_mismatch - - institution_name_mismatch - - vendor_inactive - Email: + '409': + $ref: '#/components/responses/Conflict' + /v1/mocks/payments/sen: + post: + security: + - bearerAuth: [] + summary: Create a mock Silvergate SEN payment + description: 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. + operationId: createMockSenPayment + tags: + - Deposits + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MockSenPaymentRequest' + responses: + '201': + description: Successfully created a mock SEN transfer. + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' + content: + application/json: + schema: + title: CreateSenPaymentResponse + properties: + data: + $ref: '#/components/schemas/MockSenPaymentResponse' + examples: + response: + value: + data: + trackingRef: CIR13FB13A + amount: + amount: '3.14' + currency: USD + beneficiaryBank: + accountNumber: '11111111' + status: pending + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/NotAuthorized' + /v1/mocks/ach/accounts: + post: + security: + - bearerAuth: [] + summary: Create a mock ACH bank account + description: In the sandbox environment, create a mock ACH account and retrieve + a processor token that can be used to link an ACH account. + operationId: createMockACHBankAccount + tags: + - ACH + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MockAchAccountCreationRequest' + responses: + '201': + description: Successfully created a mock ach payment. + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' + content: + application/json: + schema: + title: CreateAchAccountResponse + properties: + data: + $ref: '#/components/schemas/MockAchAccountResponse' + examples: + response: + value: + data: + processorToken: processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621 + balance: + amount: '3.14' + currency: USD + account: + accountNumber: '123456789' + routingNumber: 011000028 + description: My ACH account + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/NotAuthorized' + /v1/mocks/payments/wire: + post: + security: + - bearerAuth: [] + summary: Create a mock Wire payment + description: 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. + operationId: createMockWirePayment + tags: + - Payments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MockWirePaymentRequest' + responses: + '201': + description: Successfully created a mock wire payment. + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' + content: + application/json: + schema: + title: CreateWirePaymentResponse + properties: + data: + $ref: '#/components/schemas/MockWirePaymentResponse' + examples: + response: + value: + data: + trackingRef: CIR13FB13A + amount: + amount: '3.14' + currency: USD + beneficiaryBank: + accountNumber: '11111111' + status: pending + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/NotAuthorized' + /v1/mocks/payments/sepa: + post: + security: + - bearerAuth: [] + summary: Create a mock SEPA payment + description: 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. + operationId: createMockSepaPayment + tags: + - Payments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MockSepaPaymentRequest' + example: + trackingRef: CIR13FB13A + amount: + amount: 3.14 + currency: EUR + responses: + '201': + description: Successfully created a mock SEPA payment. + headers: + X-Request-Id: + $ref: '#/components/headers/XRequestId' + content: + application/json: + schema: + title: CreateSepaPaymentResponse + properties: + data: + $ref: '#/components/schemas/MockSepaPaymentResponse' + examples: + response: + value: + data: + trackingRef: CIR13FB13A + amount: + amount: '3.14' + currency: USD + status: pending + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/NotAuthorized' +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + schemas: + Ping: + type: object + required: + - message + properties: + message: + type: string + example: pong + MerchantWalletId: type: string - description: Email of the user. - maxLength: 1024 - example: satoshi@circle.com - PhoneNumber: + description: Unique system generated identifier for the wallet of the merchant. + maxLength: 36 + example: '212000' + AccountConfiguration: + type: object + properties: + payments: + title: WalletConfig + type: object + properties: + masterWalletId: + $ref: '#/components/schemas/MerchantWalletId' + IdKey: type: string - description: Phone number of the user in E.164 format. We recommend using a - library such as [libphonenumber](https://github.com/google/libphonenumber) - to parse and validate phone numbers. - maxLength: 16 - pattern: /\+?[1-9]\d{1,14}/ - example: '+14155555555' - MetadataPhoneEmail: + description: Universally unique identifier (UUID v4) of the public key used + in encryption. NOTE the sandbox environment uses the default value of `key1`. + For this reason the example supplied is `key1` rather than a UUID. + format: uuid + example: key1 + PublicKey: type: object required: - - email + - keyId + - publicKey properties: - email: - $ref: '#/components/schemas/Email' - phoneNumber: - $ref: '#/components/schemas/PhoneNumber' - RiskEvaluation: + keyId: + $ref: '#/components/schemas/IdKey' + publicKey: + type: string + description: A PGP ascii-armor encoded public key. + example: LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEJDUEcgdjEuNTQKCm1RRU5CRjAxdmk0QkNBQ3JzMDNLS1Y0Qk9SRkYyT0Z4bUdvb0UyaTZMbnNneE5UL1dsV2s1ZTl2RDd2NENkSm0KcGJJbENmZ0U4WFlnYmhKUTE4YStaTzlPM0RFYUp2dGhJSEtjL0l1UEIvZmdEYUJUT285NkJzL2pVRFp6ZGxaVApQazNFUjliNFZPeGVwMFNPSHFMcmxTVFY4ZXB3M1R3SEdaL3NpSWdBYXEwRGdJdlZxUTY4TGVaMnorUFJWZm04CmhhSnJpb05SRU5Ja2ZNTWY5aFdySlowSW1zUk1aVmpDMVVrd2FSSHdrTTMwQUlia1dYcFJ5R205SXhQaXdGa08Kb1RnWlpwUFpsdVczckdkWER0NHZqL24za09hczV1dFdoNFovMlhjWHBiSUUyU0FPK0hycUdIclRnK1ZmZ05JNwpZcVZqYW5MOEN1bm83UkxmcDhKZlZDNXBLUm5ySVNCTnphN1ZBQkVCQUFHMEJrTnBjbU5zWllrQkhBUVFBUWtBCkJnVUNYVFcrTGdBS0NSQ3EzaHNwWjBMeGEwdnpCLzQvQTJpdk1CWW1aZXV2bEJZMm5ZZnNXek9Sb28vU3BIYkQKY2Y0UmtxZzZ0RERJSkUzNHhDVit0MzJydmJkM0ZOdVZseWs1MDVZRkpESnI4cVc2S0tkQVRXdU16eW5mMVVoUAo1M25hTlc0cXdrdSt3b0RWWjJpci9lUVI1WUc4L0RGcnd3bXdaa0dRd0Ftc3h5ZHd5anBnLzBrQ3lpZHkxdVBkCmVVWGgwdWt4dS9Dais4UFl5cHcwdit5V2tzbjdSZ2dVbkJFMWhiQ2pEV3FweHZjMEpDNVAxdmx6L2xRcWQrR3oKRC9Td1FJTVdRVElnV3BHRVVvQTRDc3drbU5PdHhsRVF1U0tueXNtTG02S0ExUmRhTzd6V2IrdWNLN21FZ2VoSwpXU2hHZExqRVNNZlVRUTczemNqMXg2amxLUFNhRlJyLzhXcHhrVXYzVHYvQzZMb0JpejRLCj1WSWg3Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K + Id: + type: string + description: Unique system generated identifier for the entity. + format: uuid + example: b8627ae8-732b-4d25-b947-1df8f4007a29 + SubscriptionDetail: type: object - description: Results of risk evaluation. Only present if the payment is denied - by Circle's risk service. - nullable: true properties: - decision: - description: Enumerated decision of the account. + url: + type: string + description: Identifier for created subscription. + example: arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17 + status: type: string + description: Status of the subscription request. enum: - - approved - - denied - - review - reason: - description: Risk reason for the definitive decision outcome. + - confirmed + - pending + - deleted + SubscriptionResponse: + type: object + properties: + id: + $ref: '#/components/schemas/Id' + endpoint: type: string - nullable: true - example: '3000' - FiatPaymentPolymorphic: + description: URL of the endpoint. + example: https://example.org/handler/for/notifications + subscriptionDetails: + type: array + description: List of subscriptions details for created subscriptions. + items: + $ref: '#/components/schemas/SubscriptionDetail' + SubscriptionRequest: type: object required: - - id - - type - - merchantId - - amount - - source - - status + - endpoint + properties: + endpoint: + type: string + description: URL of the subscriber endpoint. Must be publicly accessible + and utilize HTTPS. + example: https://example.org/handler/for/notifications + UnsubscribeResponse: + type: object + description: Unsubscribe response object. No fields as of now. + example: {} + ChannelResponse: + type: object properties: id: $ref: '#/components/schemas/Id' - type: - description: Type of the payment object. + default: + type: boolean + description: Flag to indicate whether the channel is configured as default. + At most one of the channels will have this flag set to true and the default + channel is used when a payment request does not have the `channel` property + set. + example: true + cardDescriptor: type: string - enum: - - payment - - refund - - cancel - merchantId: - $ref: '#/components/schemas/IdMerchant' - merchantWalletId: - $ref: '#/components/schemas/MerchantWalletId' - amount: - $ref: '#/components/schemas/FiatMoneyUsd' - source: - $ref: '#/components/schemas/SourceResponse' - description: - description: Enumerated description of the payment. + description: Descriptor that appears on cardholders' bank statements for + card payments submitted through this channel. + example: CIRCLE LLC. + achDescriptor: type: string - enum: - - Payment - status: - $ref: '#/components/schemas/PaymentStatus' - requiredAction: - $ref: '#/components/schemas/RequiredAction' - verification: - $ref: '#/components/schemas/PaymentVerificationResponse' - originalPayment: - $ref: '#/components/schemas/FiatPayment' - cancel: - $ref: '#/components/schemas/FiatCancel' - refunds: - type: array - nullable: true - items: - $ref: '#/components/schemas/FiatRefund' - fees: - $ref: '#/components/schemas/FiatMoneyUsd' - trackingRef: - description: Payment tracking reference. Will be present once known. + description: Descriptor that appears on end-users' bank statements for ACH + payments submitted through this channel. + example: CIRCLE LLC. + Chain: + type: string + description: A blockchain that a given currency is available on. + enum: + - ALGO + - AVAX + - BTC + - ETH + - FLOW + - HBAR + - MATIC + - SOL + - TRX + - XLM + TokenAmount: + type: object + required: + - amount + - chain + properties: + amount: type: string - nullable: true - example: '24910599141085313498894' - externalRef: - $ref: '#/components/schemas/ExternalRef' - errorCode: - $ref: '#/components/schemas/PaymentErrorCode' - metadata: - $ref: '#/components/schemas/MetadataPhoneEmail' - channel: - $ref: '#/components/schemas/Channel' - riskEvaluation: - $ref: '#/components/schemas/RiskEvaluation' - createDate: - $ref: '#/components/schemas/UTCTimestamp' - updateDate: - $ref: '#/components/schemas/UTCTimestamp' + description: Magnitude of the amount, in units of the currency, with a `.`. + example: '132.584192' + chain: + $ref: '#/components/schemas/Chain' + Stablecoin: + type: object + properties: + name: + type: string + description: Name of the stablecoin. + example: USD Coin + symbol: + type: string + description: Symbol of the stablecoin. + example: USDC + totalAmount: + type: string + description: Total circulating amount of the stablecoin. + example: '132.584192' + chains: + type: array + description: A list of the broken down totalAmount by chain of the stablecoin. + items: + $ref: '#/components/schemas/TokenAmount' + Stablecoins: + type: array + description: A list of stablecoin objects containing its name, symbol, total + amount, and per-chain amount. + items: + $ref: '#/components/schemas/Stablecoin' Money: type: object required: @@ -5429,195 +4773,152 @@ components: available to spend at some point in the future. items: $ref: '#/components/schemas/Money' - PayoutStatus: + ExternalFiatAccountStatus: + description: Status of the account. A `pending` status indicates that the linking + is in-progress; `complete` indicates the account was linked successfully; + `failed` indicates it failed. type: string - description: Status of the payout. Status `pending` indicates that the payout - is in process; `complete` indicates it finished successfully; `failed` indicates - it failed. enum: - pending - complete - failed - PayoutDestinationType: - type: string - description: The destination bank account type. - enum: - - wire - - ach - - sepa - BankDestination: - type: object - description: The destination bank account. - required: - - type - - id - properties: - type: - $ref: '#/components/schemas/PayoutDestinationType' - id: - $ref: '#/components/schemas/Id' - name: - type: string - description: Bank name plus last four digits of the bank account number - or IBAN. - readOnly: true - example: COMMERZBANK AG ****3000 - FiatMoney: + SimpleBillingDetails: type: object + description: Billing details of the card holder. required: - - amount - - currency + - country + - district properties: - amount: - description: Magnitude of the amount, in units of the currency, with a `.`. + country: type: string - example: '3.14' - currency: - description: Currency code. + description: Country portion of the address. Formatted as a two-letter country + code specified in ISO 3166-1 alpha-2. + maxLength: 2 + example: US + district: type: string - enum: - - USD - - EUR - PayoutErrorCode: + description: State / County / Province / Region portion of the address. + US and Canada use the two-letter code for the subdivision. + maxLength: 16 + example: MA + Fingerprint: + type: string + description: A UUID that uniquely identifies the account number. If the same + account is used more than once, each card object will have a different id, + but the fingerprint will stay the same. + example: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + AvsResults: + type: string + description: Status of the AVS check. Raw AVS response, expressed as an upper-case + letter. `not_requested` indicates check was not made. `pending` is pending/processing. + example: D + CvvResults: + description: Enumerated status of the check. `not_requested` indicates check + was not made. `pass` indicates value is correct. `fail` indicates value is + incorrect. `unavailable` indicates card issuer did not do the provided check. + `pending` indicates check is pending/processing. type: string - nullable: true - description: Indicates the failure reason of a payout. Only present for payouts - in failed state. Possible values are [`insufficient_funds`, `transaction_denied`, - `transaction_failed`, `transaction_returned`, `bank_transaction_error`, `fiat_account_limit_exceeded`, - `invalid_bank_account_number`, `invalid_ach_rtn`, `invalid_wire_rtn`, `vendor_inactive`]' enum: - - insufficient_funds - - transaction_denied - - transaction_failed - - transaction_returned - - bank_transaction_error - - fiat_account_limit_exceeded - - invalid_bank_account_number - - invalid_ach_rtn - - invalid_wire_rtn - - vendor_inactive - FinalAdjustments: + - not_requested + - pass + - fail + - unavailable + - pending + CardVerificationResponse: type: object - description: Final adjustment which increases (credits) or decreases (debits) - the total returned amount to the source wallet. - nullable: true + description: Indicates the status of the card for verification purposes. + required: + - avs + - cvv properties: - fxCredit: - $ref: '#/components/schemas/FiatMoneyUsd' - fxDebit: - $ref: '#/components/schemas/FiatMoneyUsd' - IdPayout: - type: string - description: Universally unique identifier (UUID v4) of the payout that is associated - with the return. - format: uuid - example: abdb500d-4a59-457c-801f-2d418c8703ac - UnwithdrawalObject: + avs: + $ref: '#/components/schemas/AvsResults' + cvv: + $ref: '#/components/schemas/CvvResults' + RiskEvaluation: type: object - description: Return information if the payout is returned by bank. Only present - if `errorCode` of payout is `transaction_returned`. + description: Results of risk evaluation. Only present if the payment is denied + by Circle's risk service. nullable: true properties: - id: - $ref: '#/components/schemas/Id' - payoutId: - $ref: '#/components/schemas/IdPayout' - amount: - $ref: '#/components/schemas/FiatMoneyUsd' - fees: - $ref: '#/components/schemas/FiatMoneyUsd' - reason: - type: string - description: Reason for the return. - example: payout_returned - status: + decision: + description: Enumerated decision of the account. type: string - description: Status of the return. A `pending` status indicates that the - return is in process; `complete` indicates it finished successfully; `failed` - indicates it failed. enum: - - pending - - complete - - failed - createDate: - $ref: '#/components/schemas/UTCTimestamp' - updateDate: - $ref: '#/components/schemas/UTCTimestamp' - PayoutBusinessAccount: + - approved + - denied + - review + reason: + description: Risk reason for the definitive decision outcome. + type: string + nullable: true + example: '3000' + UTCTimestamp: + type: string + description: ISO-8601 UTC date/time format. + example: '2020-04-10T02:13:30.000Z' + SimpleCard: type: object + required: + - id + - status + - fingerprint + - billingDetails + - expMonth + - expYear + - network + - verification + - createDate + - updateDate properties: id: $ref: '#/components/schemas/Id' - sourceWalletId: - type: string - description: The identifier of the source wallet used to fund a payout. - example: '53535335' - destination: - $ref: '#/components/schemas/BankDestination' - amount: - $ref: '#/components/schemas/FiatMoney' - fees: - $ref: '#/components/schemas/FiatMoneyUsd' status: - $ref: '#/components/schemas/PayoutStatus' - trackingRef: - description: A payout tracking reference. Will be present once known. - nullable: true - example: CIR-6ESOQANEP3NAO - errorCode: - $ref: '#/components/schemas/PayoutErrorCode' + $ref: '#/components/schemas/ExternalFiatAccountStatus' + billingDetails: + $ref: '#/components/schemas/SimpleBillingDetails' + expMonth: + type: integer + description: Two digit number representing the card's expiration month. + example: 1 + expYear: + type: integer + description: Four digit number representing the card's expiration year. + example: 2020 + network: + type: string + description: The network of the card. + enum: + - VISA + - MASTERCARD + - AMEX + - UNKNOWN + bin: + type: string + description: The bank identification number (BIN), the first 6 digits of + the card. + example: '401230' + issuerCountry: + type: string + description: The country code of the issuer bank. Follows the ISO 3166-1 + alpha-2 standard. + example: US + fingerprint: + $ref: '#/components/schemas/Fingerprint' + verification: + $ref: '#/components/schemas/CardVerificationResponse' riskEvaluation: - $ref: '#/components/schemas/RiskEvaluation' - adjustments: - $ref: '#/components/schemas/FinalAdjustments' - return: - $ref: '#/components/schemas/UnwithdrawalObject' + $ref: '#/components/schemas/RiskEvaluation' createDate: $ref: '#/components/schemas/UTCTimestamp' updateDate: $ref: '#/components/schemas/UTCTimestamp' - BusinessAccountDestinationRequest: - type: object - description: The destination bank account. - required: - - type - - id - properties: - type: - type: string - enum: - - wire - - sen - id: - $ref: '#/components/schemas/Id' - BusinessAccountPayoutCreationRequest: - type: object - required: - - idempotencyKey - - destination - - amount - properties: - idempotencyKey: - $ref: '#/components/schemas/IdempotencyKey' - destination: - $ref: '#/components/schemas/BusinessAccountDestinationRequest' - amount: - $ref: '#/components/schemas/FiatMoney' - ExternalFiatAccountStatus: - description: Status of the account. A `pending` status indicates that the linking - is in-progress; `complete` indicates the account was linked successfully; - `failed` indicates it failed. - type: string - enum: - - pending - - complete - - failed - Fingerprint: + IdempotencyKey: type: string - description: A UUID that uniquely identifies the account number. If the same - account is used more than once, each card object will have a different id, - but the fingerprint will stay the same. - example: eb170539-9e1c-4e92-bf4f-1d09534fdca2 + description: Universally unique identifier (UUID v4) idempotency key. This key + is utilized to ensure exactly-once execution of mutating requests. + format: uuid + example: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 BillingDetails: type: object required: @@ -5662,9 +4963,227 @@ components: example: MA postalCode: type: string - description: Postal / ZIP code of the address. - maxLength: 16 - example: '01234' + description: Postal / ZIP code of the address. + maxLength: 16 + example: '01234' + CardExpMonth: + type: integer + description: Two digit number representing the card's expiration month. + minimum: 1 + maximum: 12 + example: 1 + CardExpYear: + type: integer + description: Four digit number representing the card's expiration year. + minimum: 1 + maximum: 9999 + example: 2020 + Email: + type: string + description: Email of the user. + maxLength: 1024 + example: satoshi@circle.com + PhoneNumber: + type: string + description: Phone number of the user in E.164 format. We recommend using a + library such as [libphonenumber](https://github.com/google/libphonenumber) + to parse and validate phone numbers. + maxLength: 16 + pattern: /\+?[1-9]\d{1,14}/ + example: '+14155555555' + SessionId: + description: 'Hash of the session identifier; typically of the end user. This + helps us make risk decisions and prevent fraud. IMPORTANT: Please hash the + session identifier to prevent sending us actual session identifiers. + + ' + type: string + maxLength: 50 + example: DE6FA86F60BB47B379307F851E238617 + IpAddress: + type: string + description: Single IPv4 or IPv6 address of user' + example: 244.28.239.130 + MetadataCardAndAch: + type: object + required: + - email + - sessionId + - ipAddress + properties: + email: + $ref: '#/components/schemas/Email' + phoneNumber: + $ref: '#/components/schemas/PhoneNumber' + sessionId: + $ref: '#/components/schemas/SessionId' + ipAddress: + $ref: '#/components/schemas/IpAddress' + CardCreationRequest: + type: object + required: + - idempotencyKey + - expMonth + - expYear + - encryptedData + - billingDetails + - metadata + properties: + idempotencyKey: + $ref: '#/components/schemas/IdempotencyKey' + keyId: + $ref: '#/components/schemas/IdKey' + encryptedData: + type: string + format: byte + description: 'PGP encrypted base64 encoded string. Contains Number and CVV. + + * **Number**: Card number. No spaces or other separators. REQUIRED + + * **CVV (Card Verification Number)**: Three or four digit security code. + REQUIRED'' + + ' + example: LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tCgp3Y0JNQTBYV1NGbEZScFZoQVFmL2J2bVVkNG5LZ3dkbExKVTlEdEFEK0p5c0VOTUxuOUlRUWVGWnZJUWEKMGgzQklpRFNRU0RMZmI0NEs2SXZMeTZRbm54bmFLcWx0MjNUSmtPd2hGWFIrdnNSMU5IbnVHN0lUNWJECmZzeVdleXlNK1JLNUVHV0thZ3NmQ2tWamh2NGloY29xUnlTTGtJbWVmRzVaR0tMRkJTTTBsTFNPWFRURQpiMy91eU1zMVJNb3ZiclNvbXkxa3BybzUveWxabWVtV2ZsU1pWQlhNcTc1dGc1YjVSRVIraXM5ckc0cS8KMXl0M0FOYXA3UDhKekFhZVlyTnVNZGhGZFhvK0NFMC9CQnN3L0NIZXdhTDk4SmRVUEV0NjA5WFRHTG9kCjZtamY0YUtMQ01xd0RFMkNVb3dPdE8vMzVIMitnVDZKS3FoMmtjQUQyaXFlb3luNWcralRHaFNyd3NKWgpIdEphQWVZZXpGQUVOaFo3Q01IOGNsdnhZVWNORnJuNXlMRXVGTkwwZkczZy95S3loclhxQ0o3UFo5b3UKMFVxQjkzQURKWDlJZjRBeVQ2bU9MZm9wUytpT2lLall4bG1NLzhlVWc3OGp1OVJ5T1BXelhyTzdLWTNHClFSWm8KPXc1dEYKLS0tLS1FTkQgUEdQIE1FU1NBR0UtLS0tLQo + billingDetails: + $ref: '#/components/schemas/BillingDetails' + expMonth: + $ref: '#/components/schemas/CardExpMonth' + expYear: + $ref: '#/components/schemas/CardExpYear' + metadata: + $ref: '#/components/schemas/MetadataCardAndAch' + VerificationErrorCode: + type: string + description: Indicates the failure reason of the card verification. Only present + on cards with failed verification. Possible values are [verification_failed, + verification_fraud_detected, verification_denied, verification_not_supported_by_issuer, + verification_stopped_by_issuer, card_failed, card_invalid, card_address_mismatch, + card_zip_mismatch, card_cvv_invalid, card_expired, card_limit_violated, card_not_honored, + card_cvv_required, credit_card_not_allowed, card_account_ineligible, card_network_unsupported]' + nullable: true + enum: + - verification_failed + - verification_fraud_detected + - verification_denied + - verification_not_supported_by_issuer + - verification_stopped_by_issuer + - card_failed + - card_invalid + - card_address_mismatch + - card_zip_mismatch + - card_cvv_invalid + - card_expired + - card_limit_violated + - card_not_honored + - card_cvv_required + - credit_card_not_allowed + - card_account_ineligible + - card_network_unsupported + MetadataPhoneEmail: + type: object + required: + - email + properties: + email: + $ref: '#/components/schemas/Email' + phoneNumber: + $ref: '#/components/schemas/PhoneNumber' + Card: + type: object + required: + - id + - status + - billingDetails + - expMonth + - expYear + - network + - last4 + - fingerprint + - verification + - metadata + - createDate + - updateDate + properties: + id: + $ref: '#/components/schemas/Id' + status: + $ref: '#/components/schemas/ExternalFiatAccountStatus' + billingDetails: + $ref: '#/components/schemas/BillingDetails' + expMonth: + $ref: '#/components/schemas/CardExpMonth' + expYear: + $ref: '#/components/schemas/CardExpYear' + network: + type: string + description: The network of the card. + enum: + - VISA + - MASTERCARD + - AMEX + - UNKNOWN + last4: + type: string + description: The last 4 digits of the card. + example: '0123' + bin: + type: string + description: The bank identification number (BIN), the first 6 digits of + the card. + example: '401230' + issuerCountry: + type: string + description: The country code of the issuer bank. Follows the ISO 3166-1 + alpha-2 standard. + example: US + fundingType: + description: The funding type of the card. Possible values are `credit`, + `debit`, `prepaid`, and `unknown`. + type: string + enum: + - credit + - debit + - prepaid + - unknown + fingerprint: + $ref: '#/components/schemas/Fingerprint' + errorCode: + $ref: '#/components/schemas/VerificationErrorCode' + verification: + $ref: '#/components/schemas/CardVerificationResponse' + riskEvaluation: + $ref: '#/components/schemas/RiskEvaluation' + metadata: + $ref: '#/components/schemas/MetadataPhoneEmail' + createDate: + $ref: '#/components/schemas/UTCTimestamp' + updateDate: + $ref: '#/components/schemas/UTCTimestamp' + CardUpdate: + type: object + required: + - keyId + - encryptedData + - expMonth + - expYear + properties: + keyId: + $ref: '#/components/schemas/IdKey' + encryptedData: + type: string + format: byte + description: 'PGP encrypted base64 encoded string. Contains CVV. + + * **CVV (Card Verification Number)**: Three or four digit security code. + REQUIRED'' + + ' + example: UHVibGljS2V5QmFzZTY0RW5jb2RlZA== + expMonth: + $ref: '#/components/schemas/CardExpMonth' + expYear: + $ref: '#/components/schemas/CardExpYear' BankAddress: type: object description: The address details for the bank, as provided during bank account @@ -5977,58 +5496,6 @@ components: $ref: '#/components/schemas/WireInstructionBeneficiary' beneficiaryBank: $ref: '#/components/schemas/WireInstructionBeneficiaryBank' - SignetFiatAccountResponse: - type: object - required: - - id - - status - - trackingRef - - walletAddress - - createDate - - updateDate - properties: - id: - $ref: '#/components/schemas/Id' - status: - $ref: '#/components/schemas/ExternalFiatAccountStatus' - trackingRef: - type: string - description: Tracking ref that needs to be set in the public description - field when you send the funds to Circle Signet wallet. - example: CIR13FB14A - walletAddress: - type: string - description: Your signet wallet address. - example: '0xcac04f0069e4ac9314ac4e608e99278a3bebabcd' - createDate: - $ref: '#/components/schemas/UTCTimestamp' - updateDate: - $ref: '#/components/schemas/UTCTimestamp' - SignetFiatAccountCreationRequest: - type: object - required: - - idempotencyKey - - walletAddress - properties: - idempotencyKey: - $ref: '#/components/schemas/IdempotencyKey' - walletAddress: - type: string - description: Signet wallet address. - example: '0xcac04f0069e4ac9314ac4e608e99278a3bebabcd' - SignetInstruction: - type: object - properties: - trackingRef: - type: string - description: Circle tracking reference that needs to be set in the signet - public description field. - example: CIR13FB14A - walletAddress: - type: string - description: Circle wallet address that needs to be set in the signet recipient - wallet field. - example: '0x7e4f4fe03243ac7b291ebaee90b2bb27025a1234' SenFiatAccountResponse: type: object required: @@ -6093,15 +5560,28 @@ components: type: string description: Currency of Circle corporate Silvergate SEN account. example: USD - IdentityAddress: + ACHBillingDetails: type: object + description: Billing details of the account holder. required: - - line1 - - city - - district - - postalCode - - country + - name properties: + name: + type: string + description: Full name of the card or bank account holder. + maxLength: 1024 + example: Satoshi Nakamoto + city: + type: string + description: City portion of the address. + maxLength: 1024 + example: Boston + country: + type: string + description: Country portion of the address. Formatted as a two-letter country + code specified in ISO 3166-1 alpha-2. + maxLength: 2 + example: US line1: type: string description: Line one of the street address. @@ -6112,16 +5592,11 @@ components: description: Line two of the street address. maxLength: 1024 example: Suite 1 - city: - type: string - description: City portion of the address. - maxLength: 1024 - example: Boston district: + type: string description: State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision. - type: string maxLength: 16 example: MA postalCode: @@ -6129,256 +5604,272 @@ components: description: Postal / ZIP code of the address. maxLength: 16 example: '01234' - country: - type: string - description: Country portion of the address. Formatted as a two-letter country - code specified in ISO 3166-1 alpha-2. - maxLength: 2 - example: US - Identity: + ACHBankAccountType: + type: string + description: Retail account (individual consumer account) or Business account + (e.g. sole prop, LLC, corporation). + nullable: true + enum: + - retail + - business + ACHCreationRequest: type: object - description: "The identity of the originator. Identities are required when:\n\ - \ * `destination.type: \"blockchain\"`\n * `destination.chain: \"ETH\"`\n\ - \ * `amount.amount` >= $3,000 in value\n" required: - - type - - name - - addresses + - idempotencyKey + - plaidProcessorToken + - billingDetails + - metadata properties: - type: - type: string - description: 'The type of identity for the originator. - - * `individual` - A uniquely distinguishable individual. - - * `business` - Any entity other than a natural person that can establish - a permanent customer relationship with an affected entity or otherwise - own property. This can include companies, foundations, anstalt, partnerships, - associations and other relevantly similar entities. - - ' - enum: - - individual - - business - name: + idempotencyKey: + $ref: '#/components/schemas/IdempotencyKey' + plaidProcessorToken: type: string - description: Full name of the identity. - example: Satoshi Nakamoto - maxLength: 1024 - addresses: - type: array - items: - $ref: '#/components/schemas/IdentityAddress' - TransferSourceWalletLocation: - description: A source wallet location. + description: The token for the ACH account provided by the processor (Plaid). + example: processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621 + billingDetails: + $ref: '#/components/schemas/ACHBillingDetails' + bankAccountType: + $ref: '#/components/schemas/ACHBankAccountType' + metadata: + $ref: '#/components/schemas/MetadataCardAndAch' + AccountNumberMasked: + type: string + description: The redacted account number of the ACH account. + example: '****6789' + RoutingNumber: + type: string + description: The routing number of the ACH account. + example: '613334455' + AchVerificationErrorCodes: + type: string + description: Indicates the failure reason of the ACH account. Only present on + failed accounts. Possible values are [bank_account_authorization_expired, + bank_account_error, bank_account_ineligible, bank_account_not_found, bank_account_unauthorized, + unsupported_routing_number, verification_failed]. + nullable: true + enum: + - bank_account_authorization_expired + - bank_account_error + - bank_account_ineligible + - bank_account_not_found + - bank_account_unauthorized + - unsupported_routing_number + - verification_failed + ACH: type: object required: - - type - id + - accountNumber + - routingNumber + - description + - billingDetails + - bankAddress + - fingerprint + - metadata + - createDate + - updateDate properties: - type: - type: string - enum: - - wallet id: - type: string - description: The id of the wallet. - example: '12345' - identities: - type: array - items: - $ref: '#/components/schemas/Identity' - TransferSourceBlockchainLocation: - description: A source blockchain address. - type: object - required: - - type - - chain - properties: - type: - type: string - enum: - - blockchain - chain: - $ref: '#/components/schemas/Chain' - identities: - type: array - items: - $ref: '#/components/schemas/Identity' - TransferSourceLocation: - description: A source of funds. - oneOf: - - $ref: '#/components/schemas/TransferSourceWalletLocation' - - $ref: '#/components/schemas/TransferSourceBlockchainLocation' - discriminator: - propertyName: type - Address: - type: string - description: An alphanumeric string representing a blockchain address. Will - be in different formats for different chains. It is important to preserve - the exact formatting and capitalization of the address. - example: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - AddressTag: - type: string - description: The secondary identifier for a blockchain address. An example of - this is the memo field on the Stellar network, which can be text, id, or hash - format. - nullable: true - example: '123456789' - TransferDestinationBlockchainLocation: - description: A destination blockchain address. + $ref: '#/components/schemas/Id' + status: + $ref: '#/components/schemas/ExternalFiatAccountStatus' + accountNumber: + $ref: '#/components/schemas/AccountNumberMasked' + routingNumber: + $ref: '#/components/schemas/RoutingNumber' + billingDetails: + $ref: '#/components/schemas/ACHBillingDetails' + bankAccountType: + $ref: '#/components/schemas/ACHBankAccountType' + bankAddress: + $ref: '#/components/schemas/BankAddress' + fingerprint: + $ref: '#/components/schemas/Fingerprint' + errorCode: + $ref: '#/components/schemas/AchVerificationErrorCodes' + riskEvaluation: + $ref: '#/components/schemas/RiskEvaluation' + createDate: + $ref: '#/components/schemas/UTCTimestamp' + updateDate: + $ref: '#/components/schemas/UTCTimestamp' + metadata: + $ref: '#/components/schemas/MetadataPhoneEmail' + SEPACreationRequest: type: object required: - - type - - chain - - address + - idempotencyKey + - accountName + - iban + - billingDetails properties: - type: + idempotencyKey: + $ref: '#/components/schemas/IdempotencyKey' + iban: type: string - enum: - - blockchain - address: - $ref: '#/components/schemas/Address' - addressTag: - $ref: '#/components/schemas/AddressTag' - chain: - $ref: '#/components/schemas/Chain' - TransferDestinationWalletLocation: - description: A destination wallet location. + description: International Bank Account Number (IBAN) for the bank account. + example: DE31100400480532013000 + billingDetails: + $ref: '#/components/schemas/BillingDetails' + SEPA: type: object required: - - type - id + - status + - description + - trackingRef + - fingerprint + - billingDetails + - createDate + - updateDate properties: - type: - type: string - enum: - - wallet id: + $ref: '#/components/schemas/Id' + status: + $ref: '#/components/schemas/ExternalFiatAccountStatus' + description: type: string - description: The id of the wallet. - example: '12345' - address: + description: Bank name plus last four digits of the IBAN. + example: Bank of Ireland ****0010 + trackingRef: type: string - description: An alphanumeric string which indicates the wallet address used - to receive the transfer. Will only be set when the transfer source is - a blockchain address. - example: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: - $ref: '#/components/schemas/AddressTag' - TransferDestinationLocation: - description: A destination of funds. - oneOf: - - $ref: '#/components/schemas/TransferDestinationBlockchainLocation' - - $ref: '#/components/schemas/TransferDestinationWalletLocation' - discriminator: - propertyName: type - Fee: + description: Tracking reference that needs to be set in the payment details + or description. + example: CIR13FB13A + fingerprint: + $ref: '#/components/schemas/Fingerprint' + riskEvaluation: + $ref: '#/components/schemas/RiskEvaluation' + billingDetails: + $ref: '#/components/schemas/BillingDetails' + createDate: + $ref: '#/components/schemas/UTCTimestamp' + updateDate: + $ref: '#/components/schemas/UTCTimestamp' + SEPAInstructionBeneficiary: type: object - required: - - amount - - currency - - type properties: - amount: + name: type: string - description: Magnitude of the fee amount, in units of the currency, with - a `.`. - example: '10.00' - currency: + description: Name of the beneficiary. + example: CIRCLE INTERNET FINANCIAL INC + address1: type: string - description: Currency code for the amount. - enum: - - USD - type: + description: Address line 1 of the beneficiary's address. + example: 99 HIGH STREET + address2: type: string - description: Category of the fee. - enum: - - network - TransferErrorCode: - type: string - description: Indicates the failure reason of a transfer. Only present for transfers - in a `failed` state. Possible values are `insufficient_funds`, `blockchain_error` - and `transfer_denied` and `transfer_failed` - nullable: true - enum: - - transfer_failed - - transfer_denied - - blockchain_error - - insufficient_funds - Transfer: + description: Address line 2 of the beneficiary's address. + example: BOSTON MA 02110 + SEPAInstructionBeneficiaryBank: type: object - description: A transfer of funds. - required: - - id - - source - - destination - - amount - - status properties: - id: - $ref: '#/components/schemas/Id' - source: - $ref: '#/components/schemas/TransferSourceLocation' - destination: - $ref: '#/components/schemas/TransferDestinationLocation' - amount: - $ref: '#/components/schemas/Money' - fees: - description: An array of fees applied to a transaction. This is only available - when there is at least one non-zero fee. - readOnly: true - type: array - items: - $ref: '#/components/schemas/Fee' - transactionHash: - description: A hash that uniquely identifies the onchain transaction. This - is only available where either source or destination are of type blockchain. + name: type: string - example: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' - status: - description: Status of the transfer. Status `pending` indicates that the - transfer is in the process of running; `complete` indicates it finished - successfully; `failed` indicates it failed. + description: Name of the beneficiary's bank. + example: LHV Bank + bic: type: string - enum: - - pending - - complete - - failed - errorCode: - $ref: '#/components/schemas/TransferErrorCode' - createDate: - description: The create date of the transfer. + description: BIC code of the beneficiary's bank account. + example: LHVBEE22XXX + iban: + description: IBAN of the beneficiary's bank account. type: string - format: date-time - TransferRequestVerifiedBlockchainLocation: + example: '****6789' + address: + description: Address of the beneficiary's bank. + type: string + example: Tartu mnt 2, 10145 Tallinn + city: + description: City of the beneficiary's bank. + type: string + example: Tallinn + postalCode: + description: Postal code of the beneficiary's bank. + type: string + example: '10017' + country: + description: Country code of the beneficiary's bank. Formatted as a two-letter + country code specified in ISO 3166-1 alpha-2. + type: string + example: EE + SEPAInstruction: + type: object + properties: + trackingRef: + type: string + description: Circle tracking reference that needs to be set in the SEPA + transfer reference field. + example: CIR13FB13A + beneficiary: + $ref: '#/components/schemas/SEPAInstructionBeneficiary' + beneficiaryBank: + $ref: '#/components/schemas/SEPAInstructionBeneficiaryBank' + SignetFiatAccountResponse: type: object required: - - type - - addressId + - id + - status + - trackingRef + - walletAddress + - createDate + - updateDate properties: - type: + id: + $ref: '#/components/schemas/Id' + status: + $ref: '#/components/schemas/ExternalFiatAccountStatus' + trackingRef: type: string - enum: - - verified_blockchain - addressId: + description: Tracking ref that needs to be set in the public description + field when you send the funds to Circle Signet wallet. + example: CIR13FB14A + walletAddress: type: string - description: The ID of the verified blockchain recipient address. - example: f1f36b85-cafe-484e-a46b-02340bfdb927 - format: uuid - BusinessAccountTransferCreationRequest: + description: Your signet wallet address. + example: '0xcac04f0069e4ac9314ac4e608e99278a3bebabcd' + createDate: + $ref: '#/components/schemas/UTCTimestamp' + updateDate: + $ref: '#/components/schemas/UTCTimestamp' + SignetFiatAccountCreationRequest: type: object required: - idempotencyKey - - destination - - amount + - walletAddress properties: idempotencyKey: $ref: '#/components/schemas/IdempotencyKey' - destination: - $ref: '#/components/schemas/TransferRequestVerifiedBlockchainLocation' - amount: - $ref: '#/components/schemas/Money' + walletAddress: + type: string + description: Signet wallet address. + example: '0xcac04f0069e4ac9314ac4e608e99278a3bebabcd' + SignetInstruction: + type: object + properties: + trackingRef: + type: string + description: Circle tracking reference that needs to be set in the signet + public description field. + example: CIR13FB14A + walletAddress: + type: string + description: Circle wallet address that needs to be set in the signet recipient + wallet field. + example: '0x7e4f4fe03243ac7b291ebaee90b2bb27025a1234' + Address: + type: string + description: An alphanumeric string representing a blockchain address. Will + be in different formats for different chains. It is important to preserve + the exact formatting and capitalization of the address. + example: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + AddressTag: + type: string + description: The secondary identifier for a blockchain address. An example of + this is the memo field on the Stellar network, which can be text, id, or hash + format. + nullable: true + example: '123456789' Currency: type: string description: A currency associated with a balance or address. @@ -6467,6 +5958,37 @@ components: type: string description: The id of the wallet. example: '12345' + FiatMoney: + type: object + required: + - amount + - currency + properties: + amount: + description: Magnitude of the amount, in units of the currency, with a `.`. + type: string + example: '3.14' + currency: + description: Currency code. + type: string + enum: + - USD + - EUR + FiatMoneyUsd: + type: object + required: + - amount + - currency + properties: + amount: + description: Magnitude of the amount, in units of the currency, with a `.`. + type: string + example: '3.14' + currency: + description: Currency code. + type: string + enum: + - USD BusinessAccountDeposit: type: object description: A deposit @@ -6506,322 +6028,486 @@ components: $ref: '#/components/schemas/UTCTimestamp' updateDate: $ref: '#/components/schemas/UTCTimestamp' - MockSenPaymentBeneficiaryBankInstruction: + CryptoPaymentsMoney: type: object required: - - accountNumber + - amount + - currency properties: - accountNumber: + amount: + description: Magnitude of the amount, in units of the currency, with a `.`. type: string - description: Circle corporate Silvergate SEN account number that needs to - be set as destination. - example: '11111111' - MockSenPaymentRequest: + example: '3.14' + currency: + description: Currency code. + type: string + enum: + - USD + - ETH + - BTC + PaymentMethodBlockchain: type: object required: - - trackingRef + - type + - chain + properties: + type: + type: string + enum: + - blockchain + chain: + $ref: '#/components/schemas/Chain' + address: + type: string + readOnly: true + example: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + PaymentIntentFees: + type: object + readOnly: true + required: + - type - amount - - beneficiaryBank + - currency properties: - trackingRef: + type: + type: string + enum: + - blockchainLeaseFee + - totalPaymentFees + amount: + description: Magnitude of the amount, in units of the currency, with a `.`. + type: string + example: '3.14' + currency: + description: Currency code. + type: string + enum: + - USD + Timeline: + type: object + readOnly: true + required: + - status + - time + properties: + status: + type: string + enum: + - created + - pending + - complete + - expired + - failed + context: + type: string + enum: + - underpaid + - paid + - overpaid + time: + description: ISO-8601 UTC date/time format. + type: string + format: date-time + UTCTimestampReadOnly: + type: string + readOnly: true + description: ISO-8601 UTC date/time format. + example: '2020-04-10T02:13:30.000Z' + PaymentIntent: + type: object + required: + - idempotencyKey + - amount + - settlementCurrency + - paymentMethods + properties: + idempotencyKey: + $ref: '#/components/schemas/IdempotencyKey' + id: + type: string + readOnly: true + description: Unique system generated identifier for the entity. + format: uuid + example: b8627ae8-732b-4d25-b947-1df8f4007a29 + amount: + $ref: '#/components/schemas/CryptoPaymentsMoney' + amountPaid: + description: Sum of the the amount paid. + type: object + readOnly: true + required: + - amount + - currency + properties: + amount: + description: Magnitude of the amount, in units of the currency, with + a `.`. + type: string + example: '3.14' + currency: + description: Currency code. + type: string + enum: + - USD + settlementCurrency: + description: Desired currency for the payments to settle in. + type: string + enum: + - USD + - BTC + - ETH + paymentMethods: + type: array + items: + $ref: '#/components/schemas/PaymentMethodBlockchain' + fees: + type: array + readOnly: true + items: + $ref: '#/components/schemas/PaymentIntentFees' + paymentIds: + description: List of associated payments. + type: array + readOnly: true + items: + type: string + format: uuid + example: 69808f36-3e5e-4f37-bf82-ca79e4d70fc1 + timeline: + description: State management timeline. + type: array + readOnly: true + items: + $ref: '#/components/schemas/Timeline' + expiresOn: + $ref: '#/components/schemas/UTCTimestampReadOnly' + updateDate: + $ref: '#/components/schemas/UTCTimestampReadOnly' + createDate: + $ref: '#/components/schemas/UTCTimestampReadOnly' + IdMerchant: + type: string + description: Unique system generated identifier for the merchant. + format: uuid + example: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + SourceResponse: + type: object + description: The payment source. + properties: + id: + $ref: '#/components/schemas/Id' + type: + type: string + description: Type of the source. + enum: + - card + - ach + - wire + - sepa + PaymentStatus: + type: string + description: Enumerated status of the payment. `pending` means the payment is + waiting to be processed. `confirmed` means the payment has been approved by + the bank and the merchant can treat it as successful, but settlement funds + are not yet available to the merchant. `paid` means settlement funds have + been received and are available to the merchant. `failed` means something + went wrong (most commonly that the payment was denied). `action_required` + means that additional steps are required to process this payment; refer to + `requiredAction` for more details. Terminal states are `paid` and `failed`. + enum: + - pending + - confirmed + - paid + - failed + - action_required + RequiredAction: + type: object + description: When the payment status is `action_required`, this object summarizes + the required additional steps. + required: + - type + - redirectUrl + properties: + type: + type: string + description: The type of action that is required to proceed with the payment. + Currently only one type is supported. + enum: + - three_d_secure_required + redirectUrl: type: string - description: Circle tracking reference that needs to be set in the memo - filed. This field is retrievable through the response during SEN account - creation or via the bank instruction endpoint. - example: CIR13FB13A - amount: - $ref: '#/components/schemas/FiatMoney' - beneficiaryBank: - $ref: '#/components/schemas/MockSenPaymentBeneficiaryBankInstruction' - MockSenPaymentResponse: + description: The URL to bring the user to in order to complete the payment. + example: https://example.org + CancelRefundReversalStatus: + type: string + enum: + - pending + - confirmed + - paid + - failed + description: Enumerated status of the payment. `pending` means the payment is + waiting to be processed. `confirmed` means the payment has been approved by + the bank and the merchant can treat it as successful, but settlement funds + are not yet available to the merchant. `paid` means settlement funds have + been received and are available to the merchant. `failed` means something + went wrong (most commonly that the payment was denied). Terminal states are + `paid` and `failed`. + PaymentInfoCancel: type: object + description: Status information of the related cancel. This property is only + present on canceled payment or refund items. + nullable: true properties: - trackingRef: + id: + $ref: '#/components/schemas/Id' + type: type: string - description: Wire tracking reference that needs to be set in the wire reference - to beneficiary field. This field is retrievable through the response during - wire creation or via the bank instruction endpoint. - example: CIR13FB13A - amount: - $ref: '#/components/schemas/FiatMoneyUsd' - beneficiaryBank: - $ref: '#/components/schemas/MockSenPaymentBeneficiaryBankInstruction' - status: + description: Type of the payment object. + enum: + - cancel + description: + description: Enumerated description of the payment item. type: string - description: Enumerated status of the wire payment. Status `pending` indicates - that the wire payment is in process; `processed` indicates it finished - successfully; `failed` indicates it failed. + nullable: true enum: - - pending - - processed - - failed - Payout: + - Payment + status: + $ref: '#/components/schemas/CancelRefundReversalStatus' + createDate: + $ref: '#/components/schemas/UTCTimestamp' + PaymentInfoPaymentAndRefund: type: object + description: Status information of the related payment. This property is only + present on refund or cancel items. properties: id: $ref: '#/components/schemas/Id' - sourceWalletId: + type: type: string - description: The identifier of the source wallet used to fund a payout. - example: '53535335' - destination: - $ref: '#/components/schemas/BankDestination' + description: Type of the payment object. + enum: + - payment + - refund amount: $ref: '#/components/schemas/FiatMoneyUsd' + description: + type: string + description: Enumerated description of the payment item. + nullable: true + enum: + - Payment + status: + $ref: '#/components/schemas/PaymentStatus' + requiredAction: + $ref: '#/components/schemas/RequiredAction' fees: $ref: '#/components/schemas/FiatMoneyUsd' - status: - $ref: '#/components/schemas/PayoutStatus' - trackingRef: - description: A payout tracking reference. Will be present once known. - nullable: true - example: CIR-6ESOQANEP3NAO - errorCode: - $ref: '#/components/schemas/PayoutErrorCode' - riskEvaluation: - $ref: '#/components/schemas/RiskEvaluation' - adjustments: - $ref: '#/components/schemas/FinalAdjustments' - return: - $ref: '#/components/schemas/UnwithdrawalObject' createDate: $ref: '#/components/schemas/UTCTimestamp' - updateDate: - $ref: '#/components/schemas/UTCTimestamp' - MetadataPayout: - type: object - description: Additional properties related to the payout beneficiary. - required: - - beneficiaryEmail - properties: - beneficiaryEmail: - $ref: '#/components/schemas/Email' - PayoutCreationRequest: + Channel: + type: string + format: uuid + description: The channel identifier that can be set for the payment. When not + provided, the default channel is used. + example: ba943ff1-ca16-49b2-ba55-1057e70ca5c7 + FiatPayment: type: object + description: Status information of the related payment. This property is only + present on refund or cancel items. required: - - idempotencyKey - - destination + - id + - type + - merchantId - amount - - metadata - properties: - idempotencyKey: - $ref: '#/components/schemas/IdempotencyKey' - source: - $ref: '#/components/schemas/WalletLocation' - destination: - $ref: '#/components/schemas/BankDestination' - amount: - $ref: '#/components/schemas/FiatMoneyUsd' - metadata: - $ref: '#/components/schemas/MetadataPayout' - DetailedPayout: - type: object + - source + - status properties: id: $ref: '#/components/schemas/Id' - sourceWalletId: - description: The identifier of the source wallet used to fund a payout. + type: + description: Type of the payment object. type: string - example: '53535335' - destination: - $ref: '#/components/schemas/BankDestination' + enum: + - payment + merchantId: + $ref: '#/components/schemas/IdMerchant' + merchantWalletId: + $ref: '#/components/schemas/MerchantWalletId' amount: $ref: '#/components/schemas/FiatMoneyUsd' - fees: - $ref: '#/components/schemas/FiatMoneyUsd' - status: - description: Status of the payout. Status `pending` indicates that the payout - is in process; `complete` indicates it finished successfully; `failed` - indicates it failed. + source: + $ref: '#/components/schemas/SourceResponse' + description: + description: Enumerated description of the payment. type: string enum: - - pending - - complete - - failed - trackingRef: - description: A payout tracking reference. Will be present once known. - nullable: true - example: CIR-6ESOQANEP3NAO - externalRef: - $ref: '#/components/schemas/ExternalRef' - errorCode: - $ref: '#/components/schemas/PayoutErrorCode' - riskEvaluation: - $ref: '#/components/schemas/RiskEvaluation' - adjustments: - $ref: '#/components/schemas/FinalAdjustments' - return: - $ref: '#/components/schemas/UnwithdrawalObject' + - Payment + status: + $ref: '#/components/schemas/PaymentStatus' + captured: + description: Determines if a payment has successfully been captured. This + property is only present for payments that did not use auto capture. + type: boolean + captureAmount: + $ref: '#/components/schemas/FiatMoneyUsd' + captureDate: + $ref: '#/components/schemas/UTCTimestamp' + requiredAction: + $ref: '#/components/schemas/RequiredAction' + cancel: + $ref: '#/components/schemas/PaymentInfoCancel' + refunds: + type: array + items: + $ref: '#/components/schemas/PaymentInfoPaymentAndRefund' + fees: + $ref: '#/components/schemas/FiatMoneyUsd' + channel: + $ref: '#/components/schemas/Channel' createDate: $ref: '#/components/schemas/UTCTimestamp' updateDate: $ref: '#/components/schemas/UTCTimestamp' - TransferRequestSourceWalletLocation: + CryptoPayment: type: object + description: Status information of the related payment. This property is only + present on refund or cancel items. required: - - type - id + - type + - merchantId + - amount + - source + - status properties: + id: + $ref: '#/components/schemas/Id' type: + description: Type of the payment object. type: string enum: - - wallet - id: + - payment + merchantId: + $ref: '#/components/schemas/IdMerchant' + merchantWalletId: + $ref: '#/components/schemas/MerchantWalletId' + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + status: + $ref: '#/components/schemas/PaymentStatus' + fees: + $ref: '#/components/schemas/FiatMoneyUsd' + paymentIntentId: type: string - description: The id of the wallet. - example: '12345' - identities: - type: array - items: - $ref: '#/components/schemas/Identity' - TransferRequestBlockchainLocation: + format: uuid + example: 6e4d4047-db14-4c09-b238-1215aee50d03 + settlementAmount: + $ref: '#/components/schemas/FiatMoneyUsd' + depositAddress: + type: object + properties: + chain: + $ref: '#/components/schemas/Chain' + address: + type: string + example: '0x97de855690955e0da79ce5c1b6804847e7070c7f' + transactionHash: + type: string + example: '0x7351585460bd657f320b9afa02a52c26d89272d0d10cc29913eb8b28e64fd906' + createDate: + $ref: '#/components/schemas/UTCTimestamp' + updateDate: + $ref: '#/components/schemas/UTCTimestamp' + FiatCancel: type: object + description: Status information of the related cancel. This property is only + present on canceled payment or refund items. + nullable: true required: + - id - type - - address - - chain + - merchantId + - amount + - source + - status properties: + id: + $ref: '#/components/schemas/Id' type: type: string + description: Type of the payment object. enum: - - blockchain - address: - type: string - description: The blockchain address. - example: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' - addressTag: - $ref: '#/components/schemas/AddressTag' - chain: - $ref: '#/components/schemas/Chain' - TransferCreationRequest: - type: object - required: - - idempotencyKey - - source - - destination - - amount - properties: - idempotencyKey: - $ref: '#/components/schemas/IdempotencyKey' - source: - $ref: '#/components/schemas/TransferRequestSourceWalletLocation' - destination: - oneOf: - - $ref: '#/components/schemas/TransferRequestBlockchainLocation' - - $ref: '#/components/schemas/WalletLocation' + - cancel + merchantId: + $ref: '#/components/schemas/IdMerchant' + merchantWalletId: + $ref: '#/components/schemas/MerchantWalletId' amount: - $ref: '#/components/schemas/Money' - TransferDetailedTransfer: + $ref: '#/components/schemas/FiatMoneyUsd' + source: + $ref: '#/components/schemas/SourceResponse' + description: + description: Enumerated description of the payment. + type: string + enum: + - Payment + status: + $ref: '#/components/schemas/CancelRefundReversalStatus' + originalPayment: + $ref: '#/components/schemas/PaymentInfoPaymentAndRefund' + fees: + $ref: '#/components/schemas/FiatMoneyUsd' + channel: + $ref: '#/components/schemas/Channel' + createDate: + $ref: '#/components/schemas/UTCTimestamp' + updateDate: + $ref: '#/components/schemas/UTCTimestamp' + FiatRefund: type: object - description: A transfer of funds. required: - id - - source - - destination + - type + - merchantId - amount + - source - status properties: id: $ref: '#/components/schemas/Id' - source: - $ref: '#/components/schemas/TransferSourceLocation' - destination: - $ref: '#/components/schemas/TransferDestinationLocation' - amount: - $ref: '#/components/schemas/Money' - fees: - description: An array of fees applied to a transaction. This is only available - when there is at least one non-zero fee. - readOnly: true - type: array - items: - $ref: '#/components/schemas/Fee' - transactionHash: + type: + description: Type of the payment object. type: string - description: A hash that uniquely identifies the onchain transaction. This - is only available where either source or destination are of type blockchain. - example: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' - status: + enum: + - refund + merchantId: + $ref: '#/components/schemas/IdMerchant' + merchantWalletId: + $ref: '#/components/schemas/MerchantWalletId' + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + source: + $ref: '#/components/schemas/SourceResponse' + description: + description: Enumerated description of the payment. type: string - description: Status of the transfer. Status `pending` indicates that the - transfer is in the process of running; `complete` indicates it finished - successfully; `failed` indicates it failed. enum: - - failed - - pending - - complete - errorCode: - $ref: '#/components/schemas/TransferErrorCode' - riskEvaluation: - $ref: '#/components/schemas/RiskEvaluation' + - Payment + status: + $ref: '#/components/schemas/CancelRefundReversalStatus' + originalPayment: + $ref: '#/components/schemas/PaymentInfoPaymentAndRefund' + cancel: + $ref: '#/components/schemas/PaymentInfoCancel' + fees: + $ref: '#/components/schemas/FiatMoneyUsd' + channel: + $ref: '#/components/schemas/Channel' createDate: $ref: '#/components/schemas/UTCTimestamp' - ACHBillingDetails: - type: object - description: Billing details of the account holder. - required: - - name - properties: - name: - type: string - description: Full name of the card or bank account holder. - maxLength: 1024 - example: Satoshi Nakamoto - city: - type: string - description: City portion of the address. - maxLength: 1024 - example: Boston - country: - type: string - description: Country portion of the address. Formatted as a two-letter country - code specified in ISO 3166-1 alpha-2. - maxLength: 2 - example: US - line1: - type: string - description: Line one of the street address. - maxLength: 1024 - example: 100 Money Street - line2: - type: string - description: Line two of the street address. - maxLength: 1024 - example: Suite 1 - district: - type: string - description: State / County / Province / Region portion of the address. - If the country is US or Canada, then district is required and should use - the two-letter code for the subdivision. - maxLength: 16 - example: MA - postalCode: - type: string - description: Postal / ZIP code of the address. - maxLength: 16 - example: '01234' - ACHBankAccountType: - type: string - description: Retail account (individual consumer account) or Business account - (e.g. sole prop, LLC, corporation). - nullable: true - enum: - - retail - - business - SessionId: - description: 'Hash of the session identifier; typically of the end user. This - helps us make risk decisions and prevent fraud. IMPORTANT: Please hash the - session identifier to prevent sending us actual session identifiers. - - ' - type: string - maxLength: 50 - example: DE6FA86F60BB47B379307F851E238617 - IpAddress: - type: string - description: Single IPv4 or IPv6 address of user' - example: 244.28.239.130 - MetadataCardAndAch: + updateDate: + $ref: '#/components/schemas/UTCTimestamp' + MetadataPayment: type: object required: - email @@ -6836,184 +6522,303 @@ components: $ref: '#/components/schemas/SessionId' ipAddress: $ref: '#/components/schemas/IpAddress' - ACHCreationRequest: + Source: + type: object + properties: + id: + $ref: '#/components/schemas/Id' + type: + type: string + description: Type of the source. + enum: + - card + - ach + PaymentCreationRequest: + type: object + required: + - idempotencyKey + - amount + - verification + - source + - metadata + properties: + idempotencyKey: + $ref: '#/components/schemas/IdempotencyKey' + keyId: + $ref: '#/components/schemas/IdKey' + metadata: + $ref: '#/components/schemas/MetadataPayment' + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + autoCapture: + type: boolean + description: Triggers the automatic capture of the full payment amount. + If set to false the payment will only be authorized but not captured. + default: true + example: true + verification: + type: string + description: Indicates the verification method for this payment. + enum: + - none + - cvv + - three_d_secure + verificationSuccessUrl: + type: string + description: The URL to redirect users to after successful 3DS authentication. + format: url + example: https://www.example.com/3ds/verificationsuccessful + verificationFailureUrl: + type: string + description: The URL to redirect users to after failed 3DS authentication. + format: url + example: https://www.example.com/3ds/verificationfailure + source: + $ref: '#/components/schemas/Source' + description: + type: string + description: Description of the payment with length restriction of 240 characters. + example: Payment + encryptedData: + type: string + format: byte + description: 'PGP encrypted base64 encoded string. Contains CVV. + + * **CVV (Card Verification Number)**: Three or four digit security code. + Only required if `verification` is `cvv`. + + ' + example: UHVibGljS2V5QmFzZTY0RW5jb2RlZA== + channel: + $ref: '#/components/schemas/Channel' + ThreeDSResult: + type: string + description: Enumerated status of the check. `pass` indicates successful 3DS + authentication. `fail` indicates failed 3DS authentication. + enum: + - pass + - fail + Eci: + type: string + description: ECI (electronic commerce indicator) value returned by Directory + Servers (namely Visa, MasterCard, JCB, and American Express) indicating the + outcome of authentication attempted on transactions enforced by 3DS. + enum: + - '00' + - '01' + - '02' + - '05' + - '06' + - '07' + PaymentVerificationResponse: type: object + description: Indicates the status of the payment verification. This property + will be present once the payment is confirmed. required: - - idempotencyKey - - plaidProcessorToken - - billingDetails - - metadata + - avs + - cvv properties: - idempotencyKey: - $ref: '#/components/schemas/IdempotencyKey' - plaidProcessorToken: - type: string - description: The token for the ACH account provided by the processor (Plaid). - example: processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621 - billingDetails: - $ref: '#/components/schemas/ACHBillingDetails' - bankAccountType: - $ref: '#/components/schemas/ACHBankAccountType' - metadata: - $ref: '#/components/schemas/MetadataCardAndAch' - AccountNumberMasked: - type: string - description: The redacted account number of the ACH account. - example: '****6789' - RoutingNumber: - type: string - description: The routing number of the ACH account. - example: '613334455' - AchVerificationErrorCodes: + avs: + $ref: '#/components/schemas/AvsResults' + cvv: + $ref: '#/components/schemas/CvvResults' + threeDSecure: + $ref: '#/components/schemas/ThreeDSResult' + eci: + $ref: '#/components/schemas/Eci' + PaymentErrorCode: type: string - description: Indicates the failure reason of the ACH account. Only present on - failed accounts. Possible values are [bank_account_authorization_expired, - bank_account_error, bank_account_ineligible, bank_account_not_found, bank_account_unauthorized, - unsupported_routing_number, verification_failed]. + description: Indicates the failure reason of a payment. Only present for payments + in failed state. Possible values are [`payment_failed`, `payment_fraud_detected`, + `payment_denied`, `payment_not_supported_by_issuer`, `payment_not_funded`, + `payment_unprocessable`, `payment_stopped_by_issuer`, `payment_canceled`, + `payment_returned`, `payment_failed_balance_check`, `card_failed`, `card_invalid`, + `card_address_mismatch`, `card_zip_mismatch`, `card_cvv_invalid`, `card_expired`, + `card_limit_violated`, `card_not_honored`, `card_cvv_required`, `credit_card_not_allowed`, + `card_account_ineligible`, `card_network_unsupported`, `channel_invalid`, + `unauthorized_transaction`, `bank_account_ineligible`, `bank_transaction_error`, + `invalid_account_number`, `invalid_wire_rtn`, `invalid_ach_rtn`, `vendor_inactive`]' nullable: true enum: - - bank_account_authorization_expired - - bank_account_error + - payment_failed + - payment_fraud_detected + - payment_denied + - payment_not_supported_by_issuer + - payment_not_funded + - payment_unprocessable + - payment_stopped_by_issuer + - payment_canceled + - payment_returned + - payment_failed_balance_check + - card_failed + - card_invalid + - card_address_mismatch + - card_zip_mismatch + - card_cvv_invalid + - card_expired + - card_limit_violated + - card_not_honored + - card_cvv_required + - card_restricted, + - card_account_ineligible + - card_network_unsupported + - channel_invalid + - unauthorized_transaction - bank_account_ineligible - - bank_account_not_found - - bank_account_unauthorized - - unsupported_routing_number - - verification_failed - ACH: + - bank_transaction_error + - invalid_account_number + - invalid_wire_rtn + - invalid_ach_rtn + - ref_id_invalid + - account_name_mismatch + - account_number_mismatch + - account_ineligible + - wallet_address_mismatch + - customer_name_mismatch + - institution_name_mismatch + - vendor_inactive + DetailedPayment: type: object required: - id - - accountNumber - - routingNumber - - description - - billingDetails - - bankAddress - - fingerprint - - metadata - - createDate - - updateDate + - type + - merchantId + - amount + - source + - status properties: id: $ref: '#/components/schemas/Id' + type: + description: Type of the payment object. + type: string + enum: + - payment + merchantId: + $ref: '#/components/schemas/IdMerchant' + merchantWalletId: + $ref: '#/components/schemas/MerchantWalletId' + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + source: + $ref: '#/components/schemas/SourceResponse' + description: + type: string + description: Enumerated description of the payment. + enum: + - Payment status: - $ref: '#/components/schemas/ExternalFiatAccountStatus' - accountNumber: - $ref: '#/components/schemas/AccountNumberMasked' - routingNumber: - $ref: '#/components/schemas/RoutingNumber' - billingDetails: - $ref: '#/components/schemas/ACHBillingDetails' - bankAccountType: - $ref: '#/components/schemas/ACHBankAccountType' - bankAddress: - $ref: '#/components/schemas/BankAddress' - fingerprint: - $ref: '#/components/schemas/Fingerprint' + $ref: '#/components/schemas/PaymentStatus' + captured: + type: boolean + description: Determines if a payment has successfully been captured. This + property is only present for payments that did not use auto capture. + captureAmount: + $ref: '#/components/schemas/FiatMoneyUsd' + captureDate: + $ref: '#/components/schemas/UTCTimestamp' + requiredAction: + $ref: '#/components/schemas/RequiredAction' + verification: + $ref: '#/components/schemas/PaymentVerificationResponse' + cancel: + $ref: '#/components/schemas/FiatCancel' + refunds: + type: array + items: + $ref: '#/components/schemas/FiatRefund' + fees: + $ref: '#/components/schemas/FiatMoneyUsd' + trackingRef: + description: Payment tracking reference. Will be present once known. + type: string + nullable: true + example: '24910599141085313498894' errorCode: - $ref: '#/components/schemas/AchVerificationErrorCodes' + $ref: '#/components/schemas/PaymentErrorCode' + nullable: true + metadata: + $ref: '#/components/schemas/MetadataPhoneEmail' riskEvaluation: $ref: '#/components/schemas/RiskEvaluation' + channel: + $ref: '#/components/schemas/Channel' createDate: $ref: '#/components/schemas/UTCTimestamp' updateDate: $ref: '#/components/schemas/UTCTimestamp' - metadata: - $ref: '#/components/schemas/MetadataPhoneEmail' - MockAchAccount: - type: object - required: - - accountNumber - - routingNumber - - description - properties: - accountNumber: - type: string - description: The account number of the ACH account. - example: '123456789' - routingNumber: - type: string - description: 'The routing number of the ACH account. - - - For sandbox testing, valid routing numbers include `011000028`, `011201762`, - `011500120`, `021214862`, `121000248`, `121140399`, `211073473`, `221172610`, - and `011000138`. - - ' - example: 011000028 - description: - type: string - description: A description for the ACH account. - example: My ACH account - MockAchAccountCreationRequest: - type: object - required: - - account - - balance - properties: - account: - $ref: '#/components/schemas/MockAchAccount' - balance: - $ref: '#/components/schemas/FiatMoneyUsd' - MockAchAccountResponse: - type: object - properties: - processorToken: - type: string - description: The processor token needs to be provided when linking an ACH - account against this mock. - example: processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621 - balance: - $ref: '#/components/schemas/FiatMoneyUsd' - account: - $ref: '#/components/schemas/MockAchAccount' - SEPACreationRequest: - type: object - required: - - idempotencyKey - - accountName - - iban - - billingDetails - properties: - idempotencyKey: - $ref: '#/components/schemas/IdempotencyKey' - iban: - type: string - description: International Bank Account Number (IBAN) for the bank account. - example: DE31100400480532013000 - billingDetails: - $ref: '#/components/schemas/BillingDetails' - SEPA: + ExternalRef: + type: string + description: "External network identifier which will be present once provided\ + \ from the applicable network. \n\nExamples:\n* **Input/Output Message Accountability\ + \ Data (IMAD/OMAD)**: unique number given to each FedWire payment when using\ + \ the Federal Reserve Bank Service which can be used to investigate and track\ + \ wire transfers.\n" + example: YYYYMMDDXXXXXXXX012345 + FiatPaymentPolymorphic: type: object required: - id + - type + - merchantId + - amount + - source - status - - description - - trackingRef - - fingerprint - - billingDetails - - createDate - - updateDate properties: id: $ref: '#/components/schemas/Id' - status: - $ref: '#/components/schemas/ExternalFiatAccountStatus' + type: + description: Type of the payment object. + type: string + enum: + - payment + - refund + - cancel + merchantId: + $ref: '#/components/schemas/IdMerchant' + merchantWalletId: + $ref: '#/components/schemas/MerchantWalletId' + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + source: + $ref: '#/components/schemas/SourceResponse' description: + description: Enumerated description of the payment. type: string - description: Bank name plus last four digits of the IBAN. - example: Bank of Ireland ****0010 + enum: + - Payment + status: + $ref: '#/components/schemas/PaymentStatus' + requiredAction: + $ref: '#/components/schemas/RequiredAction' + verification: + $ref: '#/components/schemas/PaymentVerificationResponse' + originalPayment: + $ref: '#/components/schemas/FiatPayment' + cancel: + $ref: '#/components/schemas/FiatCancel' + refunds: + type: array + nullable: true + items: + $ref: '#/components/schemas/FiatRefund' + fees: + $ref: '#/components/schemas/FiatMoneyUsd' trackingRef: + description: Payment tracking reference. Will be present once known. type: string - description: Tracking reference that needs to be set in the payment details - or description. - example: CIR13FB13A - fingerprint: - $ref: '#/components/schemas/Fingerprint' + nullable: true + example: '24910599141085313498894' + externalRef: + $ref: '#/components/schemas/ExternalRef' + errorCode: + $ref: '#/components/schemas/PaymentErrorCode' + metadata: + $ref: '#/components/schemas/MetadataPhoneEmail' + channel: + $ref: '#/components/schemas/Channel' riskEvaluation: $ref: '#/components/schemas/RiskEvaluation' - billingDetails: - $ref: '#/components/schemas/BillingDetails' createDate: $ref: '#/components/schemas/UTCTimestamp' updateDate: @@ -7161,771 +6966,1057 @@ components: fees: $ref: '#/components/schemas/FiatMoneyUsd' trackingRef: - description: Payment tracking reference. Will be present once known. - type: string + description: Payment tracking reference. Will be present once known. + type: string + nullable: true + example: '24910599141085313498894' + errorCode: + $ref: '#/components/schemas/PaymentErrorCode' + metadata: + $ref: '#/components/schemas/MetadataPhoneEmail' + riskEvaluation: + $ref: '#/components/schemas/RiskEvaluation' + createDate: + $ref: '#/components/schemas/UTCTimestamp' + updateDate: + $ref: '#/components/schemas/UTCTimestamp' + PayoutStatus: + type: string + description: Status of the payout. Status `pending` indicates that the payout + is in process; `complete` indicates it finished successfully; `failed` indicates + it failed. + enum: + - pending + - complete + - failed + PayoutDestinationType: + type: string + description: The destination bank account type. + enum: + - wire + - ach + - sepa + BankDestination: + type: object + description: The destination bank account. + required: + - type + - id + properties: + type: + $ref: '#/components/schemas/PayoutDestinationType' + id: + $ref: '#/components/schemas/Id' + name: + type: string + description: Bank name plus last four digits of the bank account number + or IBAN. + readOnly: true + example: COMMERZBANK AG ****3000 + PayoutErrorCode: + type: string + nullable: true + description: Indicates the failure reason of a payout. Only present for payouts + in failed state. Possible values are [`insufficient_funds`, `transaction_denied`, + `transaction_failed`, `transaction_returned`, `bank_transaction_error`, `fiat_account_limit_exceeded`, + `invalid_bank_account_number`, `invalid_ach_rtn`, `invalid_wire_rtn`, `vendor_inactive`]' + enum: + - insufficient_funds + - transaction_denied + - transaction_failed + - transaction_returned + - bank_transaction_error + - fiat_account_limit_exceeded + - invalid_bank_account_number + - invalid_ach_rtn + - invalid_wire_rtn + - vendor_inactive + FinalAdjustments: + type: object + description: Final adjustment which increases (credits) or decreases (debits) + the total returned amount to the source wallet. + nullable: true + properties: + fxCredit: + $ref: '#/components/schemas/FiatMoneyUsd' + fxDebit: + $ref: '#/components/schemas/FiatMoneyUsd' + IdPayout: + type: string + description: Universally unique identifier (UUID v4) of the payout that is associated + with the return. + format: uuid + example: abdb500d-4a59-457c-801f-2d418c8703ac + UnwithdrawalObject: + type: object + description: Return information if the payout is returned by bank. Only present + if `errorCode` of payout is `transaction_returned`. + nullable: true + properties: + id: + $ref: '#/components/schemas/Id' + payoutId: + $ref: '#/components/schemas/IdPayout' + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + fees: + $ref: '#/components/schemas/FiatMoneyUsd' + reason: + type: string + description: Reason for the return. + example: payout_returned + status: + type: string + description: Status of the return. A `pending` status indicates that the + return is in process; `complete` indicates it finished successfully; `failed` + indicates it failed. + enum: + - pending + - complete + - failed + createDate: + $ref: '#/components/schemas/UTCTimestamp' + updateDate: + $ref: '#/components/schemas/UTCTimestamp' + PayoutBusinessAccount: + type: object + properties: + id: + $ref: '#/components/schemas/Id' + sourceWalletId: + type: string + description: The identifier of the source wallet used to fund a payout. + example: '53535335' + destination: + $ref: '#/components/schemas/BankDestination' + amount: + $ref: '#/components/schemas/FiatMoney' + fees: + $ref: '#/components/schemas/FiatMoneyUsd' + status: + $ref: '#/components/schemas/PayoutStatus' + trackingRef: + description: A payout tracking reference. Will be present once known. + nullable: true + example: CIR-6ESOQANEP3NAO + errorCode: + $ref: '#/components/schemas/PayoutErrorCode' + riskEvaluation: + $ref: '#/components/schemas/RiskEvaluation' + adjustments: + $ref: '#/components/schemas/FinalAdjustments' + return: + $ref: '#/components/schemas/UnwithdrawalObject' + createDate: + $ref: '#/components/schemas/UTCTimestamp' + updateDate: + $ref: '#/components/schemas/UTCTimestamp' + BusinessAccountDestinationRequest: + type: object + description: The destination bank account. + required: + - type + - id + properties: + type: + type: string + enum: + - wire + - sen + id: + $ref: '#/components/schemas/Id' + BusinessAccountPayoutCreationRequest: + type: object + required: + - idempotencyKey + - destination + - amount + properties: + idempotencyKey: + $ref: '#/components/schemas/IdempotencyKey' + destination: + $ref: '#/components/schemas/BusinessAccountDestinationRequest' + amount: + $ref: '#/components/schemas/FiatMoney' + Payout: + type: object + properties: + id: + $ref: '#/components/schemas/Id' + sourceWalletId: + type: string + description: The identifier of the source wallet used to fund a payout. + example: '53535335' + destination: + $ref: '#/components/schemas/BankDestination' + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + fees: + $ref: '#/components/schemas/FiatMoneyUsd' + status: + $ref: '#/components/schemas/PayoutStatus' + trackingRef: + description: A payout tracking reference. Will be present once known. nullable: true - example: '24910599141085313498894' + example: CIR-6ESOQANEP3NAO errorCode: - $ref: '#/components/schemas/PaymentErrorCode' - metadata: - $ref: '#/components/schemas/MetadataPhoneEmail' + $ref: '#/components/schemas/PayoutErrorCode' riskEvaluation: $ref: '#/components/schemas/RiskEvaluation' + adjustments: + $ref: '#/components/schemas/FinalAdjustments' + return: + $ref: '#/components/schemas/UnwithdrawalObject' createDate: $ref: '#/components/schemas/UTCTimestamp' updateDate: $ref: '#/components/schemas/UTCTimestamp' - MockWirePaymentBeneficiaryBankInstruction: + MetadataPayout: type: object + description: Additional properties related to the payout beneficiary. required: - - accountNumber + - beneficiaryEmail properties: - accountNumber: - type: string - description: Virtual account number or Circle corporate Silvergate Wire - account number that needs to be set as destination. - example: '11111111' - MockWirePaymentRequest: + beneficiaryEmail: + $ref: '#/components/schemas/Email' + PayoutCreationRequest: type: object required: - - trackingRef + - idempotencyKey + - destination - amount - - beneficiaryBank + - metadata properties: - trackingRef: - type: string - description: Wire tracking reference that needs to be set in the wire reference - to beneficiary field. This field is retrievable through the response during - wire creation or via the bank instruction endpoint. - example: CIR13FB13A + idempotencyKey: + $ref: '#/components/schemas/IdempotencyKey' + source: + $ref: '#/components/schemas/WalletLocation' + destination: + $ref: '#/components/schemas/BankDestination' amount: $ref: '#/components/schemas/FiatMoneyUsd' - beneficiaryBank: - $ref: '#/components/schemas/MockWirePaymentBeneficiaryBankInstruction' - MockWirePaymentResponse: + metadata: + $ref: '#/components/schemas/MetadataPayout' + DetailedPayout: type: object properties: - trackingRef: + id: + $ref: '#/components/schemas/Id' + sourceWalletId: + description: The identifier of the source wallet used to fund a payout. type: string - description: Wire tracking reference that needs to be set in the wire reference - to beneficiary field. This field is retrievable through the response during - wire creation or via the bank instruction endpoint. - example: CIR13FB13A + example: '53535335' + destination: + $ref: '#/components/schemas/BankDestination' amount: $ref: '#/components/schemas/FiatMoneyUsd' - beneficiaryBank: - $ref: '#/components/schemas/MockWirePaymentBeneficiaryBankInstruction' + fees: + $ref: '#/components/schemas/FiatMoneyUsd' status: + description: Status of the payout. Status `pending` indicates that the payout + is in process; `complete` indicates it finished successfully; `failed` + indicates it failed. type: string - description: Enumerated status of the wire payment. Status `pending` indicates - that the wire payment is in process; `processed` indicates it finished - successfully; `failed` indicates it failed. enum: - pending - - processed + - complete - failed - MockSepaPaymentRequest: - type: object - required: - - trackingRef - - amount - properties: trackingRef: - type: string - description: SEPA tracking reference that needs to be set in the payment - details or description. - example: CIR13FB13A - amount: - $ref: '#/components/schemas/FiatMoneyUsd' - MockSepaPaymentResponse: + description: A payout tracking reference. Will be present once known. + nullable: true + example: CIR-6ESOQANEP3NAO + externalRef: + $ref: '#/components/schemas/ExternalRef' + errorCode: + $ref: '#/components/schemas/PayoutErrorCode' + riskEvaluation: + $ref: '#/components/schemas/RiskEvaluation' + adjustments: + $ref: '#/components/schemas/FinalAdjustments' + return: + $ref: '#/components/schemas/UnwithdrawalObject' + createDate: + $ref: '#/components/schemas/UTCTimestamp' + updateDate: + $ref: '#/components/schemas/UTCTimestamp' + Settlement: type: object properties: - trackingRef: + id: + $ref: '#/components/schemas/Id' + merchantWalletId: + $ref: '#/components/schemas/MerchantWalletId' + walletId: + description: If this settlement was used for a marketplace payment, the + wallet involved in the settlement. Not included for standard merchant + settlements. type: string - description: SEPA tracking reference that needs to be set in the payment - details or description. - example: CIR13FB13A - amount: + example: '12345' + totalDebits: $ref: '#/components/schemas/FiatMoneyUsd' - status: - type: string - description: Enumerated status of the SEPA payment. Status `pending` indicates - that the SEPA payment is in process; `processed` indicates it finished - successfully; `failed` indicates it failed. - enum: - - pending - - processed - - failed - GenerateAddressRequest: - type: object - required: - - idempotencyKey - - currency - - chain - properties: - idempotencyKey: - $ref: '#/components/schemas/IdempotencyKey' - currency: - $ref: '#/components/schemas/Currency' - chain: - $ref: '#/components/schemas/Chain' - SimpleBillingDetails: + totalCredits: + $ref: '#/components/schemas/FiatMoneyUsd' + paymentFees: + $ref: '#/components/schemas/FiatMoneyUsd' + chargebackFees: + $ref: '#/components/schemas/FiatMoneyUsd' + createDate: + $ref: '#/components/schemas/UTCTimestamp' + updateDate: + $ref: '#/components/schemas/UTCTimestamp' + IdPayment: + type: string + description: Unique system generated identifier for the payment that is associated + to the chargeback item. + format: uuid + example: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + ChargebackCategories: + type: string + description: Enumerated category of the chargeback status codes based on the + chargeback status code. + enum: + - Canceled Recurring Payment + - Customer Dispute + - Fraudulent + - General + - Processing Error + - Not Defined + IdSettlement: + type: string + description: Unique system generated identifier for the settlement related to + the chargeback history. + format: uuid + nullable: true + example: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + BasicChargebackHistory: type: object - description: Billing details of the card holder. required: - - country - - district + - type + - chargebackAmount + - description properties: - country: + type: type: string - description: Country portion of the address. Formatted as a two-letter country - code specified in ISO 3166-1 alpha-2. - maxLength: 2 - example: US - district: + description: "Enumerated type of the chargeback history event. `1st Chargeback`\ + \ represents the first stage of the dispute procedure initiated by the\ + \ cardholder\u2019s issuing bank.\n `2nd Chargeback` represents the second\ + \ stage of the dispute procedure initiated by the cardholder\u2019s issuing\ + \ bank (This stage is MasterCard only).\n `Chargeback Reversal` represents\ + \ when 1st Chargeback or 2nd Chargeback is withdrawn by the issuer.\n\ + \ `Representment` represents the stage when merchants decided to dispute\ + \ 1st Chargeback or 2nd Chargeback.\n `Chargeback Settlement` can imply\ + \ one of the two: 1) If merchant or marketplace is taking the lost of\ + \ the chargeback, money will be debit from the wallet during this stage.\n\ + \ 2) If merchant of marketplace successfully dispute the chargeback,\ + \ money will be credit back to the wallet during this stage.\n" + enum: + - 1st Chargeback + - 2nd Chargeback + - Chargeback Reversal + - Representment + - Chargeback Settlement + chargebackAmount: + $ref: '#/components/schemas/FiatMoneyUsd' + fee: + $ref: '#/components/schemas/FiatMoneyUsd' + description: type: string - description: State / County / Province / Region portion of the address. - US and Canada use the two-letter code for the subdivision. - maxLength: 16 - example: MA - CardVerificationResponse: + description: The reason the chargeback was created. + example: The cardholder claims an unauthorized transaction occurred. + settlementId: + $ref: '#/components/schemas/IdSettlement' + createDate: + $ref: '#/components/schemas/UTCTimestamp' + BasicChargeback: type: object - description: Indicates the status of the card for verification purposes. required: - - avs - - cvv + - id + - paymentId + - merchantId + - history + - reasonCode properties: - avs: - $ref: '#/components/schemas/AvsResults' - cvv: - $ref: '#/components/schemas/CvvResults' - SimpleCard: + id: + $ref: '#/components/schemas/Id' + paymentId: + $ref: '#/components/schemas/IdPayment' + merchantId: + $ref: '#/components/schemas/IdMerchant' + reasonCode: + description: Reason code given by the card network for the chargeback item. + type: string + example: '10.4' + category: + $ref: '#/components/schemas/ChargebackCategories' + history: + type: array + description: 'The chargeback item''s history list will be sorted by create + date descending: more recent chargeback statuses will be at the beginning + of the list. + + ' + minItems: 1 + items: + $ref: '#/components/schemas/BasicChargebackHistory' + Reversal: type: object required: - id + - paymentId + - amount + - description - status - - fingerprint - - billingDetails - - expMonth - - expYear - - network - - verification + - reason + - fees - createDate - updateDate properties: id: - $ref: '#/components/schemas/Id' - status: - $ref: '#/components/schemas/ExternalFiatAccountStatus' - billingDetails: - $ref: '#/components/schemas/SimpleBillingDetails' - expMonth: - type: integer - description: Two digit number representing the card's expiration month. - example: 1 - expYear: - type: integer - description: Four digit number representing the card's expiration year. - example: 2020 - network: - type: string - description: The network of the card. - enum: - - VISA - - MASTERCARD - - AMEX - - UNKNOWN - bin: - type: string - description: The bank identification number (BIN), the first 6 digits of - the card. - example: '401230' - issuerCountry: + $ref: '#/components/schemas/IdKey' + paymentId: + $ref: '#/components/schemas/IdPayment' + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + description: type: string - description: The country code of the issuer bank. Follows the ISO 3166-1 - alpha-2 standard. - example: US - fingerprint: - $ref: '#/components/schemas/Fingerprint' - verification: - $ref: '#/components/schemas/CardVerificationResponse' - riskEvaluation: - $ref: '#/components/schemas/RiskEvaluation' + description: Enumerated description of the payment. + example: Merchant Payment Reversal + status: + $ref: '#/components/schemas/CancelRefundReversalStatus' + reason: + $ref: '#/components/schemas/ReversalReason' + fees: + $ref: '#/components/schemas/FiatMoneyUsd' createDate: $ref: '#/components/schemas/UTCTimestamp' updateDate: $ref: '#/components/schemas/UTCTimestamp' - IdKey: - type: string - description: Universally unique identifier (UUID v4) of the public key used - in encryption. NOTE the sandbox environment uses the default value of `key1`. - For this reason the example supplied is `key1` rather than a UUID. - format: uuid - example: key1 - CardExpMonth: - type: integer - description: Two digit number representing the card's expiration month. - minimum: 1 - maximum: 12 - example: 1 - CardExpYear: - type: integer - description: Four digit number representing the card's expiration year. - minimum: 1 - maximum: 9999 - example: 2020 - CardCreationRequest: + Wallet: + type: object + properties: + walletId: + type: string + description: Wallet identifier. Numeric value but should be treated as a + string as format may change in the future' + example: '434000' + entityId: + type: string + description: Universally unique identifier (UUID v4) of the entity that + owns the wallet. + example: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + type: + type: string + description: Wallet type. + enum: + - end_user_wallet + description: + type: string + description: A human-friendly, non-unique identifier for a wallet. + example: Treasury Wallet + maxLength: 255 + balances: + description: A list of balances for currencies owned by the wallet. + type: array + items: + $ref: '#/components/schemas/Money' + WalletCreationRequest: type: object required: - idempotencyKey - - expMonth - - expYear - - encryptedData - - billingDetails - - metadata properties: idempotencyKey: $ref: '#/components/schemas/IdempotencyKey' - keyId: - $ref: '#/components/schemas/IdKey' - encryptedData: + description: type: string - format: byte - description: 'PGP encrypted base64 encoded string. Contains Number and CVV. - - * **Number**: Card number. No spaces or other separators. REQUIRED - - * **CVV (Card Verification Number)**: Three or four digit security code. - REQUIRED'' - - ' - example: LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tCgp3Y0JNQTBYV1NGbEZScFZoQVFmL2J2bVVkNG5LZ3dkbExKVTlEdEFEK0p5c0VOTUxuOUlRUWVGWnZJUWEKMGgzQklpRFNRU0RMZmI0NEs2SXZMeTZRbm54bmFLcWx0MjNUSmtPd2hGWFIrdnNSMU5IbnVHN0lUNWJECmZzeVdleXlNK1JLNUVHV0thZ3NmQ2tWamh2NGloY29xUnlTTGtJbWVmRzVaR0tMRkJTTTBsTFNPWFRURQpiMy91eU1zMVJNb3ZiclNvbXkxa3BybzUveWxabWVtV2ZsU1pWQlhNcTc1dGc1YjVSRVIraXM5ckc0cS8KMXl0M0FOYXA3UDhKekFhZVlyTnVNZGhGZFhvK0NFMC9CQnN3L0NIZXdhTDk4SmRVUEV0NjA5WFRHTG9kCjZtamY0YUtMQ01xd0RFMkNVb3dPdE8vMzVIMitnVDZKS3FoMmtjQUQyaXFlb3luNWcralRHaFNyd3NKWgpIdEphQWVZZXpGQUVOaFo3Q01IOGNsdnhZVWNORnJuNXlMRXVGTkwwZkczZy95S3loclhxQ0o3UFo5b3UKMFVxQjkzQURKWDlJZjRBeVQ2bU9MZm9wUytpT2lLall4bG1NLzhlVWc3OGp1OVJ5T1BXelhyTzdLWTNHClFSWm8KPXc1dEYKLS0tLS1FTkQgUEdQIE1FU1NBR0UtLS0tLQo - billingDetails: - $ref: '#/components/schemas/BillingDetails' - expMonth: - $ref: '#/components/schemas/CardExpMonth' - expYear: - $ref: '#/components/schemas/CardExpYear' - metadata: - $ref: '#/components/schemas/MetadataCardAndAch' - VerificationErrorCode: - type: string - description: Indicates the failure reason of the card verification. Only present - on cards with failed verification. Possible values are [verification_failed, - verification_fraud_detected, verification_denied, verification_not_supported_by_issuer, - verification_stopped_by_issuer, card_failed, card_invalid, card_address_mismatch, - card_zip_mismatch, card_cvv_invalid, card_expired, card_limit_violated, card_not_honored, - card_cvv_required, credit_card_not_allowed, card_account_ineligible, card_network_unsupported]' - nullable: true - enum: - - verification_failed - - verification_fraud_detected - - verification_denied - - verification_not_supported_by_issuer - - verification_stopped_by_issuer - - card_failed - - card_invalid - - card_address_mismatch - - card_zip_mismatch - - card_cvv_invalid - - card_expired - - card_limit_violated - - card_not_honored - - card_cvv_required - - credit_card_not_allowed - - card_account_ineligible - - card_network_unsupported - Card: + description: A human-friendly, non-unique identifier for a wallet. + example: Treasury Wallet + maxLength: 255 + GenerateAddressRequest: type: object required: - - id - - status - - billingDetails - - expMonth - - expYear - - network - - last4 - - fingerprint - - verification - - metadata - - createDate - - updateDate + - idempotencyKey + - currency + - chain properties: - id: - $ref: '#/components/schemas/Id' - status: - $ref: '#/components/schemas/ExternalFiatAccountStatus' - billingDetails: - $ref: '#/components/schemas/BillingDetails' - expMonth: - $ref: '#/components/schemas/CardExpMonth' - expYear: - $ref: '#/components/schemas/CardExpYear' - network: + idempotencyKey: + $ref: '#/components/schemas/IdempotencyKey' + currency: + $ref: '#/components/schemas/Currency' + chain: + $ref: '#/components/schemas/Chain' + IdentityAddress: + type: object + required: + - line1 + - city + - district + - postalCode + - country + properties: + line1: type: string - description: The network of the card. - enum: - - VISA - - MASTERCARD - - AMEX - - UNKNOWN - last4: + description: Line one of the street address. + maxLength: 1024 + example: 100 Money Street + line2: type: string - description: The last 4 digits of the card. - example: '0123' - bin: + description: Line two of the street address. + maxLength: 1024 + example: Suite 1 + city: type: string - description: The bank identification number (BIN), the first 6 digits of - the card. - example: '401230' - issuerCountry: + description: City portion of the address. + maxLength: 1024 + example: Boston + district: + description: State / County / Province / Region portion of the address. + If the country is US or Canada, then district is required and should use + the two-letter code for the subdivision. + type: string + maxLength: 16 + example: MA + postalCode: + type: string + description: Postal / ZIP code of the address. + maxLength: 16 + example: '01234' + country: type: string - description: The country code of the issuer bank. Follows the ISO 3166-1 - alpha-2 standard. + description: Country portion of the address. Formatted as a two-letter country + code specified in ISO 3166-1 alpha-2. + maxLength: 2 example: US - fundingType: - description: The funding type of the card. Possible values are `credit`, - `debit`, `prepaid`, and `unknown`. - type: string - enum: - - credit - - debit - - prepaid - - unknown - fingerprint: - $ref: '#/components/schemas/Fingerprint' - errorCode: - $ref: '#/components/schemas/VerificationErrorCode' - verification: - $ref: '#/components/schemas/CardVerificationResponse' - riskEvaluation: - $ref: '#/components/schemas/RiskEvaluation' - metadata: - $ref: '#/components/schemas/MetadataPhoneEmail' - createDate: - $ref: '#/components/schemas/UTCTimestamp' - updateDate: - $ref: '#/components/schemas/UTCTimestamp' - CardUpdate: + Identity: type: object + description: "The identity of the originator. Identities are required when:\n\ + \ * `destination.type: \"blockchain\"`\n * `destination.chain: \"ETH\"`\n\ + \ * `amount.amount` >= $3,000 in value\n" required: - - keyId - - encryptedData - - expMonth - - expYear + - type + - name + - addresses properties: - keyId: - $ref: '#/components/schemas/IdKey' - encryptedData: + type: type: string - format: byte - description: 'PGP encrypted base64 encoded string. Contains CVV. + description: 'The type of identity for the originator. - * **CVV (Card Verification Number)**: Three or four digit security code. - REQUIRED'' + * `individual` - A uniquely distinguishable individual. + + * `business` - Any entity other than a natural person that can establish + a permanent customer relationship with an affected entity or otherwise + own property. This can include companies, foundations, anstalt, partnerships, + associations and other relevantly similar entities. ' - example: UHVibGljS2V5QmFzZTY0RW5jb2RlZA== - expMonth: - $ref: '#/components/schemas/CardExpMonth' - expYear: - $ref: '#/components/schemas/CardExpYear' - SEPAInstructionBeneficiary: - type: object - properties: + enum: + - individual + - business name: type: string - description: Name of the beneficiary. - example: CIRCLE INTERNET FINANCIAL INC - address1: + description: Full name of the identity. + example: Satoshi Nakamoto + maxLength: 1024 + addresses: + type: array + items: + $ref: '#/components/schemas/IdentityAddress' + TransferSourceWalletLocation: + description: A source wallet location. + type: object + required: + - type + - id + properties: + type: type: string - description: Address line 1 of the beneficiary's address. - example: 99 HIGH STREET - address2: + enum: + - wallet + id: type: string - description: Address line 2 of the beneficiary's address. - example: BOSTON MA 02110 - SEPAInstructionBeneficiaryBank: + description: The id of the wallet. + example: '12345' + identities: + type: array + items: + $ref: '#/components/schemas/Identity' + TransferSourceBlockchainLocation: + description: A source blockchain address. type: object + required: + - type + - chain properties: - name: - type: string - description: Name of the beneficiary's bank. - example: LHV Bank - bic: + type: type: string - description: BIC code of the beneficiary's bank account. - example: LHVBEE22XXX - iban: - description: IBAN of the beneficiary's bank account. + enum: + - blockchain + chain: + $ref: '#/components/schemas/Chain' + identities: + type: array + items: + $ref: '#/components/schemas/Identity' + TransferSourceLocation: + description: A source of funds. + oneOf: + - $ref: '#/components/schemas/TransferSourceWalletLocation' + - $ref: '#/components/schemas/TransferSourceBlockchainLocation' + discriminator: + propertyName: type + TransferDestinationBlockchainLocation: + description: A destination blockchain address. + type: object + required: + - type + - chain + - address + properties: + type: type: string - example: '****6789' + enum: + - blockchain address: - description: Address of the beneficiary's bank. - type: string - example: Tartu mnt 2, 10145 Tallinn - city: - description: City of the beneficiary's bank. + $ref: '#/components/schemas/Address' + addressTag: + $ref: '#/components/schemas/AddressTag' + chain: + $ref: '#/components/schemas/Chain' + TransferDestinationWalletLocation: + description: A destination wallet location. + type: object + required: + - type + - id + properties: + type: type: string - example: Tallinn - postalCode: - description: Postal code of the beneficiary's bank. + enum: + - wallet + id: type: string - example: '10017' - country: - description: Country code of the beneficiary's bank. Formatted as a two-letter - country code specified in ISO 3166-1 alpha-2. + description: The id of the wallet. + example: '12345' + address: type: string - example: EE - SEPAInstruction: + description: An alphanumeric string which indicates the wallet address used + to receive the transfer. Will only be set when the transfer source is + a blockchain address. + example: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: + $ref: '#/components/schemas/AddressTag' + TransferDestinationLocation: + description: A destination of funds. + oneOf: + - $ref: '#/components/schemas/TransferDestinationBlockchainLocation' + - $ref: '#/components/schemas/TransferDestinationWalletLocation' + discriminator: + propertyName: type + Fee: type: object + required: + - amount + - currency + - type properties: - trackingRef: + amount: type: string - description: Circle tracking reference that needs to be set in the SEPA - transfer reference field. - example: CIR13FB13A - beneficiary: - $ref: '#/components/schemas/SEPAInstructionBeneficiary' - beneficiaryBank: - $ref: '#/components/schemas/SEPAInstructionBeneficiaryBank' - Settlement: + description: Magnitude of the fee amount, in units of the currency, with + a `.`. + example: '10.00' + currency: + type: string + description: Currency code for the amount. + enum: + - USD + type: + type: string + description: Category of the fee. + enum: + - network + TransferErrorCode: + type: string + description: Indicates the failure reason of a transfer. Only present for transfers + in a `failed` state. Possible values are `insufficient_funds`, `blockchain_error` + and `transfer_denied` and `transfer_failed` + nullable: true + enum: + - transfer_failed + - transfer_denied + - blockchain_error + - insufficient_funds + Transfer: type: object + description: A transfer of funds. + required: + - id + - source + - destination + - amount + - status properties: id: $ref: '#/components/schemas/Id' - merchantWalletId: - $ref: '#/components/schemas/MerchantWalletId' - walletId: - description: If this settlement was used for a marketplace payment, the - wallet involved in the settlement. Not included for standard merchant - settlements. + source: + $ref: '#/components/schemas/TransferSourceLocation' + destination: + $ref: '#/components/schemas/TransferDestinationLocation' + amount: + $ref: '#/components/schemas/Money' + fees: + description: An array of fees applied to a transaction. This is only available + when there is at least one non-zero fee. + readOnly: true + type: array + items: + $ref: '#/components/schemas/Fee' + transactionHash: + description: A hash that uniquely identifies the onchain transaction. This + is only available where either source or destination are of type blockchain. type: string - example: '12345' - totalDebits: - $ref: '#/components/schemas/FiatMoneyUsd' - totalCredits: - $ref: '#/components/schemas/FiatMoneyUsd' - paymentFees: - $ref: '#/components/schemas/FiatMoneyUsd' - chargebackFees: - $ref: '#/components/schemas/FiatMoneyUsd' + example: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' + status: + description: Status of the transfer. Status `pending` indicates that the + transfer is in the process of running; `complete` indicates it finished + successfully; `failed` indicates it failed. + type: string + enum: + - pending + - complete + - failed + errorCode: + $ref: '#/components/schemas/TransferErrorCode' createDate: - $ref: '#/components/schemas/UTCTimestamp' - updateDate: - $ref: '#/components/schemas/UTCTimestamp' - IdPayment: - type: string - description: Unique system generated identifier for the payment that is associated - to the chargeback item. - format: uuid - example: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - ChargebackCategories: - type: string - description: Enumerated category of the chargeback status codes based on the - chargeback status code. - enum: - - Canceled Recurring Payment - - Customer Dispute - - Fraudulent - - General - - Processing Error - - Not Defined - IdSettlement: - type: string - description: Unique system generated identifier for the settlement related to - the chargeback history. - format: uuid - nullable: true - example: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - BasicChargebackHistory: + description: The create date of the transfer. + type: string + format: date-time + TransferRequestVerifiedBlockchainLocation: type: object required: - type - - chargebackAmount - - description + - addressId properties: type: type: string - description: "Enumerated type of the chargeback history event. `1st Chargeback`\ - \ represents the first stage of the dispute procedure initiated by the\ - \ cardholder\u2019s issuing bank.\n `2nd Chargeback` represents the second\ - \ stage of the dispute procedure initiated by the cardholder\u2019s issuing\ - \ bank (This stage is MasterCard only).\n `Chargeback Reversal` represents\ - \ when 1st Chargeback or 2nd Chargeback is withdrawn by the issuer.\n\ - \ `Representment` represents the stage when merchants decided to dispute\ - \ 1st Chargeback or 2nd Chargeback.\n `Chargeback Settlement` can imply\ - \ one of the two: 1) If merchant or marketplace is taking the lost of\ - \ the chargeback, money will be debit from the wallet during this stage.\n\ - \ 2) If merchant of marketplace successfully dispute the chargeback,\ - \ money will be credit back to the wallet during this stage.\n" enum: - - 1st Chargeback - - 2nd Chargeback - - Chargeback Reversal - - Representment - - Chargeback Settlement - chargebackAmount: - $ref: '#/components/schemas/FiatMoneyUsd' - fee: - $ref: '#/components/schemas/FiatMoneyUsd' - description: + - verified_blockchain + addressId: type: string - description: The reason the chargeback was created. - example: The cardholder claims an unauthorized transaction occurred. - settlementId: - $ref: '#/components/schemas/IdSettlement' - createDate: - $ref: '#/components/schemas/UTCTimestamp' - BasicChargeback: + description: The ID of the verified blockchain recipient address. + example: f1f36b85-cafe-484e-a46b-02340bfdb927 + format: uuid + BusinessAccountTransferCreationRequest: + type: object + required: + - idempotencyKey + - destination + - amount + properties: + idempotencyKey: + $ref: '#/components/schemas/IdempotencyKey' + destination: + $ref: '#/components/schemas/TransferRequestVerifiedBlockchainLocation' + amount: + $ref: '#/components/schemas/Money' + TransferRequestSourceWalletLocation: type: object required: + - type - id - - paymentId - - merchantId - - history - - reasonCode properties: + type: + type: string + enum: + - wallet id: - $ref: '#/components/schemas/Id' - paymentId: - $ref: '#/components/schemas/IdPayment' - merchantId: - $ref: '#/components/schemas/IdMerchant' - reasonCode: - description: Reason code given by the card network for the chargeback item. type: string - example: '10.4' - category: - $ref: '#/components/schemas/ChargebackCategories' - history: + description: The id of the wallet. + example: '12345' + identities: type: array - description: 'The chargeback item''s history list will be sorted by create - date descending: more recent chargeback statuses will be at the beginning - of the list. - - ' - minItems: 1 items: - $ref: '#/components/schemas/BasicChargebackHistory' - MockChargebackCreationRequest: + $ref: '#/components/schemas/Identity' + TransferRequestBlockchainLocation: type: object required: - - paymentId + - type + - address + - chain properties: - paymentId: + type: type: string - format: uuid - description: The id of the payment to be charged back. Each payment can - only be charged back once. - example: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - MockChargeback: + enum: + - blockchain + address: + type: string + description: The blockchain address. + example: '0x8381470ED67C3802402dbbFa0058E8871F017A6F' + addressTag: + $ref: '#/components/schemas/AddressTag' + chain: + $ref: '#/components/schemas/Chain' + TransferCreationRequest: type: object - properties: {} - Reversal: + required: + - idempotencyKey + - source + - destination + - amount + properties: + idempotencyKey: + $ref: '#/components/schemas/IdempotencyKey' + source: + $ref: '#/components/schemas/TransferRequestSourceWalletLocation' + destination: + oneOf: + - $ref: '#/components/schemas/TransferRequestBlockchainLocation' + - $ref: '#/components/schemas/WalletLocation' + amount: + $ref: '#/components/schemas/Money' + TransferDetailedTransfer: type: object + description: A transfer of funds. required: - id - - paymentId + - source + - destination - amount - - description - status - - reason - - fees - - createDate - - updateDate properties: id: - $ref: '#/components/schemas/IdKey' - paymentId: - $ref: '#/components/schemas/IdPayment' + $ref: '#/components/schemas/Id' + source: + $ref: '#/components/schemas/TransferSourceLocation' + destination: + $ref: '#/components/schemas/TransferDestinationLocation' amount: - $ref: '#/components/schemas/FiatMoneyUsd' - description: + $ref: '#/components/schemas/Money' + fees: + description: An array of fees applied to a transaction. This is only available + when there is at least one non-zero fee. + readOnly: true + type: array + items: + $ref: '#/components/schemas/Fee' + transactionHash: type: string - description: Enumerated description of the payment. - example: Merchant Payment Reversal + description: A hash that uniquely identifies the onchain transaction. This + is only available where either source or destination are of type blockchain. + example: '0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63' status: - $ref: '#/components/schemas/CancelRefundReversalStatus' - reason: - $ref: '#/components/schemas/ReversalReason' - fees: - $ref: '#/components/schemas/FiatMoneyUsd' + type: string + description: Status of the transfer. Status `pending` indicates that the + transfer is in the process of running; `complete` indicates it finished + successfully; `failed` indicates it failed. + enum: + - failed + - pending + - complete + errorCode: + $ref: '#/components/schemas/TransferErrorCode' + riskEvaluation: + $ref: '#/components/schemas/RiskEvaluation' createDate: $ref: '#/components/schemas/UTCTimestamp' - updateDate: - $ref: '#/components/schemas/UTCTimestamp' - Ping: + MockChargebackCreationRequest: type: object required: - - message + - paymentId properties: - message: + paymentId: type: string - example: pong - AccountConfiguration: + format: uuid + description: The id of the payment to be charged back. Each payment can + only be charged back once. + example: fc988ed5-c129-4f70-a064-e5beb7eb8e32 + MockChargeback: type: object - properties: - payments: - title: WalletConfig - type: object - properties: - masterWalletId: - $ref: '#/components/schemas/MerchantWalletId' - PublicKey: + properties: {} + MockSenPaymentBeneficiaryBankInstruction: + type: object + required: + - accountNumber + properties: + accountNumber: + type: string + description: Circle corporate Silvergate SEN account number that needs to + be set as destination. + example: '11111111' + MockSenPaymentRequest: type: object required: - - keyId - - publicKey + - trackingRef + - amount + - beneficiaryBank properties: - keyId: - $ref: '#/components/schemas/IdKey' - publicKey: + trackingRef: type: string - description: A PGP ascii-armor encoded public key. - example: LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEJDUEcgdjEuNTQKCm1RRU5CRjAxdmk0QkNBQ3JzMDNLS1Y0Qk9SRkYyT0Z4bUdvb0UyaTZMbnNneE5UL1dsV2s1ZTl2RDd2NENkSm0KcGJJbENmZ0U4WFlnYmhKUTE4YStaTzlPM0RFYUp2dGhJSEtjL0l1UEIvZmdEYUJUT285NkJzL2pVRFp6ZGxaVApQazNFUjliNFZPeGVwMFNPSHFMcmxTVFY4ZXB3M1R3SEdaL3NpSWdBYXEwRGdJdlZxUTY4TGVaMnorUFJWZm04CmhhSnJpb05SRU5Ja2ZNTWY5aFdySlowSW1zUk1aVmpDMVVrd2FSSHdrTTMwQUlia1dYcFJ5R205SXhQaXdGa08Kb1RnWlpwUFpsdVczckdkWER0NHZqL24za09hczV1dFdoNFovMlhjWHBiSUUyU0FPK0hycUdIclRnK1ZmZ05JNwpZcVZqYW5MOEN1bm83UkxmcDhKZlZDNXBLUm5ySVNCTnphN1ZBQkVCQUFHMEJrTnBjbU5zWllrQkhBUVFBUWtBCkJnVUNYVFcrTGdBS0NSQ3EzaHNwWjBMeGEwdnpCLzQvQTJpdk1CWW1aZXV2bEJZMm5ZZnNXek9Sb28vU3BIYkQKY2Y0UmtxZzZ0RERJSkUzNHhDVit0MzJydmJkM0ZOdVZseWs1MDVZRkpESnI4cVc2S0tkQVRXdU16eW5mMVVoUAo1M25hTlc0cXdrdSt3b0RWWjJpci9lUVI1WUc4L0RGcnd3bXdaa0dRd0Ftc3h5ZHd5anBnLzBrQ3lpZHkxdVBkCmVVWGgwdWt4dS9Dais4UFl5cHcwdit5V2tzbjdSZ2dVbkJFMWhiQ2pEV3FweHZjMEpDNVAxdmx6L2xRcWQrR3oKRC9Td1FJTVdRVElnV3BHRVVvQTRDc3drbU5PdHhsRVF1U0tueXNtTG02S0ExUmRhTzd6V2IrdWNLN21FZ2VoSwpXU2hHZExqRVNNZlVRUTczemNqMXg2amxLUFNhRlJyLzhXcHhrVXYzVHYvQzZMb0JpejRLCj1WSWg3Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K - SubscriptionDetail: + description: Circle tracking reference that needs to be set in the memo + filed. This field is retrievable through the response during SEN account + creation or via the bank instruction endpoint. + example: CIR13FB13A + amount: + $ref: '#/components/schemas/FiatMoney' + beneficiaryBank: + $ref: '#/components/schemas/MockSenPaymentBeneficiaryBankInstruction' + MockSenPaymentResponse: type: object properties: - url: + trackingRef: type: string - description: Identifier for created subscription. - example: arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17 + description: Wire tracking reference that needs to be set in the wire reference + to beneficiary field. This field is retrievable through the response during + wire creation or via the bank instruction endpoint. + example: CIR13FB13A + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + beneficiaryBank: + $ref: '#/components/schemas/MockSenPaymentBeneficiaryBankInstruction' status: type: string - description: Status of the subscription request. + description: Enumerated status of the wire payment. Status `pending` indicates + that the wire payment is in process; `processed` indicates it finished + successfully; `failed` indicates it failed. enum: - - confirmed - pending - - deleted - SubscriptionResponse: + - processed + - failed + MockAchAccount: type: object + required: + - accountNumber + - routingNumber + - description properties: - id: - $ref: '#/components/schemas/Id' - endpoint: + accountNumber: type: string - description: URL of the endpoint. - example: https://example.org/handler/for/notifications - subscriptionDetails: - type: array - description: List of subscriptions details for created subscriptions. - items: - $ref: '#/components/schemas/SubscriptionDetail' - SubscriptionRequest: + description: The account number of the ACH account. + example: '123456789' + routingNumber: + type: string + description: 'The routing number of the ACH account. + + + For sandbox testing, valid routing numbers include `011000028`, `011201762`, + `011500120`, `021214862`, `121000248`, `121140399`, `211073473`, `221172610`, + and `011000138`. + + ' + example: 011000028 + description: + type: string + description: A description for the ACH account. + example: My ACH account + MockAchAccountCreationRequest: type: object required: - - endpoint + - account + - balance properties: - endpoint: - type: string - description: URL of the subscriber endpoint. Must be publicly accessible - and utilize HTTPS. - example: https://example.org/handler/for/notifications - UnsubscribeResponse: - type: object - description: Unsubscribe response object. No fields as of now. - example: {} - ChannelResponse: + account: + $ref: '#/components/schemas/MockAchAccount' + balance: + $ref: '#/components/schemas/FiatMoneyUsd' + MockAchAccountResponse: type: object properties: - id: - $ref: '#/components/schemas/Id' - default: - type: boolean - description: Flag to indicate whether the channel is configured as default. - At most one of the channels will have this flag set to true and the default - channel is used when a payment request does not have the `channel` property - set. - example: true - cardDescriptor: - type: string - description: Descriptor that appears on cardholders' bank statements for - card payments submitted through this channel. - example: CIRCLE LLC. - achDescriptor: + processorToken: type: string - description: Descriptor that appears on end-users' bank statements for ACH - payments submitted through this channel. - example: CIRCLE LLC. - TokenAmount: + description: The processor token needs to be provided when linking an ACH + account against this mock. + example: processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621 + balance: + $ref: '#/components/schemas/FiatMoneyUsd' + account: + $ref: '#/components/schemas/MockAchAccount' + MockWirePaymentBeneficiaryBankInstruction: type: object required: - - amount - - chain + - accountNumber properties: - amount: + accountNumber: type: string - description: Magnitude of the amount, in units of the currency, with a `.`. - example: '132.584192' - chain: - $ref: '#/components/schemas/Chain' - Stablecoin: + description: Virtual account number or Circle corporate Silvergate Wire + account number that needs to be set as destination. + example: '11111111' + MockWirePaymentRequest: type: object + required: + - trackingRef + - amount + - beneficiaryBank properties: - name: - type: string - description: Name of the stablecoin. - example: USD Coin - symbol: - type: string - description: Symbol of the stablecoin. - example: USDC - totalAmount: + trackingRef: type: string - description: Total circulating amount of the stablecoin. - example: '132.584192' - chains: - type: array - description: A list of the broken down totalAmount by chain of the stablecoin. - items: - $ref: '#/components/schemas/TokenAmount' - Stablecoins: - type: array - description: A list of stablecoin objects containing its name, symbol, total - amount, and per-chain amount. - items: - $ref: '#/components/schemas/Stablecoin' - Wallet: + description: Wire tracking reference that needs to be set in the wire reference + to beneficiary field. This field is retrievable through the response during + wire creation or via the bank instruction endpoint. + example: CIR13FB13A + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + beneficiaryBank: + $ref: '#/components/schemas/MockWirePaymentBeneficiaryBankInstruction' + MockWirePaymentResponse: type: object properties: - walletId: - type: string - description: Wallet identifier. Numeric value but should be treated as a - string as format may change in the future' - example: '434000' - entityId: + trackingRef: type: string - description: Universally unique identifier (UUID v4) of the entity that - owns the wallet. - example: fc988ed5-c129-4f70-a064-e5beb7eb8e32 - type: + description: Wire tracking reference that needs to be set in the wire reference + to beneficiary field. This field is retrievable through the response during + wire creation or via the bank instruction endpoint. + example: CIR13FB13A + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + beneficiaryBank: + $ref: '#/components/schemas/MockWirePaymentBeneficiaryBankInstruction' + status: type: string - description: Wallet type. + description: Enumerated status of the wire payment. Status `pending` indicates + that the wire payment is in process; `processed` indicates it finished + successfully; `failed` indicates it failed. enum: - - end_user_wallet - description: - type: string - description: A human-friendly, non-unique identifier for a wallet. - example: Treasury Wallet - maxLength: 255 - balances: - description: A list of balances for currencies owned by the wallet. - type: array - items: - $ref: '#/components/schemas/Money' - WalletCreationRequest: + - pending + - processed + - failed + MockSepaPaymentRequest: type: object required: - - idempotencyKey + - trackingRef + - amount properties: - idempotencyKey: - $ref: '#/components/schemas/IdempotencyKey' - description: + trackingRef: type: string - description: A human-friendly, non-unique identifier for a wallet. - example: Treasury Wallet - maxLength: 255 + description: SEPA tracking reference that needs to be set in the payment + details or description. + example: CIR13FB13A + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + MockSepaPaymentResponse: + type: object + properties: + trackingRef: + type: string + description: SEPA tracking reference that needs to be set in the payment + details or description. + example: CIR13FB13A + amount: + $ref: '#/components/schemas/FiatMoneyUsd' + status: + type: string + description: Enumerated status of the SEPA payment. Status `pending` indicates + that the SEPA payment is in process; `processed` indicates it finished + successfully; `failed` indicates it failed. + enum: + - pending + - processed + - failed + headers: + XRequestId: + description: Universally unique identifier (UUID v4) for the request. Helpful + for identifying a request when communicating with Circle support. + schema: + type: string + format: uuid + example: 2adba88e-9d63-44bc-b975-9b6ae3440dde responses: NotAuthorized: description: The request has not been applied because it lacks valid authentication @@ -7984,8 +8075,8 @@ components: value: code: 400 message: Bad request. - NotFound: - description: The specified resource was not found. + LimitExceeded: + description: Limit exceeded. See error message for more details. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' @@ -7993,7 +8084,7 @@ components: application/json: schema: type: object - title: NotFound + title: LimitExceeded required: - code - message @@ -8005,16 +8096,15 @@ components: type: string example: Something went wrong. example: - code: 404 - message: Not found. + code: 429 + message: Too many requests. examples: response: value: - code: 404 - message: Not found. - Conflict: - description: The request has not been applied because it comes in conflict with - another request (such as re-using an idempotencyKey for a different request). + code: 429 + message: Too many requests. + NotFound: + description: The specified resource was not found. headers: X-Request-Id: $ref: '#/components/headers/XRequestId' @@ -8022,7 +8112,7 @@ components: application/json: schema: type: object - title: Conflict + title: NotFound required: - code - message @@ -8034,15 +8124,16 @@ components: type: string example: Something went wrong. example: - code: 409 - message: Conflicts with another request. + code: 404 + message: Not found. examples: response: value: - code: 409 - message: Conflicts with another request. - LimitExceeded: - description: Limit exceeded. See error message for more details. + code: 404 + message: Not found. + Conflict: + description: The request has not been applied because it comes in conflict with + another request (such as re-using an idempotencyKey for a different request). headers: X-Request-Id: $ref: '#/components/headers/XRequestId' @@ -8050,7 +8141,7 @@ components: application/json: schema: type: object - title: LimitExceeded + title: Conflict required: - code - message @@ -8062,10 +8153,215 @@ components: type: string example: Something went wrong. example: - code: 429 - message: Too many requests. + code: 409 + message: Conflicts with another request. examples: response: value: - code: 429 - message: Too many requests. + code: 409 + message: Conflicts with another request. + parameters: + IdPath: + name: id + description: Universally unique identifier (UUID v4) of a resource. + in: path + required: true + schema: + type: string + format: uuid + example: b3d9d2d5-4c12-4946-a09d-953e82fae2b0 + PageBefore: + name: pageBefore + description: 'A collection ID value used for pagination. + + + It marks the exclusive end of a page. When provided, the collection resource + will return the next `n` items before + + the id, with `n` being specified by `pageSize`. + + + The items will be returned in the natural order of the collection. + + + The resource will return the first page if neither `pageAfter` nor `pageBefore` + are specified. + + + SHOULD NOT be used in conjuction with pageAfter. + + ' + in: query + required: false + schema: + type: string + PageAfter: + name: pageAfter + description: 'A collection ID value used for pagination. + + + It marks the exclusive begin of a page. When provided, the collection resource + will return the next `n` items after + + the id, with `n` being specified by `pageSize`. + + + The items will be returned in the natural order of the collection. + + + The resource will return the first page if neither `pageAfter` nor `pageBefore` + are specified. + + + SHOULD NOT be used in conjuction with pageBefore. + + ' + in: query + required: false + schema: + type: string + PageSize: + name: pageSize + description: 'Limits the number of items to be returned. + + + Some collections have a strict upper bound that will disregard this value. + In case the specified value is higher + + than the allowed limit, the collection limit will be used. + + + If avoided, the collection will determine the page size itself. + + ' + in: query + required: false + schema: + type: integer + minimum: 1 + example: 5 + Currency: + name: currency + description: Queries beneficiary bank account currency. Default is USD. + in: query + required: false + schema: + type: string + enum: + - USD + - EUR + From: + name: from + description: Queries items created since the specified date-time (inclusive). + in: query + required: false + schema: + type: string + format: date-time + example: '2020-04-10T02:13:30.000Z' + To: + name: to + description: Queries items created before the specified date-time (inclusive). + in: query + required: false + schema: + type: string + format: date-time + example: '2020-04-10T02:13:30.000Z' + Source: + name: source + description: Universally unique identifier (UUID v4) for the source. Filters + results to fetch only payments made from the provdided source. + in: query + required: false + schema: + type: string + format: uuid + example: b3d9d2d5-4c12-4946-a09d-953e82fae2b0 + SettlementId: + name: settlementId + description: Queries items with the specified settlement id. Matches any settlement + id if unspecified. + in: query + required: false + schema: + type: string + format: uuid + example: b48c8962-8e9f-40c3-9f1d-d9adde2ffe61 + PaymentIntentId: + name: paymentIntentId + description: Queries items with the specified payment intent id. + in: query + required: false + schema: + type: string + format: uuid + example: b48c8962-8e9f-40c3-9f1d-d9adde2ffe61 + PaymentSourceType: + name: type + description: Source account type. Filters the results to fetch all payments + made from a specified account type. Matches any source type if unspecified. + in: query + required: false + schema: + type: array + items: + type: string + enum: + - card + - wire + - ach + - sepa + PaymentStatus: + name: status + description: Queries items with the specified status. Matches any status if + unspecified. + in: query + required: false + schema: + type: string + enum: + - pending + - confirmed + - paid + - failed + - action_required + destination: + name: destination + description: Universally unique identifier (UUID v4) for the destination bank + account. Filters the results to fetch all payouts made to a destination bank + account. + in: query + required: false + schema: + type: string + format: uuid + example: e3d0a838-d732-49d0-bf44-73a668e38973 + PaymentId: + name: paymentId + description: The payment ID associated with the chargeback. + in: query + required: false + schema: + type: string + format: uuid + example: 202ad9ce-974c-49ca-8d34-3afb7d7247ae + WalletId: + name: walletId + description: Identifier for the wallet. + in: path + required: true + schema: + type: string + example: 0123456789 + ReturnIdentities: + name: returnIdentities + description: Specify if you would like to see identities in the response. Restricts + maximum returned items to 5. By default returnIdentities is false, resulting + in the response not returning `data.source.identities`. + in: query + required: false + schema: + type: boolean + example: 'true' + default: false diff --git a/openapi/yaml/crypto-payments.yaml b/openapi/yaml/crypto-payments.yaml index 6b6df19..83828da 100644 --- a/openapi/yaml/crypto-payments.yaml +++ b/openapi/yaml/crypto-payments.yaml @@ -2,7 +2,7 @@ openapi: 3.0.2 servers: - url: api-sandbox.circle.com info: - version: 1.0.1 + version: 1.0.2 title: Crypto Payments API description: Crypto Payments collection Circle APIs. tags: diff --git a/openapi/yaml/general.yaml b/openapi/yaml/general.yaml index 87d1cde..f91fc59 100644 --- a/openapi/yaml/general.yaml +++ b/openapi/yaml/general.yaml @@ -2,7 +2,7 @@ openapi: 3.0.2 servers: - url: api-sandbox.circle.com info: - version: 1.0.1 + version: 1.0.2 title: API Overview description: Common endpoints shared across all Circle APIs. tags: @@ -44,7 +44,7 @@ paths: - bearerAuth: [] summary: Get configuration info description: Retrieves general configuration information. - operationId: getConfig + operationId: getAccountConfig tags: - Management responses: diff --git a/openapi/yaml/payments.yaml b/openapi/yaml/payments.yaml index d9bff24..0d7deb5 100644 --- a/openapi/yaml/payments.yaml +++ b/openapi/yaml/payments.yaml @@ -2,7 +2,7 @@ openapi: 3.0.2 servers: - url: api-sandbox.circle.com info: - version: 1.0.1 + version: 1.0.2 title: Payments API description: APIs for accepting payments. tags: @@ -881,7 +881,7 @@ paths: description: 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. - operationId: createWirePayment + operationId: createMockWirePayment tags: - Payments requestBody: @@ -925,7 +925,7 @@ paths: description: 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. - operationId: createSepaPayment + operationId: createMockSepaPayment tags: - Payments requestBody: @@ -1360,7 +1360,7 @@ paths: security: - bearerAuth: [] summary: Update a card - operationId: UpdateCard + operationId: updateCard tags: - Cards requestBody: @@ -1705,7 +1705,7 @@ paths: summary: Create a mock ACH bank account description: In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account. - operationId: createAchAccount + operationId: createMockACHBankAccount tags: - ACH requestBody: diff --git a/openapi/yaml/payouts.yaml b/openapi/yaml/payouts.yaml index f75e312..3e1b53b 100644 --- a/openapi/yaml/payouts.yaml +++ b/openapi/yaml/payouts.yaml @@ -2,7 +2,7 @@ openapi: 3.0.2 servers: - url: api-sandbox.circle.com info: - version: 1.0.1 + version: 1.0.2 title: Payouts API description: APIs for making payouts. tags: @@ -791,7 +791,7 @@ paths: summary: Create a mock ACH bank account description: In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account. - operationId: createAchAccount + operationId: createMockACHBankAccount tags: - ACH requestBody: