POST api/SetPayment

Stores a credit card payment method for later use.

Request Information

URI Parameters

None.

Body Parameters

SetPaymentRequest
NameDescriptionTypeAdditional information
SessionKey

string

Required

AccountNumber

string

Required

CardExpiryMonth

integer

Required

Range: inclusive between 1 and 12

CardExpiryYear

integer

Required

ConstituentId

integer

Required

Inactive

boolean

Required

Name

string

Required

PaymentMethodGroupId

integer

Required

ReturnAccountIfAccountExists

boolean

Required

Request Formats

application/json, text/json

Sample:
{
  "SessionKey": "sample string 1",
  "AccountNumber": "sample string 2",
  "CardExpiryMonth": 3,
  "CardExpiryYear": 4,
  "ConstituentId": 5,
  "Inactive": true,
  "Name": "sample string 7",
  "PaymentMethodGroupId": 8,
  "ReturnAccountIfAccountExists": true
}

application/xml, text/xml

Sample:
<SetPaymentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Account">
  <AccountNumber>sample string 2</AccountNumber>
  <CardExpiryMonth>3</CardExpiryMonth>
  <CardExpiryYear>4</CardExpiryYear>
  <ConstituentId>5</ConstituentId>
  <Inactive>true</Inactive>
  <Name>sample string 7</Name>
  <PaymentMethodGroupId>8</PaymentMethodGroupId>
  <ReturnAccountIfAccountExists>true</ReturnAccountIfAccountExists>
  <SessionKey>sample string 1</SessionKey>
</SetPaymentRequest>

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 'SetPaymentRequest'.

Response Information

Resource Description

SetPaymentResult object

ApiSuccessOfSetPaymentResult
NameDescriptionTypeAdditional information
Success

boolean
Data

SetPaymentResult

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Data": {
    "Account": {
      "AccountNumber": "sample string 1",
      "AccountType": {
        "Id": 1,
        "Description": "sample string 1",
        "CardPrefix": "sample string 2",
        "CardtypeIndicator": "sample string 3",
        "EditMask": "sample string 4",
        "Inactive": true
      },
      "BankIdentifierCode": "sample string 2",
      "CardExpiryMonth": 1,
      "CardExpiryYear": 1,
      "ConstituentId": 3,
      "CreatedBy": "sample string 4",
      "CreatedDateTime": "2024-12-28T10:11:58.6441983+00:00",
      "CreateLocation": "sample string 5",
      "DirectDebitAccountType": {
        "Id": 1,
        "Description": "sample string 1",
        "Inactive": true
      },
      "Id": 6,
      "Inactive": true,
      "MandateNumber": "sample string 8",
      "MandateType": 1,
      "MerchantId": "sample string 9",
      "Name": "sample string 10",
      "NumberFirstSix": "sample string 11",
      "NumberLastFour": "sample string 12",
      "PaymentMethodGroup": {
        "Id": 1,
        "Description": "sample string 1",
        "Inactive": true,
        "MerchantId": "sample string 3"
      },
      "SignatureDate": "2024-12-28T10:11:58.6441983+00:00",
      "Token": "sample string 14",
      "UpdatedBy": "sample string 15",
      "UpdatedDateTime": "2024-12-28T10:11:58.6441983+00:00",
      "ShopperReference": "sample string 16"
    }
  }
}

application/xml, text/xml

Sample:
<ApiSuccessOfSetPaymentResultgLC8bFpX xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Api">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Account">
    <d2p1:Account xmlns:d3p1="http://schemas.datacontract.org/2004/07/Tessitura.Service.Contract">
      <d3p1:AccountNumber>sample string 1</d3p1:AccountNumber>
      <d3p1:AccountType>
        <d3p1:CardPrefix>sample string 2</d3p1:CardPrefix>
        <d3p1:CardtypeIndicator>sample string 3</d3p1:CardtypeIndicator>
        <d3p1:Description>sample string 1</d3p1:Description>
        <d3p1:EditMask>sample string 4</d3p1:EditMask>
        <d3p1:Id>1</d3p1:Id>
        <d3p1:Inactive>true</d3p1:Inactive>
      </d3p1:AccountType>
      <d3p1:BankIdentifierCode>sample string 2</d3p1:BankIdentifierCode>
      <d3p1:CardExpiryMonth>1</d3p1:CardExpiryMonth>
      <d3p1:CardExpiryYear>1</d3p1:CardExpiryYear>
      <d3p1:ConstituentId>3</d3p1:ConstituentId>
      <d3p1:CreateLocation>sample string 5</d3p1:CreateLocation>
      <d3p1:CreatedBy>sample string 4</d3p1:CreatedBy>
      <d3p1:CreatedDateTime>2024-12-28T10:11:58.6441983+00:00</d3p1:CreatedDateTime>
      <d3p1:DirectDebitAccountType>
        <d3p1:Description>sample string 1</d3p1:Description>
        <d3p1:Id>1</d3p1:Id>
        <d3p1:Inactive>true</d3p1:Inactive>
      </d3p1:DirectDebitAccountType>
      <d3p1:Id>6</d3p1:Id>
      <d3p1:Inactive>true</d3p1:Inactive>
      <d3p1:MandateNumber>sample string 8</d3p1:MandateNumber>
      <d3p1:MandateType>1</d3p1:MandateType>
      <d3p1:MerchantId>sample string 9</d3p1:MerchantId>
      <d3p1:Name>sample string 10</d3p1:Name>
      <d3p1:NumberFirstSix>sample string 11</d3p1:NumberFirstSix>
      <d3p1:NumberLastFour>sample string 12</d3p1:NumberLastFour>
      <d3p1:PaymentMethodGroup>
        <d3p1:Description>sample string 1</d3p1:Description>
        <d3p1:Id>1</d3p1:Id>
        <d3p1:Inactive>true</d3p1:Inactive>
        <d3p1:MerchantId>sample string 3</d3p1:MerchantId>
      </d3p1:PaymentMethodGroup>
      <d3p1:ShopperReference>sample string 16</d3p1:ShopperReference>
      <d3p1:SignatureDate>2024-12-28T10:11:58.6441983+00:00</d3p1:SignatureDate>
      <d3p1:Token>sample string 14</d3p1:Token>
      <d3p1:UpdatedBy>sample string 15</d3p1:UpdatedBy>
      <d3p1:UpdatedDateTime>2024-12-28T10:11:58.6441983+00:00</d3p1:UpdatedDateTime>
    </d2p1:Account>
  </Data>
</ApiSuccessOfSetPaymentResultgLC8bFpX>