Front-end Order Creation
Hpp Checkout Session Create
Changed onPurpose
Creates a session ID and redirect URL that are used to initiate a Hosted Payment Page.
Preconditions:
- All the authorization related data is present.
- Accept and decline URL are present to redirect the buyer from the hosted payment page after the authorization attempt.
Success
- Response Code: HTTP 201
- Response body: session_id -> Session ID for the checkout session which will be used to get the authorization detail and also confirm the checkout session.
- Response body: hpp_url -> URL to redirect or send to buyer to access the hosted payment page.
- Response body: expires_at -> Expiration time of the checkout session.
Attention:
- The session has an expiry time of 48 hours.
post/hpp-checkout-sessions
Request
- Base URLhttps://paella-sandbox.billie.io/api/v2
- AuthOAuth 2PasswordToken URL/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"amount": {
"gross": 260.27,
"net": 200.12,
"tax": 60.15
},
"duration": 30,
"delivery_address": {
"country": "DE"
},
"billing_address": {
"country": "DE"
},
"debtor_company": {
"legal_form": "10001",
"address_postal_code": "10969",
"address_country": "DE",
"organisation_type": "other"
},
"debtor_person": {
"email": "foo@example.org",
"first_name": "James",
"last_name": "Smith",
"phone_number": "030 31199251"
},
"line_items": [
{
"amount": {
"gross": 260.27,
"net": 200.12,
"tax": 60.15
}
}
],
"merchant_urls": {
"accept_url": "https://example.org/success/page",
"decline_url": "https://example.org/error/page"
}
}Response
HPP session created
Example response
{
"session_id": "12345667-890a-bcde-f123-34567890abcd",
"hpp_url": "https://hpp.billie.io/6b63fca4-6765-43f2-aee5-96ee9554befc"
}Changes
- info
endpoint added
- info