Pagarme API
The generated code uses the Newtonsoft Json.NET NuGet Package. If the automatic NuGet package restore
is enabled, these dependencies will be installed automatically. Therefore,
you will need internet access for build.
Open the solution (PagarmeCoreApi.sln) file.
Invoke the build process using Ctrl+Shift+B
shortcut key or using the Build
menu as shown below.
The build process generates a portable class library, which can be used like a normal class library. The generated library is compatible with Windows Forms, Windows RT, Windows Phone 8,
Silverlight 5, Xamarin iOS, Xamarin Android and Mono. More information on how to use can be found at the MSDN Portable Class Libraries documentation .
The following section explains how to use the PagarmeCoreApi library in a new console project.
1. Starting a new project
For starting a new project, right click on the current solution from the solution explorer and choose Add -> New Project
.
Next, choose "Console Application", provide a TestConsoleProject
as the project name and click OK
.
2. Set as startup project
The new console project is the entry point for the eventual execution. This requires us to set the TestConsoleProject
as the start-up project. To do this, right-click on the TestConsoleProject
and choose Set as StartUp Project
form the context menu.
3. Add reference of the library project
In order to use the PagarmeCoreApi library in the new project, first we must add a projet reference to the TestConsoleProject
. First, right click on the References
node in the solution explorer and click Add Reference...
.
Next, a window will be displayed where we must set the checkbox
on PagarmeCoreApi.Tests
and click OK
. By doing this, we have added a reference of the PagarmeCoreApi.Tests
project into the new TestConsoleProject
.
Once the TestConsoleProject
is created, a file named Program.cs
will be visible in the solution explorer with an empty Main
method. This is the entry point for the execution of the entire solution.
Here, you can add code to initialize the client library and acquire the instance of a Controller class. Sample code to initialize the client library and using controller methods is given in the subsequent sections.
The generated SDK also contain one or more Tests, which are contained in the Tests project.
In order to invoke these test cases, you will need NUnit 3.0 Test Adapter Extension for Visual Studio .
Once the SDK is complied, the test cases should appear in the Test Explorer window.
Here, you can click Run All to execute these test cases.
In order to setup authentication and initialization of the API client, you need the following information.
Parameter
Description
serviceRefererName
TODO: add a description
basicAuthUserName
The username to use with basic authentication
basicAuthPassword
The password to use with basic authentication
API client can be initialized as following.
// Configuration parameters and credentials
string serviceRefererName = " serviceRefererName" ;
string basicAuthUserName = " basicAuthUserName" ; // The username to use with basic authentication
string basicAuthPassword = " basicAuthPassword" ; // The password to use with basic authentication
PagarmeCoreApiClient client = new PagarmeCoreApiClient( serviceRefererName, basicAuthUserName, basicAuthPassword) ;
SubscriptionsController
The singleton instance of the SubscriptionsController
class can be accessed from the API Client.
ISubscriptionsController subscriptions = client. Subscriptions;
UpdateSubscriptionCard
Updates the credit card from a subscription
Task < PCL. Models. GetSubscriptionResponse> UpdateSubscriptionCard ( string subscriptionId , PCL. Models. UpdateSubscriptionCardRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription id
body
Required
Request for updating a card
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. UpdateSubscriptionCardRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. UpdateSubscriptionCard ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateAnUsage
Create Usage
Task < PCL. Models. GetUsageResponse> CreateAnUsage ( string subscriptionId , string itemId , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription id
itemId
Required
Item id
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
string itemId = " item_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetUsageResponse result = await subscriptions. CreateAnUsage ( subscriptionId, itemId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateSubscriptionPaymentMethod
Updates the payment method from a subscription
Task < PCL. Models. GetSubscriptionResponse> UpdateSubscriptionPaymentMethod ( string subscriptionId , PCL. Models. UpdateSubscriptionPaymentMethodRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription id
body
Required
Request for updating the paymentmethod from a subscription
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. UpdateSubscriptionPaymentMethodRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. UpdateSubscriptionPaymentMethod ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateSubscriptionItem
Creates a new Subscription item
Task < PCL. Models. GetSubscriptionItemResponse> CreateSubscriptionItem ( string subscriptionId , PCL. Models. CreateSubscriptionItemRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription id
body
Required
Request for creating a subscription item
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. CreateSubscriptionItemRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionItemResponse result = await subscriptions. CreateSubscriptionItem ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetSubscriptionItem
Get Subscription Item
Task < PCL. Models. GetSubscriptionItemResponse> GetSubscriptionItem ( string subscriptionId , string itemId )
Parameter
Tags
Description
subscriptionId
Required
Subscription Id
itemId
Required
Item id
string subscriptionId = " subscription_id" ;
string itemId = " item_id" ;
PCL. Models. GetSubscriptionItemResponse result = await subscriptions. GetSubscriptionItem ( subscriptionId, itemId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateSubscriptionAffiliationId
UpdateSubscriptionAffiliationId
Task < PCL. Models. GetSubscriptionResponse> UpdateSubscriptionAffiliationId ( string subscriptionId , PCL. Models. UpdateSubscriptionAffiliationIdRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
TODO: Add a parameter description
body
Required
Request for updating a subscription affiliation id
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. UpdateSubscriptionAffiliationIdRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. UpdateSubscriptionAffiliationId ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetIncrements
GetIncrements
Task < PCL. Models. ListIncrementsResponse> GetIncrements ( string subscriptionId , int ? page = null , int ? size = null )
Parameter
Tags
Description
subscriptionId
Required
The subscription id
page
Optional
Page number
size
Optional
Page size
string subscriptionId = " subscription_id" ;
int ? page = 156 ;
int ? size = 156 ;
PCL. Models. ListIncrementsResponse result = await subscriptions. GetIncrements ( subscriptionId, page, size) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateSubscriptionDueDays
Updates the boleto due days from a subscription
Task < PCL. Models. GetSubscriptionResponse> UpdateSubscriptionDueDays ( string subscriptionId , PCL. Models. UpdateSubscriptionDueDaysRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription Id
body
Required
TODO: Add a parameter description
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. UpdateSubscriptionDueDaysRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. UpdateSubscriptionDueDays ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateSubscriptionStartAt
Updates the start at date from a subscription
Task < PCL. Models. GetSubscriptionResponse> UpdateSubscriptionStartAt ( string subscriptionId , PCL. Models. UpdateSubscriptionStartAtRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
The subscription id
body
Required
Request for updating the subscription start date
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. UpdateSubscriptionStartAtRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. UpdateSubscriptionStartAt ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetSubscriptionCycleById
GetSubscriptionCycleById
Task < PCL. Models. GetPeriodResponse> GetSubscriptionCycleById ( string subscriptionId , string cycleId )
Parameter
Tags
Description
subscriptionId
Required
The subscription id
cycleId
Required
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
string cycleId = " cycleId" ;
PCL. Models. GetPeriodResponse result = await subscriptions. GetSubscriptionCycleById ( subscriptionId, cycleId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
DeleteDiscount
Deletes a discount
Task < PCL. Models. GetDiscountResponse> DeleteDiscount ( string subscriptionId , string discountId , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription id
discountId
Required
Discount Id
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
string discountId = " discount_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetDiscountResponse result = await subscriptions. DeleteDiscount ( subscriptionId, discountId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetSubscriptionItems
Get Subscription Items
Task < PCL. Models. ListSubscriptionItemsResponse> GetSubscriptionItems (
string subscriptionId ,
int ? page = null ,
int ? size = null ,
string name = null ,
string code = null ,
string status = null ,
string description = null ,
string createdSince = null ,
string createdUntil = null )
Parameter
Tags
Description
subscriptionId
Required
The subscription id
page
Optional
Page number
size
Optional
Page size
name
Optional
The item name
code
Optional
Identification code in the client system
status
Optional
The item statis
description
Optional
The item description
createdSince
Optional
Filter for item's creation date start range
createdUntil
Optional
Filter for item's creation date end range
string subscriptionId = " subscription_id" ;
int ? page = 156 ;
int ? size = 156 ;
string name = " name" ;
string code = " code" ;
string status = " status" ;
string description = " description" ;
string createdSince = " created_since" ;
string createdUntil = " created_until" ;
PCL. Models. ListSubscriptionItemsResponse result = await subscriptions. GetSubscriptionItems ( subscriptionId, page, size, name, code, status, description, createdSince, createdUntil) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateSubscriptionItem
Updates a subscription item
Task < PCL. Models. GetSubscriptionItemResponse> UpdateSubscriptionItem (
string subscriptionId ,
string itemId ,
PCL. Models. UpdateSubscriptionItemRequest body ,
string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription Id
itemId
Required
Item id
body
Required
Request for updating a subscription item
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
string itemId = " item_id" ;
var body = new PCL. Models. UpdateSubscriptionItemRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionItemResponse result = await subscriptions. UpdateSubscriptionItem ( subscriptionId, itemId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateSubscription
Creates a new subscription
Task < PCL. Models. GetSubscriptionResponse> CreateSubscription ( PCL. Models. CreateSubscriptionRequest body , string idempotencyKey = null )
Parameter
Tags
Description
body
Required
Request for creating a subscription
idempotencyKey
Optional
TODO: Add a parameter description
var body = new PCL. Models. CreateSubscriptionRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. CreateSubscription ( body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetDiscountById
GetDiscountById
Task < PCL. Models. GetDiscountResponse> GetDiscountById ( string subscriptionId , string discountId )
Parameter
Tags
Description
subscriptionId
Required
The subscription id
discountId
Required
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
string discountId = " discountId" ;
PCL. Models. GetDiscountResponse result = await subscriptions. GetDiscountById ( subscriptionId, discountId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateSubscriptionBillingDate
Updates the billing date from a subscription
Task < PCL. Models. GetSubscriptionResponse> UpdateSubscriptionBillingDate ( string subscriptionId , PCL. Models. UpdateSubscriptionBillingDateRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
The subscription id
body
Required
Request for updating the subscription billing date
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. UpdateSubscriptionBillingDateRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. UpdateSubscriptionBillingDate ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateLatestPeriodEndAt
UpdateLatestPeriodEndAt
Task < PCL. Models. GetSubscriptionResponse> UpdateLatestPeriodEndAt ( string subscriptionId , PCL. Models. UpdateCurrentCycleEndDateRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
TODO: Add a parameter description
body
Required
Request for updating the end date of the current signature cycle
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. UpdateCurrentCycleEndDateRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. UpdateLatestPeriodEndAt ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateDiscount
Creates a discount
Task < PCL. Models. GetDiscountResponse> CreateDiscount ( string subscriptionId , PCL. Models. CreateDiscountRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription id
body
Required
Request for creating a discount
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. CreateDiscountRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetDiscountResponse result = await subscriptions. CreateDiscount ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
DeleteUsage
Deletes a usage
Task < PCL. Models. GetUsageResponse> DeleteUsage (
string subscriptionId ,
string itemId ,
string usageId ,
string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
The subscription id
itemId
Required
The subscription item id
usageId
Required
The usage id
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
string itemId = " item_id" ;
string usageId = " usage_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetUsageResponse result = await subscriptions. DeleteUsage ( subscriptionId, itemId, usageId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetUsages
Lists all usages from a subscription item
Task < PCL. Models. ListUsagesResponse> GetUsages (
string subscriptionId ,
string itemId ,
int ? page = null ,
int ? size = null ,
string code = null ,
string mgroup = null ,
DateTime? usedSince = null ,
DateTime? usedUntil = null )
Parameter
Tags
Description
subscriptionId
Required
The subscription id
itemId
Required
The subscription item id
page
Optional
Page number
size
Optional
Page size
code
Optional
Identification code in the client system
mgroup
Optional
Identification group in the client system
usedSince
Optional
TODO: Add a parameter description
usedUntil
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
string itemId = " item_id" ;
int ? page = 156 ;
int ? size = 156 ;
string code = " code" ;
string mgroup = " group" ;
DateTime? usedSince = DateTime. Now ( ) ;
DateTime? usedUntil = DateTime. Now ( ) ;
PCL. Models. ListUsagesResponse result = await subscriptions. GetUsages ( subscriptionId, itemId, page, size, code, mgroup, usedSince, usedUntil) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateCurrentCycleStatus
UpdateCurrentCycleStatus
Task UpdateCurrentCycleStatus ( string subscriptionId , PCL. Models. UpdateCurrentCycleStatusRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription Id
body
Required
Request for updating the end date of the subscription current status
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. UpdateCurrentCycleStatusRequest( ) ;
string idempotencyKey = " idempotency-key" ;
await subscriptions. UpdateCurrentCycleStatus ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CancelSubscription
Cancels a subscription
Task < PCL. Models. GetSubscriptionResponse> CancelSubscription ( string subscriptionId , string idempotencyKey = null , PCL. Models. CreateCancelSubscriptionRequest body = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription id
idempotencyKey
Optional
TODO: Add a parameter description
body
Optional
Request for cancelling a subscription
string subscriptionId = " subscription_id" ;
string idempotencyKey = " idempotency-key" ;
var body = new PCL. Models. CreateCancelSubscriptionRequest( ) ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. CancelSubscription ( subscriptionId, idempotencyKey, body) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateIncrement
Creates a increment
Task < PCL. Models. GetIncrementResponse> CreateIncrement ( string subscriptionId , PCL. Models. CreateIncrementRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription id
body
Required
Request for creating a increment
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. CreateIncrementRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetIncrementResponse result = await subscriptions. CreateIncrement ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateSubscriptionMetadata
Updates the metadata from a subscription
Task < PCL. Models. GetSubscriptionResponse> UpdateSubscriptionMetadata ( string subscriptionId , PCL. Models. UpdateMetadataRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
The subscription id
body
Required
Request for updating the subscrption metadata
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. UpdateMetadataRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. UpdateSubscriptionMetadata ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetDiscounts
GetDiscounts
Task < PCL. Models. ListDiscountsResponse> GetDiscounts ( string subscriptionId , int page , int size )
Parameter
Tags
Description
subscriptionId
Required
The subscription id
page
Required
Page number
size
Required
Page size
string subscriptionId = " subscription_id" ;
int page = 156 ;
int size = 156 ;
PCL. Models. ListDiscountsResponse result = await subscriptions. GetDiscounts ( subscriptionId, page, size) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateSubscriptionMiniumPrice
Atualização do valor mĂnimo da assinatura
Task < PCL. Models. GetSubscriptionResponse> UpdateSubscriptionMiniumPrice ( string subscriptionId , PCL. Models. UpdateSubscriptionMinimumPriceRequest body , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription Id
body
Required
Request da requisição com o valor mĂnimo que será configurado
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
var body = new PCL. Models. UpdateSubscriptionMinimumPriceRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. UpdateSubscriptionMiniumPrice ( subscriptionId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateSplitSubscription
UpdateSplitSubscription
Task < PCL. Models. GetSubscriptionResponse> UpdateSplitSubscription ( string id , PCL. Models. UpdateSubscriptionSplitRequest body )
Parameter
Tags
Description
id
Required
Subscription's id
body
Required
TODO: Add a parameter description
string id = " id" ;
var body = new PCL. Models. UpdateSubscriptionSplitRequest( ) ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. UpdateSplitSubscription ( id, body) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetSubscriptions
Gets all subscriptions
Task < PCL. Models. ListSubscriptionsResponse> GetSubscriptions (
int ? page = null ,
int ? size = null ,
string code = null ,
string billingType = null ,
string customerId = null ,
string planId = null ,
string cardId = null ,
string status = null ,
DateTime? nextBillingSince = null ,
DateTime? nextBillingUntil = null ,
DateTime? createdSince = null ,
DateTime? createdUntil = null )
Parameter
Tags
Description
page
Optional
Page number
size
Optional
Page size
code
Optional
Filter for subscription's code
billingType
Optional
Filter for subscription's billing type
customerId
Optional
Filter for subscription's customer id
planId
Optional
Filter for subscription's plan id
cardId
Optional
Filter for subscription's card id
status
Optional
Filter for subscription's status
nextBillingSince
Optional
Filter for subscription's next billing date start range
nextBillingUntil
Optional
Filter for subscription's next billing date end range
createdSince
Optional
Filter for subscription's creation date start range
createdUntil
Optional
Filter for subscriptions creation date end range
int ? page = 156 ;
int ? size = 156 ;
string code = " code" ;
string billingType = " billing_type" ;
string customerId = " customer_id" ;
string planId = " plan_id" ;
string cardId = " card_id" ;
string status = " status" ;
DateTime? nextBillingSince = DateTime. Now ( ) ;
DateTime? nextBillingUntil = DateTime. Now ( ) ;
DateTime? createdSince = DateTime. Now ( ) ;
DateTime? createdUntil = DateTime. Now ( ) ;
PCL. Models. ListSubscriptionsResponse result = await subscriptions. GetSubscriptions ( page, size, code, billingType, customerId, planId, cardId, status, nextBillingSince, nextBillingUntil, createdSince, createdUntil) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetSubscription
Gets a subscription
Task < PCL. Models. GetSubscriptionResponse> GetSubscription ( string subscriptionId )
Parameter
Tags
Description
subscriptionId
Required
Subscription id
string subscriptionId = " subscription_id" ;
PCL. Models. GetSubscriptionResponse result = await subscriptions. GetSubscription ( subscriptionId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
DeleteIncrement
Deletes a increment
Task < PCL. Models. GetIncrementResponse> DeleteIncrement ( string subscriptionId , string incrementId , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription id
incrementId
Required
Increment id
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
string incrementId = " increment_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetIncrementResponse result = await subscriptions. DeleteIncrement ( subscriptionId, incrementId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetIncrementById
GetIncrementById
Task < PCL. Models. GetIncrementResponse> GetIncrementById ( string subscriptionId , string incrementId )
Parameter
Tags
Description
subscriptionId
Required
The subscription Id
incrementId
Required
The increment Id
string subscriptionId = " subscription_id" ;
string incrementId = " increment_id" ;
PCL. Models. GetIncrementResponse result = await subscriptions. GetIncrementById ( subscriptionId, incrementId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetSubscriptionCycles
GetSubscriptionCycles
Task < PCL. Models. ListCyclesResponse> GetSubscriptionCycles ( string subscriptionId , string page , string size )
Parameter
Tags
Description
subscriptionId
Required
Subscription Id
page
Required
Page number
size
Required
Page size
string subscriptionId = " subscription_id" ;
string page = " page" ;
string size = " size" ;
PCL. Models. ListCyclesResponse result = await subscriptions. GetSubscriptionCycles ( subscriptionId, page, size) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
RenewSubscription
RenewSubscription
Task < PCL. Models. GetPeriodResponse> RenewSubscription ( string subscriptionId , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
TODO: Add a parameter description
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetPeriodResponse result = await subscriptions. RenewSubscription ( subscriptionId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
DeleteSubscriptionItem
Deletes a subscription item
Task < PCL. Models. GetSubscriptionItemResponse> DeleteSubscriptionItem ( string subscriptionId , string subscriptionItemId , string idempotencyKey = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription id
subscriptionItemId
Required
Subscription item id
idempotencyKey
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
string subscriptionItemId = " subscription_item_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetSubscriptionItemResponse result = await subscriptions. DeleteSubscriptionItem ( subscriptionId, subscriptionItemId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetUsageReport
GetUsageReport
Task < PCL. Models. GetUsageReportResponse> GetUsageReport ( string subscriptionId , string periodId )
Parameter
Tags
Description
subscriptionId
Required
The subscription Id
periodId
Required
The period Id
string subscriptionId = " subscription_id" ;
string periodId = " period_id" ;
PCL. Models. GetUsageReportResponse result = await subscriptions. GetUsageReport ( subscriptionId, periodId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
Back to List of Controllers
OrdersController
The singleton instance of the OrdersController
class can be accessed from the API Client.
IOrdersController orders = client. Orders;
GetOrders
Gets all orders
Task < PCL. Models. ListOrderResponse> GetOrders (
int ? page = null ,
int ? size = null ,
string code = null ,
string status = null ,
DateTime? createdSince = null ,
DateTime? createdUntil = null ,
string customerId = null )
Parameter
Tags
Description
page
Optional
Page number
size
Optional
Page size
code
Optional
Filter for order's code
status
Optional
Filter for order's status
createdSince
Optional
Filter for order's creation date start range
createdUntil
Optional
Filter for order's creation date end range
customerId
Optional
Filter for order's customer id
int ? page = 156 ;
int ? size = 156 ;
string code = " code" ;
string status = " status" ;
DateTime? createdSince = DateTime. Now ( ) ;
DateTime? createdUntil = DateTime. Now ( ) ;
string customerId = " customer_id" ;
PCL. Models. ListOrderResponse result = await orders. GetOrders ( page, size, code, status, createdSince, createdUntil, customerId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateOrder
Creates a new Order
Task < PCL. Models. GetOrderResponse> CreateOrder ( PCL. Models. CreateOrderRequest body , string idempotencyKey = null )
Parameter
Tags
Description
body
Required
Request for creating an order
idempotencyKey
Optional
TODO: Add a parameter description
var body = new PCL. Models. CreateOrderRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetOrderResponse result = await orders. CreateOrder ( body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateOrderItem
CreateOrderItem
Task < PCL. Models. GetOrderItemResponse> CreateOrderItem ( string orderId , PCL. Models. CreateOrderItemRequest body , string idempotencyKey = null )
Parameter
Tags
Description
orderId
Required
Order Id
body
Required
Order Item Model
idempotencyKey
Optional
TODO: Add a parameter description
string orderId = " orderId" ;
var body = new PCL. Models. CreateOrderItemRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetOrderItemResponse result = await orders. CreateOrderItem ( orderId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetOrderItem
GetOrderItem
Task < PCL. Models. GetOrderItemResponse> GetOrderItem ( string orderId , string itemId )
Parameter
Tags
Description
orderId
Required
Order Id
itemId
Required
Item Id
string orderId = " orderId" ;
string itemId = " itemId" ;
PCL. Models. GetOrderItemResponse result = await orders. GetOrderItem ( orderId, itemId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
DeleteOrderItem
DeleteOrderItem
Task < PCL. Models. GetOrderItemResponse> DeleteOrderItem ( string orderId , string itemId , string idempotencyKey = null )
Parameter
Tags
Description
orderId
Required
Order Id
itemId
Required
Item Id
idempotencyKey
Optional
TODO: Add a parameter description
string orderId = " orderId" ;
string itemId = " itemId" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetOrderItemResponse result = await orders. DeleteOrderItem ( orderId, itemId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateOrderMetadata
Updates the metadata from an order
Task < PCL. Models. GetOrderResponse> UpdateOrderMetadata ( string orderId , PCL. Models. UpdateMetadataRequest body , string idempotencyKey = null )
Parameter
Tags
Description
orderId
Required
The order id
body
Required
Request for updating the order metadata
idempotencyKey
Optional
TODO: Add a parameter description
string orderId = " order_id" ;
var body = new PCL. Models. UpdateMetadataRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetOrderResponse result = await orders. UpdateOrderMetadata ( orderId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
DeleteAllOrderItems
DeleteAllOrderItems
Task < PCL. Models. GetOrderResponse> DeleteAllOrderItems ( string orderId , string idempotencyKey = null )
Parameter
Tags
Description
orderId
Required
Order Id
idempotencyKey
Optional
TODO: Add a parameter description
string orderId = " orderId" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetOrderResponse result = await orders. DeleteAllOrderItems ( orderId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateOrderItem
UpdateOrderItem
Task < PCL. Models. GetOrderItemResponse> UpdateOrderItem (
string orderId ,
string itemId ,
PCL. Models. UpdateOrderItemRequest body ,
string idempotencyKey = null )
Parameter
Tags
Description
orderId
Required
Order Id
itemId
Required
Item Id
body
Required
Item Model
idempotencyKey
Optional
TODO: Add a parameter description
string orderId = " orderId" ;
string itemId = " itemId" ;
var body = new PCL. Models. UpdateOrderItemRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetOrderItemResponse result = await orders. UpdateOrderItem ( orderId, itemId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CloseOrder
CloseOrder
Task < PCL. Models. GetOrderResponse> CloseOrder ( string id , PCL. Models. UpdateOrderStatusRequest body , string idempotencyKey = null )
Parameter
Tags
Description
id
Required
Order Id
body
Required
Update Order Model
idempotencyKey
Optional
TODO: Add a parameter description
string id = " id" ;
var body = new PCL. Models. UpdateOrderStatusRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetOrderResponse result = await orders. CloseOrder ( id, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetOrder
Gets an order
Task < PCL. Models. GetOrderResponse> GetOrder ( string orderId )
Parameter
Tags
Description
orderId
Required
Order id
string orderId = " order_id" ;
PCL. Models. GetOrderResponse result = await orders. GetOrder ( orderId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
Back to List of Controllers
PlansController
The singleton instance of the PlansController
class can be accessed from the API Client.
IPlansController plans = client. Plans;
GetPlan
Gets a plan
Task < PCL. Models. GetPlanResponse> GetPlan ( string planId )
Parameter
Tags
Description
planId
Required
Plan id
string planId = " plan_id" ;
PCL. Models. GetPlanResponse result = await plans. GetPlan ( planId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreatePlan
Creates a new plan
Task < PCL. Models. GetPlanResponse> CreatePlan ( PCL. Models. CreatePlanRequest body , string idempotencyKey = null )
Parameter
Tags
Description
body
Required
Request for creating a plan
idempotencyKey
Optional
TODO: Add a parameter description
var body = new PCL. Models. CreatePlanRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetPlanResponse result = await plans. CreatePlan ( body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdatePlan
Updates a plan
Task < PCL. Models. GetPlanResponse> UpdatePlan ( string planId , PCL. Models. UpdatePlanRequest body , string idempotencyKey = null )
Parameter
Tags
Description
planId
Required
Plan id
body
Required
Request for updating a plan
idempotencyKey
Optional
TODO: Add a parameter description
string planId = " plan_id" ;
var body = new PCL. Models. UpdatePlanRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetPlanResponse result = await plans. UpdatePlan ( planId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetPlanItem
Gets a plan item
Task < PCL. Models. GetPlanItemResponse> GetPlanItem ( string planId , string planItemId )
Parameter
Tags
Description
planId
Required
Plan id
planItemId
Required
Plan item id
string planId = " plan_id" ;
string planItemId = " plan_item_id" ;
PCL. Models. GetPlanItemResponse result = await plans. GetPlanItem ( planId, planItemId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreatePlanItem
Adds a new item to a plan
Task < PCL. Models. GetPlanItemResponse> CreatePlanItem ( string planId , PCL. Models. CreatePlanItemRequest body , string idempotencyKey = null )
Parameter
Tags
Description
planId
Required
Plan id
body
Required
Request for creating a plan item
idempotencyKey
Optional
TODO: Add a parameter description
string planId = " plan_id" ;
var body = new PCL. Models. CreatePlanItemRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetPlanItemResponse result = await plans. CreatePlanItem ( planId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetPlans
Gets all plans
Task < PCL. Models. ListPlansResponse> GetPlans (
int ? page = null ,
int ? size = null ,
string name = null ,
string status = null ,
string billingType = null ,
DateTime? createdSince = null ,
DateTime? createdUntil = null )
Parameter
Tags
Description
page
Optional
Page number
size
Optional
Page size
name
Optional
Filter for Plan's name
status
Optional
Filter for Plan's status
billingType
Optional
Filter for plan's billing type
createdSince
Optional
Filter for plan's creation date start range
createdUntil
Optional
Filter for plan's creation date end range
int ? page = 197 ;
int ? size = 197 ;
string name = " name" ;
string status = " status" ;
string billingType = " billing_type" ;
DateTime? createdSince = DateTime. Now ( ) ;
DateTime? createdUntil = DateTime. Now ( ) ;
PCL. Models. ListPlansResponse result = await plans. GetPlans ( page, size, name, status, billingType, createdSince, createdUntil) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
DeletePlan
Deletes a plan
Task < PCL. Models. GetPlanResponse> DeletePlan ( string planId , string idempotencyKey = null )
Parameter
Tags
Description
planId
Required
Plan id
idempotencyKey
Optional
TODO: Add a parameter description
string planId = " plan_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetPlanResponse result = await plans. DeletePlan ( planId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdatePlanMetadata
Updates the metadata from a plan
Task < PCL. Models. GetPlanResponse> UpdatePlanMetadata ( string planId , PCL. Models. UpdateMetadataRequest body , string idempotencyKey = null )
Parameter
Tags
Description
planId
Required
The plan id
body
Required
Request for updating the plan metadata
idempotencyKey
Optional
TODO: Add a parameter description
string planId = " plan_id" ;
var body = new PCL. Models. UpdateMetadataRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetPlanResponse result = await plans. UpdatePlanMetadata ( planId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdatePlanItem
Updates a plan item
Task < PCL. Models. GetPlanItemResponse> UpdatePlanItem (
string planId ,
string planItemId ,
PCL. Models. UpdatePlanItemRequest body ,
string idempotencyKey = null )
Parameter
Tags
Description
planId
Required
Plan id
planItemId
Required
Plan item id
body
Required
Request for updating the plan item
idempotencyKey
Optional
TODO: Add a parameter description
string planId = " plan_id" ;
string planItemId = " plan_item_id" ;
var body = new PCL. Models. UpdatePlanItemRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetPlanItemResponse result = await plans. UpdatePlanItem ( planId, planItemId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
DeletePlanItem
Removes an item from a plan
Task < PCL. Models. GetPlanItemResponse> DeletePlanItem ( string planId , string planItemId , string idempotencyKey = null )
Parameter
Tags
Description
planId
Required
Plan id
planItemId
Required
Plan item id
idempotencyKey
Optional
TODO: Add a parameter description
string planId = " plan_id" ;
string planItemId = " plan_item_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetPlanItemResponse result = await plans. DeletePlanItem ( planId, planItemId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
Back to List of Controllers
InvoicesController
The singleton instance of the InvoicesController
class can be accessed from the API Client.
IInvoicesController invoices = client. Invoices;
CancelInvoice
Cancels an invoice
Task < PCL. Models. GetInvoiceResponse> CancelInvoice ( string invoiceId , string idempotencyKey = null )
Parameter
Tags
Description
invoiceId
Required
Invoice id
idempotencyKey
Optional
TODO: Add a parameter description
string invoiceId = " invoice_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetInvoiceResponse result = await invoices. CancelInvoice ( invoiceId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetInvoice
Gets an invoice
Task < PCL. Models. GetInvoiceResponse> GetInvoice ( string invoiceId )
Parameter
Tags
Description
invoiceId
Required
Invoice Id
string invoiceId = " invoice_id" ;
PCL. Models. GetInvoiceResponse result = await invoices. GetInvoice ( invoiceId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateInvoice
Create an Invoice
Task < PCL. Models. GetInvoiceResponse> CreateInvoice (
string subscriptionId ,
string cycleId ,
string idempotencyKey = null ,
PCL. Models. CreateInvoiceRequest body = null )
Parameter
Tags
Description
subscriptionId
Required
Subscription Id
cycleId
Required
Cycle Id
idempotencyKey
Optional
TODO: Add a parameter description
body
Optional
TODO: Add a parameter description
string subscriptionId = " subscription_id" ;
string cycleId = " cycle_id" ;
string idempotencyKey = " idempotency-key" ;
var body = new PCL. Models. CreateInvoiceRequest( ) ;
PCL. Models. GetInvoiceResponse result = await invoices. CreateInvoice ( subscriptionId, cycleId, idempotencyKey, body) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateInvoiceMetadata
Updates the metadata from an invoice
Task < PCL. Models. GetInvoiceResponse> UpdateInvoiceMetadata ( string invoiceId , PCL. Models. UpdateMetadataRequest body , string idempotencyKey = null )
Parameter
Tags
Description
invoiceId
Required
The invoice id
body
Required
Request for updating the invoice metadata
idempotencyKey
Optional
TODO: Add a parameter description
string invoiceId = " invoice_id" ;
var body = new PCL. Models. UpdateMetadataRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetInvoiceResponse result = await invoices. UpdateInvoiceMetadata ( invoiceId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetInvoices
Gets all invoices
Task < PCL. Models. ListInvoicesResponse> GetInvoices (
int ? page = null ,
int ? size = null ,
string code = null ,
string customerId = null ,
string subscriptionId = null ,
DateTime? createdSince = null ,
DateTime? createdUntil = null ,
string status = null ,
DateTime? dueSince = null ,
DateTime? dueUntil = null ,
string customerDocument = null )
Parameter
Tags
Description
page
Optional
Page number
size
Optional
Page size
code
Optional
Filter for Invoice's code
customerId
Optional
Filter for Invoice's customer id
subscriptionId
Optional
Filter for Invoice's subscription id
createdSince
Optional
Filter for Invoice's creation date start range
createdUntil
Optional
Filter for Invoices creation date end range
status
Optional
Filter for Invoice's status
dueSince
Optional
Filter for Invoice's due date start range
dueUntil
Optional
Filter for Invoice's due date end range
customerDocument
Optional
TODO: Add a parameter description
int ? page = 197 ;
int ? size = 197 ;
string code = " code" ;
string customerId = " customer_id" ;
string subscriptionId = " subscription_id" ;
DateTime? createdSince = DateTime. Now ( ) ;
DateTime? createdUntil = DateTime. Now ( ) ;
string status = " status" ;
DateTime? dueSince = DateTime. Now ( ) ;
DateTime? dueUntil = DateTime. Now ( ) ;
string customerDocument = " customer_document" ;
PCL. Models. ListInvoicesResponse result = await invoices. GetInvoices ( page, size, code, customerId, subscriptionId, createdSince, createdUntil, status, dueSince, dueUntil, customerDocument) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetPartialInvoice
GetPartialInvoice
Task < PCL. Models. GetInvoiceResponse> GetPartialInvoice ( string subscriptionId )
Parameter
Tags
Description
subscriptionId
Required
Subscription Id
string subscriptionId = " subscription_id" ;
PCL. Models. GetInvoiceResponse result = await invoices. GetPartialInvoice ( subscriptionId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateInvoiceStatus
Updates the status from an invoice
Task < PCL. Models. GetInvoiceResponse> UpdateInvoiceStatus ( string invoiceId , PCL. Models. UpdateInvoiceStatusRequest body , string idempotencyKey = null )
Parameter
Tags
Description
invoiceId
Required
Invoice Id
body
Required
Request for updating an invoice's status
idempotencyKey
Optional
TODO: Add a parameter description
string invoiceId = " invoice_id" ;
var body = new PCL. Models. UpdateInvoiceStatusRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetInvoiceResponse result = await invoices. UpdateInvoiceStatus ( invoiceId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
Back to List of Controllers
CustomersController
The singleton instance of the CustomersController
class can be accessed from the API Client.
ICustomersController customers = client. Customers;
DeleteCard
Delete a customer's card
Task < PCL. Models. GetCardResponse> DeleteCard ( string customerId , string cardId , string idempotencyKey = null )
Parameter
Tags
Description
customerId
Required
Customer Id
cardId
Required
Card Id
idempotencyKey
Optional
TODO: Add a parameter description
string customerId = " customer_id" ;
string cardId = " card_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetCardResponse result = await customers. DeleteCard ( customerId, cardId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateAddress
Updates an address
Task < PCL. Models. GetAddressResponse> UpdateAddress (
string customerId ,
string addressId ,
PCL. Models. UpdateAddressRequest body ,
string idempotencyKey = null )
Parameter
Tags
Description
customerId
Required
Customer Id
addressId
Required
Address Id
body
Required
Request for updating an address
idempotencyKey
Optional
TODO: Add a parameter description
string customerId = " customer_id" ;
string addressId = " address_id" ;
var body = new PCL. Models. UpdateAddressRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetAddressResponse result = await customers. UpdateAddress ( customerId, addressId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetAddress
Get a customer's address
Task < PCL. Models. GetAddressResponse> GetAddress ( string customerId , string addressId )
Parameter
Tags
Description
customerId
Required
Customer id
addressId
Required
Address Id
string customerId = " customer_id" ;
string addressId = " address_id" ;
PCL. Models. GetAddressResponse result = await customers. GetAddress ( customerId, addressId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetAccessTokens
Get all access tokens from a customer
Task < PCL. Models. ListAccessTokensResponse> GetAccessTokens ( string customerId , int ? page = null , int ? size = null )
Parameter
Tags
Description
customerId
Required
Customer Id
page
Optional
Page number
size
Optional
Page size
string customerId = " customer_id" ;
int ? page = 197 ;
int ? size = 197 ;
PCL. Models. ListAccessTokensResponse result = await customers. GetAccessTokens ( customerId, page, size) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateCustomer
Updates a customer
Task < PCL. Models. GetCustomerResponse> UpdateCustomer ( string customerId , PCL. Models. UpdateCustomerRequest body , string idempotencyKey = null )
Parameter
Tags
Description
customerId
Required
Customer id
body
Required
Request for updating a customer
idempotencyKey
Optional
TODO: Add a parameter description
string customerId = " customer_id" ;
var body = new PCL. Models. UpdateCustomerRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetCustomerResponse result = await customers. UpdateCustomer ( customerId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
RenewCard
Renew a card
Task < PCL. Models. GetCardResponse> RenewCard ( string customerId , string cardId , string idempotencyKey = null )
Parameter
Tags
Description
customerId
Required
Customer id
cardId
Required
Card Id
idempotencyKey
Optional
TODO: Add a parameter description
string customerId = " customer_id" ;
string cardId = " card_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetCardResponse result = await customers. RenewCard ( customerId, cardId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetCustomers
Get all Customers
Task < PCL. Models. ListCustomersResponse> GetCustomers (
string name = null ,
string document = null ,
int ? page = 1 ,
int ? size = 10 ,
string email = null ,
string code = null )
Parameter
Tags
Description
name
Optional
Name of the Customer
document
Optional
Document of the Customer
page
Optional
DefaultValue
Current page the the search
size
Optional
DefaultValue
Quantity pages of the search
email
Optional
Customer's email
code
Optional
Customer's code
string name = " name" ;
string document = " document" ;
int ? page = 1 ;
int ? size = 10 ;
string email = " email" ;
string code = " Code" ;
PCL. Models. ListCustomersResponse result = await customers. GetCustomers ( name, document, page, size, email, code) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
DeleteAccessTokens
Delete a Customer's access tokens
Task < PCL. Models. ListAccessTokensResponse> DeleteAccessTokens ( string customerId )
Parameter
Tags
Description
customerId
Required
Customer Id
string customerId = " customer_id" ;
PCL. Models. ListAccessTokensResponse result = await customers. DeleteAccessTokens ( customerId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetCustomer
Get a customer
Task < PCL. Models. GetCustomerResponse> GetCustomer ( string customerId )
Parameter
Tags
Description
customerId
Required
Customer Id
string customerId = " customer_id" ;
PCL. Models. GetCustomerResponse result = await customers. GetCustomer ( customerId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateCard
Updates a card
Task < PCL. Models. GetCardResponse> UpdateCard (
string customerId ,
string cardId ,
PCL. Models. UpdateCardRequest body ,
string idempotencyKey = null )
Parameter
Tags
Description
customerId
Required
Customer Id
cardId
Required
Card id
body
Required
Request for updating a card
idempotencyKey
Optional
TODO: Add a parameter description
string customerId = " customer_id" ;
string cardId = " card_id" ;
var body = new PCL. Models. UpdateCardRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetCardResponse result = await customers. UpdateCard ( customerId, cardId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
DeleteAddress
Delete a Customer's address
Task < PCL. Models. GetAddressResponse> DeleteAddress ( string customerId , string addressId , string idempotencyKey = null )
Parameter
Tags
Description
customerId
Required
Customer Id
addressId
Required
Address Id
idempotencyKey
Optional
TODO: Add a parameter description
string customerId = " customer_id" ;
string addressId = " address_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetAddressResponse result = await customers. DeleteAddress ( customerId, addressId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateAccessToken
Creates a access token for a customer
Task < PCL. Models. GetAccessTokenResponse> CreateAccessToken ( string customerId , PCL. Models. CreateAccessTokenRequest body , string idempotencyKey = null )
Parameter
Tags
Description
customerId
Required
Customer Id
body
Required
Request for creating a access token
idempotencyKey
Optional
TODO: Add a parameter description
string customerId = " customer_id" ;
var body = new PCL. Models. CreateAccessTokenRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetAccessTokenResponse result = await customers. CreateAccessToken ( customerId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateAddress
Creates a new address for a customer
Task < PCL. Models. GetAddressResponse> CreateAddress ( string customerId , PCL. Models. CreateAddressRequest body , string idempotencyKey = null )
Parameter
Tags
Description
customerId
Required
Customer Id
body
Required
Request for creating an address
idempotencyKey
Optional
TODO: Add a parameter description
string customerId = " customer_id" ;
var body = new PCL. Models. CreateAddressRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetAddressResponse result = await customers. CreateAddress ( customerId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetCards
Get all cards from a customer
Task < PCL. Models. ListCardsResponse> GetCards ( string customerId , int ? page = null , int ? size = null )
Parameter
Tags
Description
customerId
Required
Customer Id
page
Optional
Page number
size
Optional
Page size
string customerId = " customer_id" ;
int ? page = 197 ;
int ? size = 197 ;
PCL. Models. ListCardsResponse result = await customers. GetCards ( customerId, page, size) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateCustomerMetadata
Updates the metadata a customer
Task < PCL. Models. GetCustomerResponse> UpdateCustomerMetadata ( string customerId , PCL. Models. UpdateMetadataRequest body , string idempotencyKey = null )
Parameter
Tags
Description
customerId
Required
The customer id
body
Required
Request for updating the customer metadata
idempotencyKey
Optional
TODO: Add a parameter description
string customerId = " customer_id" ;
var body = new PCL. Models. UpdateMetadataRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetCustomerResponse result = await customers. UpdateCustomerMetadata ( customerId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetCard
Get a customer's card
Task < PCL. Models. GetCardResponse> GetCard ( string customerId , string cardId )
Parameter
Tags
Description
customerId
Required
Customer id
cardId
Required
Card id
string customerId = " customer_id" ;
string cardId = " card_id" ;
PCL. Models. GetCardResponse result = await customers. GetCard ( customerId, cardId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
DeleteAccessToken
Delete a customer's access token
Task < PCL. Models. GetAccessTokenResponse> DeleteAccessToken ( string customerId , string tokenId , string idempotencyKey = null )
Parameter
Tags
Description
customerId
Required
Customer Id
tokenId
Required
Token Id
idempotencyKey
Optional
TODO: Add a parameter description
string customerId = " customer_id" ;
string tokenId = " token_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetAccessTokenResponse result = await customers. DeleteAccessToken ( customerId, tokenId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetAccessToken
Get a Customer's access token
Task < PCL. Models. GetAccessTokenResponse> GetAccessToken ( string customerId , string tokenId )
Parameter
Tags
Description
customerId
Required
Customer Id
tokenId
Required
Token Id
string customerId = " customer_id" ;
string tokenId = " token_id" ;
PCL. Models. GetAccessTokenResponse result = await customers. GetAccessToken ( customerId, tokenId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetAddresses
Gets all adressess from a customer
Task < PCL. Models. ListAddressesResponse> GetAddresses ( string customerId , int ? page = null , int ? size = null )
Parameter
Tags
Description
customerId
Required
Customer id
page
Optional
Page number
size
Optional
Page size
string customerId = " customer_id" ;
int ? page = 106 ;
int ? size = 106 ;
PCL. Models. ListAddressesResponse result = await customers. GetAddresses ( customerId, page, size) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateCustomer
Creates a new customer
Task < PCL. Models. GetCustomerResponse> CreateCustomer ( PCL. Models. CreateCustomerRequest body , string idempotencyKey = null )
Parameter
Tags
Description
body
Required
Request for creating a customer
idempotencyKey
Optional
TODO: Add a parameter description
var body = new PCL. Models. CreateCustomerRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetCustomerResponse result = await customers. CreateCustomer ( body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateCard
Creates a new card for a customer
Task < PCL. Models. GetCardResponse> CreateCard ( string customerId , PCL. Models. CreateCardRequest body , string idempotencyKey = null )
Parameter
Tags
Description
customerId
Required
Customer id
body
Required
Request for creating a card
idempotencyKey
Optional
TODO: Add a parameter description
string customerId = " customer_id" ;
var body = new PCL. Models. CreateCardRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetCardResponse result = await customers. CreateCard ( customerId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
Back to List of Controllers
ChargesController
The singleton instance of the ChargesController
class can be accessed from the API Client.
IChargesController charges = client. Charges;
CaptureCharge
Captures a charge
Task < PCL. Models. GetChargeResponse> CaptureCharge ( string chargeId , string idempotencyKey = null , PCL. Models. CreateCaptureChargeRequest body = null )
Parameter
Tags
Description
chargeId
Required
Charge id
idempotencyKey
Optional
TODO: Add a parameter description
body
Optional
Request for capturing a charge
string chargeId = " charge_id" ;
string idempotencyKey = " idempotency-key" ;
var body = new PCL. Models. CreateCaptureChargeRequest( ) ;
PCL. Models. GetChargeResponse result = await charges. CaptureCharge ( chargeId, idempotencyKey, body) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetChargeTransactions
GetChargeTransactions
Task < PCL. Models. ListChargeTransactionsResponse> GetChargeTransactions ( string chargeId , int ? page = null , int ? size = null )
Parameter
Tags
Description
chargeId
Required
Charge Id
page
Optional
Page number
size
Optional
Page size
string chargeId = " charge_id" ;
int ? page = 106 ;
int ? size = 106 ;
PCL. Models. ListChargeTransactionsResponse result = await charges. GetChargeTransactions ( chargeId, page, size) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetCharges
Lists all charges
Task < PCL. Models. ListChargesResponse> GetCharges (
int ? page = null ,
int ? size = null ,
string code = null ,
string status = null ,
string paymentMethod = null ,
string customerId = null ,
string orderId = null ,
DateTime? createdSince = null ,
DateTime? createdUntil = null )
Parameter
Tags
Description
page
Optional
Page number
size
Optional
Page size
code
Optional
Filter for charge's code
status
Optional
Filter for charge's status
paymentMethod
Optional
Filter for charge's payment method
customerId
Optional
Filter for charge's customer id
orderId
Optional
Filter for charge's order id
createdSince
Optional
Filter for the beginning of the range for charge's creation
createdUntil
Optional
Filter for the end of the range for charge's creation
int ? page = 106 ;
int ? size = 106 ;
string code = " code" ;
string status = " status" ;
string paymentMethod = " payment_method" ;
string customerId = " customer_id" ;
string orderId = " order_id" ;
DateTime? createdSince = DateTime. Now ( ) ;
DateTime? createdUntil = DateTime. Now ( ) ;
PCL. Models. ListChargesResponse result = await charges. GetCharges ( page, size, code, status, paymentMethod, customerId, orderId, createdSince, createdUntil) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateChargePaymentMethod
Updates a charge's payment method
Task < PCL. Models. GetChargeResponse> UpdateChargePaymentMethod ( string chargeId , PCL. Models. UpdateChargePaymentMethodRequest body , string idempotencyKey = null )
Parameter
Tags
Description
chargeId
Required
Charge id
body
Required
Request for updating the payment method from a charge
idempotencyKey
Optional
TODO: Add a parameter description
string chargeId = " charge_id" ;
var body = new PCL. Models. UpdateChargePaymentMethodRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetChargeResponse result = await charges. UpdateChargePaymentMethod ( chargeId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateChargeDueDate
Updates the due date from a charge
Task < PCL. Models. GetChargeResponse> UpdateChargeDueDate ( string chargeId , PCL. Models. UpdateChargeDueDateRequest body , string idempotencyKey = null )
Parameter
Tags
Description
chargeId
Required
Charge Id
body
Required
Request for updating the due date
idempotencyKey
Optional
TODO: Add a parameter description
string chargeId = " charge_id" ;
var body = new PCL. Models. UpdateChargeDueDateRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetChargeResponse result = await charges. UpdateChargeDueDate ( chargeId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
ConfirmPayment
ConfirmPayment
Task < PCL. Models. GetChargeResponse> ConfirmPayment ( string chargeId , string idempotencyKey = null , PCL. Models. CreateConfirmPaymentRequest body = null )
Parameter
Tags
Description
chargeId
Required
TODO: Add a parameter description
idempotencyKey
Optional
TODO: Add a parameter description
body
Optional
Request for confirm payment
string chargeId = " charge_id" ;
string idempotencyKey = " idempotency-key" ;
var body = new PCL. Models. CreateConfirmPaymentRequest( ) ;
PCL. Models. GetChargeResponse result = await charges. ConfirmPayment ( chargeId, idempotencyKey, body) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetCharge
Get a charge from its id
Task < PCL. Models. GetChargeResponse> GetCharge ( string chargeId )
Parameter
Tags
Description
chargeId
Required
Charge id
string chargeId = " charge_id" ;
PCL. Models. GetChargeResponse result = await charges. GetCharge ( chargeId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
RetryCharge
Retries a charge
Task < PCL. Models. GetChargeResponse> RetryCharge ( string chargeId , string idempotencyKey = null )
Parameter
Tags
Description
chargeId
Required
Charge id
idempotencyKey
Optional
TODO: Add a parameter description
string chargeId = " charge_id" ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetChargeResponse result = await charges. RetryCharge ( chargeId, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateChargeMetadata
Updates the metadata from a charge
Task < PCL. Models. GetChargeResponse> UpdateChargeMetadata ( string chargeId , PCL. Models. UpdateMetadataRequest body , string idempotencyKey = null )
Parameter
Tags
Description
chargeId
Required
The charge id
body
Required
Request for updating the charge metadata
idempotencyKey
Optional
TODO: Add a parameter description
string chargeId = " charge_id" ;
var body = new PCL. Models. UpdateMetadataRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetChargeResponse result = await charges. UpdateChargeMetadata ( chargeId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateChargeCard
Updates the card from a charge
Task < PCL. Models. GetChargeResponse> UpdateChargeCard ( string chargeId , PCL. Models. UpdateChargeCardRequest body , string idempotencyKey = null )
Parameter
Tags
Description
chargeId
Required
Charge id
body
Required
Request for updating a charge's card
idempotencyKey
Optional
TODO: Add a parameter description
string chargeId = " charge_id" ;
var body = new PCL. Models. UpdateChargeCardRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetChargeResponse result = await charges. UpdateChargeCard ( chargeId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CancelCharge
Cancel a charge
Task < PCL. Models. GetChargeResponse> CancelCharge ( string chargeId , string idempotencyKey = null , PCL. Models. CreateCancelChargeRequest body = null )
Parameter
Tags
Description
chargeId
Required
Charge id
idempotencyKey
Optional
TODO: Add a parameter description
body
Optional
Request for cancelling a charge
string chargeId = " charge_id" ;
string idempotencyKey = " idempotency-key" ;
var body = new PCL. Models. CreateCancelChargeRequest( ) ;
PCL. Models. GetChargeResponse result = await charges. CancelCharge ( chargeId, idempotencyKey, body) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetChargesSummary
GetChargesSummary
Task < PCL. Models. GetChargesSummaryResponse> GetChargesSummary ( string status , DateTime? createdSince = null , DateTime? createdUntil = null )
Parameter
Tags
Description
status
Required
TODO: Add a parameter description
createdSince
Optional
TODO: Add a parameter description
createdUntil
Optional
TODO: Add a parameter description
string status = " status" ;
DateTime? createdSince = DateTime. Now ( ) ;
DateTime? createdUntil = DateTime. Now ( ) ;
PCL. Models. GetChargesSummaryResponse result = await charges. GetChargesSummary ( status, createdSince, createdUntil) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateCharge
Creates a new charge
Task < PCL. Models. GetChargeResponse> CreateCharge ( PCL. Models. CreateChargeRequest body , string idempotencyKey = null )
Parameter
Tags
Description
body
Required
Request for creating a charge
idempotencyKey
Optional
TODO: Add a parameter description
var body = new PCL. Models. CreateChargeRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetChargeResponse result = await charges. CreateCharge ( body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
Back to List of Controllers
RecipientsController
The singleton instance of the RecipientsController
class can be accessed from the API Client.
IRecipientsController recipients = client. Recipients;
GetTransfer
Gets a transfer
Task < PCL. Models. GetTransferResponse> GetTransfer ( string recipientId , string transferId )
Parameter
Tags
Description
recipientId
Required
Recipient id
transferId
Required
Transfer id
string recipientId = " recipient_id" ;
string transferId = " transfer_id" ;
PCL. Models. GetTransferResponse result = await recipients. GetTransfer ( recipientId, transferId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetRecipient
Retrieves recipient information
Task < PCL. Models. GetRecipientResponse> GetRecipient ( string recipientId )
Parameter
Tags
Description
recipientId
Required
Recipiend id
string recipientId = " recipient_id" ;
PCL. Models. GetRecipientResponse result = await recipients. GetRecipient ( recipientId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateRecipientMetadata
Updates recipient metadata
Task < PCL. Models. GetRecipientResponse> UpdateRecipientMetadata ( string recipientId , PCL. Models. UpdateMetadataRequest body , string idempotencyKey = null )
Parameter
Tags
Description
recipientId
Required
Recipient id
body
Required
Metadata
idempotencyKey
Optional
TODO: Add a parameter description
string recipientId = " recipient_id" ;
var body = new PCL. Models. UpdateMetadataRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetRecipientResponse result = await recipients. UpdateRecipientMetadata ( recipientId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateTransfer
Creates a transfer for a recipient
Task < PCL. Models. GetTransferResponse> CreateTransfer ( string recipientId , PCL. Models. CreateTransferRequest body , string idempotencyKey = null )
Parameter
Tags
Description
recipientId
Required
Recipient Id
body
Required
Transfer data
idempotencyKey
Optional
TODO: Add a parameter description
string recipientId = " recipient_id" ;
var body = new PCL. Models. CreateTransferRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetTransferResponse result = await recipients. CreateTransfer ( recipientId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateAutomaticAnticipationSettings
Updates recipient metadata
Task < PCL. Models. GetRecipientResponse> UpdateAutomaticAnticipationSettings ( string recipientId , PCL. Models. UpdateAutomaticAnticipationSettingsRequest body , string idempotencyKey = null )
Parameter
Tags
Description
recipientId
Required
Recipient id
body
Required
Metadata
idempotencyKey
Optional
TODO: Add a parameter description
string recipientId = " recipient_id" ;
var body = new PCL. Models. UpdateAutomaticAnticipationSettingsRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetRecipientResponse result = await recipients. UpdateAutomaticAnticipationSettings ( recipientId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetBalance
Get balance information for a recipient
Task < PCL. Models. GetBalanceResponse> GetBalance ( string recipientId )
Parameter
Tags
Description
recipientId
Required
Recipient id
string recipientId = " recipient_id" ;
PCL. Models. GetBalanceResponse result = await recipients. GetBalance ( recipientId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetAnticipations
Retrieves a paginated list of anticipations from a recipient
Task < PCL. Models. ListAnticipationResponse> GetAnticipations (
string recipientId ,
int ? page = null ,
int ? size = null ,
string status = null ,
string timeframe = null ,
DateTime? paymentDateSince = null ,
DateTime? paymentDateUntil = null ,
DateTime? createdSince = null ,
DateTime? createdUntil = null )
Parameter
Tags
Description
recipientId
Required
Recipient id
page
Optional
Page number
size
Optional
Page size
status
Optional
Filter for anticipation status
timeframe
Optional
Filter for anticipation timeframe
paymentDateSince
Optional
Filter for start range for anticipation payment date
paymentDateUntil
Optional
Filter for end range for anticipation payment date
createdSince
Optional
Filter for start range for anticipation creation date
createdUntil
Optional
Filter for end range for anticipation creation date
string recipientId = " recipient_id" ;
int ? page = 106 ;
int ? size = 106 ;
string status = " status" ;
string timeframe = " timeframe" ;
DateTime? paymentDateSince = DateTime. Now ( ) ;
DateTime? paymentDateUntil = DateTime. Now ( ) ;
DateTime? createdSince = DateTime. Now ( ) ;
DateTime? createdUntil = DateTime. Now ( ) ;
PCL. Models. ListAnticipationResponse result = await recipients. GetAnticipations ( recipientId, page, size, status, timeframe, paymentDateSince, paymentDateUntil, createdSince, createdUntil) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetWithdrawById
GetWithdrawById
Task < PCL. Models. GetWithdrawResponse> GetWithdrawById ( string recipientId , string withdrawalId )
Parameter
Tags
Description
recipientId
Required
TODO: Add a parameter description
withdrawalId
Required
TODO: Add a parameter description
string recipientId = " recipient_id" ;
string withdrawalId = " withdrawal_id" ;
PCL. Models. GetWithdrawResponse result = await recipients. GetWithdrawById ( recipientId, withdrawalId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateWithdraw
CreateWithdraw
Task < PCL. Models. GetWithdrawResponse> CreateWithdraw ( string recipientId , PCL. Models. CreateWithdrawRequest body )
Parameter
Tags
Description
recipientId
Required
TODO: Add a parameter description
body
Required
TODO: Add a parameter description
string recipientId = " recipient_id" ;
var body = new PCL. Models. CreateWithdrawRequest( ) ;
PCL. Models. GetWithdrawResponse result = await recipients. CreateWithdraw ( recipientId, body) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateRecipient
Updates a recipient
Task < PCL. Models. GetRecipientResponse> UpdateRecipient ( string recipientId , PCL. Models. UpdateRecipientRequest body , string idempotencyKey = null )
Parameter
Tags
Description
recipientId
Required
Recipient id
body
Required
Recipient data
idempotencyKey
Optional
TODO: Add a parameter description
string recipientId = " recipient_id" ;
var body = new PCL. Models. UpdateRecipientRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetRecipientResponse result = await recipients. UpdateRecipient ( recipientId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateAnticipation
Creates an anticipation
Task < PCL. Models. GetAnticipationResponse> CreateAnticipation ( string recipientId , PCL. Models. CreateAnticipationRequest body , string idempotencyKey = null )
Parameter
Tags
Description
recipientId
Required
Recipient id
body
Required
Anticipation data
idempotencyKey
Optional
TODO: Add a parameter description
string recipientId = " recipient_id" ;
var body = new PCL. Models. CreateAnticipationRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetAnticipationResponse result = await recipients. CreateAnticipation ( recipientId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateRecipientDefaultBankAccount
Updates the default bank account from a recipient
Task < PCL. Models. GetRecipientResponse> UpdateRecipientDefaultBankAccount ( string recipientId , PCL. Models. UpdateRecipientBankAccountRequest body , string idempotencyKey = null )
Parameter
Tags
Description
recipientId
Required
Recipient id
body
Required
Bank account data
idempotencyKey
Optional
TODO: Add a parameter description
string recipientId = " recipient_id" ;
var body = new PCL. Models. UpdateRecipientBankAccountRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetRecipientResponse result = await recipients. UpdateRecipientDefaultBankAccount ( recipientId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetRecipientByCode
Retrieves recipient information
Task < PCL. Models. GetRecipientResponse> GetRecipientByCode ( string code )
Parameter
Tags
Description
code
Required
Recipient code
string code = " code" ;
PCL. Models. GetRecipientResponse result = await recipients. GetRecipientByCode ( code) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetAnticipationLimits
Gets the anticipation limits for a recipient
Task < PCL. Models. GetAnticipationLimitResponse> GetAnticipationLimits ( string recipientId , string timeframe , DateTime paymentDate )
Parameter
Tags
Description
recipientId
Required
Recipient id
timeframe
Required
Timeframe
paymentDate
Required
Anticipation payment date
string recipientId = " recipient_id" ;
string timeframe = " timeframe" ;
DateTime paymentDate = DateTime. Now ( ) ;
PCL. Models. GetAnticipationLimitResponse result = await recipients. GetAnticipationLimits ( recipientId, timeframe, paymentDate) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetRecipients
Retrieves paginated recipients information
Task < PCL. Models. ListRecipientResponse> GetRecipients ( int ? page = null , int ? size = null )
Parameter
Tags
Description
page
Optional
Page number
size
Optional
Page size
int ? page = 106 ;
int ? size = 106 ;
PCL. Models. ListRecipientResponse result = await recipients. GetRecipients ( page, size) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
CreateRecipient
Creates a new recipient
Task < PCL. Models. GetRecipientResponse> CreateRecipient ( PCL. Models. CreateRecipientRequest body , string idempotencyKey = null )
Parameter
Tags
Description
body
Required
Recipient data
idempotencyKey
Optional
TODO: Add a parameter description
var body = new PCL. Models. CreateRecipientRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetRecipientResponse result = await recipients. CreateRecipient ( body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetTransfers
Gets a paginated list of transfers for the recipient
Task < PCL. Models. ListTransferResponse> GetTransfers (
string recipientId ,
int ? page = null ,
int ? size = null ,
string status = null ,
DateTime? createdSince = null ,
DateTime? createdUntil = null )
Parameter
Tags
Description
recipientId
Required
Recipient id
page
Optional
Page number
size
Optional
Page size
status
Optional
Filter for transfer status
createdSince
Optional
Filter for start range of transfer creation date
createdUntil
Optional
Filter for end range of transfer creation date
string recipientId = " recipient_id" ;
int ? page = 106 ;
int ? size = 106 ;
string status = " status" ;
DateTime? createdSince = DateTime. Now ( ) ;
DateTime? createdUntil = DateTime. Now ( ) ;
PCL. Models. ListTransferResponse result = await recipients. GetTransfers ( recipientId, page, size, status, createdSince, createdUntil) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetWithdrawals
Gets a paginated list of transfers for the recipient
Task < PCL. Models. ListWithdrawals> GetWithdrawals (
string recipientId ,
int ? page = null ,
int ? size = null ,
string status = null ,
DateTime? createdSince = null ,
DateTime? createdUntil = null )
Parameter
Tags
Description
recipientId
Required
TODO: Add a parameter description
page
Optional
TODO: Add a parameter description
size
Optional
TODO: Add a parameter description
status
Optional
TODO: Add a parameter description
createdSince
Optional
TODO: Add a parameter description
createdUntil
Optional
TODO: Add a parameter description
string recipientId = " recipient_id" ;
int ? page = 148 ;
int ? size = 148 ;
string status = " status" ;
DateTime? createdSince = DateTime. Now ( ) ;
DateTime? createdUntil = DateTime. Now ( ) ;
PCL. Models. ListWithdrawals result = await recipients. GetWithdrawals ( recipientId, page, size, status, createdSince, createdUntil) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetAnticipation
Gets an anticipation
Task < PCL. Models. GetAnticipationResponse> GetAnticipation ( string recipientId , string anticipationId )
Parameter
Tags
Description
recipientId
Required
Recipient id
anticipationId
Required
Anticipation id
string recipientId = " recipient_id" ;
string anticipationId = " anticipation_id" ;
PCL. Models. GetAnticipationResponse result = await recipients. GetAnticipation ( recipientId, anticipationId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
UpdateRecipientTransferSettings
UpdateRecipientTransferSettings
Task < PCL. Models. GetRecipientResponse> UpdateRecipientTransferSettings ( string recipientId , PCL. Models. UpdateTransferSettingsRequest body , string idempotencyKey = null )
Parameter
Tags
Description
recipientId
Required
Recipient Identificator
body
Required
TODO: Add a parameter description
idempotencyKey
Optional
TODO: Add a parameter description
string recipientId = " recipient_id" ;
var body = new PCL. Models. UpdateTransferSettingsRequest( ) ;
string idempotencyKey = " idempotency-key" ;
PCL. Models. GetRecipientResponse result = await recipients. UpdateRecipientTransferSettings ( recipientId, body, idempotencyKey) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetDefaultRecipient
GetDefaultRecipient
Task < PCL. Models. GetRecipientResponse> GetDefaultRecipient ( )
PCL. Models. GetRecipientResponse result = await recipients. GetDefaultRecipient ( ) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
Back to List of Controllers
TokensController
The singleton instance of the TokensController
class can be accessed from the API Client.
ITokensController tokens = client. Tokens;
CreateToken
Tags: Skips Authentication
CreateToken
Task < PCL. Models. GetTokenResponse> CreateToken (
string publicKey ,
PCL. Models. CreateTokenRequest body ,
string idempotencyKey = null ,
string appId = null )
Parameter
Tags
Description
publicKey
Required
Public key
body
Required
Request for creating a token
idempotencyKey
Optional
TODO: Add a parameter description
appId
Optional
TODO: Add a parameter description
string publicKey = " public_key" ;
var body = new PCL. Models. CreateTokenRequest( ) ;
string idempotencyKey = " idempotency-key" ;
string appId = " appId" ;
PCL. Models. GetTokenResponse result = await tokens. CreateToken ( publicKey, body, idempotencyKey, appId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetToken
Tags: Skips Authentication
Gets a token from its id
Task < PCL. Models. GetTokenResponse> GetToken ( string id , string publicKey , string appId = null )
Parameter
Tags
Description
id
Required
Token id
publicKey
Required
Public key
appId
Optional
TODO: Add a parameter description
string id = " id" ;
string publicKey = " public_key" ;
string appId = " appId" ;
PCL. Models. GetTokenResponse result = await tokens. GetToken ( id, publicKey, appId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
Back to List of Controllers
TransfersController
The singleton instance of the TransfersController
class can be accessed from the API Client.
ITransfersController transfers = client. Transfers;
GetTransfers1
Gets all transfers
Task < PCL. Models. ListTransfers> GetTransfers1 ( )
PCL. Models. ListTransfers result = await transfers. GetTransfers1 ( ) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
GetTransferById
GetTransferById
Task < PCL. Models. GetTransfer> GetTransferById ( string transferId )
Parameter
Tags
Description
transferId
Required
TODO: Add a parameter description
string transferId = " transfer_id" ;
PCL. Models. GetTransfer result = await transfers. GetTransferById ( transferId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
PostCreateTransfer
CreateTransfer
Task < PCL. Models. GetTransfer> PostCreateTransfer ( PCL. Models. CreateTransfer body )
Parameter
Tags
Description
body
Required
TODO: Add a parameter description
var body = new PCL. Models. CreateTransfer( ) ;
PCL. Models. GetTransfer result = await transfers. PostCreateTransfer ( body) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
Back to List of Controllers
TransactionsController
The singleton instance of the TransactionsController
class can be accessed from the API Client.
ITransactionsController transactions = client. Transactions;
GetTransaction
GetTransaction
Task < PCL. Models. GetTransactionResponse> GetTransaction ( string transactionId )
Parameter
Tags
Description
transactionId
Required
TODO: Add a parameter description
string transactionId = " transaction_id" ;
PCL. Models. GetTransactionResponse result = await transactions. GetTransaction ( transactionId) ;
Error Code
Error Description
400
Invalid request
401
Invalid API key
404
An informed resource was not found
412
Business validation error
422
Contract validation error
500
Internal server error
Back to List of Controllers