showing custom_id information in a subscription
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to pass a serial number into a subscription that shows on the buyer side when the purchase a subscription. I'm trying to pass this information in the custom_id variable. Here's the code:
<form>
<label for="serial_number">Serial Number(s):</label>
<input type="text" id="serial_number">
</form>
<div id="paypal-button-container-P-5D310620RF0223030MPKW6GI"></div>
<script src="https://www.paypal.com/sdk/js?client-id=MYMEMBERID&vault=true&intent=subscription" data-sdk-integration-source="button-factory"></script>
<script>
paypal.Buttons({
style: {
shape: 'pill',
color: 'gold',
layout: 'vertical',
label: 'subscribe'
},
createSubscription: function(data, actions) {
return actions.subscription.create({
/* Creates the subscription */
plan_id:PresetSubscriptionID,
custom_id: serial_number
});
},
onApprove: function(data, actions) {
alert(data.subscriptionID); // You can add optional success message for the subscriber here
}
}).render('#paypal-button-container-PRESET Subscription ID'); // Renders the PayPal button
</script></A></p>
It doesn't work. MyMemberID, and SubscriptionID contain the actual values from paypal. Can someone please tell me why and how to fix
- Labels:
-
PayPal Here SDK

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good day @jetmanjim,
Thank you for posting to the PayPal community.
Please refer the below guide link and try passing the "custom_id" value for the subscription.
custom_id | string [ 1 .. 127 ] characters The custom id for the subscription. Can be invoice id. |
If your still facing any issues, please create a MTS ticket via - https://www.paypal-support.com/s/?language=en_US with the detail information and error details.
Sincerely,
Chiranjeevi
PayPal/Braintree MTS
If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- How do I create a smart subscribe button? in PayPal Upgrade Community
- API not returning information for all Subscription types in REST APIs
- cancel_url in /checkoutweb/signup page not working in PayPal Payments Standard
- Subscription API do not redirect after payment confirmation in Sandbox Environment
- Webhook Data Discrepancies Between Live and Sandbox Environments in REST APIs