Digital River offers the following payment methods for PayPal: PayPal, PayPal Billing Agreement, and PayPal Credit.
PayPal is a payment service that facilitates payments between parties through online funds transfers. PayPal allows customers to establish an account on its website, which is connected to a user's credit card or checking account.
You can find an example of integration here.
Use the PayPay Billing Agreement for subscriptions. That includes any instance where the cart contains both subscription and non-subscription products.
Create a PayPal payment method for your app or website in four easy steps:
​Build a PayPal objects​
Build the PayPal objects.
A PayPal Source Request object requires the following fields.
Field | Value |
type | payPal |
amount | The total value of the transaction. |
currency | The currency of the transaction. |
payPal | A PayPal Source Details object that includes the details of the transaction. |
The PayPal Source Details object requires the following fields.
{"returnUrl": "http://mypage.com","cancelUrl": "https://mypage.com/cancel","items": [{"name": "Cell Phone (Unlocked)","quantity": 1,"unitAmount": 100},{"name": "Headphones","quantity": 1,"unitAmount": 15}],"taxAmount": 0.99,"shippingAmount": 5,"amountsEstimated": true,"shipping": {"recipient": "John Doe","phoneNumber": "555-555-1212","address": {"line1": "54321 Fake St.","line2": "Apt. 3C","city": "Minnetonka","state": "MN","country": "US","postalCode": "55341"}}}
Field | Required/Optional | Description |
returnUrl | Required | If you choose to utilize the full redirect flow, this is where you will redirect your customer to after authorizing within the PayPal experience. |
cancelUrl | Required | If you choose to utilize the full redirect flow, this is where you will redirect your customer to after canceling within the PayPal experience. |
items | Required | An array of PayPal Item objects. |
taxAmount | Required | The value of the total tax amount of the transaction. |
shippingAmount | Required | The value of the total shipping amount of the transaction. |
amountsEstimated | Required | A true/false flag to identify these amounts as estimated within the PayPal experience. You can use this when authorization requires a final calculation of shipping rates or taxes. |
requestShipping | Required | A true/false flag to tell PayPal to request the shipping address from the Shopper within the PayPal experience. |
shipping | Optional | A PayPal Shipping Information object that may be populated if you have already captured the shipping address and wish to pre-populate it within the PayPal experience. |
Build the PayPal Item object. A PayPal Item object requires the following fields.
{"name": "Cell Phone (Unlocked)","quantity": 1,"unitAmount": 100}
Field | Required/Optional | Description |
name | Required | The name of the item that appears in the PayPal authorize screen. |
quantity | Required | The quantity of the item that appears in the PayPal authorize screen. |
unitAmount | Required | The amount of the item. |
Build the PayPal Shipping Information object. A PayPal Shipping Information object requires the following fields.
{"recipient": "John Doe","phoneNumber": "555-555-1212","address": {"line1": "54321 Fake St.","line2": "Apt. 3C","city": "Minnetonka","state": "MN","country": "US","postalCode": "55341","country": "US"}}
Field | Required/Optional | Description |
recipient | Required | The first and last name of the person receiving the shipment. |
phoneNumber | Required | The phone number of the person receiving the shipment. |
address | Required | A PayPal Shipping Address object which contains the Shipping Address of the person receiving the shipment. |
Build the PayPal Shipping Address object. A PayPal Shipping Address object requires the following fields.
{"line1": "54321 Fake St.","line2": "Apt. 3C","city": "Minnetonka","state": "MN","country": "US","postalCode": "55341"}
Field | Required/Optional | Description |
line1 | Required | Line 1 of the customer's billing address. |
line2 | Required | Line 2 of the Customer's billing address. |
city | Required | City of the customer's billing address. |
state | Required | State of the customer's billing address. |
postalCode | Required | Postal code of the customer's billing address. |
country | Required | Country of the customer's billing address. |
To create a PayPal payment source, you must use the createSource method exposed via DigitalRiver.js.
var data = {"type": "payPal","sessionId": "ea03bf6f-84ef-4993-b1e7-b7d5ecf71d1f","payPal": {"returnUrl": "http://mypage.com","cancelUrl": "https://mypage.com/cancel"}}digitalriver.createSource(data).then(function(result) {if (result.error) {//handle errors} else {var source = result.source;//send source to back endsendToBackend(source);}});
{"clientId": "gc","channelId": "drdod15","liveMode": false,{"clientId": "gc","channelId": "drdod15","liveMode": false,"id": "d6a44e5d-1373-4013-847d-10deb4ded4df","clientSecret": "d6a44e5d-1373-4013-847d-10deb4ded4df_ddd44e5d-1373-4013-847d-10deb4ded4df","type": "payPal","reusable": false,"amount": "10.00","currency": "USD","state": "pending_redirect","creationIp": "209.87.178.4","createdTime": "2019-05-22T00:00:46.975Z","updatedTime": "2019-05-22T00:00:46.975Z","flow": "redirect","redirect": {"redirectUrl": "https://api.digitalriver.com:443/payments/redirects/b8f2207b-8236-4608-b5a2-812790d42ed8?apiKey=pk_test_6cb0fe9ce3124093a9ad906f6c589e2ds","returnUrl": "https://example.com?action=paymentSuccess","cancelUrl": "https://example.com?action=paymentFailure"},"payPal": {"shipping": {"recipient": "John Doe","phoneNumber": "555-555-1212","address": {"line1": "54321 Fake St.","line2": "Apt. 3C","city": "Minnetonka","state": "MN","country": "US","postalCode": "55341"}},"token": "EC-1HD67063RG318840B"}} "clientSecret": "d6a44e5d-1373-4013-847d-10deb4ded4df_ddd44e5d-1373-4013-847d-10deb4ded4df","type": "payPal","reusable": false,"amount": "10.00","currency": "USD","state": "pending","creationIp": "209.87.178.4","createdTime": "2019-05-22T00:00:46.975Z","updatedTime": "2019-05-22T00:00:46.975Z","flow": "redirect","redirect": {"redirectUrl": "https://api.digitalriver.com:443/payments/redirects/b8f2207b-8236-4608-b5a2-812790d42ed8?apiKey=pk_test_6cb0fe9ce3124093a9ad906f6c589e2ds","returnUrl": "https://example.com?action=paymentSuccess","cancelUrl": "https://example.com?action=paymentFailure"},"payPal": {"shipping": {"recipient": "John Doe","phoneNumber": "555-555-1212","address": {"line1": "10380 Bren Road W","line2": "","city": "Minnetonka","state": "MN","country": "US","postalCode": "55343"}},"token": "EC-1HD67063RG318840B"}}
When you create a PayPal source, the customer is required to authorize the charge at PayPal. You can accomplish this by either redirecting the customer to PayPal or using the PayPal SDK to authorize the charge as part of your experience.
To redirect your customer to PayPal for authorization, use the redirectUrl
parameter in your createSource response.
window.location.href = sourceResponse.redirect.redirectUrl;
At PayPal, the customer can authorize or cancel the transaction when presented with the transaction details. If the authorization is successful, the customer will be redirected to the PayPal Return URL parameter you specified when you created the source. If the customer cancels, they will be returned to the PayPal Cancel URL parameter you specified.
Use the PayPal Checkout SDK to streamline the authorizing PayPal transactions. This will allow you to control things like the appearance of the PayPal button and embed the entire experience into your workflow.
The PayPal SDK guide is located here: https://developer.paypal.com/docs/archive/checkout/​
More details on how you can customize the PayPal button is located here: https://developer.paypal.com/docs/archive/checkout/how-to/customize-button/#​
Example:
Include the PayPal Checkout SDK on your page and specify a location where the button will appear.
Use the PayPal SDK to customize and place the PayPal button on your page. The PayPal SDK returns two functions, onAuthorize
and onCancel
. If the payment was authorized, use the source you created earlier by attaching to an order or cart.
<script src="https://www.paypalobjects.com/api/checkout.js"></script><div id="paypal-button"></div>
var paypalSourceData = {"type": "payPal","amount": 10,"currency": "USD","payPal": {"returnUrl": redirectUrl,"cancelUrl": cancelUrl,"items": [{"name": "Universe A1+ 256GB (Unlocked)","quantity": 1,"unitAmount": 959.99,},{"name": "AKG Y50BT On-Ear Bluetooth Headphones","quantity": 1,"unitAmount": 0,}],"taxAmount": 67.20,"shippingAmount": 0,"amountsEstimated": true,"requestShipping": true,"shipping": {"recipient": "John Doe","phoneNumber": "555-555-1212","address": {"line1": "10380 Bren Road W","line2": "","city": "Minnetonka","state": "MN","country": "US","postalCode": "55343"}}}};paypal.Button.render({// Configure environmentenv: 'sandbox',// Customize button (optional)locale: 'en_US',style: {label: 'checkout',size: 'responsive',color: 'gold',shape: 'rect',layout: 'horizontal',fundingicons: 'false',tagline: 'false'},// Set up a paymentpayment: function(data, actions) {return digitalriver.createSource(paypalSourceData).then(function(result) {if (result.error) {//handle the errors that were returnedhandleErrors(result.error)} else {return result.source.payPal.token;}});},// Execute the paymentonAuthorize: function(data, actions) {//the payment has been authorized, use the source and attach it to your customer's account.doSomething();},onCancel: function(data) {//the payment has been cancelled, do something to try and get the shopper back on trackdoSomethingElse();}}, '#paypal-button');
Once authorized, you can use the source by attaching to an order or cart.
Attach the source to a cart
{"paymentMethod": {"sourceId": "e7ba0595-059c-460c-bad8-2812123b9313"}}
PayPal supports the following geographies and currencies.
American Samoa (AS), Andorra (AD), Austria (AT), Australia (AU), Bangladesh (BD), Belgium (BE), Bouvet Islands (BV), Brazil (BR), British Indian Ocean Territory (IO), Belgium (BE), Canada (CA), Christmas Island (CX), Cocos Islands (CC), Cook Islands (CK), Cyprus (CY), Czech Republic (CZ), Denmark (DK), Ecuador (EC), El Salvador (SV), Estonia (EE), Faroe Islands (FO), Finland (FI), France (FR), French Guiana (GF), Germany (DE), Greenland (GL), Greece (GR), Guam (GU), Heard Island & McDonald Islands (HM), Hong Kong (HK), Hungary (HU), Ireland (IE), Israel (IL), Italy (IT), Japan (JP), Kiribati (KI), Latvia (LV), Liechtenstein (LI), Lithuania (LT), Luxembourg (LU), Malta (MT), Marshall Islands (MH), Mexico (MX), Micronesia (FM), Monaco (MC), Netherlands (NL), New Zealand (NZ), Niue (NU), Norfolk Island (NF), Northern Mariana Islands (MP), Norway (NO), Panama (PA), Peru (PE), Philippines (PH), Poland (PL), Pitcairn Islands (PN), Puerto Rico (PR), Portugal (PT), Reunion (RE), Romania (RO), Russia (RU), Saint Pierre & Miquelon (PM), San Marino (SM), Singapore (SG), Slovakia (SK), Slovenia (SI), South Georgia & South Sandwich Islands (GS), Spain (ES), Svalbard & Jan Mayen Islands (SJ), Sweden (SE), Switzerland (CH), Taiwan (TW), Thailand (TH), Tokelau (TK), Tristan da Cunha (SH), Turks & Caicos Islands (TC), Tuvalu (TV), United Kingdom (GB), United States (US), United States Minor Outlying Islands (UM), Vatican (VA), Venezuela (VE)
AUD, BRL, CAD, CHF, CZK, DKK, EUR, GBP, HKD, HUF, ILS, JPY, MXN, NOK, NZD, PHP, PLN, RUB, SEK, SGD, THB, TWD, USD
The PayPal Billing Agreement allows consumers to use their PayPal account to make recurring subscription payments. Consumers have the option to choose to auto-renew or manually renew.
Currency supported: All currencies available in supported countries.
You can find an example of the integration here.
Create a PayPal Billing Agreement payment method for your app or website in four easy steps:
Build the PayPal Billing Agreement Source Request object. A PayPal Billing Agreement Source Request object requires the following fields.
Field | Value |
type | payPalBilling |
amount | The total value of the transaction. |
currency | The currency of the transaction. |
payPalBilling | A PayPal Source Details object that includes the details of the transaction. |
To create a PayPal Billing Agreement payment source, you must use the createSource method exposed via DigitalRiver.js.
var data = {"type": "payPalBilling","sessionId": "ea03bf6f-84ef-4993-b1e7-b7d5ecf71d1f","payPal": {"returnUrl": "http://mypage.com","cancelUrl": "https://mypage.com/cancel"}}digitalriver.createSource(data).then(function(result) {if (result.error) {//handle errors} else {var source = result.source;//send source to back endsendToBackend(source);}});
{"clientId": "gc","channelId": "drdod15","liveMode": false,"id": "d6a44e5d-1373-4013-847d-10deb4ded4df","clientSecret": "d6a44e5d-1373-4013-847d-10deb4ded4df_accd4e5d-1373-4013-847d-10deb4ded4df","type": "payPalBilling","reusable": false,"amount": "10.00","currency": "USD","state": "pending","creationIp": "209.87.178.4","createdTime": "2019-05-22T00:00:46.975Z","updatedTime": "2019-05-22T00:00:46.975Z","flow": "redirect","redirect": {"redirectUrl": "https://api.digitalriver.com:443/payments/redirects/b8f2207b-8236-4608-b5a2-812790d42ed8?apiKey=pk_test_6cb0fe9ce3124093a9ad906f6c589e2ds","returnUrl": "https://example.com?action=paymentSuccess","cancelUrl": "https://example.com?action=paymentFailure"},"payPalBilling": {"shipping": {"recipient": "John Doe","phoneNumber": "555-555-1212","address": {"line1": "10380 Bren Road W","line2": "","city": "Minnetonka","state": "MN","country": "US","postalCode": "55343"}},"token": "EC-1HD67063RG318840B"}}
{"clientId": "gc","channelId": "drdod15","liveMode": false,"id": "d6a44e5d-1373-4013-847d-10deb4ded4df","clientSecret": "d6a44e5d-1373-4013-847d-10deb4ded4df_accd4e5d-1373-4013-847d-10deb4ded4df","type": "payPalBilling","reusable": false,"amount": "10.00","currency": "USD","state": "pending","creationIp": "209.87.178.4","createdTime": "2019-05-22T00:00:46.975Z","updatedTime": "2019-05-22T00:00:46.975Z","flow": "redirect","redirect": {"redirectUrl": "https://api.digitalriver.com:443/payments/redirects/b8f2207b-8236-4608-b5a2-812790d42ed8?apiKey=pk_test_6cb0fe9ce3124093a9ad906f6c589e2ds","returnUrl": "https://example.com?action=paymentSuccess","cancelUrl": "https://example.com?action=paymentFailure"},"payPalBilling": {"shipping": {"recipient": "John Doe","phoneNumber": "555-555-1212","address": {"line1": "10380 Bren Road W","line2": "","city": "Minnetonka","state": "MN","country": "US","postalCode": "55343"}},"token": "EC-1HD67063RG318840B"}}
When you create a PayPal Billing Agreement source, the customer is required to authorize the charge through PayPal. You can accomplish this by either redirecting the customer to PayPal or use the PayPal SDK to authorize the charge as part of your experience.
To redirect your customer to PayPal for authorization, use the redirectUrl
parameter in your createSource
response.
window.location.href = sourceResponse.redirect.redirectUrl;
PayPal will present the customer with the transaction details where they can authorize, or cancel the transaction. A successful authorization redirects the customer to the PayPal Return URL parameter you specified when you created the source. If the customer cancels, they will return to the PayPal Cancel URL parameter you specified when you created the source.
Use the PayPal Checkout SDK to streamline the authorizing PayPal transactions. This will allow you to control things like the appearance of the PayPal button and embed the entire experience into your workflow.
The PayPal SDK guide is located here: https://developer.paypal.com/docs/archive/checkout/​
More details on how you can customize the PayPal button is located here: https://developer.paypal.com/docs/archive/checkout/how-to/customize-button/#​
Example:
Include the PayPal Checkout SDK on your page and specify a location where the button will appear.
Use the PayPal SDK to customize and place the PayPal button on your page. The PayPal SDK returns two functions, onAuthorize
and onCancel
. If the payment was authorized, use the source you created earlier by attaching to a shopper or customer.
var paypalSourceData = {"type": "payPalBilling","amount": 10,"currency": "USD","payPalBilling": {"returnUrl": redirectUrl,"cancelUrl": cancelUrl,"items": [{"name": "Universe A1+ 256GB (Unlocked)","quantity": 1,"unitAmount": 959.99,},{"name": "AKG Y50BT On-Ear Bluetooth Headphones","quantity": 1,"unitAmount": 0,}],"taxAmount": 67.20,"shippingAmount": 0,"amountsEstimated": true,"requestShipping": true,"shipping": {"recipient": "John Doe","phoneNumber": "555-555-1212","address": {"line1": "10380 Bren Road W","line2": "","city": "Minnetonka","state": "MN","country": "US","postalCode": "55343"}}}};paypal.Button.render({// Configure environmentenv: 'sandbox',// Customize button (optional)locale: 'en_US',style: {label: 'checkout',size: 'responsive',color: 'gold',shape: 'rect',layout: 'horizontal',fundingicons: 'false',tagline: 'false'},// Set up a paymentpayment: function(data, actions) {return digitalriver.createSource(paypalSourceData).then(function(result) {if (result.error) {//handle the errors that were returnedhandleErrors(result.error)} else {return result.source.payPal.token;}});},// Execute the paymentonAuthorize: function(data, actions) {//the payment has been authorized, use the source and attach it to your customer's account.doSomething();},onCancel: function(data) {//the payment has been cancelled, do something to try and get the shopper back on trackdoSomethingElse();}}, '#paypal-button');
Once authorized, you can use the source by attaching it to a cart or attaching it to a shopper.
{"paymentMethod": {"sourceId": "e7ba0595-059c-460c-bad8-2812123b9313"}}
{"paymentOption": {"nickName": "My Token","isDefault": "true","sourceId": "61033d62-c0f4-4a7e-b844-07daf26ba84e"}}
PayPal Billing Agreement supports the following geographies and currencies.
American Samoa (AS), Andorra (AD), Austria (AT), Australia (AU), Bangladesh (BD), Belgium (BE), Bouvet Islands (BV), Bulgaria (BG), Brazil (BR), British Indian Ocean Territory (IO), Canada (CA), Cocos Islands (CC), Cook Islands (CK), Christmas Island (CX), Cyprus (CY), Czech Republic (CZ), Denmark (DK), Ecuador (EC), El Salvador (SV), Estonia (EE), Faroe Islands (FO), Finland (FI), France (FR), French Guiana (GF), Germany (DE), Great Britain (GB), Greece (GR), Greenland (GL), Guam (GU), Heard Island & McDonald Islands (HM), Hong Kong (HK), Hungary (HU), Ireland (IE), Israel (IL), Italy (IT), Jordan (JO), Kiribati (KI), Liechtenstein (LI), Lithuania (LT), Luxembourg (LU), Latvia (LV), Malta (MT), Marshall Islands (MH), Mexico (MX), Micronesia (FM), Monaco (MC), Netherlands (NL), New Zealand (NZ), Niue (NU), Norfolk Island (NF), Northern Mariana Islands Malta (MP), Panama (PA), Peru (PE), Philippines (PH), Pitcairn Islands (PN), Poland (PL), Portugal (PT), Puerto Rico (PR), Reunion (RE), Romania (RO), Russia (RU), Saint Pierre & Miquelon (PM), San Marino (SM), Saudi Arabia (SA), Singapore (SG), Slovakia (SK), Slovenia (SI), South Georgia & South Sandwich Islands (GS), Spain (ES), Svalbard & Jan Mayen Islands (SJ), Sweden (SE), Switzerland (CH), Taiwan (TW), Thailand (TH), Tokelau (TK), Tristan da Cunha (SH), Turks & Caicos Islands (TC), Tuvalu (TV), United States (US), US Minor Outlying Islands (UM), Vatican (VA), Venezuela (VE)
Supported currencies
AUD, BRL, CAD, CHF, CZK, DKK, EUR, GBP, HKD, HUF, ILS, JPY, MXN, NOK, NZD, PHP, PLN, RUB, SEK, SGD, THB, TWD, USD
Additional Setup Required: If you are interested in using PayPal Credit, contact your Account Manager. The Account Manager will send set up instructions for PayPal Credit banners after you sign the client addendum.
PayPal Credit allows consumers to buy online and pay later for their products. This payment method is accepted in thousands of online stores and is available everywhere PayPal is accepted (as long as the PayPal Credit and PayPal accounts are linked). PayPal Credit uses the date of birth and last 4 digits of SSN to approve or deny a consumer for a line of credit, and the applicant will be notified within seconds whether they have been approved or not.
Create a PayPal payment method for your app or website in four easy steps:
Build a Credit Source Request object. A PayPal Billing Credit Source Request object requires the following fields.
Field | Value |
type | payPalCredit |
amount | The total value of the transaction. |
currency | The currency of the transaction. |
payPalCredit | A PayPal Source Details object that includes the details of the transaction. |
To create a PayPal Credit payment source, you must use the createSource method exposed via DigitalRiver.js.
var data = {"type": "payPalCredit","sessionId": "ea03bf6f-84ef-4993-b1e7-b7d5ecf71d1f","payPal": {"returnUrl": "http://mypage.com","cancelUrl": "https://mypage.com/cancel"}}digitalriver.createSource(data).then(function(result) {if (result.error) {//handle errors} else {var source = result.source;//send source to back endsendToBackend(source);}});
{"clientId": "gc","channelId": "drdod15","liveMode": false,"id": "d6a44e5d-1373-4013-847d-10deb4ded4df","clientSecret": "d6a44e5d-1373-4013-847d-10deb4ded4df_ssdd4e5d-1373-4013-847d-10deb4ded4df","type": "payPal","reusable": false,"amount": "120.99","currency": "USD","state": "pending_redirect","creationIp": "209.87.178.4","createdTime": "2019-05-22T00:00:46.975Z","updatedTime": "2019-05-22T00:00:46.975Z","flow": "redirect","redirect": {"redirectUrl": "https://api.digitalriver.com:443/payments/redirects/b8f2207b-8236-4608-b5a2-812790d42ed8?apiKey=pk_test_6cb0fe9ce3124093a9ad906f6c589e2ds","returnUrl": "https://example.com?action=paymentSuccess","cancelUrl": "https://example.com?action=paymentFailure"},"payPalCredit": {"shipping": {"recipient": "John Doe","phoneNumber": "555-555-1212","address": {"line1": "54321 Fake St.","line2": "Apt. 3C","city": "Minnetonka","state": "MN","country": "US","postalCode": "55341"}},"token": "EC-1HD67063RG318840B"}}
When you create a PayPal Credit Source, the customer is required to authorize the charge at PayPal. You can accomplish this by either redirecting the customer to PayPal or use the PayPal SDK to authorize the charge as part of your experience.
To redirect your customer to PayPal for authorization, use the redirectUrl
parameter in your createSource
response.
window.location.href = sourceResponse.redirect.redirectUrl;
PayPal will present the customer with the transaction details where they can authorize or cancel the transaction. A successful authorization redirects the customer to the PayPal Return URL parameter you specified when you created the source. If the customer cancels, they will return to the PayPal Cancel URL parameter you specified when you created the source.
Use the PayPal Checkout SDK to streamline the authorizing PayPal transactions. This will allow you to control things like the appearance of the PayPal button and embed the entire experience into your workflow.
The PayPal SDK guide is located here: https://developer.paypal.com/docs/archive/checkout/​
For more details on how you can customize the PayPal button, go to https://developer.paypal.com/docs/archive/checkout/how-to/customize-button/#​
Example:
Include the PayPal Checkout SDK on your page and specify a location where the button will appear.
<script src="https://www.paypalobjects.com/api/checkout.js"></script><div id="paypal-button"></div>
Use the PayPal SDK to customize and place the PayPal button on your page. The PayPal SDK returns two functions, onAuthorize
and onCancel
. If the payment was authorized, use the source you created earlier by attaching to an order or cart.
var paypalSourceData = {"type": "payPal","amount": 10,"currency": "USD","payPal": {"returnUrl": redirectUrl,"cancelUrl": cancelUrl,"items": [{"name": "Universe A1+ 256GB (Unlocked)","quantity": 1,"unitAmount": 959.99,},{"name": "AKG Y50BT On-Ear Bluetooth Headphones","quantity": 1,"unitAmount": 0,}],"taxAmount": 67.20,"shippingAmount": 0,"amountsEstimated": true,"requestShipping": true,"shipping": {"recipient": "John Doe","phoneNumber": "555-555-1212","address": {"line1": "54321 Fake St.","line2": "Apt. 3C","city": "Minnetonka","state": "MN","country": "US","postalCode": "55341"}}}};paypal.Button.render({// Configure environmentenv: 'sandbox',// Customize button (optional)locale: 'en_US',style: {label: 'credit',size: 'responsive',color: 'blue',shape: 'rect',layout: 'horizontal',fundingicons: 'false',tagline: 'false'},// Set up a paymentpayment: function(data, actions) {return digitalriver.createSource(paypalSourceData).then(function(result) {if (result.error) {//handle the errors that were returnedhandleErrors(result.error)} else {return result.source.payPalCredit.token;}});},// Execute the paymentonAuthorize: function(data, actions) {//the payment has been authorized, use the source and attach it to your customer's account.doSomething();},onCancel: function(data) {//the payment has been cancelled, do something to try and get the shopper back on trackdoSomethingElse();}}, '#paypal-button');
Once authorized, you can use the source by attaching it to a cart.
{"paymentMethod": {"sourceId": "e7ba0595-059c-460c-bad8-2812123b9313"}}
PayPal Credit supports the following geographies and currencies.
United States (US)
USD
Additional setup optional: If you are interested in promoting Pay in 4, contact your Customer Success Representative. The Representative will provide the set-up instructions for PayPal in 4 banners.
Pay in 4 is a short-term card installment payment option automatically provided by PayPal when a customer signs in to PayPal Checkout. Pay in 4 allows United States shoppers to pay for physical good purchases ranging from $30 - $600 in four interest-free payments every two weeks over six weeks, with the first payment due at checkout. This option is currently only available in the United States.
When a customer selects this payment method, a "soft hit" will appear in their credit report.