POST api/FinalizeNewMembership

Processes and bills a gift membership.

Request Information

URI Parameters

None.

Body Parameters

FinalizeContributionRequest
NameDescriptionTypeAdditional information
PurchaseSessionKey

string

Required

AuthenticationSessionKey

string

Required

TransactionAmount

decimal number
CreditCardNumber

string
CreditCardName

Name on credit card

string
CreditCardCVV

string
CreditCardExpirationMonth

integer

Range: inclusive between 1 and 12

CreditCardExpirationYear

integer
SourceId

For optional source id that will be used for the membership purchase session

integer
PaymentId

integer

Required

CreditCardType

integer

Required

AuthorizationCode

string

Required

PaymentReference

string

Required

AccountId

integer

Required

Request Formats

application/json, text/json

Sample:
{
  "PurchaseSessionKey": "sample string 1",
  "AuthenticationSessionKey": "sample string 2",
  "TransactionAmount": 3.0,
  "CreditCardNumber": "sample string 4",
  "CreditCardName": "sample string 5",
  "CreditCardCVV": "sample string 6",
  "CreditCardExpirationMonth": 7,
  "CreditCardExpirationYear": 8,
  "SourceId": 9,
  "PaymentId": 10,
  "CreditCardType": 11,
  "AuthorizationCode": "sample string 12",
  "PaymentReference": "sample string 13",
  "AccountId": 14
}

application/xml, text/xml

Sample:
<FinalizeContributionRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Contribution">
  <AccountId>14</AccountId>
  <AuthenticationSessionKey>sample string 2</AuthenticationSessionKey>
  <AuthorizationCode>sample string 12</AuthorizationCode>
  <CreditCardCVV>sample string 6</CreditCardCVV>
  <CreditCardExpirationMonth>7</CreditCardExpirationMonth>
  <CreditCardExpirationYear>8</CreditCardExpirationYear>
  <CreditCardName>sample string 5</CreditCardName>
  <CreditCardNumber>sample string 4</CreditCardNumber>
  <CreditCardType>11</CreditCardType>
  <PaymentId>10</PaymentId>
  <PaymentReference>sample string 13</PaymentReference>
  <PurchaseSessionKey>sample string 1</PurchaseSessionKey>
  <SourceId>9</SourceId>
  <TransactionAmount>3</TransactionAmount>
</FinalizeContributionRequest>

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

Response Information

Resource Description

GiftMembershipResult object

ApiSuccessOfNewMembershipResult
NameDescriptionTypeAdditional information
Success

boolean
Data

NewMembershipResult

Response Formats

application/json

Sample:
{
  "Success": true,
  "Data": {
    "SessionKey": "f0WbKhJzcQZB3vxub3wJgVOgfglO7IvWQonD5T+vRO3VbNFBIPN4YKc0orUXHj+b8KYHbpjYMXVIbNMkWPsq3hGSaqUBErFvfAih1t916Ww=",
    "AccountRegistered": true,
    "MembershipDonationAdded": true,
    "AdditionalDonationAdded": true,
    "AutoRenewalPaymentSaved": true,
    "AddOnMembershipsAdded": [
      {
        "MembershipLevel": "sample string 1",
        "MembershipAmount": 2.0
      },
      {
        "MembershipLevel": "sample string 1",
        "MembershipAmount": 2.0
      }
    ],
    "MembershipPurchaseSessionKey": "FhfJTXbrZqszwy/pWRABNfgm+X6g0FmMP/HMGQOK5l/3Cy4QDGD4mdDOS2xR6RT6C2XEhvoOExcmLrS/dr+HMM2iob7z7oo0pv7v3hr7c5k=",
    "TotalAmountAddedToCart": 7.0,
    "PurchaseCompleted": true,
    "OrderEmailSent": true,
    "OrderNumber": 10,
    "PrimaryAddressError": true,
    "NewSessionKey": "R7e/FBscVFuO75svrWtqg9w6+Hpd+hzAbHzui6JzkpEElf4O5ttFbj/f9fuZaVUf2mO+5y8+vX5V9bikRGVGFQOXPlO79naV1H8qv6krez5pwOzV04H8x1X0dgvdIU8a",
    "Error": [
      "sample string 1",
      "sample string 2"
    ],
    "Status": "sample string 13",
    "Message": "sample string 14"
  }
}

