Financing Presentment
Last updated: Nov 30th, 10:25pm
Financing presentment enables you to display Pay Later messaging to your customers to inform them of PayPal’s buy now, pay later options. You can use PayPal’s preferred message content or you can use the metadata and work with your account representative to create alternative Pay Later messages.
Follow these steps to add financing presentment for Pay Later messages.
Know before you code
- Complete Get started to set up your PayPal account, client ID, and sandbox emails for testing.
- Complete a standard PayPal checkout integration (recommended).
Fetch financing presentment
A financing presentment response contains all the information that you need to present a Pay Later message to your consumer.
To fetch a message, you can pass any of the following optional parameters:
| Parameter | Type | Description |
|---|---|---|
amount |
object | The product or cart amount for the message. |
buyer_country_code |
string | Override the default country tied to the merchant account. |
offer_type |
string | Specify a specific Pay Later offer. |
For a list of available parameters, see Financing Presentment API Reference.
Example
1curl -v -X POST https://api-m.paypal.com/v1/credit/fetch-presentment-messages \2-H "Content-Type: application/json" \3-H "Authorization: Bearer <Access-Token>" \4-d '{5 "amount": {6 "currency_code": "USD",7 "value": "100"8 }9}'
Note: For partner integrations, include the PayPal-Auth-Assertion header so that PayPal uses the merchant's account to determine the available presentment options. Include the PayPal-Partner-Attribution-Id (build notation —BN— code) which is also known as BN code as well to identify the partner integration.
Example for Partner Integrations
1curl -v -X POST https://api-m.paypal.com/v1/credit/fetch-presentment-messages \2-H "Content-Type: application/json" \3-H "Authorization: Bearer <Access-Token>" \4-H "PayPal-Auth-Assertion: <Auth-Assertion>" \5-H "PayPal-Partner-Attribution-Id: <Partner-Attribution-Id>" \6-d '{7 "amount": {8 "currency_code": "USD",9 "value": "100"10 }11}'
Step result
The response includes your preferred message content, along with message metadata that you can use to create alternative messaging content.
1{2 "messages": [3 {4 "meta": {5 "credit_product_group": "PAY_LATER",6 "offer_country_code": "US",7 "offer_type": "PAY_IN_4",8 "variables": {9 "qualifying": true,10 "apr": "0.00",11 "minimum_amount": {12 "currency_code": "USD",13 "value": "30.00"14 },15 "maximum_amount": {16 "currency_code": "USD",17 "value": "1500.00"18 },19 "periodic_payment": {20 "currency_code": "USD",21 "value": "25.00"22 },23 "total_payments": 4,24 "total_cost": {25 "currency_code": "USD",26 "value": "100.00"27 },28 "total_interest": {29 "currency_code": "USD",30 "value": "0.00"31 }32 },33 "click_url": "https://www.paypal.com/credit-presentment/ptrk//?v=3.0&t=1619194584&cfdata=f0hRHhl1HCYddBx9WX4FMFZsWj4SAEdXEggfSSdbI05wGTEeZlxgX2BUaEACRg9HDUkSdxJ.GjY8f1JkAzIOYA1YBBkQJwhwGiNLZwN6V2ZKYlJvRQUSB0ZcTE5wHmQLaQo5BSREcih3TDEFRwRFUgo7AXFgYxsMNzkUfBY1EydVGRkbTiwAdmwzXm9TCBM3BTQbKAMXQXMbSAkKcHk1STFHLBY1FycNJAAqV1YACzR1M2cI&cks=MjUyNmE0NGQ5NjMyNzEzYzIyZjdmNDUxODAzNzRmYTE&e=1.0&message_request_id=87c7c5d8-9f18-4e3d-bbd1-d3cba7206e63&bdata=pubid%3DR6YWJTMN92J2A%26vstrid%3Dff2b11491770a4ccde722448ffda3235%26vstid%3Dff8431e51780ae70376f6d7cffffffff%26ts%3D1619194584",34 "impression_url": "https://www.paypal.com/credit-presentment/ptrk//?v=3.0&t=1619194584&cfdata=f0hRHhl1HCYddBx9WX4FMFZsWj4SAEdXEggfSSdbI05wGTEeZlxgX2BUaEACRg9HDUkSdxJ.GjY8f1JkAzIOYA1YBBkQJwhwGiNLZwN6V2ZKYlJvRQUSB0ZcTE5wGSBcdWgBKxUrBzcfIAkjdidlPnY0&cks=ZjdmOTJhN2ZkMzkwZjA1MTE2MjcyMWNiZDI3ZTU2MzU&e=1.0&message_request_id=87c7c5d8-9f18-4e3d-bbd1-d3cba7206e63&bdata=pubid%3DR6YWJTMN92J2A%26vstrid%3Dff2b11491770a4ccde722448ffda3235%26vstid%3Dff8431e51780ae70376f6d7cffffffff%26ts%3D1619194584"35 },36 "content": {37 "default": {38 "main": "Pay in 4 interest-free payments of $25.00.",39 "disclaimer": "Learn more"40 },41 "generic": {42 "main": "Buy now. Pay over time.",43 "disclaimer": "Learn more"44 }45 }46 }47 ]48}
Render the message
After you retrieve the message information, you can create a promotional message.
Note: In order to meet PayPal's Marketing Guidelines, your PayPal representative must review and approve your promotional message if it differs from the preferred message.
For best results, your response should contain the following:
- Primary message content:
response.messages[0].content.default.main - Primary message disclaimer:
response.messages[0].content.default.disclaimer - Message interaction URL:
response.messages[0].meta.click_url - Message impression URL:
response.messages[0].meta.impression_url
Note: Ensure that the click_url page be only one click away from interacting with a message.
Note: When rendering a message, the impression_url must be included.
Simple example
The following is a simple message that opens a product marketing page when the buyer clicks Learn more.
1<p class="message">2 <img class="message__logo" src="paypal-logo.png" alt="PayPal logo">3 Pay in 4 interest-free payments of $25.00.4 <a class="message__disclaimer" href="(click_url from the response)">5 Learn more6 </a>7 <img src="(required impression_url from response)" aria-hidden="true">8</p>
Advanced Example
The following example creates a more seamless user experience by loading the click_url page within an IFrame. This displays the product marketing page after the user selects Learn more.
Note: When loading the click_url in an IFrame, the IFrame's dimensions should be set to 640px in width and 900px in height when space is available.
1<style>2 .modal {3 display: none;4 position: fixed;5 top: 0;6 left: 0;7 width: 100%;8 height: 100%;9 }10 .modal__content {11 position: absolute;12 top: 50%;13 left: 50%;14 transform: translate(-50%, -50%);15 }16</style>1718<p class="message">19 <img class="message__logo" src="paypal-logo.png" alt="PayPal logo">20 Pay in 4 interest-free payments of $25.00.21 <span class="message__disclaimer">22 Learn more23 </span>24 <img src="(required impression_url from response)" aria-hidden="true">25</p>2627<div class="modal" role="dialog" aria-modal="true">28 <iframe29 class="modal__content"30 title="PayPal Pay Later Further Information"31 src="(click_url from response)"32 width="640"33 height="900"34 ></iframe>35</div>3637<script>38 const disclaimer = document.querySelector('.message__disclaimer');39 const modal = document.querySelector('.modal');4041 disclaimer.addEventListener('click', () => {42 modal.style.display = 'block';43 });44 modal.addEventListener('click', () => {45 modal.style.display = 'none';46 });47</script>