Example: Creating a gift using a token payment method
Using the PaymentMethodId and the AutoPayAccountId, you can create a gift using a token payment method:
{
"$type":"Asi.Soa.Fundraising.DataContracts.GiftInformationBatchData, Asi.Contracts",
"BatchId":"a0c7cbc3-978f-48f2-baff-6f72c35d510f",
"BatchType":"Gift Entry",
"BatchDate":"2019-06-04T11:24:00.597",
"Name":"GiftEntry-04 June 2019-Casey van Houghton",
"Status":0,
"UserId":"b1df6115-2001-47a7-a0fd-0458f847d61a",
"Gifts":{
"$type":"Asi.Soa.Fundraising.DataContracts.GiftInformationDataCollection, Asi.Contracts",
"$values":[
{
"$type":"Asi.Soa.Fundraising.DataContracts.GiftInformationData, Asi.Contracts",
"GiftId":"03f631fd-44fb-4419-8ad5-60c0068e28b7",
"Donor":{
"$type":"Asi.Soa.Membership.DataContracts.PartySummaryData, Asi.Contracts",
"CityName":"Dallas",
"CountryName":"United States",
"CountrySubEntityName":"Texas",
"Email":"[email protected]",
"Phone":"(214) 445-6734, Ext. 22",
"PartyId":"5a1d9250-d2f1-43dd-b587-5257f413031a",
"Id":"112",
"Status":{
"$type":"Asi.Soa.Membership.DataContracts.PartyStatusData, Asi.Contracts",
"PartyStatusId":"1",
"Name":"Active",
"Description":"Active"
},
"Name":"Mr. James B. Soup, Jr.",
"Sort":"Soup, James, B."
},
"ListAsSalutation":{
"$type":"Asi.Soa.Membership.DataContracts.PartySalutationData, Asi.Contracts",
"IsOverridden":false,
"SalutationId":"112",
"SalutationMethod":{
"$type":"Asi.Soa.Membership.DataContracts.PartySalutationMethodSummaryData, Asi.Contracts",
"PartySalutationMethodId":"LIST_AS"
},
"Text":"Mr. James B. Soup, Jr."
},
"GiftDate":"2019-06-04T11:24:00.597",
"GiftAmount":{
"$type":"Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts",
"Amount":22.0,
"Currency":{
"$type":"Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode":"USD",
"DecimalPositions":2,
"ExtensionData":null
},
"IsAmountDefined":true
},
"GiftItem":{
"$type":"Asi.Soa.Fundraising.DataContracts.GiftItemData, Asi.Contracts",
"AllowOrderLineNote":false,
"Description":"Cash accounting based fund",
"ItemCode":"CASHFUND",
"ItemId":"222bb111-f86f-49b8-be53-6eaa4f97e213",
"Name":"Support the Cash Fund"
},
"PaymentInformation":{
"$type":"Asi.Soa.Commerce.DataContracts.RemittanceData, Asi.Contracts",
"Amount":{
"$type":"Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts",
"Amount":22.0,
"Currency":{
"$type":"Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode":"USD",
"DecimalPositions":2,
"ExtensionData":null
},
"IsAmountDefined":true
},
"PaymentToken":{
"$type":"Asi.Soa.Commerce.DataContracts.AutoPayAccountData, Asi.Contracts",
"AutoPayAccountId":"9a17d20a-7f53-4217-a4fd-ccfa80b6bc98",
"Status":"Active",
"PaymentTokenId":"2718e64d-bb86-e911-ba3f-d89ef3323877",
"PaymentTokenExpirationDate":"2021-01-31T00:00:00",
"PaymentMethodSummary":"Visa ************1111 01/2021",
"Payer":{
"$type":"Asi.Soa.Commerce.DataContracts.AccountPayerInformationData, Asi.Contracts",
"PayerName":"Mr. James B. Soup, Jr.",
"PayerId":"5a1d9250-d2f1-43dd-b587-5257f413031a",
"PayerAddress":{
"$type":"Asi.Soa.Membership.DataContracts.AddressData, Asi.Contracts",
"AddressId":"af4dff9a-304b-496e-873b-6099e7b6acc9",
"AddressLines":{
"$type":"Asi.Soa.Membership.DataContracts.AddressLineDataCollection, Asi.Contracts",
"$values":[
"P.O. Box 8765"
]
},
"Barcode":"",
"CityName":"Dallas",
"CountryCode":"US",
"CountryName":"United States",
"CountrySubEntityCode":"TX",
"CountrySubEntityName":"Texas",
"CountyName":"Texas",
"DeliveryPointCode":"0",
"FullAddress":"P.O. Box 8765\r\nDallas, TX 75206-8765\r\n\r\nUnited States",
"PostalCode":"75206-8765",
"VerificationStatus":0,
"VerifiedOn":"0001-01-01T00:00:00"
}
},
"PaymentMethodId":"44d95682-d218-4fde-9187-254fff7a721a",
"AccountType":1,
"IsAvailableToDisable":true,
"DisableMessage":"",
"ApplicationRestrictions":{
"$type":"Asi.Soa.Commerce.DataContracts.ApplicationRestrictionDataCollection, Asi.Contracts",
"$values":[
{
"$type":"Asi.Soa.Commerce.DataContracts.ApplicationRestrictionData, Asi.Contracts",
"ExtensionData":null,
"RestrictionType":8,
"UniformId":"a0c7cbc3-978f-48f2-baff-6f72c35d510f"
}
]
},
"PaymentMethodIsReadOnly":false
},
"PaymentDate":"2019-06-04T11:24:00.597",
"PaymentMethod":{
"$type":"Asi.Soa.Commerce.DataContracts.PaymentMethodData, Asi.Contracts",
"Name":"Visa V",
"DisplayName":"Visa",
"PaymentMethodId":"44d95682-d218-4fde-9187-254fff7a721a",
"PaymentType":"CreditCard (Payflow Pro)",
"GLAccountId":"ffbd91a3-a135-4260-a4d2-c9b0359e0cb0",
"FinancialEntityId":"0086fcb2-a568-4c5d-921e-83a8d5cbd95e",
"Message":"Visa",
"GatewayAccountId":"9b5cc66c-4a15-4459-b22c-a648a74d06bf"
},
"PayorParty":{
"$type":"Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
"PartyId":"5a1d9250-d2f1-43dd-b587-5257f413031a"
}
},
"InstallmentInformation":{
"$type":"Asi.Soa.Commerce.DataContracts.GiftInstallmentSummaryData, Asi.Contracts",
"PaymentTerms":{
"$type":"Asi.Soa.Commerce.DataContracts.OrderLinePaymentTermsData, Asi.Contracts",
"PaymentTermsId":"43E297FA-7A48-49F6-A832-BB48391DFFE4"
},
"PaymentSchedule":{
"$type":"Asi.Soa.Commerce.DataContracts.ScheduledPaymentDataCollection, Asi.Contracts",
"$values":[
]
}
},
"SourceCode":{
"$type":"Asi.Soa.Communications.DataContracts.SourceCodeSummaryData, Asi.Contracts"
},
"GiftAidInformation":{
"$type":"Asi.Soa.Fundraising.DataContracts.GiftAidInformationData, Asi.Contracts",
"IsGiftAidExcluded":true
},
"SoftCreditInformation":{
"$type":"Asi.Soa.Commerce.DataContracts.SoftCreditAllocationData, Asi.Contracts",
"Allocations":{
"$type":"Asi.Soa.Commerce.DataContracts.SoftCreditAllocationDetailsDataCollection, Asi.Contracts",
"$values":[
]
}
},
"TributeInformation":{
"$type":"Asi.Soa.Fundraising.DataContracts.TributeInformationDataCollection, Asi.Contracts",
"$values":[
{
"$type":"Asi.Soa.Fundraising.DataContracts.TributeInformationData, Asi.Contracts",
"TributeType":{
"$type":"Asi.Soa.Fundraising.DataContracts.TributeTypeData, Asi.Contracts",
"TributeTypeId":"Honor",
"Name":"In Honor Of",
"Description":"In Honor Of"
},
"TributeParty":{
"$type":"Asi.Soa.Membership.DataContracts.PersonData, Asi.Contracts",
"PersonName":{
"$type":"Asi.Soa.Membership.DataContracts.PersonNameData, Asi.Contracts"
}
},
"NotifyParty":null,
"Message":null
}
]
},
"DonationType":"Gift",
"DoNotReceipt":false
}
]
}
}
Updated over 5 years ago