POST api/Contact/{handle}/Credit?user={user}

Create a credit transaction

Request Information

URI Parameters

NameDescriptionTypeAdditional information
handle

contact handle

string

Required

user

Optional user handle - if empty logged in user will be used

string

None.

Body Parameters

details of the transaction

NewCedit
NameDescriptionTypeAdditional information
Total

Total credit - in Currency

decimal number

None.

Currency

Currency

string

None.

UrlFailure

A page to be redirected to in case of failure

string

None.

UrlSuccess

A page to be redirected to in case of success

string

None.

UrlBack

A page to be redirected to in case of cancel

string

None.

ClientIpAddress

Ip Address of end client

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Total": 1.0,
  "Currency": "sample string 2",
  "UrlFailure": "sample string 3",
  "UrlSuccess": "sample string 4",
  "UrlBack": "sample string 5",
  "ClientIpAddress": "sample string 6"
}

application/xml, text/xml

Sample:
<NewCedit xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Contact">
  <ClientIpAddress>sample string 6</ClientIpAddress>
  <Currency>sample string 2</Currency>
  <Total>1</Total>
  <UrlBack>sample string 5</UrlBack>
  <UrlFailure>sample string 3</UrlFailure>
  <UrlSuccess>sample string 4</UrlSuccess>
</NewCedit>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'NewCedit'.

Response Information

Resource Description

A payment object with elements required to launch axecpta payment
Collection of errors on failure
Return codes
200 - ok
400 - bad request
401 - unauthorized
404 - not found
500 - internal server error

Payment
NameDescriptionTypeAdditional information
TransactionID

Transaction id

string

None.

MerchantID

Merchant id

string

None.

Data

Encrypted data

string

None.

Len

Data length

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "TransactionID": "sample string 1",
  "MerchantID": "sample string 2",
  "Data": "sample string 3",
  "Len": 4
}

application/xml, text/xml

Sample:
<Payment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Contact">
  <Data>sample string 3</Data>
  <Len>4</Len>
  <MerchantID>sample string 2</MerchantID>
  <TransactionID>sample string 1</TransactionID>
</Payment>