Card payments

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'

post/v1/payments

Request body

amountinteger required

amount in pence

referencestring required

payment reference

descriptionstring required

payment description

language'ENGLISH' | 'WELSH'

ISO-639-1 Alpha-2 code of a supported language to use on the payment pages

emailstring

email

return_urlstring required

service return url

delayed_captureboolean

delayed capture flag

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

amountinteger
descriptionstring
referencestring
language'ENGLISH' | 'WELSH'
payment_idstring
payment_providerstring
return_urlstring
created_datestring
delayed_captureboolean
provider_idstring
metadataobject

Example response

{
  "amount": 1200,
  "state": {
    "status": "created",
    "message": "User cancelled the payment",
    "code": "P010"
  },
  "description": "Your Service Description",
  "reference": "your-reference",
  "language": "en",
  "payment_id": "hu20sqlact5260q2nanm0q8u93",
  "payment_provider": "worldpay",
  "return_url": "http://your.service.domain/your-reference",
  "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",
  "refund_summary": {
    "status": "available",
    "amount_available": 100
  },
  "settlement_summary": {
    "capture_submit_time": "2016-01-21T17:15:000Z",
    "captured_date": "2016-01-21"
  }
}

Changes