Create new payment
Create a new payment for the account associated to the Authorisation token. The Authorisation token needs to be specified in the 'authorization' header as 'authorization: Bearer YOUR_API_KEY_HERE'
Request body
Example request
{
"amount": 12000,
"reference": "12345",
"description": "New passport application",
"language": "en",
"email": "Joe.Bogs@example.org",
"return_url": "https://service-name.gov.uk/transactions/12345",
"prefilled_cardholder_details": {
"cardholder_name": "J. Bogs",
"billing_address": {
"line1": "address line 1",
"line2": "address line 2",
"postcode": "AB1 2CD",
"city": "address city",
"country": "GB"
}
}
}Response
Created
Example response
{
"amount": 1200,
"state": {
"status": "created",
"message": "User cancelled the payment",
"code": "P010"
},
"description": "New passport application",
"reference": "12345",
"language": "en",
"payment_id": "hu20sqlact5260q2nanm0q8u93",
"payment_provider": "worldpay",
"return_url": "https://service-name.gov.uk/transactions/12345",
"created_date": "2016-01-21T17:15:00Z",
"_links": {
"self": {
"href": "https://an.example.link/from/payment/platform",
"method": "GET"
},
"next_url": {
"href": "https://an.example.link/from/payment/platform",
"method": "GET"
},
"next_url_post": {
"type": "application/x-www-form-urlencoded",
"href": "https://an.example.link/from/payment/platform",
"method": "POST"
},
"events": {
"href": "https://an.example.link/from/payment/platform",
"method": "GET"
},
"refunds": {
"href": "https://an.example.link/from/payment/platform",
"method": "GET"
},
"cancel": {
"type": "application/x-www-form-urlencoded",
"href": "https://an.example.link/from/payment/platform",
"method": "POST"
},
"capture": {
"type": "application/x-www-form-urlencoded",
"href": "https://an.example.link/from/payment/platform",
"method": "POST"
}
},
"provider_id": "null",
"email": "citizen@example.org",
"refund_summary": {
"status": "available",
"amount_available": 100
},
"settlement_summary": {
"capture_submit_time": "2016-01-21T17:15:000Z",
"captured_date": "2016-01-21",
"settled_date": "2016-01-21"
},
"card_details": {
"last_digits_card_number": "1234",
"first_digits_card_number": "123456",
"cardholder_name": "Mr. Card holder",
"expiry_date": "04/24",
"billing_address": {
"line1": "address line 1",
"line2": "address line 2",
"postcode": "AB1 2CD",
"city": "address city",
"country": "GB"
},
"card_brand": "Visa",
"card_type": "debit"
}
}Changes
Changed in 6 of the 50 revisions of this API.715
- ▲
removed the request body
request-body-removed
- ▲
removed the media type
application/jsonfor the response with the statusresponse-media-type-removed
- ▲
removed the media type
application/jsonfor the response with the statusresponse-media-type-removed
- ▲
removed the media type
application/jsonfor the response with the statusresponse-media-type-removed
- ▲
removed the media type
application/jsonfor the response with the statusresponse-media-type-removed
- ▲
removed the media type
application/jsonfor the response with the statusresponse-media-type-removed
- ○
the endpoint scheme security
Authorizationwas added to the APIapi-security-added
- ○
the endpoint scheme security
BearerAuthwas removed from the APIapi-security-removed
This revision also has 46 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ▲
added required request body
request-body-added-required
- ○
the endpoint scheme security
BearerAuthwas added to the APIapi-security-added
- ○
the endpoint scheme security
Authorizationwas removed from the APIapi-security-removed
- ○
added the media type
application/jsonfor the response with the statusresponse-media-type-added
- ○
added the media type
application/jsonfor the response with the statusresponse-media-type-added
- ○
added the media type
application/jsonfor the response with the statusresponse-media-type-added
- ○
added the media type
application/jsonfor the response with the statusresponse-media-type-added
- ○
added the media type
application/jsonfor the response with the statusresponse-media-type-added
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
api tag
Card paymentsaddedapi-tag-added
- ○
api tag
Card Paymentsremovedapi-tag-removed
- ○
- ○
api operation id
newPaymentremoved and replaced withCreate a paymentapi-operation-id-removed
- ○
- ○
api tag
Card Paymentsaddedapi-tag-added
- ○
- ○
api operation id
Create a paymentremoved and replaced withnewPaymentapi-operation-id-removed
- ○
api tag
Card paymentsremovedapi-tag-removed
- ○