On this page
No Headings
Last updated: June 18, 2026
Render payment buttons and process payments with the Orders API.
Note: The integration steps for implementing alternative payment methods are similar. If you've integrated another alternative payment method before, you can reuse that code with adjustments for this payment method.
PAYMENT.CAPTURE.COMPLETED - This webhook notifies about a successful order capture.PAYMENT.CAPTURE.DENIED - This webhook tells you when an order capture fails.You'll need to create the user interface to offer EPS and collect the buyer's information, then you'll use the API calls described in the remainder of this topic to:
full_name, country_code and EPS as the payment source.Refer to Payment method icons for icons you can use and download locations.
Use the buyer information you captured from your user interface to create an order with EPS as the payment source.
API endpoint used: Create order
curl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders \
-H 'PayPal-Request-Id: <PayPal-Request-Id>' \
-H 'Authorization: Bearer <Access-Token>' \
-H "Content-Type: application/json" \
-d '{
"intent": "CAPTURE",
"payment_source": {
"eps": {
"country_code": "AT",
"name": "John Doe"
}
},
"processing_instruction": "ORDER_COMPLETE_ON_PAYMENT_APPROVAL",
"purchase_units": [
{
"reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
"amount": {
"currency_code": "EUR",
"value": "1.00"
}
}
],
"application_context": {
"locale": "en-AT",
"return_url": "https://example.com/returnUrl",
"cancel_url": "https://example.com/cancelUrl"
}
}'After you copy the code in the sample request, modify the following:
Access-Token - Your access token.PayPal-Request-Id - Replace the sample ID with a unique ID you generate. This ID helps prevent duplicate authorizations in the event that the API call is disrupted. See also: API idempotencyintent - To use an alternative payment method, this parameter must be set to CAPTURE as it is in this sample code.payment_source - Specify eps as the payment method and include the country code and account holder's full name.purchase_units: amount - Pass the amount of the order and the currency code.processing_instruction - Set this value to ORDER_COMPLETE_ON_PAYMENT_APPROVAL as it is in this sample code.application_context - Specify the preferred language for returned errors, the URL the buyer is returned to after approving the purchase with their selected payment method, and the URL the buyer is returned to after canceling an approval with their selected payment method. While return_url and cancel_url are optional fields, this integration requires you specify them to handle the handoff from the payment method back to your site. You can use the cancel_url to redirect buyers when an error occurs while they're on the payment method's site, so make sure your cancel URL works for that situation as well as an actual cancellation by the buyer.Note: Change or add other parameters in the Create order request body to create an order that reflects the actual order details.
A successful request results in the following:
200 OK.payer-action HATEOAS URL in the next step. See also: HATEOAS links.In your user interface, attach the payer-action redirect URL returned in the Create Order response to the EPS payment button. This sends the buyer to their bank to approve the purchase. Once the buyer approves the purchase, the payment is automatically captured.
In the sample, the redirect URL is: "https://www.sandbox.paypal.com/payment/eps?token=1BV95196WW992540E"
After successfully completing the bank approval:
return_url mentioned in the Create Order request.PAYMENT.CAPTURE.COMPLETED webhook event is triggered, which indicates that payment capture was successful.After unsuccessful bank approval:
cancel_url mentioned in the Create Order request.Listen to the following webhooks to get the result of order capture:
PAYMENT.CAPTURE.COMPLETED webhook event indicates a successful order capture.PAYMENT.CAPTURE.DENIED webhook events indicate a failed order capture.up HATEOAS link indicates the order associated with this capture.See Subscribe to checkout webhooks for more information.
Here are some additional resources as you create webhook handler code:
{
"id": "WH-2B342482FC0449155-12X09416XP387753C",
"event_version": "1.0",
"create_time": "2022-04-05T10:37:05Z",
"resource_type": "capture",
"resource_version": "2.0",
"event_type": "PAYMENT.CAPTURE.COMPLETED",
"summary": "Payment completed for EUR 1.00 EUR",
"resource": {
"amount": {
"value": "1.00",
"currency_code": "EUR"
},
"supplementary_data": {
"related_ids": {
"order_id": "1BV95196WW992540E"
}
},
"create_time": "2022-04-05T10:37:05Z",
"update_time": "2022-04-05T10:37:05Z",
"final_capture": true,
"seller_receivable_breakdown": {
"paypal_fee": {
"value": "0.20",
"currency_code": "EUR"
},
"gross_amount": {
"value": "1.00",
"currency_code": "EUR"
},
"net_amount": {
"value": "0.80",
"currency_code": "EUR"
}
},
"custom_id": "Custom-1234",
"invoice_id": "Invoice-12345",
"links": [
{
"method": "GET",
"rel": "self",
"href": "https://api-m.sandbox.paypal.com/v2/payments/captures/56U00550J8319094C"
},
{
"method": "POST",
"rel": "refund",
"href": "https://api-m.sandbox.paypal.com/v2/payments/captures/56U00550J8319094C/refund"
},
{
"method": "GET",
"rel": "up",
"href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/1BV95196WW992540E"
}
],
"id": "56U00550J8319094C",
"status": "COMPLETED"
},
"links": [
{
"href": "https://api-m.sandbox.paypal.com/v1/notifications/webhooks-events/WH-2B342482FC0449155-12X09416XP387753C",
"rel": "self",
"method": "GET"
},
{
"href": "https://api-m.sandbox.paypal.com/v1/notifications/webhooks-events/WH-2B342482FC0449155-12X09416XP387753C/resend",
"rel": "resend",
"method": "POST"
}
]
}Note:
resource.supplementary_data.related_ids.order_id parameter in the webhook payload.Sample CHECKOUT.ORDER.DECLINED webhook passes the error code and message in the most_recent_error parameter of the purchase_unit object.Alternatively, if your app misses the webhook needed to capture the order, you can get the order capture result by sending a GET call to the Show order details endpoint of the Orders v2 API.
Important: Exercise caution when polling for order capture results using the Show order details endpoint. PayPal enforces rate limits on API requests.
curl -v -X GET https://api-m.sandbox.paypal.com/v2/checkout/orders/1BV95196WW992540E \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <Access-Token>"A successful request returns the HTTP 200 OK status code with a JSON response body that returns a COMPLETED status.
A successfully captured order has the following:
COMPLETED, which means the order was captured successfully.COMPLETED status is present in the response parameter purchase_units[0].payments.captures[0].up HATEOAS link indicates the order associated with this capture.After a successful payment, notify the buyer of a successful transaction. You can do this by sending a confirmation email.