Checkout creation
GraphQL query
The
<ESCAPED_QUERY>must contain the following GraphQL query:
mutation($merchantId: ID!, $payload: String!) {
createMerchantCheckout(merchantId: $merchantId, payload: $payload) {
checkout {
token
}
errors {
code
field
message
}
}
}Please refer to the JWT structure section for more details about how to the generate the
<JWT>The checkout creation:
is successful if the response contains a checkout token.
is not successful if the response contains a list of errors.
JWT structure
The <JWT> must contain the encoded and signed content required to create the checkout. Read more information about encoding and signing in Authenticated requests.
The content (before being encoded and signed) should have the following JSON format:
Field details
iss
String
Required. This should contain the merchant ID, which will be provided to the merchant ahead of time
iat
Integer
Required. This should be the timestamp when the payload is generated following the UNIX epoc time format
Data type
merchantReference
String
Required. Merchant reference for the checkout
customerInfo
Optional for checkout creation
Required for checkout submission.
Refer to the Customer info type for more details on its structure
address
Optional for checkout creation
Required for checkout submission.
Refer to the Address type for more details on its structure
paymentInfo
Optional for checkout creation
Required for checkout submission.
Refer to the Payment info type for more details on its structure
Callback URLs type
successRedirect
String
URL to redirect the customer when the checkout was completed successfully
failureRedirect
String
URL to redirect the customer when the checkout was not completed successfully
serverToServer
String
Required. URL for Raylo to perform requests to the merchant server
Customer info type
firstName
String
Required for checkout submission.
Optional for checkout creation
Customer's first name
lastName
String
Optional for checkout creation
Required for checkout submission.
Customer's last name
String
Optional for checkout creation
Required for checkout submission.
Customer's email address
mobilePhoneNumber
String
Optional for checkout creation
Required for checkout submission.
Customer's mobile phone number using either a valid:
local format for the country
international format (e.g. starting with
+<COUNTRY_CODE>)
dateOfBirth
String
Optional for checkout creation
Required for checkout submission.
Customer's date of birth in the ISO8601 format (YYYY-MM-DD)
Address type
line1
String
Required. Address line 1
line2
String
Address line 2
line3
String
Address line 3
city
String
Required. City
postcode
String
Required. Postcode in a valid format for their country
region
String
Region
Payment Info type
bankAccountName
String
Required. Customer's bank account name
bankAccountNumber
String
Required. Account number following the local format for the country (e.g. 8 characters in the UK)
bankBranchIdentifier
String
Required. Branch identifier following the local format for the country (e.g. 6 characters in the UK)
directDebitMandateAuthorised
Boolean
Required. Customer's confirmation for Raylo to be authorized to perform direct debits from the customer's bank account
Item type
merchantPrice
Required. Refer to the Merchant price type for more info on its structure.
termLength
Integer
Optional. Lease term length
Merchant price type
valueBeforeTax
Float
Required. Merchant price value before tax
valueAfterTax
Float
Required. Merchant price value after tax
taxPercentage
Float
Required. Tax percentage associated with the merchant price
taxValue
Float
Required. Difference between the value before and after tax
Variant type
reference
String
Required. Merchant reference, , sometimes called an SKU, that identifies uniquely the variant.
Last updated
Was this helpful?