Sale
Perform a pay direct sale request.
Methods
POST
Perform a sale request.
Request
Copied!
{
"type": "object",
"properties": {
"instruction": {
"type": "object",
"properties": {
"narrative": {
"type": "object",
"properties": {
"line1": {
"type": "string"
},
"line2": {
"type": "string"
}
},
"required": [
"line1"
]
},
"paymentInstrument": {
"type": "object",
"properties": {
"accountNumber": {
"type": "string"
},
"accountType": {
"type": "string"
},
"billingAddress": {
"type": "object",
"properties": {
"address1": {
"type": "string"
},
"address2": {
"type": "string"
},
"address3": {
"type": "string"
},
"city": {
"type": "string"
},
"countryCode": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"state": {
"type": "string"
}
},
"required": [
"address1",
"city",
"countryCode",
"postalCode"
]
},
"checkNumber": {
"type": "string"
},
"companyName": {
"type": "string"
},
"routingNumber": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"accountNumber",
"accountType",
"billingAddress",
"routingNumber",
"type"
]
},
"value": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
}
},
"required": [
"narrative",
"paymentInstrument",
"value"
]
},
"merchant": {
"type": "object",
"properties": {
"entity": {
"type": "string"
}
},
"required": [
"entity"
]
},
"transactionReference": {
"type": "string"
}
},
"required": [
"instruction",
"merchant",
"transactionReference"
]
}
{ "type": "object", "properties": { "instruction": { "type": "object", "properties": { "narrative": { "type": "object", "properties": { "line1": { "type": "string" }, "line2": { "type": "string" } }, "required": [ "line1" ] }, "paymentInstrument": { "type": "object", "properties": { "accountNumber": { "type": "string" }, "accountType": { "type": "string" }, "billingAddress": { "type": "object", "properties": { "address1": { "type": "string" }, "address2": { "type": "string" }, "address3": { "type": "string" }, "city": { "type": "string" }, "countryCode": { "type": "string" }, "firstName": { "type": "string" }, "lastName": { "type": "string" }, "postalCode": { "type": "string" }, "state": { "type": "string" } }, "required": [ "address1", "city", "countryCode", "postalCode" ] }, "checkNumber": { "type": "string" }, "companyName": { "type": "string" }, "routingNumber": { "type": "string" }, "type": { "type": "string" } }, "required": [ "accountNumber", "accountType", "billingAddress", "routingNumber", "type" ] }, "value": { "type": "object", "properties": { "amount": { "type": "integer" }, "currency": { "type": "string" } }, "required": [ "amount", "currency" ] } }, "required": [ "narrative", "paymentInstrument", "value" ] }, "merchant": { "type": "object", "properties": { "entity": { "type": "string" } }, "required": [ "entity" ] }, "transactionReference": { "type": "string" } }, "required": [ "instruction", "merchant", "transactionReference" ] }
Responses
Response schema
Copied!
{
"type": "object",
"properties": {
"_links": {
"type": "object",
"format": "hal+json"
},
"outcome": {
"type": "string"
}
},
"required": [
"_links",
"outcome"
]
}
{ "type": "object", "properties": { "_links": { "type": "object", "format": "hal+json" }, "outcome": { "type": "string" } }, "required": [ "_links", "outcome" ] }
Link relationship
direct:events
Retrieve sale resource details
direct:reversal
Reverse a sale request
ACH Sale with an outcome of 'authorized'
POST
Copied!
{
"Authorization": "Basic Auth",
"Content-Type": "application/vnd.worldpay.pay-direct-v1+json",
"Accept": "application/vnd.worldpay.pay-direct-v1+json"
}
{ "Authorization": "Basic Auth", "Content-Type": "application/vnd.worldpay.pay-direct-v1+json", "Accept": "application/vnd.worldpay.pay-direct-v1+json" }
Copied!
{
"transactionReference": "reference",
"merchant": {
"entity": "entity"
},
"instruction": {
"narrative": {
"line1": "LINE1",
"line2": "LINE2"
},
"paymentInstrument": {
"type": "bankAccountUS",
"accountType": "corporate",
"accountNumber": "01234567890123456",
"routingNumber": "01234567",
"checkNumber": "012345678901234",
"companyName": "companyName",
"billingAddress": {
"firstName": "firstName",
"lastName": "lastName",
"address1": "address1",
"address2": "address2",
"address3": "address3",
"postalCode": "45249",
"city": "city",
"state": "OH",
"countryCode": "US"
}
},
"value": {
"currency": "USD",
"amount": 250
}
}
}
{ "transactionReference": "reference", "merchant": { "entity": "entity" }, "instruction": { "narrative": { "line1": "LINE1", "line2": "LINE2" }, "paymentInstrument": { "type": "bankAccountUS", "accountType": "corporate", "accountNumber": "01234567890123456", "routingNumber": "01234567", "checkNumber": "012345678901234", "companyName": "companyName", "billingAddress": { "firstName": "firstName", "lastName": "lastName", "address1": "address1", "address2": "address2", "address3": "address3", "postalCode": "45249", "city": "city", "state": "OH", "countryCode": "US" } }, "value": { "currency": "USD", "amount": 250 } } }
201
Copied!
{
"outcome": "authorized",
"_links": {
"direct:events": {
"href": "https://try.access.worldpay.com/payments/alternative/direct/events/{resource}"
},
"direct:reversal": {
"href": "https://try.access.worldpay.com/payments/alternative/direct/reversals/{resource}"
},
"curies": [
{
"name": "direct",
"href": "https://try.access.worldpay.com/rels/payments/alternative/direct/{rel}",
"templated": true
}
]
}
}
{ "outcome": "authorized", "_links": { "direct:events": { "href": "https://try.access.worldpay.com/payments/alternative/direct/events/{resource}" }, "direct:reversal": { "href": "https://try.access.worldpay.com/payments/alternative/direct/reversals/{resource}" }, "curies": [ { "name": "direct", "href": "https://try.access.worldpay.com/rels/payments/alternative/direct/{rel}", "templated": true } ] } }