On this page
No Headings
Last updated: June 30, 2026
Use your payer's original transaction ID to charge them later with reference transactions. A reference transaction is a transaction you initiate through an established contract with the payer and from which you can derive subsequent payments.
Important: Reference transactions are only available to Website Payments Pro merchants who have migrated to an Advanced Credit and Debit Card integration.
This server-side integration uses Orders REST API. To complete this integration, you will need:
Reference transactions are also available if you have previously integrated with the DoReferenceTransactionAPI operation (NVP, SOAP).
Use Postman to explore and test PayPal APIs.
Use reference transactions to:
Provide an order ID from a previous transaction or generate a new one.
API endpoint used: Create order
curl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS-TOKEN' \
-H 'PayPal-Partner-Attribution-Id: BN-CODE' \
-H 'PayPal-Auth-Assertion: AUTH-ASSERTION-JWT' \
-d '{
"intent": "CAPTURE",
"purchase_units": [
{
"amount": {
"currency_code": "USD",
"value": "100.00"
}
}
]
}'After you copy the code in the sample request, modify the following:
ACCESS-TOKEN: Your access token.BN-CODE: Your PayPal attribution ID to receive revenue attribution. To find your BN code, see Code and Credential Reference.AUTH-ASSERTION-JWT: Your PayPal auth assertion token.intent: The value of intent in this sample is CAPTURE, which captures the payment immediately. You can choose to separate the authorize and capture actions by changing the intent to AUTHORIZE.A successful request results in the following:
201 Created.5O190127TN364715T.{
"id": "5O190127TN364715T",
"status": "CREATED",
"links": [
{
"href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
"rel": "self",
"method": "GET"
},
{
"href": "https://www.paypal.com/checkoutnow?token=5O190127TN364715T",
"rel": "approve",
"method": "GET"
},
{
"href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
"rel": "update",
"method": "PATCH"
},
{
"href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T/capture",
"rel": "capture",
"method": "POST"
}
]
}Authorize payment for an order using a previous transaction ID and order ID. Ensure you have an original transaction ID from a previous transaction made by the same buyer.
API endpoint used: Authorize payment for order
curl -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders/5O190127TN364715T/authorize \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS-TOKEN' \
-H 'PayPal-Partner-Attribution-Id: BN-CODE' \
-H 'PayPal-Auth-Assertion: AUTH-ASSERTION-JWT' \
-H 'Accept-Language: en_US' \
-d '{
"payment_source": {
"token": {
"id": "67N9717781765035V",
"type": "PAYPAL_TRANSACTION_ID"
}
}
}'After you copy the code in the sample request, modify the following:
Access-Token: Your access token.PAYPAL-AUTH-ASSERTION: Your PayPal-Auth-Assertion token.BN-CODE: Your PayPal Attribution ID to receive revenue attribution. To find your BN code, see Code and Credential Reference.5O190127TN364715T.payment_source: Replace the payment_source sample ID with your transaction ID. In the example, the transaction ID is 67N9717781765035V.A successful request results in the following:
201 Created.COMPLETED.Capture payment for an order using a previous transaction ID and an order ID.
API endpoint used: Capture payment for order
curl -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders/5O190127TN364715T/capture \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS-TOKEN' \
-H 'PayPal-Partner-Attribution-Id: BN-CODE' \
-H 'PayPal-Auth-Assertion: AUTH-ASSERTION-JWT' \
-H 'PayPal-Request-ID: REQUEST-ID' \
-H 'Accept-Language: en_US' \
-d '{
"payment_source": {
"token": {
"id": "67N9717781765035V",
"type": "PAYPAL_TRANSACTION_ID"
}
}
}'After you copy the code in the sample request, modify the following:
ACCESS-TOKEN: Your access token.BN-CODE: Your PayPal Attribution ID to receive revenue attribution. To find your BN code, see Code and Credential Reference.AUTH-ASSERTION-JWT: Your PayPal auth assertion token.5O190127TN364715T.REQUEST-ID: Replace the sample ID with a unique ID you generate. This ID helps prevent duplicate authorizations if the API call gets disrupted. For more information, see API idempotency.payment_source: Replace the payment_source sample ID with your transaction ID. In the example, the transaction ID is 67N9717781765035V.A successful request results in the following:
201 Created.COMPLETED.