Create a Hosted Payments Page session #
Create a Hosted Payments Page session and pass through all the payment information, like the amount, currency, country and reference.
Authorizations
bearer
HTTP: bearer #
HTTP Authorization Scheme: bearer
Bearer format: JWT
Authorizationrequired stringBearer token (API Key).
Request Body schema: application/json #
Request body for creating a Hosted Payments Page session.
currencyrequired string = 3 characters The three-letter ISO currency code of the payment. billingrequired objectThe billing details. success_urlrequired string <= 255 characters Overrides the default success redirect URL for redirect payment methods. cancel_urlrequired string <= 255 characters The URL to which the customer should be directed if they cancel the payment. failure_urlrequired string <= 255 characters Overrides the default failure redirect URL for redirect payment methods. amount number >= 0 The payment amount. The exact format depends on the currency. payment_type string Default: “Regular” Enum:”Regular””Recurring”This must be specified for card payments where the cardholder is not present. payment_ip string <= 45 characters The customer’s IP address. Only IPv4 and IPv6 addresses are accepted. billing_descriptor objectAn optional description that is displayed on the customer’s statement identifying a purchase. reference string <= 50 characters A reference you can use to identify the payment (max 50 chars, Amex: 30, iDEAL: 35, Benefit: unique alphanumeric). description string <= 100 characters A description of the payment (max 100 chars). display_name stringThe merchant name to display to customers on the checkout page. processing_channel_id string^(pc)_(\w{26})$The processing channel to be used for the payment. amount_allocations Array of objectsThe sub-entities that the payment is being processed on behalf of. customer objectThe customer’s details. shipping objectThe address any products are being sent to. recipient objectInformation about the recipient of the payment’s funds. processing objectUse the processing object to influence or override the data sent during card processing. allow_payment_methods Array of stringsSpecifies which payment method options to present to the customer. disabled_payment_methods Array of stringsSpecifies which payment method options to not present to the customer. products Array of objectsContains details about the products in the order. risk objectConfigures the risk assessment performed during payment processing. customer_retry objectConfigures the parameters for customer retries. sender objectThe sender of the payment. metadata objectAllows you to store additional information about the transaction. Only one level of depth is allowed. locale string Default: “en-GB”Creates a translated version of the page in the specified language. 3ds objectInformation required for 3D Secure payments. capture booleanWhether to capture the payment (if applicable). capture_on stringA timestamp (ISO 8601 code) that determines when the payment should be captured. Providing this field will automatically set capture to true. instruction objectDetails about the payment instruction. payment_method_configuration objectConfiguration options for specific payment methods.
Responses #
201 Created Hosted Payments Page
Response Schema: application/json #
idrequired stringThe unique identifier for a Hosted Payments Page. _linksrequired objectThe links related to the hosted payment. referencerequired stringA reference you can later use to identify this payment, such as an order number. warnings Array of objectsWarnings related to the allow_payment_methods object in the request.
401 Unauthorized
422 Invalid data was sent.
Response Schema: application/json #
request_idrequired stringThe unique request identifier. error_typerequired stringThe error type. error_codesrequired Array of stringsThe error codes.
Get Hosted Payments Page details #
Retrieve details about a specific Hosted Payments Page using the ID returned when it was created. In the response, you will see the status of the Hosted Payments Page.
Authorizations
bearer
HTTP: bearer #
HTTP Authorization Scheme: bearer
Bearer format: JWT
path Parameters #
idrequired string = 16 characters ^hpp_[A-Za-z0-9_-]{12}$The unique identifier for a Hosted Payments Page.
Authorization required string
Responses #
200 Hosted Payments Page details retrieved successfully
Response Schema: application/json #
idrequired stringThe unique identifier for a Hosted Payments Page. statusrequired string Enum:”Payment Pending””Payment Received””Expired”The status of the Hosted Payments Page. amountrequired numberThe original payment amount. currencyrequired stringThe three-letter ISO currency code of the payment. billingrequired objectThe billing details. success_urlrequired stringThe provided URL your customer will be redirected to upon a successful payment. cancel_urlrequired stringThe provided URL your customer will be redirected to if the payment is cancelled. failure_urlrequired stringThe provided URL your customer will be redirected to upon a failed payment. _linksrequired objectThe links related to the Hosted Payments Page. payment_id stringUnique identifier for an in progress or completed payment for this Payment Link. reference stringYour reference for the payment. description stringA description of the payment. customer objectThe customer’s details. products Array of objectsContains details about the products in the order. metadata objectAny additional information stored at the point of creation. amount_allocations Array of objectsThe sub-entities that the payment is being processed on behalf of.
401 Unauthorized
404 Hosted Payments Page not found
Response Schema: application/json #
request_id required stringThe unique request identifier. error_type required stringThe error type. error_codes required Array of stringsThe error codes.