Skip to main content

Create Pay by link

The first step is to create a Pay by link via server-side call to Nemuru's Pay by link API. Make sure to get an access token before calling the POST Create Pay by link, as this request requires authentication.

POST Create Pay by link

Request

Depending on the sector, there are different article attributes that might be relevant for the lender's credit decisioning. Highlighted lines in the following code blocks point out the main differences between one type of article and another.

POST /order/
Authorization: Bearer access_token
Content-Type: application/json
tip

Check the API Reference for all the details about this request / response.

{
"product": "instalments",
"period": 3,
"onboarding_fulfilled_by": "pay_by_link",
"merchant": {
"order_reference_1": "7QuHQ5WVQQqyWVPW",
"order_reference_2": "14-922-1039",
"notification_url": "https://nemuru.free.beeceptor.com/callback",
"notification_auth": {
"authorization_header": "Basic bG9sOnNlY3VyZQ==",
"content_type": "application/json"
},
"notification_additional_payload": {
"cart": "h12837hg="
}
},
"customer": {
"first_name": "Alba",
"last_name": "Martinez Laguna",
"title": "ms",
"email": "alba.martinez@gmail.com",
"phone_number": "+34659723349",
"document_number": "55593310X",
"document_expiration_date": "2024-02-27T12:00:00+01:00",
"birth_date": "1982-11-03T12:00:00+01:00",
"nationality": "ESP",
"logged_in": false,
"locale": "es-ES",
"ip_address": "192.0.2.146",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
},
"cart": {
"reference": "76t7y7sau8y398y",
"total_price_with_tax": 1500,
"currency": "EUR",
"items": [
{
"article": {
"name": "KIVIK 3-seat sofa",
// highlight-next-line
"type": "product",
"category": "physical",
"reference": "4912345678904",
"unit_price_with_tax": 875,
"description": "3-seat sofa, with chaise longue/Hillared anthracite",
"brand": "the-ikea-brand",
"mpn": "AD6654412-334.22",
"url": "https://www.ikea.com/ie/en/p/kivik-3-seat-sofa-with-chaise-longue-hillared-anthracite-s89193665/",
"image_url": "https://www.ikea.com/ie/en/p/kivik-3-seat-sofa-with-chaise-longue-hillared-anthracite-s89193665/"
},
"units": 1,
"total_discount": 0,
"total_price_with_tax": 875,
"auto_shipping": true
},
{
"article": {
"name": "EKEDALEN / EKEDALEN Bar table and 4 bar stools",
// highlight-next-line
"type": "product",
"category": "physical",
"reference": "5930423178914",
"unit_price_with_tax": 625,
"description": "Bar table and 4 bar stools, white/Ramna light grey120 cm"
},
"units": 1,
"total_discount": 0,
"total_price_with_tax": 625
}
]
},
"billing": {
"first_name": "Alba",
"last_name": "Martinez",
"email": "alba.martinez@gmail.com",
"phone_number": "+34659723349",
"company": "EL DON TRESILLO CATALAN SL",
"corporate_id_number": "A35628221",
"address": {
"street_address": "Pl. de Pau Vila, 1",
"street_address_2": "Planta 1A",
"postal_code": "08003",
"city": "Barcelona",
"country": "ESP"
}
}
}

Response

Response Headers
Date: Thu, 24 Mar 2022 18:20:46 GMT
Content-Type: application/json
...
Id: 41c325c0-161c-43d6-bb4f-65f6b50b9ba0
Url: https://pay.nemuru.com?id=41c325c0-161c-43d6-bb4f-65f6b50b9ba0
info

It is important to save the order id returned within the header of a successful response (key Id). This order id should be used in subsequent requests to link them to this particular order; this id will also be included in the notifications that Nemuru sends to your system (notification_url) for order status changes, etc. Additionally, the key Url contains the payment url that you could share or redirect your customer to.