Rsl.Lotteries

<back to all web services

AddPayPalAccount

Create a PayPal funding source for a customer if not already created

The following routes are available for this service:
POST/fundingsources/paypalEither provide a payment method token or a nonce but not both
AddPayPalAccount Parameters:
NameParameterData TypeRequiredDescription
PaymentMethodTokenbodystringNoThe payment method token if already vaulted
PaymentMethodNoncebodystringNoThe payment method nonce
IsDefaultbodyboolNo
RememberPaymentMethodbodybool?NoFalse to save PayPal as disabled otherwise save as normal in Dynamics
CustomerIdbodystringNo
IsNewCustomerPayPalFeebodybool?No
RequestReferencebodyRequestReferenceNo
RequestReference Parameters:
NameParameterData TypeRequiredDescription
CampaignIdformstringNo
RetailChannelIdformstringYes
ReferenceIdformstringNo
PayPalAccount Parameters:
NameParameterData TypeRequiredDescription
PayPalAccountIdformstringNoThe unique identifier of the PayPal acount in Dynamics
TokenformstringNoThe payment method token
EmailformstringNoThe email address belonging to the Paypal account
BillingAgreementIdformstringNoThe unique identifier of the vaulted payment flow agreement between the customer's PayPal account and RSL PayPal business account
CreatedAtformDateTimeNoThe date/time the payment method was created
IsDefaultformboolNo
DisabledformboolNo
IsNewCustomerPayPalFeeformbool?NoWhether to apply a different fee for customer coming from PayPal

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /fundingsources/paypal HTTP/1.1 
Host: azs-stg-lotteries-web.azurewebsites.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"paymentMethodToken":"String","paymentMethodNonce":"String","isDefault":false,"rememberPaymentMethod":false,"customerId":"String","isNewCustomerPayPalFee":false,"requestReference":{"campaignId":"String","retailChannelId":"String","referenceId":"String"}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"payPalAccountId":"String","token":"String","email":"String","billingAgreementId":"String","createdAt":"0001-01-01T00:00:00.0000000","isDefault":false,"disabled":false,"isNewCustomerPayPalFee":false}