text/json

Sample:
{
  "Success": true,
  "Data": {
    "SessionKey": "HsgWPw4ZLfV1YONjdImWFYcyCY/5/HoyePSsENf+cIeTnHpbWPJxqZ30eMvxtoi0vK71v0unKJ2XbQSuOJOn5FPC4lsNrvsjem8xKbh5AjE=",
    "AccountRegistered": true,
    "MembershipDonationAdded": true,
    "AdditionalDonationAdded": true,
    "AutoRenewalPaymentSaved": true,
    "AddOnMembershipsAdded": [
      {
        "MembershipLevel": "sample string 1",
        "MembershipAmount": 2.0
      },
      {
        "MembershipLevel": "sample string 1",
        "MembershipAmount": 2.0
      }
    ],
    "MembershipPurchaseSessionKey": "nPtm5btNH43F+dTHGPFS70cx29DKJfxykpkyOlVfaT3iN/FVkpOX0j9g3YkY8QVRiV+hXV+McAqHR4ZJyEUYG0GdC+gYFI4eHYec13hMlWw=",
    "TotalAmountAddedToCart": 7.0,
    "PurchaseCompleted": true,
    "OrderEmailSent": true,
    "OrderNumber": 10,
    "PrimaryAddressError": true,
    "NewSessionKey": "hEdtV8/Pto3PmLssbOEuF94J2WsHD8/MEJeY24rvcXPF1BEcKneBanoMdf9vdzVYPNTcYwuzE9CQ6yS1ekB9QPKmPAABF2xffRzdl3Aw7gRPsG7fKeSnIbMgjxobRJyJ",
    "Error": [
      "sample string 1",
      "sample string 2"
    ],
    "Status": "sample string 13",
    "Message": "sample string 14"
  }
}

application/xml, text/xml

Sample:
<ApiSuccessOfNewMembershipResultyx5QZ_PAX 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.Contribution">
    <Error xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </Error>
    <Message xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">sample string 14</Message>
    <NewSessionKey xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">sample string 12</NewSessionKey>
    <OrderEmailSent xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">true</OrderEmailSent>
    <OrderNumber xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">10</OrderNumber>
    <PrimaryAddressError xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">true</PrimaryAddressError>
    <PurchaseCompleted xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">true</PurchaseCompleted>
    <Status xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">sample string 13</Status>
    <d2p1:AccountRegistered>true</d2p1:AccountRegistered>
    <d2p1:AddOnMembershipsAdded>
      <d2p1:AddOnMembership>
        <d2p1:MembershipAmount>2</d2p1:MembershipAmount>
        <d2p1:MembershipLevel>sample string 1</d2p1:MembershipLevel>
      </d2p1:AddOnMembership>
      <d2p1:AddOnMembership>
        <d2p1:MembershipAmount>2</d2p1:MembershipAmount>
        <d2p1:MembershipLevel>sample string 1</d2p1:MembershipLevel>
      </d2p1:AddOnMembership>
    </d2p1:AddOnMembershipsAdded>
    <d2p1:AdditionalDonationAdded>true</d2p1:AdditionalDonationAdded>
    <d2p1:AutoRenewalPaymentSaved>true</d2p1:AutoRenewalPaymentSaved>
    <d2p1:MembershipDonationAdded>true</d2p1:MembershipDonationAdded>
    <d2p1:MembershipPurchaseSessionKey>sample string 6</d2p1:MembershipPurchaseSessionKey>
    <d2p1:SessionKey>sample string 1</d2p1:SessionKey>
    <d2p1:TotalAmountAddedToCart>7</d2p1:TotalAmountAddedToCart>
  </Data>
</ApiSuccessOfNewMembershipResultyx5QZ_PAX>