Skip to content

Create an APM payment

Request

Perform a sale.

Security
BasicAuth
Headers
Content-Typestringrequired

The content type of the request body.

Value:"application/json"
WP-Api-Versionstringrequired

The API version.

Value:"2024-07-01"
Bodyapplication/jsonrequired
transactionReferencestring, [ 1 .. 64 ] characters^[a-zA-Z0-9\-_/!@#$%()*=.:;?\[\]{}~+]*$required

For Bizum transactions, please follow this extra regex [a-zA-Z0-9]{4,12}

orderReferencestring, [ 1 .. 64 ] characters^[a-zA-Z0-9\-_/!@#$%()*=.:;?\[\]{}~+]*$

A reference that you can apply to one or more payments according to your business needs. You may reuse the same reference across multiple payments, for example where:

  • the total amount for a single order is split across multiple payments
  • you use a single reference for each payment in a recurring agreement or split shipment scenario
merchantobjectrequired
instructionobjectrequired
{ "transactionReference": "Memory265-13/08/1876", "orderReference": "apm-order-12345", "merchant": { "entity": "default" }, "instruction": { "method": "ach", "narrative": { "line1": "MindPalace" }, "value": { "amount": 750, "currency": "USD" }, "paymentInstrument": { "type": "direct", "accountType": "checking", "accountNumber": "01234567890123456", "routingNumber": "012345678", "checkNumber": "012345678901234", "companyName": "Worldpay", "billingAddress": { "address1": "8500 Governors Hill Drive", "address2": "Symmes Township", "postalCode": "45249", "city": "Ohio", "state": "US-OH", "countryCode": "US" } }, "customer": { "firstName": "John", "lastName": "Johnson", "customerId": "43424", "email": "john@example.com" } } }

Responses

Request successful

Bodyapplication/json
paymentIdstring

The identifier of the payment resource.

lastEventstring
Enum:"authorized""cancelFailed""cancelled""cancelRequested""sentForSettlement""sentForAuthorization""settlementFailed""chargebackReversed""chargedBack""disputeExpired"
_actionsobject
redirectstring

The URL to redirect your customer to, or a QR code in Base64 to show to your customer, in order to complete the transaction.

commandIdstring

An action ID generated by us, identifying a single merchant interaction.

Example:"cmdYNdIHBPJwbkjLiykzTx0"
paymentInstrumentAll others (object) or PayPal (object) or SEPA DD (object) or Klarna (recurring) token (object)
One of:

Payment instrument for: ACH, Alipay China, Alipay Hong Kong, Alipay Plus, BANCOMAT Pay, Bancontact, Bizum, BLIK, EFT, Euteller, iDEAL guest, iDEAL recurring, Klarna, Klarna (recurring), Konbini, Multibanco, MyBank, Open Banking, PaysafeCard, Pix, Przelewy24, SafetyPay, Satispay, Swish, Trustly, China UnionPay, WeChat Pay.

transactionCodestring

For Pix payments - display to your customer for them to copy and paste in the Pix app.

For Swish payments - use this value as the {token} in the custom URL scheme: swish://paymentrequest?token={token}&callbackurl={callbackURL}. This will prompt the app to open, allowing your customer to complete their payment.

Example:"IZQ3iUfePwiWiwldJlipl8NGVA7w5IUg"
Response
{ "paymentInstrument": { "method": "ach", "type": "direct" }, "paymentId": "eyJrIjoiYXBtLXNlcnZpY2UtZGVmYXVsdCIsImxpbmtWZXJzaW9uIjoiNi4wLjAifQ==.BnnxxcMle38OazhwbF8J+4rtJi8CAq:Y3zUOn1dw6VWfvx:PHL5L0S+5ara5vz6ouV5yBmVUQCiSwQjs+1x5qJIJxAKWMWc2Mlb1doricEYlzsZIRIGCflvnYu1Ns8g1S0+66n6wCELiB9OHfX7cdDZM8QaH19DiFbmMAchPSTyxQUry+EjhI+4Av0FZgKybTQW8Eq5Lj6LFzcEh8YV9gKLyAJXKJwZGztDqfCZz9C54i7Qm6PznXY+lb8gjX08QbPuM7eN9CDfUDc8S4J3uauHV:lzKfpwhCpCj20XtN:AkTEXfvJEm8PKFuVlX10AbTZIsCMVbuMS1sIqrgbendo:b1Rfx8XquR8u:dBYr5a70wYkewsxOvrYXmLip3FvyJdzRzXf3LyUgHUqZh:ulvr2BwGjsfY6y32HN+osTE4dworCDzhGpsvEwJ:GRwLUNfeKBzVqK6WhJGqM+s8XpCA==", "lastEvent": "authorized", "_links": { "self": { "href": "https://try.access.worldpay-bsh.securedataplatform.co.uk/apmPayments/eyJrIjoiYXBtLXNlcnZpY2UtZGVmYXVsdCIsImxpbmtWZXJzaW9uIjoiNi4wLjAifQ==.BnnxxcMle38OazhwbF8J+4rtJi8CAq:Y3zUOn1dw6VWfvx:PHL5L0S+5ara5vz6ouV5yBmVUQCiSwQjs+1x5qJIJxAKWMWc2Mlb1doricEYlzsZIRIGCflvnYu1Ns8g1S0+66n6wCELiB9OHfX7cdDZM8QaH19DiFbmMAchPSTyxQUry+EjhI+4Av0FZgKybTQW8Eq5Lj6LFzcEh8YV9gKLyAJXKJwZGztDqfCZz9C54i7Qm6PznXY+lb8gjX08QbPuM7eN9CDfUDc8S4J3uauHV:lzKfpwhCpCj20XtN:AkTEXfvJEm8PKFuVlX10AbTZIsCMVbuMS1sIqrgbendo:b1Rfx8XquR8u:dBYr5a70wYkewsxOvrYXmLip3FvyJdzRzXf3LyUgHUqZh:ulvr2BwGjsfY6y32HN+osTE4dworCDzhGpsvEwJ:GRwLUNfeKBzVqK6WhJGqM+s8XpCA==" } }, "_actions": {}, "redirect": "", "commandId": "cmdSQBwMoFu3i2bNWmLGZLid0" }