Manage your payments
Query
Make a GET
request on the paypal:events
action link.
Note: No request body is needed for this request.
Query example request
GET https://try.access.worldpay.com/payments/alternative/action/paypal/events/eyJrIjoiazNhYjYzMiJ9
Query response for event sentForSettlement
You receive:
- an HTTP code
200
- the
lastEvent
for yourquery
request - links to
refund your payment - links to
partial refund your payment
Example response:
{
"lastEvent": "sentForSettlement",
"_links": {
"action:refund": {
"href": "https://try.access.worldpay.com/payments/alternative/action/paypal/refunds/full/eyJrIjoiazNhYjYzMiJ9"
},
"action:partialRefund": {
"href": "https://try.access.worldpay.com/payments/alternative/action/paypal/refunds/partials/I5s6cjh6XLbzuHiw5xRULjPPVKjYX-41ztBmQNIa9-k"
},
"action:events": {
"href": "https://try.access.worldpay.com/payments/alternative/action/paypal/events/I5s6zFXLbzCw5xRULjPPVKjYX-41ztBmQNj4Ia9-k"
},
"curies": [
{
"name": "action",
"href": "https://try.access.worldpay.com/rels/payments/alternative/action/paypal/{rel}",
"templated": true
}
]
}
}
Query response for events other than sentForSettlement
You receive:
- an HTTP code
200
- the
lastEvent
for yourquery
request - links to
query your payment
Example response:
{
"lastEvent": "|authorized|sentForRefund|refundFailed|refused|error|captureFailed",
"_links": {
"action:events": {
"href": "https://try.access.worldpay.com/payments/alternative/action/paypal/events/eyJrIjoiazNhYjYzMiJ9"
},
"curies": [
{
"name": "action",
"href": "https://try.access.worldpay.com/rels/payments/alternative/action/paypal/{rel}",
"templated": true
}
]
}
}
Refund
To refund a payment the latest status must be sentForSettlement
.
POST
your request to the paypal:refund
action link.
Note: No request body is needed for this request.
Refund example request
POST https://try.access.worldpay.com/payments/alternative/action/paypal/refunds/full/eyJrIjoiazNhYjYzMiJ9
Refund responses
You receive:
- an HTTP code
202
- links to
query your payment
Example response:
{
"_links": {
"action:events": {
"href": "https://try.access.worldpay.com/payments/alternative/action/paypal/events/eyJrIjoiazNhYjYzMiJ9"
},
"curies": [
{
"name": "action",
"href": "https://try.access.worldpay.com/rels/payments/alternative/action/paypal/{rel}",
"templated": true
}
]
}
}
Possible outcomes
sentForRefund
- The refund has been accepted.refundFailed
- The refund was not successful.sentForSettlement
- Query the payment again later. The refund might already be in process.
Partial refund
Partial refund request
Send the amount
to partial refund and the authorization currency
in the body.
Partial refund example request
POST https://try.access.worldpay.com/payments/alternative/action/paypal/refunds/partials/I5s6cjh6XLbzuHiw5xRULjPPVKjYX-41ztBmQNIa9-k
Partial refund request body:
{
"value": {
"amount": 100,
"currency": "GBP"
},
"reference": "partial-refund-reference"
}
Description of your partial refund request parameters
Parameter | Required | Description |
---|---|---|
value.amount | An identifier for the amount being used. | |
value.currency | An identifier for the currency being used. | |
reference | A unique reference generated by you to identify the partial refund. |
Partial refund response
You receive:
- an HTTP code
202
- links to
query your payment
Example response:
{
"_links": {
"action:events": {
"href": "https://try.access.worldpay.com/payments/alternative/action/paypal/events/I5s6c2zFXLbq70IhCw5xRULjPPVKjYX-NTj4Ia9-k"
},
"curies": [
{
"name": "action",
"href": "https://try.access.worldpay.com/rels/payments/alternative/action/paypal/{rel}",
"templated": true
}
]
}
}